From 3b961a61ef9fb89adf20a89550d5de0bfe135448 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Thu, 20 Oct 2022 03:04:26 +0000 Subject: CTAN sync 202210200304 --- macros/jptex/latex/pxjahyper/README-ja.md | 3 + macros/jptex/latex/pxjahyper/README.md | 1 + macros/jptex/latex/pxjahyper/pxjahyper-ajm.def | 2 +- macros/jptex/latex/pxjahyper/pxjahyper-enc.sty | 2 +- macros/jptex/latex/pxjahyper/pxjahyper-uni.def | 2 +- macros/jptex/latex/pxjahyper/pxjahyper.pdf | Bin 155851 -> 155716 bytes macros/jptex/latex/pxjahyper/pxjahyper.sty | 18 +- macros/jptex/latex/pxjahyper/pxjahyper.tex | 4 +- macros/latex/contrib/acmart/Makefile | 11 +- macros/latex/contrib/acmart/README | 6 + macros/latex/contrib/acmart/acmart.dtx | 418 +- macros/latex/contrib/acmart/acmart.pdf | Bin 909624 -> 905284 bytes macros/latex/contrib/acmart/acmguide.pdf | Bin 427632 -> 431697 bytes .../latex/contrib/acmart/samples/sample-acmcp.pdf | Bin 0 -> 208463 bytes .../contrib/acmart/samples/sample-acmengage.pdf | Bin 395777 -> 395897 bytes .../contrib/acmart/samples/sample-acmlarge.pdf | Bin 605879 -> 606046 bytes .../acmart/samples/sample-acmsmall-biblatex.pdf | Bin 628602 -> 628568 bytes .../acmart/samples/sample-acmsmall-conf.pdf | Bin 1049943 -> 1050111 bytes .../acmart/samples/sample-acmsmall-submission.pdf | Bin 618221 -> 618407 bytes .../contrib/acmart/samples/sample-acmsmall.pdf | Bin 615731 -> 615912 bytes .../latex/contrib/acmart/samples/sample-acmtog.pdf | Bin 563350 -> 563306 bytes .../contrib/acmart/samples/sample-authordraft.pdf | Bin 1043038 -> 1043265 bytes .../contrib/acmart/samples/sample-lualatex.pdf | Bin 780062 -> 780905 bytes .../contrib/acmart/samples/sample-manuscript.pdf | Bin 617941 -> 618126 bytes .../acmart/samples/sample-sigconf-biblatex.pdf | Bin 615270 -> 615682 bytes .../contrib/acmart/samples/sample-sigconf-i13n.pdf | Bin 1054983 -> 1055067 bytes .../contrib/acmart/samples/sample-sigconf.pdf | Bin 1039228 -> 1039467 bytes .../contrib/acmart/samples/sample-sigplan.pdf | Bin 1048048 -> 1048138 bytes .../contrib/acmart/samples/sample-xelatex.pdf | Bin 659074 -> 659258 bytes macros/latex/contrib/acmart/samples/samples.dtx | 90 +- macros/latex/contrib/acmart/samples/samples.ins | 3 +- macros/latex/contrib/glossaries-extra/CHANGES | 335 + macros/latex/contrib/glossaries-extra/DEPENDS.txt | 1 + macros/latex/contrib/glossaries-extra/README | 4 +- .../glossaries-extra/glossaries-extra-code.pdf | Bin 1523017 -> 1805034 bytes .../glossaries-extra-manual-example001.pdf | Bin 0 -> 24434 bytes .../glossaries-extra-manual-example001.png | Bin 0 -> 3024 bytes .../glossaries-extra-manual-example001.tex | 19 + .../glossaries-extra-manual-example002.pdf | Bin 0 -> 26398 bytes .../glossaries-extra-manual-example002.png | Bin 0 -> 5604 bytes .../glossaries-extra-manual-example002.tex | 17 + .../glossaries-extra-manual-example003.pdf | Bin 0 -> 26398 bytes .../glossaries-extra-manual-example003.png | Bin 0 -> 5563 bytes .../glossaries-extra-manual-example003.tex | 29 + .../glossaries-extra-manual-example004.pdf | Bin 0 -> 31736 bytes .../glossaries-extra-manual-example004.png | Bin 0 -> 11529 bytes .../glossaries-extra-manual-example004.tex | 36 + .../glossaries-extra-manual-example005.pdf | Bin 0 -> 33337 bytes .../glossaries-extra-manual-example005.png | Bin 0 -> 7830 bytes .../glossaries-extra-manual-example005.tex | 20 + .../glossaries-extra-manual-example006.pdf | Bin 0 -> 28569 bytes .../glossaries-extra-manual-example006.png | Bin 0 -> 8408 bytes .../glossaries-extra-manual-example006.tex | 30 + .../glossaries-extra-manual-example007.pdf | Bin 0 -> 67117 bytes .../glossaries-extra-manual-example007.png | Bin 0 -> 9843 bytes .../glossaries-extra-manual-example007.tex | 17 + .../glossaries-extra-manual-example008.pdf | Bin 0 -> 36784 bytes .../glossaries-extra-manual-example008.png | Bin 0 -> 4763 bytes .../glossaries-extra-manual-example008.tex | 16 + .../glossaries-extra-manual-example009.pdf | Bin 0 -> 49366 bytes .../glossaries-extra-manual-example009.png | Bin 0 -> 5079 bytes .../glossaries-extra-manual-example009.tex | 17 + .../glossaries-extra-manual-example010.pdf | Bin 0 -> 36798 bytes .../glossaries-extra-manual-example010.png | Bin 0 -> 4787 bytes .../glossaries-extra-manual-example010.tex | 16 + .../glossaries-extra-manual-example011.pdf | Bin 0 -> 55865 bytes .../glossaries-extra-manual-example011.png | Bin 0 -> 4622 bytes .../glossaries-extra-manual-example011.tex | 16 + .../glossaries-extra-manual-example012.pdf | Bin 0 -> 73199 bytes .../glossaries-extra-manual-example012.png | Bin 0 -> 4947 bytes .../glossaries-extra-manual-example012.tex | 17 + .../glossaries-extra-manual-example013.pdf | Bin 0 -> 55874 bytes .../glossaries-extra-manual-example013.png | Bin 0 -> 4660 bytes .../glossaries-extra-manual-example013.tex | 16 + .../glossaries-extra-manual-example014.pdf | Bin 0 -> 48913 bytes .../glossaries-extra-manual-example014.png | Bin 0 -> 4645 bytes .../glossaries-extra-manual-example014.tex | 17 + .../glossaries-extra-manual-example015.pdf | Bin 0 -> 66258 bytes .../glossaries-extra-manual-example015.png | Bin 0 -> 4963 bytes .../glossaries-extra-manual-example015.tex | 18 + .../glossaries-extra-manual-example016.pdf | Bin 0 -> 48931 bytes .../glossaries-extra-manual-example016.png | Bin 0 -> 4647 bytes .../glossaries-extra-manual-example016.tex | 17 + .../glossaries-extra-manual-example017.pdf | Bin 0 -> 50134 bytes .../glossaries-extra-manual-example017.png | Bin 0 -> 4813 bytes .../glossaries-extra-manual-example017.tex | 16 + .../glossaries-extra-manual-example018.pdf | Bin 0 -> 67478 bytes .../glossaries-extra-manual-example018.png | Bin 0 -> 5134 bytes .../glossaries-extra-manual-example018.tex | 17 + .../glossaries-extra-manual-example019.pdf | Bin 0 -> 50147 bytes .../glossaries-extra-manual-example019.png | Bin 0 -> 4879 bytes .../glossaries-extra-manual-example019.tex | 16 + .../glossaries-extra-manual-example020.pdf | Bin 0 -> 47640 bytes .../glossaries-extra-manual-example020.png | Bin 0 -> 4771 bytes .../glossaries-extra-manual-example020.tex | 17 + .../glossaries-extra-manual-example021.pdf | Bin 0 -> 36785 bytes .../glossaries-extra-manual-example021.png | Bin 0 -> 4708 bytes .../glossaries-extra-manual-example021.tex | 16 + .../glossaries-extra-manual-example022.pdf | Bin 0 -> 55844 bytes .../glossaries-extra-manual-example022.png | Bin 0 -> 4644 bytes .../glossaries-extra-manual-example022.tex | 16 + .../glossaries-extra-manual-example023.pdf | Bin 0 -> 57133 bytes .../glossaries-extra-manual-example023.png | Bin 0 -> 4764 bytes .../glossaries-extra-manual-example023.tex | 17 + .../glossaries-extra-manual-example024.pdf | Bin 0 -> 39659 bytes .../glossaries-extra-manual-example024.png | Bin 0 -> 4696 bytes .../glossaries-extra-manual-example024.tex | 17 + .../glossaries-extra-manual-example025.pdf | Bin 0 -> 51597 bytes .../glossaries-extra-manual-example025.png | Bin 0 -> 4787 bytes .../glossaries-extra-manual-example025.tex | 18 + .../glossaries-extra-manual-example026.pdf | Bin 0 -> 49894 bytes .../glossaries-extra-manual-example026.png | Bin 0 -> 4827 bytes .../glossaries-extra-manual-example026.tex | 16 + .../glossaries-extra-manual-example027.pdf | Bin 0 -> 56567 bytes .../glossaries-extra-manual-example027.png | Bin 0 -> 4851 bytes .../glossaries-extra-manual-example027.tex | 17 + .../glossaries-extra-manual-example028.pdf | Bin 0 -> 59225 bytes .../glossaries-extra-manual-example028.png | Bin 0 -> 4920 bytes .../glossaries-extra-manual-example028.tex | 16 + .../glossaries-extra-manual-example029.pdf | Bin 0 -> 69396 bytes .../glossaries-extra-manual-example029.png | Bin 0 -> 4962 bytes .../glossaries-extra-manual-example029.tex | 17 + .../glossaries-extra-manual-example030.pdf | Bin 0 -> 36810 bytes .../glossaries-extra-manual-example030.png | Bin 0 -> 4952 bytes .../glossaries-extra-manual-example030.tex | 16 + .../glossaries-extra-manual-example031.pdf | Bin 0 -> 49378 bytes .../glossaries-extra-manual-example031.png | Bin 0 -> 5268 bytes .../glossaries-extra-manual-example031.tex | 17 + .../glossaries-extra-manual-example032.pdf | Bin 0 -> 55905 bytes .../glossaries-extra-manual-example032.png | Bin 0 -> 4848 bytes .../glossaries-extra-manual-example032.tex | 16 + .../glossaries-extra-manual-example033.pdf | Bin 0 -> 73249 bytes .../glossaries-extra-manual-example033.png | Bin 0 -> 5185 bytes .../glossaries-extra-manual-example033.tex | 17 + .../glossaries-extra-manual-example034.pdf | Bin 0 -> 48949 bytes .../glossaries-extra-manual-example034.png | Bin 0 -> 4951 bytes .../glossaries-extra-manual-example034.tex | 17 + .../glossaries-extra-manual-example035.pdf | Bin 0 -> 66300 bytes .../glossaries-extra-manual-example035.png | Bin 0 -> 5273 bytes .../glossaries-extra-manual-example035.tex | 18 + .../glossaries-extra-manual-example036.pdf | Bin 0 -> 50170 bytes .../glossaries-extra-manual-example036.png | Bin 0 -> 5090 bytes .../glossaries-extra-manual-example036.tex | 16 + .../glossaries-extra-manual-example037.pdf | Bin 0 -> 67533 bytes .../glossaries-extra-manual-example037.png | Bin 0 -> 5421 bytes .../glossaries-extra-manual-example037.tex | 17 + .../glossaries-extra-manual-example038.pdf | Bin 0 -> 59249 bytes .../glossaries-extra-manual-example038.png | Bin 0 -> 5102 bytes .../glossaries-extra-manual-example038.tex | 16 + .../glossaries-extra-manual-example039.pdf | Bin 0 -> 75150 bytes .../glossaries-extra-manual-example039.png | Bin 0 -> 5430 bytes .../glossaries-extra-manual-example039.tex | 17 + .../glossaries-extra-manual-example040.pdf | Bin 0 -> 36971 bytes .../glossaries-extra-manual-example040.png | Bin 0 -> 5173 bytes .../glossaries-extra-manual-example040.tex | 16 + .../glossaries-extra-manual-example041.pdf | Bin 0 -> 51165 bytes .../glossaries-extra-manual-example041.png | Bin 0 -> 5642 bytes .../glossaries-extra-manual-example041.tex | 17 + .../glossaries-extra-manual-example042.pdf | Bin 0 -> 36944 bytes .../glossaries-extra-manual-example042.png | Bin 0 -> 5195 bytes .../glossaries-extra-manual-example042.tex | 16 + .../glossaries-extra-manual-example043.pdf | Bin 0 -> 51134 bytes .../glossaries-extra-manual-example043.png | Bin 0 -> 5673 bytes .../glossaries-extra-manual-example043.tex | 17 + .../glossaries-extra-manual-example044.pdf | Bin 0 -> 56045 bytes .../glossaries-extra-manual-example044.png | Bin 0 -> 5326 bytes .../glossaries-extra-manual-example044.tex | 16 + .../glossaries-extra-manual-example045.pdf | Bin 0 -> 75064 bytes .../glossaries-extra-manual-example045.png | Bin 0 -> 5819 bytes .../glossaries-extra-manual-example045.tex | 17 + .../glossaries-extra-manual-example046.pdf | Bin 0 -> 36786 bytes .../glossaries-extra-manual-example046.png | Bin 0 -> 4925 bytes .../glossaries-extra-manual-example046.tex | 16 + .../glossaries-extra-manual-example047.pdf | Bin 0 -> 49359 bytes .../glossaries-extra-manual-example047.png | Bin 0 -> 5235 bytes .../glossaries-extra-manual-example047.tex | 17 + .../glossaries-extra-manual-example048.pdf | Bin 0 -> 55883 bytes .../glossaries-extra-manual-example048.png | Bin 0 -> 4850 bytes .../glossaries-extra-manual-example048.tex | 16 + .../glossaries-extra-manual-example049.pdf | Bin 0 -> 73221 bytes .../glossaries-extra-manual-example049.png | Bin 0 -> 5177 bytes .../glossaries-extra-manual-example049.tex | 17 + .../glossaries-extra-manual-example050.pdf | Bin 0 -> 48942 bytes .../glossaries-extra-manual-example050.png | Bin 0 -> 4892 bytes .../glossaries-extra-manual-example050.tex | 17 + .../glossaries-extra-manual-example051.pdf | Bin 0 -> 66289 bytes .../glossaries-extra-manual-example051.png | Bin 0 -> 5207 bytes .../glossaries-extra-manual-example051.tex | 18 + .../glossaries-extra-manual-example052.pdf | Bin 0 -> 50119 bytes .../glossaries-extra-manual-example052.png | Bin 0 -> 4945 bytes .../glossaries-extra-manual-example052.tex | 16 + .../glossaries-extra-manual-example053.pdf | Bin 0 -> 67471 bytes .../glossaries-extra-manual-example053.png | Bin 0 -> 5269 bytes .../glossaries-extra-manual-example053.tex | 17 + .../glossaries-extra-manual-example054.pdf | Bin 0 -> 59230 bytes .../glossaries-extra-manual-example054.png | Bin 0 -> 5071 bytes .../glossaries-extra-manual-example054.tex | 16 + .../glossaries-extra-manual-example055.pdf | Bin 0 -> 75123 bytes .../glossaries-extra-manual-example055.png | Bin 0 -> 5395 bytes .../glossaries-extra-manual-example055.tex | 17 + .../glossaries-extra-manual-example056.pdf | Bin 0 -> 36971 bytes .../glossaries-extra-manual-example056.png | Bin 0 -> 5279 bytes .../glossaries-extra-manual-example056.tex | 16 + .../glossaries-extra-manual-example057.pdf | Bin 0 -> 51412 bytes .../glossaries-extra-manual-example057.png | Bin 0 -> 5780 bytes .../glossaries-extra-manual-example057.tex | 17 + .../glossaries-extra-manual-example058.pdf | Bin 0 -> 36969 bytes .../glossaries-extra-manual-example058.png | Bin 0 -> 5139 bytes .../glossaries-extra-manual-example058.tex | 16 + .../glossaries-extra-manual-example059.pdf | Bin 0 -> 51416 bytes .../glossaries-extra-manual-example059.png | Bin 0 -> 5676 bytes .../glossaries-extra-manual-example059.tex | 17 + .../glossaries-extra-manual-example060.pdf | Bin 0 -> 36808 bytes .../glossaries-extra-manual-example060.png | Bin 0 -> 5004 bytes .../glossaries-extra-manual-example060.tex | 17 + .../glossaries-extra-manual-example061.pdf | Bin 0 -> 36797 bytes .../glossaries-extra-manual-example061.png | Bin 0 -> 5220 bytes .../glossaries-extra-manual-example061.tex | 17 + .../glossaries-extra-manual-example062.pdf | Bin 0 -> 49384 bytes .../glossaries-extra-manual-example062.png | Bin 0 -> 5323 bytes .../glossaries-extra-manual-example062.tex | 18 + .../glossaries-extra-manual-example063.pdf | Bin 0 -> 49371 bytes .../glossaries-extra-manual-example063.png | Bin 0 -> 5560 bytes .../glossaries-extra-manual-example063.tex | 18 + .../glossaries-extra-manual-example064.pdf | Bin 0 -> 47645 bytes .../glossaries-extra-manual-example064.png | Bin 0 -> 4868 bytes .../glossaries-extra-manual-example064.tex | 18 + .../glossaries-extra-manual-example065.pdf | Bin 0 -> 36791 bytes .../glossaries-extra-manual-example065.png | Bin 0 -> 4804 bytes .../glossaries-extra-manual-example065.tex | 17 + .../glossaries-extra-manual-example066.pdf | Bin 0 -> 36809 bytes .../glossaries-extra-manual-example066.png | Bin 0 -> 4963 bytes .../glossaries-extra-manual-example066.tex | 17 + .../glossaries-extra-manual-example067.pdf | Bin 0 -> 36792 bytes .../glossaries-extra-manual-example067.png | Bin 0 -> 5027 bytes .../glossaries-extra-manual-example067.tex | 17 + .../glossaries-extra-manual-example068.pdf | Bin 0 -> 49385 bytes .../glossaries-extra-manual-example068.png | Bin 0 -> 5279 bytes .../glossaries-extra-manual-example068.tex | 18 + .../glossaries-extra-manual-example069.pdf | Bin 0 -> 49372 bytes .../glossaries-extra-manual-example069.png | Bin 0 -> 5392 bytes .../glossaries-extra-manual-example069.tex | 18 + .../glossaries-extra-manual-example070.pdf | Bin 0 -> 36797 bytes .../glossaries-extra-manual-example070.png | Bin 0 -> 4815 bytes .../glossaries-extra-manual-example070.tex | 16 + .../glossaries-extra-manual-example071.pdf | Bin 0 -> 47651 bytes .../glossaries-extra-manual-example071.png | Bin 0 -> 4878 bytes .../glossaries-extra-manual-example071.tex | 17 + .../glossaries-extra-manual-example072.pdf | Bin 0 -> 55866 bytes .../glossaries-extra-manual-example072.png | Bin 0 -> 4734 bytes .../glossaries-extra-manual-example072.tex | 16 + .../glossaries-extra-manual-example073.pdf | Bin 0 -> 57158 bytes .../glossaries-extra-manual-example073.png | Bin 0 -> 4851 bytes .../glossaries-extra-manual-example073.tex | 17 + .../glossaries-extra-manual-example074.pdf | Bin 0 -> 48400 bytes .../glossaries-extra-manual-example074.png | Bin 0 -> 8118 bytes .../glossaries-extra-manual-example074.tex | 16 + .../glossaries-extra-manual-example075.pdf | Bin 0 -> 56151 bytes .../glossaries-extra-manual-example075.png | Bin 0 -> 8907 bytes .../glossaries-extra-manual-example075.tex | 17 + .../glossaries-extra-manual-example076.pdf | Bin 0 -> 47021 bytes .../glossaries-extra-manual-example076.png | Bin 0 -> 7731 bytes .../glossaries-extra-manual-example076.tex | 16 + .../glossaries-extra-manual-example077.pdf | Bin 0 -> 54773 bytes .../glossaries-extra-manual-example077.png | Bin 0 -> 8533 bytes .../glossaries-extra-manual-example077.tex | 17 + .../glossaries-extra-manual-example078.pdf | Bin 0 -> 60215 bytes .../glossaries-extra-manual-example078.png | Bin 0 -> 7936 bytes .../glossaries-extra-manual-example078.tex | 16 + .../glossaries-extra-manual-example079.pdf | Bin 0 -> 71793 bytes .../glossaries-extra-manual-example079.png | Bin 0 -> 8721 bytes .../glossaries-extra-manual-example079.tex | 17 + .../glossaries-extra-manual-example080.pdf | Bin 0 -> 58844 bytes .../glossaries-extra-manual-example080.png | Bin 0 -> 7484 bytes .../glossaries-extra-manual-example080.tex | 16 + .../glossaries-extra-manual-example081.pdf | Bin 0 -> 70427 bytes .../glossaries-extra-manual-example081.png | Bin 0 -> 8282 bytes .../glossaries-extra-manual-example081.tex | 17 + .../glossaries-extra-manual-example082.pdf | Bin 0 -> 52340 bytes .../glossaries-extra-manual-example082.png | Bin 0 -> 7977 bytes .../glossaries-extra-manual-example082.tex | 17 + .../glossaries-extra-manual-example083.pdf | Bin 0 -> 63908 bytes .../glossaries-extra-manual-example083.png | Bin 0 -> 8753 bytes .../glossaries-extra-manual-example083.tex | 18 + .../glossaries-extra-manual-example084.pdf | Bin 0 -> 50964 bytes .../glossaries-extra-manual-example084.png | Bin 0 -> 7464 bytes .../glossaries-extra-manual-example084.tex | 17 + .../glossaries-extra-manual-example085.pdf | Bin 0 -> 62538 bytes .../glossaries-extra-manual-example085.png | Bin 0 -> 8250 bytes .../glossaries-extra-manual-example085.tex | 18 + .../glossaries-extra-manual-example086.pdf | Bin 0 -> 63254 bytes .../glossaries-extra-manual-example086.png | Bin 0 -> 8537 bytes .../glossaries-extra-manual-example086.tex | 16 + .../glossaries-extra-manual-example087.pdf | Bin 0 -> 74842 bytes .../glossaries-extra-manual-example087.png | Bin 0 -> 9261 bytes .../glossaries-extra-manual-example087.tex | 17 + .../glossaries-extra-manual-example088.pdf | Bin 0 -> 61873 bytes .../glossaries-extra-manual-example088.png | Bin 0 -> 7860 bytes .../glossaries-extra-manual-example088.tex | 16 + .../glossaries-extra-manual-example089.pdf | Bin 0 -> 73471 bytes .../glossaries-extra-manual-example089.png | Bin 0 -> 8607 bytes .../glossaries-extra-manual-example089.tex | 17 + .../glossaries-extra-manual-example090.pdf | Bin 0 -> 14050 bytes .../glossaries-extra-manual-example090.png | Bin 0 -> 3020 bytes .../glossaries-extra-manual-example090.tex | 15 + .../glossaries-extra-manual-example091.pdf | Bin 0 -> 13308 bytes .../glossaries-extra-manual-example091.png | Bin 0 -> 2301 bytes .../glossaries-extra-manual-example091.tex | 15 + .../glossaries-extra-manual-example092.pdf | Bin 0 -> 32546 bytes .../glossaries-extra-manual-example092.png | Bin 0 -> 6433 bytes .../glossaries-extra-manual-example092.tex | 29 + .../glossaries-extra-manual-example093.pdf | Bin 0 -> 32547 bytes .../glossaries-extra-manual-example093.png | Bin 0 -> 6433 bytes .../glossaries-extra-manual-example093.tex | 25 + .../glossaries-extra-manual-example094.pdf | Bin 0 -> 32642 bytes .../glossaries-extra-manual-example094.png | Bin 0 -> 5217 bytes .../glossaries-extra-manual-example094.tex | 23 + .../glossaries-extra-manual-example095.pdf | Bin 0 -> 49978 bytes .../glossaries-extra-manual-example095.png | Bin 0 -> 8694 bytes .../glossaries-extra-manual-example095.tex | 22 + .../glossaries-extra-manual-example096.pdf | Bin 0 -> 58585 bytes .../glossaries-extra-manual-example096.png | Bin 0 -> 8642 bytes .../glossaries-extra-manual-example096.tex | 32 + .../glossaries-extra-manual-example097.pdf | Bin 0 -> 75552 bytes .../glossaries-extra-manual-example097.png | Bin 0 -> 9724 bytes .../glossaries-extra-manual-example097.tex | 36 + .../glossaries-extra-manual-example098.pdf | Bin 0 -> 51818 bytes .../glossaries-extra-manual-example098.png | Bin 0 -> 5106 bytes .../glossaries-extra-manual-example098.tex | 18 + .../glossaries-extra-manual-example099.pdf | Bin 0 -> 30861 bytes .../glossaries-extra-manual-example099.png | Bin 0 -> 1755 bytes .../glossaries-extra-manual-example099.tex | 10 + .../glossaries-extra-manual-example100.pdf | Bin 0 -> 11481 bytes .../glossaries-extra-manual-example100.png | Bin 0 -> 1547 bytes .../glossaries-extra-manual-example100.tex | 20 + .../glossaries-extra-manual-example101.pdf | Bin 0 -> 12132 bytes .../glossaries-extra-manual-example101.png | Bin 0 -> 1089 bytes .../glossaries-extra-manual-example101.tex | 12 + .../glossaries-extra-manual-example102.pdf | Bin 0 -> 12424 bytes .../glossaries-extra-manual-example102.png | Bin 0 -> 1167 bytes .../glossaries-extra-manual-example102.tex | 12 + .../glossaries-extra-manual-example103.pdf | Bin 0 -> 21279 bytes .../glossaries-extra-manual-example103.png | Bin 0 -> 1902 bytes .../glossaries-extra-manual-example103.tex | 20 + .../glossaries-extra-manual-example104.pdf | Bin 0 -> 22136 bytes .../glossaries-extra-manual-example104.png | Bin 0 -> 2937 bytes .../glossaries-extra-manual-example104.tex | 17 + .../glossaries-extra-manual-example105.pdf | Bin 0 -> 22136 bytes .../glossaries-extra-manual-example105.png | Bin 0 -> 2932 bytes .../glossaries-extra-manual-example105.tex | 21 + .../glossaries-extra-manual-example106.pdf | Bin 0 -> 35074 bytes .../glossaries-extra-manual-example106.png | Bin 0 -> 7821 bytes .../glossaries-extra-manual-example106.tex | 32 + .../glossaries-extra-manual-example107.pdf | Bin 0 -> 25034 bytes .../glossaries-extra-manual-example107.png | Bin 0 -> 5835 bytes .../glossaries-extra-manual-example107.tex | 32 + .../glossaries-extra-manual-example108.pdf | Bin 0 -> 33689 bytes .../glossaries-extra-manual-example108.png | Bin 0 -> 6134 bytes .../glossaries-extra-manual-example108.tex | 34 + .../glossaries-extra-manual-example109.pdf | Bin 0 -> 33996 bytes .../glossaries-extra-manual-example109.png | Bin 0 -> 6867 bytes .../glossaries-extra-manual-example109.tex | 30 + .../glossaries-extra-manual-example110.pdf | Bin 0 -> 33982 bytes .../glossaries-extra-manual-example110.png | Bin 0 -> 6522 bytes .../glossaries-extra-manual-example110.tex | 28 + .../glossaries-extra-manual-example111.pdf | Bin 0 -> 34676 bytes .../glossaries-extra-manual-example111.png | Bin 0 -> 7651 bytes .../glossaries-extra-manual-example111.tex | 28 + .../glossaries-extra-manual-example112.pdf | Bin 0 -> 34579 bytes .../glossaries-extra-manual-example112.png | Bin 0 -> 7310 bytes .../glossaries-extra-manual-example112.tex | 28 + .../glossaries-extra-manual-example113.pdf | Bin 0 -> 50276 bytes .../glossaries-extra-manual-example113.png | Bin 0 -> 4787 bytes .../glossaries-extra-manual-example113.tex | 16 + .../glossaries-extra-manual-example114.pdf | Bin 0 -> 14950 bytes .../glossaries-extra-manual-example114.png | Bin 0 -> 1916 bytes .../glossaries-extra-manual-example114.tex | 19 + .../glossaries-extra-manual-example115-page1.png | Bin 0 -> 4306 bytes .../glossaries-extra-manual-example115-page2.png | Bin 0 -> 4315 bytes .../glossaries-extra-manual-example115-page3.png | Bin 0 -> 4519 bytes .../glossaries-extra-manual-example115-page4.png | Bin 0 -> 4332 bytes .../glossaries-extra-manual-example115.pdf | Bin 0 -> 36050 bytes .../glossaries-extra-manual-example115.tex | 29 + .../glossaries-extra-manual-example116.pdf | Bin 0 -> 16446 bytes .../glossaries-extra-manual-example116.png | Bin 0 -> 2086 bytes .../glossaries-extra-manual-example116.tex | 21 + .../glossaries-extra-manual-example117.pdf | Bin 0 -> 17940 bytes .../glossaries-extra-manual-example117.png | Bin 0 -> 4915 bytes .../glossaries-extra-manual-example117.tex | 38 + .../glossaries-extra-manual-example118.pdf | Bin 0 -> 39192 bytes .../glossaries-extra-manual-example118.png | Bin 0 -> 7922 bytes .../glossaries-extra-manual-example118.tex | 38 + .../glossaries-extra-manual-example119.pdf | Bin 0 -> 81361 bytes .../glossaries-extra-manual-example119.png | Bin 0 -> 7409 bytes .../glossaries-extra-manual-example119.tex | 58 + .../glossaries-extra-manual-example120.pdf | Bin 0 -> 25036 bytes .../glossaries-extra-manual-example120.png | Bin 0 -> 4843 bytes .../glossaries-extra-manual-example120.tex | 25 + .../glossaries-extra-manual-example121.pdf | Bin 0 -> 26274 bytes .../glossaries-extra-manual-example121.png | Bin 0 -> 5925 bytes .../glossaries-extra-manual-example121.tex | 22 + .../glossaries-extra-manual-example122.pdf | Bin 0 -> 26812 bytes .../glossaries-extra-manual-example122.png | Bin 0 -> 7886 bytes .../glossaries-extra-manual-example122.tex | 36 + .../glossaries-extra-manual-example123-page1.png | Bin 0 -> 3527 bytes .../glossaries-extra-manual-example123-page2.png | Bin 0 -> 4260 bytes .../glossaries-extra-manual-example123.pdf | Bin 0 -> 23761 bytes .../glossaries-extra-manual-example123.tex | 35 + .../glossaries-extra-manual-example124.pdf | Bin 0 -> 25960 bytes .../glossaries-extra-manual-example124.png | Bin 0 -> 6300 bytes .../glossaries-extra-manual-example124.tex | 42 + .../glossaries-extra-manual-example125.pdf | Bin 0 -> 33199 bytes .../glossaries-extra-manual-example125.png | Bin 0 -> 5633 bytes .../glossaries-extra-manual-example125.tex | 47 + .../glossaries-extra-manual-example126.pdf | Bin 0 -> 35051 bytes .../glossaries-extra-manual-example126.png | Bin 0 -> 6344 bytes .../glossaries-extra-manual-example126.tex | 47 + .../glossaries-extra-manual-example127.pdf | Bin 0 -> 35051 bytes .../glossaries-extra-manual-example127.png | Bin 0 -> 6344 bytes .../glossaries-extra-manual-example127.tex | 56 + .../glossaries-extra-manual-example128.pdf | Bin 0 -> 33222 bytes .../glossaries-extra-manual-example128.png | Bin 0 -> 5571 bytes .../glossaries-extra-manual-example128.tex | 55 + .../glossaries-extra-manual-example129.pdf | Bin 0 -> 35045 bytes .../glossaries-extra-manual-example129.png | Bin 0 -> 9118 bytes .../glossaries-extra-manual-example129.tex | 38 + .../glossaries-extra-manual-example130.pdf | Bin 0 -> 35491 bytes .../glossaries-extra-manual-example130.png | Bin 0 -> 8982 bytes .../glossaries-extra-manual-example130.tex | 54 + .../glossaries-extra-manual-example131.pdf | Bin 0 -> 35828 bytes .../glossaries-extra-manual-example131.png | Bin 0 -> 10600 bytes .../glossaries-extra-manual-example131.tex | 85 + .../glossaries-extra-manual-example132.pdf | Bin 0 -> 44895 bytes .../glossaries-extra-manual-example132.png | Bin 0 -> 9310 bytes .../glossaries-extra-manual-example132.tex | 19 + .../glossaries-extra-manual-example133.pdf | Bin 0 -> 44961 bytes .../glossaries-extra-manual-example133.png | Bin 0 -> 9325 bytes .../glossaries-extra-manual-example133.tex | 19 + .../glossaries-extra-manual-example134.pdf | Bin 0 -> 11385 bytes .../glossaries-extra-manual-example134.png | Bin 0 -> 1544 bytes .../glossaries-extra-manual-example134.tex | 13 + .../glossaries-extra-manual-example135.pdf | Bin 0 -> 11882 bytes .../glossaries-extra-manual-example135.png | Bin 0 -> 1581 bytes .../glossaries-extra-manual-example135.tex | 13 + .../glossaries-extra-manual-example136.pdf | Bin 0 -> 12709 bytes .../glossaries-extra-manual-example136.png | Bin 0 -> 4690 bytes .../glossaries-extra-manual-example136.tex | 17 + .../glossaries-extra-manual-example137.pdf | Bin 0 -> 23838 bytes .../glossaries-extra-manual-example137.png | Bin 0 -> 5891 bytes .../glossaries-extra-manual-example137.tex | 27 + .../glossaries-extra-manual-example138.pdf | Bin 0 -> 23628 bytes .../glossaries-extra-manual-example138.png | Bin 0 -> 6049 bytes .../glossaries-extra-manual-example138.tex | 48 + .../glossaries-extra-manual-example139.pdf | Bin 0 -> 23651 bytes .../glossaries-extra-manual-example139.png | Bin 0 -> 6601 bytes .../glossaries-extra-manual-example139.tex | 52 + .../glossaries-extra-manual-example140.pdf | Bin 0 -> 38067 bytes .../glossaries-extra-manual-example140.png | Bin 0 -> 12115 bytes .../glossaries-extra-manual-example140.tex | 31 + .../glossaries-extra-manual-example141.pdf | Bin 0 -> 11251 bytes .../glossaries-extra-manual-example141.png | Bin 0 -> 1277 bytes .../glossaries-extra-manual-example141.tex | 19 + .../glossaries-extra-manual-example142.pdf | Bin 0 -> 22391 bytes .../glossaries-extra-manual-example142.png | Bin 0 -> 2451 bytes .../glossaries-extra-manual-example142.tex | 20 + .../glossaries-extra-manual-example143.pdf | Bin 0 -> 42206 bytes .../glossaries-extra-manual-example143.png | Bin 0 -> 4447 bytes .../glossaries-extra-manual-example143.tex | 36 + .../glossaries-extra-manual-example144.pdf | Bin 0 -> 42504 bytes .../glossaries-extra-manual-example144.png | Bin 0 -> 10793 bytes .../glossaries-extra-manual-example144.tex | 36 + .../glossaries-extra-manual-example145.pdf | Bin 0 -> 42513 bytes .../glossaries-extra-manual-example145.png | Bin 0 -> 10761 bytes .../glossaries-extra-manual-example145.tex | 48 + .../glossaries-extra-manual-example146.pdf | Bin 0 -> 33649 bytes .../glossaries-extra-manual-example146.png | Bin 0 -> 8671 bytes .../glossaries-extra-manual-example146.tex | 18 + .../glossaries-extra-manual-example147.pdf | Bin 0 -> 55956 bytes .../glossaries-extra-manual-example147.png | Bin 0 -> 11067 bytes .../glossaries-extra-manual-example147.tex | 54 + .../glossaries-extra-manual-example148.pdf | Bin 0 -> 56111 bytes .../glossaries-extra-manual-example148.png | Bin 0 -> 11609 bytes .../glossaries-extra-manual-example148.tex | 54 + .../glossaries-extra-manual-example149.pdf | Bin 0 -> 56086 bytes .../glossaries-extra-manual-example149.png | Bin 0 -> 11982 bytes .../glossaries-extra-manual-example149.tex | 56 + .../glossaries-extra-manual-example150.pdf | Bin 0 -> 28202 bytes .../glossaries-extra-manual-example150.png | Bin 0 -> 15986 bytes .../glossaries-extra-manual-example150.tex | 27 + .../glossaries-extra-manual-example151.pdf | Bin 0 -> 53938 bytes .../glossaries-extra-manual-example151.png | Bin 0 -> 12159 bytes .../glossaries-extra-manual-example151.tex | 85 + .../glossaries-extra-manual-example152.pdf | Bin 0 -> 54402 bytes .../glossaries-extra-manual-example152.png | Bin 0 -> 13362 bytes .../glossaries-extra-manual-example152.tex | 85 + .../glossaries-extra-manual-example153.pdf | Bin 0 -> 54470 bytes .../glossaries-extra-manual-example153.png | Bin 0 -> 13459 bytes .../glossaries-extra-manual-example153.tex | 90 + .../glossaries-extra-manual-example154.pdf | Bin 0 -> 53695 bytes .../glossaries-extra-manual-example154.png | Bin 0 -> 9148 bytes .../glossaries-extra-manual-example154.tex | 92 + .../glossaries-extra-manual-example155-page1.png | Bin 0 -> 4295 bytes .../glossaries-extra-manual-example155-page2.png | Bin 0 -> 4700 bytes .../glossaries-extra-manual-example155-page3.png | Bin 0 -> 6935 bytes .../glossaries-extra-manual-example155.pdf | Bin 0 -> 53902 bytes .../glossaries-extra-manual-example155.tex | 62 + .../glossaries-extra-manual-example156-page1.png | Bin 0 -> 5232 bytes .../glossaries-extra-manual-example156-page2.png | Bin 0 -> 5402 bytes .../glossaries-extra-manual-example156-page3.png | Bin 0 -> 6935 bytes .../glossaries-extra-manual-example156.pdf | Bin 0 -> 55073 bytes .../glossaries-extra-manual-example156.tex | 65 + .../glossaries-extra-manual-example157.pdf | Bin 0 -> 23457 bytes .../glossaries-extra-manual-example157.png | Bin 0 -> 3684 bytes .../glossaries-extra-manual-example157.tex | 31 + .../glossaries-extra-manual-example158.pdf | Bin 0 -> 32323 bytes .../glossaries-extra-manual-example158.png | Bin 0 -> 5378 bytes .../glossaries-extra-manual-example158.tex | 29 + .../glossaries-extra-manual-example159.pdf | Bin 0 -> 36181 bytes .../glossaries-extra-manual-example159.png | Bin 0 -> 7477 bytes .../glossaries-extra-manual-example159.tex | 36 + .../glossaries-extra/glossaries-extra-manual.html | 59749 +++++++-------- .../glossaries-extra/glossaries-extra-manual.pdf | Bin 937636 -> 13030615 bytes .../glossaries-extra/glossaries-extra-manual.tex | 57888 +++++++++++---- .../contrib/glossaries-extra/glossaries-extra.dtx | 72375 ++++++++++++++----- .../contrib/glossaries-extra/glossaries-extra.ins | 22 +- .../samples/sample-abbr-styles.pdf | Bin 556783 -> 1518890 bytes .../samples/sample-abbr-styles.tex | 457 +- .../glossaries-extra/samples/sample-abbrv.pdf | Bin 47261 -> 47270 bytes .../glossaries-extra/samples/sample-accsupp.pdf | Bin 83775 -> 83719 bytes .../samples/sample-acronym-desc.pdf | Bin 53665 -> 53675 bytes .../glossaries-extra/samples/sample-acronym.pdf | Bin 39238 -> 39250 bytes .../glossaries-extra/samples/sample-alias.pdf | Bin 46956 -> 46963 bytes .../samples/sample-altmodifier.pdf | Bin 37805 -> 37817 bytes .../samples/sample-alttree-marginpar.pdf | Bin 94528 -> 94465 bytes .../samples/sample-alttree-sym.pdf | Bin 74480 -> 74462 bytes .../glossaries-extra/samples/sample-alttree.pdf | Bin 58134 -> 58142 bytes .../samples/sample-autoindex-hyp.pdf | Bin 146844 -> 149156 bytes .../glossaries-extra/samples/sample-autoindex.pdf | Bin 171404 -> 171465 bytes .../glossaries-extra/samples/sample-crossref.pdf | Bin 44626 -> 44639 bytes .../glossaries-extra/samples/sample-crossref2.pdf | Bin 44932 -> 44941 bytes .../glossaries-extra/samples/sample-docdef.pdf | Bin 48575 -> 48584 bytes .../glossaries-extra/samples/sample-entrycount.pdf | Bin 58659 -> 58668 bytes .../glossaries-extra/samples/sample-external.pdf | Bin 36681 -> 36692 bytes .../glossaries-extra/samples/sample-fmt.pdf | Bin 81379 -> 81525 bytes .../glossaries-extra/samples/sample-footnote.pdf | Bin 68233 -> 68245 bytes .../glossaries-extra/samples/sample-header.pdf | Bin 135372 -> 134679 bytes .../glossaries-extra/samples/sample-indexhook.pdf | Bin 46037 -> 46049 bytes .../samples/sample-initialisms.pdf | Bin 87240 -> 87339 bytes .../samples/sample-initialisms.tex | 2 + .../glossaries-extra/samples/sample-linkcount.pdf | Bin 40764 -> 40775 bytes .../samples/sample-mixed-abbrv-styles.pdf | Bin 62787 -> 62799 bytes .../glossaries-extra/samples/sample-mixedsort.pdf | Bin 48415 -> 48427 bytes .../glossaries-extra/samples/sample-mixedsort.tex | 2 + .../glossaries-extra/samples/sample-mixture.pdf | Bin 168974 -> 169036 bytes .../glossaries-extra/samples/sample-multientry.pdf | Bin 58332 -> 58340 bytes .../glossaries-extra/samples/sample-name-font.pdf | Bin 214722 -> 214759 bytes .../glossaries-extra/samples/sample-nested.pdf | Bin 72395 -> 77642 bytes .../glossaries-extra/samples/sample-nested.tex | 8 +- .../samples/sample-noidx-restricteddocdefs.pdf | Bin 50828 -> 50842 bytes .../glossaries-extra/samples/sample-onelink.pdf | Bin 25864 -> 47025 bytes .../samples/sample-onthefly-utf8.pdf | Bin 111694 -> 111703 bytes .../samples/sample-onthefly-xetex.pdf | Bin 19669 -> 19653 bytes .../glossaries-extra/samples/sample-onthefly.pdf | Bin 46363 -> 46373 bytes .../glossaries-extra/samples/sample-pages.pdf | Bin 41286 -> 41300 bytes .../glossaries-extra/samples/sample-postdot.pdf | Bin 39556 -> 39563 bytes .../glossaries-extra/samples/sample-postlink.pdf | Bin 73848 -> 73857 bytes .../glossaries-extra/samples/sample-prefix.pdf | Bin 35603 -> 43297 bytes .../glossaries-extra/samples/sample-prefix.tex | 7 +- .../samples/sample-record-nameref.pdf | Bin 76219 -> 75683 bytes .../glossaries-extra/samples/sample-record.pdf | Bin 53514 -> 53524 bytes .../samples/sample-restricteddocdefs.pdf | Bin 51137 -> 51150 bytes .../glossaries-extra/samples/sample-suppl-hyp.pdf | Bin 37481 -> 37492 bytes .../samples/sample-suppl-main-hyp.pdf | Bin 49663 -> 49673 bytes .../glossaries-extra/samples/sample-suppl-main.pdf | Bin 34098 -> 34109 bytes .../glossaries-extra/samples/sample-suppl.pdf | Bin 14247 -> 14259 bytes .../glossaries-extra/samples/sample-trans.pdf | Bin 53229 -> 53238 bytes .../glossaries-extra/samples/sample-undef.pdf | Bin 35728 -> 36985 bytes .../glossaries-extra/samples/sample-undef.tex | 1 + .../samples/sample-unitentrycount.pdf | Bin 64556 -> 65135 bytes .../samples/sample-unitentrycount.tex | 1 + .../contrib/glossaries-extra/samples/sample.pdf | Bin 48266 -> 48281 bytes .../contrib/glossaries-extra/samples/sample.tex | 4 +- macros/latex/contrib/qrbill/README.md | 12 +- macros/latex/contrib/qrbill/qrbill.dtx | 744 +- macros/latex/contrib/qrbill/qrbill.ins | 3 - macros/latex/contrib/qrbill/qrbill.pdf | Bin 85725 -> 86369 bytes 586 files changed, 126506 insertions(+), 69693 deletions(-) create mode 100644 macros/latex/contrib/acmart/samples/sample-acmcp.pdf create mode 100644 macros/latex/contrib/glossaries-extra/DEPENDS.txt create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example001.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example001.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example001.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example002.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example002.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example002.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example003.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example003.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example003.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example004.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example004.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example004.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example005.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example005.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example005.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example006.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example006.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example006.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example007.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example007.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example007.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example008.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example008.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example008.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example009.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example009.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example009.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example010.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example010.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example010.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example011.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example011.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example011.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example012.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example012.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example012.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example013.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example013.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example013.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example014.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example014.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example014.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example015.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example015.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example015.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example016.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example016.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example016.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example017.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example017.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example017.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example018.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example018.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example018.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example019.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example019.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example019.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example020.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example020.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example020.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example021.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example021.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example021.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example022.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example022.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example022.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example023.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example023.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example023.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example024.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example024.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example024.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example025.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example025.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example025.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example026.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example026.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example026.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example027.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example027.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example027.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example028.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example028.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example028.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example029.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example029.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example029.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example030.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example030.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example030.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example031.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example031.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example031.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example032.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example032.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example032.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example033.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example033.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example033.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example034.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example034.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example034.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example035.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example035.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example035.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example036.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example036.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example036.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example037.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example037.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example037.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example038.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example038.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example038.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example039.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example039.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example039.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example040.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example040.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example040.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example041.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example041.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example041.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example042.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example042.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example042.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example043.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example043.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example043.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example044.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example044.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example044.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example045.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example045.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example045.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example046.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example046.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example046.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example047.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example047.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example047.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example048.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example048.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example048.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example049.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example049.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example049.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example050.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example050.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example050.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example051.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example051.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example051.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example052.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example052.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example052.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example053.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example053.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example053.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example054.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example054.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example054.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example055.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example055.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example055.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example056.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example056.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example056.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example057.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example057.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example057.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example058.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example058.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example058.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example059.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example059.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example059.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example060.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example060.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example060.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example061.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example061.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example061.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example062.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example062.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example062.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example063.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example063.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example063.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example064.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example064.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example064.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example065.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example065.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example065.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example066.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example066.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example066.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example067.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example067.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example067.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example068.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example068.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example068.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example069.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example069.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example069.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example070.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example070.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example070.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example071.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example071.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example071.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example072.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example072.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example072.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example073.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example073.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example073.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example074.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example074.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example074.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example075.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example075.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example075.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example076.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example076.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example076.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example077.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example077.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example077.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example078.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example078.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example078.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example079.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example079.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example079.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example080.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example080.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example080.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example081.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example081.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example081.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example082.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example082.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example082.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example083.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example083.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example083.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example084.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example084.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example084.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example085.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example085.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example085.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example086.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example086.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example086.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example087.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example087.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example087.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example088.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example088.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example088.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example089.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example089.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example089.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example090.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example090.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example090.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example091.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example091.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example091.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example092.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example092.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example092.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example093.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example093.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example093.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example094.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example094.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example094.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example095.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example095.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example095.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example096.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example096.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example096.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example097.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example097.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example097.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example098.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example098.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example098.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example099.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example099.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example099.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example100.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example100.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example100.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example101.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example101.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example101.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example102.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example102.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example102.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example103.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example103.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example103.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example104.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example104.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example104.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example105.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example105.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example105.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example106.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example106.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example106.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example107.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example107.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example107.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example108.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example108.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example108.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example109.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example109.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example109.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example110.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example110.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example110.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example111.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example111.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example111.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example112.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example112.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example112.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example113.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example113.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example113.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example114.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example114.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example114.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example115-page1.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example115-page2.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example115-page3.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example115-page4.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example115.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example115.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example116.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example116.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example116.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example117.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example117.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example117.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example118.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example118.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example118.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example119.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example119.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example119.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example120.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example120.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example120.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example121.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example121.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example121.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example122.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example122.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example122.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example123-page1.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example123-page2.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example123.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example123.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example124.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example124.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example124.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example125.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example125.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example125.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example126.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example126.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example126.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example127.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example127.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example127.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example128.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example128.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example128.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example129.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example129.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example129.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example130.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example130.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example130.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example131.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example131.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example131.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example132.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example132.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example132.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example133.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example133.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example133.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example134.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example134.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example134.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example135.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example135.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example135.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example136.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example136.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example136.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example137.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example137.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example137.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example138.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example138.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example138.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example139.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example139.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example139.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example140.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example140.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example140.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example141.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example141.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example141.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example142.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example142.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example142.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example143.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example143.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example143.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example144.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example144.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example144.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example145.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example145.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example145.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example146.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example146.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example146.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example147.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example147.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example147.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example148.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example148.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example148.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example149.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example149.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example149.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example150.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example150.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example150.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example151.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example151.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example151.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example152.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example152.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example152.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example153.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example153.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example153.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example154.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example154.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example154.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example155-page1.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example155-page2.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example155-page3.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example155.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example155.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example156-page1.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example156-page2.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example156-page3.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example156.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example156.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example157.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example157.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example157.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example158.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example158.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example158.tex create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example159.pdf create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example159.png create mode 100644 macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example159.tex (limited to 'macros') diff --git a/macros/jptex/latex/pxjahyper/README-ja.md b/macros/jptex/latex/pxjahyper/README-ja.md index 529403a007..c23db5bc91 100644 --- a/macros/jptex/latex/pxjahyper/README-ja.md +++ b/macros/jptex/latex/pxjahyper/README-ja.md @@ -73,6 +73,9 @@ pxjahyper-enc パッケージ ー 文字コード設定 更新履歴 -------- + * Version 1.2a 〈2022/10/19〉 + - バグ修正。(thanks: @h20y6m さん) + * Version 1.2 〈2022/05/27〉 - LaTeX カーネル 2022/06/01 版への対応。 - `\pxjahypersetup` を追加。 diff --git a/macros/jptex/latex/pxjahyper/README.md b/macros/jptex/latex/pxjahyper/README.md index 747584df8f..100776769e 100644 --- a/macros/jptex/latex/pxjahyper/README.md +++ b/macros/jptex/latex/pxjahyper/README.md @@ -52,6 +52,7 @@ the PDF strings in the output DVI file. Revision History ---------------- + * Version 1.2a 〈2022/10/19〉 * Version 1.2 〈2022/05/27〉 * Version 1.1 〈2022/05/10〉 * Version 1.0a 〈2022/04/15〉 diff --git a/macros/jptex/latex/pxjahyper/pxjahyper-ajm.def b/macros/jptex/latex/pxjahyper/pxjahyper-ajm.def index d362b1df8f..4fad0d70e1 100644 --- a/macros/jptex/latex/pxjahyper/pxjahyper-ajm.def +++ b/macros/jptex/latex/pxjahyper/pxjahyper-ajm.def @@ -11,7 +11,7 @@ %% package declaration \NeedsTeXFormat{pLaTeX2e} -\ProvidesFile{pxjahyper-ajm.def}[2022/05/27 v1.2] +\ProvidesFile{pxjahyper-ajm.def}[2022/10/19 v1.2a] %% avoid multiple loading \csname pxjahyperajmLoaded\endcsname diff --git a/macros/jptex/latex/pxjahyper/pxjahyper-enc.sty b/macros/jptex/latex/pxjahyper/pxjahyper-enc.sty index 719f51c4e8..c03e337858 100644 --- a/macros/jptex/latex/pxjahyper/pxjahyper-enc.sty +++ b/macros/jptex/latex/pxjahyper/pxjahyper-enc.sty @@ -10,7 +10,7 @@ %% package declaration \NeedsTeXFormat{pLaTeX2e} -\ProvidesPackage{pxjahyper-enc}[2022/05/27 v1.2] +\ProvidesPackage{pxjahyper-enc}[2022/10/19 v1.2a] \def\pxhe@pkgname{pxjahyper-enc} \providecommand{\bxDebug}[1]{} diff --git a/macros/jptex/latex/pxjahyper/pxjahyper-uni.def b/macros/jptex/latex/pxjahyper/pxjahyper-uni.def index 53e30988d9..5b6b10b39e 100644 --- a/macros/jptex/latex/pxjahyper/pxjahyper-uni.def +++ b/macros/jptex/latex/pxjahyper/pxjahyper-uni.def @@ -10,7 +10,7 @@ %% package declaration \NeedsTeXFormat{pLaTeX2e} -\ProvidesFile{pxjahyper-uni.def}[2022/05/27 v1.2] +\ProvidesFile{pxjahyper-uni.def}[2022/10/19 v1.2a] \providecommand{\bxDebug}[1]{} %--------------------------------------- environment check diff --git a/macros/jptex/latex/pxjahyper/pxjahyper.pdf b/macros/jptex/latex/pxjahyper/pxjahyper.pdf index 8b8b713c73..3a041690dc 100644 Binary files a/macros/jptex/latex/pxjahyper/pxjahyper.pdf and b/macros/jptex/latex/pxjahyper/pxjahyper.pdf differ diff --git a/macros/jptex/latex/pxjahyper/pxjahyper.sty b/macros/jptex/latex/pxjahyper/pxjahyper.sty index f2ebcd4571..215dfc4fc8 100644 --- a/macros/jptex/latex/pxjahyper/pxjahyper.sty +++ b/macros/jptex/latex/pxjahyper/pxjahyper.sty @@ -10,7 +10,7 @@ %% package declaration \NeedsTeXFormat{pLaTeX2e} -\ProvidesPackage{pxjahyper}[2022/05/27 v1.2] +\ProvidesPackage{pxjahyper}[2022/10/19 v1.2a] \def\pxhy@pkgname{pxjahyper} \providecommand{\bxDebug}[1]{} @@ -580,8 +580,10 @@ pxhy@fallback@geta = \ifpxhy@fallback@geta true\else false\fi^^J% \ifnum0<\mag \ifnum32768>\mag % \mag is in valid range \begingroup \@ifundefined{stockwidth}{}{%else - \paperwidth=\stockwidth - \paperheight=\stockheight + \ifdim\stockwidth>\z@ \ifdim\stockheight>\z@ + \paperwidth=\stockwidth + \paperheight=\stockheight + \fi\fi }% \@tempcnta=\mag \advance\@tempcnta100000 \def\pxhy@next1#1#2#3#4#5\relax{% @@ -590,10 +592,12 @@ pxhy@fallback@geta = \ifpxhy@fallback@geta true\else false\fi^^J% \expandafter\pxhy@next\the\@tempcnta\relax \paperwidth=\pxhy@tmpa\paperwidth \paperheight=\pxhy@tmpa\paperheight - \edef\pxhy@tmpa{% - \noexpand\pxhy@begin@dvi@hook{% - \special{papersize=\the\paperwidth,\the\paperheight}}% - }\pxhy@tmpa + \ifdim\paperwidth>\z@ \ifdim\paperheight>\z@ + \edef\pxhy@tmpa{% + \noexpand\pxhy@begin@dvi@hook{% + \special{papersize=\the\paperwidth,\the\paperheight}}% + }\pxhy@tmpa + \fi\fi \endgroup \fi\fi \fi diff --git a/macros/jptex/latex/pxjahyper/pxjahyper.tex b/macros/jptex/latex/pxjahyper/pxjahyper.tex index 24c5b8c200..07eec0bbc8 100644 --- a/macros/jptex/latex/pxjahyper/pxjahyper.tex +++ b/macros/jptex/latex/pxjahyper/pxjahyper.tex @@ -16,8 +16,8 @@ \bxtexlogoimport{*} \usepackage{shortvrb} \MakeShortVerb{\|} -\newcommand{\PkgVersion}{1.2} -\newcommand{\PkgDate}{2022/05/27} +\newcommand{\PkgVersion}{1.2a} +\newcommand{\PkgDate}{2022/10/19} \newcommand{\Pkg}[1]{\textsf{#1}} \newcommand{\Meta}[1]{$\langle$\mbox{}#1\mbox{}$\rangle$} \newcommand{\Note}{\par\noindent ※} diff --git a/macros/latex/contrib/acmart/Makefile b/macros/latex/contrib/acmart/Makefile index 44f80ef195..6c120b6afb 100644 --- a/macros/latex/contrib/acmart/Makefile +++ b/macros/latex/contrib/acmart/Makefile @@ -135,7 +135,14 @@ archive: all clean zip: all clean zip -r $(PACKAGE).zip * -x '*~' -x '*.tgz' -x '*.zip' -x CVS -x 'CVS/*' -documents.zip: all docclean - zip -r $@ acmart.pdf acmguide.pdf samples *.cls ACM-Reference-Format.* +# distros +distros: all docclean + zip -r acm-distro.zip \ + acmart.pdf acmguide.pdf samples *.cls ACM-Reference-Format.* \ + --exclude samples/sample-acmengage* + zip -r acmengage-distro.zip samples/sample-acmengage* \ + samples/*.bib \ + acmart.pdf acmguide.pdf *.cls ACM-Reference-Format.* + .PHONY: all ALLSAMPLES docclean clean distclean archive zip diff --git a/macros/latex/contrib/acmart/README b/macros/latex/contrib/acmart/README index b84560af24..b30dc5e1fd 100644 --- a/macros/latex/contrib/acmart/README +++ b/macros/latex/contrib/acmart/README @@ -12,6 +12,12 @@ The production version is the one on CTAN and ACM sites. Changes +Version 1.87 CC license is allowed for non-acm documents and ACM Engage + documents only + New format acmcp for the cover page + New journals: JATS, ACMJCSS, TORS + Bug fixes + Version 1.86. Empty country in affiliation now produces an error Bug fixes New samples for acmengage diff --git a/macros/latex/contrib/acmart/acmart.dtx b/macros/latex/contrib/acmart/acmart.dtx index da94d187c5..f8221dcccb 100644 --- a/macros/latex/contrib/acmart/acmart.dtx +++ b/macros/latex/contrib/acmart/acmart.dtx @@ -302,14 +302,14 @@ % \normalfont Value & Meaning\\ % \midrule % manuscript & A manuscript. This is the default. \\ -% acmsmall & Small single-column format. Used for CIE, CSUR, -% DLT, FAC, GAMES, JACM, JDIQ, JDS, JEA, JERIC, +% acmsmall & Small single-column format. Used for ACMJCSS, CIE, CSUR, +% DLT, FAC, GAMES, JACM, JATS, JDIQ, JDS, JEA, JERIC, % JETC, JRC, PACMCGIT, PACMHCI, PACMPL, TAAS, TACCESS, TACO, % TALG, TALLIP (formerly TALIP), TCPS, TDS, % TEAC, TECS, TELO, THRI, TIIS, TIOT, TISSEC, TIST, TKDD, TMIS, % TOCE, TOCHI, TOCL, % TOCS, TOCT, TODAES, TODS, TOIS, TOIT, TOMACS, TOMM (formerly -% TOMCCAP), TOMPECS, TOMS, TOPC, TOPLAS, TOPS, +% TOMCCAP), TOMPECS, TOMS, TOPC, TOPLAS, TOPS, TORS % TOS, TOSEM, TOSN, TQC, TRETS, % TSAS, TSC, TSLP and TWEB, including special issues. \\ % acmlarge & Large single-column format. Used for DTRAP, HEALTH, @@ -317,10 +317,11 @@ % acmtog & Large double-column format. Used for % TOG, including annual conference Technical Papers.\\ % sigconf & Proceedings format for most ACM -% conferences (with the exceptions listed below) and all ICPS +% conferences (with the exception of SIGPlAN) and all ICPS % volumes.\\ % sigplan & Proceedings format for SIGPLAN conferences.\\ -%. acmengage & ACM EngageCSEdu Course materials.\\ +% acmengage & ACM EngageCSEdu Course materials.\\ +% acmcp & ACM cover page. \\ % \bottomrule % \end{tabularx} % \end{table} @@ -330,6 +331,9 @@ % If a file uses |sigchi| format, a warning is issued, and the format % is automatically switched to |sigconf|. Format |sigchi-a| can be % used for non-ACM documents only (see Section~\ref{sec:sigchi-a}). +% The format |acmcp| is used for ACM cover pages discussed in +% Section~\ref{sec:ug_acmcp}. +% % % There are several Boolean options that can take |true| or |false| % values. They are listed in Table~\ref{tab:opts_bool}. The words @@ -408,7 +412,8 @@ % Section~\ref{sec:ug_topmatter})\\ % nonacm & false & Use the class typesetting options for % a non-ACM document, which will not include the conference/journal -% header and footers or permission statements\\ +% header and footers. Currenly such documents allow only a +% Creative Commons license.\\ % timestamp & false & Whether to put a time stamp in the % footer of each page\\ % authordraft & false & Whether author's-draft mode is enabled\\ @@ -1000,6 +1005,8 @@ % \verb|\setcopyright{acmcopyright}|. The possible values for this % command are listed in Table~\ref{tab:setcopyright}. This command % must be placed in the preamble, before |\begin{document}|. +% Additional information about ACM copyright rules is discussed in +% Section~\ref{ug_cc}. % % \begin{table} % \centering @@ -1043,7 +1050,9 @@ % by IW3C2, when some authors are approved Google employees.\\ % \texttt{cc} & Creative Commons license. If this key is set, % \textsl{doclicense} images are used to typeset the license. See -% also \cs{setcctype} command.\\ +% also \cs{setcctype} command. Note that at present this license +% can be used only for \texttt{acmengage} format or for +% \texttt{nonacm} publications.\\ % \bottomrule % \end{tabularx} % \end{table} @@ -1164,9 +1173,9 @@ % is |Received| for the first date and |revised| for the subsequent % ones. For example, % \begin{verbatim} -% \received{February 2007} -% \received[revised]{March 2009} -% \received[accepted]{June 2009} +% \received{20 February 2007} +% \received[revised]{12 March 2009} +% \received[accepted]{5 June 2009} % \end{verbatim} % % @@ -1211,6 +1220,58 @@ % Note that the type of Creative Commons license, if such license is % used, is automatically added to the metadata. % +% +%\subsection{ACM cover page} +%\label{sec:ug_acmcp} +% +% ACM cover pages are forms of extended abstracts that are added to +% journals at the late stage. Authors prepare them as separate +% \texttt{.tex} files using |acmcp| format. At present only JDS uses +% them, but in the future this may change. +% +% There are several top matter commands specific for this format. +% +% \DescribeMacro{\acmArticleType}% +% There are five article types accepted by JDS: \emph{Research} (the +% default), \emph{Review}, \emph{Discussion}, \emph{Invited}, and +% \emph{Position}. The command \cs{acmArticleType}\marg{type} sets the +% article type, for example +% \begin{verbatim} +% \acmArticleType{Review} +% \end{verbatim} +% +% \DescribeMacro{\acmCodeLink}% +% \DescribeMacro{\acmDataLink}% +% The commands \cs{acmCodeDataLink}\marg{link} and +% \cs{acmDataLink}\marg{link} set the links to the data and code +% accompanying the paper, for example, +% \begin{verbatim} +% \acmCodeLink{https://github.com/repository/code} +% \acmDataLink{https://datadryad.org/stash/dataset/doi:DOI} +% \end{verbatim} +% You may repeat these commands if you have several repositories. +% +% +% ACM cover page should have the following obligatory sections: +% \begin{itemize} +% \item Problem statement, +% \item Methods, +% \item Results, +% \item Significance. +% \end{itemize} +% +% Sometimes the addresses extracted from the authors' data are too +% long to fit on the page. In this case the command +% \cs{authorsaddresses} can be use to override them, for example, +% \begin{verbatim} +% \authorsaddresses{Corresponding author: Ben Trovato, +% \href{mailto:trovato@corporation.com}{trovato@corporation.com}; +% Institute for Clarity in Documentation, P.O. Box 1212, Dublin, +% Ohio, USA, 43017-6221} +% \end{verbatim} +% +% +% %\subsection{Internationalization} %\label{sec:ug_i13n} % @@ -1908,6 +1969,29 @@ % document. % % +%\subsection{Creative Commons licenses for ACM publications} +%\label{sec:ug_cc} +% +% At present ACM does not allow the authors to typeset Creative +% Commons license for most ACM publications. These licenses can be +% used under an agreement with the ACM publishing office. In this +% case they are inserted by ACM itself. +% +% The exceptions are ACM Engage format, which allows Creative Commons +% license, and conferences organized and copyrighted by IW3C2. In +% these cases the authors should use correspondingly +% |\setcopyright{cc}|, |\setcopyright{iw3c2w3}|, or +% |\setcopyright{iw3c2w3g}| (the latter should be used by Google +% employees). +% +% Yet another case is the typesetting of non-ACM materials, when the +% option |nonacm| is used. This case is somewhat opposite, because +% for this case \emph{only} Creative Common licenses are supported. +% +% The command |\setcopyright{cc}| produces an error unless the format is +% |acmengage| or |nonacm| option is selected. On the other hand, if +% the option |nonacm| is selected, any argument of |\setcopyright| +% other than |cc| is treated as |none|. % % %\subsection{Disabled or forbidden commands} @@ -1999,7 +2083,8 @@ % \midrule % \endhead % \bottomrule -% \endfoot +% \endfoot +% ACMJCSS & ACM Journal on Computing and Sustainable Societies \\ % CIE & ACM Computers in Entertainment \\ % CSUR & ACM Computing Surveys\\ % DLT & Distributed Ledger Technologies: Research and Practice\\ @@ -2011,6 +2096,7 @@ % IMWUT & PACM on Interactive, Mobile, Wearable and Ubiquitous % Technologies\\ % JACM & Journal of the ACM \\ +% JATS & ACM Journal on Autonomous Transportation Systems \\ % JDIQ & ACM Journal of Data and Information Quality \\ % JDS & ACM/IMS Journal of Data Science \\ % JEA & ACM Journal of Experimental Algorithmics \\ @@ -2061,6 +2147,7 @@ % TOPC & ACM Transactions on Parallel Computing\\ % TOPLAS & ACM Transactions on Programming Languages and Systems\\ % TOPS & ACM Transactions on Privacy and Security\\ +% TORS & ACM Transactions on Recommender Systems\\ % TOS & ACM Transactions on Storage\\ % TOSEM & ACM Transactions on Software Engineering and Methodology\\ % TOSN & ACM Transactions on Sensor Networks\\ @@ -2142,7 +2229,7 @@ \ProvidesFile{acmart.dtx} % %\ProvidesClass{acmart} -[2022/06/26 v1.86 Typesetting articles for the Association for Computing Machinery] +[2022/10/18 v1.87 Typesetting articles for the Association for Computing Machinery] % \end{macrocode} % % \changes{v1.00}{2016/04/14}{First released version} @@ -2252,6 +2339,7 @@ % \changes{1.78}{2021/05/01}{Documentation update: Word count} % \changes{1.84}{2022/04/09}{New journals: JDS, GAMES} % \changes{1.85}{2022/05/08}{Added CC licenses} +% \changes{1.87}{2022/08/02}{New format: |acmcp|} % % And the driver code: % \begin{macrocode} @@ -2310,11 +2398,12 @@ % % \begin{macro}{format} % \changes{1.85}{2022/05/08}{New format: acmengage} +% \changes{1.87}{2022/08/13}{New format: acmcp} % The possible formats % \begin{macrocode} \define@choicekey*+{acmart.cls}{format}[\ACM@format\ACM@format@nr]{% manuscript, acmsmall, acmlarge, acmtog, sigconf, siggraph, - sigplan, sigchi, sigchi-a, acmengage}[manuscript]{}{% + sigplan, sigchi, sigchi-a, acmengage, acmcp}[manuscript]{}{% \ClassError{\@classname}{The option format must be manuscript, acmsmall, acmlarge, acmtog, sigconf, siggraph, sigplan, sigchi or sigchi-a}} @@ -2329,6 +2418,7 @@ \@DeclareACMFormat{sigchi} \@DeclareACMFormat{sigchi-a} \@DeclareACMFormat{acmengage} +\@DeclareACMFormat{acmcp} \ExecuteOptionsX{format} % \end{macrocode} % @@ -2539,7 +2629,9 @@ % \begin{macro}{\ACM@fontsize} % The font size to pass to the base class % \begin{macrocode} +% \changes{v1.87}{2022/08/27}{Added fontsize 8pt} \def\ACM@fontsize{} +\DeclareOptionX{8pt}{\edef\ACM@fontsize{\CurrentOption}} \DeclareOptionX{9pt}{\edef\ACM@fontsize{\CurrentOption}} \DeclareOptionX{10pt}{\edef\ACM@fontsize{\CurrentOption}} \DeclareOptionX{11pt}{\edef\ACM@fontsize{\CurrentOption}} @@ -2626,6 +2718,19 @@ % % \end{macro} % +% \begin{macro}{\if@ACM@acmcp} +% \changes{v1.87}{2022/08/12}{Introduced macro} +% ACM cover page formatting +% \begin{macrocode} +\newif\if@ACM@acmcp +\@ACM@acmcpfalse +% \end{macrocode} +% +% \end{macro} +% +% +% +% % Setting up switches % \begin{macrocode} \ifnum\ACM@format@nr=5\relax % siggraph @@ -2682,6 +2787,10 @@ \or % acmengage \@ACM@journalfalse \@ACM@engagetrue +\or % acmcp + \@ACM@journaltrue + \@ACM@acmcptrue + \AtBeginDocument{\@ACM@printacmreffalse}% \fi \if@ACM@journal \@ACM@journal@bibstriptrue @@ -2697,6 +2806,7 @@ % % \changes{v1.13}{2016/06/06}{Increased font size for ACM Large} % \changes{v1.38}{2017/05/13}{Increase default font size for SIGPLAN} +% \changes{v1.87}{2022/08/27}{Set font sizes for |acmengage| and |acmcp|} % % % At this point we either have \cs{ACM@fontsize} or use defaults @@ -2721,6 +2831,10 @@ \def\ACM@fontsize{9pt}% \or % sigchi-a \def\ACM@fontsize{10pt}% + \or % acmengage + \def\ACM@fontsize{10pt}% + \or % acmcp + \def\ACM@fontsize{9pt}% \fi \fi \ClassInfo{\@classname}{Using fontsize \ACM@fontsize} @@ -2768,6 +2882,13 @@ % \end{macrocode} % % +% \changes{v1.87}{2022/08/14}{Added `framed' package for acmcp} +% \begin{macrocode} +\if@ACM@acmcp +\RequirePackage{framed} +\fi +% \end{macrocode} +% % % % @@ -3327,6 +3448,7 @@ \or % sigchi-a \urlstyle{sf} \or % acmengage +\or % acmcp \fi \AtEndPreamble{% \if@ACM@urlbreakonhyphens @@ -3521,6 +3643,13 @@ top=57pt, bottom=73pt, inner=54pt, outer=54pt, marginparwidth=2pc,heightrounded }% +\or % acmcp + \geometry{twoside=true, + includeheadfoot, head=13pt, foot=2pc, + paperwidth=6.75in, paperheight=10in, + top=58pt, bottom=44pt, inner=46pt, outer=46pt, + marginparwidth=2pc,heightrounded + }% \fi % \end{macrocode} % @@ -3544,6 +3673,7 @@ \or % sigchi \or % sigchi-a \or % acmengage +\or % acmcp \fi % \end{macrocode} % @@ -3652,6 +3782,8 @@ \or % sigchi-a \or % acmengage \flushbottom +\or % acmcp + \flushbottom \fi % \end{macrocode} % @@ -3878,6 +4010,7 @@ \captionsetup[table]{labelfont={bf, small}, textfont={bf, small}} \or % acmengage + \or % acmcp \fi \fi % \end{macrocode} @@ -4029,6 +4162,7 @@ \or % sigchi \or % sigchi-a \or % acmengage +\or % acmcp \fi % \end{macrocode} % @@ -4142,11 +4276,13 @@ % several journals} % \changes{1.84}{2022/04/09}{New journals: JDS, GAMES} % \changes{1.85}{2022/05/08}{New journal: JRC} +% \changes{1.85}{2022/10/18}{New journals: ACMJCSS, JATS, TORS} % % We use the |xkeyval| interface to define journal titles and the relevant % information % \begin{macrocode} \define@choicekey*+{ACM}{acmJournal}[\@journalCode\@journalCode@nr]{% + ACMJCSS,% CIE,% CSUR,% DGOV,% @@ -4157,6 +4293,7 @@ HEALTH,% IMWUT,% JACM,% + JATS,% JDIQ,% JDS,% JEA,% @@ -4203,6 +4340,7 @@ TOPC,% TOPS,% TOPLAS,% + TORS,% TOS,% TOSEM,% TOSN,% @@ -4215,7 +4353,11 @@ FACMP% }{% \ifcase\@journalCode@nr -\relax % CIE +\relax % ACMJCSS + \def\@journalName{ACM Journal on Computing and Sustainable Societies}% + \def\@journalNameShort{ACM J. Comput. Sustain. Soc.}% + \def\@permissionCodeOne{}% +\or % CIE \def\@journalName{ACM Computers in Entertainment}% \def\@journalNameShort{ACM Comput. Entertain.}% \def\@permissionCodeOne{1544-3574}% @@ -4258,6 +4400,10 @@ \def\@journalName{Journal of the ACM}% \def\@journalNameShort{J. ACM}% \def\@permissionCodeOne{0004-5411}% +\or % JATS + \def\@journalName{Journal on Autonomous Transportation Systems}% + \def\@journalNameShort{ACM J. Auton. Transport. Syst.}% + \def\@permissionCodeOne{2833-0528}% \or % JDIQ \def\@journalName{ACM Journal of Data and Information Quality}% \def\@journalNameShort{ACM J. Data Inform. Quality}% @@ -4446,7 +4592,8 @@ \or % TOPC \def\@journalName{ACM Transactions on Parallel Computing}% \def\@journalNameShort{ACM Trans. Parallel Comput.}% - \def\@permissionCodeOne{1539-9087}% + \def\@permissionCodeOne{2329-4949}% + \def\@permissionCodeTwo{2329-4957}% \or % TOPS \def\@journalName{ACM Transactions on Privacy and Security}% \def\@journalNameShort{ACM Trans. Priv. Sec.}% @@ -4455,6 +4602,10 @@ \def\@journalName{ACM Transactions on Programming Languages and Systems}% \def\@journalNameShort{ACM Trans. Program. Lang. Syst.}% \def\@permissionCodeOne{0164-0925}% +\or % TORS + \def\@journalName{ACM Transactions on Recommender Systems}% + \def\@journalNameShort{ACM Trans. Recomm. Syst.}% + \def\@permissionCodeOne{2770-6699}% \or % TOS \def\@journalName{ACM Transactions on Storage}% \def\@journalNameShort{ACM Trans. Storage}% @@ -5282,6 +5433,67 @@ % % \end{macro} % +% \begin{macro}{\acmArticleType} +% \changes{v1.87}{2022/08/13}{Introduced macro} +% Article type. We set up the color. +% \begin{macrocode} +\define@choicekey+{ACM}{articletype}[\ACM@ArticleType\ACM@ArticleType@nr]{% + Research,Review,Discussion,Invited,Position}[Review]{% + \ifcase\ACM@ArticleType@nr + \relax % Research + \colorlet{@ACM@Article@color}{ACMBlue}% + \or % Review + \colorlet{@ACM@Article@color}{ACMOrange}% + \or % Discussion + \colorlet{@ACM@Article@color}{ACMGreen}% + \or % Invited + \colorlet{@ACM@Article@color}{ACMPurple}% + \or % Position + \colorlet{@ACM@Article@color}{ACMRed}% + \fi +}{% + \ClassError{\@classname}{Article Type must be Research, Review,\MessageBreak + Discussion, Invited, or Position}} +\def\acmArticleType#1{\setkeys{ACM}{articletype=#1}} +\newenvironment{@ACM@color@frame}{% + \def\FrameCommand{\hspace*{-6.5pc}% + \colorbox{@ACM@Article@color!10!white}}% + \MakeFramed {\advance\hsize -6.5pc\relax\FrameRestore}}{\endMakeFramed} +\if@ACM@acmcp +\acmArticleType{Research}% +\fi +% \end{macrocode} +% +% \end{macro} +% +% \begin{macro}{\acmCodeLink} +% \changes{v1.87}{2022/08/13}{Introduced macro} +% \changes{v1.87}{2022/08/28}{Added possibility to have several links} +% The code link +% \begin{macrocode} +\def\acmCodeLink#1{% + \ifx\@acmCodeDataLink\@empty + \gdef\@acmCodeDataLink{\url{#1}}% + \else + \g@addto@macro{\@acmCodeDataLink}{\\ \url{#1}}% + \fi} +\def\@acmCodeDataLink{} +% \end{macrocode} +% +% \end{macro} +% +% \begin{macro}{\acmDataLink} +% \changes{v1.87}{2022/08/13}{Introduced macro} +% \changes{v1.87}{2022/08/28}{Now this is the same as the code link} +% The code link +% \begin{macrocode} +\let\acmDataLink\acmCodeLink +% \end{macrocode} +% +% \end{macro} +% +% +% %\subsection{Concepts system} %\label{sec:concepts} % @@ -5547,12 +5759,40 @@ % % \end{macro} % +% \begin{macro}{\@ACM@copyright@check@cc} +% \changes{v1.87}{2022/07/30}{Added macro} +% At present cC licenses can be used only for acmengage format or for +% non-acm stuff. This macro checks whether the CC license is +% applicable and generates an error if not. +% \begin{macrocode} +\def\@ACM@copyright@check@cc{% + \if@ACM@nonacm + \ClassInfo{\@classname}{Using CC license with a non-acm + material}% + \else + \if@ACM@engage + \ClassInfo{\@classname}{Using CC license with ACM Enage + material}% + \else + \ClassError{\@classname}{% + Sorry, Creative Commons licenses are\MessageBreak + currently not used with ACM publications\MessageBreak + typeset by the authors}{Please use nonacm + option or ACM Engage class to enable CC licenses}% + \fi + \fi} +% \end{macrocode} +% +% \end{macro} +% % \begin{macro}{\@copyrightpermission} % \changes{v1.40}{2017/06/16}{Added new copyright version: licensedcagov} % \changes{v1.50}{2018/02/07}{New copyright statements for iw3c2w3[g]} % \changes{v1.52}{2018/04/09}{Another rewording of copyright % statements for iw3c2w3[g]} % \changes{v1.85}{2022/05/08}{Added CC licenses} +% \changes{v1.87}{2022/07/30}{CC licenses now are allowed only for +% non-acm or ACM engage publications} % The canned permission block. % \begin{macrocode} \def\@copyrightpermission{% @@ -5678,6 +5918,7 @@ disseminate the work on their personal and corporate Web sites with the appropriate attribution. \or % CC + \@ACM@copyright@check@cc \IfEq{\ACM@cc@type}{zero}{% \def\ACM@CC@Url{https://creativecommons.org/publicdomain/zero/1.0/legalcode}}{% \edef\ACM@CC@Url{https://creativecommons.org/licenses/\ACM@cc@type/\ACM@cc@version/legalcode}}% @@ -5867,6 +6108,7 @@ % \changes{v1.76}{2021/04/05}{Put \cs{par} inside group for keywords} % \changes{v1.83}{2022/02/20}{I13n} % \changes{v1.85}{2022/05/08}{acmengage} +% \changes{v1.87}{2022/07/30}{CC license are allowed for non-acm publications} % The (in)famous \cs{maketitle}. Note that in |sigchi-a| mode, authors % are \emph{not} in the title box. % @@ -5904,15 +6146,23 @@ \footnotetextauthorsaddresses{% \def\par{\let\par\@par}\parindent\z@\@setthanks}% \fi - \ifx\@empty\@authorsaddresses\else - \if@ACM@anonymous\else - \if@ACM@journal@bibstrip - \footnotetextauthorsaddresses{% - \def\par{\let\par\@par}\parindent\z@\@setauthorsaddresses}% + \if@ACM@acmcp\else + \ifx\@empty\@authorsaddresses\else + \if@ACM@anonymous\else + \if@ACM@journal@bibstrip + \footnotetextauthorsaddresses{% + \def\par{\let\par\@par}\parindent\z@\@setauthorsaddresses}% + \fi \fi - \fi + \fi \fi - \if@ACM@nonacm\else\footnotetextcopyrightpermission{% + \if@ACM@nonacm + \ifnum\acm@copyrightmode=15\relax % cc + \footnotetextcopyrightpermission{\@copyrightpermission}% + \fi + \else + \if@ACM@acmcp\else + \footnotetextcopyrightpermission{% \if@ACM@authordraft \raisebox{-2ex}[\z@][\z@]{\makebox[0pt][l]{\large\bfseries Unpublished working draft. Not for distribution.}}% @@ -5966,7 +6216,8 @@ \fi \fi \fi - \fi} + \fi}% + \fi \fi \endgroup \if@ACM@engage\@typesetengagemetadata\fi @@ -5980,12 +6231,14 @@ \noindent\@concepts\par}\egroup \fi \fi - \ifx\@keywords\@empty\else\bgroup - {\@specialsection{\keywordsname}% - \noindent\@keywords\par}\egroup - \fi - \ifx\@translatedkeywords\@empty\else - \@translatedkeywords + \if@ACM@acmcp\else + \ifx\@keywords\@empty\else\bgroup + {\@specialsection{\keywordsname}% + \noindent\@keywords\par}\egroup + \fi + \ifx\@translatedkeywords\@empty\else + \@translatedkeywords + \fi \fi \let\metadata@authors=\authors \nxandlist{, }{, }{, }\metadata@authors @@ -6012,11 +6265,43 @@ \@printendtopmatter \@afterindentfalse \@afterheading + \if@ACM@acmcp + \set@ACM@acmcpbox + \AtEndDocument{\end@ACM@color@frame}% + \@ACM@color@frame + \fi } % \end{macrocode} % % \end{macro} % +% \begin{macro}{\set@ACM@acmcpbox} +% \changes{v1.87}{2022/08/14}{Added macro} +% Setting infobox for acmcp +% \begin{macrocode} +\newbox\@ACM@acmcpbox +\def\set@ACM@acmcpbox{% + \bgroup + \hsize=5pc + \global\setbox\@ACM@acmcpbox=\vtop to \textheight{% + \setlength{\parindent}{\z@}% + {\Large LOGO\par}% + \scriptsize + \vfill + \ifx\@acmCodeDataLink\@empty\else + Code and data links:\\ \@acmCodeDataLink\par\vfill + \fi + \ifx\@keywords\@empty\else Keywords: + \@keywords\par\vfill + \fi + \ifx\@empty\@authorsaddresses\else\@setauthorsaddresses\vfill\fi + } +\egroup} +% \end{macrocode} +% +% \end{macro} +% +% % \begin{macro}{\@specialsection} % \changes{v1.66}{2019/11/23}{Suppress warnings about \cs{vspace}} % \changes{v1.67}{2020/01/11}{Paragraph inside group does not print @@ -6051,6 +6336,8 @@ \section*{#1}% \or % acmengage \section*{#1}% + \or % acmcp + \section*{#1}% \fi \let\@vspace\@vspace@acm \let\@vspacer\@vspacer@acm @@ -6126,6 +6413,8 @@ \fi \or % acmengage \twocolumn[\box\mktitle@bx]% + \or % acmcp + \box\mktitle@bx\par \fi } % \end{macrocode} @@ -6158,6 +6447,8 @@ \@mktitle@iv \or % acmengage \@mktitle@iii + \or % acmcp + \@mktitle@i \fi } % \end{macrocode} @@ -6193,6 +6484,8 @@ \Huge\bfseries \or % acmengage \Huge\sffamily\bfseries + \or % acmcp + \LARGE\sffamily\bfseries \fi} % \end{macrocode} % @@ -6226,6 +6519,8 @@ \mdseries \or % acmengage \LARGE\mdseries + \or % acmcp + \mdseries \fi} % \end{macrocode} % @@ -6236,9 +6531,13 @@ % \changes{v1.06}{2016/05/01}{Added processing badges} % \changes{v1.83}{2022/02/20}{Added \cs{translatedtitle} and % \cs{translatedsubtitle}} +% \changes{v1.87}{2022/08/14}{Special treatment for acmcp} % The version of \cs{mktitle} for most journals % \begin{macrocode} \def\@mktitle@i{\hsize=\textwidth + \if@ACM@acmcp + \advance\hsize by -6pc% + \fi \@ACM@title@width=\hsize \ifx\@acmBadgeL@image\@empty\else \advance\@ACM@title@width by -\@ACM@badge@width @@ -6465,6 +6764,8 @@ \@mkauthors@iv \or % acmengage \@mkauthors@iii + \or % acmcp + \@mkauthors@i \fi \endgroup } @@ -6518,6 +6819,9 @@ \or % acmengage \def\@authorfont{\LARGE} \def\@affiliationfont{\large} +\or % acmcp + \def\@authorfont{\large\sffamily} + \def\@affiliationfont{\small\normalfont} \fi % \end{macrocode} % @@ -6615,6 +6919,7 @@ % \changes{v1.78}{2021/05/16}{Unboxing \cs{mktitle@bx}} % This version is used in most journal formats. Note that \cs{and} between % authors with the same affiliation becomes \verb*| and |: +% \changes{v1.87}{2022/08/14}{Special treatment for acmcp} % \begin{macrocode} \def\@mkauthors@i{% \def\@currentauthors{}% @@ -6644,6 +6949,9 @@ \fi \fi \global\let\and\@typeset@author@line}% + \if@ACM@acmcp + \advance\hsize by -6pc% + \fi \global\setbox\mktitle@bx=\vbox{\noindent\unvbox\mktitle@bx\par\medskip \noindent\addresses\@typeset@author@line \par\medskip}% @@ -7181,6 +7489,8 @@ \ACM@mk@linecount \or % acmengage \ACM@mk@linecount + \or % acmcp + \relax \fi \begin{picture}(0,0)% \put(20,-22){\usebox{\ACM@linecount@bx}}% @@ -7263,6 +7573,7 @@ % \changes{v1.76}{2021/02/21}{Fixed bug with no line numbers for % nonacm} % \changes{v1.86}{2022/06/26}{Special treatment of ACM Engage materials} +% \changes{v1.87}{2022/08/14}{Special treatment of ACMCP} % The page style for all pages but the first one % \begin{macrocode} \AtBeginDocument{% @@ -7371,6 +7682,21 @@ \if@ACM@timestamp \fancyfoot[LO,RE]{\ACM@timestamp} \fi + \if@ACM@acmcp + \renewcommand{\footrulewidth}{0.1\p@}% + \fancyheadoffset[L]{46pt}% + \fancyhead[L]{\makebox[\z@][l]{% + \raisebox{-\dimexpr(0.25\textheight*\ACM@ArticleType@nr)}{% + \rotatebox{90}{\colorbox{@ACM@Article@color}{\color{white}% + \strut\ACM@ArticleType~Article}}}}% + \ACM@linecountL}% + \fancyhead[R]{\makebox[\z@][r]{\box\@ACM@acmcpbox}}% + \fancyfoot[L,C]{}% + \fancyfoot[R]{\footnotesize + \@journalName, Volume~\@acmVolume, Issue~\@acmNumber, + \ifx\@acmArticle\@empty\else Article~\@acmArticle\fi\space + (\@acmPubDate)\ifx\@acmDOI\@empty\else\\\@formatdoi{\@acmDOI}\fi} + \fi }% \pagestyle{standardpagestyle} } @@ -7448,6 +7774,8 @@ % % \end{macro} % +% +% % \begin{macro}{firstpagestyle} % \changes{v1.33}{2017/03/10}{Added timestamp (Michael D.~Adams)} % \changes{v1.33}{2017/03/29}{Added right linecount for two-column @@ -7457,6 +7785,7 @@ % \changes{v1.59}{2019/04/20}{Added logic for conference papers using % journal format} % \changes{v1.59}{2019/04/20}{Moved page styles to \cs{AtBeginDocument}} +% \changes{v1.87}{2022/08/14}{Special treatment for acmcp} % The page style for the first page only. % \begin{macrocode} \AtBeginDocument{% @@ -7520,6 +7849,21 @@ \fancyfoot[LO,RE]{\ACM@timestamp} \fi \fi + \if@ACM@acmcp + \renewcommand{\footrulewidth}{0.1\p@}% + \fancyheadoffset[L]{46pt}% + \fancyhead[L]{\makebox[\z@][l]{% + \raisebox{-\dimexpr(0.25\textheight*\ACM@ArticleType@nr)}{% + \rotatebox{90}{\colorbox{@ACM@Article@color}{\color{white}% + \strut\ACM@ArticleType~Article}}}}% + \ACM@linecountL}% + \fancyhead[R]{\makebox[\z@][r]{\box\@ACM@acmcpbox}}% + \fancyfoot[L,C]{}% + \fancyfoot[R]{\footnotesize + \@journalName, Volume~\@acmVolume, Issue~\@acmNumber, + \ifx\@acmArticle\@empty\else Article~\@acmArticle\fi\space + (\@acmPubDate)\ifx\@acmDOI\@empty\else\\\@formatdoi{\@acmDOI}\fi} + \fi }} % \end{macrocode} % @@ -7529,6 +7873,7 @@ %\subsection{Sectioning} %\label{sec:sectioninng} % +% % \begin{macro}{\ACM@NRadjust} % \changes{v1.54}{2018/06/17}{Added macro} % Ross Moore's macro. @@ -7700,6 +8045,7 @@ \or % acmengage \def\@secfont{\bfseries\Large\section@raggedright\MakeTextUppercase} \def\@subsecfont{\bfseries\Large\section@raggedright} +\or %acmcp \fi % \end{macrocode} % @@ -7724,6 +8070,14 @@ % % \end{macro} % +% \changes{v1.87}{2022/08/14}{No numbering sections for ACMCP} +% \begin{macrocode} +\if@ACM@acmcp + \setcounter{secnumdepth}{-1}% +\fi +% \end{macrocode} +% +% %\subsection{TOC lists} %\label{sec:tocs} % @@ -7792,6 +8146,7 @@ \or % sigchi \or % sigchi-a \or % acmengage +\or % acmcp \fi % \end{macrocode} % @@ -7863,6 +8218,7 @@ \or % sigchi \or % sigchi-a \or % acmengage +\or % acmcp \fi % \end{macrocode} % @@ -7962,6 +8318,7 @@ \or % sigchi \or % sigchi-a \or % acmengage +\or % acmcp \fi % \end{macrocode} % @@ -8010,6 +8367,7 @@ \or % sigchi-a \or % acmengage \RequirePackage{pbalance}% + \or % acmcp \fi \fi \if@ACM@balance @@ -8034,6 +8392,8 @@ \global\@ACM@balancefalse \or % acmengage \RequirePackage{balance}% + \or % acmcp + \global\@ACM@balancefalse \fi \fi } diff --git a/macros/latex/contrib/acmart/acmart.pdf b/macros/latex/contrib/acmart/acmart.pdf index d7d29d8279..606574db26 100644 Binary files a/macros/latex/contrib/acmart/acmart.pdf and b/macros/latex/contrib/acmart/acmart.pdf differ diff --git a/macros/latex/contrib/acmart/acmguide.pdf b/macros/latex/contrib/acmart/acmguide.pdf index 2c96654fa5..70313fded3 100644 Binary files a/macros/latex/contrib/acmart/acmguide.pdf and b/macros/latex/contrib/acmart/acmguide.pdf differ diff --git a/macros/latex/contrib/acmart/samples/sample-acmcp.pdf b/macros/latex/contrib/acmart/samples/sample-acmcp.pdf new file mode 100644 index 0000000000..c3993bfd61 Binary files /dev/null and b/macros/latex/contrib/acmart/samples/sample-acmcp.pdf differ diff --git a/macros/latex/contrib/acmart/samples/sample-acmengage.pdf b/macros/latex/contrib/acmart/samples/sample-acmengage.pdf index f9caa582b9..6c12412fcd 100644 Binary files a/macros/latex/contrib/acmart/samples/sample-acmengage.pdf and b/macros/latex/contrib/acmart/samples/sample-acmengage.pdf differ diff --git a/macros/latex/contrib/acmart/samples/sample-acmlarge.pdf b/macros/latex/contrib/acmart/samples/sample-acmlarge.pdf index 1d17b01c8e..606a977bda 100644 Binary files a/macros/latex/contrib/acmart/samples/sample-acmlarge.pdf and b/macros/latex/contrib/acmart/samples/sample-acmlarge.pdf differ diff --git a/macros/latex/contrib/acmart/samples/sample-acmsmall-biblatex.pdf b/macros/latex/contrib/acmart/samples/sample-acmsmall-biblatex.pdf index 71f6045226..cbb483fe0b 100644 Binary files a/macros/latex/contrib/acmart/samples/sample-acmsmall-biblatex.pdf and b/macros/latex/contrib/acmart/samples/sample-acmsmall-biblatex.pdf differ diff --git a/macros/latex/contrib/acmart/samples/sample-acmsmall-conf.pdf b/macros/latex/contrib/acmart/samples/sample-acmsmall-conf.pdf index 72f5f4d98d..02ac97731e 100644 Binary files a/macros/latex/contrib/acmart/samples/sample-acmsmall-conf.pdf and b/macros/latex/contrib/acmart/samples/sample-acmsmall-conf.pdf differ diff --git a/macros/latex/contrib/acmart/samples/sample-acmsmall-submission.pdf b/macros/latex/contrib/acmart/samples/sample-acmsmall-submission.pdf index a01026bcb6..776edd55f0 100644 Binary files a/macros/latex/contrib/acmart/samples/sample-acmsmall-submission.pdf and b/macros/latex/contrib/acmart/samples/sample-acmsmall-submission.pdf differ diff --git a/macros/latex/contrib/acmart/samples/sample-acmsmall.pdf b/macros/latex/contrib/acmart/samples/sample-acmsmall.pdf index a966e4d256..b996692fa2 100644 Binary files a/macros/latex/contrib/acmart/samples/sample-acmsmall.pdf and b/macros/latex/contrib/acmart/samples/sample-acmsmall.pdf differ diff --git a/macros/latex/contrib/acmart/samples/sample-acmtog.pdf b/macros/latex/contrib/acmart/samples/sample-acmtog.pdf index d42901423d..e3512e0b46 100644 Binary files a/macros/latex/contrib/acmart/samples/sample-acmtog.pdf and b/macros/latex/contrib/acmart/samples/sample-acmtog.pdf differ diff --git a/macros/latex/contrib/acmart/samples/sample-authordraft.pdf b/macros/latex/contrib/acmart/samples/sample-authordraft.pdf index 654952f224..efcebebee7 100644 Binary files a/macros/latex/contrib/acmart/samples/sample-authordraft.pdf and b/macros/latex/contrib/acmart/samples/sample-authordraft.pdf differ diff --git a/macros/latex/contrib/acmart/samples/sample-lualatex.pdf b/macros/latex/contrib/acmart/samples/sample-lualatex.pdf index a488510535..54d7f0fae7 100644 Binary files a/macros/latex/contrib/acmart/samples/sample-lualatex.pdf and b/macros/latex/contrib/acmart/samples/sample-lualatex.pdf differ diff --git a/macros/latex/contrib/acmart/samples/sample-manuscript.pdf b/macros/latex/contrib/acmart/samples/sample-manuscript.pdf index 7ab5447a4f..b51259c8ba 100644 Binary files a/macros/latex/contrib/acmart/samples/sample-manuscript.pdf and b/macros/latex/contrib/acmart/samples/sample-manuscript.pdf differ diff --git a/macros/latex/contrib/acmart/samples/sample-sigconf-biblatex.pdf b/macros/latex/contrib/acmart/samples/sample-sigconf-biblatex.pdf index 5b32f3eb2f..86affdb954 100644 Binary files a/macros/latex/contrib/acmart/samples/sample-sigconf-biblatex.pdf and b/macros/latex/contrib/acmart/samples/sample-sigconf-biblatex.pdf differ diff --git a/macros/latex/contrib/acmart/samples/sample-sigconf-i13n.pdf b/macros/latex/contrib/acmart/samples/sample-sigconf-i13n.pdf index 312f44903c..d1a809306c 100644 Binary files a/macros/latex/contrib/acmart/samples/sample-sigconf-i13n.pdf and b/macros/latex/contrib/acmart/samples/sample-sigconf-i13n.pdf differ diff --git a/macros/latex/contrib/acmart/samples/sample-sigconf.pdf b/macros/latex/contrib/acmart/samples/sample-sigconf.pdf index ee926cd110..2431f25131 100644 Binary files a/macros/latex/contrib/acmart/samples/sample-sigconf.pdf and b/macros/latex/contrib/acmart/samples/sample-sigconf.pdf differ diff --git a/macros/latex/contrib/acmart/samples/sample-sigplan.pdf b/macros/latex/contrib/acmart/samples/sample-sigplan.pdf index c77f003baf..a9a992f2a9 100644 Binary files a/macros/latex/contrib/acmart/samples/sample-sigplan.pdf and b/macros/latex/contrib/acmart/samples/sample-sigplan.pdf differ diff --git a/macros/latex/contrib/acmart/samples/sample-xelatex.pdf b/macros/latex/contrib/acmart/samples/sample-xelatex.pdf index 77dcd18b8a..a39b085482 100644 Binary files a/macros/latex/contrib/acmart/samples/sample-xelatex.pdf and b/macros/latex/contrib/acmart/samples/sample-xelatex.pdf differ diff --git a/macros/latex/contrib/acmart/samples/samples.dtx b/macros/latex/contrib/acmart/samples/samples.dtx index e5ab6b4399..24fa4f0594 100644 --- a/macros/latex/contrib/acmart/samples/samples.dtx +++ b/macros/latex/contrib/acmart/samples/samples.dtx @@ -1,4 +1,4 @@ -%<*manuscript|acmsmall|acmsmall-submission|acmsmall-biblatex|acmlarge|acmtog|sigconf|sigconf-biblatex|authordraft|sigplan|sigchi|sigchi-a|acmsmall-conf|sigconf-i13n> +%<*manuscript|acmsmall|acmsmall-submission|acmsmall-biblatex|acmlarge|acmtog|sigconf|sigconf-biblatex|authordraft|sigplan|sigchi|sigchi-a|acmsmall-conf|sigconf-i13n|acmcp> %% %% %% Commands for TeXCount @@ -15,7 +15,17 @@ %TCMACROS %% %% -%% The first command in your LaTeX source must be the \documentclass command. +%% The first command in your LaTeX source must be the \documentclass +%% command. +%% +%% For submission and review of your manuscript please change the +%% command to \documentclass[manuscript, screen, review]{acmart}. +%% +%% When submitting camera ready or to TAPS, please change the command +%% to \documentclass[sigconf]{acmart} or whichever template is required +%% for your publication. +%% +%% %\documentclass[manuscript,screen,review]{acmart} %\documentclass[acmsmall]{acmart} %\documentclass[acmsmall,natbib=false]{acmart} @@ -30,6 +40,7 @@ %\documentclass[sigchi-a, nonacm]{acmart} %\documentclass[sigconf, language=french, %language=german, language=spanish, language=english]{acmart} +%\documentclass[acmcp]{acmart} %% %% \BibTeX command to typeset BibTeX logo in the docs @@ -48,7 +59,7 @@ \acmYear{2018} \acmDOI{XXXXXXX.XXXXXXX} -% +% %<*manuscript|sigconf|authordraft|sigplan|sigchi|sigchi-a|acmsmall-conf|sigconf-i13n> %% These commands are for a PROCEEDINGS abstract or paper. \acmConference[Conference acronym 'XX]{Make sure to enter the correct @@ -64,18 +75,19 @@ \acmISBN{978-1-4503-XXXX-X/18/06} % -%<*acmsmall|acmsmall-submission|acmsmall-biblatex|acmlarge|acmtog> +%<*acmsmall|acmsmall-submission|acmsmall-biblatex|acmlarge|acmtog|acmcp> %% %% These commands are for a JOURNAL article. %\acmJournal{JACM} %\acmJournal{POMACS} %\acmJournal{TOG} +%\acmJournal{JDS} \acmVolume{37} \acmNumber{4} \acmArticle{111} \acmMonth{8} -% -%<*manuscript|acmsmall|acmsmall-submission|acmsmall-biblatex|acmlarge|acmtog|sigconf|sigconf-biblatex|authordraft|sigplan|sigchi|sigchi-a|acmsmall-conf|sigconf-i13n> +% +%<*manuscript|acmsmall|acmsmall-submission|acmsmall-biblatex|acmlarge|acmtog|sigconf|sigconf-biblatex|authordraft|sigplan|sigchi|sigchi-a|acmsmall-conf|sigconf-i13n|acmcp> %% @@ -84,8 +96,9 @@ %% receive a unique submission ID from the organizers %% of the event, and this ID should be used as the parameter to this command. %%\acmSubmissionID{123-A56-BU3} -% +% +%<*!acmcp> %% %% For managing citations, it is recommended to use bibliography %% files in BibTeX format. @@ -98,6 +111,7 @@ %% Look at the sample-*-biblatex.tex files for templates showcasing %% the biblatex styles. %% +% %<*manuscript|acmsmall|acmsmall-submission|acmlarge|acmtog|sigconf|authordraft|sigplan|sigchi|sigchi-a|acmsmall-conf|sigconf-i13n> %% @@ -135,8 +149,7 @@ \addbibresource{software.bib} \addbibresource{sample-base.bib} % - -%<*manuscript|acmsmall|acmsmall-submission|acmsmall-biblatex|acmlarge|acmtog|sigconf|sigconf-biblatex|authordraft|sigplan|sigchi|sigchi-a|acmsmall-conf|sigconf-i13n> +%<*manuscript|acmsmall|acmsmall-submission|acmsmall-biblatex|acmlarge|acmtog|sigconf|sigconf-biblatex|authordraft|sigplan|sigchi|sigchi-a|acmsmall-conf|sigconf-i13n|acmcp> %% %% end of the preamble, start of the body of the document source. @@ -157,11 +170,11 @@ %% "authornote" and "authornotemark" commands %% used to denote shared contribution to the research. \author{Ben Trovato} -\authornote{Both authors contributed equally to this research.} +%\authornote{Both authors contributed equally to this research.} \email{trovato@corporation.com} \orcid{1234-5678-9012} \author{G.K.M. Tobin} -\authornotemark[1] +%\authornotemark[1] \email{webmaster@marysville-ohio.com} \affiliation{% \institution{Institute for Clarity in Documentation} @@ -235,6 +248,27 @@ %% the author to define a more concise list %% of authors' names for this purpose. \renewcommand{\shortauthors}{Trovato et al.} +% +%<*acmcp> +%% +%% Article type: Research, Review, Discussion, Invited or position +\acmArticleType{Review} +%% +%% Links to code and data +\acmCodeLink{https://github.com/borisveytsman/acmart} +\acmDataLink{htps://zenodo.org/link} +%% +%% +%% Sometimes the addresses are too long to fit on the page. In this +%% case uncomment the lines below and fill them accodingly. +%% +%% \authorsaddresses{Corresponding author: Ben Trovato, +%% \href{mailto:trovato@corporation.com}{trovato@corporation.com}; +%% Institute for Clarity in Documentation, P.O. Box 1212, Dublin, +%% Ohio, USA, 43017-6221} +%% +% +%<*manuscript|acmsmall|acmsmall-submission|acmsmall-biblatex|acmlarge|acmtog|sigconf|sigconf-biblatex|authordraft|sigplan|sigchi|sigchi-a|acmsmall-conf|sigconf-i13n> %% %% The abstract is a short summary of the work to be presented in the @@ -315,6 +349,8 @@ \ccsdesc{Computer systems organization~Robotics} \ccsdesc[100]{Networks~Network reliability} +% +%<*manuscript|acmsmall|acmsmall-submission|acmsmall-biblatex|acmlarge|acmtog|sigconf|sigconf-biblatex|authordraft|sigplan|sigchi|sigchi-a|acmsmall-conf|sigconf-i13n|acmcp> %% %% Keywords. The author(s) should pick words that accurately describe %% the work being presented. Separate the keywords with commas. @@ -326,7 +362,7 @@ % neuronale Netze, Blickerkennung, Textklassifizierung} % \translatedkeywords{spanish}{conjuntos de datos, % redes neuronales, detección de mirada, etiquetado de texto} -% +% %<*sigconf|authordraft|sigplan|acmsmall-conf|sigconf-i13n> %% A "teaser" image appears between the author and affiliation %% information and the body of the document, and typically spans the @@ -341,6 +377,10 @@ % %<*manuscript|acmsmall|acmsmall-submission|acmsmall-biblatex|acmlarge|acmtog|sigconf|sigconf-biblatex|authordraft|sigplan|sigchi|sigchi-a|acmsmall-conf|sigconf-i13n> +\received{20 February 2007} +\received[revised]{12 March 2009} +\received[accepted]{5 June 2009} + %% %% This command processes the author and affiliation and title %% information and builds the first part of the formatted document. @@ -1217,3 +1257,29 @@ a numbered list of URLs with an optional brief description of the content found \end{document} % +%<*acmcp> + +\maketitle + + +\section{Problem statement} + +In this document we discuss how to write an ACM article. + +\section{Methods} + +This document provides \LaTeX\ templates for the article. + +\section{Results} + +We hope the resulting templates help the reader to write ACM papers +and proceedings. + +\section{Significance} + +This document is important for anybody wanting to comply with the +requirements of ACM publishing. + + +\end{document} +% \ No newline at end of file diff --git a/macros/latex/contrib/acmart/samples/samples.ins b/macros/latex/contrib/acmart/samples/samples.ins index f2331d1088..57ab5d7c41 100644 --- a/macros/latex/contrib/acmart/samples/samples.ins +++ b/macros/latex/contrib/acmart/samples/samples.ins @@ -21,6 +21,7 @@ \file{sample-sigplan.tex}{\from{samples.dtx}{sigplan}} \file{sample-acmsmall-conf.tex}{\from{samples.dtx}{acmsmall-conf}} \file{sample-sigconf-i13n.tex}{\from{samples.dtx}{sigconf-i13n}} - \file{sample-acmengage.tex}{\from{samples.dtx}{acmengage}} + \file{sample-acmengage.tex}{\from{samples.dtx}{acmengage}} + \file{sample-acmcp.tex}{\from{samples.dtx}{acmcp}} } diff --git a/macros/latex/contrib/glossaries-extra/CHANGES b/macros/latex/contrib/glossaries-extra/CHANGES index daf9358685..eda7e84503 100644 --- a/macros/latex/contrib/glossaries-extra/CHANGES +++ b/macros/latex/contrib/glossaries-extra/CHANGES @@ -1,3 +1,338 @@ +1.49 (pending): + + * Rollback to v1.48 available. + + * glossaries-extra.sty: + + - Case-changing support now tries to detect new mfirstuc.sty v2.08 + commands (which use LaTeX3). If available, mappings will be established for + \makefirstuc. For the best support, ensure you have + mfirstuc v2.08 and glossaries v4.50 when they become available. + + - long form commands like \glsxtrlong now set \glsxtrifwasfirstuse + to \@firstoftwo to simulate first use for the post-link hook. + This is implemented by the new command \glsxtrsetlongfirstuse + To restore the original behaviour, redefine this command: + + \renewcommand{\glsxtrsetlongfirstuse}[1]{% + \letcs\glsxtrifwasfirstuse{@secondoftwo}% + } + + - new hook to implement retainfirstuseperiod attribute: + \glsxtrdiscardperiodretainfirstuse + + Note that the retainfirstuseperiod attribute behaves slightly differently. + Now the period will only be discarded if it follows subsequent + use of commands like \gls or the short commands like + \glsxtrshort (not for commands like \glsuseri). + To restore the original behaviour: + + \renewcommand*{\glsxtrdiscardperiodretainfirstuse}[3]{% + \glsxtrifwasfirstuse{#3}{\glsxtrifperiod{#2}{#3}}% + } + + - The definition of \glsdefaultshortaccess has been restored to + the original definition provided by glossaries-accsupp.sty. If + you want the definition that was introduced to glossaries-extra v1.42 + you need to do: + + \renewcommand{\glsdefaultshortaccess}[2]{#1 (#2)} + + - entry counting now has associated conditional \ifglsresetcurrcount + which determines whether or not to set the counter back to 0 + when the first use flag is reset. (Issue #205 + https://www.dickimaw-books.com/bugtracker.php?key=205) + + The default is now \glsresetcurrcountfalse. This changes the + behaviour from older versions, but makes more sense with the + \cgls commands. If the previous behaviour is required use + \glsresetcurrcounttrue + + - Fixed bug #194 (setting mathrel category gives ordinary spacing + instead of mathrel spacing) + https://www.dickimaw-books.com/bugtracker.php?key=194 + + This issue was caused by the grouping in \glslinkwrcontent so + this command now simply does its argument to avoid this issue. + + The indexing whatsit is now encapsulated with \glsencapwrcontent, + which adds grouping to help prevent spacing issues. + + To revert back to the previous behaviour: + + \renewcommand*{\glslinkwrcontent}[1]{{#1}} + \renewcommand*{\glsencapwrcontent}[1]{#1} + + Note that \glsencapwrcontent has also been added to + glossaries.sty v4.50 so is defined with \providecommand in + glossaries-extra.sty + + - added support for bib2gls v3.0 `group-level` option + (hierarchical letter groups). New command (only supported by + \printunsrtglossary and \printunsrtinnerglossary): + + \glssubgroupheading + + If you need this setting for styles provided with + glossaries.sty, use the stylemods option to patch those styles + to include this command. + + - \printunsrtglossary now has extra commands that may be + referenced in \printunsrtglossaryentryprocesshook: + + \glscurrententrylevel + \glscurrentrootentry + \glscurrenttoplevelentry + + - \print...glossary set of commands have new options: + preamble and postamble + + - \printunsrtglossary new option : flatten + + - added starred version of \glsxtrcopytoglossary + + - \glsxtrenablerecordcount now adjusts the shortcut commands \ab, + \ac etc to use \rgls etc + + - new commands: + + \GlsXtrSetPlusModifier + \GlsXtrSetStarModifier + \GlsXtrIfInGlossary + \setupglslink + \setupglsadd + \glsxtrseelists \glsxtrseelistsencap \glsxtrseelistsdelim + \glsxtrtaggedlist \glsxtrtaggedlistsep + \glsentryindexcount \glsifindexed + \glsaddallunindexed \glsxtrnoidxgroups + \printunsrtglossaryunitpostskip + \glsxtrAddCounterRecordHook + \glsxtrnewglslink \glsxtrnewglsdisp + \glsxtraliashook + \GlsXtrStandaloneEntryPdfName + \GlsXtrStandaloneEntryHeadName + \GlsXtrStandaloneEntryPdfOther + \GlsXtrStandaloneEntryHeadOther + \GlsXtrUnsetBufferEnableRepeatLocal + \GlsXtrResetLocalBuffer + \GlsXtrClearUnsetBuffer + + - added check for \GetTitleStringDisableCommands to patch + for \glsxtrtitleorpdforheading + + - new placeholder commands for post-link hooks: + + \glsxtrifwasglslike, \glsxtrifwasglslikeandfirstuse, + \glsxtrifwassubsequentuse, \glsxtrifallcaps, + \glsxtrcurrentfield, \glsxtrifwassubsequentorshort + + - extra values for shortcuts option: acother and abother + + - new user-level command \glsxtraddunusedxrefs in the definition of + \glsxtraddallcrossrefs + + - added postunset, preunset and prereset \gls options + + - added innertextformat \gls option and associated commands: + + \glsxtrgenentrytextfmt + \glsxtrdefaultentrytextfmt + \glsxtrattrentrytextfmt + \glsaccessfmt... + + - new attributes: encapinnerfmt, encapnocase, encapnocaseinnerfmt + + - new commands for appending to the set of default \gls options: + + \GlsXtrAppToDefaultGlsOpts + \GlsXtrPreToDefaultGlsOpts + + - abbreviation style code has been moved into a separate file + glossaries-extra-abbrstyles.def which is automatically input + by glossaries-extra.sty + + - new helper commands for abbreviation styles: + + \glsxtrshortformat + \glsxtrshortplformat + \Glsxtrshortformat + \Glsxtrshortplformat + + \glsxtrlongformat + \glsxtrlongplformat + \Glsxtrlongformat + \Glsxtrlongplformat + + \glsxtrlongshortformat + \glsxtrlongshortplformat + \Glsxtrlongshortformat + \Glsxtrlongshortplformat + + \glsxtrshortlongformat + \glsxtrshortlongplformat + \Glsxtrshortlongformat + \Glsxtrshortlongplformat + + \glsxtrfootnotelongformat + \glsxtrfootnotelongplformat + \glsxtrfootnotepostlongformat + + \glsxtrrevert + \glsxtrdefaultrevert + \glsxtrscrevert + \glsxtrscuserrevert + \glsxtrsconlyrevert + \glsxtrsmrevert + \glsxtremrevert + + - debug=showwrgloss now also shows the wrglossary counter if + indexcounter has been set + + - made \glsxtrdopostpunc robust + + - added support for \glsindexingsetting (new to glossaries.sty v4.50) + + - record option: test for \inputencodingname switched to + \ifdefvoid and UTF-8 assumed if void. + + - new package option 'bibglsaux' + + - support for glossaries-prefix with abbreviations: + + \pglsxtrshort, \pglsxtrshortpl, \pglsxtrlong, \pglsxtrlongpl + \pglsfmtshort, \pglsfmtshortpl, \pglsfmtlong, \pglsfmtlongpl + + and sentence-case and all-caps versions + + - bug fix: indexcounter with record=nameref shows the wrglossary + value instead of the page number + + - bug fix: \GlsXtrDualBackLink showing label not text if dual + field not set + + - bug fix #206: default shortaccess is using UTF-16BE + https://www.dickimaw-books.com/bugtracker.php?key=206 + + - bug fix: shortplural and longplural in optional argument of + \newabbreviation ignore attributes + + - bug fix: markwords and markshortwords attribute not working + correctly for plurals + + - bug fix: some abbreviation styles had incorrect capitalisation + for \Gls... + + - bug fix: corrected name of longpluralaccess field + + - bug fix #192: Undefined control sequences with \mgls and bib2gls + https://www.dickimaw-books.com/bugtracker.php?key=192 + + - bug fix #193: \Glsxtrhiername fails with child entries + https://www.dickimaw-books.com/bugtracker.php?key=193 + + - bug fix #171: issue with base options passed if glossaries.sty + already loaded + https://www.dickimaw-books.com/bugtracker.php?key=171 + + - bug fix: corrected spelling of \GlsXtrLetField + + - bug fix: don't fallback on loclist field if \GlsXtrLocationField has + been changed (since this indicates that the given field is intended and + should be left blank if not set). + + - bug fix: entry counting not working with docdef=restricted + + - bug fix: corrected spelling of \ifglshasshort in \glssetcombinedsepnarrow + \glssetcombinedsepabbrvnone and \glssetcombinedsepabbrvnbsp + + - bug fix: corrected arguments to \GlsXtrStandaloneEntryOther + within the definition of \@glsxtrglossentryother + + * glossaries-extra-stylemods.sty: + + - added new sub-group command \glssubgroupheading to styles. + + * glossary-bookindex.sty: + + - added new sub-group command \glssubgroupheading to styles. + + - new commands to adjust the style: + + \glsxtrbookindexpregroupskip + \glsxtrbookindexpostgroupskip + \glsxtrbookindexpresubgroupskip + \glsxtrbookindexpostsubgroupskip + \glsxtrbookindexformatsubheader + \glsxtrbookindexsubbookmark + + * glossary-longextra.sty: + + - added new sub-group command \glssubgroupheading to styles. + + - new command to adjust the style: + + \glslongextraSubGroupHeading + + - new styles: long-sym-desc, long-desc-sym, abbr-short-long, + abbr-long-short and associated commands + + * glossary-topic.sty: + + - added new sub-group command \glssubgroupheading to styles. + + - new command to adjust the style: + + \glstopicSubGroupHeading + + * glossary-table.sty: new package + + * glossaries-extra-bib2gls.sty: + + - new command for use with record=nameref and indexcounter: + + \glsxtrwrglossarylocfmt + + - new commands defined or used by \glsxtrdisplaylocnameref: + + \glsxtrsetactualanchor + \glsxtrlocationanchor + \glsxtrrecentanchor + \glsxtractualanchor + \glsxtrtitlednamereflink + + - new conditional for the prefix label fallback (\dgls etc): + \ifGlsXtrPrefixLabelFallbackLast + + - \dgls etc will now record all possible prefixes when there's no + match to assist document build on the first run. + + - new commands: \dglsfield, \dGlsfield, \dGLSfield, \newdglsfield + and \newdglsfieldlike + + - added General Latin subset rules: + + \glsxtrGeneralLatinAtoMrules + \glsxtrGeneralLatinNtoZrules + \glsxtrGeneralLatinAtoGrules + \glsxtrGeneralLatinHtoMrules + \glsxtrGeneralLatinNtoSrules + \glsxtrGeneralLatinTtoZrules + + - subdivided \glsxtrgeneralpuncIrules into: + + \glsxtrgeneralpuncmarksrules + \glsxtrgeneralpuncaccentsrules + \glsxtrgeneralpuncquoterules + \glsxtrgeneralpuncbracketrules + \glsxtrgeneralpuncsignrules + + - added shortcut rules: + + \glsxtrIgnorableRules + \glsxtrGeneralInitRules + + - new command: \IfTeXParserLib + 1.48 (2021-11-22): * glossaries-extra.sty: diff --git a/macros/latex/contrib/glossaries-extra/DEPENDS.txt b/macros/latex/contrib/glossaries-extra/DEPENDS.txt new file mode 100644 index 0000000000..64bda12952 --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/DEPENDS.txt @@ -0,0 +1 @@ +glossaries diff --git a/macros/latex/contrib/glossaries-extra/README b/macros/latex/contrib/glossaries-extra/README index 5203fbbbbb..c9b495d713 100644 --- a/macros/latex/contrib/glossaries-extra/README +++ b/macros/latex/contrib/glossaries-extra/README @@ -1,4 +1,4 @@ -LaTeX Package : glossaries-extra v1.48 (2021-11-22) +LaTeX Package : glossaries-extra v1.49 (2022-10-14) Author : Nicola Talbot https://www.dickimaw-books.com/contact @@ -9,7 +9,7 @@ This material is subject to the LaTeX Project Public License. See http://www.ctan.org/license/lppl1.3 for the details of that license. -Copyright 2015-2021 Nicola Talbot +Copyright 2015-2022 Nicola Talbot DESCRIPTION diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-code.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-code.pdf index bcdfc7ef18..1a23d1b437 100644 Binary files a/macros/latex/contrib/glossaries-extra/glossaries-extra-code.pdf and b/macros/latex/contrib/glossaries-extra/glossaries-extra-code.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example001.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example001.pdf new file mode 100644 index 0000000000..beeafaa532 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example001.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example001.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example001.png new file mode 100644 index 0000000000..b2c9dec5a6 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example001.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example001.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example001.tex new file mode 100644 index 0000000000..5d549467ac --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example001.tex @@ -0,0 +1,19 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 1 Multiple abbreviation styles +% arara: pdflatex +% arara: pdfcrop +\documentclass[12pt]{article} +\pagestyle{empty} +\usepackage{glossaries-extra} +\setabbreviationstyle{long-short-sc} +\setabbreviationstyle[genus]{long-only-short-only} +\setabbreviationstyle[common]{short-nolong} +\newabbreviation{xml}{xml}{extensible markup language} +\newabbreviation[category={genus}]{clostridium}{C.}{Clostridium} +\newabbreviation[category={genus}]{myristica}{M.}{Myristica} +\newabbreviation[category={common}]{html}{HTML}{hypertext markup language} \newabbreviation[category={title}]{dr}{Dr}{Doctor} +\begin{document} +First use: \gls{xml}, \gls{clostridium}, \gls{myristica}, \gls{html}, \gls{dr}. + +Next use: \gls{xml}, \gls{clostridium}, \gls{myristica}, \gls{html}, \gls{dr}. +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example002.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example002.pdf new file mode 100644 index 0000000000..5a004b8f47 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example002.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example002.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example002.png new file mode 100644 index 0000000000..8894bc8c90 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example002.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example002.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example002.tex new file mode 100644 index 0000000000..41c2d77e9d --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example002.tex @@ -0,0 +1,17 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 2 \newabbreviation vs \newacronym vs \newglossaryentry +% arara: pdflatex +% arara: makeglossaries +% arara: pdflatex +% arara: pdfcrop +\documentclass[12pt]{article} +\pagestyle{empty} +\usepackage{glossaries-extra} +\makeglossaries +\newglossaryentry{sample}{name={sample},description={an example}} +\newabbreviation{xml}{XML}{extensible markup language} +\newacronym{nasa}{NASA}{National Aeronautics and Space Administration} +\begin{document} +First use: \gls{sample}, \gls{xml} and \gls{nasa}. Next use: \gls{sample}, \gls{xml} and \gls{nasa}. +\printglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example003.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example003.pdf new file mode 100644 index 0000000000..c4ca6cd712 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example003.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example003.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example003.png new file mode 100644 index 0000000000..90dfcb9606 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example003.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example003.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example003.tex new file mode 100644 index 0000000000..01a06f3664 --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example003.tex @@ -0,0 +1,29 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 3 @abbreviation vs @acronym vs @entry +% arara: pdflatex +% arara: bib2gls +% arara: pdflatex +% arara: pdfcrop +\documentclass[12pt]{article} +\pagestyle{empty} +\begin{filecontents*}{\jobname.bib} +@entry{sample, +name={sample}, +description={an example} +} +@abbreviation{xml, +short={XML}, +long={extensible markup language} +} +@acronym{nasa, +short={NASA}, +long={National Aeronautics and Space Administration} +} +\end{filecontents*} +\usepackage[record]{glossaries-extra} +\GlsXtrLoadResources +\begin{document} +First use: \gls{sample}, \gls{xml} and \gls{nasa}. +Next use: \gls{sample}, \gls{xml} and \gls{nasa}. +\printunsrtglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example004.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example004.pdf new file mode 100644 index 0000000000..71905cdb50 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example004.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example004.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example004.png new file mode 100644 index 0000000000..2e00cc94a9 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example004.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example004.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example004.tex new file mode 100644 index 0000000000..324476d772 --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example004.tex @@ -0,0 +1,36 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 4 Referencing an abbreviation (with hyperref) +% arara: pdflatex +% arara: makeglossaries +% arara: pdflatex +% arara: pdfcrop +\documentclass[12pt]{article} +\pagestyle{empty} +\usepackage[colorlinks]{hyperref} +\usepackage{glossaries-extra} +\makeglossaries +\newabbreviation{svm}{SVM}{support vector machine} +\newabbreviation{html}{HTML}{hypertext markup language} + +\begin{document} +\tableofcontents +\section{Introducing the \glsfmtlong{svm}} +First use: \gls{svm}. +Next use: \gls{svm}. + +\section{Introducing \gls{html} (incorrect)} +First use (not!): \gls{html}. +Next use: \gls{html}. + +\glsreset{html} +\section{Introducing \glsxtrshort{html} (incorrect)} +First use: \gls{html}. +Next use: \gls{html}. + + +\glsreset{html} +\section{Introducing \glsfmtshort{html}} +First use: \gls{html}. +Next use: \gls{html}. +\printglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example005.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example005.pdf new file mode 100644 index 0000000000..f39ab462d8 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example005.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example005.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example005.png new file mode 100644 index 0000000000..8bee699e51 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example005.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example005.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example005.tex new file mode 100644 index 0000000000..5504a318ef --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example005.tex @@ -0,0 +1,20 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 5 First use of \gls vs \glsxtrfull vs \glsfirst +% arara: pdflatex +% arara: pdfcrop +\documentclass[20pt]{extarticle} +\pagestyle{empty} +\usepackage{glossaries-extra} +\setabbreviationstyle{footnote} +\newabbreviation{nasa}{NASA}{National Aeronautics and Space Administration} + +\begin{document} +\gls{nasa}['s] space exploration\ldots + + +\glsxtrfull{nasa}['s] space exploration\ldots + + +\glsfirst{nasa}['s] space exploration\ldots + +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example006.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example006.pdf new file mode 100644 index 0000000000..cadd9bd28c Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example006.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example006.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example006.png new file mode 100644 index 0000000000..d4d1ebe740 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example006.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example006.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example006.tex new file mode 100644 index 0000000000..0a87f40585 --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example006.tex @@ -0,0 +1,30 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 6 Tagging abbreviation initials +% arara: pdflatex +% arara: makeglossaries +% arara: pdflatex +% arara: pdfcrop +\documentclass[12pt]{article} +\pagestyle{empty} +\usepackage{glossaries-extra} +\makeglossaries +\GlsXtrEnableInitialTagging{acronym,abbreviation}{\itag} +\setabbreviationstyle[acronym]{short-nolong-desc} +\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 + {\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} + +\newabbreviation[category={other}]{tne}{TNE} + {\itag{t}agging \itag{n}ot \itag{e}nabled} +\begin{document} +First use: \gls{radar}, \gls{xml}, \gls{tne}. + +Long form only: \glsxtrlong{radar}, \glsxtrlong{xml}, \glsxtrlong{tne}. +\printglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example007.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example007.pdf new file mode 100644 index 0000000000..631ef09efe Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example007.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example007.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example007.png new file mode 100644 index 0000000000..de32cd1c69 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example007.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example007.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example007.tex new file mode 100644 index 0000000000..45c9bd75b4 --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example007.tex @@ -0,0 +1,17 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 7 Category without an associated abbreviation style +% arara: pdflatex +% arara: pdfcrop +\documentclass[20pt]{extarticle} +\pagestyle{empty} +\usepackage[T1]{fontenc} +\usepackage{glossaries-extra} +\setabbreviationstyle{long-short-sc} +\newabbreviation{html}{html}{hypertext markup language} +\setabbreviationstyle[acronym]{footnote} +\newacronym{radar}{radar}{radio detection and ranging} +\newacronym[category=latin]{ibid}{ibid}{ibidem} +\begin{document} +\gls{html}, \gls{radar} and \gls{ibid}. +\printunsrtglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example008.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example008.pdf new file mode 100644 index 0000000000..4e327f2418 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example008.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example008.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example008.png new file mode 100644 index 0000000000..09eb9aad87 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example008.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example008.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example008.tex new file mode 100644 index 0000000000..dd75ad00cd --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example008.tex @@ -0,0 +1,16 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 8 The short-nolong abbreviation style +% arara: pdflatex +% arara: pdfcrop +\documentclass[11pt]{article} +\pagestyle{empty} +\usepackage[T1]{fontenc} +\usepackage[colorlinks]{hyperref} +\usepackage{glossaries-extra} +\setabbreviationstyle{short-nolong} +\newabbreviation{ex}{SHRT FM}{long form} +\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert]. +\printunsrtglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example009.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example009.pdf new file mode 100644 index 0000000000..1c362ea347 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example009.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example009.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example009.png new file mode 100644 index 0000000000..182a85582e Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example009.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example009.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example009.tex new file mode 100644 index 0000000000..6dca3b45f5 --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example009.tex @@ -0,0 +1,17 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 9 The short-nolong-desc abbreviation style +% arara: pdflatex +% arara: pdfcrop +\documentclass[11pt]{article} +\pagestyle{empty} +\usepackage[T1]{fontenc} +\usepackage[colorlinks]{hyperref} +\usepackage{glossaries-extra} +\setabbreviationstyle{short-nolong-desc} +\newabbreviation[description={sample description}] +{ex}{SHRT FM}{long form} +\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert]. +\printunsrtglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example010.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example010.pdf new file mode 100644 index 0000000000..7240db3049 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example010.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example010.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example010.png new file mode 100644 index 0000000000..392eafacfb Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example010.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example010.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example010.tex new file mode 100644 index 0000000000..962f0e7f8f --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example010.tex @@ -0,0 +1,16 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 10 The nolong-short abbreviation style +% arara: pdflatex +% arara: pdfcrop +\documentclass[11pt]{article} +\pagestyle{empty} +\usepackage[T1]{fontenc} +\usepackage[colorlinks]{hyperref} +\usepackage{glossaries-extra} +\setabbreviationstyle{nolong-short} +\newabbreviation{ex}{SHRT FM}{long form} +\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert]. +\printunsrtglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example011.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example011.pdf new file mode 100644 index 0000000000..46b9895ec4 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example011.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example011.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example011.png new file mode 100644 index 0000000000..d2df475ab0 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example011.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example011.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example011.tex new file mode 100644 index 0000000000..cd1bdfe861 --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example011.tex @@ -0,0 +1,16 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 11 The short-sc-nolong abbreviation style +% arara: pdflatex +% arara: pdfcrop +\documentclass[11pt]{article} +\pagestyle{empty} +\usepackage[T1]{fontenc} +\usepackage[colorlinks]{hyperref} +\usepackage{glossaries-extra} +\setabbreviationstyle{short-sc-nolong} +\newabbreviation{ex}{shrt fm}{long form} +\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert]. +\printunsrtglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example012.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example012.pdf new file mode 100644 index 0000000000..c5e9fb1fca Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example012.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example012.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example012.png new file mode 100644 index 0000000000..ad9eda1fe7 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example012.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example012.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example012.tex new file mode 100644 index 0000000000..e703863be1 --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example012.tex @@ -0,0 +1,17 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 12 The short-sc-nolong-desc abbreviation style +% arara: pdflatex +% arara: pdfcrop +\documentclass[11pt]{article} +\pagestyle{empty} +\usepackage[T1]{fontenc} +\usepackage[colorlinks]{hyperref} +\usepackage{glossaries-extra} +\setabbreviationstyle{short-sc-nolong-desc} +\newabbreviation[description={sample description}] +{ex}{shrt fm}{long form} +\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert]. +\printunsrtglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example013.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example013.pdf new file mode 100644 index 0000000000..a256a8a616 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example013.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example013.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example013.png new file mode 100644 index 0000000000..6490212f62 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example013.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example013.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example013.tex new file mode 100644 index 0000000000..4bc973467e --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example013.tex @@ -0,0 +1,16 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 13 The nolong-short-sc abbreviation style +% arara: pdflatex +% arara: pdfcrop +\documentclass[11pt]{article} +\pagestyle{empty} +\usepackage[T1]{fontenc} +\usepackage[colorlinks]{hyperref} +\usepackage{glossaries-extra} +\setabbreviationstyle{nolong-short-sc} +\newabbreviation{ex}{shrt fm}{long form} +\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert]. +\printunsrtglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example014.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example014.pdf new file mode 100644 index 0000000000..259d9a8221 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example014.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example014.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example014.png new file mode 100644 index 0000000000..83bf0c57b2 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example014.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example014.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example014.tex new file mode 100644 index 0000000000..ef6b395253 --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example014.tex @@ -0,0 +1,17 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 14 The short-sm-nolong abbreviation style +% arara: pdflatex +% arara: pdfcrop +\documentclass[11pt]{article} +\pagestyle{empty} + +\usepackage{relsize}\usepackage[T1]{fontenc} +\usepackage[colorlinks]{hyperref} +\usepackage{glossaries-extra} +\setabbreviationstyle{short-sm-nolong} +\newabbreviation{ex}{SHRT FM}{long form} +\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert]. +\printunsrtglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example015.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example015.pdf new file mode 100644 index 0000000000..96eb6c0e21 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example015.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example015.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example015.png new file mode 100644 index 0000000000..d4cd379397 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example015.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example015.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example015.tex new file mode 100644 index 0000000000..f7846f3d9b --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example015.tex @@ -0,0 +1,18 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 15 The short-sm-nolong-desc abbreviation style +% arara: pdflatex +% arara: pdfcrop +\documentclass[11pt]{article} +\pagestyle{empty} + +\usepackage{relsize}\usepackage[T1]{fontenc} +\usepackage[colorlinks]{hyperref} +\usepackage{glossaries-extra} +\setabbreviationstyle{short-sm-nolong-desc} +\newabbreviation[description={sample description}] +{ex}{SHRT FM}{long form} +\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert]. +\printunsrtglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example016.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example016.pdf new file mode 100644 index 0000000000..80df8c8b31 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example016.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example016.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example016.png new file mode 100644 index 0000000000..b6d8722497 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example016.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example016.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example016.tex new file mode 100644 index 0000000000..5320a1d21e --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example016.tex @@ -0,0 +1,17 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 16 The nolong-short-sm abbreviation style +% arara: pdflatex +% arara: pdfcrop +\documentclass[11pt]{article} +\pagestyle{empty} + +\usepackage{relsize}\usepackage[T1]{fontenc} +\usepackage[colorlinks]{hyperref} +\usepackage{glossaries-extra} +\setabbreviationstyle{nolong-short-sm} +\newabbreviation{ex}{SHRT FM}{long form} +\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert]. +\printunsrtglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example017.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example017.pdf new file mode 100644 index 0000000000..4739c7eae9 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example017.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example017.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example017.png new file mode 100644 index 0000000000..95688379e4 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example017.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example017.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example017.tex new file mode 100644 index 0000000000..f7896e313c --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example017.tex @@ -0,0 +1,16 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 17 The short-em-nolong abbreviation style +% arara: pdflatex +% arara: pdfcrop +\documentclass[11pt]{article} +\pagestyle{empty} +\usepackage[T1]{fontenc} +\usepackage[colorlinks]{hyperref} +\usepackage{glossaries-extra} +\setabbreviationstyle{short-em-nolong} +\newabbreviation{ex}{SHRT FM}{long form} +\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert]. +\printunsrtglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example018.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example018.pdf new file mode 100644 index 0000000000..0c3e102f40 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example018.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example018.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example018.png new file mode 100644 index 0000000000..73889ad297 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example018.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example018.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example018.tex new file mode 100644 index 0000000000..bcf4175e03 --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example018.tex @@ -0,0 +1,17 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 18 The short-em-nolong-desc abbreviation style +% arara: pdflatex +% arara: pdfcrop +\documentclass[11pt]{article} +\pagestyle{empty} +\usepackage[T1]{fontenc} +\usepackage[colorlinks]{hyperref} +\usepackage{glossaries-extra} +\setabbreviationstyle{short-em-nolong-desc} +\newabbreviation[description={sample description}] +{ex}{SHRT FM}{long form} +\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert]. +\printunsrtglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example019.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example019.pdf new file mode 100644 index 0000000000..ac6b498ddb Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example019.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example019.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example019.png new file mode 100644 index 0000000000..45c88c49d1 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example019.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example019.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example019.tex new file mode 100644 index 0000000000..9101105407 --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example019.tex @@ -0,0 +1,16 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 19 The nolong-short-em abbreviation style +% arara: pdflatex +% arara: pdfcrop +\documentclass[11pt]{article} +\pagestyle{empty} +\usepackage[T1]{fontenc} +\usepackage[colorlinks]{hyperref} +\usepackage{glossaries-extra} +\setabbreviationstyle{nolong-short-em} +\newabbreviation{ex}{SHRT FM}{long form} +\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert]. +\printunsrtglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example020.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example020.pdf new file mode 100644 index 0000000000..9c8da858d2 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example020.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example020.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example020.png new file mode 100644 index 0000000000..ae5adbf1f3 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example020.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example020.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example020.tex new file mode 100644 index 0000000000..d8b9ec59f5 --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example020.tex @@ -0,0 +1,17 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 20 The long-noshort-desc abbreviation style +% arara: pdflatex +% arara: pdfcrop +\documentclass[11pt]{article} +\pagestyle{empty} +\usepackage[T1]{fontenc} +\usepackage[colorlinks]{hyperref} +\usepackage{glossaries-extra} +\setabbreviationstyle{long-noshort-desc} +\newabbreviation[description={sample description}] +{ex}{SHRT FM}{long form} +\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert]. +\printunsrtglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example021.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example021.pdf new file mode 100644 index 0000000000..ee7b40bd7e Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example021.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example021.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example021.png new file mode 100644 index 0000000000..2711dc0db7 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example021.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example021.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example021.tex new file mode 100644 index 0000000000..eef9975670 --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example021.tex @@ -0,0 +1,16 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 21 The long-noshort abbreviation style +% arara: pdflatex +% arara: pdfcrop +\documentclass[11pt]{article} +\pagestyle{empty} +\usepackage[T1]{fontenc} +\usepackage[colorlinks]{hyperref} +\usepackage{glossaries-extra} +\setabbreviationstyle{long-noshort} +\newabbreviation{ex}{SHRT FM}{long form} +\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert]. +\printunsrtglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example022.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example022.pdf new file mode 100644 index 0000000000..4ab251b4c1 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example022.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example022.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example022.png new file mode 100644 index 0000000000..be66d9ef25 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example022.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example022.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example022.tex new file mode 100644 index 0000000000..b76fee1b27 --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example022.tex @@ -0,0 +1,16 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 22 The long-noshort-sc abbreviation style +% arara: pdflatex +% arara: pdfcrop +\documentclass[11pt]{article} +\pagestyle{empty} +\usepackage[T1]{fontenc} +\usepackage[colorlinks]{hyperref} +\usepackage{glossaries-extra} +\setabbreviationstyle{long-noshort-sc} +\newabbreviation{ex}{shrt fm}{long form} +\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert]. +\printunsrtglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example023.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example023.pdf new file mode 100644 index 0000000000..02d5877ccf Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example023.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example023.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example023.png new file mode 100644 index 0000000000..142bc3c4e8 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example023.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example023.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example023.tex new file mode 100644 index 0000000000..f433b9e323 --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example023.tex @@ -0,0 +1,17 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 23 The long-noshort-sc-desc abbreviation style +% arara: pdflatex +% arara: pdfcrop +\documentclass[11pt]{article} +\pagestyle{empty} +\usepackage[T1]{fontenc} +\usepackage[colorlinks]{hyperref} +\usepackage{glossaries-extra} +\setabbreviationstyle{long-noshort-sc-desc} +\newabbreviation[description={sample description}] +{ex}{shrt fm}{long form} +\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert]. +\printunsrtglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example024.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example024.pdf new file mode 100644 index 0000000000..9d4ebe8c8e Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example024.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example024.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example024.png new file mode 100644 index 0000000000..cbbb369897 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example024.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example024.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example024.tex new file mode 100644 index 0000000000..f63c0c8979 --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example024.tex @@ -0,0 +1,17 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 24 The long-noshort-sm abbreviation style +% arara: pdflatex +% arara: pdfcrop +\documentclass[11pt]{article} +\pagestyle{empty} + +\usepackage{relsize}\usepackage[T1]{fontenc} +\usepackage[colorlinks]{hyperref} +\usepackage{glossaries-extra} +\setabbreviationstyle{long-noshort-sm} +\newabbreviation{ex}{SHRT FM}{long form} +\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert]. +\printunsrtglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example025.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example025.pdf new file mode 100644 index 0000000000..d20f79aa0f Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example025.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example025.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example025.png new file mode 100644 index 0000000000..e5de999bc0 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example025.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example025.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example025.tex new file mode 100644 index 0000000000..f6b69654a9 --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example025.tex @@ -0,0 +1,18 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 25 The long-noshort-sm-desc abbreviation style +% arara: pdflatex +% arara: pdfcrop +\documentclass[11pt]{article} +\pagestyle{empty} + +\usepackage{relsize}\usepackage[T1]{fontenc} +\usepackage[colorlinks]{hyperref} +\usepackage{glossaries-extra} +\setabbreviationstyle{long-noshort-sm-desc} +\newabbreviation[description={sample description}] +{ex}{SHRT FM}{long form} +\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert]. +\printunsrtglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example026.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example026.pdf new file mode 100644 index 0000000000..3f0535e48c Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example026.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example026.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example026.png new file mode 100644 index 0000000000..3082227e33 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example026.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example026.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example026.tex new file mode 100644 index 0000000000..6374c047c1 --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example026.tex @@ -0,0 +1,16 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 26 The long-noshort-em abbreviation style +% arara: pdflatex +% arara: pdfcrop +\documentclass[11pt]{article} +\pagestyle{empty} +\usepackage[T1]{fontenc} +\usepackage[colorlinks]{hyperref} +\usepackage{glossaries-extra} +\setabbreviationstyle{long-noshort-em} +\newabbreviation{ex}{SHRT FM}{long form} +\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert]. +\printunsrtglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example027.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example027.pdf new file mode 100644 index 0000000000..709919e564 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example027.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example027.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example027.png new file mode 100644 index 0000000000..0306a4980c Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example027.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example027.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example027.tex new file mode 100644 index 0000000000..52399703dc --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example027.tex @@ -0,0 +1,17 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 27 The long-noshort-em-desc abbreviation style +% arara: pdflatex +% arara: pdfcrop +\documentclass[11pt]{article} +\pagestyle{empty} +\usepackage[T1]{fontenc} +\usepackage[colorlinks]{hyperref} +\usepackage{glossaries-extra} +\setabbreviationstyle{long-noshort-em-desc} +\newabbreviation[description={sample description}] +{ex}{SHRT FM}{long form} +\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert]. +\printunsrtglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example028.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example028.pdf new file mode 100644 index 0000000000..2034f71582 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example028.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example028.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example028.png new file mode 100644 index 0000000000..bb89ef3dac Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example028.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example028.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example028.tex new file mode 100644 index 0000000000..4b12a371d8 --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example028.tex @@ -0,0 +1,16 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 28 The long-em-noshort-em abbreviation style +% arara: pdflatex +% arara: pdfcrop +\documentclass[11pt]{article} +\pagestyle{empty} +\usepackage[T1]{fontenc} +\usepackage[colorlinks]{hyperref} +\usepackage{glossaries-extra} +\setabbreviationstyle{long-em-noshort-em} +\newabbreviation{ex}{SHRT FM}{long form} +\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert]. +\printunsrtglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example029.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example029.pdf new file mode 100644 index 0000000000..2f7946ae1b Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example029.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example029.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example029.png new file mode 100644 index 0000000000..3fc9a53525 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example029.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example029.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example029.tex new file mode 100644 index 0000000000..c20cad7556 --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example029.tex @@ -0,0 +1,17 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 29 The long-em-noshort-em-desc abbreviation style +% arara: pdflatex +% arara: pdfcrop +\documentclass[11pt]{article} +\pagestyle{empty} +\usepackage[T1]{fontenc} +\usepackage[colorlinks]{hyperref} +\usepackage{glossaries-extra} +\setabbreviationstyle{long-em-noshort-em-desc} +\newabbreviation[description={sample description}] +{ex}{SHRT FM}{long form} +\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert]. +\printunsrtglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example030.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example030.pdf new file mode 100644 index 0000000000..64cb6796c0 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example030.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example030.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example030.png new file mode 100644 index 0000000000..97cf28052b Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example030.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example030.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example030.tex new file mode 100644 index 0000000000..cb8d4fa639 --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example030.tex @@ -0,0 +1,16 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 30 The long-short abbreviation style +% arara: pdflatex +% arara: pdfcrop +\documentclass[11pt]{article} +\pagestyle{empty} +\usepackage[T1]{fontenc} +\usepackage[colorlinks]{hyperref} +\usepackage{glossaries-extra} +\setabbreviationstyle{long-short} +\newabbreviation{ex}{SHRT FM}{long form} +\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert]. +\printunsrtglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example031.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example031.pdf new file mode 100644 index 0000000000..cb57c26255 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example031.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example031.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example031.png new file mode 100644 index 0000000000..9a237f7460 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example031.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example031.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example031.tex new file mode 100644 index 0000000000..acd39ec7bc --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example031.tex @@ -0,0 +1,17 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 31 The long-short-desc abbreviation style +% arara: pdflatex +% arara: pdfcrop +\documentclass[11pt]{article} +\pagestyle{empty} +\usepackage[T1]{fontenc} +\usepackage[colorlinks]{hyperref} +\usepackage{glossaries-extra} +\setabbreviationstyle{long-short-desc} +\newabbreviation[description={sample description}] +{ex}{SHRT FM}{long form} +\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert]. +\printunsrtglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example032.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example032.pdf new file mode 100644 index 0000000000..f16ab6eec2 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example032.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example032.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example032.png new file mode 100644 index 0000000000..ab51d19054 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example032.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example032.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example032.tex new file mode 100644 index 0000000000..9f7f0b05b4 --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example032.tex @@ -0,0 +1,16 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 32 The long-short-sc abbreviation style +% arara: pdflatex +% arara: pdfcrop +\documentclass[11pt]{article} +\pagestyle{empty} +\usepackage[T1]{fontenc} +\usepackage[colorlinks]{hyperref} +\usepackage{glossaries-extra} +\setabbreviationstyle{long-short-sc} +\newabbreviation{ex}{shrt fm}{long form} +\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert]. +\printunsrtglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example033.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example033.pdf new file mode 100644 index 0000000000..5820ca2130 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example033.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example033.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example033.png new file mode 100644 index 0000000000..16c2f6589f Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example033.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example033.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example033.tex new file mode 100644 index 0000000000..edca28a268 --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example033.tex @@ -0,0 +1,17 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 33 The long-short-sc-desc abbreviation style +% arara: pdflatex +% arara: pdfcrop +\documentclass[11pt]{article} +\pagestyle{empty} +\usepackage[T1]{fontenc} +\usepackage[colorlinks]{hyperref} +\usepackage{glossaries-extra} +\setabbreviationstyle{long-short-sc-desc} +\newabbreviation[description={sample description}] +{ex}{shrt fm}{long form} +\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert]. +\printunsrtglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example034.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example034.pdf new file mode 100644 index 0000000000..cfab11d0c9 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example034.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example034.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example034.png new file mode 100644 index 0000000000..674c9bd32d Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example034.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example034.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example034.tex new file mode 100644 index 0000000000..2c2c545999 --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example034.tex @@ -0,0 +1,17 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 34 The long-short-sm abbreviation style +% arara: pdflatex +% arara: pdfcrop +\documentclass[11pt]{article} +\pagestyle{empty} + +\usepackage{relsize}\usepackage[T1]{fontenc} +\usepackage[colorlinks]{hyperref} +\usepackage{glossaries-extra} +\setabbreviationstyle{long-short-sm} +\newabbreviation{ex}{SHRT FM}{long form} +\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert]. +\printunsrtglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example035.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example035.pdf new file mode 100644 index 0000000000..b46053eaf4 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example035.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example035.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example035.png new file mode 100644 index 0000000000..97ea5cc2d7 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example035.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example035.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example035.tex new file mode 100644 index 0000000000..6c4f85c72a --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example035.tex @@ -0,0 +1,18 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 35 The long-short-sm-desc abbreviation style +% arara: pdflatex +% arara: pdfcrop +\documentclass[11pt]{article} +\pagestyle{empty} + +\usepackage{relsize}\usepackage[T1]{fontenc} +\usepackage[colorlinks]{hyperref} +\usepackage{glossaries-extra} +\setabbreviationstyle{long-short-sm-desc} +\newabbreviation[description={sample description}] +{ex}{SHRT FM}{long form} +\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert]. +\printunsrtglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example036.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example036.pdf new file mode 100644 index 0000000000..2acbe9b527 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example036.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example036.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example036.png new file mode 100644 index 0000000000..9b581c839b Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example036.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example036.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example036.tex new file mode 100644 index 0000000000..693b3479d8 --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example036.tex @@ -0,0 +1,16 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 36 The long-short-em abbreviation style +% arara: pdflatex +% arara: pdfcrop +\documentclass[11pt]{article} +\pagestyle{empty} +\usepackage[T1]{fontenc} +\usepackage[colorlinks]{hyperref} +\usepackage{glossaries-extra} +\setabbreviationstyle{long-short-em} +\newabbreviation{ex}{SHRT FM}{long form} +\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert]. +\printunsrtglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example037.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example037.pdf new file mode 100644 index 0000000000..cdc1baf4af Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example037.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example037.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example037.png new file mode 100644 index 0000000000..6baf3bd4ab Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example037.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example037.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example037.tex new file mode 100644 index 0000000000..983a615989 --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example037.tex @@ -0,0 +1,17 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 37 The long-short-em-desc abbreviation style +% arara: pdflatex +% arara: pdfcrop +\documentclass[11pt]{article} +\pagestyle{empty} +\usepackage[T1]{fontenc} +\usepackage[colorlinks]{hyperref} +\usepackage{glossaries-extra} +\setabbreviationstyle{long-short-em-desc} +\newabbreviation[description={sample description}] +{ex}{SHRT FM}{long form} +\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert]. +\printunsrtglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example038.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example038.pdf new file mode 100644 index 0000000000..4e789d7066 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example038.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example038.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example038.png new file mode 100644 index 0000000000..91886419b6 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example038.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example038.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example038.tex new file mode 100644 index 0000000000..476e652d72 --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example038.tex @@ -0,0 +1,16 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 38 The long-em-short-em abbreviation style +% arara: pdflatex +% arara: pdfcrop +\documentclass[11pt]{article} +\pagestyle{empty} +\usepackage[T1]{fontenc} +\usepackage[colorlinks]{hyperref} +\usepackage{glossaries-extra} +\setabbreviationstyle{long-em-short-em} +\newabbreviation{ex}{SHRT FM}{long form} +\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert]. +\printunsrtglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example039.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example039.pdf new file mode 100644 index 0000000000..30cc360fa4 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example039.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example039.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example039.png new file mode 100644 index 0000000000..6570501ac5 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example039.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example039.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example039.tex new file mode 100644 index 0000000000..ae4f57b281 --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example039.tex @@ -0,0 +1,17 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 39 The long-em-short-em-desc abbreviation style +% arara: pdflatex +% arara: pdfcrop +\documentclass[11pt]{article} +\pagestyle{empty} +\usepackage[T1]{fontenc} +\usepackage[colorlinks]{hyperref} +\usepackage{glossaries-extra} +\setabbreviationstyle{long-em-short-em-desc} +\newabbreviation[description={sample description}] +{ex}{SHRT FM}{long form} +\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert]. +\printunsrtglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example040.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example040.pdf new file mode 100644 index 0000000000..a50960c8c9 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example040.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example040.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example040.png new file mode 100644 index 0000000000..657d7a15f1 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example040.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example040.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example040.tex new file mode 100644 index 0000000000..bab0eacfd3 --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example040.tex @@ -0,0 +1,16 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 40 The long-short-user abbreviation style +% arara: pdflatex +% arara: pdfcrop +\documentclass[11pt]{article} +\pagestyle{empty} +\usepackage[T1]{fontenc} +\usepackage[colorlinks]{hyperref} +\usepackage{glossaries-extra} +\setabbreviationstyle{long-short-user} +\newabbreviation[user1={extra info}]{ex}{SHRT FM}{long form} +\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert]. +\printunsrtglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example041.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example041.pdf new file mode 100644 index 0000000000..af065fab48 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example041.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example041.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example041.png new file mode 100644 index 0000000000..91b935f0ce Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example041.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example041.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example041.tex new file mode 100644 index 0000000000..c3520ca37e --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example041.tex @@ -0,0 +1,17 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 41 The long-short-user-desc abbreviation style +% arara: pdflatex +% arara: pdfcrop +\documentclass[11pt]{article} +\pagestyle{empty} +\usepackage[T1]{fontenc} +\usepackage[colorlinks]{hyperref} +\usepackage{glossaries-extra} +\setabbreviationstyle{long-short-user-desc} +\newabbreviation[description={sample description}, +user1={extra info}]{ex}{SHRT FM}{long form} +\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert]. +\printunsrtglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example042.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example042.pdf new file mode 100644 index 0000000000..ab047ff468 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example042.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example042.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example042.png new file mode 100644 index 0000000000..d19431015b Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example042.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example042.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example042.tex new file mode 100644 index 0000000000..8ae7c5dbd1 --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example042.tex @@ -0,0 +1,16 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 42 The long-postshort-user abbreviation style +% arara: pdflatex +% arara: pdfcrop +\documentclass[11pt]{article} +\pagestyle{empty} +\usepackage[T1]{fontenc} +\usepackage[colorlinks]{hyperref} +\usepackage{glossaries-extra} +\setabbreviationstyle{long-postshort-user} +\newabbreviation[user1={extra info}]{ex}{SHRT FM}{long form} +\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert]. +\printunsrtglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example043.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example043.pdf new file mode 100644 index 0000000000..f4b87fecb3 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example043.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example043.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example043.png new file mode 100644 index 0000000000..c6a1b48a60 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example043.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example043.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example043.tex new file mode 100644 index 0000000000..1b8b91ce0a --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example043.tex @@ -0,0 +1,17 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 43 The long-postshort-user-desc abbreviation style +% arara: pdflatex +% arara: pdfcrop +\documentclass[11pt]{article} +\pagestyle{empty} +\usepackage[T1]{fontenc} +\usepackage[colorlinks]{hyperref} +\usepackage{glossaries-extra} +\setabbreviationstyle{long-postshort-user-desc} +\newabbreviation[description={sample description}, +user1={extra info}]{ex}{SHRT FM}{long form} +\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert]. +\printunsrtglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example044.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example044.pdf new file mode 100644 index 0000000000..ce1bb6b95c Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example044.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example044.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example044.png new file mode 100644 index 0000000000..4044ebc889 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example044.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example044.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example044.tex new file mode 100644 index 0000000000..148ec44884 --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example044.tex @@ -0,0 +1,16 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 44 The long-postshort-sc-user abbreviation style +% arara: pdflatex +% arara: pdfcrop +\documentclass[11pt]{article} +\pagestyle{empty} +\usepackage[T1]{fontenc} +\usepackage[colorlinks]{hyperref} +\usepackage{glossaries-extra} +\setabbreviationstyle{long-postshort-sc-user} +\newabbreviation[user1={extra info}]{ex}{shrt fm}{long form} +\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert]. +\printunsrtglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example045.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example045.pdf new file mode 100644 index 0000000000..66a3a0869b Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example045.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example045.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example045.png new file mode 100644 index 0000000000..1de4f96e35 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example045.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example045.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example045.tex new file mode 100644 index 0000000000..058466ac7f --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example045.tex @@ -0,0 +1,17 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 45 The long-postshort-sc-user-desc abbreviation style +% arara: pdflatex +% arara: pdfcrop +\documentclass[11pt]{article} +\pagestyle{empty} +\usepackage[T1]{fontenc} +\usepackage[colorlinks]{hyperref} +\usepackage{glossaries-extra} +\setabbreviationstyle{long-postshort-sc-user-desc} +\newabbreviation[description={sample description}, +user1={extra info}]{ex}{shrt fm}{long form} +\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert]. +\printunsrtglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example046.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example046.pdf new file mode 100644 index 0000000000..04f34def96 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example046.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example046.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example046.png new file mode 100644 index 0000000000..c9d0303520 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example046.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example046.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example046.tex new file mode 100644 index 0000000000..d8bf202302 --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example046.tex @@ -0,0 +1,16 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 46 The short-long abbreviation style +% arara: pdflatex +% arara: pdfcrop +\documentclass[11pt]{article} +\pagestyle{empty} +\usepackage[T1]{fontenc} +\usepackage[colorlinks]{hyperref} +\usepackage{glossaries-extra} +\setabbreviationstyle{short-long} +\newabbreviation{ex}{SHRT FM}{long form} +\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert]. +\printunsrtglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example047.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example047.pdf new file mode 100644 index 0000000000..47d5de099e Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example047.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example047.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example047.png new file mode 100644 index 0000000000..80af1a2842 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example047.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example047.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example047.tex new file mode 100644 index 0000000000..ca17dd35be --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example047.tex @@ -0,0 +1,17 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 47 The short-long-desc abbreviation style +% arara: pdflatex +% arara: pdfcrop +\documentclass[11pt]{article} +\pagestyle{empty} +\usepackage[T1]{fontenc} +\usepackage[colorlinks]{hyperref} +\usepackage{glossaries-extra} +\setabbreviationstyle{short-long-desc} +\newabbreviation[description={sample description}] +{ex}{SHRT FM}{long form} +\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert]. +\printunsrtglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example048.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example048.pdf new file mode 100644 index 0000000000..5fca559352 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example048.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example048.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example048.png new file mode 100644 index 0000000000..11f53edc41 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example048.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example048.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example048.tex new file mode 100644 index 0000000000..a1dc5c86de --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example048.tex @@ -0,0 +1,16 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 48 The short-sc-long abbreviation style +% arara: pdflatex +% arara: pdfcrop +\documentclass[11pt]{article} +\pagestyle{empty} +\usepackage[T1]{fontenc} +\usepackage[colorlinks]{hyperref} +\usepackage{glossaries-extra} +\setabbreviationstyle{short-sc-long} +\newabbreviation{ex}{shrt fm}{long form} +\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert]. +\printunsrtglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example049.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example049.pdf new file mode 100644 index 0000000000..25c68b9e35 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example049.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example049.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example049.png new file mode 100644 index 0000000000..6abd840445 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example049.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example049.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example049.tex new file mode 100644 index 0000000000..ee746bc0c4 --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example049.tex @@ -0,0 +1,17 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 49 The short-sc-long-desc abbreviation style +% arara: pdflatex +% arara: pdfcrop +\documentclass[11pt]{article} +\pagestyle{empty} +\usepackage[T1]{fontenc} +\usepackage[colorlinks]{hyperref} +\usepackage{glossaries-extra} +\setabbreviationstyle{short-sc-long-desc} +\newabbreviation[description={sample description}] +{ex}{shrt fm}{long form} +\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert]. +\printunsrtglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example050.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example050.pdf new file mode 100644 index 0000000000..839ad2c89e Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example050.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example050.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example050.png new file mode 100644 index 0000000000..831e6f646a Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example050.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example050.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example050.tex new file mode 100644 index 0000000000..54abe46f01 --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example050.tex @@ -0,0 +1,17 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 50 The short-sm-long abbreviation style +% arara: pdflatex +% arara: pdfcrop +\documentclass[11pt]{article} +\pagestyle{empty} + +\usepackage{relsize}\usepackage[T1]{fontenc} +\usepackage[colorlinks]{hyperref} +\usepackage{glossaries-extra} +\setabbreviationstyle{short-sm-long} +\newabbreviation{ex}{SHRT FM}{long form} +\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert]. +\printunsrtglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example051.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example051.pdf new file mode 100644 index 0000000000..ae21addf72 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example051.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example051.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example051.png new file mode 100644 index 0000000000..2f900429e9 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example051.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example051.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example051.tex new file mode 100644 index 0000000000..bc77696e44 --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example051.tex @@ -0,0 +1,18 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 51 The short-sm-long-desc abbreviation style +% arara: pdflatex +% arara: pdfcrop +\documentclass[11pt]{article} +\pagestyle{empty} + +\usepackage{relsize}\usepackage[T1]{fontenc} +\usepackage[colorlinks]{hyperref} +\usepackage{glossaries-extra} +\setabbreviationstyle{short-sm-long-desc} +\newabbreviation[description={sample description}] +{ex}{SHRT FM}{long form} +\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert]. +\printunsrtglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example052.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example052.pdf new file mode 100644 index 0000000000..022d58ed0f Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example052.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example052.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example052.png new file mode 100644 index 0000000000..6d4b2ede30 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example052.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example052.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example052.tex new file mode 100644 index 0000000000..a0a409457f --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example052.tex @@ -0,0 +1,16 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 52 The short-em-long abbreviation style +% arara: pdflatex +% arara: pdfcrop +\documentclass[11pt]{article} +\pagestyle{empty} +\usepackage[T1]{fontenc} +\usepackage[colorlinks]{hyperref} +\usepackage{glossaries-extra} +\setabbreviationstyle{short-em-long} +\newabbreviation{ex}{SHRT FM}{long form} +\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert]. +\printunsrtglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example053.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example053.pdf new file mode 100644 index 0000000000..495cdf2c12 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example053.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example053.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example053.png new file mode 100644 index 0000000000..e9913ea640 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example053.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example053.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example053.tex new file mode 100644 index 0000000000..61179732bf --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example053.tex @@ -0,0 +1,17 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 53 The short-em-long-desc abbreviation style +% arara: pdflatex +% arara: pdfcrop +\documentclass[11pt]{article} +\pagestyle{empty} +\usepackage[T1]{fontenc} +\usepackage[colorlinks]{hyperref} +\usepackage{glossaries-extra} +\setabbreviationstyle{short-em-long-desc} +\newabbreviation[description={sample description}] +{ex}{SHRT FM}{long form} +\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert]. +\printunsrtglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example054.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example054.pdf new file mode 100644 index 0000000000..95784fb5ef Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example054.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example054.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example054.png new file mode 100644 index 0000000000..c150b3b5a2 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example054.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example054.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example054.tex new file mode 100644 index 0000000000..4afda2e6d8 --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example054.tex @@ -0,0 +1,16 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 54 The short-em-long-em abbreviation style +% arara: pdflatex +% arara: pdfcrop +\documentclass[11pt]{article} +\pagestyle{empty} +\usepackage[T1]{fontenc} +\usepackage[colorlinks]{hyperref} +\usepackage{glossaries-extra} +\setabbreviationstyle{short-em-long-em} +\newabbreviation{ex}{SHRT FM}{long form} +\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert]. +\printunsrtglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example055.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example055.pdf new file mode 100644 index 0000000000..6b48d01dd0 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example055.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example055.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example055.png new file mode 100644 index 0000000000..7554decfac Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example055.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example055.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example055.tex new file mode 100644 index 0000000000..47f6f0a039 --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example055.tex @@ -0,0 +1,17 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 55 The short-em-long-em-desc abbreviation style +% arara: pdflatex +% arara: pdfcrop +\documentclass[11pt]{article} +\pagestyle{empty} +\usepackage[T1]{fontenc} +\usepackage[colorlinks]{hyperref} +\usepackage{glossaries-extra} +\setabbreviationstyle{short-em-long-em-desc} +\newabbreviation[description={sample description}] +{ex}{SHRT FM}{long form} +\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert]. +\printunsrtglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example056.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example056.pdf new file mode 100644 index 0000000000..afdd8bc9e6 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example056.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example056.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example056.png new file mode 100644 index 0000000000..12c7c9008d Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example056.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example056.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example056.tex new file mode 100644 index 0000000000..1980ed3572 --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example056.tex @@ -0,0 +1,16 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 56 The short-long-user abbreviation style +% arara: pdflatex +% arara: pdfcrop +\documentclass[11pt]{article} +\pagestyle{empty} +\usepackage[T1]{fontenc} +\usepackage[colorlinks]{hyperref} +\usepackage{glossaries-extra} +\setabbreviationstyle{short-long-user} +\newabbreviation[user1={extra info}]{ex}{SHRT FM}{long form} +\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert]. +\printunsrtglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example057.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example057.pdf new file mode 100644 index 0000000000..56d0888d1a Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example057.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example057.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example057.png new file mode 100644 index 0000000000..63f9939e4e Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example057.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example057.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example057.tex new file mode 100644 index 0000000000..b61d9a7e3e --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example057.tex @@ -0,0 +1,17 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 57 The short-long-user-desc abbreviation style +% arara: pdflatex +% arara: pdfcrop +\documentclass[11pt]{article} +\pagestyle{empty} +\usepackage[T1]{fontenc} +\usepackage[colorlinks]{hyperref} +\usepackage{glossaries-extra} +\setabbreviationstyle{short-long-user-desc} +\newabbreviation[description={sample description}, +user1={extra info}]{ex}{SHRT FM}{long form} +\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert]. +\printunsrtglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example058.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example058.pdf new file mode 100644 index 0000000000..71193bf7f3 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example058.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example058.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example058.png new file mode 100644 index 0000000000..76e774613e Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example058.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example058.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example058.tex new file mode 100644 index 0000000000..de31e14870 --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example058.tex @@ -0,0 +1,16 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 58 The short-postlong-user abbreviation style +% arara: pdflatex +% arara: pdfcrop +\documentclass[11pt]{article} +\pagestyle{empty} +\usepackage[T1]{fontenc} +\usepackage[colorlinks]{hyperref} +\usepackage{glossaries-extra} +\setabbreviationstyle{short-postlong-user} +\newabbreviation[user1={extra info}]{ex}{SHRT FM}{long form} +\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert]. +\printunsrtglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example059.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example059.pdf new file mode 100644 index 0000000000..05d9ccc565 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example059.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example059.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example059.png new file mode 100644 index 0000000000..12900b4d7b Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example059.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example059.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example059.tex new file mode 100644 index 0000000000..de98b1ff25 --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example059.tex @@ -0,0 +1,17 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 59 The short-postlong-user-desc abbreviation style +% arara: pdflatex +% arara: pdfcrop +\documentclass[11pt]{article} +\pagestyle{empty} +\usepackage[T1]{fontenc} +\usepackage[colorlinks]{hyperref} +\usepackage{glossaries-extra} +\setabbreviationstyle{short-postlong-user-desc} +\newabbreviation[description={sample description}, +user1={extra info}]{ex}{SHRT FM}{long form} +\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert]. +\printunsrtglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example060.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example060.pdf new file mode 100644 index 0000000000..c69595841d Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example060.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example060.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example060.png new file mode 100644 index 0000000000..f79e9f2e85 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example060.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example060.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example060.tex new file mode 100644 index 0000000000..04f1c1e36a --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example060.tex @@ -0,0 +1,17 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 60 The long-hyphen-short-hyphen abbreviation style +% arara: pdflatex +% arara: pdfcrop +\documentclass[11pt]{article} +\pagestyle{empty} +\usepackage[T1]{fontenc} +\usepackage[colorlinks]{hyperref} +\usepackage{glossaries-extra} +\glssetcategoryattributes{abbreviation}{markwords,markshortwords}{true} +\setabbreviationstyle{long-hyphen-short-hyphen} +\newabbreviation{ex}{SHRT FM}{long form} +\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert]. +\printunsrtglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example061.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example061.pdf new file mode 100644 index 0000000000..156a167070 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example061.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example061.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example061.png new file mode 100644 index 0000000000..a791e00b08 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example061.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example061.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example061.tex new file mode 100644 index 0000000000..320588615b --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example061.tex @@ -0,0 +1,17 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 61 The long-hyphen-postshort-hyphen abbreviation style +% arara: pdflatex +% arara: pdfcrop +\documentclass[11pt]{article} +\pagestyle{empty} +\usepackage[T1]{fontenc} +\usepackage[colorlinks]{hyperref} +\usepackage{glossaries-extra} +\glssetcategoryattributes{abbreviation}{markwords,markshortwords}{true} +\setabbreviationstyle{long-hyphen-postshort-hyphen} +\newabbreviation{ex}{SHRT FM}{long form} +\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert]. +\printunsrtglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example062.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example062.pdf new file mode 100644 index 0000000000..110fbb0a48 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example062.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example062.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example062.png new file mode 100644 index 0000000000..5640bb9ab8 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example062.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example062.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example062.tex new file mode 100644 index 0000000000..574a86b0e1 --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example062.tex @@ -0,0 +1,18 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 62 The long-hyphen-short-hyphen-desc abbreviation style +% arara: pdflatex +% arara: pdfcrop +\documentclass[11pt]{article} +\pagestyle{empty} +\usepackage[T1]{fontenc} +\usepackage[colorlinks]{hyperref} +\usepackage{glossaries-extra} +\glssetcategoryattributes{abbreviation}{markwords,markshortwords}{true} +\setabbreviationstyle{long-hyphen-short-hyphen-desc} +\newabbreviation[description={sample description}] +{ex}{SHRT FM}{long form} +\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert]. +\printunsrtglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example063.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example063.pdf new file mode 100644 index 0000000000..06bb62fbb2 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example063.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example063.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example063.png new file mode 100644 index 0000000000..7a3589773a Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example063.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example063.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example063.tex new file mode 100644 index 0000000000..863eb2dc5f --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example063.tex @@ -0,0 +1,18 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 63 The long-hyphen-postshort-hyphen-desc abbreviation style +% arara: pdflatex +% arara: pdfcrop +\documentclass[11pt]{article} +\pagestyle{empty} +\usepackage[T1]{fontenc} +\usepackage[colorlinks]{hyperref} +\usepackage{glossaries-extra} +\glssetcategoryattributes{abbreviation}{markwords,markshortwords}{true} +\setabbreviationstyle{long-hyphen-postshort-hyphen-desc} +\newabbreviation[description={sample description}] +{ex}{SHRT FM}{long form} +\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert]. +\printunsrtglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example064.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example064.pdf new file mode 100644 index 0000000000..2e5cb7d837 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example064.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example064.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example064.png new file mode 100644 index 0000000000..aa08a268e0 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example064.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example064.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example064.tex new file mode 100644 index 0000000000..711b0394f3 --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example064.tex @@ -0,0 +1,18 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 64 The long-hyphen-noshort-desc-noreg abbreviation style +% arara: pdflatex +% arara: pdfcrop +\documentclass[11pt]{article} +\pagestyle{empty} +\usepackage[T1]{fontenc} +\usepackage[colorlinks]{hyperref} +\usepackage{glossaries-extra} +\glssetcategoryattributes{abbreviation}{markwords,markshortwords}{true} +\setabbreviationstyle{long-hyphen-noshort-desc-noreg} +\newabbreviation[description={sample description}] +{ex}{SHRT FM}{long form} +\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert]. +\printunsrtglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example065.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example065.pdf new file mode 100644 index 0000000000..d2dc6d280f Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example065.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example065.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example065.png new file mode 100644 index 0000000000..6d809378fc Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example065.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example065.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example065.tex new file mode 100644 index 0000000000..9048eaac20 --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example065.tex @@ -0,0 +1,17 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 65 The long-hyphen-noshort-noreg abbreviation style +% arara: pdflatex +% arara: pdfcrop +\documentclass[11pt]{article} +\pagestyle{empty} +\usepackage[T1]{fontenc} +\usepackage[colorlinks]{hyperref} +\usepackage{glossaries-extra} +\glssetcategoryattributes{abbreviation}{markwords,markshortwords}{true} +\setabbreviationstyle{long-hyphen-noshort-noreg} +\newabbreviation{ex}{SHRT FM}{long form} +\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert]. +\printunsrtglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example066.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example066.pdf new file mode 100644 index 0000000000..614f0a6adf Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example066.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example066.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example066.png new file mode 100644 index 0000000000..1b77002ea7 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example066.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example066.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example066.tex new file mode 100644 index 0000000000..c3f322f62b --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example066.tex @@ -0,0 +1,17 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 66 The short-hyphen-long-hyphen abbreviation style +% arara: pdflatex +% arara: pdfcrop +\documentclass[11pt]{article} +\pagestyle{empty} +\usepackage[T1]{fontenc} +\usepackage[colorlinks]{hyperref} +\usepackage{glossaries-extra} +\glssetcategoryattributes{abbreviation}{markwords,markshortwords}{true} +\setabbreviationstyle{short-hyphen-long-hyphen} +\newabbreviation{ex}{SHRT FM}{long form} +\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert]. +\printunsrtglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example067.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example067.pdf new file mode 100644 index 0000000000..3e4271cd8a Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example067.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example067.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example067.png new file mode 100644 index 0000000000..5f5e00333f Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example067.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example067.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example067.tex new file mode 100644 index 0000000000..0bbcbcdbf5 --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example067.tex @@ -0,0 +1,17 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 67 The short-hyphen-postlong-hyphen abbreviation style +% arara: pdflatex +% arara: pdfcrop +\documentclass[11pt]{article} +\pagestyle{empty} +\usepackage[T1]{fontenc} +\usepackage[colorlinks]{hyperref} +\usepackage{glossaries-extra} +\glssetcategoryattributes{abbreviation}{markwords,markshortwords}{true} +\setabbreviationstyle{short-hyphen-postlong-hyphen} +\newabbreviation{ex}{SHRT FM}{long form} +\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert]. +\printunsrtglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example068.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example068.pdf new file mode 100644 index 0000000000..a550a73ded Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example068.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example068.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example068.png new file mode 100644 index 0000000000..ccac0dbca8 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example068.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example068.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example068.tex new file mode 100644 index 0000000000..926397ae24 --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example068.tex @@ -0,0 +1,18 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 68 The short-hyphen-long-hyphen-desc abbreviation style +% arara: pdflatex +% arara: pdfcrop +\documentclass[11pt]{article} +\pagestyle{empty} +\usepackage[T1]{fontenc} +\usepackage[colorlinks]{hyperref} +\usepackage{glossaries-extra} +\glssetcategoryattributes{abbreviation}{markwords,markshortwords}{true} +\setabbreviationstyle{short-hyphen-long-hyphen-desc} +\newabbreviation[description={sample description}] +{ex}{SHRT FM}{long form} +\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert]. +\printunsrtglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example069.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example069.pdf new file mode 100644 index 0000000000..d2f29cabfa Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example069.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example069.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example069.png new file mode 100644 index 0000000000..99a99df35b Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example069.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example069.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example069.tex new file mode 100644 index 0000000000..5cc621732b --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example069.tex @@ -0,0 +1,18 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 69 The short-hyphen-postlong-hyphen-desc abbreviation style +% arara: pdflatex +% arara: pdfcrop +\documentclass[11pt]{article} +\pagestyle{empty} +\usepackage[T1]{fontenc} +\usepackage[colorlinks]{hyperref} +\usepackage{glossaries-extra} +\glssetcategoryattributes{abbreviation}{markwords,markshortwords}{true} +\setabbreviationstyle{short-hyphen-postlong-hyphen-desc} +\newabbreviation[description={sample description}] +{ex}{SHRT FM}{long form} +\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert]. +\printunsrtglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example070.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example070.pdf new file mode 100644 index 0000000000..49dcf49e2c Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example070.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example070.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example070.png new file mode 100644 index 0000000000..2984668afb Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example070.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example070.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example070.tex new file mode 100644 index 0000000000..4e541ce75a --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example070.tex @@ -0,0 +1,16 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 70 The long-only-short-only abbreviation style +% arara: pdflatex +% arara: pdfcrop +\documentclass[11pt]{article} +\pagestyle{empty} +\usepackage[T1]{fontenc} +\usepackage[colorlinks]{hyperref} +\usepackage{glossaries-extra} +\setabbreviationstyle{long-only-short-only} +\newabbreviation{ex}{SHRT FM}{long form} +\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert]. +\printunsrtglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example071.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example071.pdf new file mode 100644 index 0000000000..2bffb40ded Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example071.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example071.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example071.png new file mode 100644 index 0000000000..c8fab5c286 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example071.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example071.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example071.tex new file mode 100644 index 0000000000..34f2d9a202 --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example071.tex @@ -0,0 +1,17 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 71 The long-only-short-only-desc abbreviation style +% arara: pdflatex +% arara: pdfcrop +\documentclass[11pt]{article} +\pagestyle{empty} +\usepackage[T1]{fontenc} +\usepackage[colorlinks]{hyperref} +\usepackage{glossaries-extra} +\setabbreviationstyle{long-only-short-only-desc} +\newabbreviation[description={sample description}] +{ex}{SHRT FM}{long form} +\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert]. +\printunsrtglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example072.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example072.pdf new file mode 100644 index 0000000000..b43c957edf Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example072.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example072.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example072.png new file mode 100644 index 0000000000..786eedbfc1 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example072.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example072.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example072.tex new file mode 100644 index 0000000000..fd17223672 --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example072.tex @@ -0,0 +1,16 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 72 The long-only-short-sc-only abbreviation style +% arara: pdflatex +% arara: pdfcrop +\documentclass[11pt]{article} +\pagestyle{empty} +\usepackage[T1]{fontenc} +\usepackage[colorlinks]{hyperref} +\usepackage{glossaries-extra} +\setabbreviationstyle{long-only-short-sc-only} +\newabbreviation{ex}{shrt fm}{long form} +\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert]. +\printunsrtglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example073.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example073.pdf new file mode 100644 index 0000000000..9867f108f8 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example073.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example073.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example073.png new file mode 100644 index 0000000000..77f8db782c Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example073.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example073.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example073.tex new file mode 100644 index 0000000000..c62c8ebc46 --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example073.tex @@ -0,0 +1,17 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 73 The long-only-short-sc-only-desc abbreviation style +% arara: pdflatex +% arara: pdfcrop +\documentclass[11pt]{article} +\pagestyle{empty} +\usepackage[T1]{fontenc} +\usepackage[colorlinks]{hyperref} +\usepackage{glossaries-extra} +\setabbreviationstyle{long-only-short-sc-only-desc} +\newabbreviation[description={sample description}] +{ex}{shrt fm}{long form} +\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert]. +\printunsrtglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example074.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example074.pdf new file mode 100644 index 0000000000..a9760afe6f Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example074.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example074.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example074.png new file mode 100644 index 0000000000..fff841590d Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example074.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example074.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example074.tex new file mode 100644 index 0000000000..737bf0e604 --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example074.tex @@ -0,0 +1,16 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 74 The short-footnote abbreviation style +% arara: pdflatex +% arara: pdfcrop +\documentclass[20pt]{extarticle} +\pagestyle{empty} +\usepackage[T1]{fontenc} +\usepackage[colorlinks]{hyperref} +\usepackage{glossaries-extra} +\setabbreviationstyle{short-footnote} +\newabbreviation{ex}{SHRT FM}{long form} +\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert]. +\printunsrtglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example075.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example075.pdf new file mode 100644 index 0000000000..2defe83920 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example075.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example075.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example075.png new file mode 100644 index 0000000000..a9e2ad056f Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example075.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example075.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example075.tex new file mode 100644 index 0000000000..84eee2dc68 --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example075.tex @@ -0,0 +1,17 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 75 The short-footnote-desc abbreviation style +% arara: pdflatex +% arara: pdfcrop +\documentclass[20pt]{extarticle} +\pagestyle{empty} +\usepackage[T1]{fontenc} +\usepackage[colorlinks]{hyperref} +\usepackage{glossaries-extra} +\setabbreviationstyle{short-footnote-desc} +\newabbreviation[description={sample description}] +{ex}{SHRT FM}{long form} +\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert]. +\printunsrtglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example076.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example076.pdf new file mode 100644 index 0000000000..cdc2d9e2f2 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example076.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example076.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example076.png new file mode 100644 index 0000000000..6d6bfb6960 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example076.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example076.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example076.tex new file mode 100644 index 0000000000..29fad9cabf --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example076.tex @@ -0,0 +1,16 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 76 The short-postfootnote abbreviation style +% arara: pdflatex +% arara: pdfcrop +\documentclass[20pt]{extarticle} +\pagestyle{empty} +\usepackage[T1]{fontenc} +\usepackage[colorlinks]{hyperref} +\usepackage{glossaries-extra} +\setabbreviationstyle{short-postfootnote} +\newabbreviation{ex}{SHRT FM}{long form} +\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert]. +\printunsrtglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example077.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example077.pdf new file mode 100644 index 0000000000..0230694b46 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example077.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example077.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example077.png new file mode 100644 index 0000000000..9375f0e16c Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example077.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example077.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example077.tex new file mode 100644 index 0000000000..5a21ecd142 --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example077.tex @@ -0,0 +1,17 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 77 The short-postfootnote-desc abbreviation style +% arara: pdflatex +% arara: pdfcrop +\documentclass[20pt]{extarticle} +\pagestyle{empty} +\usepackage[T1]{fontenc} +\usepackage[colorlinks]{hyperref} +\usepackage{glossaries-extra} +\setabbreviationstyle{short-postfootnote-desc} +\newabbreviation[description={sample description}] +{ex}{SHRT FM}{long form} +\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert]. +\printunsrtglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example078.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example078.pdf new file mode 100644 index 0000000000..e03e9672b4 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example078.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example078.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example078.png new file mode 100644 index 0000000000..c69ba01cab Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example078.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example078.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example078.tex new file mode 100644 index 0000000000..f8ae6ac373 --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example078.tex @@ -0,0 +1,16 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 78 The short-sc-footnote abbreviation style +% arara: pdflatex +% arara: pdfcrop +\documentclass[20pt]{extarticle} +\pagestyle{empty} +\usepackage[T1]{fontenc} +\usepackage[colorlinks]{hyperref} +\usepackage{glossaries-extra} +\setabbreviationstyle{short-sc-footnote} +\newabbreviation{ex}{shrt fm}{long form} +\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert]. +\printunsrtglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example079.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example079.pdf new file mode 100644 index 0000000000..85753c2b04 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example079.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example079.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example079.png new file mode 100644 index 0000000000..b9c66f8d56 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example079.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example079.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example079.tex new file mode 100644 index 0000000000..979779f41d --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example079.tex @@ -0,0 +1,17 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 79 The short-sc-footnote-desc abbreviation style +% arara: pdflatex +% arara: pdfcrop +\documentclass[20pt]{extarticle} +\pagestyle{empty} +\usepackage[T1]{fontenc} +\usepackage[colorlinks]{hyperref} +\usepackage{glossaries-extra} +\setabbreviationstyle{short-sc-footnote-desc} +\newabbreviation[description={sample description}] +{ex}{shrt fm}{long form} +\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert]. +\printunsrtglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example080.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example080.pdf new file mode 100644 index 0000000000..da5ffb52ce Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example080.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example080.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example080.png new file mode 100644 index 0000000000..23927d13b2 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example080.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example080.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example080.tex new file mode 100644 index 0000000000..43254ff34d --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example080.tex @@ -0,0 +1,16 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 80 The short-sc-postfootnote abbreviation style +% arara: pdflatex +% arara: pdfcrop +\documentclass[20pt]{extarticle} +\pagestyle{empty} +\usepackage[T1]{fontenc} +\usepackage[colorlinks]{hyperref} +\usepackage{glossaries-extra} +\setabbreviationstyle{short-sc-postfootnote} +\newabbreviation{ex}{shrt fm}{long form} +\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert]. +\printunsrtglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example081.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example081.pdf new file mode 100644 index 0000000000..9fa9014fc7 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example081.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example081.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example081.png new file mode 100644 index 0000000000..fddc53e100 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example081.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example081.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example081.tex new file mode 100644 index 0000000000..14fe04e713 --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example081.tex @@ -0,0 +1,17 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 81 The short-sc-postfootnote-desc abbreviation style +% arara: pdflatex +% arara: pdfcrop +\documentclass[20pt]{extarticle} +\pagestyle{empty} +\usepackage[T1]{fontenc} +\usepackage[colorlinks]{hyperref} +\usepackage{glossaries-extra} +\setabbreviationstyle{short-sc-postfootnote-desc} +\newabbreviation[description={sample description}] +{ex}{shrt fm}{long form} +\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert]. +\printunsrtglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example082.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example082.pdf new file mode 100644 index 0000000000..bfc1a918a8 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example082.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example082.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example082.png new file mode 100644 index 0000000000..00883d0852 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example082.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example082.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example082.tex new file mode 100644 index 0000000000..874b8af0c8 --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example082.tex @@ -0,0 +1,17 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 82 The short-sm-footnote abbreviation style +% arara: pdflatex +% arara: pdfcrop +\documentclass[20pt]{extarticle} +\pagestyle{empty} + +\usepackage{relsize}\usepackage[T1]{fontenc} +\usepackage[colorlinks]{hyperref} +\usepackage{glossaries-extra} +\setabbreviationstyle{short-sm-footnote} +\newabbreviation{ex}{SHRT FM}{long form} +\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert]. +\printunsrtglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example083.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example083.pdf new file mode 100644 index 0000000000..d75e1f2cb6 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example083.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example083.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example083.png new file mode 100644 index 0000000000..b6615941c6 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example083.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example083.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example083.tex new file mode 100644 index 0000000000..359bdff947 --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example083.tex @@ -0,0 +1,18 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 83 The short-sm-footnote-desc abbreviation style +% arara: pdflatex +% arara: pdfcrop +\documentclass[20pt]{extarticle} +\pagestyle{empty} + +\usepackage{relsize}\usepackage[T1]{fontenc} +\usepackage[colorlinks]{hyperref} +\usepackage{glossaries-extra} +\setabbreviationstyle{short-sm-footnote-desc} +\newabbreviation[description={sample description}] +{ex}{SHRT FM}{long form} +\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert]. +\printunsrtglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example084.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example084.pdf new file mode 100644 index 0000000000..c371e39c94 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example084.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example084.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example084.png new file mode 100644 index 0000000000..c0f1ae3b76 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example084.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example084.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example084.tex new file mode 100644 index 0000000000..8dba064f2d --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example084.tex @@ -0,0 +1,17 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 84 The short-sm-postfootnote abbreviation style +% arara: pdflatex +% arara: pdfcrop +\documentclass[20pt]{extarticle} +\pagestyle{empty} + +\usepackage{relsize}\usepackage[T1]{fontenc} +\usepackage[colorlinks]{hyperref} +\usepackage{glossaries-extra} +\setabbreviationstyle{short-sm-postfootnote} +\newabbreviation{ex}{SHRT FM}{long form} +\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert]. +\printunsrtglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example085.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example085.pdf new file mode 100644 index 0000000000..3249f1fb5c Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example085.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example085.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example085.png new file mode 100644 index 0000000000..52250d4313 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example085.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example085.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example085.tex new file mode 100644 index 0000000000..064a1edba6 --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example085.tex @@ -0,0 +1,18 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 85 The short-sm-postfootnote-desc abbreviation style +% arara: pdflatex +% arara: pdfcrop +\documentclass[20pt]{extarticle} +\pagestyle{empty} + +\usepackage{relsize}\usepackage[T1]{fontenc} +\usepackage[colorlinks]{hyperref} +\usepackage{glossaries-extra} +\setabbreviationstyle{short-sm-postfootnote-desc} +\newabbreviation[description={sample description}] +{ex}{SHRT FM}{long form} +\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert]. +\printunsrtglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example086.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example086.pdf new file mode 100644 index 0000000000..f61b0fb96e Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example086.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example086.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example086.png new file mode 100644 index 0000000000..4ed5a27774 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example086.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example086.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example086.tex new file mode 100644 index 0000000000..7704ec1137 --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example086.tex @@ -0,0 +1,16 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 86 The short-em-footnote abbreviation style +% arara: pdflatex +% arara: pdfcrop +\documentclass[20pt]{extarticle} +\pagestyle{empty} +\usepackage[T1]{fontenc} +\usepackage[colorlinks]{hyperref} +\usepackage{glossaries-extra} +\setabbreviationstyle{short-em-footnote} +\newabbreviation{ex}{SHRT FM}{long form} +\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert]. +\printunsrtglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example087.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example087.pdf new file mode 100644 index 0000000000..1e06ee5fa6 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example087.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example087.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example087.png new file mode 100644 index 0000000000..de0c28f1b5 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example087.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example087.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example087.tex new file mode 100644 index 0000000000..22acff097a --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example087.tex @@ -0,0 +1,17 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 87 The short-em-footnote-desc abbreviation style +% arara: pdflatex +% arara: pdfcrop +\documentclass[20pt]{extarticle} +\pagestyle{empty} +\usepackage[T1]{fontenc} +\usepackage[colorlinks]{hyperref} +\usepackage{glossaries-extra} +\setabbreviationstyle{short-em-footnote-desc} +\newabbreviation[description={sample description}] +{ex}{SHRT FM}{long form} +\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert]. +\printunsrtglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example088.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example088.pdf new file mode 100644 index 0000000000..c38838d94e Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example088.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example088.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example088.png new file mode 100644 index 0000000000..0150546990 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example088.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example088.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example088.tex new file mode 100644 index 0000000000..19bce2abe3 --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example088.tex @@ -0,0 +1,16 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 88 The short-em-postfootnote abbreviation style +% arara: pdflatex +% arara: pdfcrop +\documentclass[20pt]{extarticle} +\pagestyle{empty} +\usepackage[T1]{fontenc} +\usepackage[colorlinks]{hyperref} +\usepackage{glossaries-extra} +\setabbreviationstyle{short-em-postfootnote} +\newabbreviation{ex}{SHRT FM}{long form} +\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert]. +\printunsrtglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example089.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example089.pdf new file mode 100644 index 0000000000..41fadcdfbe Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example089.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example089.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example089.png new file mode 100644 index 0000000000..656a09472a Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example089.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example089.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example089.tex new file mode 100644 index 0000000000..5928e80805 --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example089.tex @@ -0,0 +1,17 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 89 The short-em-postfootnote-desc abbreviation style +% arara: pdflatex +% arara: pdfcrop +\documentclass[20pt]{extarticle} +\pagestyle{empty} +\usepackage[T1]{fontenc} +\usepackage[colorlinks]{hyperref} +\usepackage{glossaries-extra} +\setabbreviationstyle{short-em-postfootnote-desc} +\newabbreviation[description={sample description}] +{ex}{SHRT FM}{long form} +\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert]. +\printunsrtglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example090.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example090.pdf new file mode 100644 index 0000000000..651c791060 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example090.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example090.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example090.png new file mode 100644 index 0000000000..a56e6de9e8 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example090.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example090.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example090.tex new file mode 100644 index 0000000000..f3312d5079 --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example090.tex @@ -0,0 +1,15 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 90 Illustrating the prereset option +% Label: ex:prereset +% arara: pdflatex +% arara: pdfcrop +\documentclass[12pt]{article} +\pagestyle{empty} +\usepackage {glossaries-extra} +\glsdefpostlink {general}{\glsxtrpostlinkAddDescOnFirstUse } + \newglossaryentry {sample}{name={sample}, + first={sample first use}, + description={an example}} +\begin{document} +Text field: \glstext {sample}. \par First use: \gls {sample}. Next use: \gls {sample}. \par Force reset: \gls [prereset]{sample}. Used? \ifglsused {sample}{Yes}{No}. \par Force reset: \glstext [prereset]{sample}. Used? \ifglsused {sample}{Yes}{No}. +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example091.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example091.pdf new file mode 100644 index 0000000000..43a1db6bf4 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example091.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example091.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example091.png new file mode 100644 index 0000000000..8a7eee3e8f Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example091.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example091.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example091.tex new file mode 100644 index 0000000000..dc213add18 --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example091.tex @@ -0,0 +1,15 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 91 Combining prereset and preunset +% Label: ex:preresetpreunset +% arara: pdflatex +% arara: pdfcrop +\documentclass[12pt]{article} +\pagestyle{empty} +\usepackage {glossaries-extra} +\glsdefpostlink {general}{\glsxtrpostlinkAddDescOnFirstUse } + \newglossaryentry {sample}{name={sample}, + first={sample first use}, + description={an example}} +\begin{document} +\gls {sample}. Used? \ifglsused {sample}{Yes}{No}. \par {\glsfirst [preunset=local,prereset=global]{sample}. Used? \ifglsused {sample}{Yes}{No}. } \par Used? \ifglsused {sample}{Yes}{No}. \par {\gls [preunset=local,prereset=global]{sample}. Used? \ifglsused {sample}{Yes}{No}. } \par Used? \ifglsused {sample}{Yes}{No}. +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example092.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example092.pdf new file mode 100644 index 0000000000..180fd12247 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example092.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example092.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example092.png new file mode 100644 index 0000000000..a5df22506e Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example092.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example092.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example092.tex new file mode 100644 index 0000000000..9c6229cd54 --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example092.tex @@ -0,0 +1,29 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 92 References in section headings (simplistic approach) +% arara: pdflatex +% arara: pdflatex +% arara: pdfcrop +\documentclass[12pt]{article} +\pagestyle{empty} +\usepackage[colorlinks]{hyperref} +\usepackage{glossaries-extra} + + +\glsdefpostlink{general}{\glsxtrpostlinkAddDescOnFirstUse} + + +\newglossaryentry{sample}{name={sample},description={an example}} +\newglossaryentry{alpha}{name={\ensuremath{\alpha}},description={alpha}} +\begin{document} +\tableofcontents +\section{\texorpdfstring{\Glsentrytext{sample} and \glsentrytext{alpha}}{Sample and alpha}} + + +First use: \gls{sample} and \gls{alpha}. + + +Next use: \gls{sample} and \gls{alpha}. + + +\printunsrtglossary +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example093.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example093.pdf new file mode 100644 index 0000000000..b4336afcf0 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example093.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example093.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example093.png new file mode 100644 index 0000000000..974c16cf4c Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example093.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example093.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example093.tex new file mode 100644 index 0000000000..944eee90f4 --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example093.tex @@ -0,0 +1,25 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 93 References in section headings using \glsfmttext +% arara: pdflatex +% arara: pdflatex +% arara: pdfcrop +\documentclass[12pt]{article} +\pagestyle{empty} +\usepackage[colorlinks]{hyperref} +\usepackage{glossaries-extra} + + +\glsdefpostlink{general}{\glsxtrpostlinkAddDescOnFirstUse} + + +\newglossaryentry{sample}{name={sample},description={an example}} +\newglossaryentry{alpha}{name={\ensuremath{\alpha}},description={alpha}} +\begin{document} +\tableofcontents \section{\Glsfmttext{sample} and \glsfmttext{alpha}} + +First use: \gls{sample} and \gls{alpha}. + +Next use: \gls{sample} and \gls{alpha}. + +\printunsrtglossary +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example094.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example094.pdf new file mode 100644 index 0000000000..2f219630b0 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example094.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example094.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example094.png new file mode 100644 index 0000000000..c4d86c5f78 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example094.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example094.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example094.tex new file mode 100644 index 0000000000..368809c15a --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example094.tex @@ -0,0 +1,23 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 94 Reference with hyperlink in section headings +% arara: pdflatex +% arara: pdfcrop +\documentclass[12pt]{article} +\pagestyle{empty} +\usepackage[colorlinks]{hyperref} +\usepackage{glossaries-extra} + + +\pagestyle{headings} +\glssetcategoryattribute{general}{headuc}{true} +\glsdefpostlink{general}{\glsxtrpostlinkAddDescOnFirstUse} + + +\newglossaryentry{sample}{name={sample},description={an example}} +\renewcommand{\glsxtrtitleopts}{} +\begin{document} +\section{\Glsfmttext{sample}} +First use: \gls{sample}. Next use: \gls{sample}. + +\printunsrtglossary +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example095.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example095.pdf new file mode 100644 index 0000000000..b09010b946 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example095.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example095.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example095.png new file mode 100644 index 0000000000..b6d061ad86 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example095.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example095.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example095.tex new file mode 100644 index 0000000000..c764dc2505 --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example095.tex @@ -0,0 +1,22 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 95 Nested link text with \glspl +% arara: pdflatex +% arara: pdflatex +% arara: pdfcrop +\documentclass[12pt]{article} +\pagestyle{empty} +\usepackage[colorlinks]{hyperref} +\usepackage{glossaries-extra} +\setabbreviationstyle{long-em-short-em} +\newabbreviation{html}{HTML}{hypertext markup language} +\newabbreviation{ssi}{SSI}{server-side includes} +\newabbreviation{shtml}{SHTML}{\glsps{html} enabled \glsps{ssi}} +\begin{document} +\tableofcontents +\section{\glsfmtlong{shtml}} +First use: \gls{shtml}, \gls{html}, \gls{ssi}. + +Next use: \gls{shtml}, \gls{html}, \gls{ssi}. + +\printunsrtglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example096.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example096.pdf new file mode 100644 index 0000000000..f2df4ffc1b Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example096.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example096.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example096.png new file mode 100644 index 0000000000..abb3a84e21 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example096.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example096.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example096.tex new file mode 100644 index 0000000000..c346bc46bc --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example096.tex @@ -0,0 +1,32 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 96 Link text styles: outer, middle, inner, hyperlinks and post-link hook +% arara: pdflatex +% arara: pdfcrop +\documentclass[14pt]{extarticle} +\pagestyle{empty} + \usepackage{courier} +\usepackage[T1]{fontenc} +\usepackage{xcolor} +\usepackage{soul} +\usepackage[colorlinks]{hyperref} +\usepackage[nogroupskip]{glossaries-extra} +% outer formatting: +\renewcommand{\glstextformat}[1]{\texttt{#1}} +% middle formatting: +\renewcommand{\glsxtrregularfont}[1]{\textbf{#1}} +\renewcommand{\glsxtrabbreviationfont}[1]{\textit{#1}} +% inner formatting: +\renewcommand{\glsxtrdefaultentrytextfmt}[1]{\hl{#1}} +% post-link hook for 'general' category: +\glsdefpostlink{general}{\glsxtrpostlinkAddDescOnFirstUse} +% define entries: +\newglossaryentry{sample}{name={sample},description={an example}} +\newabbreviation{html}{HTML}{hypertext markup language} +\newacronym{nasa}{NASA}{National Aeronautics and Space Administration} +\begin{document} + First use: \gls{sample}, \gls{html}, \gls{nasa}. + +Next use: \gls{sample}, \gls{html}, \gls{nasa}. + +\printunsrtglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example097.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example097.pdf new file mode 100644 index 0000000000..28a941ae93 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example097.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example097.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example097.png new file mode 100644 index 0000000000..12259d1bb8 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example097.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example097.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example097.tex new file mode 100644 index 0000000000..ee0aee587e --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example097.tex @@ -0,0 +1,36 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 97 Link text styles: outer, middle, inner, hyperlinks and post-link hooks (custom and abbreviation style) +% arara: pdflatex +% arara: pdfcrop +\documentclass[14pt]{extarticle} +\pagestyle{empty} + \usepackage{courier} +\usepackage[T1]{fontenc} +\usepackage{xcolor} +\usepackage{soul} +\usepackage[colorlinks]{hyperref} +\usepackage[nogroupskip]{glossaries-extra} +% outer formatting: +\renewcommand{\glstextformat}[1]{\texttt{#1}} +% middle formatting: +\renewcommand{\glsxtrregularfont}[1]{\textbf{#1}} +\renewcommand{\glsxtrabbreviationfont}[1]{\textit{#1}} +% inner formatting: +\renewcommand{\glsxtrdefaultentrytextfmt}[1]{\hl{#1}} +% post-link hook for 'general' category: +\glsdefpostlink{general}{\glsxtrifwasfirstuse{ (\glsentrydesc{\glslabel})}{}} +% this style sets the post-link hook for 'abbreviation' category: +\setabbreviationstyle{long-postshort-user} +% this style sets the post-link hook for 'acronym' category: +\setabbreviationstyle[acronym]{short-postfootnote} +% define entries: +\newglossaryentry{sample}{name={sample},description={an example}} +\newabbreviation{html}{HTML}{hypertext markup language} +\newacronym{nasa}{NASA}{National Aeronautics and Space Administration} +\begin{document} + First use: \gls{sample}, \gls{html}, \gls{nasa}. + +Next use: \gls{sample}, \gls{html}, \gls{nasa}. + +\printunsrtglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example098.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example098.pdf new file mode 100644 index 0000000000..f26e9105a0 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example098.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example098.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example098.png new file mode 100644 index 0000000000..8dd7af1a4f Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example098.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example098.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example098.tex new file mode 100644 index 0000000000..861abe452f --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example098.tex @@ -0,0 +1,18 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 98 Changing the outer text format +% arara: pdflatex +% arara: pdfcrop +\documentclass[12pt]{article} +\pagestyle{empty} +\usepackage[colorlinks]{hyperref} +\usepackage{glossaries-extra} +\glsdefpostlink{general}{ (\glsentrydesc{\glslabel})} +\newglossaryentry{sample}{name={sample},description={an example}} +\newcommand{\strong}[1]{\textbf{\color{green}#1}} \renewcommand{\glstextformat}[1]{\emph{#1}} +\begin{document} +\gls{sample}[-insert]. \strong{\gls{sample}[-insert]}. + +\glssetcategoryattribute{general}{textformat}{strong} \gls{sample}[-insert]. \gls[hyperoutside=false]{sample}[-insert]. + +\gls[textformat=textsf]{sample}[-insert]. +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example099.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example099.pdf new file mode 100644 index 0000000000..4fa00c00bc Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example099.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example099.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example099.png new file mode 100644 index 0000000000..52e9fe57db Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example099.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example099.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example099.tex new file mode 100644 index 0000000000..eb576a0b9c --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example099.tex @@ -0,0 +1,10 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 99 Middle formatting +% arara: pdflatex +% arara: pdfcrop +\documentclass[12pt]{article} +\pagestyle{empty} +\usepackage{glossaries-extra} \newglossaryentry{sample}{name={sample},description={an example}} \newabbreviation{html}{HTML}{hypertext markup language} \newacronym{radar}{radar}{radio detection and ranging} \renewcommand{\glsxtrregularfont}[1]{\emph{#1}} \renewcommand{\glsxtrabbreviationfont}[1]{\textbf{#1}} +\begin{document} +\gls{sample}, \gls{html}, \gls{radar}. +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example100.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example100.pdf new file mode 100644 index 0000000000..6c77f964a7 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example100.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example100.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example100.png new file mode 100644 index 0000000000..e009eb0a4e Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example100.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example100.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example100.tex new file mode 100644 index 0000000000..a202be71b8 --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example100.tex @@ -0,0 +1,20 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 100 Inner formatting +% arara: pdflatex +% arara: pdfcrop +\documentclass[12pt]{article} +\pagestyle{empty} +% requires glossaries.sty v4.50+ and mfirstuc v2.08+ + \usepackage{soul} +\usepackage{glossaries-extra} +\renewcommand{\glssentencecase}[1]{\MFUsentencecase{#1}} +\newacronym{radar}{radar}{radio detection and ranging} +\begin{document} +\Gls[innertextformat=fbox]{radar}['s] system\ldots + +\Gls[innertextformat=so]{radar}['s] system\ldots + +\fbox{\Gls{radar}['s]} system\ldots + +\so{\mbox{\Gls{radar}['s]}} system\ldots +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example101.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example101.pdf new file mode 100644 index 0000000000..497f724633 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example101.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example101.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example101.png new file mode 100644 index 0000000000..9ffa50f3a6 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example101.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example101.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example101.tex new file mode 100644 index 0000000000..b95fb5061c --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example101.tex @@ -0,0 +1,12 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 101 Category post-link hook +% arara: pdflatex +% arara: pdfcrop +\documentclass[12pt]{article} +\pagestyle{empty} +\usepackage{glossaries-extra} +\glsdefpostlink{general}{*} +\newglossaryentry{sample}{name={sample},symbol={X},description={an example}} +\begin{document} +\Gls{sample}, \glstext{sample}, \glsdesc{sample} and \glssymbol{sample}. +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example102.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example102.pdf new file mode 100644 index 0000000000..b556aec09e Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example102.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example102.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example102.png new file mode 100644 index 0000000000..999117474e Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example102.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example102.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example102.tex new file mode 100644 index 0000000000..96f0e2fe6c --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example102.tex @@ -0,0 +1,12 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 102 Category post-link hook with punctuation lookahead +% arara: pdflatex +% arara: pdfcrop +\documentclass[12pt]{article} +\pagestyle{empty} +\usepackage{glossaries-extra} +\glsdefpostlink{general}{\glsxtrdopostpunc{*}} +\newglossaryentry{sample}{name={sample},symbol={X},description={an example}} +\begin{document} +\Gls{sample}, \glstext{sample}, (\glsdesc{sample}) and \glssymbol{sample}. +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example103.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example103.pdf new file mode 100644 index 0000000000..b46d86bdab Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example103.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example103.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example103.png new file mode 100644 index 0000000000..6f0556fc2c Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example103.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example103.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example103.tex new file mode 100644 index 0000000000..9dfbd82717 --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example103.tex @@ -0,0 +1,20 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 103 Category post-link hooks +% arara: pdflatex +% arara: pdfcrop +\documentclass[12pt]{article} +\pagestyle{empty} +\usepackage{glossaries-extra} +\glsdefpostlink{general}{\glsxtrpostlinkAddDescOnFirstUse} +\glsdefpostlink{symbol}{\glsxtrpostlinkAddSymbolOnFirstUse} +\glsdefpostlink{number}{\glsxtrpostlinkAddSymbolDescOnFirstUse} +\newglossaryentry{sample}{name={sample},description={an example}} +\newglossaryentry{alpha}{name={alpha},symbol={\ensuremath{\alpha}}, +description={a symbol},category={symbol}} +\newglossaryentry{pi}{name={pi},symbol={\ensuremath{\pi}}, +description={a constant},category={number}} +\begin{document} +First use: \gls{sample}, \gls{alpha}, \gls{pi}. + +Next use: \gls{sample}, \gls{alpha}, \gls{pi}. +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example104.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example104.pdf new file mode 100644 index 0000000000..97d66ae96c Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example104.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example104.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example104.png new file mode 100644 index 0000000000..5df4885507 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example104.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example104.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example104.tex new file mode 100644 index 0000000000..9981b7f2cf --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example104.tex @@ -0,0 +1,17 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 104 Location list ordering (makeindex) +% arara: pdflatex +% arara: makeglossaries +% arara: pdflatex +% arara: pdfcrop +\documentclass[12pt]{article} +\pagestyle{empty} +\usepackage{glossaries-extra} +\makeglossaries +\newglossaryentry{sample}{name={sample},description={an example}} +\begin{document} +\gls[thevalue=Z]{sample} (Z), \gls[thevalue=4]{sample} (4), +\gls[thevalue=xi]{sample} (xi), \gls[thevalue=2]{sample} (2), +\gls[thevalue=iii]{sample} (iii), \gls[thevalue=A]{sample} (A). +\printglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example105.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example105.pdf new file mode 100644 index 0000000000..de5530e488 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example105.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example105.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example105.png new file mode 100644 index 0000000000..555fe901a9 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example105.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example105.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example105.tex new file mode 100644 index 0000000000..8ae4cbc4e5 --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example105.tex @@ -0,0 +1,21 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 105 Location list ordering (bib2gls) +% arara: pdflatex +% arara: bib2gls +% arara: pdflatex +% arara: pdfcrop +\documentclass[12pt]{article} +\pagestyle{empty} +\begin{filecontents*}{\jobname.bib} +@entry{sample,name={sample},description={an example}} +\end{filecontents*} +\usepackage[record]{glossaries-extra} +\GlsXtrLoadResources +\begin{document} +\gls[thevalue=Z]{sample} (Z), \gls[thevalue=4]{sample} (4), +\gls[thevalue=xi]{sample} (xi), \gls[thevalue=2]{sample} (2), +\gls[thevalue=iii]{sample} (iii), \gls[thevalue=A]{sample} (A). + + +\printunsrtglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example106.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example106.pdf new file mode 100644 index 0000000000..5c74fefe5f Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example106.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example106.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example106.png new file mode 100644 index 0000000000..f96e1e7bdb Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example106.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example106.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example106.tex new file mode 100644 index 0000000000..58342294e8 --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example106.tex @@ -0,0 +1,32 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 106 Cross-references (autoseeindex=true) +% Label: ex:autoseeindextrue +% arara: pdflatex +% arara: makeglossaries +% arara: pdflatex +% arara: pdfcrop +\documentclass[12pt]{article} +\pagestyle{empty} +\usepackage [colorlinks]{hyperref} +\usepackage [nostyles,stylemods=bookindex,style=bookindex] +{glossaries-extra} +\makeglossaries +\newglossaryentry {pumpkin}{name={pumpkin},description={}} +\newglossaryentry {cucumber}{name={cucumber},description={}} +\newglossaryentry {melon}{name={melon},description={}} +\newglossaryentry {gourd}{name={gourd},description={}, +see={pumpkin,cucumber,melon}} +\newglossaryentry {cucurbit}{name={cucurbit},description={}, +see={gourd}} +\newglossaryentry {courgette}{name={courgette},description={}} +\newglossaryentry {marrow}{name={marrow},description={}, +seealso={courgette}} +\newglossaryentry {zucchini}{name={zucchini},description={}, +alias={courgette}} +\newglossaryentry {broccoli}{name={broccoli},description={}} +\newglossaryentry {cauliflower}{name={cauliflower},description={}, seealso={broccoli}} + +\begin{document} + This document is only discussing \glspl {courgette} (baby \glspl {marrow}, also called a \gls {zucchini}), \glspl {pumpkin} and \glspl {melon}. +\printglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example107.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example107.pdf new file mode 100644 index 0000000000..29dd217845 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example107.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example107.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example107.png new file mode 100644 index 0000000000..9772c6f8e2 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example107.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example107.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example107.tex new file mode 100644 index 0000000000..a72db9adbf --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example107.tex @@ -0,0 +1,32 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 107 Cross-references (autoseeindex=false) +% Label: ex:autoseeindexfalse +% arara: pdflatex +% arara: makeglossaries +% arara: pdflatex +% arara: pdfcrop +\documentclass[12pt]{article} +\pagestyle{empty} +\usepackage [colorlinks]{hyperref} +\usepackage [autoseeindex=false,nostyles,stylemods=bookindex,style=bookindex] +{glossaries-extra} +\makeglossaries +\newglossaryentry {pumpkin}{name={pumpkin},description={}} +\newglossaryentry {cucumber}{name={cucumber},description={}} +\newglossaryentry {melon}{name={melon},description={}} +\newglossaryentry {gourd}{name={gourd},description={}, +see={pumpkin,cucumber,melon}} +\newglossaryentry {cucurbit}{name={cucurbit},description={}, +see={gourd}} +\newglossaryentry {courgette}{name={courgette},description={}} +\newglossaryentry {marrow}{name={marrow},description={}, +seealso={courgette}} +\newglossaryentry {zucchini}{name={zucchini},description={}, +alias={courgette}} +\newglossaryentry {broccoli}{name={broccoli},description={}} +\newglossaryentry {cauliflower}{name={cauliflower},description={}, seealso={broccoli}} + +\begin{document} + This document is only discussing \glspl {courgette} (baby \glspl {marrow}, also called a \gls {zucchini}), \glspl {pumpkin} and \glspl {melon}. +\printglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example108.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example108.pdf new file mode 100644 index 0000000000..ff0b2f0146 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example108.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example108.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example108.png new file mode 100644 index 0000000000..3da47d29f9 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example108.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example108.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example108.tex new file mode 100644 index 0000000000..8d95154d6c --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example108.tex @@ -0,0 +1,34 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 108 Cross-references (autoseeindex=false and post-name hook) +% Label: ex:autoseeindexfalsepostname +% arara: pdflatex +% arara: makeglossaries +% arara: pdflatex +% arara: pdfcrop +\documentclass[12pt]{article} +\pagestyle{empty} +\usepackage [colorlinks]{hyperref} +\usepackage [autoseeindex=false,nostyles, +stylemods=bookindex,style=bookindex]{glossaries-extra} +\makeglossaries +\newglossaryentry {pumpkin}{name={pumpkin},description={}} +\newglossaryentry {cucumber}{name={cucumber},description={}} +\newglossaryentry {melon}{name={melon},description={}} +\newglossaryentry {gourd}{name={gourd},description={}, +see={pumpkin,cucumber,melon}} +\newglossaryentry {cucurbit}{name={cucurbit},description={}, +see={gourd}} +\newglossaryentry {courgette}{name={courgette},description={}} +\newglossaryentry {marrow}{name={marrow},description={}, +seealso={courgette}} +\newglossaryentry {zucchini}{name={zucchini},description={}, +alias={courgette}} +\newglossaryentry {broccoli}{name={broccoli},description={}} +\newglossaryentry {cauliflower}{name={cauliflower},description={}, seealso={broccoli}} +\glsdefpostname {general}{\glsxtrseelists {\glscurrententrylabel }} + +\begin{document} + This document is only discussing \glspl {courgette} (baby \glspl {marrow}, also called a \gls {zucchini}), \glspl {pumpkin} and \glspl {melon}. +\printglossaries + +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example109.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example109.pdf new file mode 100644 index 0000000000..fc03f19639 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example109.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example109.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example109.png new file mode 100644 index 0000000000..3b251a5dfb Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example109.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example109.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example109.tex new file mode 100644 index 0000000000..cb32d5d0aa --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example109.tex @@ -0,0 +1,30 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 109 Cross-references (no see, seealso or alias) +% Label: ex:noxrfields +% arara: pdflatex +% arara: makeglossaries +% arara: pdflatex +% arara: pdfcrop +\documentclass[12pt]{article} +\pagestyle{empty} +\usepackage [colorlinks]{hyperref} +\usepackage [nostyles,stylemods=bookindex,style=bookindex]{glossaries-extra} +\makeglossaries +\newglossaryentry {pumpkin}{name={pumpkin},description={}} +\newglossaryentry {cucumber}{name={cucumber},description={}} +\newglossaryentry {melon}{name={melon},description={}} +\newglossaryentry {gourd}{name={gourd},description={}} +\newglossaryentry {cucurbit}{name={cucurbit},description={}} +\newglossaryentry {courgette}{name={courgette},description={}} +\newglossaryentry {marrow}{name={marrow},description={}} +\newglossaryentry {zucchini}{name={zucchini},description={}} +\newglossaryentry {broccoli}{name={broccoli},description={}} +\newglossaryentry {cauliflower}{name={cauliflower},description={}} +\glssee {gourd}{pumpkin,melon,courgette} +\glssee {zucchini}{courgette} +\GlsXtrSetField {zucchini}{alias}{courgette} + +\begin{document} + This document is only discussing \glspl {courgette} (baby \glspl {marrow}, also called a \gls {zucchini}), \glspl {pumpkin} and \glspl {melon}. +\printglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example110.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example110.pdf new file mode 100644 index 0000000000..28112e2f71 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example110.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example110.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example110.png new file mode 100644 index 0000000000..e781a416cf Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example110.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example110.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example110.tex new file mode 100644 index 0000000000..4320040cfa --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example110.tex @@ -0,0 +1,28 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 110 Cross-references (bib2gls) +% arara: pdflatex +% arara: bib2gls: { group: on } +% arara: pdflatex +% arara: pdfcrop +\documentclass[12pt]{article} +\pagestyle{empty} +\begin{filecontents*}{\jobname.bib} +% Encoding: UTF-8 +@index{pumpkin, name = {pumpkin}} +@index{cucumber, name = {cucumber}} +@index{melon, name = {melon}} +@index{gourd, see = {pumpkin,cucumber,melon}, name = {gourd}} +@index{cucurbit, see = {gourd}, name = {cucurbit}} +@index{courgette, name = {courgette}} +@index{marrow, name = {marrow}, seealso = {courgette}} +@index{zucchini, name = {zucchini}, alias = {courgette}} +@index{broccoli, name = {broccoli}} +@index{cauliflower, name = {cauliflower}, seealso = {broccoli} } +\end{filecontents*} +\usepackage[colorlinks]{hyperref} +\usepackage[record,nostyles,stylemods=bookindex,style=bookindex]{glossaries-extra} +\GlsXtrLoadResources[src=\jobname] +\begin{document} + This document is only discussing \glspl{courgette} (baby \glspl{marrow}, also called a \gls{zucchini}), \glspl{pumpkin} and \glspl{melon}. +\printunsrtglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example111.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example111.pdf new file mode 100644 index 0000000000..8694ba16b1 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example111.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example111.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example111.png new file mode 100644 index 0000000000..fd4a7b1f78 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example111.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example111.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example111.tex new file mode 100644 index 0000000000..97e8318bd3 --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example111.tex @@ -0,0 +1,28 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 111 Cross-references (bib2gls and selection=recorded and deps and see) +% arara: pdflatex +% arara: bib2gls: { group: on } +% arara: pdflatex +% arara: pdfcrop +\documentclass[12pt]{article} +\pagestyle{empty} +\begin{filecontents*}{\jobname.bib} +% Encoding: UTF-8 +@index{pumpkin, name = {pumpkin}} +@index{cucumber, name = {cucumber}} +@index{melon, name = {melon}} +@index{gourd, see = {pumpkin,cucumber,melon}, name = {gourd}} +@index{cucurbit, see = {gourd}, name = {cucurbit}} +@index{courgette, name = {courgette}} +@index{marrow, name = {marrow}, seealso = {courgette}} +@index{zucchini, name = {zucchini}, alias = {courgette}} +@index{broccoli, name = {broccoli}} +@index{cauliflower, name = {cauliflower}, seealso = {broccoli} } +\end{filecontents*} +\usepackage[colorlinks]{hyperref} +\usepackage[record,nostyles,stylemods=bookindex,style=bookindex]{glossaries-extra} +\GlsXtrLoadResources[src=\jobname,selection={recorded and deps and see}] +\begin{document} + This document is only discussing \glspl{courgette} (baby \glspl{marrow}, also called a \gls{zucchini}), \glspl{pumpkin} and \glspl{melon}. +\printunsrtglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example112.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example112.pdf new file mode 100644 index 0000000000..bf8555f1eb Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example112.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example112.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example112.png new file mode 100644 index 0000000000..2b755be66a Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example112.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example112.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example112.tex new file mode 100644 index 0000000000..cbc76b091b --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example112.tex @@ -0,0 +1,28 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 112 Cross-references (bib2gls and selection=recorded and deps and see, prune-xr) +% arara: pdflatex +% arara: bib2gls: { group: on } +% arara: pdflatex +% arara: pdfcrop +\documentclass[12pt]{article} +\pagestyle{empty} +\begin{filecontents*}{\jobname.bib} +% Encoding: UTF-8 +@index{pumpkin, name = {pumpkin}} +@index{cucumber, name = {cucumber}} +@index{melon, name = {melon}} +@index{gourd, see = {pumpkin,cucumber,melon}, name = {gourd}} +@index{cucurbit, see = {gourd}, name = {cucurbit}} +@index{courgette, name = {courgette}} +@index{marrow, name = {marrow}, seealso = {courgette}} +@index{zucchini, name = {zucchini}, alias = {courgette}} +@index{broccoli, name = {broccoli}} +@index{cauliflower, name = {cauliflower}, seealso = {broccoli} } +\end{filecontents*} +\usepackage[colorlinks]{hyperref} +\usepackage[record,nostyles,stylemods=bookindex,style=bookindex]{glossaries-extra} +\GlsXtrLoadResources[src=\jobname,selection={recorded and deps and see},prune-xr] +\begin{document} + This document is only discussing \glspl{courgette} (baby \glspl{marrow}, also called a \gls{zucchini}), \glspl{pumpkin} and \glspl{melon}. +\printunsrtglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example113.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example113.pdf new file mode 100644 index 0000000000..2a5717a9cb Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example113.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example113.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example113.png new file mode 100644 index 0000000000..da4d9ef8bd Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example113.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example113.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example113.tex new file mode 100644 index 0000000000..a7ba18aa7a --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example113.tex @@ -0,0 +1,16 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 113 Resetting the first use flag (\glsreset) +% arara: pdflatex +% arara: pdfcrop +\documentclass[12pt]{article} +\pagestyle{empty} +\usepackage{glossaries-extra} +\newabbreviation{html}{HTML}{hypertext markup language} +\begin{document} +\begin{abstract} + This abstract mentions \gls{html}. + \end{abstract} + Some casual reference to \gls{html}. + \section{Web Pages} + \glsreset{html}This section is all about \gls{html}. +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example114.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example114.pdf new file mode 100644 index 0000000000..c8a38bc592 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example114.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example114.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example114.png new file mode 100644 index 0000000000..a731fd1fae Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example114.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example114.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example114.tex new file mode 100644 index 0000000000..85fec7079f --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example114.tex @@ -0,0 +1,19 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 114 Local unset +% arara: pdflatex +% arara: pdfcrop +\documentclass[12pt]{article} +\pagestyle{empty} +\usepackage{glossaries-extra} +\newabbreviation{html}{HTML}{hypertext markup language} +\begin{document} +{% local scope + \gls[local]{html}. + Used? \ifglsused{html}{Yes}{No}. + }% end scope + + +Used? \ifglsused{html}{Yes}{No}. + +\gls[postunset=none]{html}. Used? \ifglsused{html}{Yes}{No}. +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example115-page1.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example115-page1.png new file mode 100644 index 0000000000..72ac0e36ae Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example115-page1.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example115-page2.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example115-page2.png new file mode 100644 index 0000000000..095500d692 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example115-page2.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example115-page3.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example115-page3.png new file mode 100644 index 0000000000..1d6e991a82 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example115-page3.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example115-page4.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example115-page4.png new file mode 100644 index 0000000000..a29541e8b5 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example115-page4.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example115.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example115.pdf new file mode 100644 index 0000000000..bace3f5381 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example115.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example115.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example115.tex new file mode 100644 index 0000000000..100e99413e --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example115.tex @@ -0,0 +1,29 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 115 Abbreviations with beamer (unset buffering) +% arara: pdflatex +% arara: pdflatex +\documentclass[12pt]{beamer} +\pagestyle{empty} +\usepackage{glossaries-extra} +\newabbreviation{svm}{SVM}{support vector machine} +\newabbreviation{html}{HTML}{hypertext markup language} +\begin{document} +\begin{frame} + \frametitle{Frame 1} + \begin{itemize} + \item \gls{html} and \gls{html} + \end{itemize} + \end{frame} +\GlsXtrStartUnsetBuffering +\GlsXtrUnsetBufferEnableRepeatLocal +\begin{frame} +\GlsXtrResetLocalBuffer + \frametitle{Frame 2} + \begin{itemize} + \item<+-> \gls{svm} and \gls{svm} + \item<+-> \gls{svm} and \gls{html} + \end{itemize} +\end{frame} +\GlsXtrStopUnsetBuffering +\frame{\printunsrtglossaries} +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example116.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example116.pdf new file mode 100644 index 0000000000..dbd6aaa142 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example116.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example116.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example116.png new file mode 100644 index 0000000000..526f2c468b Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example116.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example116.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example116.tex new file mode 100644 index 0000000000..ddcdf0053e --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example116.tex @@ -0,0 +1,21 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 116 Buffering first use unsets with \mbox +% arara: pdflatex +% arara: pdfcrop +\documentclass[12pt]{article} +\pagestyle{empty} +\usepackage[T1]{fontenc} +\usepackage{soul} +\usepackage{glossaries-extra} + + +\newabbreviation{html}{HTML}{hypertext markup language} +\begin{document} +\GlsXtrStartUnsetBuffering +\ul{Some text about \mbox{\gls{html}}. +Next use: \mbox{\gls{html}}.} +\GlsXtrStopUnsetBuffering + + +Next use: \gls{html}. +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example117.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example117.pdf new file mode 100644 index 0000000000..e26d37e7b7 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example117.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example117.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example117.png new file mode 100644 index 0000000000..ba2aee1ee5 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example117.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example117.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example117.tex new file mode 100644 index 0000000000..1252cd3561 --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example117.tex @@ -0,0 +1,38 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 117 Alternatives to buffering +% arara: pdflatex +% arara: pdfcrop +\documentclass[12pt]{article} +\pagestyle{empty} +\usepackage[T1]{fontenc} +\usepackage{soul} +\usepackage{glossaries-extra} + + +\newabbreviation{html}{HTML}{hypertext markup language} +% custom command to expand content before using \ul: + \newrobustcmd{\xpul}[1]{\GlsXtrExpandedFmt{\ul}{#1}} + + +\begin{document} +First approach (inner formatting): +{% scope + \renewcommand{\glsxtrdefaultentrytextfmt}[1]{\ul{#1}}% + \ul{Some text about \protect\gls{html}. + Next use: \protect\gls{html}} +} + + +Next use: \gls{html}. + + +Second approach (middle formatting with expanded link text): +\glsresetall +{% scope + \renewcommand{\glsxtrabbreviationfont}[1]{\xpul{#1}}% + \renewcommand{\glsxtrregularfont}[1]{\xpul{#1}}% + \ul{Some text about \protect\gls{html}. Next use: \gls{html}.} +} + +Next use: \gls{html}. +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example118.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example118.pdf new file mode 100644 index 0000000000..8998770dc4 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example118.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example118.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example118.png new file mode 100644 index 0000000000..b116f8db82 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example118.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example118.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example118.tex new file mode 100644 index 0000000000..6e24c3a7cb --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example118.tex @@ -0,0 +1,38 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 118 Foreign language field encapsulation +% arara: pdflatex +% arara: pdfcrop +\documentclass[12pt]{article} +\pagestyle{empty} +\usepackage[main=british,brazilian,ngerman]{babel} +\usepackage{glossaries-extra} +\setabbreviationstyle{long-short-user} +\newabbreviation +[user1={Associação Brasileria de Normas Técnicas}, +user2={pt-BR} +] +{abnt}{ABNT}{Brazilian National Standards Organization} + + +\newabbreviation +[user1={Deutsches Institut für Normung e.V.}, +user2={de-DE-1996}] +{din}{DIN}{German Institute for Standardization} + + +\newabbreviation{tug}{TUG}{\TeX\ User Group} + + +\renewcommand*{\glsxtruserparen}[2]{% +\glsxtrfullsep{#2}% +\glsxtrparen +{#1% +\ifglshasfield{\glsxtruserfield}{#2}% +{, \emph{\GlsXtrForeignText{#2}{\glscurrentfieldvalue}}}% +{}% +}% +} +\begin{document} + \gls{abnt}, \gls{din}, \gls{tug}. +\printunsrtglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example119.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example119.pdf new file mode 100644 index 0000000000..abcb138537 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example119.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example119.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example119.png new file mode 100644 index 0000000000..134e407961 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example119.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example119.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example119.tex new file mode 100644 index 0000000000..dbe5e81d8d --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example119.tex @@ -0,0 +1,58 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 119 Storing a formatting command in a field +% arara: pdflatex +% arara: makeglossaries +% arara: pdflatex +% arara: pdfcrop +\documentclass[12pt]{article} +\pagestyle{empty} +\usepackage[T1]{fontenc} +\usepackage{amsmath} +\usepackage[colorlinks]{hyperref} +\usepackage[postdot,style=index]{glossaries-extra} + + +\makeglossaries + + +\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}$} +} + +\begin{document} +A \gls{matrix} is denoted \glssymbol{matrix}. +The inverse is denoted \glssymbol{matrixinv}. +\[ +\glsxtrfmt{matrix}{A} +\glsxtrfmt{matrixinv}{A} += +\glssymbol{identitymatrix} +\] +Compare $\glsxtrfmt{matrix}{A}[_0]$ +with $\glsxtrfmt*{matrix}{A}[_0]$. \printglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example120.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example120.pdf new file mode 100644 index 0000000000..ef5df39f80 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example120.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example120.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example120.png new file mode 100644 index 0000000000..bec47ab750 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example120.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example120.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example120.tex new file mode 100644 index 0000000000..a20ad70cc5 --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example120.tex @@ -0,0 +1,25 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 120 Formatting lists contained in field values +% arara: pdflatex +% arara: pdfcrop +\documentclass[12pt]{article} +\pagestyle{empty} +\usepackage[colorlinks]{hyperref} +\usepackage[autoseeindex=false]{glossaries-extra} +\newglossaryentry{example}{name=example,description={}, +see={another1,another2}} +\newglossaryentry{another1}{name={another one},description={}} +\newglossaryentry{another2}{name={another two},description={}} + +\begin{document} +\glsxtrapptocsvfield{example}{animals}{duck} +\glsxtrapptocsvfield{example}{animals}{albatross} +\glsxtrapptocsvfield{example}{animals}{arara} +Animal list: \glsxtrfieldformatcsvlist{example}{animals}. + + +See list: \glsxtrifhasfield{see}{example}{\glsxtrseelist{\glscurrentfieldvalue}}{not set}. + + +\printunsrtglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example121.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example121.pdf new file mode 100644 index 0000000000..9bf95ecff5 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example121.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example121.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example121.png new file mode 100644 index 0000000000..6589261777 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example121.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example121.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example121.tex new file mode 100644 index 0000000000..7f75162810 --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example121.tex @@ -0,0 +1,22 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 121 Entry counting according to category +% arara: pdflatex +% arara: pdflatex +% arara: makeglossaries +% arara: pdflatex +% arara: pdfcrop +\documentclass[12pt]{article} +\pagestyle{empty} +\usepackage[colorlinks]{hyperref} +\usepackage{glossaries-extra} +\makeglossaries +\GlsXtrEnableEntryCounting{abbreviation}{1} +\newabbreviation{css}{CSS}{cascading style sheet} +\newabbreviation{html}{HTML}{hypertext markup language} +\newglossaryentry{sample}{name={sample},description={an example}} + +\begin{document} +First use: \gls{css}, \gls{html} and \gls{sample}. +Next use: \gls{html}. +\printglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example122.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example122.pdf new file mode 100644 index 0000000000..769812e76d Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example122.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example122.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example122.png new file mode 100644 index 0000000000..007de9a19e Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example122.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example122.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example122.tex new file mode 100644 index 0000000000..34af7412bf --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example122.tex @@ -0,0 +1,36 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 122 Entry unit counting (per section) according to category +% arara: pdflatex +% arara: pdflatex +% arara: makeglossaries +% arara: pdflatex +% arara: pdfcrop +\documentclass[12pt]{article} +\pagestyle{empty} +\usepackage[colorlinks]{hyperref} +\usepackage{glossaries-extra} +\GlsXtrEnableEntryUnitCounting{abbreviation}{2}{section} +\makeglossaries +% category=abbreviation: +\newabbreviation{html}{HTML}{hypertext markup language} +\newabbreviation{css}{CSS}{cascading style sheet} +% category=general: +\newglossaryentry{sample}{name={sample},description={an example}} + +\begin{document} +\section{Sample} + +Used once: \gls{html}. + +Used three times: \gls{css} and \gls{css} and \gls{css}. + +Used once: \gls{sample}. + +\section{Another Sample} + +Used once: \gls{css}. + +Used twice: \gls{html} and \gls{html}. + +\printglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example123-page1.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example123-page1.png new file mode 100644 index 0000000000..acc0bb52fd Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example123-page1.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example123-page2.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example123-page2.png new file mode 100644 index 0000000000..d773219fee Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example123-page2.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example123.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example123.pdf new file mode 100644 index 0000000000..b2f69e245f Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example123.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example123.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example123.tex new file mode 100644 index 0000000000..b4dce2def3 --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example123.tex @@ -0,0 +1,35 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 123 Enabling unit counting to hook into hyperlink setting +% arara: pdflatex +% arara: pdflatex +% arara: makeglossaries +% arara: pdflatex +% arara: pdfcrop +\documentclass[12pt]{article} +\pagestyle{empty} +\usepackage[colorlinks]{hyperref} +\usepackage{glossaries-extra} + + +\makeglossaries + + +\GlsXtrEnableEntryUnitCounting{general}{0}{page} + + +\newglossaryentry{sample}{name={sample},description={an example}} + + +\renewcommand*{\glslinkcheckfirsthyperhook}{% + \ifnum\glsentrycurrcount\glslabel>0 + \setupglslink{hyper=false}% + \fi +} +\begin{document} +A \gls{sample} entry. Next use: \gls{sample}. + +\newpage +Next page: \gls{sample}. Again: \gls{sample}. + +\printglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example124.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example124.pdf new file mode 100644 index 0000000000..90c3960088 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example124.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example124.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example124.png new file mode 100644 index 0000000000..7291604f11 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example124.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example124.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example124.tex new file mode 100644 index 0000000000..fab7428ff3 --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example124.tex @@ -0,0 +1,42 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 124 Link counting used to selectively suppress hyperlinks +% arara: pdflatex +% arara: makeglossaries +% arara: pdflatex +% arara: pdfcrop +\documentclass[12pt]{article} +\pagestyle{empty} +\usepackage[colorlinks]{hyperref} +\usepackage{glossaries-extra} + +\makeglossaries + +\renewcommand*{\glslinkpresetkeys}{% + \ifnum\GlsXtrLinkCounterValue{\glslabel}>1 + \setupglslink{hyper=false}% +\fi } + +\GlsXtrEnableLinkCounting{general} + +\newglossaryentry{sample1}{name={sample1},description={an example}} +\newglossaryentry{sample2}{name={sample2},description={another example}} + +\newabbreviation{ex}{ex}{example} + + +\begin{document} +\section{Sample Section} + + +\Gls{sample1}, \gls{sample2} and \gls{ex}. +\Glstext{sample1} and \gls{ex} again. + + +\section{Another Sample Section} + + +\Gls{sample1}, \gls{sample2} and \gls{ex}. + + +\printglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example125.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example125.pdf new file mode 100644 index 0000000000..e3ad2c2a0d Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example125.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example125.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example125.png new file mode 100644 index 0000000000..1115bfa055 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example125.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example125.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example125.tex new file mode 100644 index 0000000000..450451c4ec --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example125.tex @@ -0,0 +1,47 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 125 Multi-entries: hierarchical +% arara: pdflatex +% arara: makeglossaries +% arara: pdflatex +% arara: pdfcrop +\documentclass[12pt]{article} +\pagestyle{empty} +\usepackage[colorlinks]{hyperref} +\usepackage[stylemods=bookindex,style=bookindex]{glossaries-extra} + + +\makeglossaries + + +\newcommand{\latinname}[1]{\emph{#1}} +\glssetcategoriesattributes + {genus,species}{textformat,glossnamefont}{latinname} + + +\setabbreviationstyle[genus]{long-only-short-only-desc} +\newabbreviation + [category={genus},description={}] + {clostridium}{C.}{Clostridium} + + +\newglossaryentry{botulinum}{name={botulinum},category={species}, + description={},parent={clostridium}} +\newglossaryentry{perfringens}{name={perfringens},category={species}, + description={},parent={clostridium}} +\newglossaryentry{tetani}{name={tetani},category={species}, + description={},parent={clostridium}} + + +\multiglossaryentry{cbot}{clostridium,botulinum} +\multiglossaryentry{cperf}{clostridium,perfringens} +\multiglossaryentry{ctet}{clostridium,tetani} + + +\multiglossaryentrysetup{indexothers=false,hyper=allmain} +\begin{document} +First use: \mgls{cbot}, \mgls{cperf}, \mgls{ctet}. + + +Next use: \mgls{cbot}, \mgls{cperf}, \mgls{ctet}. +\printglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example126.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example126.pdf new file mode 100644 index 0000000000..fc17c5aece Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example126.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example126.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example126.png new file mode 100644 index 0000000000..f356257c32 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example126.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example126.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example126.tex new file mode 100644 index 0000000000..b2f609bbd8 --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example126.tex @@ -0,0 +1,47 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 126 Multi-entries: hierarchical with first-use suffix +% arara: pdflatex +% arara: makeglossaries +% arara: pdflatex +% arara: pdfcrop +\documentclass[12pt]{article} +\pagestyle{empty} +\usepackage[colorlinks]{hyperref} +\usepackage[stylemods=bookindex,style=bookindex]{glossaries-extra} + + +\makeglossaries + + +\newcommand{\latinname}[1]{\emph{#1}} +\glssetcategoriesattributes + {genus,species}{textformat,glossnamefont}{latinname} + + +\setabbreviationstyle[genus]{long-only-short-only-desc} +\newabbreviation + [category={genus},description={}] + {clostridium}{C.}{Clostridium} + + +\newglossaryentry{botulinum}{name={botulinum},category={species}, + description={},parent={clostridium}} +\newglossaryentry{perfringens}{name={perfringens},category={species}, + description={},parent={clostridium}} +\newglossaryentry{tetani}{name={tetani},category={species}, + description={},parent={clostridium}} + + +\multiglossaryentry[firstsuffix=botulism]{cbot}{clostridium,botulinum} +\multiglossaryentry[firstsuffix=gas gangrene]{cperf}{clostridium,perfringens} +\multiglossaryentry[firstsuffix=tetanus]{ctet}{clostridium,tetani} + + +\multiglossaryentrysetup{indexothers=false,hyper=allmain} +\begin{document} +First use: \mgls{cbot}, \mgls{cperf}, \mgls{ctet}. + + +Next use: \mgls{cbot}, \mgls{cperf}, \mgls{ctet}. +\printglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example127.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example127.pdf new file mode 100644 index 0000000000..083a1b7be2 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example127.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example127.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example127.png new file mode 100644 index 0000000000..5e80a30e8f Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example127.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example127.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example127.tex new file mode 100644 index 0000000000..14675745b0 --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example127.tex @@ -0,0 +1,56 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 127 Multi-entries: hierarchical with category suffix +% arara: pdflatex +% arara: makeglossaries +% arara: pdflatex +% arara: pdfcrop +\documentclass[12pt]{article} +\pagestyle{empty} +\usepackage[colorlinks]{hyperref} +\usepackage[stylemods=bookindex,style=bookindex]{glossaries-extra} + + +\makeglossaries + + +\newcommand{\latinname}[1]{\emph{#1}} +\glssetcategoriesattributes + {genus,species}{textformat,glossnamefont}{latinname} + + +\setabbreviationstyle[genus]{long-only-short-only-desc} +\newabbreviation + [category={genus},description={}] + {clostridium}{C.}{Clostridium} + + +\newglossaryentry{botulinum}{name={botulinum},category={species}, + user1={botulism}, + description={},parent={clostridium}} +\newglossaryentry{perfringens}{name={perfringens},category={species}, + user1={gas gangrene}, + description={},parent={clostridium}} +\newglossaryentry{tetani}{name={tetani},category={species}, + user1={tetanus}, + description={},parent={clostridium}} + + +\mglsdefcategorysuffix{bacteria}{% +\mglsisfirstuse + {\glsxtrifhasfield{useri}{\mglslastelementlabel}{ (\glscurrentfieldvalue)}{}}% + {}% +} + +\multiglossaryentry[category=bacteria]{cbot}{clostridium,botulinum} +\multiglossaryentry[category=bacteria]{cperf}{clostridium,perfringens} +\multiglossaryentry[category=bacteria]{ctet}{clostridium,tetani} + + +\multiglossaryentrysetup{indexothers=false,hyper=allmain} +\begin{document} +First use: \mgls{cbot}, \mgls{cperf}, \mgls{ctet}. + + +Next use: \mgls{cbot}, \mgls{cperf}, \mgls{ctet}. +\printglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example128.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example128.pdf new file mode 100644 index 0000000000..183c2342ad Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example128.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example128.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example128.png new file mode 100644 index 0000000000..8a7d0c138a Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example128.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example128.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example128.tex new file mode 100644 index 0000000000..d5a0d59ee3 --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example128.tex @@ -0,0 +1,55 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 128 Multi-entries: separators +% arara: pdflatex +% arara: makeglossaries +% arara: pdflatex +% arara: pdfcrop +\documentclass[12pt]{article} +\pagestyle{empty} +\usepackage[colorlinks]{hyperref} +\usepackage[stylemods=bookindex,style=bookindex]{glossaries-extra} + +\makeglossaries + +\newcommand{\latinname}[1]{\emph{#1}} +\glssetcategoriesattributes + {genus,species}{textformat,glossnamefont}{latinname} + + +% multi-entry category attributes: +\glssetcategoryattribute{genus}{combinedfirstsepfirst}{\space} +\glssetcategoryattribute{genus}{combinedfirstsep}{\space} +\glssetcategoryattribute{genus}{combinedsepfirst}{~} +\glssetcategoryattribute{genus}{combinedsep}{\relax} + + +\setabbreviationstyle[genus]{long-only-short-only-desc} +\newabbreviation + [category={genus},description={}] + {clostridium}{C.}{Clostridium} + +\setabbreviationstyle[species]{long-only-short-only-desc} + + +\newabbreviation[category={species}, + description={},parent={clostridium}]{botulinum}{bot.}{botulinum} +\newabbreviation[category={species}, + description={},parent={clostridium}]{perfringens}{per.}{perfringens} +\newabbreviation[category={species}, + description={},parent={clostridium}]{tetani}{tet.}{tetani} +\glssetcategoriesattributes{species}{discardperiod,retainfirstuseperiod}{true} + + +\multiglossaryentry{cbot}{clostridium,botulinum} +\multiglossaryentry{cperf}{clostridium,perfringens} +\multiglossaryentry{ctet}{clostridium,tetani} + + +\multiglossaryentrysetup{indexothers=false,hyper=allmain} +\begin{document} +First use: \mgls{cbot}, \mgls{cperf}, \mgls{ctet}. + + +Next use: \mgls{cbot}, \mgls{cperf}, \mgls{ctet}. +\printglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example129.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example129.pdf new file mode 100644 index 0000000000..d6c8dd0ec2 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example129.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example129.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example129.png new file mode 100644 index 0000000000..327487e2a4 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example129.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example129.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example129.tex new file mode 100644 index 0000000000..c26ad44ecb --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example129.tex @@ -0,0 +1,38 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 129 Multi-entries: skipping elements +% arara: pdflatex +% arara: makeglossaries +% arara: pdflatex +% arara: pdfcrop +\documentclass[12pt]{article} +\pagestyle{empty} +\usepackage[colorlinks]{hyperref} \usepackage[stylemods,style=long]{glossaries-extra} + +\makeglossaries + +\setabbreviationstyle{long-short-sc} \newabbreviation{ssi}{ssi}{server-side includes} \newabbreviation{html}{html}{hypertext markup language} + +\setabbreviationstyle[combinedabbrv]{long-only-short-sc-only} \newabbreviation [category={combinedabbrv}, description={\glsxtrshort{ssi} enabled \glsxtrshort{html}}] {shtml-frag}{shtml}{enabled} + +\glssetcategoryattribute{combinedabbrv}{multioptions} + {usedskipothers,firstsuffix={\glsxtrshort{\mglslastmainlabel}}} + + +\multiglossaryentry [category=combinedabbrv] {shtml}[shtml-frag]{ssi,shtml-frag,html} +\begin{document} +Individual elements first use: \gls{ssi} and \gls{html}. + +Individual elements next use: \gls{ssi} and \gls{html}. + +Multi-entry first use: \mgls{shtml}. + +Multi-entry next use: \mgls{shtml}. + +Resetting all\glsresetall\mglsreset{shtml}: + +Multi-entry first use: \mgls{shtml}. + +Multi-entry next use: \mgls{shtml}. + +Individual elements: \gls{ssi} and \gls{html}. \printglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example130.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example130.pdf new file mode 100644 index 0000000000..303e001567 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example130.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example130.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example130.png new file mode 100644 index 0000000000..7fce74fd70 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example130.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example130.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example130.tex new file mode 100644 index 0000000000..74f480535f --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example130.tex @@ -0,0 +1,54 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 130 Multi-entries: skipping elements (unsetting others) +% arara: pdflatex +% arara: makeglossaries +% arara: pdflatex +% arara: pdfcrop +\documentclass[12pt]{article} +\pagestyle{empty} +\usepackage[colorlinks]{hyperref} +\usepackage[stylemods,style=long]{glossaries-extra} + +\makeglossaries + + +\setabbreviationstyle{long-short-sc} +\newabbreviation{ssi}{ssi}{server-side includes} +\newabbreviation{html}{html}{hypertext markup language} + +\setabbreviationstyle[combinedabbrv]{long-only-short-sc-only} +\newabbreviation + [category={combinedabbrv}, + description={\glsxtrshort{ssi} enabled \glsxtrshort{html}}] + {shtml-frag}{shtml}{enabled} + +\glssetcategoryattribute{combinedabbrv}{multioptions} + {% + hyper={notmainfirst}, + mglsopts={presetlocal,unsetothers,others={local}}, + usedskipothers={,} + firstsuffix={{}}{\glsxtrshort{\mglslastmainlabel}} +} + + +\multiglossaryentry + [category=combinedabbrv] + {shtml}[shtml-frag]{ssi,shtml-frag,html} +\begin{document} +Individual elements first use: \gls{ssi} and \gls{html}. + +Individual elements next use: \gls{ssi} and \gls{html}. + +Multi-entry first use: \mgls{shtml}. + +Multi-entry next use: \mgls{shtml}. + +Resetting all\glsresetall\mglsreset{shtml}: + +Multi-entry first use: \mgls{shtml}. + +Multi-entry next use: \mgls{shtml}. + +Individual elements: \gls{ssi} and \gls{html}. +\printglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example131.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example131.pdf new file mode 100644 index 0000000000..b5bab2ba80 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example131.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example131.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example131.png new file mode 100644 index 0000000000..56055a0011 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example131.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example131.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example131.tex new file mode 100644 index 0000000000..96558df711 --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example131.tex @@ -0,0 +1,85 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 131 Multi-entries: skipping elements (prefix and post-link hooks) +% arara: pdflatex +% arara: makeglossaries +% arara: pdflatex +% arara: pdfcrop +\documentclass[12pt]{article} +\pagestyle{empty} +\usepackage[colorlinks]{hyperref} +\usepackage[stylemods,style=long]{glossaries-extra} + + +\makeglossaries + + +\setabbreviationstyle{long-postshort-sc-user} + + +\newabbreviation{ssi}{ssi}{server-side includes} +\newabbreviation{html}{html}{hypertext markup language} + + +\newrobustcmd{\combinedpre}[1]{\glsps{#1}} +\newrobustcmd{\combinedpost}[1]{\glsps{#1}} + + +\newabbreviation{shtml}{shtml} +{{}\combinedpre{ssi} enabled \combinedpost{html}} + + +\glssetcategoryattribute{combinedabbrv}{multioptions} + {% + mpostlinkelement=main, + usedskipothers + } + + +\multiglossaryentry + [category=combinedabbrv] + {shtml}[shtml]{ssi,shtml,html} + + +\mglsdefcategoryprefix{combinedabbrv}{% + \renewcommand{\combinedpre}[1]{\ignorespaces}% + \renewcommand{\combinedpost}[1]{\unskip}% +} +\begin{document} +Individual elements first use: \gls{ssi} and \gls{html}. + + +Individual elements next use: \gls{ssi} and \gls{html}. + + +Multi-entry first use: \mgls{shtml}. + + +Multi-entry next use: \mgls{shtml}. + + +Individual entry first use: \gls{shtml}. + + +Resetting all\glsresetall\mglsresetall: + + +Multi-entry first use: \mgls{shtml}. + + +Multi-entry next use: \mgls{shtml}. + + +Individual elements: \gls{ssi} and \gls{html}. + + +Resetting all\glsresetall\mglsresetall: + + +Individual entry first use: \gls{shtml}. + + +Multi-entry first use: \mgls{shtml}. (Wrong!) + + +\printglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example132.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example132.pdf new file mode 100644 index 0000000000..bcb52e03b3 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example132.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example132.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example132.png new file mode 100644 index 0000000000..bb1e65c2cd Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example132.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example132.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example132.tex new file mode 100644 index 0000000000..01e7913afa --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example132.tex @@ -0,0 +1,19 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 132 Changing the target prefix +% arara: pdflatex +% arara: pdfcrop +\documentclass[12pt]{article} +\pagestyle{empty} +\usepackage[colorlinks]{hyperref} +\usepackage[showtargets=annoteleft,style=tree]{glossaries-extra} +\newglossaryentry{sample}{name={sample}, + description={an example description that references \gls{another}}} +\newglossaryentry{another}{name={another}, + description={some other example description that references \gls{sample}}} +\begin{document} +Link to glossary 1: \gls{sample}. + +Link to glossary 2: \gls[prefix={other-}]{sample}. +\printunsrtglossary +\printunsrtglossary[prefix=other-] +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example133.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example133.pdf new file mode 100644 index 0000000000..4f4ec3e03e Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example133.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example133.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example133.png new file mode 100644 index 0000000000..bddb94d7ab Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example133.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example133.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example133.tex new file mode 100644 index 0000000000..e778d38b79 --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example133.tex @@ -0,0 +1,19 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 133 Prepending to the target prefix for just the entry item +% arara: pdflatex +% arara: pdfcrop +\documentclass[12pt]{article} +\pagestyle{empty} +\usepackage[colorlinks]{hyperref} +\usepackage[showtargets=annoteleft,style=tree]{glossaries-extra} +\newglossaryentry{sample}{name={sample}, + description={an example description that references \gls{another}}} +\newglossaryentry{another}{name={another}, + description={some other example description that references \gls{sample}}} +\begin{document} +Link to glossary 1: \gls{sample}. + +Link to glossary 2: \gls[prefix={other-glo:}]{sample}. +\printunsrtglossary +\printunsrtglossary[targetnameprefix=other-] +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example134.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example134.pdf new file mode 100644 index 0000000000..68ac2c3fa7 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example134.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example134.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example134.png new file mode 100644 index 0000000000..2c31dec65c Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example134.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example134.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example134.tex new file mode 100644 index 0000000000..606781b6ab --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example134.tex @@ -0,0 +1,13 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 134 Displaying unsorted glossaries +% arara: pdflatex +% arara: pdfcrop +\documentclass[12pt]{article} +\pagestyle{empty} +\usepackage[style=treegroup]{glossaries-extra} +\newglossaryentry{ant}{name={ant},description={}} +\newglossaryentry{gazelle}{name={gazelle},description={}} + +\begin{document} +\printunsrtglossary +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example135.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example135.pdf new file mode 100644 index 0000000000..4d3ac7b1db Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example135.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example135.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example135.png new file mode 100644 index 0000000000..d343575e7f Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example135.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example135.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example135.tex new file mode 100644 index 0000000000..fded851f16 --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example135.tex @@ -0,0 +1,13 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 135 Displaying unsorted glossaries with stylemods +% arara: pdflatex +% arara: pdfcrop +\documentclass[12pt]{article} +\pagestyle{empty} +\usepackage[stylemods,style=treegroup]{glossaries-extra} +\newglossaryentry{ant}{name={ant},description={}} +\newglossaryentry{gazelle}{name={gazelle},description={}} + +\begin{document} +\printunsrtglossary +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example136.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example136.pdf new file mode 100644 index 0000000000..d5c2d76d9d Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example136.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example136.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example136.png new file mode 100644 index 0000000000..c3153aba47 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example136.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example136.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example136.tex new file mode 100644 index 0000000000..1f4ffb0242 --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example136.tex @@ -0,0 +1,17 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 136 Displaying unsorted glossaries with different group settings +% arara: pdflatex +% arara: pdfcrop +\documentclass[12pt]{article} +\pagestyle{empty} +\usepackage[stylemods,style=treegroup]{glossaries-extra} +\newglossaryentry{ant}{name={ant},description={}} +\newglossaryentry{gazelle}{name={gazelle},description={}} + +\begin{document} +\twocolumn\printunsrtglossary[title={Glossary 1}] +\glsxtrnoidxgroups +\printunsrtglossary[title={Glossary 2}] +\newpage \printunsrtglossary[groups=false,title={Glossary 3}] +\printunsrtglossary[style=tree,nogroupskip,title={Glossary 4}] +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example137.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example137.pdf new file mode 100644 index 0000000000..15eedea6a1 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example137.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example137.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example137.png new file mode 100644 index 0000000000..3d5004fc07 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example137.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example137.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example137.tex new file mode 100644 index 0000000000..66afb492d3 --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example137.tex @@ -0,0 +1,27 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 137 Displaying unsorted glossaries with a copied list +% arara: pdflatex +% arara: pdfcrop +\documentclass[12pt]{article} +\pagestyle{empty} +\usepackage[stylemods=bookindex,style=bookindex]{glossaries-extra} +\newglossaryentry{waterfowl}{name={waterfowl},description={}} +\newglossaryentry{ant}{name={ant},description={}} +\newglossaryentry{adder}{name={adder},description={}} +\newglossaryentry{duck}{name={duck},parent={waterfowl},description={}} +\newglossaryentry{zebra}{name={zebra},description={}} +\newglossaryentry{aardvark}{name={aardvark},description={}} +\newglossaryentry{gazelle}{name={gazelle},description={}} +\newglossaryentry{mallard}{name={mallard},parent={duck},description={}} + + +\newglossary*{another}{Another Glossary} +\glsxtrcopytoglossary{mallard}{another} +\glsxtrcopytoglossary{aardvark}{another} +\glsxtrcopytoglossary{zebra}{another} +\glsxtrcopytoglossary{ant}{another} +\glsxtrcopytoglossary{duck}{another} +\begin{document} +\printunsrtglossary +\printunsrtglossary[type=another] +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example138.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example138.pdf new file mode 100644 index 0000000000..b05e385be9 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example138.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example138.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example138.png new file mode 100644 index 0000000000..34cef766a0 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example138.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example138.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example138.tex new file mode 100644 index 0000000000..cae7f406e3 --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example138.tex @@ -0,0 +1,48 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 138 Displaying unsorted glossaries with custom groups +% arara: pdflatex +% arara: pdfcrop +\documentclass[12pt]{article} +\pagestyle{empty} +\usepackage[record,stylemods=bookindex,style=bookindex]{glossaries-extra} + + +\glsxtrsetgrouptitle{group1label}{Group 1} +\glsxtrsetgrouptitle{group2label}{Group 2} +\glsxtrsetgrouptitle{group3label}{Group 3} +\glsxtrsetgrouptitle{group4label}{Group 4} + + +\newglossaryentry{waterfowl}{name={waterfowl},description={}, + group={group1label}} +\newglossaryentry{ant}{name={ant},description={}, + group={group1label}} +\GlsXtrSetField{ant}{secondarygroup}{group4label} +\newglossaryentry{adder}{name={adder},description={}, + group={group2label}} +\newglossaryentry{duck}{name={duck},parent={waterfowl}, + description={},group={group4label}} +\GlsXtrSetField{duck}{secondarygroup}{group2label} +\newglossaryentry{zebra}{name={zebra},description={}, + group={group2label}} +\GlsXtrSetField{zebra}{secondarygroup}{group3label} +\newglossaryentry{aardvark}{name={aardvark},description={}, + group={group2label}} +\GlsXtrSetField{aardvark}{secondarygroup}{group1label} +\newglossaryentry{gazelle}{name={gazelle},description={}, + group={group1label}} +\newglossaryentry{mallard}{name={mallard},parent={duck}, + description={},group={group2label}} \GlsXtrSetField{mallard}{secondarygroup}{group3label} + + +\newglossary*{another}{Another Glossary} +\glsxtrcopytoglossary{mallard}{another} +\glsxtrcopytoglossary{aardvark}{another} +\glsxtrcopytoglossary{zebra}{another} +\glsxtrcopytoglossary{ant}{another} +\glsxtrcopytoglossary{duck}{another} +\setglossarypreamble[another]{\renewcommand{\glsxtrgroupfield}{secondarygroup}} +\begin{document} +\printunsrtglossary +\printunsrtglossary[type=another] +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example139.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example139.pdf new file mode 100644 index 0000000000..63625902b9 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example139.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example139.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example139.png new file mode 100644 index 0000000000..e42fbd5533 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example139.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example139.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example139.tex new file mode 100644 index 0000000000..e1c6126b29 --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example139.tex @@ -0,0 +1,52 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 139 Displaying unsorted glossaries with custom groups and sub-group headings +% arara: pdflatex +% arara: pdfcrop +\documentclass[12pt]{article} +\pagestyle{empty} +\usepackage[record,stylemods=bookindex,style=bookindex]{glossaries-extra} + + +\glsxtrsetgrouptitle{group1label}{Group 1} +\glsxtrsetgrouptitle{group2label}{Group 2} +\glsxtrsetgrouptitle{group3label}{Group 3} +\glsxtrsetgrouptitle{group4label}{Group 4} + + +\newglossaryentry{waterfowl}{name={waterfowl},description={}, + group={group1label}} +\newglossaryentry{ant}{name={ant},description={}, + group={group1label}} +\GlsXtrSetField{ant}{secondarygroup}{group4label} +\newglossaryentry{adder}{name={adder},description={}, + group={group2label}} +\newglossaryentry{duck}{name={duck},parent={waterfowl}, + description={},group={group4label}} +\GlsXtrSetField{duck}{secondarygroup}{group2label} +\newglossaryentry{zebra}{name={zebra},description={}, + group={group2label}} +\GlsXtrSetField{zebra}{secondarygroup}{group3label} +\newglossaryentry{aardvark}{name={aardvark},description={}, + group={group2label}} +\GlsXtrSetField{aardvark}{secondarygroup}{group1label} +\newglossaryentry{gazelle}{name={gazelle},description={}, + group={group1label}} +\newglossaryentry{mallard}{name={mallard},parent={duck}, + description={},group={group2label}} \GlsXtrSetField{mallard}{secondarygroup}{group3label} + + +\newglossary*{another}{Another Glossary} +\glsxtrcopytoglossary{mallard}{another} +\glsxtrcopytoglossary{aardvark}{another} +\glsxtrcopytoglossary{zebra}{another} +\glsxtrcopytoglossary{ant}{another} +\glsxtrcopytoglossary{duck}{another} +\setglossarypreamble[another]{\renewcommand{\glsxtrgroupfield}{secondarygroup}} +\begin{document} +\renewcommand*{\glsxtraddgroup}[2]{#2} +\printunsrtglossary +\renewcommand*{\glsxtraddgroup}[2]{% + \ifnum\glscurrententrylevel<2 #2\fi +} +\printunsrtglossary[type=another] +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example140.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example140.pdf new file mode 100644 index 0000000000..5c56d9a144 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example140.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example140.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example140.png new file mode 100644 index 0000000000..c86fdc80de Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example140.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example140.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example140.tex new file mode 100644 index 0000000000..498c5b9451 --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example140.tex @@ -0,0 +1,31 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 140 Displaying sorted glossaries with groups using bib2gls +% arara: pdflatex +% arara: bib2gls: { group: on } +% arara: pdflatex +% arara: pdfcrop +\documentclass[12pt]{article} +\pagestyle{empty} +\begin{filecontents*}{animalfamilies.bib} +@index{waterfowl,user1={Anseriformes}} +@index{ant,user1={Formicidae}} +@index{adder,user1={Vipera berus}} +@index{duck,parent={waterfowl},user1={Anatidae}} +@index{zebra,user1={Hippotigris}} +@index{aardvark,user1={Orycteropus afer}} +@index{gazelle,user1={Gazella}} +@index{mallard,parent={duck},user1={Anas platyrhynchos}} +\end{filecontents*} +\usepackage[record,stylemods=bookindex,style=bookindex]{glossaries-extra} +\newglossary*{another}{Another Glossary} +\GlsXtrLoadResources[selection=all,% select all entries + src={animalfamilies},% identify bib file(s) + sort=en-GB,% sort method + secondary={la:user1:another}% sort again and copy to `another' + ] +\glsdefpostname{index}{ + (\emph{\glsentryuseri{\glscurrententrylabel}})} +\begin{document} +\printunsrtglossary +\printunsrtglossary[type=another] +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example141.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example141.pdf new file mode 100644 index 0000000000..823e463068 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example141.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example141.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example141.png new file mode 100644 index 0000000000..b5e311f9e0 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example141.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example141.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example141.tex new file mode 100644 index 0000000000..a71ff91a3f --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example141.tex @@ -0,0 +1,19 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 141 Filtering by category +% arara: pdflatex +% arara: pdfcrop +\documentclass[12pt]{article} +\pagestyle{empty} +\usepackage[style=index]{glossaries-extra} + \newglossaryentry{ant}{name={ant},description={}} + \newglossaryentry{pi}{name={\ensuremath{\pi}},description={}, + category={symbol}} +\newglossaryentry{aardvark}{name={aardvark},description={}} +\begin{document} +\renewcommand{\printunsrtglossaryentryprocesshook}[1]{% + \glsifcategory{#1}{symbol}% + {\printunsrtglossaryskipentry}% + {}% + } +\printunsrtglossary +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example142.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example142.pdf new file mode 100644 index 0000000000..b77baf12c6 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example142.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example142.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example142.png new file mode 100644 index 0000000000..9d15c50305 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example142.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example142.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example142.tex new file mode 100644 index 0000000000..c41f508990 --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example142.tex @@ -0,0 +1,20 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 142 Inner glossaries using printunsrtglossarywrap +% arara: pdflatex +% arara: pdfcrop +\documentclass[12pt]{article} +\pagestyle{empty} +\usepackage{glossaries-extra} +\newglossaryentry{ant}{name={ant},description={}} +\newglossaryentry{bee}{name={bee},description={}} +\newignoredglossary*{other} +\newglossaryentry{duck}{type={other},name={duck},description={}} +\newglossaryentry{goose}{type={other},name={goose},description={}} +\begin{document} +\begin{printunsrtglossarywrap}[style=index] +\glstreeitem First Glossary +\printunsrtinnerglossary[leveloffset=1]{}{} +\glstreeitem Second Glossary +\printunsrtinnerglossary[type=other,leveloffset=1]{}{} +\end{printunsrtglossarywrap} +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example143.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example143.pdf new file mode 100644 index 0000000000..6c30a3675d Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example143.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example143.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example143.png new file mode 100644 index 0000000000..abb54b2f79 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example143.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example143.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example143.tex new file mode 100644 index 0000000000..cfbf372ebe --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example143.tex @@ -0,0 +1,36 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 143 Nested glossaries +% arara: pdflatex +% arara: pdfcrop +\documentclass[12pt]{article} +\pagestyle{empty} +\usepackage{fontawesome} +\usepackage[style=tree]{glossaries-extra} +\newglossaryentry{pictograph}{name={pictograph}, + description={picture or symbol representing a word or phrase}} +\newglossaryentry{mathgreek}{name={Greek symbol}, + description={mathematical constants or functions}} +\newignoredglossary*{pictograph} +\newignoredglossary*{mathgreek} +\newglossaryentry{cut}{type={pictograph}, + name={\faCut}, + description={cut}} +\newglossaryentry{paste}{type={pictograph}, + name={\faPaste}, description={paste}} +\newglossaryentry{alpha}{type={mathgreek}, + name={\ensuremath{\alpha}}, + description={alpha}} +\newglossaryentry{beta}{type={mathgreek}, + name={\ensuremath{\beta}}, + description={beta}} +\begin{document} +\newcommand{\nestedhandler}[1]{% + \glsxtrunsrtdo{#1}% + \ifglossaryexists*{#1}% + {% + \printunsrtinnerglossary[type={#1},leveloffset={++1},groups=false]{}{}% + }% + {}% +} +\printunsrtglossary*{\let\printunsrtglossaryhandler\nestedhandler} +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example144.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example144.pdf new file mode 100644 index 0000000000..58364762bb Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example144.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example144.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example144.png new file mode 100644 index 0000000000..e85380a572 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example144.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example144.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example144.tex new file mode 100644 index 0000000000..ad31c065ee --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example144.tex @@ -0,0 +1,36 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 144 Sub-glossary for a given counter value +% arara: pdflatex +% arara: bib2gls +% arara: pdflatex +% arara: pdfcrop +\documentclass[12pt]{article} +\pagestyle{empty} +\begin{filecontents*}{\jobname.bib} +@symbol{pi,name={\ensuremath{\pi}}, +description={ratio of the length of the circumference of a circle to its diameter}} +@symbol{root2,name={\ensuremath{\surd2}}, +description={Pythagoras' constant}} +@symbol{zeta3,name={\ensuremath{\zeta(3)}}, +description={Ap\'ery's constant}} +@symbol{zero,name={0}, +description={nothing or nil}} +@symbol{one,name={1}, +description={single entity, unity}} +\end{filecontents*} +\usepackage[record,stylemods,style=index]{glossaries-extra} + \GlsXtrRecordCounter{section} + \GlsXtrLoadResources[src={\jobname}, + symbol-sort-fallback=description +] +\begin{document} +\section{Sample} +\printunsrtglossaryunit{section} +This section discusses \gls{pi}, \gls{root2} and \gls{zeta3}. + +\section{Another Sample} +\printunsrtglossaryunit{section} +This section discusses \gls{one}, \gls{pi} and \gls{zero}. + +\printunsrtglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example145.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example145.pdf new file mode 100644 index 0000000000..6c5d11c914 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example145.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example145.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example145.png new file mode 100644 index 0000000000..9b87991c30 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example145.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example145.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example145.tex new file mode 100644 index 0000000000..36f1df0122 --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example145.tex @@ -0,0 +1,48 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 145 Sub-glossary for a given counter value ordered by use in the section +% arara: pdflatex +% arara: bib2gls +% arara: pdflatex +% arara: pdfcrop +\documentclass[12pt]{article} +\pagestyle{empty} +\begin{filecontents*}{\jobname.bib} +@symbol{pi,name={\ensuremath{\pi}}, +description={ratio of the length of the circumference of a circle to its diameter}} +@symbol{root2,name={\ensuremath{\surd2}}, +description={Pythagoras' constant}} +@symbol{zeta3,name={\ensuremath{\zeta(3)}}, +description={Ap\'ery's constant}} +@symbol{zero,name={0}, +description={nothing or nil}} +@symbol{one,name={1}, +description={single entity, unity}} +\end{filecontents*} +\usepackage[record,stylemods,style=index]{glossaries-extra} + \GlsXtrRecordCounter{section} + \GlsXtrLoadResources[src={\jobname}, + symbol-sort-fallback=description +] + +\renewcommand{\glsxtrAddCounterRecordHook}[3]{% + \provideignoredglossary{#2.#3}% + \glsxtrcopytoglossary*{#1}{#2.#3}% +} + +\newcommand{\minigloss}{% + \printunsrtglossary*[type=section.\thesection, + target=false] + {\renewcommand*{\glossarysection}[2][]{}} + \printunsrtglossaryunitpostskip +} +\begin{document} +\section{Sample} +\minigloss +This section discusses \gls{pi}, \gls{root2} and \gls{zeta3}. + +\section{Another Sample} +\minigloss +This section discusses \gls{one}, \gls{pi} and \gls{zero}. + +\printunsrtglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example146.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example146.pdf new file mode 100644 index 0000000000..8887fefe12 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example146.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example146.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example146.png new file mode 100644 index 0000000000..863a32f882 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example146.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example146.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example146.tex new file mode 100644 index 0000000000..a3951e291f --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example146.tex @@ -0,0 +1,18 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 146 The bookindex style +% arara: pdflatex +% arara: bib2gls: { group: on } +% arara: pdflatex +% arara: pdfcrop +\documentclass[12pt]{article} +\pagestyle{empty} +\usepackage[record,nostyles,stylemods=bookindex,style=bookindex]{glossaries-extra} +\GlsXtrLoadResources[src=example-glossaries-xr, + selection={recorded and deps and see not also} +] +\begin{document} +\glsaddeach{lorem,amet,adipiscing,placerat,arcu,vulputate} +\glsaddeach[thevalue=2]{arcu,consectetuer,donec,augue} +\glsaddeach[thevalue=3]{arcu,lorem,nulla} +\printunsrtglossary +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example147.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example147.pdf new file mode 100644 index 0000000000..1d255e0537 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example147.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example147.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example147.png new file mode 100644 index 0000000000..fe03c5aa70 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example147.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example147.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example147.tex new file mode 100644 index 0000000000..b839f01e86 --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example147.tex @@ -0,0 +1,54 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 147 The topic style +% arara: pdflatex +% arara: pdfcrop +\documentclass[12pt]{article} +\pagestyle{empty} +\usepackage{fontawesome} +\usepackage[postdot,stylemods=topic,style=topic]{glossaries-extra} +\newglossaryentry{pictograph}{name={pictograph}, + description={picture or symbol representing a word or phrase}} +\newglossaryentry{copy}{parent={pictograph}, + name={\faCopy}, + description={copy}} +\newglossaryentry{cut}{parent={pictograph}, + name={\faCut}, + description={cut}} +\newglossaryentry{edit}{parent={pictograph}, + name={\faEdit}, description={edit}} \newglossaryentry{paste}{parent={pictograph}, + name={\faPaste}, description={paste}} + +\newglossaryentry{symbols}{name={Symbols}, + description={mathematical constants or functions}} +\newglossaryentry{constant}{parent={symbols}, + name={constant}, + description={a fixed quantity or numerical value}} +\newglossaryentry{pi}{parent={constant}, + name={\ensuremath{\pi}}, + description={ratio of the length of the circumference of a circle to its diameter}} +\newglossaryentry{root2}{parent={constant}, + name={\ensuremath{\surd2}}, + description={Pythagoras' constant}} +\newglossaryentry{function}{parent={symbols}, + name={function}, + description={a rule that assigns a value to every element of the domain}} +\newglossaryentry{cosx}{parent={function}, + name={\ensuremath{\cos(x)}}, + description={cosine}} +\newglossaryentry{lnx}{parent={function}, + name={\ensuremath{\ln(x)}}, + description={natural logarithm}} +\newglossaryentry{parameter}{parent={symbols}, + name={parameter}, + description={a constant or variable that distinguishes a specific form}} +\newglossaryentry{x}{parent={parameter}, + name={\ensuremath{x}}, + description={the abscissa value}} +\newglossaryentry{y}{parent={parameter}, + name={\ensuremath{y}}, + description={the ordinate value}} \newglossaryentry{z}{parent={parameter}, + name={\ensuremath{z}}, + description={the applicate value}} +\begin{document} +\printunsrtglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example148.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example148.pdf new file mode 100644 index 0000000000..42d9147ff3 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example148.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example148.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example148.png new file mode 100644 index 0000000000..4385a555d7 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example148.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example148.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example148.tex new file mode 100644 index 0000000000..1fb75164c5 --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example148.tex @@ -0,0 +1,54 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 148 The topicmcols style +% arara: pdflatex +% arara: pdfcrop +\documentclass[12pt]{article} +\pagestyle{empty} +\usepackage{fontawesome} +\usepackage[postdot,stylemods=topic,style=topicmcols]{glossaries-extra} +\newglossaryentry{pictograph}{name={pictograph}, + description={picture or symbol representing a word or phrase}} +\newglossaryentry{copy}{parent={pictograph}, + name={\faCopy}, + description={copy}} +\newglossaryentry{cut}{parent={pictograph}, + name={\faCut}, + description={cut}} +\newglossaryentry{edit}{parent={pictograph}, + name={\faEdit}, description={edit}} \newglossaryentry{paste}{parent={pictograph}, + name={\faPaste}, description={paste}} + +\newglossaryentry{symbols}{name={Symbols}, + description={mathematical constants or functions}} +\newglossaryentry{constant}{parent={symbols}, + name={constant}, + description={a fixed quantity or numerical value}} +\newglossaryentry{pi}{parent={constant}, + name={\ensuremath{\pi}}, + description={ratio of the length of the circumference of a circle to its diameter}} +\newglossaryentry{root2}{parent={constant}, + name={\ensuremath{\surd2}}, + description={Pythagoras' constant}} +\newglossaryentry{function}{parent={symbols}, + name={function}, + description={a rule that assigns a value to every element of the domain}} +\newglossaryentry{cosx}{parent={function}, + name={\ensuremath{\cos(x)}}, + description={cosine}} +\newglossaryentry{lnx}{parent={function}, + name={\ensuremath{\ln(x)}}, + description={natural logarithm}} +\newglossaryentry{parameter}{parent={symbols}, + name={parameter}, + description={a constant or variable that distinguishes a specific form}} +\newglossaryentry{x}{parent={parameter}, + name={\ensuremath{x}}, + description={the abscissa value}} +\newglossaryentry{y}{parent={parameter}, + name={\ensuremath{y}}, + description={the ordinate value}} \newglossaryentry{z}{parent={parameter}, + name={\ensuremath{z}}, + description={the applicate value}} +\begin{document} +\printunsrtglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example149.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example149.pdf new file mode 100644 index 0000000000..afde316fb5 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example149.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example149.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example149.png new file mode 100644 index 0000000000..a4c978d935 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example149.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example149.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example149.tex new file mode 100644 index 0000000000..187cf336a8 --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example149.tex @@ -0,0 +1,56 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 149 The topicmcols style with the widest name set +% arara: pdflatex +% arara: pdfcrop +\documentclass[12pt]{article} +\pagestyle{empty} +\usepackage{fontawesome} +\usepackage[postdot,stylemods=topic,style=topicmcols]{glossaries-extra} +\newglossaryentry{pictograph}{name={pictograph}, + description={picture or symbol representing a word or phrase}} +\newglossaryentry{copy}{parent={pictograph}, + name={\faCopy}, + description={copy}} +\newglossaryentry{cut}{parent={pictograph}, + name={\faCut}, + description={cut}} +\newglossaryentry{edit}{parent={pictograph}, + name={\faEdit}, description={edit}} \newglossaryentry{paste}{parent={pictograph}, + name={\faPaste}, description={paste}} + +\newglossaryentry{symbols}{name={Symbols}, + description={mathematical constants or functions}} +\newglossaryentry{constant}{parent={symbols}, + name={constant}, + description={a fixed quantity or numerical value}} +\newglossaryentry{pi}{parent={constant}, + name={\ensuremath{\pi}}, + description={ratio of the length of the circumference of a circle to its diameter}} +\newglossaryentry{root2}{parent={constant}, + name={\ensuremath{\surd2}}, + description={Pythagoras' constant}} +\newglossaryentry{function}{parent={symbols}, + name={function}, + description={a rule that assigns a value to every element of the domain}} +\newglossaryentry{cosx}{parent={function}, + name={\ensuremath{\cos(x)}}, + description={cosine}} +\newglossaryentry{lnx}{parent={function}, + name={\ensuremath{\ln(x)}}, + description={natural logarithm}} +\newglossaryentry{parameter}{parent={symbols}, + name={parameter}, + description={a constant or variable that distinguishes a specific form}} +\newglossaryentry{x}{parent={parameter}, + name={\ensuremath{x}}, + description={the abscissa value}} +\newglossaryentry{y}{parent={parameter}, + name={\ensuremath{y}}, + description={the ordinate value}} \newglossaryentry{z}{parent={parameter}, + name={\ensuremath{z}}, + description={the applicate value}} +\glssetwidest[1]{parameter} +\glssetwidest[2]{\glsentryname{cosine}} +\begin{document} +\printunsrtglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example150.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example150.pdf new file mode 100644 index 0000000000..d6f317a541 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example150.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example150.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example150.png new file mode 100644 index 0000000000..60a8af9831 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example150.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example150.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example150.tex new file mode 100644 index 0000000000..f356ede815 --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example150.tex @@ -0,0 +1,27 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 150 Two entries per row with \printunsrttable +% arara: pdflatex +% arara: bib2gls +% arara: pdflatex +% arara: pdfcrop +\documentclass[12pt]{article} +\pagestyle{empty} +\usepackage[record,stylemods=table,subentrycounter]{glossaries-extra} + +\GlsXtrLoadResources[ + % entries in example-glossaries-childnoname.bib: + src=example-glossaries-childnoname, + selection=all, + save-child-count=] + +\begin{document} +\printunsrttable +[ + block-style=name,par=ragged, + preamble={Some preamble text}, + postamble={Some postamble text}, + init={% + \let\glsnamefont\textbf \def\glstablenameheader{Summary}% + } +] +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example151.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example151.pdf new file mode 100644 index 0000000000..d1020a7387 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example151.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example151.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example151.png new file mode 100644 index 0000000000..7b9a544e3c Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example151.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example151.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example151.tex new file mode 100644 index 0000000000..fb5cc6cd7d --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example151.tex @@ -0,0 +1,85 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 151 Using bib2gls: one resource set +% arara: pdflatex +% arara: bib2gls +% arara: pdflatex +% arara: pdfcrop +\documentclass[12pt]{article} +\pagestyle{empty} +\begin{filecontents*}{terms.bib} +@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{filecontents*} +\begin{filecontents*}{abbrvs.bib} +@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} +} + +@abbreviation{xml, + short={xml}, long={extensible markup language}, description={a simple text-base format for representing structured information} } +\end{filecontents*} +\begin{filecontents*}{symbols.bib} +@preamble{"\providecommand{\mtx}[1]{\boldsymbol{#1}}"} + +@symbol{M, + name={\ensuremath{\mtx{M}}}, + description={a matrix} +} + +@symbol{v, + name={\ensuremath{\vec{v}}}, + description={a vector} +} + +@symbol{S, + name={\ensuremath{\mathcal{S}}}, + description={a set} +} +\end{filecontents*} +\usepackage[record]{glossaries-extra} + +\setabbreviationstyle{long-short-sc-desc} + +\GlsXtrLoadResources[src={terms,abbrvs,symbols}] + + +\begin{document} +\gls{bird} + +\gls{shtml} + +\gls{M} + +\printunsrtglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example152.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example152.pdf new file mode 100644 index 0000000000..fa389883d8 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example152.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example152.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example152.png new file mode 100644 index 0000000000..800abcfae2 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example152.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example152.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example152.tex new file mode 100644 index 0000000000..d883276530 --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example152.tex @@ -0,0 +1,85 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 152 Using bib2gls: multiple resource sets +% arara: pdflatex +% arara: bib2gls +% arara: pdflatex +% arara: pdfcrop +\documentclass[12pt]{article} +\pagestyle{empty} +\begin{filecontents*}{terms.bib} +@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{filecontents*} +\begin{filecontents*}{abbrvs.bib} +@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} +} + +@abbreviation{xml, + short={xml}, long={extensible markup language}, description={a simple text-base format for representing structured information} }\end{filecontents*} +\begin{filecontents*}{symbols.bib} +@preamble{"\providecommand{\mtx}[1]{\boldsymbol{#1}}"} + +@symbol{M, + name={\ensuremath{\mtx{M}}}, + description={a matrix} +} + +@symbol{v, + name={\ensuremath{\vec{v}}}, + description={a vector} +} + +@symbol{S, + name={\ensuremath{\mathcal{S}}}, + description={a set} +} +\end{filecontents*} +\usepackage[record,abbreviations,symbols]{glossaries-extra} + +\setabbreviationstyle{long-short-sc-desc} + +\GlsXtrLoadResources[src=terms,sort=en-GB,type=main] + +\GlsXtrLoadResources [src=abbrvs,sort=letter-nocase,type=abbreviations] + +\GlsXtrLoadResources [src=symbols,sort=use,type=symbols] +\begin{document} +\gls{bird} + +\gls{shtml} + +\gls{M} + +\printunsrtglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example153.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example153.pdf new file mode 100644 index 0000000000..da42bb03e2 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example153.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example153.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example153.png new file mode 100644 index 0000000000..df7d07ff64 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example153.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example153.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example153.tex new file mode 100644 index 0000000000..a1b159a344 --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example153.tex @@ -0,0 +1,90 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 153 Using bib2gls: sub-blocks +% arara: pdflatex +% arara: bib2gls: { group: on } +% arara: pdflatex +% arara: pdfcrop +\documentclass[12pt]{article} +\pagestyle{empty} +\begin{filecontents*}{terms.bib} +@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{filecontents*} +\begin{filecontents*}{abbrvs.bib} +@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} +} + +@abbreviation{xml, + short={xml}, long={extensible markup language}, description={a simple text-base format for representing structured information} }\end{filecontents*} +\begin{filecontents*}{symbols.bib} +@preamble{"\providecommand{\mtx}[1]{\boldsymbol{#1}}"} + +@symbol{M, + name={\ensuremath{\mtx{M}}}, + description={a matrix} +} + +@symbol{v, + name={\ensuremath{\vec{v}}}, + description={a vector} +} + +@symbol{S, + name={\ensuremath{\mathcal{S}}}, + description={a set} +} +\end{filecontents*} +\usepackage[record,style=indexgroup]{glossaries-extra} + +\setabbreviationstyle{long-short-sc-desc} + +\GlsXtrLoadResources + [src={abbrvs},sort=letter-nocase,type=main, + group={abbreviations}] +\glsxtrsetgrouptitle{abbreviations}{Abbreviations} + +\GlsXtrLoadResources + [src={symbols},sort=use,type=main,group=symbols] +\glsxtrsetgrouptitle{symbols}{Abbreviations} + +\GlsXtrLoadResources[src={terms},sort=en-GB,type=main] +\begin{document} +\gls{bird} + +\gls{shtml} + +\gls{M} + +\printunsrtglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example154.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example154.pdf new file mode 100644 index 0000000000..c70cc48dc3 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example154.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example154.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example154.png new file mode 100644 index 0000000000..cafa8b3fa0 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example154.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example154.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example154.tex new file mode 100644 index 0000000000..82a639a533 --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example154.tex @@ -0,0 +1,92 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 154 Using bib2gls: record counting +% arara: pdflatex +% arara: bib2gls: { recordcount: on } +% arara: pdflatex +% arara: pdfcrop +\documentclass[12pt]{article} +\pagestyle{empty} +\begin{filecontents*}{terms.bib} +@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{filecontents*} +\begin{filecontents*}{abbrvs.bib} +@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} +} + +@abbreviation{xml, + short={xml}, long={extensible markup language}, description={a simple text-base format for representing structured information} } +\end{filecontents*} +\begin{filecontents*}{symbols.bib} +@preamble{"\providecommand{\mtx}[1]{\boldsymbol{#1}}"} + +@symbol{M, + name={\ensuremath{\mtx{M}}}, + description={a matrix} +} + +@symbol{v, + name={\ensuremath{\vec{v}}}, + description={a vector} +} + +@symbol{S, + name={\ensuremath{\mathcal{S}}}, + description={a set} +} +\end{filecontents*} +\usepackage[colorlinks]{hyperref} +\usepackage[record]{glossaries-extra} + +\newignoredglossary{ignored} +\setabbreviationstyle{long-short-sc-desc} + +\GlsXtrLoadResources[ + src={terms,abbrvs,symbols}, + trigger-type=ignored, + category={same as entry} +] + +\glsxtrenablerecordcount +\GlsXtrSetRecordCountAttribute{symbol,abbreviation}{1} + +\glsdefpostlink{entry}{\glsxtrpostlinkAddDescOnFirstUse} +\glsdefpostlink{symbol}{\glsxtrpostlinkAddDescOnFirstUse} +\begin{document} +\gls{M}, \gls{ssi}, \gls{bird}, \gls{html}, +\gls{M}, \gls{html}. + +\printunsrtglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example155-page1.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example155-page1.png new file mode 100644 index 0000000000..17c5c63215 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example155-page1.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example155-page2.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example155-page2.png new file mode 100644 index 0000000000..5fbe52b9af Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example155-page2.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example155-page3.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example155-page3.png new file mode 100644 index 0000000000..f32f370d14 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example155-page3.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example155.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example155.pdf new file mode 100644 index 0000000000..af581116d7 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example155.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example155.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example155.tex new file mode 100644 index 0000000000..edc379d3b7 --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example155.tex @@ -0,0 +1,62 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 155 Using bib2gls: unit record counting +% arara: pdflatex +% arara: bib2gls: { recordcountunit: on } +% arara: pdflatex +% arara: pdfcrop +\documentclass[12pt]{scrreport} +\pagestyle{empty} +\begin{filecontents*}{abbrvs.bib} +@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} +} + +@abbreviation{xml, + short={xml}, long={extensible markup language}, description={a simple text-base format for representing structured information} } +\end{filecontents*} +\usepackage[T1]{fontenc} +\usepackage[colorlinks]{hyperref} +\usepackage[record,postdot]{glossaries-extra} + +\renewcommand{\chapterpagestyle}{empty}% to assist cropping +\setabbreviationstyle{long-short-sc-desc} + +\GlsXtrLoadResources[src={abbrvs}] + +\preto{\chapter}{\glsresetall} +\glsxtrenablerecordcount +\GlsXtrSetRecordCountAttribute{abbreviation}{1} + +\renewcommand{\glslinkpresetkeys}{% + \glsadd[format=glsignore,counter=chapter]{\glslabel}} + +\renewcommand*{\glsxtrrecordtriggervalue}[1]{% + \GlsXtrLocationRecordCount{#1}{chapter}{\theHchapter}% +} +\begin{document} +\chapter{First} \gls{html}. \gls{html}. \gls{html}. \gls{ssi}. + +\chapter{Second} \gls{html}. \gls{ssi}. \gls{ssi}. \gls{xml}. + +\renewcommand*{\printunsrtglossaryentryprocesshook}[1]{% + \glsxtrifhasfield*{location}{#1}{}{\printunsrtglossaryskipentry}% +} +\printunsrtglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example156-page1.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example156-page1.png new file mode 100644 index 0000000000..acf931e38d Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example156-page1.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example156-page2.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example156-page2.png new file mode 100644 index 0000000000..bd25c92edf Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example156-page2.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example156-page3.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example156-page3.png new file mode 100644 index 0000000000..3c14163220 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example156-page3.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example156.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example156.pdf new file mode 100644 index 0000000000..24b0c992a4 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example156.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example156.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example156.tex new file mode 100644 index 0000000000..3045a11de4 --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example156.tex @@ -0,0 +1,65 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 156 Using bib2gls: unit record counting mini-glossary +% arara: pdflatex +% arara: bib2gls: { recordcountunit: on } +% arara: pdflatex +% arara: pdfcrop +\documentclass[12pt]{scrreport} +\pagestyle{empty} +\begin{filecontents*}{abbrvs.bib} +@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} +} + +@abbreviation{xml, + short={xml}, long={extensible markup language}, description={a simple text-base format for representing structured information} } +\end{filecontents*} +\usepackage[T1]{fontenc} +\usepackage[colorlinks]{hyperref} +\usepackage[record,postdot,stylemods=longextra]{glossaries-extra} + +\renewcommand{\chapterpagestyle}{empty}% to assist cropping +\setabbreviationstyle{long-short-sc-desc} + +\newcommand*{\bibglssetlocationrecordcount}[4]{% + \GlsXtrSetField{#1}{recordcount.#2.#3}{#4}% + \provideignoredglossary{minigloss.#2.#3}% + \glsxtrcopytoglossary{#1}{minigloss.#2.#3}% +} + +\GlsXtrLoadResources[src={abbrvs}] + +\renewcommand{\glslinkpresetkeys}{% + \glsadd[format=glsignore,counter=chapter]{\glslabel}} +\newcommand{\minigloss}{% + \printunsrtglossary*[style=abbr-short-long,type=minigloss.chapter.\theHchapter,groups=false,target=false]% + {\renewcommand{\glossarysection}[2][]{}% + \renewcommand{\glslongextraShortLongTabularHeader}{\toprule}% +}} +\begin{document} +\chapter{First} \minigloss \gls{html}. \gls{html}. \gls{html}. \gls{ssi}. + +\chapter{Second} \minigloss \gls{html}. \gls{ssi}. \gls{ssi}. \gls{xml}. + +\renewcommand*{\printunsrtglossaryentryprocesshook}[1]{% + \glsxtrifhasfield*{location}{#1}{}{\printunsrtglossaryskipentry}% +} +\printunsrtglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example157.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example157.pdf new file mode 100644 index 0000000000..49e80317eb Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example157.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example157.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example157.png new file mode 100644 index 0000000000..8adda6efa9 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example157.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example157.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example157.tex new file mode 100644 index 0000000000..874f349739 --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example157.tex @@ -0,0 +1,31 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 157 Using bib2gls: simple custom sort rule +% arara: pdflatex +% arara: bib2gls: { group : on } +% arara: pdflatex +% arara: pdfcrop +\documentclass[12pt]{article} +\pagestyle{empty} +\begin{filecontents*}{animals.bib} +@index{bee} +@index{lion} +@index{ant} +@index{cow} +@index{goose} +@index{zebu} +@index{egret} +@index{elk} +@index{llama} +@index{lynx} +@index{bat} +\end{filecontents*} +\usepackage[record,nostyles,stylemods=bookindex,style=bookindex] + {glossaries-extra} + +\newcommand{\bibglssetlastgrouptitle}[2]{% + \glsxtrsetgrouptitle{#1#2}{Other}% +} \GlsXtrLoadResources[src=animals,selection=all, + sort=custom,sort-rule={ < a,A < b,B < e,E < l,L < ll,Ll,LL < z,Z}] +\begin{document} +\printunsrtglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example158.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example158.pdf new file mode 100644 index 0000000000..1892a4bb4d Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example158.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example158.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example158.png new file mode 100644 index 0000000000..202418fb4a Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example158.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example158.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example158.tex new file mode 100644 index 0000000000..658402f439 --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example158.tex @@ -0,0 +1,29 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 158 Using bib2gls: dual backlinks +% arara: pdflatex +% arara: bib2gls +% arara: pdflatex +% arara: pdfcrop +\documentclass[12pt]{article} +\pagestyle{empty} +\begin{filecontents*}{\jobname.bib} +@dualindexsymbol{L, + name={Lagrangian function}, + symbol={\ensuremath{L}}, + description={a function of generalized co-ordinates} +} +\end{filecontents*} +\usepackage[colorlinks]{hyperref} +\usepackage[record,symbols,nostyles,stylemods={tree,bookindex}]{glossaries-extra} +\GlsXtrLoadResources[src=\jobname, + dual-type=symbols,dual-field +] +\glsdefpostlink{index}{\glsxtrpostlinkAddSymbolOnFirstUse} +\glsdefpostname{index}{% + \ifglshassymbol{\glscurrententrylabel} + { (\GlsXtrDualBackLink{\glsentrysymbol{\glscurrententrylabel}}{\glscurrententrylabel})}{}} +\begin{document} +Primary: \gls{L}. +\printunsrtglossary[type=symbols,style=tree] +\printunsrtglossary[title=Index,style=bookindex] +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example159.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example159.pdf new file mode 100644 index 0000000000..9cc1608575 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example159.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example159.png b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example159.png new file mode 100644 index 0000000000..a9d5a0f4e1 Binary files /dev/null and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example159.png differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example159.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example159.tex new file mode 100644 index 0000000000..c51bcd502e --- /dev/null +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example159.tex @@ -0,0 +1,36 @@ +% This file is embedded in glossaries-extra-manual.pdf +% Example 159 Using bib2gls: dual entry label prefixes +% arara: pdflatex +% arara: bib2gls +% arara: pdflatex +% arara: pdfcrop +\documentclass[12pt]{article} +\pagestyle{empty} +\begin{filecontents*}{\jobname.bib} +@index{duck} +@dualindexabbreviation{svm, + short={SVM}, + long={support vector machine} +} + @dualindexsymbol{pi, + symbol={\ensuremath{\pi}}, + description={ratio of a circle's circumference to its diameter} +} +\end{filecontents*} +\usepackage{hyperref} +\usepackage[record,abbreviations,symbols]{glossaries-extra} + +\newcommand{\bibglsnewdualindexsymbolsecondary}[5]{% + \longnewglossaryentry*{#1}{name={#3},category={symbol}, + type={symbols},symbol={#4},#2}{#5}% +} + +\GlsXtrLoadResources[src=\jobname, + combine-dual-locations=primary] +\glsxtraddlabelprefix{dual.} +\glsxtraddlabelprefix{} +\begin{document} +First use: \dgls{duck}, \dgls{svm}, \dgls{pi}. +Next use: \dgls{duck}, \dgls{svm}, \dgls{pi}. +\printunsrtglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual.html b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual.html index 20c77bfc86..f2dbd41eb3 100644 --- a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual.html +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual.html @@ -1,35596 +1,24365 @@ - - - - - - - - - - - - - -

-

- - - -

- - - -

-
-

-

glossaries-extra.sty v1.48: an extension to the -glossaries package -

-
+ + + + + glossaries-extra.sty v1.49: +an extension to the glossaries package + + + +
+
glossaries-extra.sty v1.49: an extension to the glossaries package
Nicola L.C. Talbot
+ + Dickimaw Books
+ + dickimaw-books.com
2022-10-14

+

+ +

Abstract
+ The glossaries-extra package is an extension to the glossaries package, providing additional features. In particular, it provides a completely different abbreviation mechanism. You will need at least glossaries version 4.19, but it is best to update both packages at the same time, if new releases are available for both of them.
+

+

+The glossaries-extra package uses a different set of defaults to the base glossaries package. This means that if you simply replace glossaries with glossaries-extra in an existing document, there may be some differences in the PDF, and you may encounter errors. See §1.1 for more details.
+

+

+This document assumes some familiarity with the glossaries package. If you are new to glossaries, you may prefer to start with the following: + +
+

+

+ + +
+

List of Examples

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+ +

+ +
+
I. User Guide
+

+ +

+ +
+

1. Introduction

+

+The 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 glossaries-extra package is an attempt to provide a compromise for this conflict. Version 4.22 of the glossaries package is the last version to incorporate any major new features. Future versions of glossaries will mostly just be bug fixes. New features will instead be added to glossaries-extra. This means that the base 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.

+

+Some of the commands provided by the base glossaries package are incompatible with glossaries-extra. These are marked with 🛇 in this document.
+

+The glossaries-extra package internally loads the glossaries package. As a general rule, it’s better to defer loading the base glossaries package to glossaries-extra rather than loading the two packages separately.

+ +

+ +
+

1.1. Package Defaults

+

+I’m not happy with some of the default settings assumed by the 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 glossaries as it would break backward compatibility, but since 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: +

+

+ +

+ +
+

1.2. Example Differences Between glossaries and glossaries-extra

+

+The examples below illustrate the difference in explicit package options between glossaries and glossaries-extra. There may be other differences resulting from modifications to commands provided by glossaries.

+ +

+ +
+

1.2.1. Basic defaults

+

+

\documentclass{article}
+\usepackage{glossaries-extra}
+
This is like:
\documentclass{article}
+\usepackage[toc,nopostdot]{glossaries}
+\usepackage{glossaries-extra}
+

+ +

+ +
+

1.2.2. Language defaults

+

+

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

+ +

+ +
+

1.2.3. Combined with memoir

+

+

\documentclass{memoir}
+\usepackage{glossaries-extra}
+
This is like:
\documentclass{memoir}
+\usepackage[toc,nopostdot,noredefwarn]{glossaries}
+\usepackage{glossaries-extra}
+
However
\documentclass{memoir}
+\usepackage{glossaries}
+\usepackage{glossaries-extra}
+
This is like:
\documentclass{memoir}
+\usepackage[toc=false,nopostdot=false]{glossaries}
+\usepackage{glossaries-extra}
+
Since by the time glossaries-extra has been loaded, the base glossaries package has already redefined memoir’s glossary-related commands.

+ +

+ +
+

1.2.4. Abbreviations

+

+Abbreviations are defined with \newabbreviation:

\usepackage{glossaries-extra}
+\newabbreviation{svm}{SVM}{support vector machine}
+\begin{document}
+First use: \gls{svm}. Explicit full form: \glsxtrfull{svm}.
+\end{document}
+
This is the closest match to:
\usepackage{glossaries}
+\newacronym{svm}{SVM}{support vector machine}
+\begin{document}
+First use: \gls{svm}. Explicit full form: \acrfull{svm}.
+\end{document}
+
If you want to continue using \newacronym then you will need to change the style for the acronym category:
\usepackage{glossaries-extra}
+\setabbreviationstyle[acronym]{long-short}
+\newacronym{svm}{SVM}{support vector machine}
+\begin{document}
+First use: \gls{svm}. Explicit full form: \glsxtrfull{svm}.
+\end{document}
+

+

+Don’t use commands like \glsfirst or \glstext with abbreviations. See §4 for further details.
+

+ +

+ +
+

1.2.5. Glossary Mid-Build Placeholder (\printglossary)

+

+Another noticeable change with glossaries-extra is that by default \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 makeindex/xindy on just the non-empty glossary (or glossaries) and use the iterative \printglossaries command instead of \printglossary. For example, consider the following:

\documentclass{article}
+\usepackage[acronym]{glossaries}
+\makeglossaries
+\newacronym{laser}{laser}{light amplification by stimulated
+emission of radiation}
+\begin{document}
+\gls{laser}
+\printglossaries
+\end{document}
+
The above document will only display the list of acronyms at the place where \printglossaries occurs. However it will also attempt to input the gls file associated with the main glossary.

+If you use makeglossaries, you’ll get the warning message:

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.
+
(where the original file is called test.tex) but if you simply call makeindex directly to generate the acr file (without attempting to create the gls file) then the transcript file will always contain the message:
No file test.gls.
+
This doesn’t occur with makeglossaries as it will create the gls file containing the single command \null.

+If you simply change from glossaries to glossaries-extra in this document, you’ll find a change in the resulting PDF if you don’t use makeglossaries and you only generate the acr file with makeindex.

+The transcript file will still contain the message about the missing 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 nomain package option:

\documentclass{article}
+\usepackage[nomain,acronym,postdot]{glossaries-extra}
+\makeglossaries
+\setabbreviationstyle[acronym]{long-short}
+\newacronym{laser}{laser}{light amplification by stimulated
+emission of radiation}
+\begin{document}
+\gls{laser}
+\printglossaries
+\end{document}
+
+Note the need to set the acronym style using \setabbreviationstyle before \newacronym. See §4 for further details.
+

+ +

+ +
+

1.3. Further Reading

+

+The following documents and web pages are also available: +

+

+ +

+ +
+

2. Package Options

+

+

+\usepackage[options]{glossaries-extra}
+ This chapter describes the package options provided by glossaries-extra that are either not defined by the base glossaries package or are modified by glossaries-extra. You can additionally pass the base package options to glossaries-extra. For example, instead of:
\usepackage[nonumberlist]{glossaries}
+\usepackage[abbreviations]{glossaries-extra}
+
you can simply do:
\usepackage[abbreviations,nonumberlist]{glossaries-extra}
+

+

+It’s better not to load the glossaries package first. Leave glossaries-extra to load it, where possible, to allow for a smoother integration between the two packages.
+

+After glossaries-extra has been loaded, some of the glossaries-extra package options may be changed with:

+\glossariesextrasetup{options}
+ where options are the same as the relevant package option.

+

+Certain options can only be supplied as package options since the settings need to be known while glossaries-extra is loading.
+

+To change the base glossaries package’s options (that may be changed after the package has loaded), continue to use:

+\setupglossaries{options}
+ but don’t use any of the options listed here in that command.

+ +

+ +
+

2.1. Glossary Lists

+

+

+nomissingglstext=booleandefault: true; initial: false
+ If true, this will suppress the warning written to the transcript and 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.

+

+abbreviations
+ This option has no value and can’t be cancelled. If used, it will automatically create a new glossary with the label abbreviations and redefines \glsxtrabbrvtype to this label. (The file extensions are glg-abr, gls-abr and glo-abr.) In addition, this option defines a shortcut command:
+\printabbreviations[options]

+

+
+ which is equivalent to:
\printglossary[type=\glsxtrabbrvtype,options]
+
If glossaries-extra-bib2gls is also loaded then this option will additionally provide \printunsrtabbreviations which uses \printunsrtglossary instead.

+The title of the new glossary is given by

+\abbreviationsnameinitial: Abbreviations

+

+
+ If this command is already defined, it’s left unchanged. Otherwise it’s defined to “Abbreviations” if babel hasn’t been loaded or \acronymname if babel has been loaded. However, if you’re using babel it’s likely you will need to change this. (See §15 for further details.)

+

+If you don’t use the abbreviations package option, the \abbreviationsname command won’t be defined (unless it’s defined by an included language file).
+

+If the abbreviations option is used and the acronym option provided by the glossaries package hasn’t been used, then \acronymtype will be set to \glsxtrabbrvtype so that acronyms defined with \newacronym can be added to the list of abbreviations. If you want acronyms in the main glossary and other abbreviations in the abbreviations glossary then you will need to redefine \acronymtype to main:

\renewcommand*{\acronymtype}{main}
+

+Note that there are no analogous options to the glossaries package’s acronymlists option (or associated commands) as the abbreviation mechanism is handled differently with glossaries-extra.

+

+symbols
+ This is passed to the base glossaries package, but glossaries-extra will additionally define:
+\glsxtrnewsymbol[key=value list]{entry-label}{sym}

+

+
+ which is equivalent to:
\newglossaryentry{entry-label}{name={symbol},
+ sort={entry-label},type={symbols},category={symbol},
+options}
+
Note that the sort key is set to the entry-label not the symbol as the symbol will likely contain commands. If this isn’t appropriate, you can override it by using the sort key in the optional argument.

+This option also sets the regular attribute to true for the symbol category and provides the category post-description hook:

+\glsxtrpostdescsymbolinitial: empty

+

+
+

+If glossaries-extra-bib2gls is also loaded then this option will additionally provide \printunsrtsymbols which uses \printunsrtglossary.

+

+numbers
+ This is passed to the base glossaries package but glossaries-extra will additionally define:
+\glsxtrnewnumber[key=value list]{entry-label}{num}

+

+
+ which is equivalent to:
\newglossaryentry{entry-label}{name={number},
+ sort={entry-label},type={numbers},category={number},
+options}
+
Note that the sort key is set to the entry-label. If this isn’t appropriate, you can override it by using the sort key in the optional argument.

+This option also sets the regular attribute to true for the number category and provides the category post-description hook:

+\glsxtrpostdescnumberinitial: empty

+

+
+

+If glossaries-extra-bib2gls is also loaded then this option will additionally provide \printunsrtnumbers which uses \printunsrtglossary.

+

+acronyms
+ This is passed to the base glossaries package (which defines \printacronyms and creates a new glossary with the label acronym) but if glossaries-extra-bib2gls is loaded then this option will additionally provide \printunsrtacronyms which uses \printunsrtglossary.

+As with the base glossaries package, this option redefines \acronymtype to acronym. Note that this option doesn’t change \glsxtrabbrvtype.

+

+acronym=booleandefault: true; initial: false
+ If acronym=true, this behaves like acronyms. Note that acronym=false won’t work if the base glossaries package was loaded before glossaries-extra.

+

+index
+ This is passed to the base glossaries package but if glossaries-extra-bib2gls is loaded then this option will additionally provide \printunsrtindex which uses \printunsrtglossary.

+The base package index option also defines:

+\newterm[key=value list]{entry-label}

+

+
+ This definition is modified by glossaries-extra to additionally set the category to index and sets the description to discard the post-description hook (\nopostdesc) but retain \glsxtrpostdescription so that the category post-description hook can still be applied.

+This option also sets the regular attribute to true for the index category and defines an associated category post-description hook:

+\glsxtrpostdescindexinitial: empty

+

+
+

+ +

+ +
+

2.2. Glossary Style Options

+

+

+nopostdot=booleandefault: true; initial: true
+ This option is provided by glossaries where it simply alters a corresponding conditional that’s used inside \glspostdescription to determine whether or not to insert a full stop.

+The postpunc option (see below) redefines \glspostdescription, so the nopostdot option is modified by glossaries-extra to reset the hook back to its original definition to counteract any use of the postpunc option.

+

+This option will have no effect if the glossary style doesn’t include \glspostdescription. (Use stylemods to ensure that all the predefined styles that show the description have this hook added.)
+

+If you are using bib2gls, you may prefer to use the post-description-dot resource option.

+

+postdot
+ This is a shortcut for nopostdot=false.

+

+postpunc=value
+ This option redefines \glspostdescription to display the required punctuation. Note that this means the hook will no longer check for the nopostdot conditional.

+

+This option will have no effect if the glossary style doesn’t include \glspostdescription. (Use stylemods to ensure that all the predefined styles that show the description have this hook added.)
+

+The postpunc value may either be the required punctuation or one of the following keywords:

+

+ This redefines \glspostdescription to use a full stop but also adjusts the space factor. This isn’t exactly the same as nopostdot=false since it removes the conditional from \glspostdescription. If you are using bib2gls, you may prefer to use the post-description-dot resource option.

+

+postpunc=comma
+ This redefines \glspostdescription to a comma.

+

+ This redefines \glspostdescription to do nothing. This isn’t exactly the same as nopostdot=true since it removes the conditional from \glspostdescription.

+

+stylemods=valuedefault: default
+ Loads the glossaries-extra-stylemods package (see §8.6.5), which patches the styles provided with the base glossaries package so that they all use \glspostdescription. Extra hooks are also provided to make them easier to customize. The value may be one of the following:

+

+ Loads all styles that are provided by both glossaries and glossaries-extra.

+

+stylemods=default
+ Patches all the predefined styles that have been loaded, without loading any extra styles. This will typically be all the styles that are usually loaded by glossaries (for example, list and long). Package options such as nolist will alter which styles are loaded. In the case of nostyles, no styles will be loaded, so none of them will be patched.

+

+It’s pointless using both stylemods=default and nostyles. Any glossary style packages that are subsequently loaded won’t be patched.
+

+

+stylemods=list
+ For each element tag in list, the corresponding package glossary-tag will be loaded. You can use this in combination with nostyles to only load the particular style package or packages that you require (without loading the full set of defaults). For example,
\usepackage[nostyles,stylemods={bookindex,longextra},
+ style=bookindex]{glossaries-extra}
+
This prevents the base glossaries package from loading the default set of styles, but loads glossaries-extra-stylemods, glossary-bookindex and glossary-longextra, and then sets the default style to bookindex.

+ +

+ +
+

2.3. Loading Other Packages

+

+Some options listed in other sections, such as the stylemods and record options, also load supplementary packages.

+

+prefix
+ Loads the glossaries-prefix package (if not already loaded).

+

+accsupp
+ Loads the glossaries-accsupp package (if not already loaded). This option can only be used as a package option (not in \glossariesextrasetup) as glossaries-extra needs to know whether or not to provide accessibility support while it’s loading.

+

+The glossaries-accsupp package is still experimental and so accessibility features are liable to change.
+

+If you want to define styles that can interface with the accessibility support provided by glossaries-accsupp use the \glsaccessxxx type of commands instead of \glsentryxxx (for example, \glsaccesstext instead of \glsentrytext). If glossaries-accsupp hasn’t been loaded those commands are equivalent (for example, \glsaccesstext just does \glsentrytext) but if it has been loaded, then the \glsaccessxxx commands will add the accessibility information. See §9 for further details.

+ +

+ +
+

2.4. Entry Definitions, References and Indexing

+

+

+undefaction=valueinitial: error
+ This indicates what to do if an undefined glossary entry is referenced.

+

+Undefined entries can’t be picked up by any commands that iterate over a glossary list. This includes \forglsentries and \glsaddall.
+

+

+ Produces an error message for undefined glossary entries.

+

+ Only produces a warning message for undefined glossary entries. The place where the entry has been referenced will be marked with ?? (as with undefined labels or citations). The unknown marker is produced with:
+\glsxtrundeftaginitial: ??
+ This defaults to two question marks.

+Note that \ifglsused will only display ?? in the document text with undefaction=warn if the entry hasn’t been defined, as the underlying boolean variable doesn’t exist and so is neither true nor false. (There will also be a warning in the transcript.) You may prefer to use \GlsXtrIfUnusedOrUndefined instead. See §5.10 for further details.

+If you want to write a custom command that needs to generate a warning or error for an undefined reference, you can use:

+\glsxtrundefaction{message}{additional help}
+ This will produce the unknown marker if used within the document environment. Depending on the undefaction, \glsxtrundefaction will either create an error with the given message and additional help or will create a warning with the given message.

+

+docdef=valuedefault: true; initial: false
+ This setting governs where \newglossaryentry can be used (preamble-only or anywhere before the first glossary or anywhere within the document).

+Commands like \newabbreviation and \glsxtrnewsymbol that internally use \newglossaryentry are also governed by this option. Other commands, such as \longnewglossaryentry are always preamble-only.

+With just the base glossaries package, \newglossaryentry is allowed in the document environment as long as you haven’t used \makenoidxglossaries. There are, however, problems that can occur when entries are defined within the document environment (see the glossaries documentation for further details). To encourage preamble-only use, the glossaries-extra package prohibits the use of \newglossaryentry within the document environment by default, but if you really want this you can use this package option to allow it.

+

+Note that in the case of bib2gls, all entry data is originally defined in bib files. The entry definitions (using commands like \longnewglossaryentry and \newabbreviation) are written to the glstex files that are input in the preamble.
+

+

+docdef=false
+ Prohibits the use of \newglossaryentry within the document environment. All entries must be defined in the preamble.

+

+docdef=true
+ Permits the use of \newglossaryentry in the document environment provided \makenoidxglossaries hasn’t been used (as per the base glossaries package). This will create a temporary glsdefs file that contains the entry definitions so that they can be available on the next LaTeX run at the beginning of the document to allow any glossaries in the front matter to display correctly.

+If all your glossaries occur at the end of the document, consider using docdef=restricted instead.

+

+docdef=restricted
+ Permits the use of \newglossaryentry in the document environment provided the entry definitions all occur before the first glossary is displayed.

+This avoids the need for the glsdefs file. You will still need to take care about any changes made to the category code of characters that are required by the key=value mechanism (that is, the comma and equal sign) and any makeindex or xindy special character that occurs in the sort key or label. If any of those characters are made active in the document (for example, through babel shortcuts), then it can cause problems with the entry definition.

+This option will allow \newglossaryentry to be used in the document with \makenoidxglossaries, but note that \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 undefaction=warn 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 aux and gls files).

+

+docdef=atom
+ This option behaves like docdef=restricted but creates the glsdefs file for atom’s autocomplete support. This file isn’t input by glossaries-extra and so associated problems with the use of this file are avoided, but it allows the autocomplete support to find the labels in the file.

+

+A bug fix in glossaries v4.47 has changed the format of the glsdefs file slightly.
+

+As with docdef=restricted, entries may be defined in the preamble or anywhere in the document, but they may only be referenced after they have been defined. Entries must be defined before the associated glossary is displayed.

+If you need a list of all entry labels for the use of an editor or helper script you may also want to consider the package options writeglslabels and writeglslabelnames provided by the base glossaries package. Note that with these options and with docdef=atom, only the entry labels that are visible to LaTeX can be saved. So if you are using bib2gls you will only get the labels of the entries that have already been selected by bib2gls. The bib files can be found by parsing the aux file for \glsxtr@resource (listed in the src option or \jobname.bib if src is missing).

+

+shortcuts={value}initial: none
+ Unlike the base glossaries package option of the same name, this option isn’t boolean but has multiple values.

+

+Multiple invocations of the shortcuts option within the same option list will override each other. Since these options define commands, the action can’t be undone with a later \glossariesextrasetup.
+

+

+ Set the shortcut commands provided by the base glossaries package for acronyms (such as \ac) but use the glossaries-extra abbreviation commands, such as \glsxtrshort and \glsxtrlong, instead of the analogous base commands, such as \acrshort and \acrlong. See §4.3.2 for further details.

+

+shortcuts=abbreviations
+ Sets the abbreviation shortcuts (see §4.3.2). This setting doesn’t switch on the acronym shortcuts provided by the base glossaries package.

+

+ Synonym for shortcuts=abbreviations.

+

+ Implements the other (non-abbreviation) shortcut commands:
+\newentry{entry-label}{options}
+ A synonym for \newglossaryentry.

+

+\newsym[key=value list]{entry-label}{sym}
+ A synonym for \glsxtrnewsymbol (provided that the symbols package option is also used).

+

+\newnum[key=value list]{entry-label}{num}
+ A synonym for \glsxtrnewnumber (provided that the numbers package option is also used).

+

+shortcuts=acother
+ Implements shortcuts=ac and shortcuts=other.

+

+shortcuts=abother
+ Implements shortcuts=abbreviations and shortcuts=other.

+

+ Implements shortcuts=ac, shortcuts=abbreviations and shortcuts=other.

+

+shortcuts=acronyms
+ Sets the shortcuts provided by the base glossaries package for acronyms (such as \ac). See the glossaries package documentation for further details.

+Note that the short and long forms (\acs and \acl) don’t use \glsxtrshort and \glsxtrlong but use the original \acrshort and \acrlong, which aren’t compatible with the glossaries-extra abbreviation mechanism. The better option is to use shortcuts=ac.

+

+Don’t use shortcuts=acronyms unless you have reverted \newacronym back to the base glossaries package’s acronym mechanism. See §4.6 for further details.
+

+

+shortcuts=acroalias: acronyms
+ Synonym for shortcuts=acronyms.

+

+shortcuts=truealias: all
+ This setting is provided by the base glossaries package. With glossaries-extra it’s equivalent to shortcuts=all.

+

+shortcuts=falsealias: all
+ This setting is provided by the base glossaries package. With glossaries-extra it’s equivalent to shortcuts=none.

+

+indexcrossrefs=booleandefault: true; initial: varies
+ This is a boolean option that governs whether or not to automatically index any cross-referenced entries that haven’t been marked as used at the end of the document. These are entries that are identified in one of the cross-referencing fields (see and seealso) of another used entry as opposed to entries that have the cross-referencing fields set.

+Since entries with the alias key are intended as synonyms for another term, the target is expected to be indexed so entries with the alias key set aren’t affected by this option.

+For example:

\newglossaryentry{courgette}{name={courgette},
+ description={small vegetable marrow}}
+\newglossaryentry{marrow}{name={marrow},
+ description={long gourd with green skin},
+ seealso={courgette}}
+
Suppose that “marrow” is indexed (so that it appears in the glossary with the cross-reference to “courgette”) but if courgette isn’t indexed anywhere in the document (using commands like \gls or \glsadd) then there will be a broken cross-reference in the marrow location list pointing to courgette, which doesn’t appear in the glossary. With indexcrossrefs=true, the courgette entry will be indexed at the end of the document using \glsadd with format=glsxtrunusedformat, which corresponds to the command \glsxtrunusedformat.

+Note that this special format \glsxtrunusedformat simply does \unskip and ignores its argument, which creates a blank location. If any of the cross-referenced entries have been indexed but haven’t been marked as used (for example, with \glsadd) then this will cause a spurious comma in the location list. This is a limitation of the way that makeindex and xindy work as they are general purpose indexing applications which require locations. If you have entries with cross-references, you may want to consider switching to bib2gls instead.

+

+Note that bib2gls can automatically find dependent entries when it parses the bib source file, so the record option automatically implements indexcrossrefs=false.
+

+This function is implemented by code added to the end document hook that determines whether or not to use the command \glsxtraddallcrossrefs. This command iterates over all entries in all glossaries, which adds to the overall document build time, especially if you have defined a large number of entries, so this defaults to indexcrossrefs=false, but it will be automatically switched on if you use the see or seealso keys in any entries. See also §5.9.

+

+ Enables this setting.

+

+ Disables this setting even if the see or seealso key is present in any entries.

+

+autoseeindex=booleandefault: true; initial: true
+ This is a boolean option that governs whether or not the see and seealso keys should automatically index the cross-reference when an entry is defined (see §5.9).

+With the base glossaries package, the see key was provided as a shortcut for \glssee. For example:

\newglossaryentry{courgette}{name={courgette},
+ description={small vegetable marrow}}
+\newglossaryentry{zucchini}{name={zucchini},
+ description={},
+ see={courgette}}
+
is equivalent to:
\newglossaryentry{courgette}{name={courgette},
+ description={small vegetable marrow}}
+\newglossaryentry{zucchini}{name={zucchini},
+ description={}}
+\glssee{zucchini}{courgette}
+
This was designed for documents where only entries that are actually used in the document are defined and ensures that the cross-reference is included in the glossary, even though it may not be referenced anywhere in the document. However, it becomes problematic if neither entry is required in the document.

+The glossaries-extra package modifies the action of the see key so that it also saves the value and will only perform the automated \glssee if autoseeindex=true. Similarly for the seealso key.

+

+Note that the record option automatically implements autoseeindex=false as the corresponding action can be implemented with bib2gls’s selection option.
+

+

+ Enables automatic indexing using \glssee for the see key (as per the base glossaries package) and \glsxtrindexseealso for the seealso key.

+For example, if an entry is defined as

\newglossaryentry{foo}{name={foo},
+ description={},see={bar,baz}}
+
then, with autoseeindex=true and the default indexcrossrefs setting, this is equivalent to
\newglossaryentry{foo}{name={foo},description={}}
+\glssee{foo}{bar,baz}
+\glossariesextrasetup{indexcrossrefs=true}
+\GlsXtrSetField{foo}{see}{bar,baz}
+

+

+ The value of the see and seealso keys will be stored in their corresponding fields (and can be accessed using commands like \glsxtrusesee and \glsxtruseseealso) but the cross-reference won’t be automatically indexed.

+

+Note that indexcrossrefs isn’t automatically implemented by the presence of the see key when autoseeindex is false.
+

+For example, if an entry is defined as

\newglossaryentry{foo}{name={foo},
+ description={},see={bar,baz}}
+
then, with autoseeindex=false and the default indexcrossrefs setting, this is equivalent to
\newglossaryentry{foo}{name={foo},
+ description={}}
+\GlsXtrSetField{foo}{see}{bar,baz}
+

+It’s therefore possible with this option to remove the cross-references from the location lists and set their position within the glossary style.

+Another method of preventing the automatic indexing is to define the entries before the external indexing files have been opened with \makeglossaries. Since the appropriate file isn’t open, the information can’t be written to it. This will need the package option seenoindex=ignore to prevent an error occurring.

+

+record=valuedefault: only; initial: off
+ This setting indicates whether or not bib2gls is required.

+

+This option can only be set in the preamble and can’t be used after \GlsXtrLoadResources or \glsxtrresourcefile.
+

+With the recording setting on (record=only, record=nameref or record=hybrid), any of the commands that would typically index the entry (such as \gls, \glstext or \glsadd) will add a record to the aux file. bib2gls can then read this information to find out which entries have been used. (Remember that commands like \glsentryname don’t index, so any use of these commands won’t add a corresponding record.) See §11 for further details.

+The hybrid method additionally performs the standard indexing action that’s required for makeindex or xindy to work, but this can’t be done until bib2gls has created the glstex files that provide the entry definitions. In general, it’s best to avoid the hybrid method.

+

+ Indexing is performed as per the base glossaries package using either \makeglossaries or \makenoidxglossaries. This setting implements undefaction=error.

+

+record=only
+ indexing (or recording) is performed by adding bib2gls records in the aux file. Neither \makeglossaries nor \makenoidxglossaries is permitted. Use \GlsXtrLoadResources (or \glsxtrresourcefile) to set up bib2gls resource options. Glossaries should be displayed with the “unsrt” family of commands, such as \printunsrtglossary.

+This setting implements undefaction=warn, autoseeindex=false, indexcrossrefs=false sort=none, and automatically loads the supplementary glossaries-extra-bib2gls package. (There should be no need to explicitly load glossaries-extra-bib2gls.)

+This option also defines the location and group keys that are set by bib2gls to provide the location list and group information required by the “unsrt” family of commands.

+The document build process is (assuming the file is called myDoc.tex):

pdflatex myDoc
+bib2gls myDoc
+pdflatex myDoc
+
If you want letter groups you will need the --group or -g switch when invoking bib2gls:
pdflatex myDoc
+bib2gls -g myDoc
+pdflatex myDoc
+

+

+Note that this setting will prevent the see from automatically implementing \glssee. (bib2gls deals with the see field.) You may explicitly use \glssee in the document, but bib2gls will ignore the cross-reference if the see field was already set for that entry.
+

+

+record=nameref
+ As record=only but uses nameref records, which include the current label information given by \@currentlabel and \@currentHref. This means that the title can be included in the entry locations, if available. This setting also supports location hypertargets that don’t follow a simple h-prefixthe-counter format, which can’t be used with other indexing options.

+See §11.5.6 for further details of this option.

+

+This option requires hyperref, otherwise it will fall back on the usual location records.
+

+Note that \@currentHref is always globally updated whenever \refstepcounter is used, but \@currentlabel isn’t. This can cause some undesired side-effects with some settings. Remember also that the indexcounter option increments the associated counter every time an entry is indexed, which affects this option. If the location counter is the default page, only the location number is shown.

+

+record=alsoindexalias: hybrid 🗑
+ Deprecated synonym of record=hybrid.

+

+record=hybrid
+ This is a hybrid setting that uses bib2gls to fetch entry information from bib files, but uses makeindex or xindy to create the glossary files (which are input with \printglossary). Note that this requires a slower and more complicated build process (see below).

+This hybrid approach is provided for the rare instances where an existing xindy rule or module is too complicated to convert to a bib2gls rule but the entries need to be fetched from a bib file. There’s no benefit in using this option with makeindex.

+This setting does not load glossaries-extra-bib2gls, as bib2gls is only being used to fetch the entry definitions.

+

+Since it’s redundant to make bib2gls also sort and collate locations (in addition to xindy performing these tasks), use the resource options sort=none and save-locations=false for a faster build. Many of the other resource options are likely to be irrelevant.
+

+This setting must be used with \makeglossaries but not with its optional argument. Each glossary should be displayed using \printglossary (or \printglossaries for all of them).

+

+This setting should not be used with \makenoidxglossaries.
+

+You may need to change the transcript file used by bib2gls to avoid a clash with xindy’s transcript file. This can be done with bib2gls’s --log-file or -t option.

+The document build process is (assuming the file is called myDoc.tex):

pdflatex myDoc
+bib2gls myDoc
+pdflatex myDoc
+makeglossaries myDoc
+pdflatex myDoc
+
Note that, in this case, it’s redundant to call bib2gls with the --group or -g switch as xindy will insert the group heading information into the corresponding glossary file.

+

+If you want bib2gls to form the letter groups then this hybrid method is inappropriate.
+

+

+bibglsaux=basenameinitial: empty

+

requires bib2gls v3.0+
+
+

+Alternatively, this setting can be implemented with:

+\glsxtrsetbibglsaux{basename}

+

+
+

+This option should only be used once. If used again no new file will be created. If the basename value is empty, records will be written to the normal aux file.

+A document containing many records can result in a large aux file with information that’s only relevant to bib2gls. This option will create a new file called basename.aux that will be used to store the records. The file will be skipped by LaTeX but will be picked up by bib2gls v3.0+ when it inputs the main aux file. Note that this creates an extra write register.

+

+You should still supply the main aux file when you run bib2gls as basename.aux will only contain the records and not the other information that bib2gls requires (such as the resource options).
+

+

+equations=booleandefault: true; initial: false
+ This setting will cause the default location counter to automatically switch to equation when inside a numbered equation environment, such as equation or align. The counter can be explicitly overridden with the counter \glslink option.

+

+floats=booleandefault: true; initial: false
+ This setting will cause the default location counter to automatically switch to the corresponding counter when inside a floating environment, such as figure or table. The counter can be explicitly overridden with the counter \glslink option.

+Remember that within floats it’s the \caption command that actually uses \refstepcounter, so indexing before the caption will result in the wrong reference. The commands for use in captions and sections, such as \glsfmttext and \glsfmtshort, don’t index. (See §5.3). You may want to consider using \glsadd after the caption (not before). For example:

\begin{figure}[htbp]
+  \centering
+  \includegraphics{example-image}
+  \caption{Sample \glsfmttext{foobar} figure}
+  \glsadd{foobar}
+\end{figure}
+

+

+indexcounter
+ This option defines the indexing counter:
+wrglossary
+ which is incremented every time an entry is indexed. This option automatically implements counter=wrglossary. This means that each location will link to the relevant part of the page where the indexing occurred (instead of to the top of the page). See the bib2gls documentation for the save-index-counter resource option for more details.

+

+This option is primarily intended for use with bib2gls (v1.4+) and hyperref. It can be used with makeindex or xindy, but it will interfere with the location list collation, so you won’t have ranges and you’ll have duplicate page numbers present.
+

+This option works by incrementing wrglossary with \refstepcounter and adding \label. This can cause a problem if the indexing occurs in an equation environment as amsmath forbids multiple occurrences of \label (resulting in the “Multiple \label’s” error). It’s best to change the counter to page or equation when in maths mode with this option. For example:

\renewcommand{\glslinkpresetkeys}{% 
+ \ifmmode \setupglslink{counter=page}\fi}
+\renewcommand{\glsaddpresetkeys}{% 
+ \ifmmode \setupglsadd{counter=page}\fi}
+

+ +

+ +
+

2.5. Debugging

+

+

+debug=valuedefault: true; initial: false
+ Enables debugging information for draft documents. This option is defined by the base glossaries package, but is extended by glossaries-extra to provide additional settings. If no value is provided, true is assumed. The following values are available:

+

+debug=false
+ This setting is provided by the glossaries package and is the default. This switches off all debugging commands.

+

+debug=true
+ This setting is provided by the glossaries package and switches on logging information if an entry is indexed before the relevant indexing files have been opened (only applicable with makeindex and xindy). This option is extended by glossaries-extra to also display the label of unknown entries before the ?? marker. +

+

+\documentclass{article}
+\usepackage[debug]
+{glossaries-extra}
+\begin{document}
+\gls{example}
+\end{document}
+
[example]??

+ This uses \glsshowtargetfonttext for the annotation, which is provided by glossaries.

+debug=showaccsupp
+ Provided by glossaries, this setting shows accessibility information (glossaries-accsupp).

+

+debug=all
+ Implements all debugging options.

+

+debug=showwrgloss
+ This setting is only available with glossaries-extra. This implements debug=true and shows a marker (·) just before the write operation is performed by indexing commands. With record=hybrid there will be two marks: one for the write operation to the aux file and one for the associated glossary file used by makeindex/xindy. The marker is produced with the command:
+\glsxtrwrglossmark
+

+If the indexcounter option has been used, this setting will also mark where the wrglossary counter has been incremented. The marker is produced with the command:

+\glsxtrwrglosscountermark{number}
+ This marker is also inserted before the location in the definition of \glsxtrwrglossarylocfmt.

+

+debug=showtargets
+ This setting is provided by glossaries and displays the hyperlink target names whenever any glossary-related commands create a hyperlink or hypertarget (for example, \gls, \glstarget or \glshypernumber). The default is to use marginal notes in TeX’s “outer” mode and inline annotations for “inner” or maths modes. This uses \glsshowtargetinner for inner and maths annotations and \glsshowtargetouter for the outer annotation.

+If there are many targets within a single paragraph this can lead to “too many floats”, so glossaries-extra provides a new package option showtargets that can be used to easily switch to inline annotations for outer mode (rather than having to redefine \glsshowtargetouter).

+

+showtargets=value
+ Automatically implements debug=showtargets and adjusts the annotations according to the value. The glossaries-extra package provides supplementary commands to support this option.

+

+\glsxtrshowtargetouter{target-name}
+ Formats annotations in outer mode. This is initially \glsshowtargetouter to match debug=showtargets.

+

+\glsxtrshowtargetinner{target-name}
+ Formats annotations in inner mode. This is initially \glsshowtargetinner to match debug=showtargets.

+

+\glsshowtargetinnersymleft{name}
+ Shows the left annotation and marker. This uses the left symbol marker:
+\glsxtrshowtargetsymbolleft
+

+

+\glsshowtargetinnersymright{name}
+ Shows the right marker and annotation. This uses the right symbol marker:
+\glsxtrshowtargetsymbolright
+

+

+ A marker is placed to the left of the link/target and a marginal note is used in outer mode.

+

+ A marker is placed to the right of the link/target and a marginal note is used in outer mode.

+

+showtargets=innerleft
+ A marker and annotation are placed to the left of the link/target in all modes.

+

+showtargets=innerright
+ A marker and annotation are placed to the right of the link/target in all modes.

+

+showtargets=annoteleft
+ Markers are placed on either side of the link/target with the annotation on the left in all modes.

+

+showtargets=annoteright
+ Markers are placed on either side of the link/target with the annotation on the right in all modes.

+ +

+ +
+

3. Defining Entries

+

+The base glossaries package provides commands, such as \newglossaryentry, to define entries. The glossaries-extra package provides some additional commands, described in §3.1. For abbreviations, see §4. If you use bib2gls, it will write command definitions within the glstex file. See the bib2gls user manual for further information about those commands.

+The glossaries user manual warns against using commands such as \gls within field values. However, if you really need this, the glossaries-extra package provides \glsxtrp (see §5.4). Alternatively, you may want to consider multi (compound) entries instead (see §7).

+ +

+ +
+

3.1. Command Definitions

+

+

+\longnewglossaryentry{entry-label}{key=value list}{description}
+ This command is provided by the base glossaries package to cater for entries with descriptions that contain paragraph breaks. (The key=value interface doesn’t support paragraph breaks in the value.) The base package only provides an unstarred version of this command, which automatically inserts \leavevmode\unskip\nopostdesc at the end of the description. The glossaries-extra package replaces this with a single command:
+\glsxtrpostlongdescription
+ which has the same effect, but can be redefined if required.

+The glossaries-extra package provides a starred form:

+\longnewglossaryentry*{entry-label}{key=value list}{description}
+ This doesn’t insert the hook at the end of the description.

+

+For a general purpose post-description hook, see §8.6.2.
+

+Additionally, the symbols package option provides \glsxtrnewsymbol, and the numbers package option provides \glsxtrnewnumber. See §2.1 for further details.

+ +

+ +
+

3.2. Glossary Entry Keys

+

+ In addition to the glossary entry keys provided by the base glossaries package (summarised in §II) the glossaries-extra package provides:

+

+

+category=category-labelinitial: general
+ Assigns the category label. This should not contain any special or active characters as it’s used to form command names. See §10 for further details.

+

+

+seealso={xr-list}
+ This key is analogous to the see key but the tag is always given by \seealsoname. The value xr-list should be a comma-separated list of entry labels. As with the see key, this key automatically indexes the cross-reference by default. The cross-reference will be displayed in the location list using \glsxtruseseealsoformat (see §5.9). Use autoseeindex=false to prevent the automatic indexing. (With bib2gls, adjust the selection criteria.)

+

+With just the base glossaries package, the see key simply performs this automated indexing. With glossaries-extra the value is also saved. Similarly with the seealso key. The value isn’t saved with explicit use of \glsxtrindexseealso or \glssee.
+

+

+

+alias={xr-label}
+ This is similar to the see key but the value can only be a single entry label. In addition to automatically indexing the cross-reference, this command will cause the entry with this key to have hyperlinks go to the aliased entry when referenced with commands like \gls. Whenever the entry is indexed with commands like \gls, the indexing will be performed on the target entry (the alias value). See §5.9 for further details.

+

+Any entry that has a see, seealso or alias key set will be added to the glossary by default when using makeindex or xindy. If you don’t want this behaviour, use the autoseeindex=false package option and implement a post-description hook to insert the cross-reference. Alternatively, consider switching to bib2gls.
+

+If you use bib2gls (see §11) then most of the glossary entry keys can be used as analogous fields in the bib file. For example, instead of writing the following code in your tex file:

\newglossaryentry{duck}{name={duck},
+ description={a waterbird with webbed feet}}
+\newabbreviation{svm}{SVM}{support vector machine}
+
You would write the following in a bib file:
@entry{duck,
+ name={duck},
+ description={a waterbird with webbed feet}
+}
+@abbreviation{svm,
+  short={SVM},
+  long={support vector machine},
+}
+

+There are, however, some keys that are considered internal fields by bib2gls, in that they are defined as keys by glossaries-extra and may be assigned in the glstex file that’s input by \GlsXtrLoadResources, but they should not be used in the bib files.

+For example, the sort key (which is recommended with xindy where the name contains symbols) should not be used in the bib file. Instead, use the sort-field resource option or the system of sort fallbacks to choose the most appropriate field to obtain the sort value (see Gallery: Sorting). The group and location keys are also considered internal fields and are only applicable with the “unsrt” family of commands.

+

+The group and location keys are defined by the record=only and record=nameref options and are only applicable with the “unsrt” family of commands.
+

+

+

+group={group-label}
+ This key is used by bib2gls within the glstex file to set the group label. This label is typically a by-product of the sorting method (see §8.6.4). If it is explicitly set without reference to the order it can result in fragmented groups, see Gallery: Logical Glossary Divisions (type vs group vs parent). The group title can be set with \glsxtrsetgrouptitle. You will need to invoke bib2gls with the --group (or -g) switch to ensure that this key is set, when required.

+

+Letter groups are a consequence of sorting, not the other way around.
+

+

+

+location={location-list}
+ Used by bib2gls to store the formatted location list. The unformatted internal location list is stored in the loclist field, as with \printnoidxglossary.

+With the “unsrt” family of commands, if the location field isn’t set, then it will try the loclist field instead, using the same method as \printnoidxglossary to display the locations. If you don’t want locations with bib2gls, either use nonumberlist or use the save-locations=false resource option.

+The base glossaries package provides \glsaddkey and \glsaddstoragekey to allow custom keys to be defined. The glossaries-extra package additionally provides:

+

+\glsxtrprovidestoragekey{key}{default value}{no link cs}modifier: *
+ This is like \glsaddstoragekey but does nothing if the key has already been defined. As with \glsaddstoragekey, the starred version switches on field expansion for the given key (provided that it hasn’t already been defined).

+

+\glsxtrifkeydefined{key}{true}{false}
+ Tests if the given key has been defined as a glossary entry key.

+ +

+ +
+

3.3. 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 glossaries package allows the 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 glossaries package lets the plural field default to the value of the text field with \glspluralsuffix appended. This command is defined to be just the letter “s”. This means that the majority of terms don’t need to have the plural supplied as well, and you only need to use it for the exceptions.

+For languages that don’t have this general rule, the plural field will always need to be supplied, where needed.

+There are other plural fields, such as firstplural, longplural and 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 glossaries package follows these rules: +

+

+The last case is changed with glossaries-extra. With this extension package, the shortplural field defaults to the short field with \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, \abbrvpluralsuffix is redefined, see §4.1.2 for further details.

+ +

+ +
+

3.4. Entry Aliases

+

+An entry can be made an alias of another entry using the 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 bib2gls.)

+

+\glsxtraliashook{entry-label}
+ This hook is implemented when an entry is defined with the alias key set. It does nothing by default. The value of the alias field can be obtained with \glsxtralias{entry-label}.

+If an entry entry-1 is made an alias of entry-2 then: +

    +
  • If the see field wasn’t provided when entry-1 was defined, the alias key will automatically trigger
    \glssee{entry-1}{entry-2}
    +

    +

  • If the hyperref package has been loaded then \gls{entry-1} will link to entry-2’s target. (Unless the targeturl attribute has been set for entry-1’s category.)

    +

  • With record=off or record=hybrid, the noindex setting will automatically be triggered when referencing entry-1 with commands like \gls or \glstext. This prevents entry-1 from having a location list (aside from the cross-reference added with \glssee) unless it’s been explicitly indexed with \glsadd or if the indexing has been explicitly set using noindex=false. See §5.9.3 for adjusting the indexing hook.

    +Note that with record=only, the location list for aliased entries is controlled with bib2gls’s settings. +

+

+The value of the alias field can be accessed with \glsxtralias (see §5.9.2).

+ +

+ +
+

3.5. Setting or Updating Fields

+

+See §5.11 for accessing field values and §5.15 for testing field values.

+

+Modifications to fields only have an effect from that point onwards and may be localised to the current scope. If you are using docdef=true, any changes to the field values won’t be saved in the glsdefs file.
+

+Some of these commands are subtly different from each other. For example, \glsfielddef (provided by the base glossaries package), \glsxtrdeffield and \GlsXtrSetField all assign a value to a field, but \glsfielddef requires that both the entry and the field exists (so it can’t be used to set an unknown internal field), \GlsXtrSetField requires that the entry exists (so it can be used to set an internal field that doesn’t have an associated key provided that the entry has been defined), and \glsxtrdeffield doesn’t perform any existence checks (which means that it can be used to assign internal fields before the entry is actually defined).

+The commands described in this section don’t require the field to have an associated glossary entry key, so you need to be careful not to misspell the field labels.

+

+Assigning or changing fields using the commands described here won’t alter related fields. For example, if you use the text key but not the plural key when you define an entry with \newglossaryentry, the plural key will automatically be set as well, but if you change the value of the text field after the entry has been defined, the plural field won’t be changed. Particular care is required if the field contributes in some way to the indexing information, as this information is typically initialised when the entry is first defined. This includes the sort and parent keys, which should not be changed after the entry has been defined.
+

+With bib2gls, entries aren’t defined on the first LaTeX run. This means that commands that test for existence will produce a warning and (within the document environment) the ?? unknown marker. For example:

\documentclass{article}
+\usepackage[record]{glossaries-extra}
+\GlsXtrLoadResources[src=myentries,selection=all]
+\begin{document}
+Defining info
+\glsxtrdeffield{sample}{info}{some information}.
+Defining note
+\GlsXtrSetField{sample}{note}{some note}.
+
+Info: \glsxtrusefield{sample}{info}.
+Note: \glsxtrusefield{sample}{note}.
+\end{document}
+
On the first LaTeX run, this produces:
+Defining info . Defining note ??.

+Info: some information. Note: .

+ At this point the sample entry hasn’t been defined, so referencing it in \GlsXtrSetField results in a warning and the double question mark ?? unknown marker in the text. The field (note) isn’t saved, so nothing is shown when the field is referenced with \glsxtrusefield. Whereas \glsxtrdeffield does save the field with the label info associated with the label sample, even though the sample entry hasn’t actually been defined. The field can then be later obtained with \glsxtrusefield. Once bib2gls has been run, the sample entry should now have its definition in the glstex file, which is loaded by \GlsXtrLoadResources and the note field can be set.

+

+\glsxtrdeffield{entry-label}{field-label}{value}
+ This uses etoolbox’s \csdef command to locally set the field given by its internal label field-label to value for the entry identified by entry-label. No existence check is performed.

+

+\glsxtredeffield{entry-label}{field-label}{value}
+ This is like \glsxtrdeffield but (protected) fully expands the value before assigning it to the field.

+

+\glsxtrapptocsvfield{entry-label}{field-label}{element}
+ This command is designed for fields that should contain comma-separated lists. If the field hasn’t been defined, this behaves like \glsxtrdeffield otherwise it will append a comma followed by element (unexpanded) to the field value. No existence check is performed. This field can be iterated over using \glsxtrforcsvfield or formatted using \glsxtrfieldformatcsvlist. See §5.13 for further details.

+

+\glsxtrfieldlistadd{entry-label}{field}{value}
+ Appends the given value to the given entry’s field (identified using the field’s internal label) using etoolbox’s \listcsadd. The field value can later be iterated over using \glsxtrfielddolistloop or \glsxtrfieldforlistloop.

+

+\glsxtrfieldlistgadd{entry-label}{field}{value}
+ As above but uses \listcsgadd to make a global change.

+

+\glsxtrfieldlisteadd{entry-label}{field}{value}
+ As above but uses \listcseadd to expand the value.

+

+\glsxtrfieldlistxadd{entry-label}{field}{value}
+ As above but uses \listcsxadd to make a global change.

+

+\glsxtrsetfieldifexists{entry-label}{field-label}{code}
+ This is used by the commands \GlsXtrSetField, \gGlsXtrSetField, \xGlsXtrSetField, \eGlsXtrSetField, \GlsXtrLetField, \csGlsXtrLetField and \GlsXtrLetFieldToField to produce an error (or warning with undefaction=warn) if the entry doesn’t exist. This can be redefined to add extra checks (for example, to prohibit changing certain fields).

+

+\GlsXtrSetField{entry-label}{field-label}{value}
+ This uses etoolbox’s \csdef command to locally set the field given by its internal label field-label to value for the entry identified by entry-label.

+This command is written to the glstex file by bib2gls to set fields that don’t have a corresponding key.

+

+\gGlsXtrSetField{entry-label}{field-label}{value}
+ This is like \GlsXtrSetField but uses a global assignment.

+

+\eGlsXtrSetField{entry-label}{field-label}{value}
+ This is like \GlsXtrSetField but (protected) fully expands the value first.

+

+\xGlsXtrSetField{entry-label}{field-label}{value}
+ This is like \eGlsXtrSetField but uses a global assignment.

+

+\GlsXtrLetField{entry-label}{field-label}{cs}
+ This uses etoolbox’s \cslet command to locally set the field given by its internal label field-label to cs for the entry identified by entry-label.

+

+\csGlsXtrLetField{entry-label}{field-label}{cs-name}
+ This uses etoolbox’s \csletcs command to locally set the field given by its internal label field-label to the control sequence given by cs-name for the entry identified by entry-label.

+

+\GlsXtrLetFieldToField{entry1-label}{field1-label}{entry2-label}{field2-label}
+ This assigns the field identified by its internal label field1-label for the entry identified by entry1-label to the value of the field identified by field2-label for the entry identified by entry2-label

+ +

+ +
+

4. Abbreviations

+

+The acronym mechanism implemented by the base glossaries package is insufficiently flexible for some documents. The glossaries-extra package provides a completely different mechanism to deal with abbreviations in a more flexible manner. The two methods are incompatible. However, the glossaries-extra package provides predefined styles that emulate the appearance of the styles provided by the base package. If you have previously used just the base glossaries package, consult Table 4.2 for the closest matching abbreviation style.

+ +

+ +
+

4.1. Defining Abbreviations

+

+Abbreviations are defined using:

+\newabbreviation[options]{entry-label}{short}{long}
+ where entry-label is the entry’s label (used in commands like \gls), short is the short form (the abbreviation) and long is the long form (what the abbreviation is short for). The optional argument options may be used to set additional keys (as per the options list in \newglossaryentry), such as type or category.

+This command internally uses \newglossaryentry and sets the type to \glsxtrabbrvtype and the category to abbreviation. The category (see §10) determines the abbreviation style. The style for a particular category is set using \setabbreviationstyle. If the optional argument is omitted, the abbreviation category is assumed (see §4.5 for further details).

+The following example document sets up three different abbreviation styles: long-short-sc for the abbreviation category, long-only-short-only for the custom genus category, and short-nolong for the custom common category. Note that the custom title category doesn’t have an associated style.

\setabbreviationstyle{long-short-sc}
+\setabbreviationstyle[genus]{long-only-short-only}
+\setabbreviationstyle[common]{short-nolong}
+\newabbreviation{xml}{xml}{extensible markup language}
+\newabbreviation[category={genus}]{clostridium}{C.}{Clostridium}
+\newabbreviation[category={genus}]{myristica}{M.}{Myristica}
+\newabbreviation[category={common}]{html}{HTML}{hypertext markup language}
+\newabbreviation[category={title}]{dr}{Dr}{Doctor}
+\begin{document}
+First use: \gls{xml}, \gls{clostridium}, \gls{myristica},
+\gls{html}, \gls{dr}.
+
+Next use: \gls{xml}, \gls{clostridium}, \gls{myristica},
+\gls{html}, \gls{dr}.
+\end{document}
+
+Example 1: Multiple abbreviation styles 📥🖹 📥🖺

+Example document with multiple abbreviation styles.

+

+If the category doesn’t have an associated style, the style for the abbreviation category will be used, as with the dr entry above, which uses the long-short-sc style because no style has been associated with its custom title category.

+There are two categories that have an abbreviation style set by default: abbreviation and acronym. These are initialised as follows:

\setabbreviationstyle{long-short}
+\setabbreviationstyle[acronym]{short}
+
This means that abbreviations defined with the default abbreviation category will show the long form followed by the short form in parentheses on first use, and those defined with the category set to acronym will only show the short form (that is, the long form won’t be shown on first use).

+To make it easier to migrate a file containing entries defined with \newacronym, the glossaries-extra package redefines \newacronym to do:

\newabbreviation[type=\acronymtype,category=acronym,options]{entry-label}{short}{long}
+
Note that this sets the category to acronym, which means that any abbreviations defined with \newacronym will use the short style by default. If you want to use a different style, you need to set the abbreviation style for the acronym category. For example, to use the long-short style:
\setabbreviationstyle[acronym]{long-short}
+
This must be placed before the first instance of \newacronym.

+

+You can’t use \setacronymstyle with glossaries-extra.
+

+If you have defined any acronym styles with \newacronymstyle, you will have to migrate them over to \newabbreviationstyle. However, most of the predefined abbreviation styles are flexible enough to adapt to common abbreviation formats. It is possible to revert \newacronym back to using the base glossaries package’s acronym mechanism (§4.6), but it should generally not be necessary.

+Terms defined with \newabbreviation (and \newacronym) can be referenced in the main document text using commands like \gls. (If you want to use shortcut commands like \ac, use the shortcuts=ac package option.) Remember that you can use the prereset and preunset options to reset or unset the first use flag (see §5.10). Alternatively, you can use the commands described in §4.3. For headings and captions, see §5.3.2.

+

+Avoid using \glsfirst, \glsfirstplural, \glstext and \glsplural with abbreviations. Many of the abbreviation styles are too complex to work with these commands (particularly the case-changing variants or with the insert final optional argument or with innertextformat). Instead, use commands like \gls, \glsxtrshort, \glsxtrlong and \glsxtrfull.
+

+ +

+ +
+

4.1.1. Abbreviation Fields: long and short

+

+The short and long arguments are internally assigned with the short and long keys (so don’t use those keys in options), but the short and long values may first be modified by category attributes, such as markwords or markshortwords. As with other entries, avoid nested links (see §5.4). This means avoid using the \gls-like and \glstext-like commands within short and long.

+

+If an abbreviation can be formed by combining other entries, consider using the multi (compound) entry function (see §7).
+

+ +

+ +
+

4.1.2. Abbreviation Fields: longplural and shortplural

+

+The longplural key defaults to long\glspluralsuffix and the shortplural key defaults to short\abbrvpluralsuffix. The aposplural attribute will instead set the shortplural to short'\abbrvpluralsuffix and the noshortplural attribute will set shortplural to just short (see §10). If these values are not appropriate, you will need to explicitly set the longplural and shortplural keys in options.

+The short plural suffix \abbrvpluralsuffix is redefined by the abbreviation style. Some styles, such as the long-short style, simply redefine \abbrvpluralsuffix to just:

+\glsxtrabbrvpluralsuffixinitial: \glspluralsuffix
+ which is defined to \glspluralsuffix.

+Some styles, such as the long-short-sc style, redefine \abbrvpluralsuffix to include code to counteract the formatting of the abbreviation.

+

+If you want to change the default short plural suffix, you need to redefine \glsxtrabbrvpluralsuffix not \abbrvpluralsuffix. If you don’t want the suffix added, then set the noshortplural attribute to true.
+

+ +

+ +
+

4.1.3. Abbreviation Fields: name and description

+

+The name key is set according to the abbreviation style. There should not be any need to explicitly set it. Some styles require the description key to be set in options, but other styles will set the description to the long form.

+ +

+ +
+

4.1.4. Abbreviation Fields: type

+

+Abbreviations can be assigned to a particular glossary using the type key in options. The default for \newabbreviation is:

+\glsxtrabbrvtypeinitial: \glsdefaulttype
+ This is initialised to \glsdefaulttype (the default glossary), but the abbreviations package option will redefine it to abbreviations.

+The default type for \newacronym is:

+\acronymtypeinitial: \glsdefaulttype
+ This is initialised to \glsdefaulttype, but the acronyms package option will redefine it to acronym.

+ +

+ +
+

4.1.5. General Hooks

+

+The following are general purpose hooks used within \newabbreviation. Note that there are additional hooks that are used by the abbreviation styles (see §4.5.3.1).

+

+\glsxtrnewabbrevpresetkeyhook{options}{label}{short}
+ This hook is provided for further customisation, if required. It’s implemented before the entry is defined (before the shortplural and longplural keys supplied in options are parsed). Does nothing by default. The arguments are a legacy throwback to old versions that didn’t have \glsxtrorgshort.

+

+\newabbreviationhook
+ This hook is performed just before the entry is defined. Does nothing by default.

+ +

+ +
+

4.2. Examples: makeindex vs bib2gls

+

+Example document using makeindex:

\documentclass{article}
+\usepackage{glossaries-extra}
+\makeglossaries
+\newglossaryentry{sample}{name={sample},description={an example}}
+\newabbreviation{xml}{XML}{extensible markup language}
+\newacronym{nasa}{NASA}{National Aeronautics and Space Administration}
+\begin{document}
+First use: \gls{sample}, \gls{xml} and \gls{nasa}.
+Next use: \gls{sample}, \gls{xml} and \gls{nasa}.
+\printglossaries
+\end{document}
+
+Example 2: \newabbreviation vs \newacronym vs \newglossaryentry 📥🖹 📥🖺

+Example document illustrating the difference between \newabbreviation, \newacronym and \newglossaryentry.

+ Note that the long form of NASA isn’t displayed on the first use of \gls{nasa}. This is because the acronym category uses the short style by default.

+In the above example, all entries are placed in the main (default) glossary. The package options abbreviations and acronyms can be used to split them off into separate glossaries.

+If you use bib2gls, the analogous bib entry types are @abbreviation and @acronym. The above example can be rewritten to use bib2gls:

\documentclass{article}
+\begin{filecontents*}{\jobname.bib}
+@entry{sample,
+ name={sample},
+ description={an example}
+}
+@abbreviation{xml,
+ short={XML},
+ long={extensible markup language}
+}
+@acronym{nasa,
+ short={NASA},
+ long={National Aeronautics and Space Administration}
+}
+\end{filecontents*}
+\usepackage[record]{glossaries-extra}
+\GlsXtrLoadResources
+\begin{document}
+First use: \gls{sample}, \gls{xml} and \gls{nasa}.
+Next use: \gls{sample}, \gls{xml} and \gls{nasa}.
+\printunsrtglossaries
+\end{document}
+
+Example 3: @abbreviation vs @acronym vs @entry 📥🖹 📥🖺

+Example document illustrating the difference between @abbreviation, @acronym and @entry.

+

+ +

+ +
+

4.3. Referencing (Using) Abbreviations

+

+Since \newabbreviation internally uses \newglossaryentry, you can reference abbreviations with the \gls-like commands as with other entries. Remember that you can use the prereset and preunset options to reset or unset the first use flag (see §5.10).

+In general it’s best not to use \glsfirst, \glsfirstplural, \glstext, \glsplural or their case-changing variants as many of the abbreviation styles are too complicated for those commands. If you specifically want the full form, use \gls with prereset or use \glsxtrfull. If you specifically want the short form for a particular instance, use \gls with preunset or use \glsxtrshort. If you only want the long form for a particular instance, use \glsxtrlong.

+If you never want the short form with \gls, use one of the “noshort” styles, such as long-noshort. If you never want the long form with \gls, use one of the “nolong” styles, such as short-nolong.

+

+If you need to use abbreviations in headings or captions, use commands like \glsfmtshort and \glsfmtlong (see §5.3.2). Commands like \glsentryname are likely to contain non-expandable content.
+

+Example:

\usepackage[colorlinks]{hyperref}
+\usepackage{glossaries-extra}
+\makeglossaries
+\newabbreviation{svm}{SVM}{support vector machine}
+\newabbreviation{html}{HTML}{hypertext markup language}
+
+\begin{document}
+\tableofcontents
+\section{Introducing the \glsfmtlong{svm}}
+First use: \gls{svm}.
+Next use: \gls{svm}.
+
+\section{Introducing \gls{html} (incorrect)}
+First use (not!): \gls{html}.
+Next use: \gls{html}.
+
+\glsreset{html}
+\section{Introducing \glsxtrshort{html} (incorrect)}
+First use: \gls{html}.
+Next use: \gls{html}.
+
+\glsreset{html}
+\section{Introducing \glsfmtshort{html}}
+First use: \gls{html}.
+Next use: \gls{html}.
+
+\printglossaries
+\end{document}
+
+Example 4: Referencing an abbreviation (with hyperref) 📥🖹 📥🖺

+Example document illustrating referencing an abbreviation (with hyperref).

+ In the above example, compare the first section heading (which references an abbreviation with \glsfmtlong) with the second section heading (which references an abbreviation with \gls). Note that the first use of the html entry actually occurs in the table of contents, which results in the full form showing in the table of contents, but only the abbreviation is shown in the actual section 2 heading. The PDF bookmark shows the entry label (html) not the abbreviation (HTML). There is also a nested link for section 2 in the table of contents. In some PDF viewers (such as Okular), this will lead to section 2 but, in others (such as Evince), it will lead to the HTML entry target in the glossary. Similarly for section 3.

+As with the base glossaries package, the unformatted short and long forms can be obtained with \glsentryshort and \glsentrylong or, for the plural forms, \glsentryshortpl and \glsentrylongpl. These are analogous to commands like \glsentrytext and may be used in expandable contexts. The sentence case versions (\Glsentryshort, \Glsentrylong, \Glsentryshort, and \Glsentrylong) are all robust in glossaries v4.49 and lower. As from glossaries v4.50, they can expand in PDF bookmarks, but outside of PDF bookmarks they will expand to a robust internal command.

+

+Don’t use the base glossaries package’s acronym commands, such as \acrshort. These aren’t compatible with \newabbreviation.
+

+Each abbreviation style has a display full form, which is the format produced with the first use of \gls, and an inline full form, which is the format produced by \glsxtrfull. For some styles, such as long-short, the display and inline forms are identical.

+The example below demonstrates the difference between the first use of \gls compared with the inline full form for the footnote abbreviation style. The example also uses \glsfirst to demonstrate that it produces an undesirable result with the selected abbreviation style.

+

+

+\setabbreviationstyle{footnote}
+\newabbreviation{nasa}{NASA}{National Aeronautics and Space 
+Administration}
+
+\begin{document}
+\gls{nasa}['s] space 
+exploration\ldots
+
+\glsxtrfull{nasa}['s] space 
+exploration\ldots
+
+\glsfirst{nasa}['s] space 
+exploration\ldots
+\end{document}
+
Example 5: First use of \gls vs \glsxtrfull vs \glsfirst 📥🖹 📥🖺

+Example document illustrating the difference between the first use of \gls compared with \glsxtrfull and \glsfirst.

+ In the above, the first use of \gls puts the long form in the footnote but correctly inserts the final optional argument before the footnote marker. The inline full form (obtained with \glsxtrfull) doesn’t use a footnote, but instead shows the long form in parentheses after the short form. The insert material is correctly placed after the short form. Compare this with the final line, which uses \glsfirst. This shows the long form in the footnote, but the inserted material can’t be shifted before the footnote marker, which results in the strange “NASA²’s”.

+The following commands are included in the set of \glstext-like commands. They have the same options as \glstext and don’t change the first use flag. They will index (unless noindex is used), create a hyperlink (if enabled), and use the post-link hook.

+

+\glsxtrshort[options]{entry-label}[insert]modifiers: * + alt-mod
+ Displays the short form using the abbreviation style’s formatting.

+

+\Glsxtrshort[options]{entry-label}[insert]modifiers: * + alt-mod
+ As above, but sentence case version.

+

+\GLSxtrshort[options]{entry-label}[insert]modifiers: * + alt-mod
+ As above, but all caps version.

+

+\glsxtrshortpl[options]{entry-label}[insert]modifiers: * + alt-mod
+ Displays the short plural form using the abbreviation style’s formatting.

+

+\Glsxtrshortpl[options]{entry-label}[insert]modifiers: * + alt-mod
+ As above, but sentence case version.

+

+\GLSxtrshortpl[options]{entry-label}[insert]modifiers: * + alt-mod
+ As above, but all caps version.

+

+\glsxtrlong[options]{entry-label}[insert]modifiers: * + alt-mod
+ Displays the long form using the abbreviation style’s formatting. As from v1.49, this command simulates first use by defining \glsxtrifwasfirstuse to do its first argument. This is done via the command:
+\glsxtrsetlongfirstuse{entry-label}
+ which is defined as:
\newcommand{\glsxtrsetlongfirstuse}[1]{% 
+ \let\glsxtrifwasfirstuse\@firstoftwo% 
+}
+
This command takes the entry label as the argument, which is ignored by default.

+To restore the original behaviour, redefine this command as follows:

\renewcommand{\glsxtrsetlongfirstuse}[1]{% 
+ \letcs\glsxtrifwasfirstuse{@secondoftwo}% 
+}
+
This command is also used by the case-changing and plural variants listed below.

+

+\Glsxtrlong[options]{entry-label}[insert]modifiers: * + alt-mod
+ As above, but sentence case version.

+

+\GLSxtrlong[options]{entry-label}[insert]modifiers: * + alt-mod
+ As above, but all caps version.

+

+\glsxtrlongpl[options]{entry-label}[insert]modifiers: * + alt-mod
+ Displays the long plural form using the abbreviation style’s formatting.

+

+\Glsxtrlongpl[options]{entry-label}[insert]modifiers: * + alt-mod
+ As above, but sentence case version.

+

+\GLSxtrlongpl[options]{entry-label}[insert]modifiers: * + alt-mod
+ As above, but all caps version.

+

+\glsxtrfull[options]{entry-label}[insert]modifiers: * + alt-mod
+ Displays the inline full form using the abbreviation style’s formatting. Depending on the style, this may not be the same as the text produced with the first use of \gls.

+

+\Glsxtrfull[options]{entry-label}[insert]modifiers: * + alt-mod
+ As above, but sentence case version.

+

+\GLSxtrfull[options]{entry-label}[insert]modifiers: * + alt-mod
+ As above, but all caps version.

+

+\glsxtrfullpl[options]{entry-label}[insert]modifiers: * + alt-mod
+ Displays the inline full plural form using the abbreviation style’s formatting. Depending on the style, this may not be the same as the text produced with the first use of \glspl.

+

+\Glsxtrfullpl[options]{entry-label}[insert]modifiers: * + alt-mod
+ As above, but sentence case version.

+

+\GLSxtrfullpl[options]{entry-label}[insert]modifiers: * + alt-mod
+ As above, but all caps version.

+

+\glsxtrsetupfulldefs
+ This hook is used within \glsxtrfull, \glsxtrfullpl and the case-changing variations to initialise \glsxtrifwasfirstuse in case it’s required in the post-link hook. The default definition is to simulate first use. Note that changing this can cause unexpected results with abbreviation styles that set the post-link hook, such as short-postlong-user.

+

+\glsxtrfullsaveinsert{entry-label}{insert}
+ This hook is used within \glsxtrfull, \glsxtrfullpl and the case-changing variations to initialise the \glsinsert placeholder. The default definition is to use \glsxtrsaveinsert. If the insert isn’t saved, it can’t be used within the post-link hook for the \glsxtrfull etc. This affects the behaviour of the “post-hyphen” abbreviation styles, such as long-hyphen-postshort-hyphen.

+ +

+ +
+

4.3.1. Prefixes

+

+If you are using the glossaries-prefix package (which can be loaded via the prefix package option), then there are commands similar to \glsxtrshort and \glsxtrlong that insert the corresponding prefix and separator at the front if the short or long form, if the prefix has been set and is non-empty. In all cases, the separator is \glsprefixsep, as with \pgls.

+

+These commands require glossaries-prefix.
+

+

+\pglsxtrshort[options]{entry-label}[insert]modifiers: * + alt-mod

+

+
+ As \glsxtrshort but inserts the prefix field and separator, if the prefix value is set and non-empty.

+

+\Pglsxtrshort[options]{entry-label}[insert]modifiers: * + alt-mod

+

+
+ As \pglsxtrshort but sentence case. Note the initial “P” in the command name, which matches \Pgls (similarly for the other prefix sentence case commands).

+

+\PGLSxtrshort[options]{entry-label}[insert]modifiers: * + alt-mod

+

+
+ As \pglsxtrshort but all caps.

+

+\pglsxtrshortpl[options]{entry-label}[insert]modifiers: * + alt-mod

+

+
+ As \glsxtrshortpl but inserts the prefixplural field and separator, if the prefixplural value is set and non-empty.

+

+\Pglsxtrshortpl[options]{entry-label}[insert]modifiers: * + alt-mod

+

+
+ As \pglsxtrshortpl but sentence case.

+

+\PGLSxtrshortpl[options]{entry-label}[insert]modifiers: * + alt-mod

+

+
+ As \pglsxtrshortpl but all caps.

+

+\pglsxtrlong[options]{entry-label}[insert]modifiers: * + alt-mod

+

+
+ As \glsxtrlong but inserts the prefixfirst field and separator, if the prefixfirst value is set and non-empty.

+

+\Pglsxtrlong[options]{entry-label}[insert]modifiers: * + alt-mod

+

+
+ As \pglsxtrlong but sentence case.

+

+\PGLSxtrlong[options]{entry-label}[insert]modifiers: * + alt-mod

+

+
+ As \pglsxtrlong but all caps.

+

+\pglsxtrlongpl[options]{entry-label}[insert]modifiers: * + alt-mod

+

+
+ As \glsxtrlongpl but inserts the prefixfirstplural field and separator, if the prefixfirstplural value is set and non-empty.

+

+\Pglsxtrlongpl[options]{entry-label}[insert]modifiers: * + alt-mod

+

+
+ As \pglsxtrlongpl but sentence case.

+

+\PGLSxtrlongpl[options]{entry-label}[insert]modifiers: * + alt-mod

+

+
+ As \pglsxtrlongpl but all caps.

+ +

+ +
+

4.3.2. Abbreviation Shortcut Commands

+

+The abbreviation shortcut commands can be enabled using the shortcuts=abbreviations package option (or shortcuts=abbr or shortcuts=ac). The provided shortcut commands listed in Table 4.1. Note that \glsxtrenablerecordcount will switch the shortcuts that use the \cgls-like commands to the corresponding \rgls-like command.

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 1: Abbreviation Shortcut Commands
Shortcut Shortcut Equivalent Command
(shortcuts=abbreviations) (shortcuts=ac)
\ab \ac \cgls
\abp \acp \cglspl
\as \acs \glsxtrshort
\asp \acsp \glsxtrshortpl
\al \acl \glsxtrlong
\alp \aclp \glsxtrlongpl
\af \acf \glsxtrfull
\afp \acfp \glsxtrfullpl
\Ab \Ac \cgls
\Abp \Acp \cglspl
\As \Acs \Glsxtrshort
\Asp \Acsp \Glsxtrshortpl
\Al \Acl \Glsxtrlong
\Alp \Aclp \Glsxtrlongpl
\Af \Acf \Glsxtrfull
\Afp \Acfp \Glsxtrfullpl
\AB \AC \cGLS
\ABP \ACP \cGLSpl
\AS \ACS \GLSxtrshort
\ASP \ACSP \GLSxtrshortpl
\AL \ACL \GLSxtrlong
\ALP \ACLP \GLSxtrlongpl
\AF \ACF \GLSxtrfull
\AFP \ACFP \GLSxtrfullpl
\newabbr \newabbr \newabbreviation
+

+ + + +

+

4.4. Tagging Initials

+

+Initial tagging allows you to highlight the initials that form the abbreviation when the long form is shown in the glossary.

+

+\GlsXtrEnableInitialTagging{categories}{cs}modifier: *
+

+

+\GlsXtrEnableInitialTagging must be placed before the abbreviations are defined.
+

+This command (robustly) defines cs (a control sequence) to accept a single argument, which is the letter (or letters) that needs to be tagged. The normal behaviour of cs within the document is to simply do its argument, but in the glossary it’s activated for those categories that have the tagging attribute set to “true”. For those cases it will use:

+\glsxtrtagfont{text}
+ This command defaults to \underline{text} but may be redefined as required.

+The control sequence cs can’t already be defined when used with the unstarred version of \GlsXtrEnableInitialTagging for safety reasons. The starred version will overwrite any previous definition of cs. As with redefining any commands, ensure that you don’t redefine something important.

+The first argument of \GlsXtrEnableInitialTagging is a comma-separated list of category names. The tagging attribute will automatically be set to true for those categories. You can later set this attribute for other categories (see §10) but this must be done before the glossary is displayed.

+For example, the following uses initial tagging for both the acronym and abbreviation categories. The custom command \itag is defined as the tagging command.

\makeglossaries
+\GlsXtrEnableInitialTagging{acronym,abbreviation}{\itag}
+\setabbreviationstyle[acronym]{short-nolong-desc}
+\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
+ {\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}
+
+\newabbreviation[category={other}]{tne}{TNE}
+ {\itag{t}agging \itag{n}ot \itag{e}nabled}
+
+\begin{document}
+First use: \gls{radar}, \gls{xml}, \gls{tne}.
+
+Long form only: \glsxtrlong{radar}, \glsxtrlong{xml}, \glsxtrlong{tne}.
+\printglossaries
+\end{document}
+
+Example 6: Tagging abbreviation initials 📥🖹 📥🖺

+Example document illustrating the use of \GlsXtrEnableInitialTagging to tag initial letters that form the abbreviation.

+ The underlining of the tagged letters only occurs in the glossary and then only for entries with the tagging attribute set.

+ +

+ +
+

4.5. Abbreviation Styles

+

+The style for a particular category is set using:

+\setabbreviationstyle[category]{style-name}
+ If the category is omitted, abbreviation is assumed. Remember that \newacronym sets the category to acronym so with \newacronym you need to change the style with:
\setabbreviationstyle[acronym]{style-name}
+

+

+The abbreviation style must be set before the abbreviation with the corresponding category is defined. If you are using bib2gls, the style must be set before \GlsXtrLoadResources.
+

+The style associated with the abbreviation category will be used if an abbreviation is defined with a category that doesn’t have an associated style.

+Once you have defined an abbreviation with a given category, you can’t subsequently change the style for that category. You can’t have more than one style per category. The default style for the abbreviation category is long-short and the default style for the acronym category is short-nolong.

+In the example below, the custom latin category doesn’t have an associated abbreviation style, so it uses the style assigned to the abbreviation category, not the acronym category. The only reason that the “radar” abbreviation (defined with \newacronym) uses the style associated with the acronym category is because the default definition of \newacronym sets category={acronym}.

+

+

+\usepackage[T1]{fontenc}
+\usepackage{glossaries-extra}
+\setabbreviationstyle{long-short-sc}
+\newabbreviation{html}{html}{hypertext markup language}
+\setabbreviationstyle[acronym]{footnote}
+\newacronym{radar}{radar}{radio detection and ranging}
+\newacronym[category={latin}]{ibid}{ibid}{ibidem}
+\begin{document}
+\gls{html}, \gls{radar} and \gls{ibid}.
+\printunsrtglossaries
+\end{document}
+
Example 7: Category without an associated abbreviation style 📥🖹 📥🖺

+Example document that has an abbreviation with a category that doesn’t have an associated abbreviation style.

+

+ +

+ +
+

4.5.1. Predefined Abbreviation Styles

+

+There are two types of abbreviation styles: those that treat the abbreviation as a regular entry (so that \gls uses \glsgenentryfmt and is encapsulated with \glsxtrregularfont) and those that don’t treat the abbreviation as a regular entry (so that \gls uses \glsxtrgenabbrvfmt and is encapsulated with \glsxtrabbreviationfont). See §5.5.5 for further details of those commands.

+

+The non-regular abbreviation styles allow for more complex formats than the regular styles.
+

+The regular entry abbreviation styles set the regular attribute to true for the category assigned to each abbreviation with that style. This means that on first use, \gls uses the value of the first field and on subsequent use \gls uses the value of the text field (and analogously for the plural and case-changing versions).

+The non-regular abbreviation styles don’t set the regular attribute, unless it has already been set, in which case it will be changed to false. The first and text fields (and their plural forms) are set, but they aren’t used by commands like \gls, which instead use formatting commands, such as \glsxtrfullformat and \glsxtrsubsequentfmt, which are defined by the style.

+In both cases, the first use of \gls may not match the text produced by \glsfirst (and likewise for the plural and case-changing versions).

+The short and long fields are set as appropriate and may be accessed through commands like \glsxtrshort and \glsxtrlong. These may appear slightly differently to the way the short or long form is displayed within \gls, depending on the style.

+The sample file sample-abbr-styles.pdf demonstrates all predefined styles described here.

+

+For the “sc” styles that use \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. If you’re using pdfLaTeX, I recommend that you at least use the fontenc package with the T1 option or something similar.
+

+The predefined styles have helper commands to make it easier to modify the format. These are described in §4.5.1.3.

+Table 4.2 lists the nearest equivalent glossaries-extra abbreviation styles for the predefined acronym styles provided by glossaries, but note that the new styles use different formatting commands.

+

+The example documents used to illustrate the predefined styles in the sub-sections below are all in the form (document class and options may vary):

\documentclass{article}
+\usepackage[T1]{fontenc}
+\usepackage[colorlinks]{hyperref}
+\usepackage{glossaries-extra}
+\setabbreviationstyle{style-name}
+\newabbreviation[options]{ex}{short}{long form}
+\begin{document}
+First: \gls{ex}[-insert]. Next: \gls{ex}[-insert].
+Full: \glsxtrfull{ex}[-insert].
+\printunsrtglossaries
+\end{document}
+
where style-name is the name of the abbreviation style, short is either “SHRT FM” or (for the small caps examples) “shrt fm”. The styles that require the description or user1 key to be set will include that in options otherwise the optional argument of \newabbreviation will be omitted. The examples with a style that requires \textsmaller will load relsize. The “hyphen” styles set the markwords and markshortwords attributes. Note that hyperref is loaded with the colorlinks option, so the hyperlink text will be red.

+The naming scheme for abbreviation styles is as follows: +

    +
  • field1[-modifier1]-[post]field2[-modifier2][-user]

    +This is for the parenthetical styles. The -modifier parts may be omitted. These styles display field1 followed by field2 in parentheses. If field1 or field2 starts with “no” then that element is omitted from the display style (no parenthetical part) but is included in the inline style.

    +If post is present then field2 is placed after the link text using the post-link hook. Note that this will use the singular form of field2 by default, even if \glspl is used. The corresponding non-post style will use the matching form for field2.

    +If the -modifier part is present and is one of sc, sm or em, then the field has a font changing command applied to it.

    +The modifier -only indicates that field is only present according to whether or not the entry has been used.

    +The modifier -hyphen indicates the style will substitute inter-word spaces (that have been marked up with the markwords or markshortwords attributes) will be changed to spaces if the inserted material starts with a hyphen (but not for the set of \glsxtrshort and \glsxtrlong commands).

    +If the -user part is present, then the value of the field given by \glsxtruserfield (user1), if set, is inserted into the parenthetical material.

    +Examples: +

    +

    +

  • style-noreg

    +Some styles set the regular attribute. In some cases, there’s a version of the style that doesn’t set this attribute. For example, long-em-noshort-em sets the regular attribute. The long-em-noshort-em-noreg style is a minor variation of that style that sets the attribute to false.

    +There are a few “noshort” styles, such as long-hyphen-noshort-noreg, where there isn’t a corresponding regular version. This is because the style won’t work properly with the regular attribute set, but the naming scheme is maintained for consistency with the other “noshort” styles.

    +

  • field1[-modifier1]-[post]footnote

    +The display style uses field1 followed by a footnote with the other field in it. If post is present then the footnote is placed after the link text using the post-link hook. The inline style does field1 followed by the other field in parentheses.

    +If -modifier1 is present, field1 has a font-changing command applied to it.

    +Examples: +

    +

    +

    +Take care with the footnote styles. Remember that there are some situations where \footnote doesn’t work.
    +

    +

  • style-desc

    +Like style but the description key must be provided when defining abbreviations with this style.

    +Examples: +

    -> Nicola L.C. Talbot Dickimaw Books -http://www.dickimaw-books.com/ -
-

2021-11-22

-
-

- - - -

-

-Abstract -

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

The file example-glossaries-xr.tex contains dummy entries with cross-references -that may be used for creating minimal working examples for testing the -glossaries-extra package. (The base glossaries package provides additional files, but -this one needs glossaries-extra.) There are equivalent .bib files for use with -bib2gls. -

The glossaries-extra package uses a different set of defaults to the base -glossaries package. See the Introduction for more details. -

- - - -

-
-

Since glossaries-extra internally loads the glossaries package, you also need to have -glossaries installed and all the packages that glossaries depends on (including, but not -limited to, tracklang, mfirstuc, etoolbox, xkeyval (at least version dated 2006/11/18), -textcase, xfor, datatool-base and amsgen. These packages are all available in the -current TeX Live and MikTeX distributions. If any of them are missing, please -update your TeX distribution using your update manager. (For help on this see, for -example, How do I update my TeX distribution? or Updating TeX on Linux.) -
-

-

Additional resources:

- - - - -

Contents

-
- 1 Introduction -
 1.1 Package Defaults -
 1.2 New or Modified Package Options -
2 Modifications to Existing Commands and Styles -
 2.1 Defining Entries -
 2.2 Entry Indexing -
 2.3 Cross-References (“see” and “see also”) -
 2.4 Entry Display Style Modifications -
 2.5 Entry Counting Modifications -
 2.6 First Use Flag -
 2.7 Plurals -
 2.8 Nested Links -
 2.9 Acronym Style Modifications -
 2.10 Glossaries -
 2.11 Glossary Style Modifications -
  2.11.1 Style Hooks -
  2.11.2 Number List -
  2.11.3 The glossaries-extra-stylemods Package -
3 New Glossary Styles -
 3.1 glossary-bookindex package -
 3.2 glossary-longextra package -
 3.3 glossary-topic package -
4 Abbreviations -
 4.1 Tagging Initials -
 4.2 Abbreviation Styles -
 4.3 Shortcut Commands -
 4.4 Predefined Abbreviation Styles -
  4.4.1 Predefined Abbreviation Styles that Set the Regular Attribute -
  4.4.2 Predefined Abbreviation Styles that Don’t Set the Regular Attribute -
 4.5 Defining New Abbreviation Styles -
5 Entries in Sectioning Titles, Headers, Captions and Contents -
 5.1 Simplistic Approach -
 5.2 New Commands Designed for Chapter/Section Headings -
6 Multi (or Compound) Entries -
 6.1 Examples - - - -
  6.1.1 Example: Hierarchical -
  6.1.2 Example: Suffix -
  6.1.3 Example: Category Suffix -
  6.1.4 Example: Separators -
  6.1.5 Example: Skipping Elements (Fragment Element) -
  6.1.6 Example: Skipping Elements (Prefix and Post-Link Hooks) -
 6.2 Main and Other Elements -
 6.3 Prefixes and Suffixes -
 6.4 Separators -
 6.5 mgls Element Hooks -
 6.6 Post-Link Hook -
  6.6.1 Last Element -
  6.6.2 Main Element -
 6.7 Multi-Entry First Use -
 6.8 Multi-Entry Category -
 6.9 Multi-Entry Settings -
  6.9.1 Indexing -
  6.9.2 Location Formats (Encaps) -
  6.9.3 Post-Link Hooks -
  6.9.4 Prefixes and Suffixes -
  6.9.5 Skipping Elements -
  6.9.6 General -
 6.10 mgls Options -
 6.11 Variants of mgls -
  6.11.1 gls-like -
  6.11.2 Abbreviations -
  6.11.3 Other Fields -
  6.11.4 Support for glossaries-prefix (pgls) -
 6.12 Cross-References -
 6.13 Additional Commands -
 6.14 bib2gls -
7 Categories -
8 Counting References -
 8.1 Entry Counting (First Use Flag) -
 8.2 Link Counting -
9 Auto-Indexing -
10 bib2gls: Managing Reference Databases -
 10.1 Selection -
 10.2 Sorting and Displaying the Glossary -
 10.3 The glossaries-extra-bib2gls package -
  10.3.1 Supplemental Locations -
  10.3.2 Nameref Record -
  10.3.3 Helper Commands for Resource Options -
 10.4 Supplementary Commands -
 10.5 Record Counting -
11 Miscellaneous New Commands - - - -
 11.1 Entry Fields -
 11.2 Display All Entries Without Sorting or Indexing -
  11.2.1 Hooks -
  11.2.2 Filtering -
 11.3 Partial Glossaries -
 11.4 Standalone Entry Items -
 11.5 Entry Aliases -
12 On-the-Fly Document Definitions -
13 Supplemental Packages -
 13.1 Prefixes or Determiners -
 13.2 Accessibility Support -
14 Sample Files -
15 Multi-Lingual Support -
Glossary -
- - - -

1. Introduction

-

The 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 glossaries-extra package is an attempt to provide a compromise for this -conflict. Version 4.22 of the glossaries package is the last version to incorporate new -features.1.1 -Future versions of glossaries will just be bug fixes. New features will instead be added -to glossaries-extra. This means that the base 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. -

-

Top

1.1 Package Defaults

-

I’m not happy with some of the default settings assumed by the 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 glossaries as it would break backward compatibility, -but since 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:

-
    -
  • toc=true (add the glossaries to the table of contents). Use toc=false to - switch this back off. -
  • -
  • nopostdot=true (suppress the terminating full stop after the description - in the glossary). Use nopostdot=false or just postdot to restore the - terminating full stop (period). -
  • -
  • noredefwarn=true (suppress the warnings that occur when the theglossary - environment and \printglossary are redefined while glossaries is - loading). To restore the warnings, use noredefwarn=false. Note that this - won’t have any effect if the glossaries package has already been loaded - before you use the glossaries-extra package. -
  • -
  • If babel has been loaded, the translate=babel option is switched on. To - revert to using the translator interface, use translate=true. There is no - change to the default if babel hasn’t been loaded. - - - -
  • -
  • The default style used by \newacronym is short-nolong. (That is, the long - form is not shown on first use.) -
-

The examples below illustrate the difference in explicit package options between -glossaries and glossaries-extra. There may be other differences resulting from -modifications to commands provided by glossaries (see §2 -Modifications to Existing Commands and Styles). -

-

    -
  1. Basic defaults: - - - -
    -     \documentclass{article}
    -     \usepackage{glossaries-extra}
    -
    -

    This is like: - - - -

    -
    -     \documentclass{article}
    -     \usepackage[toc,nopostdot]{glossaries}
    -     \usepackage{glossaries-extra}
    -
    -

    -

  2. -
  3. Language defaults: - - - -
    -     \documentclass[british]{article}
    -     \usepackage{babel}
    -     \usepackage{glossaries-extra}
    -
    -

    This is like: - - - -

    -
    -     \documentclass[british]{article}
    -     \usepackage{babel}
    -     \usepackage[toc,nopostdot,translate=babel]{glossaries}
    -     \usepackage{glossaries-extra}
    -
    -

    -

  4. -
  5. Combined with memoir - - - -
    -     \documentclass{memoir}
    -     \usepackage{glossaries-extra}
    -
    -

    This is like: - - - -

    -
    -     \documentclass{memoir}
    -     \usepackage[toc,nopostdot,noredefwarn]{glossaries}
    -     \usepackage{glossaries-extra}
    -
    -

    However - - - -

    -
    -     \documentclass{memoir}
    -     \usepackage{glossaries}
    -     \usepackage{glossaries-extra}
    -
    -

    This is like: - - - -

    -
    -     \documentclass{memoir}
    -     \usepackage[toc,nopostdot]{glossaries}
    -     \usepackage{glossaries-extra}
    -
    -

    Since by the time glossaries-extra has been loaded, glossaries has already - redefined memoir’s glossary-related commands. -

  6. -
  7. Abbreviations are defined with \newabbreviation: - - - -
    -     \usepackage{glossaries-extra}
    -     \newabbreviation{svm}{SVM}{support vector machine}
    -     \begin{document}
    -     First use: \gls{svm}. Explicit full form: \glsxtrfull{svm}.
    -     \end{document}
    -
    -

    This is the closest to: - - - -

    -
    -     \usepackage{glossaries}
    -     \newacronym{svm}{SVM}{support vector machine}
    -     \begin{document}
    -     First use: \gls{svm}. Explicit full form: \acrfull{svm}.
    -     \end{document}
    -
    -

    If you want to continue using \newacronym then you will need to change the - style for the acronym category: - - - -

    -
    -     \usepackage{glossaries-extra}
    -     \setabbreviationstyle[acronym]{long-short}
    -     \newacronym{svm}{SVM}{support vector machine}
    -     \begin{document}
    -     First use: \gls{svm}. Explicit full form: \glsxtrfull{svm}.
    -     \end{document}
    -
    -

-

Another noticeable change is that by default \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 -makeindex/xindy on just the non-empty glossary (or glossaries) and use the iterative -\printglossaries command instead of \printglossary. For example, consider the -following: - - - -

-
-\documentclass{article}
-\usepackage[acronym]{glossaries}
-\makeglossaries
-\newacronym{laser}{laser}{light amplification by stimulated
-emission of radiation}
-\begin{document}
-\gls{laser}
-\printglossaries
-\end{document}
-
-

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

If you use makeglossaries, you’ll get the warning message: - - - -

-
-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.
-
-

(where the original file is called test.tex) but if you simply call makeindex directly -to generate the .acr file (without attempting to create the .gls file) then the -transcript file will always contain the message: - - - -

-
-No file test.gls.
-
-

This doesn’t occur with makeglossaries as it will create the .gls file containing -the single command \null. -

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

The transcript file will still contain the message about the missing .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 -nomain package option: - - - -

-
-\documentclass{article}
-\usepackage[nomain,acronym,postdot]{glossaries-extra}
-\makeglossaries
-\setabbreviationstyle[acronym]{long-short}
-\newacronym{laser}{laser}{light amplification by stimulated
-emission of radiation}
-\begin{document}
-\gls{laser}
-\printglossaries
-\end{document}
-
-

(Note the need to set the acronym style using \setabbreviationstyle -before \newacronym. See §4 Abbreviations for further -details.) -

-

-

Top

1.2 New or Modified Package Options

-

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

This section only lists options that are either unrecognised by the glossaries -package or are a modified version of options of the same name provided by glossaries. -See the glossaries user manual for details about the unmodified options. -
-

-

The new and modified options provided by glossaries-extra are described -below: - - - -

-debug
The glossaries package has a debug option that allows the values false, - true and showtargets. The debug=showtargets option was introduced to - glossaries v4.32, so if you want to use this option with glossaries-extra you - must make sure that your version of glossaries supports it. -

The glossaries-extra package extends this option to provide the additional - values debug=showwrgloss and debug=all. -

The debug=showwrgloss option implements debug=true and uses -


\glsxtrwrglossmark

-

- to show a mark just before the write operation performed by the - indexing commands. If you use record=hybrid there will be a mark - for the write operation to the .aux file for bib2gls and a mark for - the write operation to the associated glossary file for makeindex or - xindy. -

The debug=all option implements both debug=showtargets and - debug=showwrgloss. -

-showtargets
This implements debug=showtargets and can also adjust the way the - targets are shown. By default, any links that occur in TeX’s “outer” mode are - placed in the margin according to \glsshowtargetouter (provided by the base - glossaries package). This can lead to the “too many floats” error if there are - multiple instances of commands like \gls in a single line. This option - provides a way of changing this to an in-line annotation. Available - values: -
- left
A marker is placed to the left of the link/target and a marginal note - is used in outer mode; -
- right
A marker is placed to the right of the link/target and a marginal - note is used in outer mode; -
- innerleft
A marker and annotation are placed to the left of the link/target - in all modes; -
- innerright
A marker and annotation are placed to the right of the - link/target in all modes; -
- annoteleft
Markers are placed on either side of the link/target and the - annotation is on the left; - - - -
- annoteright
Markers are placed on either side of the link/target and the - annotation is on the right.
-
-postdot
(New to version 1.12.) This option is just a shortcut for nopostdot=false. -
-postpunc
(New to version 1.21.) This option sets the post-description punctuation to - the given value. For example: postpunc=; does - - - -
-     \renewcommand{\glspostdescription}{;}
-
-

The value may also be one of the following keywords: -

- comma:
postpunc=comma is equivalent to - - - -
-         \renewcommand{\glspostdescription}{,}
-
-

-

- dot:
postpunc=dot is equivalent to - - - -
-         \renewcommand{\glspostdescription}{.\spacefactor\sfcode`\. }
-
-

-

- none:
postpunc=none is equivalent to - - - -
-         \renewcommand{\glspostdescription}{}
-
-

-

The default definition is - - - -

-
-     \newcommand*{\glspostdescription}{%
-       \ifglsnopostdot\else.\spacefactor\sfcode`\. \fi
-     }
-
-

where the conditional is determined by the nopostdot package option. - The postpunc option removes the conditional from the definition of - \glspostdescription. The package options nopostdot and postdot will restore - the original definition of \glspostdescription. -

The glossaries-extra-stylemods package adjusts the predefined styles - that had a hard-coded \space before the number list so that they use - \glsxtrprelocation instead (which is defined to \space). You can therefore - redefine this command in combination with postpunc to alter the separator - before the number list. For example, to have a comma followed by - \hfil: - - - -

-
-     \usepackage[postpunc=comma,stylemods]{glossaries-extra}
-     \renewcommand{\glsxtrprelocation}{\hfil}
-
-

Be careful with doing this as it will look odd if the number list is missing. - (With bib2gls you can instead redefine \glsxtrprelocation to do nothing - and set the location prefixes with loc-prefix which will only apply if the entry - has a number list.) -

-prefix
Load the glossaries-prefix package (if not already loaded). -
-accsupp
Load the glossaries-accsupp package (if not already loaded). -

The glossaries-accsupp package is still experimental and so accessibility features - are liable to change.
-

-

If you want to define styles that can interface with the accessibility support - provided by glossaries-accsupp use the \glsaccessxxx⟩ type of commands - instead of \glsentryxxx⟩ (for example, \glsaccesstext instead of - \glsentrytext). If glossaries-accsupp hasn’t been loaded those commands are - equivalent (for example, \glsaccesstext just does \glsentrytext) but if it - has been loaded, then the \glsaccessxxx⟩ commands will add the accessibility - information. (See §13.2 Accessibility Support for further - details.) -

Note that the accsupp option can only be used as a package option (and can’t - be set with \glossariesextrasetup) since the glossaries-accsupp package must - be loaded before glossaries-extra if it’s required. -

-stylemods
This is a ⟨key⟩=⟨value⟩ option used to load the glossaries-extra-stylemods - package. The value may be a comma-separated list of options to pass to that - package. (Remember to group ⟨value⟩ if it contains any commas.) The value may - be omitted if no options need to be passed. See §2.11 Glossary - Style Modifications for further details. There are two special keyword values: - stylemods=default (equivalent to omitting the value) and stylemods=all, which - loads all the predefined styles. -
-undefaction
This is a ⟨key⟩=⟨value⟩ option, which has two allowed values: warn and - - - - error. This indicates what to do if an undefined glossary entry is referenced. The - default behaviour is undefaction=error, which produces an error message (the - default for glossaries). You can switch this to a warning message (and ?? - appearing in the text) with undefaction=warn. -

Undefined entries can’t be picked up by any commands that iterate - over a glossary list. This includes \forglsentries and \glsaddall. -
-

-

Note that \ifglsused will display ?? in the document text with undefaction=warn - if the entry hasn’t been defined, as the underlying boolean variable - doesn’t exist and so is neither true nor false. (There will also be a - warning in the transcript.) See §2.6 First Use Flag for further - details. -

-indexcrossrefs
This is a boolean option. If 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 false, - but it will be automatically switched on if you use the see or seealso keys - in any entries (unless autoseeindex=false). To force it off, even if you - use the see or seealso key, you need to explicitly set indexcrossrefs to - false. -

Note that bib2gls can automatically find dependent entries when it - parses the .bib source file. The record option automatically implements - indexcrossrefs=false. -

-autoseeindex
(New to v1.16.) This is a boolean option. If true (default), this makes - the see and seealso keys automatically index the cross-reference when an entry - is defined. If false, the value of those keys will still be stored in their - corresponding fields (and can be accessed using commands like \glsxtrusesee - and \glsxtruseseealso) but cross-reference won’t be automatically - indexed. -

Note that the record=only option automatically implements autoseeindex=false. -

For example, if an entry is defined as - - - -

-
-     \newglossaryentry{foo}{name={foo},description={},see={bar,baz}}
-
-

then with autoseeindex=true, this is equivalent to - - - -

-
-     \newglossaryentry{foo}{name={foo},description={}}
-     \glssee{foo}{bar,baz}
-     \glossariesextrasetup{indexcrossrefs=true}
-     \GlsXtrSetField{foo}{see}{bar,baz}
-
-

but with autoseeindex=false, this is equivalent to - - - -

-
-     \newglossaryentry{foo}{name={foo},description={}}
-     \GlsXtrSetField{foo}{see}{bar,baz}
-
-

Note that indexcrossrefs isn’t automatically implemented by the presence of the - see key when autoseeindex is false. -

It’s therefore possible to remove the cross-references from the location lists and - set their position within the glossary style. -

Another method of preventing the automatic indexing is to define the entries - before the external indexing files have been opened with \makeglossaries. - Since the appropriate file isn’t open, the information can’t be written to it. - This will need the package option seenoindex=ignore (provided by glossaries) to - prevent an error occurring. -

-record
(New to v1.08.) This is a ⟨key⟩=⟨value⟩ option provided for the benefit of - bib2gls (see §10 bib2gls: Managing Reference Databases). If you - want to use bib2gls, the recommended setting is record=nameref if you have - hyperlinks and record=only if you don’t have hyperlinks. -

The option may only be set in the preamble and can’t be used after - \GlsXtrLoadResources. If the value is missing record=only is assumed. - Permitted values: -

- off
This is the default setting. The indexing is performed as normal using - either \makeglossaries or \makenoidxglossaries. This setting - implements undefaction=error. -
- only
The indexing (recording) is performed by - bib2gls (see §10 bib2gls: Managing Reference Databases). - Neither \makeglossaries nor \makenoidxglossaries is permitted. - This setting implements undefaction=warn and automatically loads - the supplementary glossaries-extra-bib2gls package. (There should be - no need to explicitly load glossaries-extra-bib2gls.) -

The glossaries should be displayed using \printunsrtglossary (or - \printunsrtglossaries). -

The document build process is (assuming the file is called myDoc.tex): - - - -

-
-         pdflatex myDoc
-         bib2gls myDoc
-         pdflatex myDoc
-
-

If you want letter groups you will need the --group or -g switch when - invoking bib2gls: - - - -

-
-         pdflatex myDoc
-         bib2gls -g myDoc
-         pdflatex myDoc
-
-

-

Note that record=only will prevent the see from automatically - implementing \glssee. (bib2gls deals with the see field.) You - may explicitly use \glssee in the document, but bib2gls will - ignore the cross-reference if the see field was already set for that - entry. -

The record=only option will automatically set the glossaries package’s - sort=none option if available. (That option value was only introduced to - glossaries v4.30.) -

- nameref
(New to v1.37 and requires bib2gls v1.8+.) This option is like - record=only but additionally records the current label information given by - \@currentlabel and \@currentHref, and provides a more reliable way of - saving the \theHcounter⟩ for the given location. This option requires - hyperref otherwise it will fall back on the usual location records. - Remember that \@currentHref is always globally updated whenever - \refstepcounter is used, but \@currentlabel isn’t. This can cause some - undesired side-effects with some settings. Remember also that the - indexcounter option increments the associated counter every time an entry - is indexed, which affects this option. See §10.3.2 Nameref - Record for further details. -

This option is best used with counter=chapter or counter=section if you - want the title included in the location list. If the indexing counter is the - default page, only the location number is shown. Similarly for - counter=equation (or equations=true). -

- alsoindex
Deprecated synonym of hybrid. -
- hybrid
This is a hybrid setting that uses bib2gls to fetch entry information - from .bib files, but uses makeindex or xindy to create the glossary files - (which are input with \printglossary). Note that this requires a slower - and more complicated build process (see below). -

This hybrid approach is provided for the rare instances where an existing - xindy rule or module is too complicated to convert to a bib2gls rule but - the entries need to be fetched from a bib file. There’s no benefit in using - this option with makeindex. - - - -

Since it’s redundant to make bib2gls also sort, use sort=none in - \GlsXtrLoadResources for a faster build.
-

-

This option must be used with \makeglossaries but not with its optional - argument. This option should not be used with \makenoidxglossaries. - You may need to change the transcript file used by bib2gls to avoid a - clash with the transcript file used by makeindex or xindy. (This can be - done with bib2gls’s --log-file or -t option.) -

Each glossary should be displayed using \printglossary (or - \printglossaries for all of them). This option is expected to be used - with bib2gls’s sort=none setting and so glossaries-extra-bib2gls is not - automatically loaded. -

The document build process is (assuming the file is called myDoc.tex): - - - -

-
-         pdflatex myDoc
-         bib2gls myDoc
-         pdflatex myDoc
-         makeglossaries myDoc
-         pdflatex myDoc
-
-

Note that, in this case, it’s redundant to call bib2gls with the --group - or -g switch as makeindex/xindy will insert the group heading - information into the corresponding glossary file. (If you want - bib2gls to form the letter groups then this hybrid method is - inappropriate.)

-

With the recording on (record=only, record=nameref or record=hybrid), any of - the commands that would typically index the entry (such as \gls, \glstext or - \glsadd) will add a \glsxtr@record entry to the .aux file. bib2gls can then - read these lines to find out which entries have been used. (Remember that - commands like \glsentryname don’t index, so any use of these commands - won’t add a corresponding \glsxtr@record entry to the .aux file.) - See §10 bib2gls: Managing Reference Databases for further - details. -

The hybrid method additionally performs the standard indexing action that’s - required for makeindex or xindy to work. -

-equations
(New to v1.37.) This option will cause the default location counter to - automatically switch to equation when inside a numbered equation - environment, such as equation or align. The counter can be explicitly overridden - with counter in the optional arguments of commands like \glslink or \gls as - usual. -
-floats
(New to v1.37.) This option will cause the default location counter to - automatically switch to the corresponding counter when inside a floating - environment, such as figure or table. The counter can be explicitly overridden - with counter in the optional arguments of commands like \glslink or \gls as - usual. Remember that within floats it’s the \caption command that actually - uses \refstepcounter, so indexing before the caption will result in the wrong - reference. The commands for use in captions and sections, such as - \glsfmttext and \glsfmtshort, don’t index. (See §5 - Entries in Sectioning Titles, Headers, Captions and Contents). You may - want to consider using \glsadd after the caption (not before). For - example: - - - -
-     \begin{figure}[htbp]
-       \centering
-       \includegraphics{example-image}
-       \caption{Sample \glsfmttext{foobar} figure}
-       \glsadd{foobar}
-     \end{figure}
-
-

-

-indexcounter
(New to v1.29.) This option (which doesn’t take a value) is primarily - intended for use with bib2gls (v1.4+) and hyperref. It can be used - with makeindex or xindy but it will interfere with the number list - collation, so you won’t have ranges and you’ll have duplicate page numbers - present (but each page number will link to the relevant part of the page - where the indexing occurred). This option automatically implements - counter=wrglossary. -

This option works by incrementing wrglossary and adding \label. This can - cause a problem if the indexing occurs in an equation environment as amsmath - forbids multiple occurrences of \label (resulting in the “Multiple \label’s” - error). It’s best to change the counter to page or equation when in maths mode - with this option. For example: - - - -

-
-     \renewcommand{\glslinkpresetkeys}{%
-      \ifmmode \setkeys{glslink}{counter=equation}\fi}
-     \renewcommand{\glsaddpresetkeys}{%
-      \ifmmode \setkeys{glossadd}{counter=equation}\fi}
-
-

-

-

By default (with hyperref), the page numbers in number lists link back to the - top of the relevant page (provided the format uses \glshypernumber). The - indexcounter option is designed to link back to the place within the page where - the indexing occurred. It does this by creating a new counter (called wrglossary) - that’s incremented with \refstepcounter every time an entry is indexed (but - not via cross-referencing commands, such as \glssee). A \label is placed - immediately after the increment command allowing the back-referenced to be - obtained with \pageref. The location, as seen by the indexing application, is - the value of the wrglossary counter but this value is substituted with the page - reference when number list is typeset. Since the counter is used by all - entries and is incremented every time any indexing occurs, neither - makeindex nor xindy can correctly collate the lists. For example, if the first - term to be referenced is indexed three times on page 5 without any - intervening terms then the actual locations obtained from wrglossary - will be 1, 2 and 3, which xindy and makeindex will try to form into - the range 1–3, but they should actually all simply appear as page 5, - whereas it can actually end up with 5–5. Conversely, a range may not be - formed where it would naturally occur if just the page counter was - used. -

Since bib2gls is designed specifically to work with glossaries-extra, - bib2gls (v1.4+) will check for wrglossary locations. If the default - --merge-wrglossary-records is on, then any records for the same page - for a given entry will be merged. In the above example with three - references on page 5, only a single record for page 5 for that entry will be - added to the number list and it will link back to the first instance on - that page. Whereas if you use the --no-merge-wrglossary-records - switch, the number list will contain three instance of page 5, with - each linking to the corresponding place on that page. In both cases, - consecutive pages can form ranges, but it may look strange in the second - case. -

See the bib2gls documentation for the save-index-counter resource option - for more details. - - - -

-docdef
This option governs the use of \newglossaryentry. It was originally a - boolean option, but as from version 1.06, it can now take one of the following - values (if the value is omitted, true is assumed): -
    -
  • docdef=false: \newglossaryentry is not permitted in the document - environment (default). -
  • -
  • docdef=true: \newglossaryentry behaves as it does in the base - glossaries package. That is, where its use is permitted in the document - environment, it uses the .glsdefs temporary file to store the entry - definitions so that on the next LaTeX run the entries are defined at - the beginning of the document environment. This allows the entry - information to be referenced in the glossary, even if the glossary - occurs before \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 - glossaries user manual. -

    Remember that if \newglossaryentry wouldn’t be allowed in the - document environment with the base glossaries package, then it still - won’t be allowed with docdefs=true. If your glossaries occur at the - end of the document, consider using docdef=restricted instead. -

  • -
  • docdef=restricted: (new to version 1.06) \newglossaryentry is - permitted in the document environment without using the .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 ⟨key⟩=⟨value⟩ mechanism (that is, the comma and equal sign) and - any makeindex or xindy character that occurs in the 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 \newglossaryentry to be used in the document with - \makenoidxglossaries, but note that \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 undefaction=warn - 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 .aux and .gls files). -

  • -
  • docdef=atom: (new to version 1.34) This option behaves like - - - - docdef=restricted but creates the .glsdefs file for atom’s - autocomplete support. This file isn’t input by glossaries-extra and - so associated problems with the use of this file are avoided, but it - allows the autocomplete support to find the labels in the file. As - with docdef=restricted, entries may be defined in the preamble or - anywhere in the document, but they may only be referenced after - they have been defined. Entries must be defined before the associated - glossary is displayed. -

    If you need a list of all entry labels for the use of an editor or helper - script you may also want to consider the package options writeglslabels - and writeglslabelnames provided by the base glossaries package. Note - that with these options and docdef=atom, only the entry labels visible - to LaTeX can be saved. So if you are using bib2gls you will only - get the labels of the entries that are selected by bib2gls. -

    -
-

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

This option affects commands that internally use \newglossaryentry, such as - \newabbreviation, but not the “on-the-fly” commands described in - §12 On-the-Fly Document Definitions. -

-nomissingglstext
This is a boolean option. If true, this will suppress the - warning written to the transcript and 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. -
-abbreviations
This option has no value and can’t be cancelled. If used, it will - automatically create a new glossary with the label abbreviations and - redefines \glsxtrabbrvtype to this label. (The file extensions are glg-abr, - gls-abr and glo-abr.) In addition, this option defines a shortcut - - - - command -


\printabbreviations[options]

-

- which is equivalent to

-
- \printglossary[type=\glsxtrabbrvtype,options] -
-
If glossaries-extra-bib2gls is also loaded then this option will additionally - provide: -


\printunsrtabbreviations[options]

-

- which uses \printunsrtglossary. -

The title of the new glossary is given by -


\abbreviationsname

-

- If this command is already defined, it’s left unchanged. Otherwise it’s defined to - “Abbreviations” if babel hasn’t been loaded or \acronymname if babel has - been loaded. However, if you’re using babel it’s likely you will need - to change this. (See §15 Multi-Lingual Support for further - details.) -

If you don’t use the abbreviations package option, the \abbreviationsname - command won’t be defined (unless it’s defined by an included language file). -
-

-

If the abbreviations option is used and the acronym option provided by the - glossaries package hasn’t been used, then \acronymtype will be set to - \glsxtrabbrvtype so that acronyms defined with \newacronym can be added - to the list of abbreviations. If you want acronyms in the main glossary and - other abbreviations in the abbreviations glossary then you will need to - redefine \acronymtype to main: - - - -

-
-     \renewcommand*{\acronymtype}{main}
-
-

-

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

-symbols
This is passed to glossaries but will additionally define -


\glsxtrnewsymbol[options]{label}{symbol}

-

- which is equivalent to

-
- \newglossaryentry{label}{name={symbol}, -
 sort={label},type=symbols,category=symbol,options} -
-
Note that the sort key is set to the ⟨label⟩ not the ⟨symbol⟩ as the symbol will - likely contain commands. -

If glossaries-extra-bib2gls is also loaded then this option will additionally - provide: -


\printunsrtsymbols[options]

-

- which uses \printunsrtglossary. -

-numbers
This is passed to glossaries but will additionally define -


\glsxtrnewnumber[options]{number}

-

- which is equivalent to

-
- \newglossaryentry{label}{name={number}, -
 sort={label},type=numbers,category=number,options} - - - -
-
-

If glossaries-extra-bib2gls is also loaded then this option will additionally - provide: -


\printunsrtnumbers[options]

-

- which uses \printunsrtglossary. -

-acronyms (or acronym)
This is passed to glossaries but if glossaries-extra-bib2gls is - also loaded then this option will additionally provide: -


\printunsrtacronyms[options]

-

- which uses \printunsrtglossary. -

This option defines a new glossary with the label acronym not acronyms. You - may find it easier to reference it with the command \acronymtype. -
-

-

-index
This is passed to glossaries but if glossaries-extra-bib2gls is also loaded then this - option will additionally provide: -


\printunsrtindex[options]

-

- which uses \printunsrtglossary. -

-shortcuts
Unlike the glossaries package option of the same name, this option isn’t - boolean but has multiple values: -
    -
  • shortcuts=acronyms (or shortcuts=acro): set the shortcuts provided - by the glossaries package for acronyms (such as \ac). Note that the - short and long forms don’t use \glsxtrshort and \glsxtrlong but - use the original \acrshort and \acrlong, which don’t recognise - multiple abbreviation styles. The better option with glossaries-extra - is shortcuts=ac. -
  • -
  • shortcuts=ac: set the shortcuts provided by the glossaries package for - acronyms (such as \ac) but uses the glossaries-extra interface (such - as \glsxtrshort rather than \acrshort). In this case \ac is defined - as \cgls rather than \gls. - - - -
  • -
  • shortcuts=abbreviations (or shortcuts=abbr): set the abbreviation - shortcuts provided by glossaries-extra. (See §4.3 - Shortcut Commands.) These settings don’t switch on the acronym - shortcuts provided by the glossaries package. -
  • -
  • shortcuts=other: set the “other” shortcut commands, but not the shortcut - commands for abbreviations or the acronym shortcuts provided by - glossaries. The “other” shortcuts are: -
      -
    • \newentry equivalent to \newglossaryentry -
    • -
    • \newsym equivalent to \glsxtrnewsymbol (see the symbols - option). -
    • -
    • \newnum equivalent to \glsxtrnewnumber (see the numbers - option).
    -
  • -
  • shortcuts=all (or shortcuts=true): implements shortcuts=ac, - shortcuts=abbreviations and shortcuts=other. -
  • -
  • shortcuts=none (or shortcuts=false): don’t define any of the shortcut - commands (default). -
-

Note that multiple invocations of the shortcuts option within the same option - list will override each other. -

-
-

After the glossaries-extra package has been loaded, you can set available options -using -


\glossariesextrasetup{options}

-

-The abbreviations and docdef options may only be used in the preamble. Additionally, -docdef can’t be used after \makenoidxglossaries. - - - -

-

-

Top

2. Modifications to Existing Commands and Styles

-

-

Top

2.1 Defining Entries

-

The glossaries package provides \nopostdesc which may be used in the description to -suppress the post-description hook. The glossaries-extra package provides another -command -


\glsxtrnopostpunc

-

-which has a similar function but only suppresses the post-description punctuation. It -doesn’t suppress the use of \glsxtrpostdescription which allows the use of -category-dependent post-description hooks. (Note that the punctuation, -which is in the original base hook \glspostdescription, comes after the -extended post-description hook \glsxtrpostdescription not before.) The -post-description hook can counter-act the effect of \glsxtrnopostpunc -using -


\glsxtrrestorepostpunc

-

-These commands have no effect outside of the glossary (except with standalone -entries that use \glsxtractivatenopost and \glspostdescription, see -§11.4 Standalone Entry Items). -

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

The \newglossaryentry command has three new keys:

-
    -
  • category, which sets the category label for the given entry. By default this - is general. See §7 Categories for further information about - categories. -
  • -
  • alias, which allows an entry to be alias to another entry. See §11.5 - Entry Aliases for further details. -
  • -
  • seealso, which performs much like see, but allows for separate “see” and - “see also” treatment. See §2.3 Cross-References (“see” and “see - also”) for further details.
-

This apply to all entry defining commands (such as \newabbreviation). -

The test file example-glossaries-xr.tex contains dummy entries with a -mixture of see, alias and seealso keys for use with minimal working examples. -There are also example-glossaries-*.bib files that correspond to each -example-glossaries-*.tex file for testing bib2gls. - - - -

The \longnewglossaryentry command now has a starred version (as from v1.12) -that doesn’t automatically insert - - - -

-
-\leavevmode\unskip\nopostdesc
-
-

at the end of the description field. -


\longnewglossaryentry*{label}{options}{description}

-

-The descriptionplural key is left unset unless explicitly set in ⟨options⟩. -

The unstarred version no longer hard-codes the above code (which removes -trailing space and suppresses the post-description hook) but instead uses: -


\glsxtrpostlongdescription

-

-This can be redefined to allow the post-description hook to work but retain the -\unskip part if required. For example: - - - -

-
-\renewcommand*{\glsxtrpostlongdescription}{\leavevmode\unskip}
-
-

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 glossaries package’s treatment of the -descriptionplural key. Since a plural description doesn’t make much sense for -multi-paragraph descriptions, the default behaviour with glossaries-extra’s -\longnewglossaryentry is to simply leave the plural description unset -unless explicitly set using the descriptionplural key. The glossaries.sty version -of this command sets the description’s plural form to the same as the -singular.2.1 -

Note that this modified unstarred version doesn’t append \glsxtrpostlongdescription -to the description’s plural form. -

The \newterm command (defined through the index package option) is modified -so that the category defaults to index. The \newacronym command is modified to use -the new abbreviation interface provided by glossaries-extra. (See §4 -Abbreviations.) -

The \makeglossaries command now has an optional argument. -


\makeglossaries[list]

-

-If ⟨list⟩ is empty, \makeglossaries behaves as per its original definition in the -glossaries package, otherwise ⟨list⟩ can be a comma-separated list of glossaries that -need processing with an external indexing application. -

This command is not permitted with the record=only package option. Without -the optional argument, it’s required with record=hybrid. With the optional argument, -it’s only permitted with the default record=off. -

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

If you use the optional argument ⟨list⟩, you can’t define entries in the document -(even with the docdef option).
-

-

You will need at least version 2.20 of makeglossaries or at least version 1.3 of -the Lua alternative makeglossaries-lite (both distributed with glossaries v4.27) to -allow for this use of \makeglossaries[list]. Alternatively, use the automake -option. -

-

- - - -

Top

2.2 Entry Indexing

-

As from version 1.31, there is a new command like \glsadd where the mandatory -argument is a comma-separated list of labels: -


\glsaddeach[options]{list}

-

-This simply iterates over ⟨list⟩ and does \glsadd[options]{label} for each entry in the -list. -

As from version 1.37, you can make commands like \gls or \glslink -automatically use \glsadd with specific options when a given format is used -(identified with format={format} in the optional argument of the corresponding -\gls, \glslink etc). -


\GlsXtrAutoAddOnFormat[label]{format list}{glsadd options} -

-

-The optional argument ⟨label⟩ defaults to \glslabel and indicates the label to use in -\glsadd and so needs to be expandable. The ⟨format list⟩ is a comma-separated list of -format values that will trigger the automated adding. The ⟨glsadd options⟩ are -the options to pass to \glsadd with format={format} prepended to the -list. -

For example, with: - - - -

-
-\GlsXtrAutoAddOnFormat{hyperbf}{counter=chapter}
-
-

then \gls[format=hyperbf]{sample} will be equivalent to - - - -

-
-\glsadd[format=hyperbf,counter=chapter]{sample}\gls[format=hyperbf]{sample}
-
-

Note that the explicit range markers will prevent a match unless you include -them in ⟨format list⟩ (in which case, be sure to add both the start and end -formats). -

Here’s another example: - - - -

-
-\GlsXtrAutoAddOnFormat[dual.\glslabel]{hyperbf}{}
-
-

In this case \gls[format=hyperbf]{sample} will now be equivalent to: - - - -

-
-\glsadd[format=hyperbf]{dual.sample}\gls[format=hyperbf]{sample}
-
-

-

\GlsXtrAutoAddOnFormat is not applied to \glsadd as it could cause an infinite -loop.
-

-

The glossaries-extra package provides extra keys for commands like \gls and -\glstext: -

-noindex
This is a boolean key. If true, this suppresses the indexing. (That is, - it prevents \gls or whatever from adding a line to the external glossary - file.) This is more useful than the indexonlyfirst package option provided - by glossaries, as the first use might not be the most pertinent use. (If you - want to apply indexonlyfirst to selected entries, rather than all of them, - you can use the indexonlyfirst attribute, see §7 Categories - for further details.) Note that the noindex key isn’t available for \glsadd - (and \glsaddall) since the whole purpose of that command is to index - an entry. -
-wrgloss
(New to v1.14.) This is may only take the values before or after. By - default, commands that both index and display link text (such as \gls, - \glstext and \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 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 noindex). -

The default value is set up using -


\glsxtrinitwrgloss

-

- which is defined as: - - - -

-
-     \newcommand*{\glsxtrinitwrgloss}{%
-      \glsifattribute{\glslabel}{wrgloss}{after}%
-      {%
-        \glsxtrinitwrglossbeforefalse
-      }%
-      {%
-        \glsxtrinitwrglossbeforetrue
-      }%
-     }
-
-

This sets the conditional -


\ifglsxtrinitwrgloss

-

- which is used to determine where to perform the indexing. -

This means you can set the wrgloss attribute to after to automatically use this - as the default for entries with that category attribute. (Note that adding - wrgloss to the default options in \GlsXtrSetDefaultGlsOpts will override - \glsxtrinitwrgloss.) -

-hyperoutside
(New to v1.21.) This is a boolean key. The default is hyperoutside=true, - which puts the hyperlink outside \glstextformat, so that commands like \gls - will effectively do
-
- \hyperlink{target}{\glstextformat{link text}} -
-
This is the same behaviour as with the base glossaries package. With - hyperoutside=false, \hyperlink is placed inside the argument of - \glstextformat:
-
- \glstextformat{\hyperlink{target}{link text}} -
-
You can use the hyperoutside category attribute to set the default for a - given category. This can be combined with the use of the textformat - attribute to counteract any interference caused by \hyperlink. For - example: - - - -
-     \glssetcategoryattribute{mathrelation}{hyperoutside}{false}
-
-

will set hyperoutside=false for all entries that are assigned to the category - mathrelation and - - - -

-
-     \glssetcategoryattribute{mathrelation}{textformat}{mathrel}
-
-

will use \mathrel instead of \glstextformat resulting in:

-
- \mathrel{\hyperlink{target}{link text}} -
-
for entries with the category key set to mathrelation. -
-textformat
This key must have a control sequence name as its value. The command - formed from this name must exist and must take one argument. (Use relax for - default behaviour.) If set, this overrides the textformat attribute and - \glstextformat. See the soul example in §2.6 First Use - Flag. -
-prefix
Locally redefines \glolinkprefix to the given value. It should match the - prefix for the desired glossary. -
-thevalue
Explicitly set the location to this value (see below). -
-theHvalue
Set the corresponding hyperlink location (see below). -
-

You can set the default options used by \glslink, \gls etc with: -


\GlsXtrSetDefaultGlsOpts{options}

-

-For example, if you mostly don’t want to index entries then you can do: - - - -

-
-\GlsXtrSetDefaultGlsOpts{noindex}
-
-

and then use, for example, \gls[noindex=false]{sample} when you actually want -the location added to the number list. 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 \glslink and \gls. -

Note that if you don’t want any indexing, just omit \makeglossaries and -\printglossaries (or analogous commands). If you want to adjust the -default for wrgloss, it’s better to do this by redefining \glsxtrinitwrgloss -instead. -

\GlsXtrSetDefaultGlsOpts doesn’t affect \glsadd.
-

-

If you want to change the default value of format, you can instead use: -


\GlsXtrSetDefaultNumberFormat{format}

-

-This has the advantage of also working for \glsadd. For example, if you -want all locations in the back matter to appear in italic (unless explicitly -overridden): - - - -

-
-\backmatter
-\GlsXtrSetDefaultNumberFormat{hyperit}
-
-

-

Commands like \gls have star (*) and plus (+) modifiers as a short cut for -hyper=false and hyper=true. The glossaries-extra package provides a way to add a -third modifier, if required, using -


\GlsXtrSetAltModifier{char}{options}

-

-where ⟨char⟩ is the character used as the modifier and ⟨options⟩ is the default set of -options (which may be overridden). Note that ⟨char⟩ must be a single character (not a -UTF-8 character, unless you are using XƎLATEX or LuaLATEX). -

When choosing the character ⟨char⟩ take care of any changes in category code. -
-

-

Example: - - - -

-
-\GlsXtrSetAltModifier{!}{noindex}
-
-

This means that \gls!{sample} will be equivalent to \gls[noindex]{sample}. It’s -not possible to mix modifiers. For example, if you want to do - - - -

-
-\gls[noindex,hyper=false]{sample}
-
-

you can use \gls*[noindex]{sample} or \gls![hyper=false]{sample} but you -can’t combine the * and ! modifiers. -

There is a new hook that’s used each time indexing information is written to the -external glossary files: -


\glsxtrdowrglossaryhook{label}

-

-where ⟨label⟩ is the entry’s label. This does nothing by default but may be redefined. -(See, for example, the accompanying sample file sample-indexhook.tex, which uses -this hook to determine which entries haven’t been indexed.) -

There’s also a new hook (from v1.26) that’s used immediately before the options -are set by the \gls-like and \glstext-like commands: -


\glslinkpresetkeys

-

-(The base package provides \glslinkpostsetkeys that’s used immediately after the -options are set.) -

As from version 1.30 there are also similar hooks for \glsadd: -


\glsaddpresetkeys

-

-and -


\glsaddpostsetkeys

-

-For example, to default to using the equation counter in maths mode: - - - -

-
-\renewcommand{\glslinkpresetkeys}{%
- \ifmmode \setkeys{glslink}{counter=equation}\fi}
-\renewcommand{\glsaddpresetkeys}{%
- \ifmmode \setkeys{glossadd}{counter=equation}\fi}
-
-

In this case, the counter can be overridden with an explicit use of counter in the -optional argument of \gls or \glsadd. (As from version 1.37, a simpler method is to -just use the equations package option.) -

Alternatively, to enforce this (overriding the option argument): - - - -

-
-\renewcommand{\glslinkpostsetkeys}{%
- \ifmmode \setkeys{glslink}{counter=equation}\fi}
-\renewcommand{\glsaddpostsetkeys}{%
- \ifmmode \setkeys{glossadd}{counter=equation}\fi}
-
-

-

As from version 1.14, there are two new keys for \glsadd: thevalue and theHvalue. -These keys are designed for manually adding explicit locations rather than obtaining -the value from the associated counter. As from version 1.19, these two keys are also -available for commands like \gls and \glslink. The thevalue keys is intended -primarily for adding locations in supplementary material that can’t be obtained from -a counter. -

The principle key thevalue is for the location value. The other key theHvalue can -be used to extract a prefix value for the first argument of commands like -\glsnoidxdisplayloc. Its value must be in the format ⟨prefix⟩⟨location⟩. In general, -there’s little need for this key as the prefix is typically associated with a counter that -can be used to form hypertargets. -

If you use thevalue, you must make sure that you use an indexing application -that will accept the given value.
-

-

For example, makeindex will only accept locations in the form [⟨num⟩⟨sep⟩]*⟨num⟩ -where ⟨num⟩ is an arabic number (0, 1, …), roman numeral (i, ii, … or I, II, …) or a -character from a, …, z or A, …, Z, and [⟨num⟩⟨sep⟩]* indicates zero or more -instances of a number followed by the recognised separator character (set -with \glsSetCompositor). This means that makeindex won’t accept, for -example, - - - -

-
-\glsadd[thevalue={Supplementary Material}]{sample}
-
-

This location value will be accepted by bib2gls, since it will allow any location and -will only try forming ranges if the location matches any of its numerical patterns. -In the case of xindy, you’ll need to add a rule that can match the value. -If you’re using hyperref, you may need to use the format key to prevent a -hyperlink if one can’t naturally be formed from the prefix, counter and location -value. -

For example, suppose the file suppl.tex contains: - - - -

-
-\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}
-
-

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 thevalue to S.2. For -example: - - - -

-
-\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}
-
-

This location value will be accepted by makeindex as it’s in the form ⟨num⟩⟨sep⟩⟨num⟩. -

If you want hyperlinks, things are more complicated. First you need to set the -externallocation attribute to the location of the PDF file. For example: - - - -

-
-\glssetcategoryattribute{supplemental}{externallocation}{suppl.pdf}
-\newglossaryentry{sample}{category=supplemental,
- name={sample},description={an example}}
-
-

Next you need to add glsxtrsupphypernumber as the format: - - - -

-
-\glsadd[thevalue={S.2},format=glsxtrsupphypernumber]{sample}
-
-

Both documents will need to use the hyperref package. Remember that the counter -used for the location also needs to match. If \theHcounter⟩ is defined in the other -document and doesn’t match in the referencing document, then you need to use -theHvalue to set the appropriate value. See the accompanying sample files -sample-suppl-hyp.tex and sample-suppl-main-hyp.tex for an example that uses -hyperref. -

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

-

For example, if both sample-suppl-hyp.pdf and sample-suppl-main-hyp.pdf -are in the same directory, then viewing sample-suppl-main-hyp.pdf in Evince will -take you to the correct location in the linked document (when you click on the S.2 -external link), but Okular will take you to the top of the first page of the linked -document. -

This method can only be used where there is one external source for the -designated category (identified by the externallocation attribute). For multiple -sources, you need to use bib2gls version 1.7+, which is the better method in -general as it can automatically fetch the relevant locations from the .aux files -of the designated external documents without the need to explicitly use -\glsadd. -

-

-

Top

2.3 Cross-References (“see” and “see also”)

-

The value of the see key is now saved as a field. This isn’t the case with -glossaries, where the see value is simply used to directly write a line to the -corresponding glossary file and is then discarded. This is why the see key -can’t be used before \makeglossaries (since the file hasn’t been opened -yet). -

This modification allows glossaries-extra to provide -


\glsxtraddallcrossrefs

-

-which is used at the end of the document to automatically add any unused -cross-references unless the package option indexcrossrefs was set to false. - - - -

Note that even though the see key will now work for entries defined in the -document environment, it’s still best to define entries in the preamble, and -the see key still can’t perform any indexing before the file has been opened -by \makeglossaries. Note that glossaries v4.24 introduced the seenoindex -package option, which can be used to suppress the error when the see key -is used before \makeglossaries, so seenoindex=ignore will allow the 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 -


\glsxtrusesee{label}

-

-This internally uses -


\glsxtruseseeformat{tag}{xr list}

-

-where ⟨tag⟩ and ⟨xr list⟩ are obtained from the value of the entry’s see field (if -non-empty). By default, this just does \glsseeformat[tag]{xr list}{}, -which is how the cross-reference is displayed in the number list. Note that -\glsxtrusesee does nothing if the see field hasn’t been set for the entry given by -⟨label⟩. -

As with the base glossaries package, \glsseeformat is defined to do \emph{tag} -\glsseelist{xr list}. The third argument is always ignored and is present for -makeindex, which always requires a final argument to encapsulate the associated -location. The command -


\glsseelist{xr list}

-

-used to iterate over the list of cross-reference labels is also unchanged from -the base glossaries package, with each item in the list formatted according -to: -


\glsseeitem{label}

-

-This is defined by the glossaries package to:

-
-\glshyperlink[\glsseeitemformat{label}]{label} -
-
So the actual formatting for each cross-referenced entry is performed by -\glsseeitemformat, which is redefined by glossaries-extra, as described in -§2 Modifications to Existing Commands and Styles. This now -displays the value of the text field for abbreviations and the value of the name field -otherwise. There’s no indication of the entry hierarchy, which could confuse -the reader. Therefore, as from glossaries-extra v1.37, there are some new -commands that include the hierarchical information. You may prefer to -redefine \glsseeitemformat to use one of this if you have sub-entries. For -example: - - - -
-\renewcommand*{\glsseeitemformat}[1]{\glsxtrhiername{#1}}
-
-

-

The glossaries package provides -


\glsseeitemformat{label}

-

-to format items in a cross-reference list (identified with the see key or \glssee). This -was originally defined to use \glsentryname{label} since it makes more sense for the -cross-reference to match the way the term appears in the glossary. Unfortunately this -caused a problem when the name field was sanitized, which used to be the default -setting, so glossaries v3.0 changed the default definition of this command to -use \glsentrytext instead. Since the name and text field are quite often -the same, this change usually doesn’t have a noticeable effect. However, -now that the name field is no longer sanitized (following the redesign of -glossaries v4.0) it makes more sense to restore this command to its original -behaviour, but to take account of abbreviations glossaries-extra redefines this -as: - - - -

-
-\renewcommand*{\glsseeitemformat}[1]{%
- \ifglshasshort{\glslabel}{\glsfmttext{#1}}{\glsfmtname{#1}}%
+
+

+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).

+ + + +

+

4.5.1.1. Regular Styles

+

+The following abbreviation styles set the regular attribute to true for all categories that have abbreviations defined with any of these styles. This means that they are treated like ordinary entries and are encapsulated with \glsxtrregularfont not \glsxtrabbreviationfont. The \gls-like commands are formatted according to \glsgenentryfmt.

+ +

+ +
+
4.5.1.1.1. Short Styles
+

+These styles only show the short form on both first use and subsequent use. See §4.5.1.3.1 and §4.5.1.3.5 for style commands.

+

+short-nolong
+ Only the short form is shown on first use of the \gls-like commands. The inline full form uses the same parenthetical style as short-long (\glsxtrshortlongformat). Font variations are available with short-sc-nolong, short-sm-nolong and short-em-nolong.

+

\setabbreviationstyle{short-nolong}

+\newabbreviation{ex}{SHRT FM}{long form}

+\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. +First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document} +

+Example 8: The short-nolong abbreviation style 📥🖹 📥🖺

+Example document demonstrating the short-nolong abbreviation style.

+

+The long form is formatted with \glslongdefaultfont for the \glsxtrlong set of commands.

+The short form is formatted with \glsfirstabbrvdefaultfont within the full form and with \glsabbrvdefaultfont for subsequent use and for the \glsxtrshort set of commands.

+The name is set to the short form (\glsxtrshortnolongname) and the description is set to the unencapsulated long form.

+

+shortalias: short-nolong; alias: short-nolong
+ A synonym for short-nolong.

+

+short-nolong-desc
+ As short-nolong but the description must be supplied in the optional argument of \newabbreviation. Font variations are available with short-sc-nolong-desc, short-sm-nolong-desc and short-em-nolong-desc.

+

\setabbreviationstyle{short-nolong-desc}

+\newabbreviation[description={sample description}]
{ex}{SHRT FM}{long form}

+\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. +First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document} +

+Example 9: The short-nolong-desc abbreviation style 📥🖹 📥🖺

+Example document demonstrating the short-nolong-desc abbreviation style.

+

+The name is set to the short form followed by the long form in parentheses (\glsxtrshortdescname), and the sort is set to just the short form.

+

+short-descalias: short-nolong-desc; alias: short-nolong-desc
+ A synonym for short-nolong-desc.

+

+nolong-short
+ The same as short-nolong except for the inline full form, which shows the same parenthetical style as long-short (\glsxtrlongshortformat). Font variations are available with nolong-short-sc, nolong-short-sm and nolong-short-em.

+

\setabbreviationstyle{nolong-short}

+\newabbreviation{ex}{SHRT FM}{long form}

+\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. +First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document} +

+Example 10: The nolong-short abbreviation style 📥🖹 📥🖺

+Example document demonstrating the nolong-short abbreviation style.

+

+

+short-sc-nolong
+ This style is like short-nolong but it uses \glsxtrscsuffix, \glsabbrvscfont and \glsfirstabbrvscfont (see §4.5.1.3.9).

+

\setabbreviationstyle{short-sc-nolong}

+\newabbreviation{ex}{shrt fm}{long form}

+\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. +First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document} +

+Example 11: The short-sc-nolong abbreviation style 📥🖹 📥🖺

+Example document demonstrating the short-sc-nolong abbreviation style.

+

+

+short-scalias: short-sc-nolong; alias: short-sc-nolong
+ A synonym for short-sc-nolong.

+

+short-sc-nolong-desc
+ This style is like short-nolong-desc but it uses \glsxtrscsuffix, \glsabbrvscfont and \glsfirstabbrvscfont (see §4.5.1.3.9).

+

\setabbreviationstyle{short-sc-nolong-desc}

+\newabbreviation[description={sample description}]
{ex}{shrt fm}{long form}

+\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. +First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document} +

+Example 12: The short-sc-nolong-desc abbreviation style 📥🖹 📥🖺

+Example document demonstrating the short-sc-nolong-desc abbreviation style.

+

+

+short-sc-descalias: short-sc-nolong-desc; alias: short-sc-nolong-desc
+ A synonym for short-sc-nolong-desc.

+

+nolong-short-sc
+ This style is like nolong-short but it uses \glsxtrscsuffix, \glsabbrvscfont and \glsfirstabbrvscfont (see §4.5.1.3.9).

+

\setabbreviationstyle{nolong-short-sc}

+\newabbreviation{ex}{shrt fm}{long form}

+\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. +First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document} +

+Example 13: The nolong-short-sc abbreviation style 📥🖹 📥🖺

+Example document demonstrating the nolong-short-sc abbreviation style.

+

+

+short-sm-nolong
+ This style is like short-nolong but it uses \glsxtrsmsuffix, \glsabbrvsmfont and \glsfirstabbrvsmfont (see §4.5.1.3.9).

+

\setabbreviationstyle{short-sm-nolong}

+\newabbreviation{ex}{SHRT FM}{long form}

+\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. +First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document} +

+Example 14: The short-sm-nolong abbreviation style 📥🖹 📥🖺

+Example document demonstrating the short-sm-nolong abbreviation style.

+

+

+short-smalias: short-sm-nolong; alias: short-sm-nolong
+ A synonym for short-sm-nolong.

+

+short-sm-nolong-desc
+ This style is like short-nolong-desc but it uses \glsxtrsmsuffix, \glsabbrvsmfont and \glsfirstabbrvsmfont (see §4.5.1.3.9).

+

\setabbreviationstyle{short-sm-nolong-desc}

+\newabbreviation[description={sample description}]
{ex}{SHRT FM}{long form}

+\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. +First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document} +

+Example 15: The short-sm-nolong-desc abbreviation style 📥🖹 📥🖺

+Example document demonstrating the short-sm-nolong-desc abbreviation style.

+

+

+short-sm-descalias: short-sm-nolong-desc; alias: short-sm-nolong-desc
+ A synonym for short-sm-nolong-desc.

+

+nolong-short-sm
+ This style is like nolong-short but it uses \glsxtrsmsuffix, \glsabbrvsmfont and \glsfirstabbrvsmfont (see §4.5.1.3.9).

+

\setabbreviationstyle{nolong-short-sm}

+\newabbreviation{ex}{SHRT FM}{long form}

+\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. +First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document} +

+Example 16: The nolong-short-sm abbreviation style 📥🖹 📥🖺

+Example document demonstrating the nolong-short-sm abbreviation style.

+

+

+short-em-nolong
+ This style is like short-nolong but it uses \glsxtremsuffix, \glsabbrvemfont and \glsfirstabbrvemfont (see §4.5.1.3.9).

+

\setabbreviationstyle{short-em-nolong}

+\newabbreviation{ex}{SHRT FM}{long form}

+\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. +First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document} +

+Example 17: The short-em-nolong abbreviation style 📥🖹 📥🖺

+Example document demonstrating the short-em-nolong abbreviation style.

+

+

+short-emalias: short-em-nolong; alias: short-em-nolong
+ A synonym for short-em-nolong.

+

+short-em-nolong-desc
+ This style is like short-nolong-desc but it uses \glsxtremsuffix, \glsabbrvemfont and \glsfirstabbrvemfont (see §4.5.1.3.9).

+

\setabbreviationstyle{short-em-nolong-desc}

+\newabbreviation[description={sample description}]
{ex}{SHRT FM}{long form}

+\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. +First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document} +

+Example 18: The short-em-nolong-desc abbreviation style 📥🖹 📥🖺

+Example document demonstrating the short-em-nolong-desc abbreviation style.

+

+

+short-em-descalias: short-em-nolong-desc; alias: short-em-nolong-desc
+ A synonym for short-em-nolong-desc.

+

+nolong-short-em
+ This style is like nolong-short but it uses \glsxtremsuffix, \glsabbrvemfont and \glsfirstabbrvemfont (see §4.5.1.3.9).

+

\setabbreviationstyle{nolong-short-em}

+\newabbreviation{ex}{SHRT FM}{long form}

+\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. +First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document} +

+Example 19: The nolong-short-em abbreviation style 📥🖹 📥🖺

+Example document demonstrating the nolong-short-em abbreviation style.

+

+ +

+ +
+
4.5.1.1.2. Long Styles
+

+These styles only show the long form on both first use and subsequent use. See §4.5.1.3.1 and §4.5.1.3.6 for style commands.

+

+long-noshort-desc
+ Only the long form is shown on first use and subsequent use of the \gls-like commands (\glsxtrlongformat). The inline full form uses the same parenthetical style as long-short (\glsxtrlongshortformat). Font variations are available with long-noshort-sc-desc, long-noshort-sm-desc and long-noshort-em-desc.

+

\setabbreviationstyle{long-noshort-desc}

+\newabbreviation[description={sample description}]
{ex}{SHRT FM}{long form}

+\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. +First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document} +

+Example 20: The long-noshort-desc abbreviation style 📥🖹 📥🖺

+Example document demonstrating the long-noshort-desc abbreviation style.

+

+The long form is formatted with \glsfirstlongdefaultfont on first use and \glslongdefaultfont for subsequent use and for the \glsxtrlong set of commands.

+The short form is formatted with \glsfirstabbrvdefaultfont within the inline full form and with \glsabbrvdefaultfont for the \glsxtrshort set of commands.

+The name is set to the long form (\glsxtrlongnoshortdescname) and the description must be supplied.

+

+long-descalias: long-noshort-desc; alias: long-noshort-desc
+ A synonym for long-noshort-desc.

+

+long-noshort
+ This is like long-noshort-desc but the name is set to the short form (\glsxtrlongnoshortname) and the description is set to the unencapsulated long form.

+

\setabbreviationstyle{long-noshort}

+\newabbreviation{ex}{SHRT FM}{long form}

+\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. +First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document} +

+Example 21: The long-noshort abbreviation style 📥🖹 📥🖺

+Example document demonstrating the long-noshort abbreviation style.

+

+

+longalias: long-noshort; alias: long-noshort
+ A synonym for long-noshort.

+

+long-noshort-sc
+ This style is like long-noshort but it uses \glsxtrscsuffix, \glsabbrvscfont and \glsfirstabbrvscfont (see §4.5.1.3.9).

+

\setabbreviationstyle{long-noshort-sc}

+\newabbreviation{ex}{shrt fm}{long form}

+\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. +First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document} +

+Example 22: The long-noshort-sc abbreviation style 📥🖹 📥🖺

+Example document demonstrating the long-noshort-sc abbreviation style.

+

+

+long-noshort-sc-desc
+ This style is like long-noshort-desc but it uses \glsxtrscsuffix, \glsabbrvscfont and \glsfirstabbrvscfont (see §4.5.1.3.9).

+

\setabbreviationstyle{long-noshort-sc-desc}

+\newabbreviation[description={sample description}]
{ex}{shrt fm}{long form}

+\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. +First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document} +

+Example 23: The long-noshort-sc-desc abbreviation style 📥🖹 📥🖺

+Example document demonstrating the long-noshort-sc-desc abbreviation style.

+

+

+long-noshort-sm
+ This style is like long-noshort but it uses \glsxtrsmsuffix, \glsabbrvsmfont and \glsfirstabbrvsmfont (see §4.5.1.3.9).

+

\setabbreviationstyle{long-noshort-sm}

+\newabbreviation{ex}{SHRT FM}{long form}

+\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. +First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document} +

+Example 24: The long-noshort-sm abbreviation style 📥🖹 📥🖺

+Example document demonstrating the long-noshort-sm abbreviation style.

+

+

+long-noshort-sm-desc
+ This style is like long-noshort-desc but it uses \glsxtrsmsuffix, \glsabbrvsmfont and \glsfirstabbrvsmfont (see §4.5.1.3.9).

+

\setabbreviationstyle{long-noshort-sm-desc}

+\newabbreviation[description={sample description}]
{ex}{SHRT FM}{long form}

+\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. +First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document} +

+Example 25: The long-noshort-sm-desc abbreviation style 📥🖹 📥🖺

+Example document demonstrating the long-noshort-sm-desc abbreviation style.

+

+

+long-noshort-em
+ This style is like long-noshort but it uses \glsxtremsuffix, \glsabbrvemfont and \glsfirstabbrvemfont (see §4.5.1.3.9).

+

\setabbreviationstyle{long-noshort-em}

+\newabbreviation{ex}{SHRT FM}{long form}

+\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. +First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document} +

+Example 26: The long-noshort-em abbreviation style 📥🖹 📥🖺

+Example document demonstrating the long-noshort-em abbreviation style.

+

+

+long-noshort-em-desc
+ This style is like long-noshort-desc but it uses \glsxtremsuffix, \glsabbrvemfont and \glsfirstabbrvemfont (see §4.5.1.3.9).

+

\setabbreviationstyle{long-noshort-em-desc}

+\newabbreviation[description={sample description}]
{ex}{SHRT FM}{long form}

+\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. +First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document} +

+Example 27: The long-noshort-em-desc abbreviation style 📥🖹 📥🖺

+Example document demonstrating the long-noshort-em-desc abbreviation style.

+

+

+long-em-noshort-em
+ This style is like long-noshort but it uses \glsxtremsuffix, \glsabbrvemfont, \glsfirstabbrvemfont, \glslongemfont and \glsfirstlongemfont (see §4.5.1.3.9). This emphasizes both the long and short forms.

+

\setabbreviationstyle{long-em-noshort-em}

+\newabbreviation{ex}{SHRT FM}{long form}

+\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. +First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document} +

+Example 28: The long-em-noshort-em abbreviation style 📥🖹 📥🖺

+Example document demonstrating the long-em-noshort-em abbreviation style.

+

+

+long-em-noshort-em-desc
+ This style is like long-noshort-desc but it uses \glsxtremsuffix, \glsabbrvemfont, \glsfirstabbrvemfont, \glslongemfont and \glsfirstlongemfont (see §4.5.1.3.9). This emphasizes both the long and short forms.

+

\setabbreviationstyle{long-em-noshort-em-desc}

+\newabbreviation[description={sample description}]
{ex}{SHRT FM}{long form}

+\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. +First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document} +

+Example 29: The long-em-noshort-em-desc abbreviation style 📥🖹 📥🖺

+Example document demonstrating the long-em-noshort-em-desc abbreviation style.

+

+ +

+ +
+

4.5.1.2. Non-Regular Styles

+

+The following abbreviation styles will set the regular attribute to 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.

+The non-regular styles are too complicated to use \glsgenentryfmt as the display style (with the \gls-like commands). Instead they use \glsxtrgenabbrvfmt. This means that these styles won’t work if you provide your own custom display style (using \defglsentryfmt) that doesn’t check for the regular attribute.

+

+Avoid using \glsfirst, \glsfirstplural, \glstext and \glsplural (or their case-changing variants) with these styles. There are also some styles that can be problematic with \GLSname.
+

+ +

+ +
+
4.5.1.2.1. Long (Short) Styles
+

+These styles show the long form followed by the short form in parentheses on first use. On subsequent use only the short form is shown. See §4.5.1.3.1 and §4.5.1.3.2 for style commands.

+

+long-short
+ The insert is placed after the long form on first use of the \gls-like commands and after the short form on subsequent use. The inline full form is the same as the display full form (\glsxtrlongshortformat). Font variations are available with long-short-sc, long-short-sm, long-short-em and long-em-short-em.

+

\setabbreviationstyle{long-short}

+\newabbreviation{ex}{SHRT FM}{long form}

+\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. +First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document} +

+Example 30: The long-short abbreviation style 📥🖹 📥🖺

+Example document demonstrating the long-short abbreviation style.

+

+The long form is formatted with \glsfirstlongdefaultfont within the full form and with \glslongdefaultfont for the \glsxtrlong set of commands.

+The short form is formatted with \glsfirstabbrvdefaultfont within the full form and with \glsabbrvdefaultfont for subsequent use and for the \glsxtrshort set of commands.

+The name is set to the short form (\glsxtrlongshortname) and the description is set to the unencapsulated long form.

+

+long-short-desc
+ As long-short but the description must be supplied in the optional argument of \newabbreviation. Font variations are available with long-short-sc-desc, long-short-sm-desc, long-short-em-desc and long-em-short-em-desc.

+

\setabbreviationstyle{long-short-desc}

+\newabbreviation[description={sample description}]
{ex}{SHRT FM}{long form}

+\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. +First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document} +

+Example 31: The long-short-desc abbreviation style 📥🖹 📥🖺

+Example document demonstrating the long-short-desc abbreviation style.

+

+The name and sort are set to the long form followed by the short form in parentheses (\glsxtrlongshortdescname and \glsxtrlongshortdescsort).

+

+long-short-sc
+ This style is like long-short but it uses \glsxtrscsuffix, \glsabbrvscfont and \glsfirstabbrvscfont (see §4.5.1.3.9).

+

\setabbreviationstyle{long-short-sc}

+\newabbreviation{ex}{shrt fm}{long form}

+\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. +First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document} +

+Example 32: The long-short-sc abbreviation style 📥🖹 📥🖺

+Example document demonstrating the long-short-sc abbreviation style.

+

+

+long-short-sc-desc
+ This style is like long-short-desc but it uses \glsxtrscsuffix, \glsabbrvscfont and \glsfirstabbrvscfont (see §4.5.1.3.9).

+

\setabbreviationstyle{long-short-sc-desc}

+\newabbreviation[description={sample description}]
{ex}{shrt fm}{long form}

+\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. +First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document} +

+Example 33: The long-short-sc-desc abbreviation style 📥🖹 📥🖺

+Example document demonstrating the long-short-sc-desc abbreviation style.

+

+

+long-short-sm
+ This style is like long-short but it uses \glsxtrsmsuffix, \glsabbrvsmfont and \glsfirstabbrvsmfont (see §4.5.1.3.9).

+

\setabbreviationstyle{long-short-sm}

+\newabbreviation{ex}{SHRT FM}{long form}

+\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. +First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document} +

+Example 34: The long-short-sm abbreviation style 📥🖹 📥🖺

+Example document demonstrating the long-short-sm abbreviation style.

+

+

+long-short-sm-desc
+ This style is like long-short-desc but it uses \glsxtrsmsuffix, \glsabbrvsmfont and \glsfirstabbrvsmfont (see §4.5.1.3.9).

+

\setabbreviationstyle{long-short-sm-desc}

+\newabbreviation[description={sample description}]
{ex}{SHRT FM}{long form}

+\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. +First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document} +

+Example 35: The long-short-sm-desc abbreviation style 📥🖹 📥🖺

+Example document demonstrating the long-short-sm-desc abbreviation style.

+

+

+long-short-em
+ This style is like long-short but it uses \glsxtremsuffix, \glsabbrvemfont and \glsfirstabbrvemfont (see §4.5.1.3.9).

+

\setabbreviationstyle{long-short-em}

+\newabbreviation{ex}{SHRT FM}{long form}

+\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. +First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document} +

+Example 36: The long-short-em abbreviation style 📥🖹 📥🖺

+Example document demonstrating the long-short-em abbreviation style.

+

+

+long-short-em-desc
+ This style is like long-short-desc but it uses \glsxtremsuffix, \glsabbrvemfont and \glsfirstabbrvemfont (see §4.5.1.3.9).

+

\setabbreviationstyle{long-short-em-desc}

+\newabbreviation[description={sample description}]
{ex}{SHRT FM}{long form}

+\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. +First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document} +

+Example 37: The long-short-em-desc abbreviation style 📥🖹 📥🖺

+Example document demonstrating the long-short-em-desc abbreviation style.

+

+

+long-em-short-em
+ This style is like long-short but it uses \glsxtremsuffix, \glsabbrvemfont and \glsfirstabbrvemfont, \glsfirstlongemfont and \glslongemfont (see §4.5.1.3.9). That is, both the long and short forms are emphasized.

+

\setabbreviationstyle{long-em-short-em}

+\newabbreviation{ex}{SHRT FM}{long form}

+\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. +First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document} +

+Example 38: The long-em-short-em abbreviation style 📥🖹 📥🖺

+Example document demonstrating the long-em-short-em abbreviation style.

+

+

+long-em-short-em-desc
+ This style is like long-short-desc but it uses \glsxtremsuffix, \glsabbrvemfont and \glsfirstabbrvemfont, \glsfirstlongemfont and \glslongemfont (see §4.5.1.3.9). That is, both the long and short forms are emphasized.

+

\setabbreviationstyle{long-em-short-em-desc}

+\newabbreviation[description={sample description}]
{ex}{SHRT FM}{long form}

+\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. +First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document} +

+Example 39: The long-em-short-em-desc abbreviation style 📥🖹 📥🖺

+Example document demonstrating the long-em-short-em-desc abbreviation style.

+

+ +

+ +
+
4.5.1.2.2. Long (Short, User) Styles
+

+These styles are like the long (short) styles in §4.5.1.2.1 but additional content can be supplied in the field identified by \glsxtruserfield, which will be placed in the parenthetical content on first use (if set). The inline full form is the same as the display full form.

+These styles use the commands \glsxtrusersuffix, \glsabbrvuserfont, \glsfirstabbrvuserfont, \glslonguserfont and \glsfirstlonguserfont (except where noted). See §4.5.1.3.1 and §4.5.1.3.3 for style commands.

+If you need to change the font, you can redefine the associated commands (listed above). However, since small caps are awkward because the short plural suffix needs to counteract the small caps, small caps versions are provided.

+

+long-short-user
+ This style is like long-short but it includes the additional content in the parentheses on first use or the inline full form. The description is obtained from \glsuserdescription, which can be redefined to include the additional information, if required.

+

\setabbreviationstyle{long-short-user}

+\newabbreviation[user1={extra info}]{ex}{SHRT FM}{long form}

+\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. +First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document} +

+Example 40: The long-short-user abbreviation style 📥🖹 📥🖺

+Example document demonstrating the long-short-user abbreviation style.

+

+

+long-short-user-desc
+ This style is like long-short-user but the description must be supplied. The name is obtained from \glsxtrlongshortuserdescname.

+

\setabbreviationstyle{long-short-user-desc}

+\newabbreviation[description={sample description},
user1={extra info}]{ex}{SHRT FM}{long form}

+\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. +First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document} +

+Example 41: The long-short-user-desc abbreviation style 📥🖹 📥🖺

+Example document demonstrating the long-short-user-desc abbreviation style.

+

+

+This style is incompatible with \GLSname.
+

+If you need to use \GLSname with this style, you’ll have to redefine \glsxtrlongshortuserdescname so that the field name doesn’t include the entry label. For example:

\newcommand{\glsxtrlongshortuserdescname}{%
+  \protect\glslonguserfont{\the\glslongtok}%
+  \space(\protect\glsabbrvuserfont{\the\glsshorttok})%
 }
-
-

(Note that as from glossaries-extra version 1.42, this now uses \glsfmttext and -\glsfmtname instead of just referencing the text and name fields. This helps to ensure -that any formatting is correctly applied.) -

If you want to restore the glossaries v3.0+ definition just do: - - - -

-
-\renewcommand*{\glsseeitemformat}[1]{\glsentrytext{#1}}
-
-

-

The glossaries-extra package provides \glsxtrhiername and its case-changing -variants that may be used within the definition of \glsseeitemformat if required. -These display the hierarchy for sub-entries rather than just the name, which may be -more helpful in cross-references. -


\glsxtrhiername{label}

-

-performs a recursive action: -

    -
  1. If the entry given by ⟨label⟩ has a parent, then \glsxtrhiername{parent - label} is done followed by \glsxtrhiernamesep then: -
  2. -
  3. If the entry given by ⟨label⟩ is an abbreviation (that is, it has the short field - set) then the short form is displayed (using \glsfmtshort) otherwise the - name is displayed (using \glsfmtname).
-

The first step above is skipped if the entry doesn’t have a parent. Each level is separated -by: -


\glsxtrhiernamesep

-

-which defaults to “ ”. This can be redefined as appropriate. -

There are some case-changing variants: -


\Glsxtrhiername{label}

-

-The top-level has the first letter changed to upper case (either \Glsfmtshort or -\Glsfmtname). There’s no case-change for sub-entries. -


\GlsXtrhiername{label}

-

-All levels have the first letter changed to upper case (either \Glsfmtshort or -\Glsfmtname). -


\GLSxtrhiername{label}

-

-The top-level is converted to upper case (either \GLSfmtshort or \GLSfmtname). -There’s no case-change for sub-entries. -


\GLSXTRhiername{label}

-

-All levels are converted to upper case (either \GLSfmtshort or \GLSfmtname). - - - -

Suppose you want to suppress the number list using nonumberlist. This -will automatically prevent the cross-references from being displayed. The -seeautonumberlist package option will automatically enable the number list for entries -that have the see key set, but this will also show the rest of the number -list. -

Another approach in this situation is to use the post description hook -with \glsxtrusesee to append the cross-reference after the description. For -example: - - - -

-
-\renewcommand*{\glsxtrpostdescgeneral}{%
- \ifglshasfield{see}{\glscurrententrylabel}
- {, \glsxtrusesee{\glscurrententrylabel}}%
- {}%
+

+

+long-postshort-user
+ This style is like long-short-user but the parenthetical material is placed in the post-link hook. Note that, unlike long-short-user, the plural form isn’t used in the parenthetical material. If you require this, you will need to redefine \glsxtrpostusershortformat.

+

\setabbreviationstyle{long-postshort-user}

+\newabbreviation[user1={extra info}]{ex}{SHRT FM}{long form}

+\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. +First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document} +

+Example 42: The long-postshort-user abbreviation style 📥🖹 📥🖺

+Example document demonstrating the long-postshort-user abbreviation style.

+

+

+long-postshort-user-desc
+ This style is like long-postshort-user but the description must be supplied. The name is obtained from \glsxtrlongshortuserdescname.

+

\setabbreviationstyle{long-postshort-user-desc}

+\newabbreviation[description={sample description},
user1={extra info}]{ex}{SHRT FM}{long form}

+\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. +First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document} +

+Example 43: The long-postshort-user-desc abbreviation style 📥🖹 📥🖺

+Example document demonstrating the long-postshort-user-desc abbreviation style.

+

+

+This style is incompatible with \GLSname.
+

+If you need to use \GLSname with this style, you’ll have to redefine \glsxtrshortlonguserdescname so that the field name doesn’t include the entry label, as for long-short-user-desc.

+

+long-postshort-sc-user
+ This style is like long-postshort-user but it uses \glsxtrscusersuffix, \glsabbrvscuserfont and \glsfirstabbrvscuserfont. The name value is obtained from \glsxtrlongshortscusername.

+

\setabbreviationstyle{long-postshort-sc-user}

+\newabbreviation[user1={extra info}]{ex}{shrt fm}{long form}

+\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. +First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document} +

+Example 44: The long-postshort-sc-user abbreviation style 📥🖹 📥🖺

+Example document demonstrating the long-postshort-sc-user abbreviation style.

+

+

+long-postshort-sc-user-desc
+ This style is like long-postshort-sc-user but the description must be supplied. The name is obtained from \glsxtrlongshortuserdescname.

+

\setabbreviationstyle{long-postshort-sc-user-desc}

+\newabbreviation[description={sample description},
user1={extra info}]{ex}{shrt fm}{long form}

+\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. +First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document} +

+Example 45: The long-postshort-sc-user-desc abbreviation style 📥🖹 📥🖺

+Example document demonstrating the long-postshort-sc-user-desc abbreviation style.

+

+

+This style is incompatible with \GLSname.
+

+If you need to use \GLSname with this style, you’ll have to redefine \glsxtrlongshortscuserdescname so that the field name doesn’t include the entry label.

+ +

+ +
+
4.5.1.2.3. Short (Long) Styles
+

+These styles show the short form followed by the long form in parentheses on first use. On subsequent use only the short form is shown. See §4.5.1.3.1 and §4.5.1.3.2 for style commands.

+

+short-long
+

+The insert is placed after the short form on first use and subsequent use of the \gls-like commands. The inline full form is the same as the display full form (\glsxtrshortlongformat). Font variations are available with short-sc-long, short-sm-long, short-em-long and short-em-long-em.

+

\setabbreviationstyle{short-long}

+\newabbreviation{ex}{SHRT FM}{long form}

+\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. +First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document} +

+Example 46: The short-long abbreviation style 📥🖹 📥🖺

+Example document demonstrating the short-long abbreviation style.

+

+The long form is formatted with \glsfirstlongdefaultfont within the full form and with \glslongdefaultfont for the \glsxtrlong set of commands.

+The short form is formatted with \glsfirstabbrvdefaultfont within the full form and with \glsabbrvdefaultfont for subsequent use and for the \glsxtrshort set of commands.

+The name is set to the short form (\glsxtrlongshortname) and the description is set to the unencapsulated long form.

+

+short-long-desc
+ As short-long but the description must be supplied in the optional argument of \newabbreviation. Font variations are available with short-sc-long-desc, short-sm-long-desc, short-em-long-desc and short-em-long-em-desc.

+

\setabbreviationstyle{short-long-desc}

+\newabbreviation[description={sample description}]
{ex}{SHRT FM}{long form}

+\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. +First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document} +

+Example 47: The short-long-desc abbreviation style 📥🖹 📥🖺

+Example document demonstrating the short-long-desc abbreviation style.

+

+The name is set to the short form followed by the long form in parentheses (\glsxtrshortlongdescname), and the sort is set to just the short form (\glsxtrshortlongdescsort).

+

+short-sc-long
+ This style is like short-long but it uses \glsxtrscsuffix, \glsabbrvscfont and \glsfirstabbrvscfont (see §4.5.1.3.9).

+

\setabbreviationstyle{short-sc-long}

+\newabbreviation{ex}{shrt fm}{long form}

+\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. +First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document} +

+Example 48: The short-sc-long abbreviation style 📥🖹 📥🖺

+Example document demonstrating the short-sc-long abbreviation style.

+

+

+short-sc-long-desc
+ This style is like short-long-desc but it uses \glsxtrscsuffix, \glsabbrvscfont and \glsfirstabbrvscfont (see §4.5.1.3.9).

+

\setabbreviationstyle{short-sc-long-desc}

+\newabbreviation[description={sample description}]
{ex}{shrt fm}{long form}

+\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. +First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document} +

+Example 49: The short-sc-long-desc abbreviation style 📥🖹 📥🖺

+Example document demonstrating the short-sc-long-desc abbreviation style.

+

+

+short-sm-long
+ This style is like short-long but it uses \glsxtrsmsuffix, \glsabbrvsmfont and \glsfirstabbrvsmfont (see §4.5.1.3.9).

+

\setabbreviationstyle{short-sm-long}

+\newabbreviation{ex}{SHRT FM}{long form}

+\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. +First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document} +

+Example 50: The short-sm-long abbreviation style 📥🖹 📥🖺

+Example document demonstrating the short-sm-long abbreviation style.

+

+

+short-sm-long-desc
+ This style is like short-long-desc but it uses \glsxtrsmsuffix, \glsabbrvsmfont and \glsfirstabbrvsmfont (see §4.5.1.3.9).

+

\setabbreviationstyle{short-sm-long-desc}

+\newabbreviation[description={sample description}]
{ex}{SHRT FM}{long form}

+\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. +First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document} +

+Example 51: The short-sm-long-desc abbreviation style 📥🖹 📥🖺

+Example document demonstrating the short-sm-long-desc abbreviation style.

+

+

+short-em-long
+ This style is like short-long but it uses \glsxtremsuffix, \glsabbrvemfont and \glsfirstabbrvemfont (see §4.5.1.3.9).

+

\setabbreviationstyle{short-em-long}

+\newabbreviation{ex}{SHRT FM}{long form}

+\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. +First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document} +

+Example 52: The short-em-long abbreviation style 📥🖹 📥🖺

+Example document demonstrating the short-em-long abbreviation style.

+

+

+short-em-long-desc
+ This style is like short-long-desc but it uses \glsxtremsuffix, \glsabbrvemfont and \glsfirstabbrvemfont (see §4.5.1.3.9).

+

\setabbreviationstyle{short-em-long-desc}

+\newabbreviation[description={sample description}]
{ex}{SHRT FM}{long form}

+\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. +First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document} +

+Example 53: The short-em-long-desc abbreviation style 📥🖹 📥🖺

+Example document demonstrating the short-em-long-desc abbreviation style.

+

+

+short-em-long-em
+ This style is like short-long but it uses \glsxtremsuffix, \glsabbrvemfont and \glsfirstabbrvemfont, \glsfirstlongemfont and \glslongemfont (see §4.5.1.3.9). That is, both the long and short forms are emphasized.

+

\setabbreviationstyle{short-em-long-em}

+\newabbreviation{ex}{SHRT FM}{long form}

+\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. +First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document} +

+Example 54: The short-em-long-em abbreviation style 📥🖹 📥🖺

+Example document demonstrating the short-em-long-em abbreviation style.

+

+

+short-em-long-em-desc
+ This style is like short-long-desc but it uses \glsxtremsuffix, \glsabbrvemfont and \glsfirstabbrvemfont, \glsfirstlongemfont and \glslongemfont (see §4.5.1.3.9). That is, both the long and short forms are emphasized.

+

\setabbreviationstyle{short-em-long-em-desc}

+\newabbreviation[description={sample description}]
{ex}{SHRT FM}{long form}

+\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. +First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document} +

+Example 55: The short-em-long-em-desc abbreviation style 📥🖹 📥🖺

+Example document demonstrating the short-em-long-em-desc abbreviation style.

+

+ +

+ +
+
4.5.1.2.4. Short (Long, User) Styles
+

+These styles are like the short (long) styles in §4.5.1.2.3 but additional content can be supplied in the field identified by \glsxtruserfield, which will be placed in the parenthetical content on first use (if set). The inline full form is the same as the display full form.

+These styles use the commands \glsxtrusersuffix, \glsabbrvuserfont, \glsfirstabbrvuserfont, \glslonguserfont and \glsfirstlonguserfont (except where noted). See §4.5.1.3.1 and §4.5.1.3.3 for style commands.

+

+short-long-user
+ This style is like short-long but it includes the additional content in the parentheses on first use or the inline full form.

+The description is obtained from \glsuserdescription, which can be redefined to include the additional information, if required.

+

\setabbreviationstyle{short-long-user}

+\newabbreviation[user1={extra info}]{ex}{SHRT FM}{long form}

+\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. +First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document} +

+Example 56: The short-long-user abbreviation style 📥🖹 📥🖺

+Example document demonstrating the short-long-user abbreviation style.

+

+

+short-long-user-desc
+ This style is like short-long-user but the description must be provided. The name is obtained from \glsxtrshortlonguserdescname and the sort value is obtained from \glsxtrshortlongdescsort.

+

\setabbreviationstyle{short-long-user-desc}

+\newabbreviation[description={sample description},
user1={extra info}]{ex}{SHRT FM}{long form}

+\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. +First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document} +

+Example 57: The short-long-user-desc abbreviation style 📥🖹 📥🖺

+Example document demonstrating the short-long-user-desc abbreviation style.

+

+

+This style is incompatible with \GLSname.
+

+If you need to use \GLSname with this style, you’ll have to redefine \glsxtrshortlonguserdescname so that the field name doesn’t include the entry label. For example:

\newcommand{\glsxtrlongshortuserdescname}{%
+  \protect\glsabbrvuserfont{\the\glsshorttok}%
+  \space(\protect\glslonguserfont{\the\glslongtok})%
 }
-
-

Now the cross-references can appear even though the number list has been -suppressed. -

As from v1.16, there’s a separate seealso key. Unlike see, this doesn’t have an -optional part for the textual tag. The syntax seealso={xr-labels} works in -much the same way as using see=[\seealsoname]{xr-labels} but the -information is stored in a separate field. If you need a different tag, use the see key -instead (or redefine \seealsoname or \glsxtruseseealsoformat, described -below). -

You can display the formatted list of cross-references stored in the seealso key -using: -


\glsxtruseseealso{label}

-

-This works in much the same way as \glsxtrusesee but it internally uses -


\glsxtruseseealsoformat{xr list}

-

-For example: - - - -

-
-\renewcommand*{\glsxtrpostdescgeneral}{%
- \ifglshasfield{see}{\glscurrententrylabel}
- {, \glsxtrusesee{\glscurrententrylabel}}%
- {}%
- \ifglshasfield{seealso}{\glscurrententrylabel}
- { (\glsxtruseseealso{\glscurrententrylabel})}%
- {}%
+

+

+short-postlong-user
+ This style is like short-long but it includes the additional content in the parentheses on first use or the inline full form. The parenthetical content is placed in the post-link hook which can avoid overly long hyperlinks.

+The description is obtained from \glsuserdescription, which can be redefined to include the additional information, if required.

+

\setabbreviationstyle{short-postlong-user}

+\newabbreviation[user1={extra info}]{ex}{SHRT FM}{long form}

+\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. +First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document} +

+Example 58: The short-postlong-user abbreviation style 📥🖹 📥🖺

+Example document demonstrating the short-postlong-user abbreviation style.

+

+

+short-postlong-user-desc
+ This style is like short-postlong-user but the description must be provided. The name is obtained from \glsxtrshortlonguserdescname. The sort value is the short form.

+

\setabbreviationstyle{short-postlong-user-desc}

+\newabbreviation[description={sample description},
user1={extra info}]{ex}{SHRT FM}{long form}

+\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. +First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document} +

+Example 59: The short-postlong-user-desc abbreviation style 📥🖹 📥🖺

+Example document demonstrating the short-postlong-user-desc abbreviation style.

+

+

+This style is incompatible with \GLSname.
+

+If you need to use \GLSname with this style, you’ll have to redefine \glsxtrshortlonguserdescname so that the field name doesn’t include the entry label, as for short-long-user-desc.

+ +

+ +
+
4.5.1.2.5. Hyphen Styles
+

+These styles test if the inserted material start with a hyphen. See §4.5.1.3.1, §4.5.1.3.2 and §4.5.1.3.7 for style commands.

+

+These styles are designed to be used with the markwords attribute and (if the short form has spaces) the markshortwords attribute. If the inserted material starts with a hyphen, the spaces will be replaced with hyphens. This replacement won’t take place if the corresponding attribute wasn’t used to mark the inter-word spaces.
+

+Note that \glsxtrshort and \glsxtrlong (and their plural and case-changing variants) don’t perform the inter-word space substitution. The inline full form is slightly different from the display full form for the “post” styles.

+

+long-hyphen-short-hyphen
+ This style is like long-short but checks the inserted material for a leading hyphen. The description is the long form encapsulated with \glslonghyphenfont. The name is obtained from \glsxtrlongshortname, and the sort value is obtained from \glsxtrlonghyphenshortsort. The inline full form is the same as the display full form.

+

\setabbreviationstyle{long-hyphen-short-hyphen}

+\glssetcategoryattributes{abbreviation}{markwords,markshortwords}{true}
\newabbreviation{ex}{SHRT FM}{long form}

+\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. +First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document} +

+Example 60: The long-hyphen-short-hyphen abbreviation style 📥🖹 📥🖺

+Example document demonstrating the long-hyphen-short-hyphen abbreviation style.

+

+

+long-hyphen-postshort-hyphen
+ This style is like long-hyphen-short-hyphen but places the insert and parenthetical material in the post-link hook for the display full form.

+

\setabbreviationstyle{long-hyphen-postshort-hyphen}

+\glssetcategoryattributes{abbreviation}{markwords,markshortwords}{true}
\newabbreviation{ex}{SHRT FM}{long form}

+\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. +First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document} +

+Example 61: The long-hyphen-postshort-hyphen abbreviation style 📥🖹 📥🖺

+Example document demonstrating the long-hyphen-postshort-hyphen abbreviation style.

+

+Note that the inline full form (\glsxtrfull) doesn’t show the insert in the post-link hook, but instead places it at the end of the link text. This is because only the \gls-like commands (not the \glstext-like commands) set the placeholder \glsinsert to the supplied insert. If you want the insert to show in the parenthetical part of the post-link hook for the inline full form you need to redefine \glsxtrfullsaveinsert:

\renewcommand*{\glsxtrfullsaveinsert}[2]{\def\glsinsert{#2}}
+

+

+long-hyphen-short-hyphen-desc
+ This style is like long-hyphen-short-hyphen but the description must be supplied. The name is obtained from \glsxtrlongshortdescname, and the sort value is obtained from \glsxtrlongshortdescsort.

+

\setabbreviationstyle{long-hyphen-short-hyphen-desc}

+\glssetcategoryattributes{abbreviation}{markwords,markshortwords}{true}
\newabbreviation[description={sample description}]
{ex}{SHRT FM}{long form}

+\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. +First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document} +

+Example 62: The long-hyphen-short-hyphen-desc abbreviation style 📥🖹 📥🖺

+Example document demonstrating the long-hyphen-short-hyphen-desc abbreviation style.

+

+

+long-hyphen-postshort-hyphen-desc
+ This style is like long-hyphen-short-hyphen-desc but places the insert and parenthetical material in the post-link hook for the display full form.

+

\setabbreviationstyle{long-hyphen-postshort-hyphen-desc}

+\glssetcategoryattributes{abbreviation}{markwords,markshortwords}{true}
\newabbreviation[description={sample description}]
{ex}{SHRT FM}{long form}

+\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. +First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document} +

+Example 63: The long-hyphen-postshort-hyphen-desc abbreviation style 📥🖹 📥🖺

+Example document demonstrating the long-hyphen-postshort-hyphen-desc abbreviation style.

+

+Note that as with the long-hyphen-postshort-hyphen style, the insert isn’t included in the post-link hook by default for the inline full form. If you want the insert to show in the post-link hook for the inline full form you need to redefine \glsxtrfullsaveinsert.

+

+long-hyphen-noshort-desc-noreg
+ This style is like long-noshort-desc-noreg but checks the inserted material for a leading hyphen. The description must be supplied. The name is obtained from \glsxtrlongnoshortdescname, and the sort value is obtained from \glsxtrlonghyphennoshortdescsort.

+

\setabbreviationstyle{long-hyphen-noshort-desc-noreg}

+\glssetcategoryattributes{abbreviation}{markwords,markshortwords}{true}
\newabbreviation[description={sample description}]
{ex}{SHRT FM}{long form}

+\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. +First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document} +

+Example 64: The long-hyphen-noshort-desc-noreg abbreviation style 📥🖹 📥🖺

+Example document demonstrating the long-hyphen-noshort-desc-noreg abbreviation style.

+

+

+long-hyphen-noshort-noreg
+ This style is like long-noshort-noreg but checks the inserted material for a leading hyphen. The description is set to the unencapsulated long form. The name is obtained from \glsxtrlongnoshortname, and the sort value is obtained from \glsxtrlonghyphennoshortsort.

+

\setabbreviationstyle{long-hyphen-noshort-noreg}

+\glssetcategoryattributes{abbreviation}{markwords,markshortwords}{true}
\newabbreviation{ex}{SHRT FM}{long form}

+\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. +First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document} +

+Example 65: The long-hyphen-noshort-noreg abbreviation style 📥🖹 📥🖺

+Example document demonstrating the long-hyphen-noshort-noreg abbreviation style.

+

+

+short-hyphen-long-hyphen
+ This style is like short-long but checks the inserted material for a leading hyphen. The description is the long form encapsulated with \glslonghyphenfont. The name is obtained from \glsxtrshortlongname and the sort value is obtained from \glsxtrshorthyphenlongsort.

+

\setabbreviationstyle{short-hyphen-long-hyphen}

+\glssetcategoryattributes{abbreviation}{markwords,markshortwords}{true}
\newabbreviation{ex}{SHRT FM}{long form}

+\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. +First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document} +

+Example 66: The short-hyphen-long-hyphen abbreviation style 📥🖹 📥🖺

+Example document demonstrating the short-hyphen-long-hyphen abbreviation style.

+

+

+short-hyphen-postlong-hyphen
+ This style is like short-hyphen-long-hyphen but the insert and parenthetical material are placed in the post-link hook for the display full form.

+

\setabbreviationstyle{short-hyphen-postlong-hyphen}

+\glssetcategoryattributes{abbreviation}{markwords,markshortwords}{true}
\newabbreviation{ex}{SHRT FM}{long form}

+\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. +First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document} +

+Example 67: The short-hyphen-postlong-hyphen abbreviation style 📥🖹 📥🖺

+Example document demonstrating the short-hyphen-postlong-hyphen abbreviation style.

+

+Note that as with the long-hyphen-postshort-hyphen style, the insert isn’t included in the post-link hook by default for the inline full form. If you want the insert to show in the post-link hook for the inline full form you need to redefine \glsxtrfullsaveinsert (as described above, for the long-hyphen-postshort-hyphen style).

+

+short-hyphen-long-hyphen-desc
+ This style is like short-hyphen-long-hyphen but the description must be supplied. The name is obtained from \glsxtrshortlongdescname, and the sort is obtained from \glsxtrshortlongdescsort.

+

\setabbreviationstyle{short-hyphen-long-hyphen-desc}

+\glssetcategoryattributes{abbreviation}{markwords,markshortwords}{true}
\newabbreviation[description={sample description}]
{ex}{SHRT FM}{long form}

+\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. +First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document} +

+Example 68: The short-hyphen-long-hyphen-desc abbreviation style 📥🖹 📥🖺

+Example document demonstrating the short-hyphen-long-hyphen-desc abbreviation style.

+

+

+short-hyphen-postlong-hyphen-desc
+ This style is like short-hyphen-long-hyphen-desc but the insert and parenthetical material are placed in the post-link hook for the display full form.

+

\setabbreviationstyle{short-hyphen-postlong-hyphen-desc}

+\glssetcategoryattributes{abbreviation}{markwords,markshortwords}{true}
\newabbreviation[description={sample description}]
{ex}{SHRT FM}{long form}

+\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. +First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document} +

+Example 69: The short-hyphen-postlong-hyphen-desc abbreviation style 📥🖹 📥🖺

+Example document demonstrating the short-hyphen-postlong-hyphen-desc abbreviation style.

+

+Note that as with the long-hyphen-postshort-hyphen style, the insert isn’t included in the post-link hook by default for the inline full form. If you want the insert to show in the post-link hook for the inline full form you need to redefine \glsxtrfullsaveinsert (as described above, for the long-hyphen-postshort-hyphen style).

+ +

+ +
+
4.5.1.2.6. Only Styles
+

+These styles only show the long form on first use and only show the short form on subsequent use. The inline full form is the same as the display full form. See §4.5.1.3.1, §4.5.1.3.2 and §4.5.1.3.8 for style commands.

+The inline full form uses a parenthetical style with the long form followed by the short form in parentheses.

+

+long-only-short-only
+ The name is obtained from \glsxtronlyname and the sort value is just the short form. The description is the long form encapsulated with \glslongonlyfont.

+

\setabbreviationstyle{long-only-short-only}

+\newabbreviation{ex}{SHRT FM}{long form}

+\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. +First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document} +

+Example 70: The long-only-short-only abbreviation style 📥🖹 📥🖺

+Example document demonstrating the long-only-short-only abbreviation style.

+

+

+long-only-short-only-desc
+ This is like long-only-short-only but the description must be supplied. The name is obtained from \glsxtronlydescname and the sort is obtained from \glsxtronlydescsort.

+

\setabbreviationstyle{long-only-short-only-desc}

+\newabbreviation[description={sample description}]
{ex}{SHRT FM}{long form}

+\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. +First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document} +

+Example 71: The long-only-short-only-desc abbreviation style 📥🖹 📥🖺

+Example document demonstrating the long-only-short-only-desc abbreviation style.

+

+

+long-only-short-sc-only
+ This is like long-only-short-only but uses small caps. The name is obtained from \glsxtrsconlyname, and it uses \glsabbrvsconlyfont, \glsfirstabbrvsconlyfont and \glsxtrsconlysuffix for the abbreviation fonts and plural suffix.

+

\setabbreviationstyle{long-only-short-sc-only}

+\newabbreviation{ex}{shrt fm}{long form}

+\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. +First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document} +

+Example 72: The long-only-short-sc-only abbreviation style 📥🖹 📥🖺

+Example document demonstrating the long-only-short-sc-only abbreviation style.

+

+

+long-only-short-sc-only-desc
+ This is like long-only-short-only-desc but uses small caps. The name is obtained from \glsxtrsconlydescname, and the sort is obtained from \glsxtrsconlydescsort.

+

\setabbreviationstyle{long-only-short-sc-only-desc}

+\newabbreviation[description={sample description}]
{ex}{shrt fm}{long form}

+\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. +First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document} +

+Example 73: The long-only-short-sc-only-desc abbreviation style 📥🖹 📥🖺

+Example document demonstrating the long-only-short-sc-only-desc abbreviation style.

+

+ +

+ +
+
4.5.1.2.7. Footnote Styles
+

+These styles show the short form (\glsxtrshortformat) with the long form as a footnote on first use. On subsequent use only the short form is shown. See §4.5.1.3.1 and §4.5.1.3.4 for style commands.

+The inline full form uses the same parenthetical style as short-long (\glsxtrshortlongformat). Font variations are available with short-sc-footnote, short-sm-footnote and short-em-footnote.

+

+short-footnote
+ The insert is placed after the short form on first use and subsequent use of the \gls-like commands.

+

+

+

+\setabbreviationstyle{short-footnote}

+\newabbreviation{ex}{SHRT FM}{long form}

+\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. +First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document} +

Example 74: The short-footnote abbreviation style 📥🖹 📥🖺

+Example document demonstrating the short-footnote abbreviation style.

+

+The long form is formatted with \glsfirstlongfootnotefont within the full form and with \glslongfootnotefont for the \glsxtrlong set of commands.

+The short form is formatted with \glsfirstabbrvdefaultfont within the full form and with \glsabbrvdefaultfont for subsequent use and for the \glsxtrshort set of commands.

+The name is set to the short form (\glsxtrfootnotename) and the description is set to the unencapsulated long form.

+This style automatically sets the nohyperfirst attribute to true for the entry’s category.

+

+footnotealias: short-footnote; alias: short-footnote
+ A synonym for short-footnote.

+

+short-footnote-desc
+ As short-footnote but the description must be supplied in the optional argument of \newabbreviation.

+

+

+

+\setabbreviationstyle{short-footnote-desc}

+\newabbreviation[description={sample description}]
{ex}{SHRT FM}{long form}

+\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. +First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document} +

Example 75: The short-footnote-desc abbreviation style 📥🖹 📥🖺

+Example document demonstrating the short-footnote-desc abbreviation style.

+

+The name is set to the short form followed by the long form in parentheses (\glsxtrfootnotedescname), and the sort is set to just the short form (\glsxtrfootnotedescsort).

+

+footnote-descalias: short-footnote-desc; alias: short-footnote-desc
+ A synonym for short-footnote-desc.

+

+short-postfootnote
+ Similar to short-footnote but the footnote command is placed in the post-link hook. This avoids the problem of nested hyperlinks caused by the footnote marker hyperlink being inside the link text (which is why the short-footnote style switches on the nohyperfirst attribute). Using the post-link hook makes it possible to check for following punctuation so that the footnote marker can be shifted after the punctuation character.

+

+

+

+\setabbreviationstyle{short-postfootnote}

+\newabbreviation{ex}{SHRT FM}{long form}

+\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. +First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document} +

Example 76: The short-postfootnote abbreviation style 📥🖹 📥🖺

+Example document demonstrating the short-postfootnote abbreviation style.

+

+

+postfootnotealias: short-postfootnote; alias: short-postfootnote
+ A synonym for short-postfootnote.

+

+short-postfootnote-desc
+ Similar to short-footnote-desc but the footnote command is placed in the post-link hook as with short-postfootnote.

+

+

+

+\setabbreviationstyle{short-postfootnote-desc}

+\newabbreviation[description={sample description}]
{ex}{SHRT FM}{long form}

+\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. +First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document} +

Example 77: The short-postfootnote-desc abbreviation style 📥🖹 📥🖺

+Example document demonstrating the short-postfootnote-desc abbreviation style.

+

+

+postfootnote-descalias: short-postfootnote-desc; alias: short-postfootnote-desc
+ A synonym for short-postfootnote-desc.

+

+short-sc-footnote
+ This style is like short-footnote but it uses \glsxtrscsuffix, \glsabbrvscfont and \glsfirstabbrvscfont (see §4.5.1.3.9).

+

+

+

+\setabbreviationstyle{short-sc-footnote}

+\newabbreviation{ex}{shrt fm}{long form}

+\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. +First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document} +

Example 78: The short-sc-footnote abbreviation style 📥🖹 📥🖺

+Example document demonstrating the short-sc-footnote abbreviation style.

+

+

+short-sc-footnote-desc
+ This style is like short-footnote-desc but it uses \glsxtrscsuffix, \glsabbrvscfont and \glsfirstabbrvscfont (see §4.5.1.3.9).

+

+

+

+\setabbreviationstyle{short-sc-footnote-desc}

+\newabbreviation[description={sample description}]
{ex}{shrt fm}{long form}

+\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. +First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document} +

Example 79: The short-sc-footnote-desc abbreviation style 📥🖹 📥🖺

+Example document demonstrating the short-sc-footnote-desc abbreviation style.

+

+

+short-sc-postfootnote
+ This style is like short-postfootnote but it uses \glsxtrscsuffix, \glsabbrvscfont and \glsfirstabbrvscfont (see §4.5.1.3.9).

+

+

+

+\setabbreviationstyle{short-sc-postfootnote}

+\newabbreviation{ex}{shrt fm}{long form}

+\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. +First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document} +

Example 80: The short-sc-postfootnote abbreviation style 📥🖹 📥🖺

+Example document demonstrating the short-sc-postfootnote abbreviation style.

+

+

+short-sc-postfootnote-desc
+ This style is like short-postfootnote-desc but it uses \glsxtrscsuffix, \glsabbrvscfont and \glsfirstabbrvscfont (see §4.5.1.3.9).

+

+

+

+\setabbreviationstyle{short-sc-postfootnote-desc}

+\newabbreviation[description={sample description}]
{ex}{shrt fm}{long form}

+\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. +First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document} +

Example 81: The short-sc-postfootnote-desc abbreviation style 📥🖹 📥🖺

+Example document demonstrating the short-sc-postfootnote-desc abbreviation style.

+

+

+short-sm-footnote
+ This style is like short-footnote but it uses \glsxtrsmsuffix, \glsabbrvsmfont and \glsfirstabbrvsmfont (see §4.5.1.3.9).

+

+

+

+\setabbreviationstyle{short-sm-footnote}

+\newabbreviation{ex}{SHRT FM}{long form}

+\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. +First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document} +

Example 82: The short-sm-footnote abbreviation style 📥🖹 📥🖺

+Example document demonstrating the short-sm-footnote abbreviation style.

+

+

+short-sm-footnote-desc
+ This style is like short-footnote-desc but it uses \glsxtrsmsuffix, \glsabbrvsmfont and \glsfirstabbrvsmfont (see §4.5.1.3.9).

+

+

+

+\setabbreviationstyle{short-sm-footnote-desc}

+\newabbreviation[description={sample description}]
{ex}{SHRT FM}{long form}

+\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. +First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document} +

Example 83: The short-sm-footnote-desc abbreviation style 📥🖹 📥🖺

+Example document demonstrating the short-sm-footnote-desc abbreviation style.

+

+

+short-sm-postfootnote
+ This style is like short-postfootnote but it uses \glsxtrsmsuffix, \glsabbrvsmfont and \glsfirstabbrvsmfont (see §4.5.1.3.9).

+

+

+

+\setabbreviationstyle{short-sm-postfootnote}

+\newabbreviation{ex}{SHRT FM}{long form}

+\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. +First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document} +

Example 84: The short-sm-postfootnote abbreviation style 📥🖹 📥🖺

+Example document demonstrating the short-sm-postfootnote abbreviation style.

+

+

+short-sm-postfootnote-desc
+ This style is like short-postfootnote-desc but it uses \glsxtrsmsuffix, \glsabbrvsmfont and \glsfirstabbrvsmfont (see §4.5.1.3.9).

+

+

+

+\setabbreviationstyle{short-sm-postfootnote-desc}

+\newabbreviation[description={sample description}]
{ex}{SHRT FM}{long form}

+\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. +First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document} +

Example 85: The short-sm-postfootnote-desc abbreviation style 📥🖹 📥🖺

+Example document demonstrating the short-sm-postfootnote-desc abbreviation style.

+

+

+short-em-footnote
+ This style is like short-footnote but it uses \glsxtremsuffix, \glsabbrvemfont and \glsfirstabbrvemfont (see §4.5.1.3.9).

+

+

+

+\setabbreviationstyle{short-em-footnote}

+\newabbreviation{ex}{SHRT FM}{long form}

+\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. +First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document} +

Example 86: The short-em-footnote abbreviation style 📥🖹 📥🖺

+Example document demonstrating the short-em-footnote abbreviation style.

+

+

+short-em-footnote-desc
+ This style is like short-footnote-desc but it uses \glsxtremsuffix, \glsabbrvemfont and \glsfirstabbrvemfont (see §4.5.1.3.9).

+

+

+

+\setabbreviationstyle{short-em-footnote-desc}

+\newabbreviation[description={sample description}]
{ex}{SHRT FM}{long form}

+\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. +First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document} +

Example 87: The short-em-footnote-desc abbreviation style 📥🖹 📥🖺

+Example document demonstrating the short-em-footnote-desc abbreviation style.

+

+

+short-em-postfootnote
+ This style is like short-postfootnote but it uses \glsxtremsuffix, \glsabbrvemfont and \glsfirstabbrvemfont (see §4.5.1.3.9).

+

+

+

+\setabbreviationstyle{short-em-postfootnote}

+\newabbreviation{ex}{SHRT FM}{long form}

+\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. +First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document} +

Example 88: The short-em-postfootnote abbreviation style 📥🖹 📥🖺

+Example document demonstrating the short-em-postfootnote abbreviation style.

+

+

+short-em-postfootnote-desc
+ This style is like short-postfootnote-desc but it uses \glsxtremsuffix, \glsabbrvemfont and \glsfirstabbrvemfont (see §4.5.1.3.9).

+

+

+

+\setabbreviationstyle{short-em-postfootnote-desc}

+\newabbreviation[description={sample description}]
{ex}{SHRT FM}{long form}

+\begin{document} +First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. +Full: \glsxtrfull{ex}[-insert]. +First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document} +

Example 89: The short-em-postfootnote-desc abbreviation style 📥🖹 📥🖺

+Example document demonstrating the short-em-postfootnote-desc abbreviation style.

+

+ +

+ +
+
4.5.1.2.8. Short Styles
+

+These styles only show the short form on both first use and subsequent use. See §4.5.1.3.1 and §4.5.1.3.5 for style commands. They are essentially identical to the corresponding regular style listed in §4.5.1.2.8 except that they change the regular attribute to false.

+

+short-nolong-noreg
+ This style is a non-regular version of the short-nolong style.

+

+short-nolong-desc-noreg
+ This style is a non-regular version of the short-nolong-desc style.

+

+nolong-short-noreg
+ This style is a non-regular version of the nolong-short style.

+ +

+ +
+
4.5.1.2.9. Long Styles
+

+These styles only show the long form on both first use and subsequent use. See §4.5.1.3.1 and §4.5.1.3.6 for style commands. They are essentially identical to the corresponding regular style listed in §4.5.1.2.9 except that they change the regular attribute to false.

+

+long-noshort-desc-noreg
+ This style is a non-regular version of the long-noshort-desc style.

+

+long-noshort-noreg
+ This style is a non-regular version of the long-noshort style.

+

+long-em-noshort-em-noreg
+ This style is a non-regular version of the long-em-noshort-em style.

+

+long-em-noshort-em-desc-noreg
+ This style is a non-regular version of the long-em-noshort-em-desc style.

+ +

+ +
+

4.5.1.3. Formatting Commands and Hooks

+

+These commands are used by the predefined abbreviation styles. These are considered user commands, which you can redefine to customize the style.

+ +

+ +
+
4.5.1.3.1. General
+

+These commands apply to all styles.

+

+\ifglsxtrinsertinside true\else false\fiinitial: \iffalse
+ This conditional is used to determine whether the insert part should go inside or outside of the style’s font formatting commands. The default setting is false.

+

+\glsxtrinsertinsidetrue
+ Set the insert inside conditional to true.

+

+\glsxtrinsertinsidefalse
+ Set the insert inside conditional to false.

+

+\glsxtrparen{text}
+ Used for parenthetical content in the inline full form and also, for some styles, the display full form. Note that this formats the opening and closing parentheses according to the inner formatting, but not the argument, which should already incorporate it. The default definition is:
\newcommand*{\glsxtrparen}[1]{%
+ \glsxtrgenentrytextfmt{(}#1\glsxtrgenentrytextfmt{)}}
+

+

+\glsxtrfullsep{entry-label}
+ Separator placed before \glsxtrparen. This is a space by default, but it includes the inner formatting. The argument (the entry label) is ignored by default:
\newcommand*{\glsxtrfullsep}[1]{\glsxtrgenentrytextfmt{ }}
+
You can redefine this to use \glsabspace if you want to have a non-breakable space if the short form is less than \glsacspacemax in width. (You can use \glsacspace instead, but note that \glsacspace doesn’t incorporate the inner formatting.)

+

+\glsabbrvdefaultfont{text}
+ Abbreviation font command used by styles that don’t have specific font markup (for example, long-short but not long-em-short-em). This just does its argument.

+

+\glsfirstabbrvdefaultfont{text}
+ First use abbreviation font command used by styles that don’t have specific font markup. This is defined to just use \glsabbrvdefaultfont.

+

+\glsxtrdefaultrevert{text}
+ This is the default definition of \glsxtrrevert used by styles that don’t have specific font markup. If you redefine \glsabbrvdefaultfont, you will need to redefine \glsxtrdefaultrevert as applicable.

+

+\glslongdefaultfont{text}
+ Long form font command used by styles that don’t have specific font markup. This just does its argument.

+

+\glsfirstlongdefaultfont{text}
+ First use long form font command used by styles that don’t have specific font markup. This is defined to just use \glslongdefaultfont.

+ +

+ +
+
4.5.1.3.2. Parenthetical Styles
+

+These commands apply to the parenthetical styles, such as long-short.

+

+\glsxtrlongshortname
+ This command should expand to the value of the name key for styles like long-short. The default definition is:
\glsxpabbrvfont{\the\glsshorttok}{\glscategorylabel}
+

+

+\glsxtrlongshortdescsort
+ This command should expand to the sort value used by styles such as long-short-desc. The default definition is:
\expandonce\glsxtrorglong\space (\expandonce\glsxtrorgshort)
+
Note that this uses the original long and short values supplied to \newabbreviation.

+

+This command is irrelevant with the “unsrt” family of commands.
+

+

+\glsxtrlongshortdescname
+ This command should expand to the name value used by styles such as long-short-desc. The default definition is:
\glsxplongfont{\the\glslongtok}{\glscategorylabel}%
+\protect\glsxtrfullsep{\the\glslabeltok}%
+\protect\glsxtrparen
+  {\glsxpabbrvfont{\the\glsshorttok}{\glscategorylabel}}
+
This essentially expands to long (short) but includes the style font changing commands, the inner text formatting, and accessibility support.

+

+\glsxtrshortlongname
+ This command should expand to the value of the name key for styles like short-long. The default definition is:
\glsxpabbrvfont{\the\glsshorttok}{\glscategorylabel}
+

+

+\glsxtrshortlongdescsort
+ This command should expand to the value of the sort key for styles like short-long-desc. The default definition is just \expandonce\glsxtrorgshort.

+

+This command is irrelevant with the “unsrt” family of commands.
+

+

+\glsxtrshortlongdescname
+ This command should expand to the value of the name key for styles like short-long-desc. The default definition is:
\glsxpabbrvfont{\the\glsshorttok}{\glscategorylabel}%
+\protect\glsxtrfullsep{\the\glslabeltok}%
+\protect\glsxtrparen
+  \glsxplongfont{\the\glslongtok}{\glscategorylabel}
+

+ +

+ +
+
4.5.1.3.3. User Styles
+

+These commands apply to the “user” styles, such as long-short-user.

+

+\glsxtruserfield
+ This command should expand to the internal label of the field used to store the additional information that should be shown in the parenthetical material on first use. The default is useri, which corresponds to the user1 key.

+

+\glsxtruserparensep
+ The separator used within the parenthetical content. This defaults to a comma followed by a space.

+

+\glsxtruserfieldfmt{text}
+ Used to encapsulate the value of the field given by \glsxtruserfield within \glsxtruserparen and \GLSxtruserparen. This simply does its argument by default.

+The inner formatting with both \glsxtruserparen and \GLSxtruserparen, and the case-change with the latter, will be included in the argument of \glsxtruserfieldfmt.

+For example, to emphasize the user value and separate it with a semi-colon instead of a comma:

\renewcommand{\glsxtruserparensep}{; }
+\renewcommand{\glsxtruserfieldfmt}[1]{\emph{#1}}
+

+

+\glsabbrvuserfont{text}
+ Formatting for the “user” short form. This defaults to \glsabbrvdefaultfont.

+

+\glsfirstabbrvuserfont{text}
+ Formatting for the “user” short form shown on first use. This defaults to \glsabbrvuserfont.

+

+\glsxtrusersuffixinitial: \glsxtrabbrvpluralsuffix
+ Short plural suffix used by the “user” styles. This defaults to \glsxtrabbrvpluralsuffix.

+

+\glslonguserfont{text}
+ Formatting for the “user” long form. This defaults to \glsabbrvdefaultfont.

+

+\glsfirstlonguserfont{text}
+ Formatting for the “user” short form shown on first use. This defaults to \glslonguserfont.

+

+\glsabbrvscuserfont{text}
+ Formatting for the “sc-user” short form. This uses \glsabbrvscfont, which in turn uses \textsc to apply a small caps style, so your document font needs to support it.

+

+\textsc uses small capital glyphs for lowercase characters. Uppercase characters show as normal capitals. This means that you need to use lowercase characters in the abbreviation.
+

+

+\glsfirstabbrvscuserfont{text}
+ Formatting for the “sc-user” short form shown on first use. This defaults to \glsabbrvscuserfont.

+

+\glsxtrscuserrevert{text}
+ Counteracts the effect of \glsabbrvscuserfont. The default is \glsxtrscrevert. If you redefine \glsabbrvscuserfont, you will need to redefine \glsxtrscuserrevert as applicable.

+

+\glsxtrscusersuffix
+ Short plural suffix used by the “sc-user” styles. This defaults to \glsxtrscsuffix.

+

+\glsuserdescription{text}{entry-label}
+ The description field is set to this, where the text argument is the long form, for the “user” styles where the description is set by default. This is defined to ignore its second argument:
\newcommand*{\glsuserdescription}[2]{\glslonguserfont{#1}}
+
If you want to include the information contained in the field identified by \glsxtruserfield, the second argument provides a way of accessing that field without relying on the \glscurrententrylabel placeholder. For example:
\renewcommand*{\glsuserdescription}[2]{%
+ \glslonguserfont{#1}%
+ \ifglshasfield{\glsxtruserfield}{#2}%
+ {, \glscurrentfieldvalue}%
+ {}%
 }
-
-

-

The alias key only contains a single label not a list, but if you want to ensure -consistent formatting with \glsxtrusesee and \glsxtruseseealso you can use -(from v1.42): -


\glsxtrusealias{label}

-

-

The actual unformatted comma-separated list ⟨xr-list⟩ stored in the seealso field -can be accessed with: -


\glsxtrseealsolabels{label}

-

-This will just expand to the ⟨xr-labels⟩ provided in the value of the seealso key. There’s -no corresponding command to access the see field. If you really need to access it, you -can use commands like \glsxtrfielduse, but remember that it may start with -[tag], so it can’t be automatically treated as a simple comma-separated -list. -

As mentioned above, the base glossaries package provides \glsseelist, which -requires a comma-separated list of labels as the argument. The argument isn’t fully -expanded, so it’s not suitable to use, for example, \glsxtrseealsolabels{label} as -the argument. For convenience, glossaries-extra provides -


\glsxtrseelist{xr list}

-

-which fully expands its argument and passes it to \glsseelist. -

As from v1.47, glossaries-extra redefines \glsseelist to make it more flexible. -The base package provides \glsseeitem{label} which is used to format each element -in the list and \glsseelastsep for the separator between the final two items -(\glsseesep is used between the other items). The modifications provide two -additional commands: -


\glsseefirstitem{label}

-

-This defaults to \glsseeitem{label} and is used to format the first label in the -list. -


\glsseelastoxfordsep

- - - -

-This defaults to \glsseelastsep and is used if the list consists of three or more -labels. -

The seealso key implements the automatic indexing using -


\glsxtrindexseealso{label}{xr list}

-

-which just does

-
-\glssee[\seealsoname]{label}{xr list} -
-
unless the xindy option is used with glossaries v4.30+, in which case a distinct -seealso cross-reference class is used instead. -

The command that produces this “see also” text is -


\seealsoname

-

-If \alsoname (provided by language packages) is defined then \seealsoname will -simply be defined to \alsoname otherwise it will be defined to see also. -

The language-sensitive \alsoname is used by general indexing packages, such as -makeidx, so if you redefine \alsoname the change will apply to normal indexes as well -as glossaries. If you only want to change the text produced by the seealso key -without affecting general indexing (with \index) then redefine \seealsoname -instead. -

-

-

Top

2.4 Entry Display Style Modifications

-

Recall from the glossaries package that commands such as \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 “link-text” 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 \gls) and the entry -format. -

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

-
    -
  • If an entry is assigned to a category that has the regular attribute set - (see §7 Categories), the entry is considered a regular entry, - - - - even if it has a value for the short key. In this case \glsentryfmt - uses \glsgenentryfmt (provided by glossaries), which uses the first (or - firstplural) value on first use and the text (or plural) value on subsequent - use. -
  • -
  • An entry that doesn’t have a value for the short key is assumed to - be a regular entry, even if the regular attribute isn’t set to “true” - (since it can’t be an abbreviation without the short form). In this case - \glsentryfmt uses \glsgenentryfmt. -
  • -
  • If an entry does has a value for the short key and hasn’t been marked - as a regular entry through the regular attribute, it’s not considered - a regular entry. In this case \glsentryfmt uses \glsxtrgenabbrvfmt - (defined by glossaries-extra) which is governed by the abbreviation style - (see §4.2 Abbreviation Styles). -
-

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, \glsentryfmt now puts \glsgenentry in the argument of -the new command -


\glsxtrregularfont{text}

-

-This just does its argument ⟨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 \glsxtrregularfont. This is more precise than changing -\glstextformat which is applied to all linking commands for all entries, unless -overridden by the textformat attribute. -

For example: - - - -

-
-\renewcommand*{\glsxtrregularfont}[1]{\textsf{#1}}
-
-

You can access the label through \glslabel. For example, you can query the -category: - - - -

-
-\renewcommand*{\glsxtrregularfont}[1]{%
- \glsifcategory{\glslabel}{general}{\textsf{#1}}{#1}}
-
-

or query the category attribute, for example, provide a custom attribute called -font: - - - -

-
-\glssetcategoryattribute{general}{font}{sf}
-\renewcommand*{\glsxtrregularfont}[1]{%
- \glsifattribute{\glslabel}{font}{sf}{\textsf{#1}}{#1}}
-
-

As from version 1.21, it’s simpler to just do, for example: - - - -

-
-\glssetcategoryattribute{general}{textformat}{textsf}
-
-

without redefining \glsxtrregularfont. -

As from version 1.30, there is also a command for abbreviations that encapsulates -\glsxtrgenabbrvfmt: -


\glsxtrabbreviationfont{text}

-

-This also just does its argument by default. Font changes made by abbreviation styles -are within ⟨text⟩. -

The \glspostlinkhook provided by the glossaries package to insert information -after the link-text produced by commands like \gls and \glstext is redefined -to -


\glsxtrpostlinkhook

-

-This command will discard a following full stop (period) if the discardperiod attribute -is set to “true” for the current entry’s category. It will also do -


\glsxtrpostlink

-

-if a full stop hasn’t be discarded and -


\glsxtrpostlinkendsentence

-

-if a full stop has been discarded. -

It may be that you want to check some other setting (rather than a category -attribute) to determine whether or not to discard a following full stop. In which case -you can redefine: -


\glsxtrifcustomdiscardperiod{true}{false}

-

-You can access the field’s label using \glslabel. This command should do ⟨true⟩ if the -post-link hook should check if a period follows and ⟨false⟩ otherwise. The default -definition is simply: - - - -

-
-\newcommand*{\glsxtrifcustomdiscardperiod}[2]{#2}
-
-

which means that no additional checks are performed. (Only the recognised category -attributes will be checked.) -

Avoid the use of \gls-like and \glstext-like commands within the -post-link hook as they will cause interference. Consider using commands like -\glsentrytext, \glsaccesstext or \glsxtrp (§2.8 Nested Links) instead. -
-

-

By default \glsxtrpostlink just does \glsxtrpostlinkcategory if -it exists, where ⟨category⟩ is the category label for the current entry. (For -example, for the general category, \glsxtrpostlinkgeneral if it has been -defined.) -

You can define the post-link hook command using \newcommand, for -example: - - - -

-
-\newcommand*{\glsxtrpostlinkgeneral}{%
- \glsxtrpostlinkAddDescOnFirstUse
+

+

+\glsxtruserparen{text}{entry-label}
+ If the field given by \glsxtruserfield has been set, this essentially does:
\glsxtrfullsep{entry-label}\glsxtrparen{text, user-value}
+
otherwise it does:
\glsxtrfullsep{entry-label}\glsxtrparen{text}
+
It’s a little more complicated than this as the definition includes the inner formatting around the comma and the field value (user-value). The comma separator is given by \glsxtruserparensep, and the field value is encapsulated with \glsxtruserfieldfmt (with the inner formatting inside).

+If you redefine this command, you will also need to redefine the following one in a similar manner.

+

+\GLSxtruserparen{text}{entry-label}
+ As above but the content of the field given by \glsxtruserfield is converted to all caps. Note that simply applying an uppercase command to \glsxtruserparen can fail as it can cause the label to be converted to all caps, which is the reason why a separate command to internally perform the case-change is provided.

+

+\glsxtrlongshortuserdescname
+ Expands to the value for the name key for styles like long-short-user-desc. The default definition is:
\protect\glslonguserfont{\the\glslongtok}%
+\protect\glsxtruserparen
+{\protect\glsabbrvuserfont{\the\glsshorttok}}{\the\glslabeltok}
+

+

+\glsxtrlongshortscusername
+ Expands to the value for the name key for styles like long-postshort-sc-user styles where the description is automatically set. The default definition is:
\protect\glsabbrvscuserfont{\the\glsshorttok}
+

+

+\glsxtrlongshortscuserdescname
+ Expands to the value for the name key for styles like long-postshort-sc-user-desc. The default definition is:
\protect\glslonguserfont{\the\glslongtok}%
+\protect\glsxtruserparen
+{\protect\glsabbrvscuserfont{\the\glsshorttok}}{\the\glslabeltok}
+

+

+\glsxtrshortlonguserdescname
+ Expands to the value for the name key for styles like short-long-user-desc. The default definition is:
\protect\glsabbrvuserfont{\the\glsshorttok}%
+\protect\glsxtruserparen
+  {\protect\glslonguserfont{\the\glslongpltok}}%
+  {\the\glslabeltok}
+

+

+\glsxtruserlongshortformat{entry-label}{insert}{long-fmt-cs}{short-fmt-cs}
+ This command is used on the first use of \gls or with \glsxtrfull by styles like long-short-user to format the long form followed by the short form (with optional user information) in parentheses. The default definition is:
\newcommand*{\glsxtruserlongshortformat}[4]{%
+  \glsxtrlongformat{#1}{#2}{#3}%
+  \glsxtrusershortformat{#1}{#4}%
 }
-
-

or, as from v1.31, you can use -


\glsdefpostlink{category}{definition}

-

-This is simply a shortcut for:

-
-\csdef{glsxtrpostlinkcategory}{definition} -
-
Note that it doesn’t check if the command has already been defined. -

The sentence-ending hook is slightly more complicated. If the command -\glsxtrpostlinkcategory 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 -\glsxtrpostlinkcategory 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. -

There are some convenient commands you might want to use when customizing -the post-link-text category hooks: -


\glsxtrpostlinkAddDescOnFirstUse

-

-This will add the description in parentheses on first use. -

For example, suppose you want to append the description in parentheses on first -use for entries in the symbol category: - - - -

-
-\newcommand*{\glsxtrpostlinksymbol}{%
-  \glsxtrpostlinkAddDescOnFirstUse
+

+

+\Glsxtruserlongshortformat{entry-label}{insert}{long-fmt-cs}{short-fmt-cs}
+ As above but for sentence case.

+

+\GLSxtruserlongshortformat{entry-label}{insert}{long-fmt-cs}{short-fmt-cs}
+ As above but for all caps.

+

+\glsxtruserlongshortplformat{entry-label}{insert}{long-fmt-cs}{short-fmt-cs}
+ This command is used on the first use of \glspl or with \glsxtrfullpl by styles like long-short-user to format the plural long form followed by the plural short form (with optional user information) in parentheses. The default definition is:
\newcommand*{\glsxtruserlongshortplformat}[4]{%
+  \glsxtrlongplformat{#1}{#2}{#3}%
+  \glsxtrusershortplformat{#1}{#4}%
 }
-
-

-


\glsxtrpostlinkAddSymbolOnFirstUse

-

-This will append the symbol (if defined) in parentheses on first use. (Does nothing if -the symbol hasn’t been set.) -


\glsxtrpostlinkAddSymbolDescOnFirstUse

-

-(New to v1.31.) On first use, this will append \space(⟨symbol⟩, ⟨description⟩) if the -symbol is defined otherwise it just appends \space(⟨description⟩). -

If you want to provide your own custom format be aware that you can’t use -\ifglsused within the post-link-text hook as by this point the first use flag will have -been unset. Instead you can use -


\glsxtrifwasfirstuse{true}{false}

-

-This will do ⟨true⟩ if the last used entry was the first use for that entry, otherwise it -will do ⟨false⟩. (Requires at least glossaries v4.19 to work properly.) This command is -locally set by commands like \gls, so don’t rely on it outside of the post-link-text -hook. -

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

-

For example, if you want to place the description in a footnote after the link-text -on first use for the general category: - - - -

-
-\newcommand*{\glsxtrpostlinkgeneral}{%
-  \glsxtrifwasfirstuse{\footnote{\glsentrydesc{\glslabel}}}{}%
+

+

+\Glsxtruserlongshortplformat{entry-label}{insert}{long-fmt-cs}{short-fmt-cs}
+ As above but for sentence case.

+

+\GLSxtruserlongshortplformat{entry-label}{insert}{long-fmt-cs}{short-fmt-cs}
+ As above but for all caps.

+

+\glsxtrusershortlongformat{entry-label}{insert}{long-fmt-cs}{short-fmt-cs}
+ This command is used on the first use of \gls or with \glsxtrfull by styles like short-long-user to format the short form followed by the long form (with optional user information) in parentheses. The default definition is:
\newcommand*{\glsxtrusershortlongformat}[4]{%
+  \glsxtrshortformat{#1}{#2}{#3}%
+  \glsxtruserlongformat{#1}{#4}%
 }
-
-

-

The short-postfootnote abbreviation style uses the post-link-text hook to place the -footnote after trailing punctuation characters. -

-

-

Top

2.5 Entry Counting Modifications

-

If you are using bib2gls you may find it more convenient to use the record count -commands described in §10 bib2gls: Managing Reference Databases -instead. -

The \glsenableentrycount command is modified to allow for the entrycount -attribute. This means that you not only need to enable entry counting with -\glsenableentrycount, but you also need to set the appropriate attribute (see -§7 Categories). -

For example, instead of just doing: - - - -

-
-\glsenableentrycount
-
-

you now need to do: - - - -

-
-\glsenableentrycount
-\glssetcategoryattribute{abbreviation}{entrycount}{1}
-
-

This will enable the entry counting for entries in the 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 §8.1 Entry Counting (First Use Flag). -

-

-

Top

2.6 First Use Flag

-

The glossaries package provides -


\ifglsused{label}{true}{false}

-

-to determine whether or not an entry has been used. This requires the entry to have -been defined. If the entry is undefined, then the underlying boolean variable doesn’t -exist and so is neither true nor false. This command will produce an error with the -default undefaction=error mode and a warning with undefaction=warn and, where -appropriate, displays ?? in the document text to denote an undefined reference. -With both modes, neither ⟨true⟩ nor ⟨false⟩ will be performed if ⟨label⟩ doesn’t -exist. -

The record option automatically implements undefaction=warn since no entries -will be defined until they have been selected by bib2gls. In this case, you may prefer -to use: -


\GlsXtrIfUnusedOrUndefined{label}{true}{false}

-

-(new to v1.34) which does ⟨true⟩ if the entry given by ⟨label⟩ is undefined or if -the entry is marked as unused. Remember that neither \ifglsused nor -\GlsXtrIfUnusedOrUndefined should be used in the post-link hook as the first use -flag will have already been unset before the hook is performed. (Instead, -\glsxtrifwasfirstuse should be used, see §2.4 Entry Display -Style Modifications.) -

There are two new commands provided with version 1.31+: -


\glslocalreseteach{list}

-

-and -


\glslocalunseteach{list}

-

-These behave like \glslocalreset and \glslocalunset but the argument is a -comma-separated list of labels. - - - -

The internal command used by \glsunset is modified first to allow for the -changing in entry counting, described above, but also to allow for buffering pending -unsets when commands like \gls are used in a context where changing a boolean -variable can cause things to go wrong. One example of this is using \gls in one of -the commands provided with the package. For example: - - - -

-
-\ul{Some text about \gls{html}.}
-
-

This causes the confusing error: - - - -

-
-Glossary entry `{html}' has not been defined.
-
-

The simplest workaround is to put \gls{html} inside the argument of \mbox. For -example: - - - -

-
-\ul{Some text about \mbox{\gls{html}}.}
-
-

This can work provided it’s not the first use of this entry. It if is, then unsetting the -first use flag causes a problem and results in the error: - - - -

-
-! Package soul Error: Reconstruction failed.
-
-

The glossaries-extra package provides a way of temporarily switching off \glsunset -so that it just makes a note of the entry’s label but doesn’t actually perform the -change: -


\GlsXtrStartUnsetBuffering

-

-The unstarred version doesn’t check for duplicates, so the internal list may -end up with multiple occurrences of the same label. The starred version -only adds a label to the internal list if it’s not already in it. Note that this -buffering only applies to the global \glsunset and does not affect the local -\glslocalunset. -

Later you can restore \glsunset and unset all buffered labels using: -


\GlsXtrStopUnsetBuffering

-

-The starred form \GlsXtrStopUnsetBuffering* uses \glslocalunset instead. For -example: - - - -

-
-\documentclass{article}
-\usepackage[T1]{fontenc}
-\usepackage{soul}
-\usepackage{glossaries-extra}
-\newabbreviation{html}{HTML}{hypertext markup language}
-\begin{document}
-\GlsXtrStartUnsetBuffering
-\ul{Some text about \mbox{\gls{html}}.}
-\GlsXtrStopUnsetBuffering
-Next use: \gls{html}.
-\end{document}
-
-

Before you stop the unset buffering, you can iterate over the current buffer -using -


\GlsXtrForUnsetBufferedList{cs}

-

-where ⟨cs⟩ is a control sequence that takes a single argument (which is the entry label). -This is best used with the starred version \GlsXtrStartUnsetBuffering* to avoid -duplicates. -

You can discard the buffer and restore \glsunset to its normal behaviour with -(new to v1.42): -


\GlsXtrDiscardUnsetBuffering

-

-

Note that since the change in the first use flag now doesn’t occur until -\GlsXtrStopUnsetBuffering, multiple references of the same term within the -buffering zone will always be treated as first use (if the term wasn’t used before the -buffering started).
-

-

There can still be a problem here as content within \mbox can’t break across a -line so you may end up with an overfull line or excessive white space within the -paragraph. -

An alternative is to use \protect: - - - -

-
-\GlsXtrStartUnsetBuffering
-\ul{Some text about \protect\gls{html}.}
-\GlsXtrStopUnsetBuffering
-
-

but the formatting (underlining in this example) won’t be applied. Another -possibility is: - - - -

-
-\usepackage[T1]{fontenc}
-\usepackage{soul}
-\usepackage{glossaries-extra}
-\newabbreviation{html}{HTML}{hypertext markup language}
-\newrobustcmd{\gul}[1]{%
-  {%
-   \def\glsxtrabbreviationfont##1{\GlsXtrExpandedFmt{\ul}{##1}}%
-   \def\glsxtrregularfont##1{\GlsXtrExpandedFmt{\ul}{##1}}%
-   #1%
-  }%
+

+

+\Glsxtrusershortlongformat{entry-label}{insert}{long-fmt-cs}{short-fmt-cs}
+ As above but for sentence case.

+

+\GLSxtrusershortlongformat{entry-label}{insert}{long-fmt-cs}{short-fmt-cs}
+ As above but for all caps.

+

+\glsxtrusershortlongplformat{entry-label}{insert}{long-fmt-cs}{short-fmt-cs}
+ This command is used on the first use of \glspl or with \glsxtrfullpl by styles like short-long-user to format the plural short form followed by the plural long form (with optional user information) in parentheses. The default definition is:
\newcommand*{\glsxtrusershortlongplformat}[4]{%
+  \glsxtrshortplformat{#1}{#2}{#3}%
+  \glsxtruserlongplformat{#1}{#4}%
 }
-\begin{document}
-\ul{Some text about }\gls[textformat=gul]{html}.
-Next use: \gls{html}.
-\end{document}
-
-

This moves \gls outside of \ul and uses textformat to locally change the formatting -command used by \gls (which is normally given by \glstextformat or the -textformat attribute) to a custom command \gul, which locally changes the regular -font and the default abbreviation font to use \ul. It then uses -


\GlsXtrExpandedFmt{cs}{text}

-

-which (protected) fully expands ⟨text⟩ before applying ⟨cs⟩, which must be a control -sequence that takes a single argument. This allows \ul to move much further inside -and increases its chances of working. It can still break if ⟨text⟩ expands to -something that \ul can’t deal with. For example, if an abbreviation style is used -that contains complex formatting or if the field value contains problematic -content. -

-

-

Top

2.7 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 glossaries package allows the 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 glossaries package lets the plural -field default to the value of the text field with \glspluralsuffix appended. This -command is defined to be just the letter “s”. This means that the majority of terms -don’t need to have the plural supplied as well, and you only need to use it for the -exceptions. -

For languages that don’t have this general rule, the plural field will always need to -be supplied, where needed. -

There are other plural fields, such as firstplural, longplural and 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 glossaries package follows these rules:

-
    -
  • If firstplural is missing, then \glspluralsuffix is appended to the first - field, if that field has been supplied. If the first field hasn’t been supplied - but the plural field has been supplied, then the firstplural field defaults to - the plural field. If the plural field hasn’t been supplied, then both the plural - and firstplural fields default to the text field (or name, if no text field) with - \glspluralsuffix appended. -
  • -
  • If the longplural field is missing, then \glspluralsuffix is appended to - the long field, if the long field has been supplied. -
  • -
  • If the shortplural field is missing then, with the base glossaries acronym - mechanism, \acrpluralsuffix is appended to the short field. -
-

This last case is changed with glossaries-extra. With this extension package, the -shortplural field defaults to the short field with \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, \abbrvpluralsuffix is redefined. In most cases its redefined to -use -


\glsxtrabbrvpluralsuffix

-

-which defaults to just \glspluralsuffix. Some of the abbreviation styles have their -own command for the plural suffix, such as \glsxtrscsuffix, so if you want to -completely strip all the plural suffixes used for abbreviations then you need to -redefine \glsxtrabbrvpluralsuffix not \abbrvpluralsuffix, which changes with -the style. Redefining \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 aposplural which -uses the suffix - - - -

-
-'\abbrvpluralsuffix
-
-

That is, an apostrophe followed by \abbrvpluralsuffix is appended. The second -attribute is noshortplural which suppresses the suffix and simply sets shortplural to the -same as short. -

-

-

Top

2.8 Nested Links

-

Complications arise when you use \gls in the value of the name field (or text or 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 glossaries package: - - - -

-
-\newacronym{ssi}{SSI}{Server Side Includes}
-\newacronym{html}{HTML}{Hypertext Markup Language}
-\newacronym{shtml}{S\gls{html}}{\gls{ssi} enabled \gls{html}}
-
-

-

The main problems are: -

    -
  1. The first letter upper casing commands, such as \Gls, won’t work for the - shtml entry on first use if the long form is displayed before the short - form (which is the default abbreviation style). This will attempt to - do - - - -
    -     \gls{\uppercase ssi} enabled \gls{html}
    -
    -

    which just doesn’t work. Grouping the \gls{ssi} doesn’t work either as this - will effectively try to do - - - -

    -
    -     \uppercase{\gls{ssi}} enabled \gls{html}
    -
    -

    This will upper case the label ssi so the entry won’t be recognised. - This problem will also occur if you use the all capitals version, such as - \GLS. -

  2. -
  3. The long and abbreviated forms accessed through \glsentrylong and - \glsentryshort are no longer expandable and so can’t be used be used in - contexts that require this, such as PDF bookmarks. -
  4. -
  5. The nested commands may end up in the sort key, which will confuse the - indexing. -
  6. -
  7. The shtml entry produces inconsistent results depending on whether the ssi - or html entries have been used. Suppose both ssi and html are used before - shtml. For example: - - - -
    -     This section discusses \gls{ssi}, \gls{html} and \gls{shtml}.
    -
    -

    This produces: -

    -

    This section discusses server side includes (SSI), hypertext - markup language (HTML) and SSI enabled HTML (SHTML).

    -

    So the first use of the shtml entry produces “SSI enabled HTML (SHTML)”. -

    Now let’s suppose the html entry is used before the shtml but the ssi entry is - used after the shtml entry, for example: - - - -

    -
    -     The sample files are either \gls{html} or \gls{shtml}, but let's
    -     first discuss \gls{ssi}.
    -
    -

    This produces: -

    -

    The sample files are either hypertext markup language (HTML) - or server side includes (SSI) enabled HTML (SHTML), but let’s - first discuss SSI.

    -

    So the first use of the shtml entry now produces “server side includes (SSI) - enabled HTML (SHTML)”, which looks a bit strange. -

    Now let’s suppose the shtml entry is used before (or without) the other two - entries: - - - -

    -
    -     This article is an introduction to \gls{shtml}.
    -
    -

    This produces: -

    -

    This article is an introduction to server side includes (SSI) - enabled hypertext markup language (HTML) (SHTML).

    -

    So the first use of the shtml entry now produces “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 glossaries package’s - \setacronymstyle. For example: - - - -

    -
    -     \setacronymstyle{long-short}
    -
    -

    as this references the label through the use of \glslabel when displaying the - long and short forms, but this value changes with each use of \gls, so - instead of displaying “(SHTML)” at the end of the first use, it now - displays “(HTML)”, since \glslabel has been changed to html by - \gls{html}. -

    Another oddity occurs if you reset the html entry between uses of the shtml - entry. For example: - - - -

    -
    -     \gls{shtml} ... \glsreset{html}\gls{shtml}
    -
    -

    The next use of shtml produces “Shypertext markup language (HTML)”, - which is downright weird. -

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

  8. -
  9. Each time the shtml entry is used, the html entry will also be indexed and - marked as used, and on first use this will happen to both the ssi and html - entries. This kind of duplication in the location list isn’t usually particularly - helpful to the reader. -
  10. -
  11. If 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 first - use case, the user clicks on the “HTML” part of the “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. -
-

For these reasons it’s better to use the simple expandable commands like -\glsentrytext or \glsentryshort in the definition of other entries (although that -doesn’t fix the first problem). -

Alternatively use something like: - - - -

-
-\newacronym
- [description={\acrshort{ssi} enabled \acrshort{html}}]
- {shtml}{SHTML}{SSI enabled HTML}
-
-

with glossaries or: - - - -

-
-\newabbreviation
- [description={\glsxtrshort{ssi} enabled \glsxtrshort{html}}]
- {shtml}{SHTML}{SSI enabled HTML}
-
-

with glossaries-extra. This fixes all the above listed problems (as long as you don’t -use \glsdesc). Note that replacing \gls with \acrshort in the original example -may fix the first use 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 -\glsabbrvfont: - - - -

-
-\setabbreviationstyle{long-short-sc}
-\newabbreviation{ssi}{ssi}{server-side includes}
-\newabbreviation{html}{html}{hypertext markup language}
-\newabbreviation{shtml}{shtml}{\glsabbrvfont{ssi} enabled
-\glsabbrvfont{html}}
-
-

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. -

If the term can simply be treated as a series of previously defined entries, then -consider using multi-entries (or compound sets). See §6 Multi (or -Compound) Entries for further details. -

However, if you’re really determined to use \gls in a field that may be included -within some link-text, glossaries-extra patches internals used by the linking commands -so that if \gls (or plural or case changing variants) occurs in the link-text it will -behave as though you used \glstext[hyper=false,noindex] instead. Grouping is -also added so that, for example, when \gls{shtml} is used for the first time the long -form - - - -

-
-\gls{ssi} enabled \gls{html}
-
-

is treated as - - - -

-
-{\glstext[hyper=false,noindex]{ssi}} enabled
-{\glstext[hyper=false,noindex]{html}}
-
-

This overcomes problems 4, 5 and 6 listed above, but still doesn’t fix problems 1 -and 2. Problem 3 usually won’t be an issue as most abbreviation styles set the 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 long-noshort-desc). -

Additionally, any instance of the long form commands, such as \glsxtrlong or -\acrlong will be temporarily redefined to just use

-
-{\glsentrylong{label}insert} -
-
(or case-changing versions). Similarly the short form commands, such as -\glsxtrshort or \acrshort will use \glsentryshort in the argument of either -\glsabbrvfont (for \glsxtrshort) or \acronymfont (for \acrshort). So if the -shtml entry had instead been defined as: - - - -
-\newacronym{shtml}{SHTML}{\acrshort{ssi} enabled \acrshort{html}}
-
-

then (using the long-short style) the first use will be like - - - -

-
-{\acronymfont{\glsentryshort{ssi}}} enabled
-{\acronymfont{\glsentryshort{html}}} (SHTML)
-
-

whereas if the entry is defined as: - - - -

-
-\newabbreviation{shtml}{SHTML}{\glsxtrshort{ssi} enabled
-\glsxtrshort{html}}
-
-

then the first use will be like: - - - -

-
-{\glsabbrvfont{\glsentryshort{ssi}}} enabled
-{\glsabbrvfont{\glsentryshort{html}}} (SHTML)
-
-

Note that the first optional argument of \acrshort or \glsxtrshort is ignored in -this context. (The final optional argument will be inserted, if present.) The -abbreviation style that governs \glsabbrvfont will be set for \glsxtrshort. Note -that \acrshort doesn’t set the abbreviation style. -

Alternatively you can use: -


\glsxtrp{field}{label}

-

-where ⟨field⟩ is the field label and corresponds to a command in the form \glsfield⟩ -(e.g. \glstext) or in the form \glsxtrfield⟩ (e.g. \glsxtrshort). -

There’s a shortcut command for the most common fields: -


\glsps{label}

-

-which is equivalent to \glsxtrp{short}{label}, and -


\glspt{label}

-

-which is equivalent to \glsxtrp{text}{label}. -

The \glsxtrp command behaves much like the \glsfmtfield⟩ commands described -in §5 Entries in Sectioning Titles, Headers, Captions and Contents but -the post-link hook is also suppressed and extra grouping is added. It automatically -sets hyper to false and noindex to true. If you want to change this, you can -use -


\glsxtrsetpopts{options}

-

-For example: - - - -

-
-\glsxtrsetpopts{hyper=false}
-
-

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: -


\glossxtrsetpopts

-

-which by default just does - - - -

-
-\glsxtrsetpopts{noindex}
-
-

You can redefine this if you want to adjust the setting when \glsxtrp is used in the -glossary. For example: - - - -

-
-\renewcommand{\glossxtrsetpopts}{\glsxtrsetpopts{noindex=false}}
-
-

-

For example, - - - -

-
-\glsxtrp{short}{ssi}
-
-

is equivalent to - - - -

-
-{\let\glspostlinkhook\relax
- \glsxtrshort[hyper=false,noindex]{ssi}[]%
+

+

+\Glsxtrusershortlongplformat{entry-label}{insert}{long-fmt-cs}{short-fmt-cs}
+ As above but for sentence case.

+

+\GLSxtrusershortlongplformat{entry-label}{insert}{long-fmt-cs}{short-fmt-cs}
+ As above but for all caps.

+

+\glsxtrusershortformat{entry-label}{fmt-cs}
+ Used to format the singular short form in parentheses (with \glsxtruserparen) on the first use of \gls or \Gls or with \glsxtrfull or \Glsxtrfull for styles like long-short-user. The default definition is:
\newcommand*{\glsxtrusershortformat}[2]{%
+  \glsxtruserparen{\glsxtrshortformat{#1}{}{#2}}{#1}%
 }
-
-

in the main body of the document or - - - -

-
-{\let\glspostlinkhook\relax
- \glsxtrshort[noindex]{ssi}[]%
+

+

+\glsxtrusershortplformat{entry-label}{fmt-cs}
+ As \glsxtrusershortformat but for the first use of \glspl or with \glsxtrfull for styles like long-short-user. This has a similar definition to the above but with \glsxtrshortplformat.

+

+\GLSxtrusershortformat{entry-label}{fmt-cs}
+ As \glsxtrusershortformat but is used with the all caps \GLS or \GLSxtrfull. This uses \GLSxtruserparen instead of \glsxtruserparen.

+

+\GLSxtrusershortplformat{entry-label}{fmt-cs}
+ As \glsxtrusershortplformat but is used with the all caps \GLSpl or \GLSxtrfullpl. This uses \GLSxtruserparen instead of \glsxtruserparen.

+

+\glsxtrpostusershortformat{entry-label}{fmt-cs}
+ Used in the post-link hook to format the short form in parentheses for styles like long-postshort-user. The default definition is:
\newcommand*{\glsxtrpostusershortformat}[2]{%
+  \glsxtrifallcaps
+  {\GLSxtrusershortformat{#1}{#2}}%
+  {\glsxtrusershortformat{#1}{#2}}%
 }
-
-

inside the glossary. (Note the post-link hook is locally disabled.) -

If \glsxtrp{short}{ssi} occurs in a sectioning mark, it’s equivalent -to - - - -

-
-{\glsxtrheadshort{ssi}}
-
-

(which recognises the headuc attribute.) -

If hyperref has been loaded, then the bookmark will use \glsentryfield⟩ -(\glsentryshort{ssi} in the above example). -

There are similar commands -


\Glsxtrp{field}{label}

-

-for first letter upper case and -


\GLSxtrp{field}{label}

-

-for all upper case. -

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

-

You can, with care, protect against issue 1 by inserting an empty group at the -start if the long form starts with a command that breaks the first letter uppercasing -commands like \Gls, but you still won’t be able to use the all caps commands, such -as \GLS. -

If you really need nested commands, the safest method is - - - -

-
-\newabbreviation{shtml}{shtml}{{}\glsxtrp{short}{ssi} enabled
-\glsxtrp{short}{html}}
-
-

but be aware that it may have some unexpected results occasionally. -

Example document: - - - -

-
-\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}
-
-

-

-

-

Top

2.9 Acronym Style Modifications

-

The glossaries-extra package provides a new way of dealing with abbreviations and - - - -redefines \newacronym to use \newabbreviation (see §4 -Abbreviations). The simplest way to update a document that uses \newacronym from -glossaries to glossaries-extra is do just add - - - -

-
-\setabbreviationstyle[acronym]{long-short}
-
-

before you define any entries. If you have used commands like \acrshort, \acrlong -and \acrfull, you need to substitute them with \glsxtrshort, \glsxtrlong and -\glsxtrfull. (This includes plural and case-changing forms.) Your text editor’s -search and replace function should help with this. If you have used the shortcuts -package option then use shortcuts=ac in order to continue using the shortcut -commands like \ac. With this setting, \acs will use \glsxtrshort instead of -\acrshort etc. -

For example, the following document using just glossaries - - - -

-
-\documentclass{article}
-\usepackage[acronym,nopostdot,toc]{glossaries}
-\makeglossaries
-\setacronymstyle{long-short}
-\newacronym{html}{HTML}{hypertext markup language}
-\begin{document}
-\gls{html}
-\printglossaries
-\end{document}
-
-

can be easily adapted to use glossaries-extra: - - - -

-
-\documentclass{article}
-\usepackage[acronym]{glossaries-extra}
-\makeglossaries
-\setabbreviationstyle[acronym]{long-short}
-\newacronym{html}{HTML}{hypertext markup language}
-\begin{document}
-\gls{html}
-\printglossaries
-\end{document}
-
-

Table 2.1 lists the nearest equivalent glossaries-extra abbreviation styles for the -predefined acronym styles provided by glossaries, but note that the new styles use -different formatting commands. See §4.4 Predefined -Abbreviation Styles for further details. -

-
- - - -


- - - -
Table 2.1: Old Acronym Styles \setacronymstyle{old-style-name} Verses -New Abbreviation Styles \setabbreviationstyle[category]{new-style-name}
-
- - - - - - - - - - - - - - - - - - - - -

Old Style Name

New Style Name

long-sc-short

long-short-sc

long-sm-short

long-short-sm

long-sp-short

long-short
with \renewcommand{\glsxtrfullsep}[1]{\glsacspace{#1}}

short-long

short-long

sc-short-long

short-sc-long

sm-short-long

short-sm-long

long-short-desc

long-short-desc

long-sc-short-desc

long-short-sc-desc

long-sm-short-desc

long-short-sm-desc

long-sp-short-desc

long-short-desc
with \renewcommand{\glsxtrfullsep}[1]{\glsacspace{#1}}

short-long-desc

short-long-desc

sc-short-long-desc

short-sc-long-desc

sm-short-long-desc

short-sm-long-desc

dua

long-noshort

dua-desc

long-noshort-desc

footnote

short-footnote

footnote-sc

short-sc-footnote

footnote-sm

short-sm-footnote

footnote-desc

short-footnote-desc

footnote-sc-desc

short-sc-footnote-desc

footnote-sm-desc

short-sm-footnote-desc

- - - -

-
-

The reason for introducing the new style of abbreviation commands provided by -glossaries-extra is because the original acronym commands provided by glossaries are -too restrictive to work with the internal modifications made by glossaries-extra. -However, if you really want to restore the generic acronym function provided by -glossaries you can use -


\RestoreAcronyms

-

-(before any use of \newacronym). -

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

If you use \RestoreAcronyms, don’t use any of the commands provided by -glossaries-extra intended for abbreviations (such as \glsxtrshort or \glsfmtshort) -with entries defined via \newacronym as it will cause unexpected results. -
-

-

In general, there’s rarely any need for \RestoreAcronyms. If you have a document -that uses \newacronymstyle, then it’s best to either stick with just glossaries for that -document or define an equivalent abbreviation style with \newabbreviationstyle. -(See §4.5 Defining New Abbreviation Styles for further -details.) -


\glsacspace{label}

-

-The space command \glsacspace used by the long-sp-short acronym style provided -by glossaries is modified so that it uses -


\glsacspacemax

-

-instead of the hard-coded 3em. This is a command not a length and so can be -changed using \renewcommand. -

Any of the new abbreviation styles that use \glsxtrfullsep (such as long-short) -can easily be changed to use \glsacspace with - - - -

-
-\renewcommand*{\glsxtrfullsep}[1]{\glsacspace{#1}}
-
-

-

The first use acronym font command -


\firstacronymfont{text}

-

-is redefined to use the first use abbreviation font command \glsfirstabbrvfont. -This will be reset if you use \RestoreAcronyms. -

The subsequent use acronym font command -


\acronymfont{text}

-

-is redefined to use the subsequent use abbreviation font command \glsabbrvfont. -This will be reset if you use \RestoreAcronyms. -

-

Top

2.10 Glossaries

-

The \newignoredglossary{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 targeturl attribute to create a link to an external URL. (See -§7 Categories for further details.) As from v1.12 both the starred and -unstarred version check that the glossary doesn’t already exist. (The glossaries -package omits this check.) -

You can now provide an ignored glossary with: -


\provideignoredglossary{type}

-

-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 \printglossary, \printnoidxglossary -and \printunsrtglossary have extra keys: -

-
    -
  • target. This is a boolean key which can be used to switch off the automatic - hypertarget for each entry. Unlike \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. - - - -
  • -
  • targetnameprefix={prefix}. Another way of avoiding duplicate target names is to - set a prefix used for the names. Unlike changing \glolinkprefix this doesn’t - affect any hyperlinks (such as those created with \gls). -

    This doesn’t include the navigation hyper group targets in styles such as - listhypergroup. The link name for these is given by \glsnavhyperlinkname. -
    -

    -

  • -
  • prefix={prefix}. If you do actually want to locally change \glolinkprefix, you - can use the prefix key instead. You need to use the matching prefix key in - commands like \gls. -
  • -
  • label={label}. Labels the glossary with \label{label} and also defines - \@currentlabelname to the glossary’s TOC title (to provide text for - \nameref). You can also set the label before the glossary using: -


    \glsxtrsetglossarylabel{label}

    -

    - but take care of duplicate labels if it’s not scoped. -

  • -
  • groups. This is a boolean key (new to v1.44) designed for use with - \printunsrtglossary (and other \printunsrtvariations). It has no effect - with \printglossary and \printnoidxglossary. -

    If true (default), group formation (group header and group skip) will be - attempted if the group key has been defined and set. Note that some styles - ignore the header and group skip commands so there may not be a noticeable - difference in those cases. If this key is set to false, no group formation will - occur so there won’t be any group markup to separate letter groups so - there will be no visual separation regardless of style or the group skip - setting. -

  • -
  • leveloffset. This key (new to v1.44) is designed for use with \printunsrtglossary - (and other \printunsrtvariations). It has no effect with \printglossary - and \printnoidxglossary. -

    The value may either be a simple integer ⟨n⟩ to indicate assignment or in the - form ++n⟩ to indicate an increment. This will locally assign or increment the - level offset. The default value is 0. This will cause entries to be displayed as - though their hierarchical level is N more than it would normally be (where N is - the level offset). For example, a top-level entry (that is, an entry without a - parent) would normally have a hierarchical level of 0. With a level offset of 1, - - - - it would be treated by the glossary style as though it was actually a - level 1 entry. (Remember that some styles don’t support hierarchical - glossaries.) -

    Note that the group formation (if supported) will still occur between entries - that don’t have a parent, regardless of the level offset. This can cause odd - results but can be switched off with groups. See Gallery: Inner or Nested - Glossaries for an example.

-

-

-

Top

2.11 Glossary Style Modifications

-

The glossaries-extra-stylemods package (more conveniently loaded through the -glossaries-extra stylemods option) modifies some of the predefined styles that are -provided with the glossaries package. These modifications are described in more detail -in §2.11.3 The glossaries-extra-stylemods Package. -

The glossaries package tries to determine the group title from its label by first -checking if \labelgroupname exists. If it doesn’t exist, then the title is assumed to be -the same as the label. For example, when typesetting the “A” letter group, glossaries -first checks if \Agroupname exists. This could potentially cause conflict with another -package that may have some other meaning for \Agroupname, so glossaries-extra first -checks for the existence of the internal command \glsxtr@grouptitle@label⟩ -which shouldn’t clash with another package. You can set the group title -using -


\glsxtrsetgrouptitle{label}{title}

-

-For example: - - - -

-
-\glsxtrsetgrouptitle{A}{A (a)}
-
-

This uses a global assignment. If you need to scope the change you can -use -


\glsxtrlocalsetgrouptitle{label}{title}

-

-

-

-

Top

2.11.1 Style Hooks

-

The commands \glossentryname and \glossentrydesc are modified to take into -account the glossname, glossnamefont, glossdesc and glossdescfont attributes (see -§7 Categories). This means you can make simple font or case-changing -modifications to the name and description without defining a new glossary -style. -

(New to version 1.42.) The command \glossentrysymbol is modified to take into -account the glosssymbolfont attribute. Note that, unlike the above, there’s no -corresponding attribute to change the case as it’s usually not appropriate to change -the case of a symbol (and for some symbols, such as pictographs, there’s no concept -of case). If \texorpdfstring has been defined \glossentrysymbol will be defined to -do:

-
-\texorpdfstring{TeX code}{PDF} -
-
The ⟨TeX code⟩ part is robust and deals with the actual typesetting of the symbol. -The ⟨PDF⟩ part is simply: -


\glsentrypdfsymbol{label}

-

-which is defined to just do \glsentrysymbol{label}. The chances are that the code -in the symbol key won’t be valid in the PDF bookmarks, so you can redefine -\glsentrypdfsymbol to use a more appropriate field. (If you do redefine this -command, remember that it needs to fully expand.) -

For example, if you are using glossaries-accsupp, you could use the symbolaccess -field: - - - -

-
-\renewcommand{\glsentrypdfsymbol}[1]{\glsentrysymbolaccess{#1}}
-
-

Alternatively, if you are using bib2gls you can use the TeX parser library to -interpret a copy of the symbol field and use that. For example, with the resource -options: - - - -

-
-  replicate-fields={symbol=user1},
-  interpret-fields={user1}
-
-

This stores the interpreted value of the symbol in the user1 field, so you can then -do: - - - -

-
-\renewcommand{\glsentrypdfsymbol}[1]{\glsentryuseri{#1}}
-
-

(You may need XƎLATEX or LuaLATEX with this method.) This allows -\glossentrysymbol to be used in a section heading with standalone definitions. -

If you want to adapt a style to use another field instead of name, you can -use -


\glossentrynameother{label}{field}

-

-This behaves just like \glossentryname (that is, it obeys the glossname attribute, -uses either the glossnamefont attribute or \glsnamefont to format the text, and uses -the post-name hook) but it uses the given ⟨field⟩ instead of name. The ⟨field⟩ -argument must be the internal field name (for example desc rather than -description). See the key to field mappings table in the glossaries user -manual. -

There is a hook after \glossentryname and \Glossentryname: -


\glsxtrpostnamehook{label}

-

-By default this checks the indexname attribute. If the attribute exists for the -category to which the label belongs, then the name is automatically indexed -using -


\glsxtrdoautoindexname{label}{indexname}

-

-See §9 Auto-Indexing for further details. -

As from version 1.04, the post-name hook \glsxtrpostnamehook will also use -\glsxtrpostnamecategory⟩ if it exists. You can use \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 “symbol” -category: - - - -

-
-\newcommand*{\glsxtrpostnamesymbol}{\space
- (\glsentrysymbol{\glscurrententrylabel})}
-
-

For convenience, as from v1.31, you can use -


\glsdefpostname{category}{definition}

-

-This is simply a shortcut for:

-
-\csdef{glsxtrpostnamecategory}{definition} -
-
Note that it doesn’t check if the command has already been defined. -

As from version 1.25, the post-name hook also does -


\glsextrapostnamehook{label}

-

-(before \glsxtrpostnamecategory⟩) to allow for additional non-category related code. -This does nothing by default. -

The post-description code used within the glossary is modified so that it also -does -


\glsxtrpostdescription

-

-This occurs before the original \glspostdescription, so if the nopostdot=false -option is used, it will be inserted before the terminating full stop. -

This new command will do \glsxtrpostdesccategory⟩ if it exists, where -⟨category⟩ is the category label associated with the current entry. For example -\glsxtrpostdescgeneral for entries with the category set to general or -\glsxtrpostdescacronym for entries with the category set to acronym. For -convenience, as from v1.31, you can use -


\glsdefpostdesc{category}{definition}

-

-This is simply a shortcut for:

-
-\csdef{glsxtrpostdesccategory}{definition} -
-
Note that it doesn’t check if the command has already been defined. -

Since both \glossentry and \subglossentry set -


\glscurrententrylabel

- - - -

-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 general category, then you could -do: - - - -

-
-\renewcommand{\glsxtrpostdescgeneral}{\space
- (plural: \glsentryplural{\glscurrententrylabel})}
-
-

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.) -

This feature can’t be used for glossary styles that ignore \glspostdescription or if -you redefine \glspostdescription without including \glsxtrpostdescription. -(For example, if you redefine \glspostdescription to do nothing instead of using -the nopostdot option to suppress the terminating full stop.) See §2.11.3 The -glossaries-extra-stylemods Package to patch the predefined styles provided by -glossaries that are missing \glspostdescription.
-

-

-

-

Top

2.11.2 Number List

-

The number list is now placed inside the argument of -


\GlsXtrFormatLocationList{number list}

-

-This is internally used by \glossaryentrynumbers. The nonumberlist option -redefines \glossaryentrynumbers so that it doesn’t display the number list, but it -still saves the number list in case it’s required. -

If you want to suppress the number list always use the nonumberlist option -instead of redefining \glossaryentrynumbers to do nothing.
-

-

For example, to change the font for the entire number list redefine -\GlsXtrFormatLocationList as appropriate. Don’t modify \glossaryentrynumbers. -

Sometimes users like to insert “page” or “pages” in front of the number list. This -is quite fiddly to do with the base glossaries package, but glossaries-extra provides a -way of doing this. First you need to enable this option and specify the text to display -using: -


\GlsXtrEnablePreLocationTag{page}{pages}

-

-where ⟨page⟩ is the text to display if the number list only contains a single location and -⟨pages⟩ is the text to display otherwise. For example: - - - -

-
-\GlsXtrEnablePreLocationTag{Page: }{Pages: }
-
-

An extra run is required when using this command. -

Use glsignore not @gobble as the format if you want to suppress the page -number (and only index the entry once).
-

-

See the accompanying sample file sample-pages.tex. -

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

Location lists displayed with \printnoidxglossary internally use -


\glsnoidxdisplayloc{prefix}{counter}{format}{location}

-

-This command is provided by glossaries, but is modified by glossaries-extra to check -for the start and end range formation identifiers ( and ) 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 -


\glsxtrdisplaysingleloc{format}{location}

-

-otherwise it uses -


\glsxtrdisplaystartloc{format}{location}

-

-for the start of a range (where the identifier has been stripped from ⟨format⟩) -or -


\glsxtrdisplayendloc{format}{location}

-

-for the end of a range (where the identifier has been stripped from ⟨format⟩). -

By default the start range command saves the format in -


\glsxtrlocrangefmt

-

-and does -
\glsxtrdisplaysingleloc{format}{location} -
-(If the format is empty, it will be replaced with glsnumberformat.) -

The end command checks that the format matches the start of the range, -does -


\glsxtrdisplayendlochook{format}{location}

-

-(which does nothing by default), followed by -
\glsxtrdisplaysingleloc{format}{location} - - - -
-and then sets \glsxtrlocrangefmt to empty. -

This means that the list - - - -

-
-\glsnoidxdisplayloc{}{page}{(textbf}{1},
-\glsnoidxdisplayloc{}{page}{textbf}{1},
-\glsnoidxdisplayloc{}{page}{)textbf}{1}.
-
-

doesn’t display any differently from - - - -

-
-\glsnoidxdisplayloc{}{page}{textbf}{1},
-\glsnoidxdisplayloc{}{page}{textbf}{1},
-\glsnoidxdisplayloc{}{page}{textbf}{1}.
-
-

but it does make it easier to define your own custom list handler that can -accommodate the ranges. -

-

-

Top

2.11.3 The glossaries-extra-stylemods Package

-

As from v1.02, glossaries-extra now includes the package 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 glossaries-extra. For example: - - - -

-
-\usepackage{glossaries-extra}
-\usepackage{glossary-longragged}
-\usepackage{glossaries-extra-stylemods}
-
-

Alternatively you can load glossary-name.sty at the same time by passing ⟨name⟩ -as a package option to glossaries-extra-stylemods. For example: - - - -

-
-\usepackage{glossaries-extra}
-\usepackage[longragged]{glossaries-extra-stylemods}
-
-

Another option is to use the stylemods key when you load glossaries-extra. You can -omit a value if you only want to use the predefined styles that are automatically -loaded by glossaries (for example, the long3col style): - - - -

-
-\usepackage[style=long3col,stylemods]{glossaries-extra}
-
-

Or the value of stylemods may be a comma-separated list of the style package -identifiers. For example: - - - -

-
-\usepackage[style=mcoltree,stylemods=mcols]{glossaries-extra}
-
-

Remember to group the value if it contains any commas: - - - -

-
-\usepackage[stylemods={mcols,longbooktabs}]{glossaries-extra}
-
-

-

-

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

-

Tabular Styles - The tabular-like styles, such as long are adjusted so that the \ifglsnogroupskip -conditional (set with nogroupskip) is moved outside of the definition of -\glsgroupskip to avoid problems that cause an “Incomplete \iftrue” error with -\printunsrtglossary and \printnoidxglossary. This means that if you want to -change this conditional using \setupglossaries or using the nogroupskip option in -\printglossary, \printnoidxglossary or \printunsrtglossary, you must also -reset the glossary style. -

As from version 1.21, the hard-coded \space before the number list in many of -the predefined styles is replaced with -


\glsxtrprelocation

-

-This just defaults to \space but may be redefined as required. For example: - - - -

-
-\renewcommand{\glsxtrprelocation}{\dotfill}
-
-

-

-

List Styles - The list styles use -


\glslistprelocation

-

-(which defaults to \glsxtrprelocation) for top-level items and -


\glslistchildprelocation

-

-(which defaults to \glslistprelocation) for child items. -

As from v1.31, the description (including the post-description hook) is governed -by: -


\glslistdesc{label}

-

-for the list and altlist styles (but not the listdotted variations). -

As from v1.47, the item is governed by: -


\glslistitem{label}

-

-The altlist styles use: -


\glsaltlistitem{label}

-

-which internally uses \glslistitem. The header item (for the list styles that should -the group title) is governed by: -


\glslistgroupheaderitem{group-label}{header code}

-

-This ignores the ⟨group-label⟩ by default and simply places the second argument in the -optional argument of \item. The ⟨header code⟩ is the formatted group title, -possibly including a hypertarget. The spacing after the group item is given -by: -


\glslistgroupafterheader

-

-

For just the list style and its letter group variations (not the altlist or listdotted -variations) the number list for child entries is followed by -


\glslistchildpostlocation

-

-which defaults to a full stop. - - - -

The default value of \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 \hsize isn’t set until the start of the -document. -

The separator between groups (if not nogroupskip) is now given by: -


\glslistgroupskip

-

-This defaults to \indexspace with penalties to deter page breaks. This command -isn’t used if nogroupskip is set. -

The glossary-tree package introduced new commands in v4.22, \glstreegroupheaderfmt -and \glstreenavigationfmt, which are used to format the letter group -headings and the navigation elements for the appropriate styles. These two -new commands are defined in terms of \glstreenamefmt since that was -the command originally used for the group headings and navigation. This -now allows these different elements to be defined independently, but the -most common redefinition is for \glstreenamefmt to remove the bold in -the name. If the bold is still required for the group heading and navigation -elements, then both other commands also need redefining. To simplify matters, if -\glstreenamefmt has been defined, as from v1.31 glossaries-extra-stylemods -defines: -


\glstreedefaultnamefmt{text}

-

-which simply does \textbf{text} and redefines \glstreenamefmt, -\glstreegroupheaderfmt and \glstreenavigationfmt all in terms of -\glstreedefaultnamefmt. -

This means that if you want to change all three to use a particular style you only -need to redefine \glstreedefaultnamefmt, but if you only want to redefine -\glstreenamefmt without affecting the other two commands, then you now -can. -

The separator between groups without headers is given by: -


\glstreegroupskip

-

-This defaults to just \indexspace without penalties. This command isn’t -used if nogroupskip is set. (The penalties introduced in v1.41 were moved to -\glstreeheadergroupskip in v1.42 as they are inappropriate when there’s no -header.) -

The separator between groups with headers is now given by (as from -v1.42): -


\glstreegroupheaderskip

-

-This defaults to \glstreegroupskip with penalties to deter page breaks after the -group heading. -

The styles that display the group titles now use: -


\glstreePreHeader{label}{title}

-

-where ⟨label⟩ is the group label and ⟨title⟩ is the group title. This does nothing by - - - -default and is inserted before the group title. You can redefine it to add the group -title to the PDF bookmarks. For example, if the glossary title uses \chapter -then: - - - -

-
-\renewcommand{\glstreePreHeader}[2]{%
- \pdfbookmark[1]{#2}{\currentglossary.#1}%
+
Note that this doesn’t check if the plural form was used. If you require this, you will need to redefined this command to include \glsifplural:
\renewcommand*{\glsxtrpostusershortformat}[2]{%
+  \glsifplural
+  {%
+    \glsxtrifallcaps
+    {\GLSxtrusershortplformat{#1}{#2}}%
+    {\glsxtrusershortplformat{#1}{#2}}%
+  }%
+  {%
+    \glsxtrifallcaps
+    {\GLSxtrusershortformat{#1}{#2}}%
+    {\glsxtrusershortformat{#1}{#2}}%
+  }%
 }
-
-

will insert section-level bookmarks. The use of \currentglossary helps to provide -unique bookmark labels in the event of multiple glossaries. -

The glossary-tree package provides the commands -


\glstreepredesc

-

-and -


\glstreechildpredesc

-

-(which both default to a space) and uses them in the tree-like styles, but not for the -alttree style. The glossaries-extra-stylemods package modifies the alttree style so that it -has equivalent hooks: -


\glsalttreepredesc

-

-and -


\glsalttreechildpredesc

-

-These do nothing by default. -

The index-like and tree-like styles insert the pre-number list space with -


\glstreeprelocation

-

-(which defaults to \glsxtrprelocation) for top-level items and -


\glstreechildprelocation

-

-(which defaults to \glstreeprelocation) for child items. -

As from version 1.31, the glossaries-extra-stylemods package also provides: -


\glstreenonamedesc{label}

-

-which is used by the treenoname styles to display the pre-description separator, the -description and the post-description hook. Similarly for the symbol: -


\glstreenonamesymbol{label}

-

-The above are just used for top-level entries. Child entries don’t have the name or -symbol displayed for the treenoname styles, so there’s only a command for the child -description: -


\glstreenonamechilddesc{label}

-

- - - -

For the tree styles (but not the treenoname or alttree styles), the description is -displayed using: -


\glstreedesc{label}

-

-and the symbol with: -


\glstreesymbol{label}

-

-Again the above two commands are just for top-level entries. The child entries -use: -


\glstreechilddesc{label}

-

-for the description and -


\glstreechildsymbol{label}

-

-for the symbol. As from version 1.41, there are now wrapper commands -for \glstreedesc and \glstreechilddesc that check for the description -and symbol to determine what separator to use before the page list. These -are: -


\glstreeDescLoc{label}{location}

-

-for top-level entries and -


\glstreeChildDescLoc{label}{location}

-

-for sub-entries. -

If either the symbol or description is present these will use \glstreeprelocation -or \glstreechildprelocation, respectively. Otherwise, both will use (from -v1.42): -


\glstreeNoDescSymbolPreLocation

-

-The default is a space. This means that you could have, say, a comma followed by a -space for terms that are simply an alias, but just have a space for terms that have a -description that ends with a full stop (or that just have a symbol without a -description) where the comma would be inappropriate. -

Note that version 1.42 has corrected an error that was introduced to v1.41 that -caused the name to run into the location list if there was no symbol and no -description. -

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


\gglssetwidest[level]{name}

-

-(New to version 1.21.) This is like \glssetwidest (provided by glossary-tree) but -performs a global assignment. -


\eglssetwidest[level]{name}

- - - -

-This is like \glssetwidest but performs a protected expansion on ⟨name⟩. This has a -localised effect. For a global setting, use -


\xglssetwidest[level]{name}

-

-The following only set the value if ⟨name⟩ is wider than the current value (new to -version 1.23). Local update: -


\glsupdatewidest[level]{name}

-

-Global update: -


\gglsupdatewidest[level]{name}

-

-Locale update (expands ⟨name⟩): -


\eglsupdatewidest[level]{name}

-

-Global update (expands ⟨name⟩): -


\xglsupdatewidest[level]{name}

-

-

The widest entry value can later be retrieved using -


\glsgetwidestname

-

-for the top-level entries and -


\glsgetwidestsubname{level}

-

-for sub-entries, where ⟨level⟩ is the level number. -

Note that if you are using bib2gls, you can use the resource option set-widest -which will try to determine the widest name of all the selected entries. This isn’t -guaranteed to work as it may depend on fonts or commands that bib2gls -can’t replicate, but it should be suitable for names that just consist of text, -and can be more efficient than iterating over all the defined entries using -TeX. -

The command \glsfindwidesttoplevelname provided by glossary-tree has a -CamelCase synonym: -


\glsFindWidestTopLevelName[glossary list]

-

-Similar commands are also provided: -


\glsFindWidestUsedTopLevelName[glossary list]

-

-This has an additional check that the entry has been used. Naturally this is only -useful if the glossaries that use the 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.) -


\glsFindWidestUsedAnyName[glossary list]

- - - -

-This is like the previous command but if doesn’t check the parent key. This is useful if -all levels should have the same width for the name. -


\glsFindWidestAnyName[glossary list]

-

-This is like the previous command but doesn’t check if the entry has been -used. -


\glsFindWidestUsedLevelTwo[glossary list]

-

-This is like \glsFindWidestUsedTopLevelName but also sets the first two sub-levels -as well. Any entry that has a great-grandparent is ignored. -


\glsFindWidestLevelTwo[glossary list]

-

-This is like the previous command but doesn’t check if the entry has been -used. -


\glsFindWidestUsedAnyNameSymbol[glossary list]{register} -

-

-This is like \glsFindWidestUsedAnyName but also measures the symbol. The length -of the widest symbol is stored in ⟨register⟩. -


\glsFindWidestAnyNameSymbol[glossary list]{register}

-

-This is like the previous command but it doesn’t check if the entry has been -used. -


\glsFindWidestUsedAnyNameSymbolLocation[glossary list]{symbol -register}{location register}

-

-This is like \glsFindWidestUsedAnyNameSymbol but also measures the number list. -This requires \glsentrynumberlist (see the glossaries user manual). The length of -the widest symbol is stored in ⟨symbol register⟩ and the length of the widest number -list is stored in ⟨location register⟩. -


\glsFindWidestAnyNameSymbolLocation[glossary list]{symbol -register}{location register}

-

-This is like the previous command but it doesn’t check if the entry has been -used. -


\glsFindWidestUsedAnyNameLocation[glossary list]{register} -

-

-This is like \glsFindWidestUsedAnyNameSymbolLocation but doesn’t measure the -symbol. The length of the widest number list is stored in ⟨register⟩. -


\glsFindWidestAnyNameLocation[glossary list]{register}

-

-This is like the previous command but doesn’t check if the entry has been -used. -

The layout of the symbol, description and number list is governed by - - - -


\glsxtralttreeSymbolDescLocation{label}{number list}

-

-for top-level entries and -


\glsxtralttreeSubSymbolDescLocation{label}{number list}

-

-for sub-entries. -

There is now a user level command that performs the initialisation for the alttree -style: -


\glsxtralttreeInit

-

-

The paragraph indent for subsequent paragraphs in multi-paragraph descriptions -is provided by the length -


\glsxtrAltTreeIndent

-

-

For additional commands that are available with the alttree style, -see the documented code (glossaries-extra-code.pdf). See also the -accompanying sample files sample-alttree.tex, sample-alttree-sym.tex and -sample-alttree-marginpar.tex. - - - -

-

-

Top

3. New Glossary Styles

-

The glossaries-extra package comes with some new styles. The associated style -package needs to be loaded. This can be done with \usepackage but it’s simpler to -use the stylemods option. -

-

Top

3.1 glossary-bookindex package

-

As from v1.21, glossaries-extra has a new supplementary package glossary-bookindex -which provides the glossary style bookindex. This is very similar to the mcolindexgroup -style but is designed for indexes, so by default only the name and location list -are displayed. You can either load this package explicitly and then set the -style: - - - -

-
-\usepackage{glossaries-extra}
-\usepackage{glossary-bookindex}
-\setglossarystyle{bookindex}
-
-

or use both the stylemods and style options: - - - -

-
-\usepackage[stylemods=bookindex,style=bookindex]{glossaries-extra}
-
-

The bookindex style only supports a maximum hierarchical level of 2 (top-level, -level 1 and level 2). It’s primarily designed for use with bib2gls. It may be used -with other indexing options, but some features may not be present and UTF-8 -characters may cause a problem with non-Unicode engines in letter group -headings or PDF bookmarks. (bib2gls uses numeric identifies by default to -avoid these problems. If numbers show up in the group headings instead of -the appropriate characters, check that you have used the record package -option.) -

The number of columns is given by -


\glsxtrbookindexcols

-

-which defaults to 2. -

This style uses the multicols environment. If the command -


\glsxtrbookindexcolspread

-

-isn’t empty then it’s supplied as the optional argument following \begin{multicols} -{n}. You can switch from multicols to multicols* by redefining -


\glsxtrbookindexmulticolsenv

-

-For example - - - -

-
-\renewcommand{\glsxtrbookindexmulticolsenv}{multicols*}
-
-

-

Each top-level entry is displayed using -


\glsxtrbookindexname{label}

-

-where the entry is identified by ⟨label⟩. This just does \glossentryname{label} by -default. For example, if you want the symbol to be included: - - - -

-
-\renewcommand*{\glsxtrbookindexname}[1]{%
- \glossentryname{#1}%
- \ifglshassymbol{#1}{\space (\glossentrysymbol{#1})}{}%
+

+

+\glsxtruserlongformat{entry-label}{fmt-cs}
+ Used to format the singular long form in parentheses (with \glsxtruserparen) on the first use of \gls or \Gls or with \glsxtrfull for styles like short-long-user. The default definition is:
\newcommand*{\glsxtruserlongformat}[2]{%
+  \glsxtruserparen{\glsxtrlongformat{#1}{}{#2}}{#1}%
 }
-
-

or if you want the description (if set): - - - -

-
-\renewcommand*{\glsxtrbookindexname}[1]{%
- \glossentryname{#1}%
- \ifglshasdesc{#1}{\space \glossentrydesc{#1}\glspostdescription}{}%
+

+

+\GLSxtruserlongformat{entry-label}{fmt-cs}
+ As \glsxtruserlongformat but all caps. This uses \GLSxtruserparen instead of \glsxtruserparen.

+

+\glsxtruserlongplformat{entry-label}{fmt-cs}
+ As \glsxtruserlongformat but for the first use of \glspl or with \glsxtrfull for styles like short-long-user. This has a similar definition to \glsxtruserlongformat but with \glsxtrlongplformat.

+

+\GLSxtruserlongplformat{entry-label}{fmt-cs}
+ As \glsxtruserlongplformat but all caps. This uses \GLSxtruserparen instead of \glsxtruserparen.

+

+\glsxtrpostuserlongformat{entry-label}{fmt-cs}
+ Used in the post-link hook to format the long form in parentheses for styles like short-postlong-user. The default definition is:
\newcommand*{\glsxtrpostuserlongformat}[2]{%
+  \glsxtrifallcaps
+  {\GLSxtruserlongformat{#1}{#2}}%
+  {\glsxtruserlongformat{#1}{#2}}%
 }
-
-

(which picks up the post-description hook). -

Alternatively you can use the \glsxtrpostnamecategory⟩ hook to append -information after the name according to the entry’s category. -

Sub-entries are displayed using -


\glsxtrbookindexsubname{label}

-

-which just defaults to \glsxtrbookindexname{label}. -

The separator used before the location list for top-level entries is given -by -


\glsxtrbookindexprelocation{label}

-

-where ⟨label⟩ is the entry’s label. This checks if the location field has been set. If it -has, it does - - - -

-
-,\glsxtrprelocation
-
-

otherwise it just does \glsxtrprelocation (which defaults to \space). If you’re not -using bib2gls, the location field won’t be set. -

The separator used before the location list for sub-entries is given by -


\glsxtrbookindexsubprelocation{label}

-

-which defaults to \glsxtrbookindexprelocation{label}. -

The actual location list is encapsulated with: -


\glsxtrbookindexlocation{label}{location list}

-

-for top-level entries and -


\glsxtrbookindexsublocation{label}{location list}

-

-for sub-entries. These both just do ⟨location list⟩ by default. -

The separator used between a top-level parent and child entry is given -by -


\glsxtrbookindexparentchildsep

-

-This defaults to \nopagebreak. -

The separator used between a sub-level parent and child entry is given -by -


\glsxtrbookindexparentsubchildsep

-

-This defaults to \glsxtrbookindexparentchildsep. -

The separator between top-level entries is given by -


\glsxtrbookindexbetween{label1}{label2}

-

-This comes after the entry given by ⟨label1⟩, if the entry has no children, or after the -last descendent otherwise, so it always comes immediately before the entry given by -⟨label2⟩ unless the entry occurs at the start of a group. This does nothing by -default. -

The separator between two level 1 entries is given by -


\glsxtrbookindexsubbetween{label1}{label2}

-

-

The separator between two level 2 entries is given by -


\glsxtrbookindexsubsubbetween{label1}{label2}

-

-At the end of each letter group, the following hooks are done in order: -


\glsxtrbookindexsubsubatendgroup{sub-sub-label}

- - - -

-


\glsxtrbookindexsubatendgroup{sub-label}

-

-


\glsxtrbookindexatendgroup{label}

-

-where ⟨sub-sub-label⟩ is the label of the last level 2 entry, ⟨sub-label⟩ is the label of the -last level 1 entry and ⟨label⟩ is the label of the last level 0 entry. -

For example, the resource option seealso=omit instructs bib2gls to omit the -seealso cross-reference from the location list. (The see cross-reference will still be -added unless you also have see=omit.) The seealso cross-reference can instead be -appended after the child entries using: - - - -

-
-\renewcommand{\glsxtrbookindexatendgroup}[1]{%
-  \glsxtrifhasfield{seealso}{#1}{\glstreesubitem\glsxtruseseealso{#1}}{}%
+
Note that, as with \glsxtrpostusershortformat, this doesn’t check if the plural form was used. If you require this, you will need to redefined this command to include \glsifplural.

+ + + +

+
4.5.1.3.4. Footnote Styles
+

+These commands are only used by the footnote styles.

+

+\glsxtrfootnotename
+ This command should expand to the value of the name key. The default definition is:
\glsxpabbrvfont{\the\glsshorttok}{\glscategorylabel}
+

+

+\glsxtrfootnotedescname
+ This command should expand to the value of the name key for styles like footnote-desc. The default definition is:
\glsxpabbrvfont{\the\glsshorttok}{\glscategorylabel}%
+\protect\glsxtrfullsep{\the\glslabeltok}%
+\protect\glsxtrparen
+ {\glsxplongfont{\the\glslongtok}{\glscategorylabel}}%
+

+

+\glsxtrfootnotedescsort
+ This command should expand to the value of the sort key for styles like footnote-desc. The default definition is simply \the\glsshorttok.

+

+This command is irrelevant with the “unsrt” family of commands.
+

+

+\glslongfootnotefont{text}
+ The formatting command used for the long form in the footnote styles. The default is to simply use \glslongdefaultfont.

+

+\glsfirstlongfootnotefont{text}
+ The formatting command used for the first use long form in the footnote styles. The default is to simply use \glslongfootnotefont.

+

+\glsxtrabbrvfootnote{entry-label}{text}
+ The command that produces the footnote. The default definition ignores the first argument:
\newcommand*{\glsxtrabbrvfootnote}[2]{\footnote{#2}}
+

+

+\glsxtrfootnotelongformat{entry-label}{fmt-cs}
+ This command is used within the footnote to display the long form formatted with fmt-cs for the footnote styles on first use of \gls, \Gls and \GLS. The default definition is simply:
\newcommand*{\glsxtrfootnotelongformat}[2]{%
+  \glsxtrlongformat{#1}{}{#2}%
 }
-\renewcommand{\glsxtrbookindexbetween}[2]{%
-  \glsxtrbookindexatendgroup{#1}%
-}%
-\renewcommand{\glsxtrbookindexsubatendgroup}[1]{%
-  \glsxtrifhasfield{seealso}{#1}{\glstreesubsubitem\glsxtruseseealso{#1}}{}%
+
For example, if the footnote should start with an uppercase letter then simply redefine this to use \Glsxtrlongformat instead:
\renewcommand*{\glsxtrfootnotelongformat}[2]{%
+  \Glsxtrlongformat{#1}{}{#2}%
+}
+

+

+\glsxtrfootnotelongplformat{entry-label}{fmt-cs}
+ This command is used within the footnote to display the plural long form formatted with fmt-cs for the footnote styles on first use of \glspl, \Glspl and \GLSpl. The default definition is simply:
\newcommand*{\glsxtrfootnotelongplformat}[2]{%
+  \glsxtrlongplformat{#1}{}{#2}%
+}
+

+

+\glsxtrpostfootnotelongformat{entry-label}{fmt-cs}
+ This command is used for the “postfootnote” styles. This is simply defined to do \glsxtrfootnotelongformat. Note that there’s no plural equivalent as the “postfootnote” styles don’t check if the plural command (\glspl etc) was used.

+ +

+ +
+
4.5.1.3.5. No-Long Styles
+

+These commands are used by the “nolong” styles.

+

+\glsxtrshortnolongname
+ This command should expand to the value of the name key for styles like short-nolong. The default definition is:
\glsxpabbrvfont{\the\glsshorttok}{\glscategorylabel}
+

+

+\glsxtrshortdescname
+ This command should expand to the value of the name key for styles like short-nolong-desc. The default definition is:
\glsxpabbrvfont{\the\glsshorttok}{\glscategorylabel}%
+\protect\glsxtrfullsep{\the\glslabeltok}%
+\protect\glsxtrparen
+  {\glsxplongfont{\the\glslongtok}{\glscategorylabel}}%
+

+ +

+ +
+
4.5.1.3.6. No-Short Styles
+

+These commands are used by the “noshort” styles.

+

+\glsxtrlongnoshortdescname
+ This command should expand to the value of the name key for styles like long-noshort-desc. The default definition is:
\glsxplongfont{\the\glslongtok}{\glscategorylabel}
+

+

+\glsxtrlongnoshortname
+ This command should expand to the value of the name key for styles like long-noshort. The default definition is:
\glsxpabbrvfont{\the\glsshorttok}{\glscategorylabel}
+

+ +

+ +
+
4.5.1.3.7. Hyphen Styles
+

+These are commands used by the “hyphen” styles. They are designed to work with the markwords and markshortwords attributes.

+

+\glsabbrvhyphenfont{text}
+ The formatting command used for the short form in the hyphen styles. The default is to simply use \glsabbrvdefaultfont.

+

+\glsfirstabbrvhyphenfont{text}
+ The formatting command used for the short form in the hyphen styles on first use. The default is to simply use \glsabbrvhyphenfont.

+

+\glslonghyphenfont{text}
+ The formatting command used for the long form in the hyphen styles. The default is to simply use \glslongdefaultfont.

+

+\glsfirstlonghyphenfont{text}
+ The formatting command used for the long form in the hyphen styles on first use. The default is to simply use \glslonghyphenfont.

+

+\glsxtrhyphensuffixinitial: \glsxtrabbrvpluralsuffix
+ Short plural suffix used by the “hyphen” styles. This defaults to \glsxtrabbrvpluralsuffix.

+

+\glsxtrlonghyphenshortsort
+ Expands to the sort value for the styles like long-hyphen-short-hyphen. This defaults to the original short value (\glsxtrorgshort). This command is irrelevant with the “unsrt” family of commands.

+

+\glsxtrshorthyphenlongsort
+ Expands to the sort value for the styles like short-hyphen-long-hyphen. This defaults to the original short value (\glsxtrorgshort). This command is irrelevant with the “unsrt” family of commands.

+

+\glsxtrlonghyphennoshortsort
+ Expands to the sort value for the styles like long-hyphen-noshort-noreg. This defaults to the original short value (\glsxtrorgshort). This command is irrelevant with the “unsrt” family of commands.

+

+\glsxtrlonghyphennoshortdescsort
+ Expands to the sort value for the styles like long-hyphen-noshort-desc-noreg. This defaults to the original long value (\glsxtrorglong). This command is irrelevant with the “unsrt” family of commands.

+

+\glsxtrlonghyphenshort{entry-label}{long}{short}{insert}
+ Formats the long and short form for the full or first use long-hyphen-short-hyphen style. This uses \glsxtrifhyphenstart to test if the insert starts with a hyphen. If it does, \glsxtrwordsep is locally set to \glsxtrwordsephyphen to replace the inter-word spaces with hyphens. The short form is placed in parentheses with \glsxtrparen, preceded by the \glsxtrfullsep separator. The insert is placed after both the long and the short form.

+

+\GLSxtrlonghyphenshort{entry-label}{long}{short}{insert}
+ As above, but the insert is converted to all caps. The short and long arguments should be supplied as all caps. Note that it’s not possible to simply do \glsxtrlonghyphenshort with \MakeUppercase{insert} as the argument as this will interfere with the check to determine if insert starts with a hyphen.

+

+\glsxtrlonghyphennoshort{entry-label}{long}{insert}
+ Formats the long form for the full or first use long-hyphen-noshort-desc-noreg style. This uses \glsxtrifhyphenstart to test if the insert starts with a hyphen. If it does, \glsxtrwordsep is locally set to \glsxtrwordsephyphen to replace the inter-word spaces with hyphens. The insert is placed after the long form.

+

+\GLSxtrlonghyphennoshort{entry-label}{long}{insert}
+ As above but converts insert to all caps. The long argument should already be in all caps. Note that it’s not possible to simply do \glsxtrlonghyphennoshort with \MakeUppercase{insert} as the argument as this will interfere with the check to determine if insert starts with a hyphen.

+

+\glsxtrlonghyphen{entry-label}{long}{insert}
+ Formats the long form for the full or first use long-hyphen-postshort-hyphen style. This is similar to the above, but the insert argument is only used to check if it starts with a hyphen. The actual insert is placed in the post-link hook.

+

+\xpglsxtrposthyphenshort
+ This command is used in the post-link hook for the long-hyphen-postshort-hyphen style on first use. It expands the placeholder commands (\glslabel and \glsinsert) and uses \GLSxtrposthyphenshort for all caps or \glsxtrposthyphenshort otherwise. Note that this doesn’t show the plural by default. If you require the plural form, you need to redefine this to add a check with \glsifplural:
\newcommand*{\xpglsxtrposthyphenshort}{%
+  \glsifplural
+  {%
+    \glsxtrifallcaps
+    {%
+      \expandafter\GLSxtrposthyphenshortpl\expandafter\glslabel
+         \expandafter{\glsinsert}%
+    }%
+    {%
+      \expandafter\glsxtrposthyphenshortpl\expandafter\glslabel
+         \expandafter{\glsinsert}%
+    }%
+  }%
+  {%
+    \glsxtrifallcaps
+    {%
+      \expandafter\GLSxtrposthyphenshort\expandafter\glslabel
+         \expandafter{\glsinsert}%
+    }%
+    {%
+      \expandafter\glsxtrposthyphenshort\expandafter\glslabel
+         \expandafter{\glsinsert}%
+    }%
+  }%
 }
-\renewcommand{\glsxtrbookindexsubbetween}[2]{%
-  \glsxtrbookindexsubatendgroup{#1}%
+

+

+\glsxtrposthyphenshort{entry-label}{insert}
+ If insert starts with a hyphen, \glsxtrwordsep is locally set to \glsxtrwordsephyphen to replace the inter-word spaces with hyphens. The insert encapsulated with \glsfirstlonghyphenfont is then done (to complete the long form, which has already been displayed with \glsxtrlonghyphen in the link text). Then the short form followed by the insert is placed in parentheses (with \glsxtrparen preceded by \glsxtrfullsep).

+

+\GLSxtrposthyphenshort{entry-label}{insert}
+ As above but all caps.

+

+\glsxtrposthyphenshortpl{entry-label}{insert}
+ As \glsxtrposthyphenshort but plural.

+

+\GLSxtrposthyphenshortpl{entry-label}{insert}
+ As above but all caps.

+

+\xpglsxtrposthyphensubsequent
+ This command is used in the post-link hook for the long-hyphen-postshort-hyphen style on subsequent use. It expands the placeholder commands (\glslabel and \glsinsert) and uses \GLSxtrposthyphensubsequent for all caps or \glsxtrposthyphensubsequent otherwise.

+

+\glsxtrposthyphensubsequent{entry-label}{insert}
+ This command is used in the post-link hook for the long-hyphen-postshort-hyphen style on subsequent use. Only the insert is done.

+

+\GLSxtrposthyphensubsequent{entry-label}{insert}
+ As above but all caps.

+

+\glsxtrshorthyphenlong{entry-label}{short}{long}{insert}
+ Formats the short and long form for the full or first use short-hyphen-long-hyphen style. Similar to \glsxtrlonghyphenshort but the short and long forms are swapped.

+

+\GLSxtrshorthyphenlong{entry-label}{short}{long}{insert}
+ As above, but the insert is converted to all caps. The short and long arguments should be supplied as all caps. Note that it’s not possible to simply do \glsxtrshorthyphenlong with \MakeUppercase{insert} as the argument as this will interfere with the check to determine if insert starts with a hyphen.

+

+\glsxtrshorthyphen{short}{entry-label}{insert}
+ Formats the short form for the full or first use short-hyphen-postlong-hyphen style. The insert argument is only used to check if it starts with a hyphen. The actual insert is placed in the post-link hook.

+

+\xpglsxtrposthyphenlong
+ This command is used in the post-link hook for the short-hyphen-postlong-hyphen style on first use. It expands the placeholder commands (\glslabel and \glsinsert) and uses \GLSxtrposthyphenlong for all caps or \glsxtrposthyphenlong otherwise. Note that this doesn’t show the plural by default. If you require the plural form, you need to redefine this to add a check with \glsifplural:
\newcommand*{\xpglsxtrposthyphenlong}{%
+  \glsifplural
+  {%
+    \glsxtrifallcaps
+    {%
+      \expandafter\GLSxtrposthyphenlongpl\expandafter\glslabel
+         \expandafter{\glsinsert}%
+    }%
+    {%
+      \expandafter\glsxtrposthyphenlongpl\expandafter\glslabel
+         \expandafter{\glsinsert}%
+    }%
+  }%
+  {%
+    \glsxtrifallcaps
+    {%
+      \expandafter\GLSxtrposthyphenlong\expandafter\glslabel
+         \expandafter{\glsinsert}%
+    }%
+    {%
+      \expandafter\glsxtrposthyphenlong\expandafter\glslabel
+         \expandafter{\glsinsert}%
+    }%
+  }%
 }
-\renewcommand{\glsxtrbookindexsubsubatendgroup}[1]{%
-  \glsxtrifhasfield{seealso}{#1}%
-  {\glstreeitem\hspace*{40pt}\glsxtruseseealso{#1}}{}%
+

+

+\glsxtrposthyphenlong{entry-label}{insert}
+ This command is used in the post-link hook for the short-hyphen-postlong-hyphen style on first use. Similar to \glsxtrposthyphenshort but shows the long form instead of the short form.

+

+\GLSxtrposthyphenlong{entry-label}{insert}
+ As above but all caps.

+

+\glsxtrposthyphenlongpl{entry-label}{insert}
+ As \glsxtrposthyphenlong but plural.

+

+\GLSxtrposthyphenlongpl{entry-label}{insert}
+ As above but all caps.

+ +

+ +
+
4.5.1.3.8. Only Styles
+

+These are commands used by the “only” styles, such as long-only-short-only.

+

+\glsabbrvonlyfont{text}
+ The formatting command used for the short form in the only styles. The default is to simply use \glsabbrvdefaultfont.

+

+\glsfirstabbrvonlyfont{text}
+ The formatting command used for the short form in the only styles on first use. The default is to simply use \glsabbrvonlyfont.

+

+\glslongonlyfont{text}
+ The formatting command used for the long form in the only styles. The default is to simply use \glslongdefaultfont.

+

+\glsfirstlongonlyfont{text}
+ The formatting command used for the long form in the only styles on first use. The default is to simply use \glslongonlyfont.

+

+\glsxtronlysuffixinitial: \glsxtrabbrvpluralsuffix
+ Short plural suffix used by the “only” styles. This defaults to \glsxtrabbrvpluralsuffix.

+

+\glsabbrvsconlyfont{text}
+ The formatting command used for the short form in the “sc-only” styles. The default is to simply use \glsabbrvscfont.

+

+\glsfirstabbrvsconlyfont{text}
+ The formatting command used for the short form in the “sc-only” styles on first use. The default is to simply use \glsabbrvsconlyfont.

+

+\glsxtrsconlyrevert{text}
+ Counteracts the effect of \glsabbrvsconlyfont. The default is \glsxtrscrevert. If you redefine \glsabbrvsconlyfont, you will need to redefine \glsxtrsconlyrevert as applicable.

+

+\glsxtrsconlysuffixinitial: \glsxtrscsuffix
+ Short plural suffix used by the “sc-only” styles. This defaults to \glsxtrscsuffix.

+

+\glsxtronlyname
+ Expands to the value for the name key for the “only” styles. The default definition is:
\protect\glsabbrvonlyfont{\the\glsshorttok}
+

+

+\glsxtronlydescname
+ Expands to the value for the name key for the “only” styles where the description should be described, such as long-only-short-only-desc. The default definition is:
\protect\glslongfont{\the\glslongtok}
+

+

+\glsxtronlydescsort
+ Expands to the value for the sort key for the “only” styles where the description should be described, such as long-only-short-only-desc. The default definition is \the\glslongtok.

+

+This command is irrelevant with the “unsrt” family of commands.
+

+

+\glsxtrsconlyname
+ Expands to the value for the name key for the “sc-only” styles. The default definition is:
\protect\glsabbrvsconlyfont{\the\glsshorttok}
+

+

+\glsxtrsconlydescname
+ Expands to the value for the name key for the “sc-only” styles where the description should be described. The default definition is to simply use \glsxtronlydescname.

+

+\glsxtrsconlydescsort
+ Expands to the value for the sort key for the “sc-only” styles where the description should be described, such as long-only-short-only-desc. The default definition is to simply use \glsxtronlydescsort.

+

+This command is irrelevant with the “unsrt” family of commands.
+

+ +

+ +
+
4.5.1.3.9. Fonts
+

+These are commands used by styles that use a particular font shape or size, identified by one of the following two-letter tags: “sc” (\textsc), “sm” (\textsmaller) or “em” (\emph).

+

+For the “sc-user” styles, see §4.5.1.3.3. For the “sc-only” styles, see §4.5.1.3.8.
+

+

+\glsabbrvscfont{text}
+ Formatting for the “sc” short form. This uses \textsc to apply a small caps style, so your document font needs to support it.

+

+\textsc uses small capital glyphs for lowercase characters. Uppercase characters show as normal capitals. This means that you need to use lowercase characters in the abbreviation.
+

+

+\glsfirstabbrvscfont{text}
+ Formatting for the “sc” short form shown on first use. This defaults to \glsabbrvscfont.

+

+\glsxtrscrevert{text}
+ Counteracts the effect of \glsabbrvscfont. This defaults to \glstextup. If you redefine \glsabbrvscfont, you will need to redefine \glsxtrscrevert as applicable.

+

+\glsxtrscsuffix
+ Short plural suffix used by the “sc” styles. This needs to counteract the smallcaps, so it’s defined as:
\protect\glstextup\glsxtrabbrvpluralsuffix
+

+

+\glsabbrvsmfont{text}
+ Formatting for the “sm” short form. This uses \textsmaller, which is defined by the relsize package. You will need to load that package if you want to use any of the “sm” styles.

+

+\textsmaller reduces the font size, so if you want to use it to simulate small caps, you need to use uppercase characters in the abbreviation.
+

+

+\glsfirstabbrvsmfont{text}
+ Formatting for the “sm” short form shown on first use. This defaults to \glsabbrvsmfont.

+

+\glsxtrsmrevert{text}
+ Counteracts the effect of \glsabbrvsmfont. This defaults to \textlarger. If you redefine \glsabbrvsmfont, you will need to redefine \glsxtrsmrevert as applicable.

+

+\glsxtrsmsuffixinitial: \glsxtrabbrvpluralsuffix
+ Short plural suffix used by the “sm” styles. This defaults to \glsxtrabbrvpluralsuffix.

+

+\glsabbrvemfont{text}
+ Formatting for the “em” short form. This uses \emph.

+

+\glsfirstabbrvemfont{text}
+ Formatting for the “em” short form shown on first use. This defaults to \glsabbrvemfont.

+

+\glsxtremrevert{text}
+ Counteracts the effect of \glsabbrvemfont. This defaults to \textup. If you redefine \glsabbrvemfont, you will need to redefine \glsxtremrevert as applicable.

+

+\glsxtremsuffixinitial: \glsxtrabbrvpluralsuffix
+ Short plural suffix used by the “em” styles. This defaults to \glsxtrabbrvpluralsuffix.

+

+\glslongemfont{text}
+ Formatting for the “em” long form. This uses \emph.

+

+\glsfirstlongemfont{text}
+ Formatting for the “em” short form shown on first use. This defaults to \glslongemfont.

+ +

+ +
+

4.5.2. Advanced Style Commands

+

+These commands should typically not be needed in a document, but are provided for advanced users. See §4.5.1.3 for commands to adjust the predefined abbreviation styles.

+

+\glssetabbrvfmt{category}
+ Sets the current formatting commands (§4.5.3.2) associated with the abbreviation style associated with the given category. That is, the command redefinitions provided in the third argument (display definitions) of \newabbreviationstyle are applied.

+If no abbreviation style has been set for the given category, the style associated with the abbreviation category is used.

+This command is used: +

+

+

+\glsuseabbrvfont{style-name}{text}
+ A robust command that applies the abbreviation font for the given category to the supplied text.

+

+\glsuselongfont{style-name}{text}
+ A robust command that applies the long font for the given category to the supplied text.

+

+\GlsXtrUseAbbrStyleSetup{style-name}
+ This implements the given abbreviation style’s setup code. Note that this expects the placeholder macros and token registers to be set. This may be used in the setup of \newabbreviationstyle to inherit the setup code of a related style.

+

+\GlsXtrUseAbbrStyleFmts{style-name}
+ This implements the given abbreviation style’s display definitions code. This may be used in the display definitions of \newabbreviationstyle to inherit the formatting of a related style.

+

+\xpglsxtrpostabbrvfootnote
+ This is used by styles like postfootnote to ensure that the label and inner and outer formatting are expanded before being passed to \glsxtrpostabbrvfootnote, otherwise they may lose their definitions before the footnote text is typeset.

+

+\glsxtrpostabbrvfootnote{entry-label}{fmt-code}
+ This is used by the footnote styles that defer the footnote to the post-link hook. The default definition is:
\newrobustcmd*{\glsxtrpostabbrvfootnote}[2]{%
+ \glsxtrabbrvfootnote{#1}%
+ {#2\glsxtrpostfootnotelongformat{#1}{\glsfirstlongfootnotefont}}%
 }
-\renewcommand{\glsxtrbookindexsubsubbetween}[2]{%
-  \glsxtrbookindexsubsubatendgroup{#1}%
+
The second argument will be the expansion of \glsxtrassignlinktextfmt, to allow the inner formatting to be picked up, if required.

+

+\glsxtrifhyphenstart{text}{true}{false}
+ This command is used by the hyphen styles to determine if the insert material starts with a hyphen. Does true if text starts with a hyphen otherwise does false.

+

+\GlsXtrWarnDeprecatedAbbrStyle{old-name}{new-name}
+ This command is used to generate a warning (with \GlossariesExtraWarning) if a deprecated abbreviation style is used.

+ +

+ +
+

4.5.3. Defining New Abbreviation Styles

+

+If none of the predefined styles suit your requirements, you can define your own custom style using:

+\newabbreviationstyle{style-name}{setup}{display definitions}
+ The first argument is the style name. This is used internally to form control sequences, so the name shouldn’t contain any special characters.

+The second argument sets up the information that’s required when an abbreviation is defined (which is why the style must be set before the abbreviations with that style are defined). The relevant commands for this argument are listed in §4.5.3.1.

+The third argument defines the commands that determine how the display style (\gls) and the inline style (\glsxtrfull) are formatted. The relevant commands for this argument are listed in §4.5.3.2.

+

+\renewabbreviationstyle{style-name}{setup}{display definitions}
+ Redefines an existing abbreviation style.

+

+\letabbreviationstyle{new style}{existing style}
+ Defines a synonym of an existing abbreviation style.

+ +

+ +
+

4.5.3.1. Style Initialisation Hooks

+

+The style initialisation hooks should be placed in the second argument (setup) of \newabbreviationstyle. They ensure that all the fields are correctly initialised when the entry is defined with the underlying \newglossaryentry command. They may also be used to set category attributes.

+The following is prepended to setup to initialise the final hook:

\renewcommand*{\GlsXtrPostNewAbbreviation}{}
+

+When an entry is defined with \newabbreviation, the following steps are performed: +

    +
  1. 1.Token registers are initialised to the information provided in the arguments of \newabbreviation: \glskeylisttok, \glslabeltok, \glsshorttok and \glslongtok.

    +

  2. 2.The commands \glsxtrorgkeylist, \glsxtrorgshort and \glsxtrorglong are defined to the options, short and long values supplied to \newabbreviation. (The \glskeylisttok \glsshorttok and \glslongtok token registers may be changed before the entry is actually defined. These commands may be used to obtain the original values.)

    +

  3. 3.\ExtraCustomAbbreviationFields is initialised to do nothing.

    +

  4. 4.Accessibility settings are initialised, if required. These redefine \ExtraCustomAbbreviationFields to set the accessibility fields.

    +

  5. 5.The command \glscategorylabel is defined to abbreviation.

    +

  6. 6.The options list is parsed for the following keys: category and, if accessibility is enabled, access, textaccess, pluralaccess, firstaccess, firstpluralaccess, shortaccess, shortpluralaccess, longaccess, and longpluralaccess.

    +

  7. 7.The abbreviation style is applied for the category given by \glscategorylabel (which may have been changed when the options were parsed in the previous step) or the fallback if no abbreviation style is associated with that category. This performs both the setup and display definitions provided when the style was defined with \newabbreviationstyle.

    +

  8. 8.The long plural form is initialised to its default value (long\glspluralsuffix).

    +

  9. 9.The markwords attribute, if set, is implemented for the singular long form. It will also mark the entry as having a description with formatting (using \glsexclapplyinnerfmtfield).

    +

  10. 10.The markshortwords attribute is implemented, if set, otherwise the insertdots attribute is implemented, if set, for the singular short form.

    +

  11. 11.The aposplural attribute is implemented, if set, otherwise the noshortplural attribute is implemented, if set. This step will set the default short plural.

    +

  12. 12.\glsshorttok is updated to reflect any changes.

    +

  13. 13.The \glsxtrnewabbrevpresetkeyhook hook is performed.

    +

  14. 14.The options list is parsed for the shortplural and longplural keys. The \glskeylisttok token is updated to only include the remaining keys that haven’t yet been processed.

    +

  15. 15.The markwords attribute, if set, is implemented for the plural long form.

    +

  16. 16.The markshortwords attribute, if set, otherwise the insertdots attribute, if set, is implemented for the plural short form.

    +

  17. 17.The \glsshortpltok and \glslongpltok registers are set.

    +

  18. 18.\newabbreviationhook performed.

    +

  19. 19.The entry is defined using \newglossaryentry with the key value list:
    type={\glsxtrabbrvtype},
    +category={abbreviation},
    +short={\the\glsshorttok},
    +shortplural={\the\glsshortpltok},
    +long={\the\glslongtok},
    +longplural={\the\glslongpltok},
    +name={\the\glsshorttok},
    +\CustomAbbreviationFields,
    +\ExtraCustomAbbreviationFields
    +\the\glskeylisttok
    +

    +

  20. 20.Add the name, first, firstplural, text and plural keys to the list of inner formatting exclusions, as they include formatting commands.

    +

  21. 21.Final hook \GlsXtrPostNewAbbreviation performed. +
+

+Note that when these hooks (except the last) are used, the entry hasn’t yet been defined. However, some information will have already been picked up from the arguments of \newabbreviation. These can be accessed in the hooks using the following (but make sure they are fully expanded):

+\glscategorylabel
+ Expands to the entry’s category label.

+

+\glskeylisttok
+ A token register that contains the options that were passed to \newabbreviation with pre-processed options removed. Use \the\glskeylisttok to expand it.

+The original option list, as supplied to \newabbreviation, can be obtained with:

+\glsxtrorgkeylist
+ (Not a token register.)

+

+\glslabeltok
+ A token register that contains the entry’s label. Use \the\glslabeltok to expand it.

+

+\glsshorttok
+ A token register that contains the short form (which may have been modified after being passed to \newabbreviation). Use \the\glsshorttok to expand it.

+The original short form, as supplied to \newabbreviation, can be obtained with:

+\glsxtrorgshort
+ (Not a token register.)

+

+\glsshortpltok
+ A token register that contains the short plural form (which may have been obtained from the short form or modified after being passed to \newabbreviation). Use \the\glsshortpltok to expand it.

+

+\glslongtok
+ A token register that contains the long form (which may have been modified after being passed to \newabbreviation). Use \the\glslongtok to expand it.

+The original long form, as supplied to \newabbreviation, can be obtained with:

+\glsxtrorglong
+ (Not a token register.)

+

+\glslongpltok
+ A token register that contains the long plural form (which may have been obtained from the long form or modified after being passed to \newabbreviation). Use \the\glslongpltok to expand it.

+

+\ExtraCustomAbbreviationFields
+ Expands to additional field definitions for the entry. This is used to add the accessibility fields (such as shortaccess), if enabled. The abbreviation style may append (\appto) or prepend (\preto) additional information, if required, to this hook.

+

+If you alter this hook, make sure that you include the trailing comma after each key={value}, including the last one.
+

+

+\CustomAbbreviationFields
+ Expands to the default field definitions for the entry. Take care to protect any commands that shouldn’t be expanded. The comma may be omitted from the final key={value}.

+

+\GlsXtrPostNewAbbreviation
+ A hook that’s used after the entry has been defined (at the end of \newabbreviation). This can be used to set category attributes, define the post-link hook, or mark the entry as having a complex style (with \glsxtrsetcomplexstyle).

+For example, the long-short abbreviation style includes the following in setup:

\renewcommand*{\GlsXtrPostNewAbbreviation}{%
+  \glsxtrsetcomplexstyle{\the\glslabeltok}{3}%
+  \glshasattribute{\the\glslabeltok}{regular}%
+  {%
+    \glssetattribute{\the\glslabeltok}{regular}{false}%
+  }%
+  {}%
 }
-
-

This uses \glstreesubitem and \glstreesubsubitem to indent the cross-reference -according to the next level down, so the cross-reference for a top-level entry is aligned -with the sub-entries, and a level 1 entry has its cross-reference aligned with -sub-sub-entries. In the event that a level 2 entry has a cross-reference, this is -indented a bit further (but it won’t be aligned with any deeper level as the bookindex -style only supports a maximum of two sub-levels). -

The bookindex style uses group headings. (If you use bib2gls remember to invoke -it with the --group or -g switch.) The heading will use -


\glsxtrbookindexbookmark{group title}{name}

-

-If \pdfbookmark has been defined, this will use that command to bookmark the -group title. If section=chapter is set (default if chapters are defined) then this -uses level 1 otherwise it uses level 2. You can redefine this command if this -isn’t appropriate. If \pdfbookmark hasn’t been defined, this command does -nothin. -

The group heading is formatted according to -


\glsxtrbookindexformatheader{group title}

-

-which is defined as - - - -

-
-\newcommand*{\glsxtrbookindexformatheader}[1]{%
-  \par{\centering\glstreegroupheaderfmt{#1}\par}%
+
Note that in the above, the commands within the definition of \GlsXtrPostNewAbbreviation are all expanded when that hook is used. However, if this hook defines other commands or hooks that will be used later, then make sure that the definitions of those commands use the inner hook’s own placeholder commands.

+

+Remember that the post-link hook uses \glslabel to reference the current label. Don’t use \glslabeltok as that will contain the label of the last abbreviation to be defined.
+

+For example, the long-hyphen-postshort-hyphen style has:

\renewcommand*{\GlsXtrPostNewAbbreviation}{%
+  \glsexclapplyinnerfmtfield{\the\glslabeltok}{desc}%
+  \csdef{glsxtrpostlink\glscategorylabel}{%
+    \glsxtrifwasfirstuse
+    {%
+      \expandafter\glsxtrposthyphenshort\expandafter\glslabel
+       \expandafter{\glsinsert}%
+    }%
+    {%
+      \expandafter\glsxtrposthyphensubsequent\expandafter\glslabel
+       \expandafter{\glsinsert}%
+    }%
+  }%
+  \glshasattribute{\the\glslabeltok}{regular}%
+  {%
+    \glssetattribute{\the\glslabeltok}{regular}{false}%
+  }%
+  {}%
 }
-
-

where \glstreegroupheaderfmt is provided by the glossary-tree package, which is -automatically loaded. Note that the entry names aren’t encapsulated with -\glstreenamefmt. -

The glossary-bookindex package provides some supplementary commands that -aren’t used by default, but may be used when adjusting the style. These commands -should only be used within one of the \print…glossary commands. (That is, they -should only be used in glossary styles.) -


\glsxtrbookindexmarkentry{label}

-

-This writes information to the .aux file that can be read on the next run to obtain -the first and last entry on each page of the glossary. -

You can display the first entry associated with the current page using: -


\glsxtrbookindexfirstmark

-

-and the last entry associated with the current page using: -


\glsxtrbookindexlastmark

-

-These do nothing if there are no entries marked on the current page (or if the -document build isn’t up to date). -

The entry is formatted using: -


\glsxtrbookindexfirstmarkfmt{label}

-

-for the first instance and -


\glsxtrbookindexlastmarkfmt{label}

-

-for the last. -

These commands are designed for use in page headers or footers where the page -number is stable. For example, \glsxtrbookindexname can be redefined to mark the -current entry: - - - -

-
-\renewcommand{\glsxtrbookindexname}[1]{%
-  \glsxtrbookindexmarkentry{#1}%
-  \glossentryname{#1}%
+
In the above, \glslabeltok and \glscategorylabel are used in the parts that will be expanded at the end of \newabbreviation, but \glslabel and \glsinsert are used in the definition of the post-link hook, which won’t be expanded until the entry is referenced in the document with a command such as \gls. (The use of \expandafter is included to assist innertextformat.)

+

+\glsxtrsetcomplexstyle{entry-label}{n}
+ This command should go in the definition of \GlsXtrPostNewAbbreviation to indicate that the entry given by entry-label has an abbreviation style that is complex. The second argument n should be numeric and indicates why it doesn’t work with \glsfirst, \Glsfirst, \GLSfirst, \glsfirstplural, \Glsfirstplural or \GLSfirstplural: 1 (all caps doesn’t work), 2 (all caps and insert doesn’t work), 3 (insert doesn’t work).

+

+\glsfirstinnerfmtabbrvfont{text}
+ This is a robust command that applies both \glsfirstabbrvfont and the inner formatting command \glsxtrgenentrytextfmt. This is used by the following command.

+

+\glsfirstxpabbrvfont{text}{category}
+ If the markshortwords attribute is true, this does \protect\glsfirstabbrvfont{text} otherwise it does \glsfirstinnerfmtabbrvfont{text}.

+This command is designed to be used within \CustomAbbreviationFields to set the first and firstplural keys, so it needs to partially expand within \newabbreviation. For example, the postfootnote includes the following lines in the definition of \CustomAbbreviationFields:

first={\glsfirstxpabbrvfont{\the\glsshorttok}{\glscategorylabel}},%
+firstplural={\glsfirstxpabbrvfont{\the\glsshortpltok}{\glscategorylabel}},
+
This will be expanded before being passed to \newglossaryentry. If the markshortwords attribute is true, this will end up as:
first={\protect\glsfirstabbrvfont{short}},%
+firstplural={\protect\glsfirstabbrvfont{shortpl}}
+
otherwise it will end up as:
first={\glsfirstinnerfmtabbrvfont{short}},%
+firstplural={\glsfirstinnerfmtabbrvfont{shortpl}},%
+
where short and shortpl are, respectively, the values in the \glsshorttok and \glsshortpltok registers.

+

+The placeholder registers and macros (such as \glsshorttok and \glscategorylabel) must be expanded before being passed to \newglossaryentry as their values are unreliable outside of \newabbreviation.
+

+

+\glsinnerfmtabbrvfont{text}
+ This is a robust command that applies both \glsabbrvfont and the inner formatting command \glsxtrgenentrytextfmt. This is used by the following command.

+

+\glsxpabbrvfont{text}{category}
+ If the markshortwords attribute is true, this does \protect\glsabbrvfont{text} otherwise it does \glsinnerfmtabbrvfont{text}. This command is designed for the name, text and plural keys within \CustomAbbreviationFields.

+

+\glsfirstinnerfmtlongfont{text}
+ This is a robust command that applies both \glsfirstlongfont and the inner formatting command \glsxtrgenentrytextfmt. This is used by the following command.

+

+\glsfirstxplongfont{category}{text}
+ If the markwords attribute is true, this does \protect\glsfirstlongfont{text} otherwise it does \glsfirstinnerfmtlongfont{text}. This command is designed for the first and firstplural keys within \CustomAbbreviationFields.

+

+\glsinnerfmtlongfont{text}
+ This is a robust command that applies both \glslongfont and the inner formatting command \glsxtrgenentrytextfmt. This is used by the following command.

+

+\glsxplongfont{category}{text}
+ If the markwords attribute is true, this does \protect\glslongfont{text} otherwise it does \glsinnerfmtlongfont{text}. This command is designed for the name, text and plural keys within \CustomAbbreviationFields (if they should include the long form in their value, such as the long-noshort-desc style).

+

+\glsxtrAccSuppAbbrSetNoLongAttrs{category}
+ If accessibility support has been enabled with accsupp, this command will initialise support for the name, first, firstplural, text and plural fields for the given category (using \glsxtrprovideaccsuppcmd). The nameshortaccess, firstshortaccess and textshortaccess attributes are set to true. (Does nothing if accessibility support has not been enabled.)

+This command is provided for abbreviation styles where the name, first and text are just the formatted abbreviation. The first field may just be the long form or may be a combination of short and long.

+

+\glsxtrAccSuppAbbrSetNameLongAttrs{category}
+ If accessibility support has been enabled with accsupp, this command will initialise support for the first, firstplural, text and plural fields for the given category (using \glsxtrprovideaccsuppcmd). The firstshortaccess and textshortaccess attributes are set to true. (Does nothing if accessibility support has not been enabled.)

+This command is provided for abbreviation styles where the first and text are just the formatted abbreviation. The name field may just be the long form or may be a combination of short and long.

+

+\glsxtrAccSuppAbbrSetFirstLongAttrs{category}
+ If accessibility support has been enabled with accsupp, this command will initialise support for the name, text and plural fields for the given category (using \glsxtrprovideaccsuppcmd). The nameshortaccess and textshortaccess attributes are set to true. (Does nothing if accessibility support has not been enabled.)

+This command is provided for abbreviation styles where the name and text are just the formatted abbreviation. The first field may just be the long form or may be a combination of short and long.

+

+\glsxtrAccSuppAbbrSetTextShortAttrs{category}
+ If accessibility support has been enabled with accsupp, this command will initialise support for the text and plural fields for the given category (using \glsxtrprovideaccsuppcmd). The textshortaccess attribute is set to true. (Does nothing if accessibility support has not been enabled.)

+This command is provided for abbreviation styles where the text is just the formatted abbreviation. The name and first fields may just be the long form or may be a combination of short and long. The name may also be short but followed by the long form in the description.

+

+\glsxtrAccSuppAbbrSetNameShortAttrs{category}
+ If accessibility support has been enabled with accsupp, this command will initialise support for the name field for the given category (using \glsxtrprovideaccsuppcmd). The nameshortaccess attribute is set to true. (Does nothing if accessibility support has not been enabled.)

+This command is provided for abbreviation styles where only the name is just the formatted abbreviation. The first and text fields may just be the long form or may be a combination of short and long.

+ +

+ +
+

4.5.3.2. Style Formatting Commands

+

+The final display definitions argument of \newabbreviationstyle should contain the redefinitions of the style commands listed here that are used to format abbreviations.

+Whenever an abbreviation style is activated with commands like \setabbreviationstyle, \newabbreviation or \glssetabbrvfmt, display definitions are implemented.

+

+If you simply want to adjust the formatting of one of the predefined styles, you should redefine the associated commands listed in §4.5.1.3.
+

+The following initialisation is always prepended to display definitions so you can omit them if the default is appropriate for your style:

\renewcommand*{\glsxtrinlinefullformat}{\glsxtrfullformat}%
+\renewcommand*{\Glsxtrinlinefullformat}{\Glsxtrfullformat}%
+\renewcommand*{\GLSxtrinlinefullformat}{\GLSxtrfullformat}%
+\renewcommand*{\glsxtrinlinefullplformat}{\glsxtrfullplformat}%
+\renewcommand*{\Glsxtrinlinefullplformat}{\Glsxtrfullplformat}%
+\renewcommand*{\GLSxtrinlinefullplformat}{\GLSxtrfullplformat}%
+\let\glsxtrsubsequentfmt\glsxtrdefaultsubsequentfmt
+\let\glsxtrsubsequentplfmt\glsxtrdefaultsubsequentplfmt
+\let\Glsxtrsubsequentfmt\Glsxtrdefaultsubsequentfmt
+\let\Glsxtrsubsequentplfmt\Glsxtrdefaultsubsequentplfmt
+\let\GLSxtrsubsequentfmt\GLSxtrdefaultsubsequentfmt
+\let\GLSxtrsubsequentplfmt\GLSxtrdefaultsubsequentplfmt
+
In the event that any styles omit defining the newer \GLSxtrfullformat or \GLSxtrfullplformat, these are also initialised to defaults but ideally they should have their definitions provided.

+The minimal set of commands that should have their definitions provided are the abbreviation plural suffix (\abbrvpluralsuffix) the display full forms: \glsxtrfullformat, \glsxtrfullplformat and their case-changing variants.

+The inline full form commands only need to be provided if they behave differently from the display full form. The subsequent use commands only need to be provided if the default (only show the short form) isn’t suitable.

+

+The content of display definitions is placed within the definition of an internal control sequence, so remember to use ## instead of # to reference command parameters.
+

+ +

+ +
+
4.5.3.2.1. Suffix and Fonts
+

+These are the generic suffix and font commands that vary according to the abbreviation style. The style should provide the appropriate definitions. The suffix should always be provided. The font commands are only required if the style applies any font formatting to either the long or short form.

+

+\abbrvpluralsuffixinitial: \glsxtrabbrvpluralsuffix
+ The plural suffix for the short form. For example, the long-short style defines this to just use \glsxtrabbrvpluralsuffix, but the smallcaps styles, such as long-short-sc define this to \glsxtrscsuffix in order to counteract the small caps font.

+

+\glsfirstabbrvfont{text}
+ The font formatting command for the short form on first use. For example, the long-short-sc style has:
\renewcommand*\glsfirstabbrvfont[1]{\glsfirstabbrvscfont{##1}}
+

+

+\glsabbrvfont{text}
+ The font formatting command for the short form. For example, the long-short-sc style has:
\renewcommand*\glsabbrvfont[1]{\glsabbrvscfont{##1}}
+

+

+\glsxtrrevert{text}
+ This command is designed to counteract the effect of \glsabbrvfont if, for some reason, it shouldn’t be applied to part of the abbreviation. For example, you may prefer not to have digits reduced with the smaller (“sm”) styles.

+

+\glsfirstlongfont{text}
+ The font formatting command for the long form on first use. For example, the long-short-sc style has:
\renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}
+

+

+\glslongfont{text}
+ The font formatting command for the long form. For example, the long-short-sc style has:
\renewcommand*{\glslongfont}[1]{\glslongdefaultfont{##1}}
+

+ +

+ +
+
4.5.3.2.2. First Use Display Format
+

+These commands always need to be provided.

+

+\glsxtrfullformat{entry-label}{insert}
+ The singular display full form used on the first use of \gls.

+

+\glsxtrfullplformat{entry-label}{insert}
+ The plural display full form used on the first use of \glspl.

+

+\Glsxtrfullformat{entry-label}{insert}
+ The sentence case singular display full form used on the first use of \Gls.

+

+\Glsxtrfullplformat{entry-label}{insert}
+ The sentence case plural display full form used on the first use of \Glspl.

+

+\GLSxtrfullformat{entry-label}{insert}
+ The all caps singular display full form used on the first use of \GLS.

+

+\GLSxtrfullplformat{entry-label}{insert}
+ The all caps plural display full form used on the first use of \GLSpl.

+ +

+ +
+
4.5.3.2.3. Subsequent Use Display Format
+

+These commands only need to be provided if the \gls-like commands don’t simply show the short form.

+

+\glsxtrsubsequentfmt{entry-label}{insert}
+ The singular form for subsequent use of \gls.

+

+\glsxtrsubsequentplfmt{entry-label}{insert}
+ The plural form for subsequent use of \glspl.

+

+\Glsxtrsubsequentfmt{entry-label}{insert}
+ The sentence case singular form for subsequent use of \Gls.

+

+\Glsxtrsubsequentplfmt{entry-label}{insert}
+ The sentence case plural form for subsequent use of \Glspl.

+

+\GLSxtrsubsequentfmt{entry-label}{insert}
+ The all caps singular form for subsequent use of \GLS.

+

+\GLSxtrsubsequentplfmt{entry-label}{insert}
+ The all caps plural form for subsequent use of \GLSpl.

+The defaults all show the short form and insert encapsulated with the inner formatting \glsxtrgenentrytextfmt and \glsabbrvfont. The purpose of the inner formatting is to get it as close as possible to the actual text so \glsabbrvfont is placed outside of \glsxtrgenentrytextfmt.

+The markshortwords attribute complicates matters as it inserts \glsxtrword and \glsxtrwordsep into the actual field value. In that case, the inner formatting is within \glsxtrword and \glsxtrwordsep, so only the insert material needs to be formatted.

+If a custom style doesn’t need to support innertextformat or \ifglsxtrinsertinside, it can reduce the complexity by omitting the inner formatting and conditionals, but this lack of support should be documented if the style is made generally available.

+

+\glsxtrdefaultsubsequentfmt{entry-label}{insert}
+ The default singular form for subsequent use of \gls.

+

+\glsxtrdefaultsubsequentplfmt{entry-label}{insert}
+ The default plural form for subsequent use of \glspl.

+

+\Glsxtrdefaultsubsequentfmt{entry-label}{insert}
+ The default sentence case singular form for subsequent use of \Gls.

+

+\Glsxtrdefaultsubsequentplfmt{entry-label}{insert}
+ The default sentence case plural form for subsequent use of \Glspl.

+

+\GLSxtrdefaultsubsequentfmt{entry-label}{insert}
+ The default all caps singular form for subsequent use of \GLS.

+

+\GLSxtrdefaultsubsequentplfmt{entry-label}{insert}
+ The default all caps plural form for subsequent use of \GLSpl.

+ +

+ +
+
4.5.3.2.4. Inline Full Format
+

+These commands only need to be provided if the inline full form is different from the display full form.

+

+\glsxtrinlinefullformat{entry-label}{insert}
+ The singular full form of \glsxtrfull.

+

+\glsxtrinlinefullplformat{entry-label}{insert}
+ The plural full form of \glsxtrfullpl.

+

+\Glsxtrinlinefullformat{entry-label}{insert}
+ The sentence case singular full form of \Glsxtrfull.

+

+\Glsxtrinlinefullplformat{entry-label}{insert}
+ The sentence case plural full form of \Glsxtrfullpl.

+

+\GLSxtrinlinefullformat{entry-label}{insert}
+ The all caps singular full form of \GLSxtrfull.

+

+\GLSxtrinlinefullplformat{entry-label}{insert}
+ The all caps plural full form of \GLSxtrfullpl.

+ +

+ +
+
4.5.3.2.5. Wrapper Commands
+

+These are commands that can be used in the definitions of the above to ensure that the appropriate accessibility fields and inner formatting is supported.

+

+\glsxtrlongformat{entry-label}{insert}{fmt-cs}
+ This command is used in the definition of \glsxtrlong in some of the predefined abbreviation styles to format the long value of the entry identified by entry-label with the command fmt-cs, which should take one argument.

+Accessibility support is implemented with \glsaccesslong if the markwords attribute is true otherwise with \glsaccessfmtlong using \glsxtrgenentrytextfmt for the inner formatting.

+This is then encapsulated (including or excluding the insert, according to \ifglsxtrinsertinside) with fmt-cs. If the insert content needs to be placed outside of fmt-cs, it will be individually encapsulated with the inner formatting.

+

+\Glsxtrlongformat{entry-label}{insert}{fmt-cs}
+ As above, but sentence case.

+

+\GLSxtrlongformat{entry-label}{insert}{fmt-cs}
+ As above, but all caps.

+

+\glsxtrlongplformat{entry-label}{insert}{fmt-cs}
+ As \glsxtrlongformat, but for the longplural field.

+

+\Glsxtrlongplformat{entry-label}{insert}{fmt-cs}
+ As above, but sentence case.

+

+\GLSxtrlongplformat{entry-label}{insert}{fmt-cs}
+ As above, but all caps.

+

+\glsxtrlongformatgrp{entry-label}{insert}{fmt-cs}
+ As \glsxtrlongformat, but adds grouping around insert (with the inner formatting inside the group).

+

+\Glsxtrlongformatgrp{entry-label}{insert}{fmt-cs}
+ As above, but sentence case.

+

+\GLSxtrlongformatgrp{entry-label}{insert}{fmt-cs}
+ As above, but all caps.

+

+\glsxtrlongplformatgrp{entry-label}{insert}{fmt-cs}
+ As \glsxtrlongplformat, but adds grouping around insert (with the inner formatting inside the group).

+

+\Glsxtrlongplformatgrp{entry-label}{insert}{fmt-cs}
+ As above, but sentence case.

+

+\GLSxtrlongplformatgrp{entry-label}{insert}{fmt-cs}
+ As above, but all caps.

+

+\glsxtrshortformat{entry-label}{insert}{fmt-cs}
+ This command is used in the definition of \glsxtrshort and in some of the predefined abbreviation styles to format the short value of the entry identified by entry-label with the command fmt-cs, which should take one argument.

+Accessibility support is implemented with \glsaccessshort if the markshortwords attribute is true otherwise with \glsaccessfmtshort using \glsxtrgenentrytextfmt for the inner formatting.

+This is then encapsulated (including or excluding the insert, according to \ifglsxtrinsertinside) with fmt-cs. If the insert content needs to be placed outside of fmt-cs, it will be individually encapsulated with the inner formatting.

+

+\Glsxtrshortformat{entry-label}{insert}{fmt-cs}
+ As above, but sentence case.

+

+\GLSxtrshortformat{entry-label}{insert}{fmt-cs}
+ As above, but all caps.

+

+\glsxtrshortplformat{entry-label}{insert}{fmt-cs}
+ As \glsxtrshortformat, but for the shortplural field.

+

+\Glsxtrshortplformat{entry-label}{insert}{fmt-cs}
+ As above, but sentence case.

+

+\GLSxtrshortplformat{entry-label}{insert}{fmt-cs}
+ As above, but all caps.

+

+\glsxtrshortformatgrp{entry-label}{insert}{fmt-cs}
+ As \glsxtrshortformat, but adds grouping around insert (with the inner formatting inside the group).

+

+\Glsxtrshortformatgrp{entry-label}{insert}{fmt-cs}
+ As above, but sentence case.

+

+\GLSxtrshortformatgrp{entry-label}{insert}{fmt-cs}
+ As above, but all caps.

+

+\glsxtrshortplformatgrp{entry-label}{insert}{fmt-cs}
+ As \glsxtrshortplformat, but adds grouping around insert (with the inner formatting inside the group).

+

+\Glsxtrshortplformatgrp{entry-label}{insert}{fmt-cs}
+ As above, but sentence case.

+

+\GLSxtrshortplformatgrp{entry-label}{insert}{fmt-cs}
+ As above, but all caps.

+

+\glsxtrlongshortformat{entry-label}{insert}{long-fmt-cs}{short-fmt-cs}
+ A shortcut designed for long (short) styles. This is defined as:
\glsxtrlongformat{entry-label}{insert}{long-fmt-cs}\glsxtrfullsep{entry-label}\glsxtrparen{\glsxtrshortformat{entry-label}{}{short-fmt-cs}}
Note that the insert is only placed after the long form.

+

+\Glsxtrlongshortformat{entry-label}{insert}{long-fmt-cs}{short-fmt-cs}
+ As above, but sentence case.

+

+\GLSxtrlongshortformat{entry-label}{insert}{long-fmt-cs}{short-fmt-cs}
+ As above, but all caps.

+

+\glsxtrlongshortplformat{entry-label}{insert}{long-fmt-cs}{short-fmt-cs}
+ As \glsxtrlongshortformat but uses the plural versions \glsxtrlongplformat and \glsxtrshortplformat.

+

+\Glsxtrlongshortplformat{entry-label}{insert}{long-fmt-cs}{short-fmt-cs}
+ As above, but sentence case.

+

+\GLSxtrlongshortplformat{entry-label}{insert}{long-fmt-cs}{short-fmt-cs}
+ As above, but all caps.

+

+\glsxtrshortlongformat{entry-label}{insert}{long-fmt-cs}{short-fmt-cs}
+ A shortcut designed for short (long) styles. This is defined as:
\glsxtrshortformat{entry-label}{insert}{short-fmt-cs}\glsxtrfullsep{entry-label}\glsxtrparen{\glsxtrlongformat{entry-label}{}{long-fmt-cs}}
Note that the insert is only placed after the short form.

+The syntax is the same as for \glsxtrlongshortformat even though \glsxtrlongformat and \glsxtrshortformat are flipped within the definition.

+

+\Glsxtrshortlongformat{entry-label}{insert}{long-fmt-cs}{short-fmt-cs}
+ As above, but sentence case.

+

+\GLSxtrshortlongformat{entry-label}{insert}{long-fmt-cs}{short-fmt-cs}
+ As above, but all caps.

+

+\glsxtrshortlongplformat{entry-label}{insert}{long-fmt-cs}{short-fmt-cs}
+ As \glsxtrshortlongformat but uses the plural versions \glsxtrshortplformat and \glsxtrlongplformat.

+

+\Glsxtrshortlongplformat{entry-label}{insert}{long-fmt-cs}{short-fmt-cs}
+ As above, but sentence case.

+

+\GLSxtrshortlongplformat{entry-label}{insert}{long-fmt-cs}{short-fmt-cs}
+ As above, but all caps.

+ +

+ +
+

4.6. Restoring Base Acronym Mechanism

+

+It’s possible to revert \newacronym back to the definition provided by the base glossaries package. However, if you do this, you will lose all the abbreviation features provided by glossaries-extra.

+

+Where possible, avoid this. If you’re simply trying to make the long form appear on first use with \newacronym, set the abbreviation style using:
\setabbreviationstyle[acronym]{long-short}
+
+

+If you really need to use the original base glossaries package’s acronym mechanism, it’s better to stick with just glossaries and not use glossaries-extra. However, it may be that you need to use a glossaries-extra feature, such as \printunsrtglossary, but you have a custom acronym style that you can’t implement using the glossaries-extra abbreviation mechanism. This is a rare edge case for unusual formats, as it should be possible to implement most common abbreviation formats using the predefined styles.

+

+Unpredictable results will occur if \RestoreAcronyms or \MakeAcronymsAbbreviations are used after abbreviations or acronyms have been defined.
+

+

+\RestoreAcronyms
+ Restores \newacronym back to the original base glossaries interface. Note that this doesn’t affect \newabbreviation. It also sets the regular attribute for the acronym category to false and sets the acronym style to long-short (which is the default for the base package).

+The display style for each glossary identified in the acronym lists is switched to the default acronym display style.

+

+\MakeAcronymsAbbreviations
+ Counteracts \RestoreAcronyms.

+ +

+ +
+

5. Referencing (Using) Entries

+

+Entries can be referenced using the \gls-like and \glstext-like commands, as described in the base glossaries manual. There are some additional commands provided by glossaries-extra: +

    +
  • abbreviation commands, such as \glsxtrshort (see §4);
  • commands for use in captions or section headings, such as \glsfmttext (see §5.3.2);
  • commands, such as \glsxtrp, designed for use within fields to help mitigate the problems of nesting (see §5.4);
  • commands, such as \mgls, that are designed for referencing multi (or compound) entries (see §7);
  • commands, such as \glsaccessname, used to incorporate accessibility support (see §9.2);
  • commands, such as \dgls, that are designed for bib2gls’s dual entries (see §11.5.7);
  • commands, such as \rgls, that depend on the number of entry records (see §11.4). +
+ Additionally, the entry counting commands, such as \cgls, provided by the base glossaries package are modified by glossaries-extra (see §6.1).

+The \gls-like commands are designed to produce text at that point in the document (the link text, §5.5), index the entry (to ensure that it appears in the glossary, §5.8) and unset the first use flag (which can alter the link text, §5.10). Additional information can be appended automatically with the post-link hook5.5.4). The link text is given by the entry style (see §5.5.5) or by the final argument of \glsdisp.

+The \glstext-like commands are designed to produce text at that point in the document (the link text, §5.5) and index the entry (to ensure that it appears in the glossary, §5.8). Additional information can be appended automatically with the post-link hook5.5.4). The link text is determined by the calling command. For example, the corresponding field value (possibly encapsulated with \glsxtrregularfont and the inner formatting) for commands like \glstext or the final argument of \glslink.

+The \gls-like and \glstext-like commands can all be used with a star (*) or plus (+) modifier. The star modifier automatically implements hyper=false (disables the hyperlink) and the plus modifier automatically implements hyper=true (forces the hyperlink on, if supported).

+With glossaries-extra, it’s possible to define an additional modifier for your own use with:

+\GlsXtrSetAltModifier{token}{options}
+ The token must be a single token, so a multi-byte UTF-8 character will required a native Unicode engine (XeLaTeX or LuaLaTeX). For example, the following:
\GlsXtrSetAltModifier{!}{format=glsignore}
+
means that \gls!{label} will be equivalent to \gls[format=glsignore]{label}.

+It’s also possible to redefine the star and plus modifiers:

+\GlsXtrSetStarModifier{options}
+ This sets the options to use for the star modifier.
+\GlsXtrSetPlusModifier{options}
+ This sets the options to use for the plus modifier. For example, the following:
\GlsXtrSetPlusModifier{noindex}
+
means that the star modifier will now suppress indexing instead of switching on the hyperlink.

+The \gls-like and \glstext-like commands have a complicated internal structure, which can be viewed as a series of layers. The outermost common layer is:

% save settings
+% initialise options, see §5.1
+\glslinkwrcontent{index & fmt content}
+% restore settings
+% post-link hook, see §5.5.4
+
The index & fmt content consists of the indexing (see §5.8) and the (possibly hyperlinked) formatted text, see §5.5. The index & fmt content code is encapsulated with:
+\glslinkwrcontent{code}
+ In v1.48, this was added to scope the link text and indexing code, which helped to prevent unwanted spacing caused by the whatsit and also helped to prevent some setting leakage, in the event of nesting (see §5.4), but this caused spacing issues when used in math mode, so from v1.49 this command now simply does its argument. The whatsit is now scoped with \glsencapwrcontent instead.

+The \glsxtrp command, designed for nested use, deals with the problem by suppressing the post-link hook and adding an outer group. For example, \glsxtrp{short}{html} behaves like:

{\let\glspostlinkhook\relax
+ \glsxtrshort[noindex,nohyper]{html}}
+

+Depending on the settings (the wrgloss option or the wrgloss attribute), the indexing may come before the text:

\glslinkwrcontent{indexfmt content}
+
or after the text:
\glslinkwrcontent{fmt contentindex}
+
or may be suppressed with noindex:
\glslinkwrcontent{fmt content}
+
The fmt content part is described in §5.5. The index part is the actual indexing (see §5.8) but also increments the index count, if applicable. Both the associated whatsit and increment are encapsulated with \glsencapwrcontent.

+

+Avoid using \glstext, \glsplural, \glsfirst and \glsfirstplural (and their case-changing variants) with entries that have been defined with \newabbreviation. Some of the abbreviation styles are too complicated to work with those commands. Instead, use commands like \glsxtrshort, \glsxtrfull or use \gls with the prereset or preunset options.
+

+The base glossaries package provides a way to adjust the formatting of the link text for the \gls-like commands according to the glossary type with \defglsentryfmt. The glossaries-extra package changes the default entry formatting (§5.5.5) and provides additional ways of modifying the displayed content (§5.5).

+The heading commands (described in §5.3) are designed to prevent indexing or changes to the first use flag if they appear in the table of contents (or list of figures, etc) or if they appear in the page header.

+Although the base glossaries package warns against nested link text, the glossaries-extra package provides \glsxtrp which can be used instead of \gls in field values to overcome some of the associated problems. See §5.4 for further details.

+If you need to simply access a field value without any formatting, see §5.11. (See §3.5 to set field values.) If you want to encapsulate the value with the appropriate accessibility tag, see §9.2.

+Commands such as \glsadd (see §5.8) and \glssee (see §5.9) are designed to only index (to ensure the entry appears in the glossary) without producing any text or changing the first use flag.

+The \gls-like, \glstext-like and \glsadd commands all have an initial optional argument that can be used to override the default actions. Some options are only applicable for particular subsets of referencing commands. For example, noindex is pointless for \glsadd since the sole purpose of that command is to index. Whereas types is only available with \glsaddall.

+ +

+ +
+

5.1. Options

+

+Some options are provided by the base glossaries package, but there are some additional options provided by glossaries-extra, which are listed in §5.1.2. Below, option-list indicates the options that are passed in the optional argument of the calling command (such as \gls).

+The order that the options are applied is: +

    +
  1. 1.prereset, preunset and postunset options are initialised by \glsinitreunsets;
  2. 2.hyper is initialised by \glsxtrchecknohyperfirst (\glsfirst-like only);
  3. 3.wrgloss option is initialised by \glsxtrinitwrgloss (not implemented by \glsadd or \glsxtrfmt);
  4. 4.hyperoutside option is initialised by \glsxtrinithyperoutside (not implemented by \glsadd or \glsxtrfmt);
  5. 5.initialise noindex=false (not \glsadd);
  6. 6.options identified by \GlsXtrSetDefaultGlsOpts, \GlsXtrAppToDefaultGlsOpts or \GlsXtrPreToDefaultGlsOpts (not implemented by \glsadd);
  7. 7.(\glsxtrfmt only) options provided in \GlsXtrFmtDefaultOptions;
  8. 8.(\gls-like only) the hyperfirst package option, nohyperfirst attribute and nohypernext attributes are checked to determine if the hyper option should be switched off (tests followed by \glslinkcheckfirsthyperhook);
  9. 9.\glslinkpresetkeys (not implemented by \glsadd or \glsxtrfmt);
  10. 10.(\glsadd only) \glsaddpresetkeys;
  11. 11.option-list;
  12. 12.\glslinkpostsetkeys (provided by the base glossaries package, not implemented by \glsadd or \glsxtrfmt);
  13. 13.(\glsadd only) \glsaddpostsetkeys. +
+

+ +

+ +
+

5.1.1. Setting Up Defaults

+

+You can (locally) set your preferred default options for the \gls-like and \glstext-like commands using:

+\GlsXtrSetDefaultGlsOpts{options}
+ The options may be any options that you can pass to those commands. These options also apply to \glsxtrfmt but not to \glsadd.

+

+Note that multiple instances of \GlsXtrSetDefaultGlsOpts will override each other.
+

+If you want to add to the existing options, you can use one of the following commands (both may be scoped).

+

+\GlsXtrAppToDefaultGlsOpts{options}
+ Appends options to the list of default options.

+

+\GlsXtrPreToDefaultGlsOpts{options}
+ Prepends options to the list of default options.

+For example, to prevent indexing in the front matter and back matter but not in the main matter:

\frontmatter
+\GlsXtrSetDefaultGlsOpts{noindex}
+…\mainmatter
+\GlsXtrSetDefaultGlsOpts{}
+…\backmatter
+\GlsXtrSetDefaultGlsOpts{noindex}
+
Note that noindex=false is now set before the options given in \GlsXtrSetDefaultGlsOpts to ensure that the setting is correctly initialised, so as from v1.49 you can simply set an empty options list to reset the default. Prior to v1.49, it was necessary to ensure that the noindex key was always present in the options list to avoid instability. So for pre v1.49, the line after \mainmatter in the above would need to be:
\GlsXtrSetDefaultGlsOpts{noindex=false}
+

+The default location encap is glsnumberformat but can be changed (locally) with:

+\GlsXtrSetDefaultNumberFormat{encap}
+ This can be overridden by explicitly setting the format key.

+The default options for \glsxtrfmt only are given by:

+\GlsXtrFmtDefaultOptionsinitial: noindex
+ This command should simply expand to the required list of options. These options are set after any options given in \GlsXtrSetDefaultGlsOpts and before option-list.

+

+\glslinkpresetkeys
+ This hook is performed after any settings provided in \GlsXtrSetDefaultGlsOpts but before option-list. This hook also applies to \glsxtrfmt but not to \glsadd.

+Note that \glslinkpostsetkeys, provided by the base glossaries package, is performed after option-list is processed.

+\glsaddpresetkeys
+ This hook, which is only used by \glsadd, is performed before option-list.

+

+\glsaddpostsetkeys
+ This hook, which is only used by \glsadd, is performed after option-list.

+

+\glsinitreunsets
+ This hook initialises the pre unset/reset options to: prereset=none and preunset=none. It also initialises the postunset setting to perform the post-unset (where applicable) but it will retain the current local/global setting.

+This hook will also implement the local repeat unset feature of \GlsXtrUnsetBufferEnableRepeatLocal.

+

+\glsxtrchecknohyperfirst{entry-label}
+ This hook is only used by \glsfirst, \glsfirstplural and their case-changing variants. The hook will implement hyper=false if the nohyperfirst attribute is set to true.

+

+\glsxtrinitwrgloss
+ This hook initialises the default setting of the wrgloss option. If the wrgloss attribute is set to after then this implements wrgloss=after otherwise it implements wrgloss=before. This setting can subsequently be overridden by \GlsXtrSetDefaultGlsOpts, \glslinkpresetkeys, the option-list argument or \glslinkpostsetkeys. This hook also applies to \glsxtrfmt but not to \glsadd.

+If you prefer to have the default to place the indexing after the link text, you can redefine this hook as follows:

\renewcommand*{\glsxtrinitwrgloss}{%
+ \glsifattribute{\glslabel}{wrgloss}{before}%
+ %
+   \glsxtrinitwrglossbeforetrue
+ %
+ %
+   \glsxtrinitwrglossbeforefalse
+ %
 }
-
-

If you only want to mark the top-level entries, remember to redefine -\glsxtrbookindexsubname as it defaults to \glsxtrbookindexname: - - - -

-
-\renewcommand{\glsxtrbookindexsubname}[1]{%
-  \glossentryname{#1}%
+

+

+\glsxtrinithyperoutside
+ This hook initialises the default setting of the hyperoutside option. If the hyperoutside attribute is set to false then this implements hyperoutside=false otherwise it implements hyperoutside=true. This setting can subsequently be overridden by \GlsXtrSetDefaultGlsOpts, \glslinkpresetkeys, the option-list argument or \glslinkpostsetkeys. This hook also applies to \glsxtrfmt but not to \glsadd.

+Within any of the hooks that are used by the \gls-like, \glstext-like or \glsxtrfmt commands, you can set options using:

+\setupglslink{options}
+

+Within any of the hooks that are used by \glsadd, you can set options with:

+\setupglsadd{options}
+

+ +

+ +
+

5.1.2. Additional Options

+

+Options for the \gls-like and \glstext-like commands that are provided by the base glossaries package also apply to new commands like \glsxtrfmt and \glsfmttext. In addition, the options below are provided by glossaries-extra. Note that some options, such as postunset, only apply to the \gls-like commands. Options that relate to the hyperlink, formatting, first use flag or whether/where (noindex/wrgloss) to perform indexing aren’t available for \glsadd.

+

+hyperoutside=booleandefault: true; initial: true
+ This boolean option determines whether the hyperlink should be inside or outside of \glstextformat (see §5.5.1). If true, the link text is encapsulated as:
hyperlink-cs{target}{\glstextformat{text}}
+
otherwise it’s encapsulated as:
\glstextformat{hyperlink-cs{target}{text}}
+
where hyperlink-cs is the command that generates the hyperlink (if enabled).

+

+textformat=csname
+ The value of this key should be the name of a control sequence (without the leading backslash). If this option is set, the given control sequence will be used instead of \glstextformat to encapsulate the link text. Note that this control sequence should take a single argument (the link text). See §5.5.1 for further details.

+

+This option will override the textformat attribute.
+

+

+innertextformat=csnameinitial: glsxtrdefaultentrytextfmt
+ The value of this key should be the name of a control sequence (without the leading backslash). The command \glsxtrgenentrytextfmt (which shouldn’t be redefined) is assigned to this control sequence at the start of the \gls-like and \glstext-like commands. This command is used within the predefined abbreviation styles and within \glsgenentryfmt to encapsulate the entry field values.

+

+Custom styles that don’t use \glsxtrgenentrytextfmt won’t support this key. See §5.5.3 for further details.
+

+Some formatting commands require direct access to the actual text or else the content has to be placed inside a box (which inhibits line-breaking). These commands won’t work with textformat as the text is usually too deeply embedded. This option provides a way of using those problematic commands, however there’s still no guarantee that they will work (for example, in the case of custom styles or where the field value itself contains commands).

+

+postunset=valuedefault: global; initial: global
+ This option only applies to the \gls-like commands and indicates whether or not to unset the first use flag after the link text. It may take one of three values: global (behaves like local=false), local (behaves like local=true) or none (doesn’t unset the first use flag after the first use). See §5.10.

+

+prereset=valuedefault: local; initial: none
+ This option may take one of three values: none (no reset), local or global. This option (if not none) will reset the first use flag before the link text and additionally change \glsxtrifwasfirstuse so that it indicates that this was the first use of the entry. See §5.10.

+Note that this is different from using \glslocalreset or \glsreset before the \glstext-like commands. Normally \glstext and \glsplural will define \glsxtrifwasfirstuse so that it indicates that this was not the first use of the entry (regardless of whether or not the entry has actually been used).

+For example:

\glsdefpostlink{general}{\glsxtrpostlinkAddDescOnFirstUse}
+\newglossaryentry{sample}{name={sample},
+  first={sample first use},description={an example}}
+\begin{document}
+Text field: \glstext{sample}.
+
+First use: \gls{sample}.  Next use: \gls{sample}.
+
+Force reset: \gls[prereset]{sample}. 
+Used? \ifglsused{sample}{Yes}{No}.
+
+Force reset: \glstext[prereset]{sample}. 
+Used? \ifglsused{sample}{Yes}{No}.
+\end{document}
+
+Example 90: Illustrating the prereset option 📥🖹 📥🖺

+Example document illustrating the use of the prereset option.

+ Note that \gls unsets the first use flag (unless postunset=none), so the sample entry is marked as used afterwards, but \glstext doesn’t alter the first use flag, after the link text so the sample entry is still marked as unused afterwards.

+

+preunset=valuedefault: local; initial: none
+ This option may take one of three values: none (no unset), local or global. This option (if not none) will unset the first use flag before the link text and additionally change \glsxtrifwasfirstuse so that it indicates that this wasn’t the first use of the entry. See §5.10.

+

+The preunset key is always performed after the prereset key.
+

+Note the effect of using a global reset but a local unset in the example below. Both options are performed, but the unset locally overrides the global reset.

\glsdefpostlink{general}{\glsxtrpostlinkAddDescOnFirstUse}
+\newglossaryentry{sample}{name={sample},
+  first={sample first use},description={an example}}
+\begin{document}
+\gls{sample}. Used? \ifglsused{sample}{Yes}{No}.
+
+{\glsfirst[preunset=local,prereset=global]{sample}.
+Used? \ifglsused{sample}{Yes}{No}.
 }
-
-

-

Then if you’re using fancyhdr you can set the page style to show the first and last -entry for the current page with: - - - -

-
-  \pagestyle{fancy}%
-  \lhead{\thepage}%
-  \lfoot{\glsxtrbookindexfirstmark}%
-  \cfoot{}%
-  \rfoot{\glsxtrbookindexlastmark}%
-
-

-

-

-

Top

3.2 glossary-longextra package

-

As from version 1.37, the glossaries-extra package comes with the supplementary -package glossary-longextra that provides additional styles, listed below, that use the -longtable environment. If you know that your glossary won’t span more than a page -and you need to use it in a context that’s incompatible with longtable, you can -instead setup these styles to use tabular instead. In order to do this you must -use -


\GlsLongExtraUseTabulartrue

-

-before the style is set. For example: - - - -

-
-\GlsLongExtraUseTabulartrue
-\setglossarystyle{long-name-desc}
-
-

or - - - -

-
-\GlsLongExtraUseTabulartrue
-\printunsrtglossary[style={long-name-desc}]
-
-

If you use this setting, you can change the default vertical alignment with: -


\glslongextraTabularVAlign

-

-The default definition is c. -

The column titles are formatted according to: -


\glslongextraHeaderFmt{text}

-

-which simply does \textbf{text} by default. -

The name column has the title given by \entryname and the column alignment is -given by: -


\glslongextraNameAlign

-

-which expands to l (left) by default. -

The symbol column (where applicable) has the title given by \symbolname and -the column alignment is given by: -


\glslongextraSymbolAlign

-

-which expands to c (centred) by default. -

The location list column (where applicable) has the title given by \pagelistname -and the column alignment is given by: -


\glslongextraLocationAlign

-

-which expands to - - - -

-
->{\raggedright}p{\glspagelistwidth}
-
-

by default. (Ragged-right paragraph, \glspagelistwidth is defined in glossary-long, -which is automatically loaded.) -

The description column has the title given by \descriptionname and the column -alignment is given by: -


\glslongextraDescAlign

-

-which expands to - - - -

-
->{\raggedright}p{\glsdescwidth}
-
-

by default. (Ragged-right paragraph, \glsdescwidth is defined in glossary-long, -which is automatically loaded.) -

Unlike the long styles provided by the base glossaries package, these new styles try -to determine the value of \glsdescwidth at the start of the glossary according to the -number of columns provided by the style. The calculations are performed by the -following commands: -


\glslongextraSetDescWidth

-

-This is used by the styles that have a name and description column. The value of -\glsdescwidth is computed as: -

-
-\glsdescwidth = \linewidth- 4\tabcolsep- W
-
-

where W is a guess at the width of the name column. This is first set to the width -of the name column header:

-
-\settowidth{width}{\glslongextraHeaderFmt\entryname} -
-
If any names in that column are larger than this, then you need to specify the widest -name using: -


\glslongextraSetWidest{widest name}

-

-or -


\glslongextraUpdateWidest{text}

-

-These work like the analogous commands \glssetwidest and \glsupdatewidest -provided with the alttree style, but in this case there’s no hierarchy. The default -widest name is obtained from the alttree top-level name if set, otherwise it’s empty, - - - -so you can use bib2gls’s set-widest option. If you have the entry counter enabled, -you will need to include this with the name for the extra material to be taken into -account. -

The name isn’t shown for child entries by default, but if you change this and you -want to use bib2gls’s set-widest option (for bib2gls v1.8+) then you need to -redefine: -


\glslongextraUpdateWidestChild{level}{text}

-

-This does nothing by default, but if you are including the child names then you need -to redefine this command: - - - -

-
-\renewcommand{\glslongextraUpdateWidestChild}[2]{%
- \glslongextraUpdateWidest{#2}%
+
+Used? \ifglsused{sample}{Yes}{No}.
+
+{\gls[preunset=local,prereset=global]{sample}.
+Used? \ifglsused{sample}{Yes}{No}.
 }
-
-

-

If you prefer to set an explicit width for the description column then you need to -redefine \glslongextraSetDescWidth. For example: - - - -

-
-\renewcommand{\glslongextraSetDescWidth}{%
-  \setlength{\glsdescwidth}{0.6\linewidth}%
+
+Used? \ifglsused{sample}{Yes}{No}.
+\end{document}
+
+Example 91: Combining prereset and preunset 📥🖹 📥🖺

+Example document illustrating the use of the prereset and preunset options.

+ Remember that \gls globally unsets the first use flag (unless changed with postunset), which counteracts prereset=global.

+

+noindex=booleandefault: true; initial: false
+ This is a boolean option that determines whether or not to suppress the normal indexing. For example, to prevent any locations in the front matter or back matter appearing in the glossary:
\frontmatter
+\GlsXtrSetDefaultGlsOpts{noindex}
+…\mainmatter
+\GlsXtrSetDefaultGlsOpts{noindex=false}
+…\backmatter
+\GlsXtrSetDefaultGlsOpts{noindex}
+
Note that if you are using auto-indexing (see §12), noindex=false will also suppress the auto-indexing.

+If you are using bib2gls, you may want to consider instead using format=glsignore to create an ignored location that ensures the entry is selected without adding a location to the location list. (Don’t use this method for the other indexing methods as you’ll end up with invisible locations with spurious commas in your location lists.)

+

+wrgloss=positioninitial: before
+ This option may take one of two values, before or after, which indicate whether the indexing should occur before or after the link text. The indexing creates a whatsit that can interfere with spacing or cause other problems. The other thing to consider is where the link text is long, such as a phrase or full form of an abbreviation, that may be split by a page break. You will need to decide if you want the indexing before the link text, so that the location is at the end of the page where the text starts, or if you want the indexing after the link text, so that the location is at the start of the next page where the text ends.

+This option corresponds to a conditional:

+\ifglsxtrinitwrglossbefore true\else false\fiinitial: \iftrue
+ The hook \glsxtrinitwrgloss sets this conditional according to whether or not the wrgloss attribute has been set to after:
\newcommand*{\glsxtrinitwrgloss}{% 
+ \glsifattribute{\glslabel}{wrgloss}{after}% 
+ {\glsxtrinitwrglossbeforefalse}% 
+ {\glsxtrinitwrglossbeforetrue}% 
 }
-
-

-

The styles that have a name, symbol and description, \glsdescwidth is set -with: -


\glslongextraSymSetDescWidth

-

-This first uses \glslongextraSetDescWidth and then subtracts 2\tabcolsep and -the width of the symbol column header from \glsdescwidth. This assumes that the -symbol column header is larger than any of the symbols. If this isn’t appropriate then -you can redefine this command. For example: - - - -

-
-\renewcommand{\glslongextraSymSetDescWidth}{%
-  \glslongextraSetDescWidth
-  \addtolength{\glsdescwidth}{-3cm}%
+

+

+thevalue=location
+ Sets the entry location to the given value instead of obtaining it from the location counter. If you are using hyperref you may also need to set the location’s hypertarget with theHvalue.

+

+This option is primarily intended for use with bib2gls to supply locations that don’t have an associated counter within the document, such as an external location. If you want to automatically add locations from a supplemental document to an entry’s location list, you can use the supplemental-locations resource option. See the bib2gls user manual for further details.
+

+For example, to index a location in a supplementary document:

\glsadd[thevalue={Suppl.\ 2.45}]{sample}
+
This will add “Suppl. 2.45” to the location list for the “sample” entry.

+

+Note that the value must conform to the indexing application’s location syntax. For makeindex, this is limited to Roman, roman, arabic, alph and Alph. With xindy, the location syntax must be defined in the xindy module (standard location syntaxes are supplied by default). There’s no restriction on the location syntax for bib2gls, although if it can’t deduce a numerical value it won’t be able to form a range.
+

+If you want a hyperlink to an external file, you can use:

+\glsxtrsupphypernumber{location}
+ as the formatting command for the location encap. For example:
\glsadd[thevalue=S.2,format=glsxtrsupphypernumber]{sample}
+
The path to the external file needs to be set in the externallocation category attribute.

+

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

+For example, if both sample-suppl-hyp.pdf and sample-suppl-main-hyp.pdf are in the same directory, then viewing sample-suppl-main-hyp.pdf in Evince will take you to the correct location in the linked document (when you click on the S.2 external link), but Okular will take you to the top of the first page of the linked document.

+This method can only be used where there is one external source for the designated category (identified by the externallocation attribute). For multiple sources, you need to use bib2gls v1.7+, which is the better method in general as it can automatically fetch the relevant locations from the aux files of the designated external documents without the need to explicitly use \glsadd.

+

+theHvalue=the-H-value
+ Sets the hypertarget corresponding to the location, which will be used if the format supports hyperlinks. This is analogous to hyperref’s \thecounter-name that provides the hypertarget for a reference to \thecounter-name.

+

+This option is primarily intended for use with the thevalue option.
+

+Unless you are using record=nameref, you must ensure that it’s possible to form the-H-value from h-prefixthevalue for some h-prefix (where thevalue is given by thevalue or the value of the location counter). This restriction is due to the limitations imposed by makeindex and xindy.

+

+prefix=link-prefix
+ This option locally redefines \glolinkprefix to link-prefix. If you are using \printunsrtglossary to redisplay a list (possibly in a different order) then you will need some way of changing the entry targets to avoid duplicate hyperlink targets. One way of achieving this is to redefine \glolinkprefix for the subsequent lists. You will then need to use the prefix option in commands like \gls to ensure that the hyperlink for the link text points to the desired list.

+

+This option is intended for use with the “unsrt” family of commands and \glsxtrcopytoglossary (which is used by bib2gls). The other indexing methods don’t support repeated lists.
+

+ +

+ +
+

5.2. Case Changing

+

+Case-changing commands, such as \Gls and \GLS, perform the conversion using commands provided by mfirstuc. The underlying commands provided by mfirstuc were redesigned in v2.08 to use the newer, better case-changing commands available with the LaTeX3 kernel. The base glossaries package v4.50 and glossaries-extra v1.49 were developed concurrently with mfirstuc v2.08 to take advantage of the new features. Version 1.49 of glossaries-extra was also developed concurrently with bib2gls v3.0 which, in turn, was developed alongside version 0.9.2.7b of the TeX parser library.

+It’s not possible to upload all these new versions at the same time, so it will be necessary to stagger their deployment. The new case-changing features will work best when all these new versions are installed. In the interim, a reduced feature set will be used.

+ +

+ +
+

5.2.1. Sentence Case Commands

+

+Both the base glossaries package and the glossaries-extra package provide sentence case commands, which convert the first letter to uppercase. These are provided for situations where an entry is referenced at the start of a sentence. Sentence-casing is also implemented when the attributes glossname or glossdesc are set to firstuc.

+The case conversion is performed using:

+\glssentencecase{text}
+ The default definition uses \makefirstuc, which is provided by the mfirstuc package. This was originally part of the base glossaries package, but was split into a separately distributed package in 2015. Back then, there was no expandable sentence-case command. There was also a problem with referencing entries where link text was encapsulated with a text-block command (which occurs, in particular, with acronym and abbreviation styles). The first letter of the text-block command’s argument needed to be obtained, which resulted in some trickery that proved problematic with UTF-8.

+The LaTeX3 kernel now provides a suitable expandable command that works with UTF-8, and mfirstuc v2.08+ provides \MFUsentencecase that directly interfaces with it. If an older version of mfirstuc is installed, glossaries v4.50+ and glossaries-extra v1.49+ will provide \MFUsentencecase. You can use this in expandable contents. For example:

\section{\MFUsentencecase{\glsentrytext{label}}}
+
However, in the above example, it’s simpler to do:
\section{\Glsfmttext{label}}
+
If hyperref has been loaded, \Glsfmttext{label} will now expand to:
\MFUsentencecase{\glsentrytext{label}}
+
in the PDF bookmark.

+Internally, \makefirstuc now uses \MFUsentencecase to perform the case conversion, but it still parses its argument to determine if it starts with cs{text}. This means that with mfirstuc v2.08+, you now don’t have to worry about UTF-8 characters occurring at the start of the text.

+For example, with mfirstuc v2.07 you would need to do something like:

\newglossaryentry{elite}{name={{é}lite},
+ description={...}}
+
in order for \Gls{elite} to work. Whereas with mfirstuc v2.08, you can now simply do:
\newglossaryentry{elite}{name={élite},
+ description={...}}
+
(As from glossaries v4.47, it should be possible to use UTF-8 characters in the label as well.)

+Whilst you can redefine \glssentencecase to use \MFUsentencecase directly (without using \makefirstuc as an intermediary), this may result in content being expanded that wouldn’t have been expanded previously. In particularly, if cs isn’t robust and expands to content that includes labels then the case-change can fail. You also won’t be able to take advantage of the blockers and mappings that are only recognised as such by \makefirstuc. If you use \MFUsentencecase instead, blockers and mappings will be treated as exclusions, which are likely to result in unwanted side-effects.

+Both \makefirstuc and \MFUsentencecase recognise exclusions. These are text-block commands which take a single mandatory argument that needs to be skipped. For example, in the following \glsadd{example} needs to be skipped:

\MFUsentencecase{\glsadd{example}some text}
+
Exclusions are identified with \MFUexcl. If you have an older version of mfirstuc, this won’t be defined, so glossaries v4.50+ and glossaries-extra v1.49+ provide:
+\glsmfuexcl{cs}
+ This will use \MFUexcl with mfirstuc v2.08+. With older versions, a definition will be provided that works with \MFUsentencecase, but exclusions won’t be recognised by \makefirstuc.

+As from glossaries v4.50, \glsadd will be identified as an exclusion (via \glsmfuexcl), but the optional argument will cause a problem if present. See the mfirstuc v2.08+ manual for a workaround. Note that commands such as \glsaddall and \glsaddeach aren’t identified as exclusions as they aren’t expected to occur in text that may require a case-change.

+With glossary entry references, there are commands that take a label as the argument, which shouldn’t have any case-changed applied, but also shouldn’t be skipped. For example:

\makefirstuc{\GLS{example} something}
+
In this situation, there shouldn’t be any case-change as \GLS already implements a case-change. This type of command is referred to as a blocker in the mfirstuc manual, as it indicates a command that should prevent any case-change if it’s encountered at the start of the text. Blockers are identified with \MFUblocker. If you have an older version of mfirstuc, this won’t be defined, so glossaries v4.50+ and glossaries-extra v1.49+ provide:
+\glsmfublocker{cs}
+ This will use \MFUblocker with mfirstuc v2.08+. With older versions, it will simply use \glsmfuexcl which will instead identify the command as an exclusion and won’t be recognised by \makefirstuc. See the mfirstuc v2.08+ manual for further information about blockers.

+As from glossaries v4.50+, commands like \GLS will be identified as blockers using \glsmfublocker, and glossaries-extra now identifies similar commands, such as \rGLS as blockers.

+Finally, there are mappings. These are commands that should be substituted with another command, which is expected to perform the case-change. For example:

\makefirstuc{\gls{example} something}
+
This shouldn’t skip or block \gls but instead should convert the text to:
\Gls{example} something
+
This is implemented by adding a mapping from \gls to \Gls. Mappings are added using \MFUaddmap. If you have an older version of mfirstuc, this won’t be defined, so glossaries v4.50+ and glossaries-extra v1.49+ provide:
+\glsmfuaddmap{cs1}{cs2}
+ This will use \MFUaddmap with mfirstuc v2.08+. With older versions, it will simply use \glsmfuexcl which will instead identify the command as an exclusion and won’t be recognised by \makefirstuc. See the mfirstuc v2.08+ manual for further information about mappings.

+As from glossaries v4.50+, commands like \gls will be mapped to the appropriate sentence case command using \glsmfuaddmap, and glossaries-extra now identifies similar mappings, such as \rgls mapped to \rGls.

+In order to integrate the full set of features provided by mfirstuc v2.08+, you will need both glossaries v4.50+ and glossaries-extra v1.49+.

+ +

+ +
+

5.2.2. Lower Case

+

+

+\glslowercase{text}
+ This is defined by glossaries v4.50+ to use the LaTeX3 command to convert to lowercase. If an older version of glossaries is present, then this command will be provided by glossaries-extra but it will be defined to use \MakeTextLowercase instead. This command is primarily provided for use with small caps styles to convert an abbreviation to lowercase, but isn’t actually used anywhere by default.

+ +

+ +
+

5.2.3. Upper Case

+

+

+\glsuppercase{text}
+ This is defined by glossaries v4.50+ to use the LaTeX3 command to convert to uppercase (all caps). If an older version of glossaries is present, then this command will be provided by glossaries-extra but it will be defined to just use \mfirstucMakeUppercase, which is provided by mfirstuc. This command is used by all caps commands such as \GLSxtrusefield.

+ +

+ +
+

5.2.4. Title Case

+

+

+\glscapitalisewords{content}
+ This is defined by glossaries v4.48 to use \capitalisewords to convert to title case. If you experience any errors with title case commands, such as \glsentrytitlecase, or attributes such as glossdesc then try redefining this command to use \capitalisefmtwords* instead. See the mfirstuc manual for further details.

+ +

+ +
+

5.3. Entries in Sectioning Titles, Headers, Captions and Contents

+

+The glossaries user manual cautions against using commands like \gls in chapter or section titles. The principle problems are: +

    +
  • if you have a table of contents, the first use flag will be unset in the contents rather than later in the document;

    +

  • 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);

    +

  • if the page style in use adds the chapter or section title to the header and attempts to convert it to uppercase, the entry label (in the argument of \gls etc) will be converted to uppercase and the entry won’t be recognised;

    +

  • if you use hyperref, commands like \gls can’t be expanded to a simple string and only the label will appear in the PDF bookmark (with a warning from hyperref);

    +

  • if you use hyperref, you will end up with nested hyperlinks in the table of contents. +
+ Similar problems can also occur with captions (except for the page header and bookmark issues).

+The glossaries-extra package tries to resolve the header problem by modifying \markright, \markboth and \@starttoc. If this causes unwanted side-effects, you can restore their former definitions using:

+\glsxtrRevertMarks
+ This will revert \markright, \markboth and \@starttoc back to the definitions in effect when glossaries-extra was loaded. Alternatively, you can use:
+\glsxtrRevertTocMarks
+ This will only revert \@starttoc.

+If you use \glsxtrRevertMarks or \glsxtrRevertTocMarks, you will need to employ the simplistic approach, described in §5.3.1, which is the method recommended by the glossaries user manual. Otherwise, you can use the commands described in §5.3.2, which provide a better solution.

+ +

+ +
+

5.3.1. Simplistic Approach

+

+To get around all these problems, the glossaries user manual recommends using the expandable non-hyperlink commands, such as \glsentrytext (for regular entries) or \glsentryshort (for abbreviations). This is the simplest solution, but doesn’t allow for special formatting that’s applied to the entry through commands like \glstext or \glsxtrshort.

+For example:

\documentclass{article}
+
+\usepackage[colorlinks]{hyperref}
+\usepackage{glossaries-extra}
+
+\glsdefpostlink{general}{\glsxtrpostlinkAddDescOnFirstUse}
+
+\newglossaryentry{sample}{name={sample},
+ description={an example}}
+\newglossaryentry{alpha}{name={\ensuremath{\alpha}},description={alpha}}
+
+\begin{document}
+\tableofcontents
+\section{\texorpdfstring{\Glsentrytext{sample} 
+ and \glsentrytext{alpha}}{Sample and alpha}}
+
+First use: \gls{sample} and \gls{alpha}.
+
+Next use: \gls{sample} and \gls{alpha}.
+
+\printunsrtglossary
+\end{document}
+
+Example 92: References in section headings (simplistic approach) 📥🖹 📥🖺

+Example document that uses a simplistic approach to referencing entries in section titles.

+ This solves some problems: it avoids nested links in the table of contents, the first use flag isn’t prematurely unset and the PDF bookmarks has a reasonable substitution, but it still isn’t a complete solution as the above document will fail if the page style is changed to headings and a page break is inserted before the section (after \tableofcontents), which will lead to the error:
Glossary entry `SAMPLE' has not been defined.
+
This is because the case-change applied to the header converts the label “sample” to “SAMPLE”, which doesn’t correspond to a defined entry. (This can now be avoided with mfirstuc v2.08+.)

+If the case conversion is applied by, then the case-change can be prevented by encapsulating the label with \NoCaseChange, but this ends up quite complicated. This is actually what the commands describe in §5.3.2 do when they are in a heading. This allows for older versions of mfirstuc that don’t recognise exclusions. See §5.2 for further details.

+

+The \NoCaseChange command was originally provided by the textcase package to prevent \MakeTextUppercase from applying a case-change. The functionality of the textcase package has now been absorbed into the LaTeX kernel, which means that as from 2022, textcase is deprecated and \NoCaseChange is defined by the kernel.
+

+ +

+ +
+

5.3.2. New Commands Designed for Chapter/Section Headings or Captions

+

+This section is irrelevant if you use \glsxtrRevertMarks to restore the definitions of \markright, \markboth and \@starttoc. If you use \glsxtrRevertTocMarks, then this section is only applicable to \markright and \markboth.

+The commands listed here are provided for use within captions or section headings. They are designed to overcome some of the problems illustrated in the previous section. Note that they only have a single argument, the entry label. There are no optional arguments. Below, “header” refers to page header text added with \markright or \markboth, and “contents” refers to the table of contents or any other “list of” that uses \@starttoc, such as the list of figures.

+Each command \glsfmtfield (such as \glsfmttext or \glsfmtshort) behaves like an analogous \glsfield or \glsxtrfield command (such as \glstext or \glsxtrshort) but with the options noindex and hyper=false and no insert. When they occur within a header, they are protected from having any case-change applied (which will interfere with the entry label). Since this means they won’t appear in all caps in the header, the headuc attribute may be set to use the all caps \GLSfield or \GLSxtrfield instead (such as \GLStext or \GLSxtrshort).

+There is currently only support for the name, text, plural, first, firstplural, short, shortplural, long, and longplural fields, and also limited support for the full form of abbreviations. For other fields, you will need to follow the recommendation of the glossaries manual (as discussed above in §5.3.1).

+The previous example can be rewritten as follows:

\documentclass{article}
+
+\usepackage[colorlinks]{hyperref}
+\usepackage{glossaries-extra}
+
+\glsdefpostlink{general}{\glsxtrpostlinkAddDescOnFirstUse}
+
+\newglossaryentry{sample}{name={sample},description={an example}}
+\newglossaryentry{alpha}{name={\ensuremath{\alpha}},
+ description={alpha}}
+
+\begin{document}
+\tableofcontents
+\section{\Glsfmttext{sample} and \glsfmttext{alpha}}
+
+First use: \gls{sample} and \gls{alpha}.
+
+Next use: \gls{sample} and \gls{alpha}.
+
+\printunsrtglossary
+\end{document}
+
+Example 93: References in section headings using \glsfmttext 📥🖹 📥🖺

+Example document that references entries in section titles.

+ Note that this still results in “Token not allowed in a PDF string” warnings from hyperref. This is due to the maths shift and \alpha, and is something that would also occur if the section title explicitly contained $\alpha$. If this is likely to happen, the issue can be solved by placing \texorpdfstring within the field value. For example:
\glsnoexpandfields
+\newglossaryentry{alpha}{description={alpha},
+ name={\texorpdfstring{\ensuremath{\alpha}}{alpha}}}
+
Note the need to prevent field expansion with \glsnoexpandfields, otherwise \texorpdfstring will be prematurely expanded while the entry is being defined.

+The options noindex and hyper=false are hard-coded when the commands listed below, such as \glsfmtshort, occur in the header or contents, but within the actual section title or caption in the document text, those options are obtained from:

+\glsxtrtitleopts
+ This simply expands to the option list. For example, you may actually want a hyperlink and indexing to occur in the document body, in which case redefine \glsxtrtitleopts to do nothing:
\documentclass{article}
+
+\usepackage[colorlinks]{hyperref}
+\usepackage{glossaries-extra}
+
+\pagestyle{headings}
+\glssetcategoryattribute{general}{headuc}{true}
+\glsdefpostlink{general}{\glsxtrpostlinkAddDescOnFirstUse}
+
+\newglossaryentry{sample}{name={sample},description={an example}}
+\renewcommand{\glsxtrtitleopts}{}
+
+\begin{document}
+\section{\Glsfmttext{sample}}
+First use: \gls{sample}.
+Next use: \gls{sample}.
+\printunsrtglossary
+\end{document}
+
+Example 94: Reference with hyperlink in section headings 📥🖹 📥🖺

+Example document that references an entry with a hyperlink in a section title.

+

+

+

+\glsfmtshort{entry-label}
+ This normally behaves like \glsxtrshort but expands to just \glsentryshort in PDF bookmarks and is adjusted when appearing in the header or contents.

+

+\Glsfmtshort{entry-label}
+ This normally behaves like \Glsxtrshort but expands to:
\MFUsentencecase{\glsentryshort{entry-label}}
+
in PDF bookmarks and is adjusted when appearing in the header or contents.

+

+\GLSfmtshort{entry-label}
+ This normally behaves like \GLSxtrshort but expands to just \glsentryshort in PDF bookmarks and is adjusted when appearing in the header or contents.

+

+

+\pglsfmtshort[options]{entry-label}[insert]modifiers: * + alt-mod

+

+
+ As \glsfmtshort but inserts the prefix field and separator, if the prefix value is set and non-empty. Provided for use with glossaries-prefix.

+

+\Pglsfmtshort[options]{entry-label}[insert]modifiers: * + alt-mod

+

+
+ As \pglsfmtshort but sentence case. Note the initial “P” in the command name, which matches \Pgls (similarly for the other prefix sentence case commands).

+

+\PGLSfmtshort[options]{entry-label}[insert]modifiers: * + alt-mod

+

+
+ As \pglsfmtshort but all caps.

+

+

+\glsfmtshortpl{entry-label}
+ This normally behaves like \glsxtrshortpl but expands to just \glsentryshortpl in PDF bookmarks and is adjusted when appearing in the header or contents.

+

+\Glsfmtshortpl{entry-label}
+ This normally behaves like \Glsxtrshortpl but expands to:
\MFUsentencecase{\glsentryshortpl{entry-label}}
+
in PDF bookmarks and is adjusted when appearing in the header or contents.

+

+\GLSfmtshortpl{entry-label}
+ This normally behaves like \GLSxtrshortpl but expands to just \glsentryshortpl in PDF bookmarks and is adjusted when appearing in the header or contents.

+

+

+\pglsfmtshortpl[options]{entry-label}[insert]modifiers: * + alt-mod

+

+
+ As \glsfmtshortpl but inserts the prefixplural field and separator, if the prefixplural value is set and non-empty. Provided for use with glossaries-prefix.

+

+\Pglsfmtshortpl[options]{entry-label}[insert]modifiers: * + alt-mod

+

+
+ As \pglsfmtshortpl but sentence case.

+

+\PGLSfmtshortpl[options]{entry-label}[insert]modifiers: * + alt-mod

+

+
+ As \pglsfmtshortpl but all caps.

+

+

+\glsfmtlong{entry-label}
+ This normally behaves like \glsxtrlong but expands to just \glsentrylong in PDF bookmarks and is adjusted when appearing in the header or contents.

+

+\Glsfmtlong{entry-label}
+ This normally behaves like \Glsxtrlong but expands to:
\MFUsentencecase{\glsentrylong{entry-label}}
+
in PDF bookmarks and is adjusted when appearing in the header or contents.

+

+\GLSfmtlong{entry-label}
+ This normally behaves like \GLSxtrlong but expands to just \glsentrylong in PDF bookmarks and is adjusted when appearing in the header or contents.

+

+

+\pglsfmtlong[options]{entry-label}[insert]modifiers: * + alt-mod
+ As \glsfmtlong but inserts the prefixfirst field and separator, if the prefixfirst value is set and non-empty. Provided for use with glossaries-prefix.

+

+\Pglsfmtlong[options]{entry-label}[insert]modifiers: * + alt-mod

+

+
+ As \pglsfmtlong but sentence case.

+

+\PGLSfmtlong[options]{entry-label}[insert]modifiers: * + alt-mod

+

+
+ As \pglsfmtlong but all caps.

+

+

+\glsfmtlongpl{entry-label}
+ This normally behaves like \glsxtrlongpl but expands to just \glsentrylongpl in PDF bookmarks and is adjusted when appearing in the header or contents.

+

+\Glsfmtlongpl{entry-label}
+ This normally behaves like \Glsxtrlongpl but expands to:
\MFUsentencecase{\glsentrylongpl{entry-label}}
+
in PDF bookmarks and is adjusted when appearing in the header or contents.

+

+\GLSfmtlongpl{entry-label}
+ This normally behaves like \GLSxtrlongpl but expands to just \glsentrylongpl in PDF bookmarks and is adjusted when appearing in the header or contents.

+

+

+\pglsfmtlongpl[options]{entry-label}[insert]modifiers: * + alt-mod

+

+
+ As \glsfmtlongpl but inserts the prefixfirstplural field and separator, if the prefixfirstplural value is set and non-empty. Provided for use with glossaries-prefix.

+

+\Pglsfmtlongpl[options]{entry-label}[insert]modifiers: * + alt-mod

+

+
+ As \pglsfmtlongpl but sentence case.

+

+\PGLSfmtlongpl[options]{entry-label}[insert]modifiers: * + alt-mod

+

+
+ As \pglsfmtlongpl but all caps.

+

+The full form is slightly different as it doesn’t correspond to an individual field but instead is formed from a combination of the short and long fields (the order depending on the abbreviation style). Since it’s too complicated to simply expand to the appropriate style, a simple expandable command is provided for the PDF bookmarks:

+\glspdffmtfull{entry-label}
+ This just expands to the long form followed by the short form in parentheses:
\newcommand*{\glspdffmtfull}[1]{\glsentrylong{#1}
+  (\glsentryshort{#1})}
+
You will need to redefine this if you require the short form first. There is an analogous command for the plural:
+\glspdffmtfullpl{entry-label}
+ This has a similar definition to \glspdffmtfull but uses \glsentrylongpl and \glsentryshortpl.

+

+\glsfmtfull{entry-label}
+ This normally behaves like \glsxtrfull but expands to just \glspdffmtfull in PDF bookmarks and is adjusted when appearing in the header or contents.

+

+\Glsfmtfull{entry-label}
+ This normally behaves like \Glsxtrfull but expands to:
\MFUsentencecase{\glspdffmtfull{entry-label}}
+
in PDF bookmarks and is adjusted when appearing in the header or contents.

+

+\GLSfmtfull{entry-label}
+ This normally behaves like \GLSxtrfull but expands to just \glspdffmtfull in PDF bookmarks and is adjusted when appearing in the header or contents.

+

+

+\glsfmtfullpl{entry-label}
+ This normally behaves like \glsxtrfullpl but expands to just \glspdffmtfullpl in PDF bookmarks and is adjusted when appearing in the header or contents.

+

+\Glsfmtfullpl{entry-label}
+ This normally behaves like \Glsxtrfullpl but expands to:
\MFUsentencecase{\glspdffmtfullpl{entry-label}}
+
in PDF bookmarks and is adjusted when appearing in the header or contents.

+

+\GLSfmtfullpl{entry-label}
+ This normally behaves like \GLSxtrfull but expands to just \glspdffmtfull in PDF bookmarks and is adjusted when appearing in the header or contents.

+

+

+\glsfmtname{entry-label}
+ This normally behaves like \glsname but expands to just \glsentryname in PDF bookmarks and is adjusted when appearing in the header or contents.

+

+\Glsfmtname{entry-label}
+ This normally behaves like \Glsname but expands to:
\MFUsentencecase{\glsentryname{entry-label}}
+
in PDF bookmarks and is adjusted when appearing in the header or contents.

+

+\GLSfmtname{entry-label}
+ This normally behaves like \GLSname but expands to just \glsentryname in PDF bookmarks and is adjusted when appearing in the header or contents.

+

+

+\glsfmttext{entry-label}
+ This normally behaves like \glstext but expands to just \glsentrytext in PDF bookmarks and is adjusted when appearing in the header or contents.

+

+\Glsfmttext{entry-label}
+ This normally behaves like \Glstext but expands to:
\MFUsentencecase{\glsentrytext{entry-label}}
+
in PDF bookmarks and is adjusted when appearing in the header or contents.

+

+\GLSfmttext{entry-label}
+ This normally behaves like \GLStext but expands to just \glsentrytext in PDF bookmarks and is adjusted when appearing in the header or contents.

+

+

+\glsfmtplural{entry-label}
+ This normally behaves like \glsplural but expands to just \glsentryplural in PDF bookmarks and is adjusted when appearing in the header or contents.

+

+\Glsfmtplural{entry-label}
+ This normally behaves like \Glsplural but expands to:
\MFUsentencecase{\glsentryplural{entry-label}}
+
in PDF bookmarks and is adjusted when appearing in the header or contents.

+

+\GLSfmtplural{entry-label}
+ This normally behaves like \GLSplural but expands to just \glsentryplural in PDF bookmarks and is adjusted when appearing in the header or contents.

+

+

+\glsfmtfirst{entry-label}
+ This normally behaves like \glsfirst but expands to just \glsentryfirst in PDF bookmarks and is adjusted when appearing in the header or contents.

+

+\Glsfmtfirst{entry-label}
+ This normally behaves like \Glsfirst but expands to:
\MFUsentencecase{\glsentryfirst{entry-label}}
+
in PDF bookmarks and is adjusted when appearing in the header or contents.

+

+\GLSfmtfirst{entry-label}
+ This normally behaves like \GLSfirst but expands to just \glsentryfirst in PDF bookmarks and is adjusted when appearing in the header or contents.

+

+

+\glsfmtfirstpl{entry-label}
+ This normally behaves like \glsfirstplural but expands to just \glsentryfirstplural in PDF bookmarks and is adjusted when appearing in the header or contents.

+

+\Glsfmtfirstpl{entry-label}
+ This normally behaves like \Glsfirstplural but expands to:
\MFUsentencecase{\glsentryfirstplural{entry-label}}
+
in PDF bookmarks and is adjusted when appearing in the header or contents.

+

+\GLSfmtfirstpl{entry-label}
+ This normally behaves like \GLSfirstplural but expands to just \glsentryfirstplural in PDF bookmarks and is adjusted when appearing in the header or contents.

+ +

+ +
+

5.3.3. Advanced Commands

+

+

+This section is intended for advanced users and package developers.
+

+The commands described here are irrelevant if you use \glsxtrRevertMarks to restore the definitions of \markright, \markboth and \@starttoc. If you use \glsxtrRevertTocMarks, then this section is only applicable to \markright and \markboth.

+If you need to know whether or not some code is inside a header or contents list, you can use:

+\glsxtrifinmark{true}{false}
+ This does true if the command occurs within \markright, \markboth or \@starttoc otherwise does false.

+If you need to know whether or not some code is inside a contents list (but not the header), you can use:

+\glsxtrifintoc{true}{false}
+ This does true if the command occurs within \@starttoc otherwise it does false. (The modified definition of \@starttoc sets \glsxtrifintoc to \@firstoftwo at the start and to \@secondoftwo at the end.)

+If you need to know whether or not some code is in the PDF bookmarks or heading, you can use:

+\glsxtrtitleorpdforheading{title}{PDF bookmarks}{heading}
+ This does the applicable argument depending on whether the command occurs within a title/caption or PDF bookmark or heading.

+If this command occurs within the toc file, it will do its heading argument but if \glsxtrtitleorpdforheading expands while it’s being written to the toc file, then it will expand to title. This can be illustrated in the following document:

\documentclass{report}
+\usepackage{lipsum}
+\usepackage{hyperref}
+\usepackage{glossaries-extra}
+\pagestyle{headings}
+\begin{document}
+\tableofcontents
+\chapter{\glsxtrtitleorpdforheading{Title}{PDF}{Heading}
+\glsxtrifinmark{in mark}{not in mark}}
+\lipsum
+\chapter{\protect\glsxtrtitleorpdforheading{Title}{PDF}{Heading}
+\protect\glsxtrifinmark{in mark}{not in mark}}
+\lipsum
+\end{document}
+
In the first case, \glsxtrtitleorpdforheading expands as it’s being written to the toc file, so it expands to “Title”. In the second case, \glsxtrtitleorpdforheading is protected so that command is written to the toc file. On the next LaTeX, when the table of contents is displayed, this command will expand to “Heading”, because it’s in the toc file. Similarly, in the first case, \glsxtrifinmark will expand to “not in mark” as it’s written to the toc file, but in the second case it’s expansion is prevented, so it will expand to “in mark” in the table of contents.

+If gettitlestring has been loaded (used by nameref to provide \nameref) then adjustments for both \glsxtrtitleorpdforheading and \glsxtrifinmark will be added to \GetTitleStringDisableCommands, but bear in mind that you will need to use the following for it to have an effect:

\GetTitleStringSetup{expand}
+

+The commands described in §5.3.2, such as \glsfmtshort, are essentially defined as:

\texorpdfstring
+ {\glsxtrtitlefield{entry-label}}% title
+ {\glsentryfield{entry-label}}% bookmark
+
If \texorpdfstring isn’t defined, then the definition is:
\glsxtrtitlefield{entry-label}
+
For example, \glsfmtshort is defined as (with hyperref):
\newcommand*{\glsfmtshort}[1]{%
+ \texorpdfstring{\glsxtrtitleshort{#1}}{\glsentryshort{#1}}%
 }
-
-

or - - - -

-
-\renewcommand{\glslongextraSymSetDescWidth}{%
-  \setlength{\glsdescwidth}{.5\linewidth}%
+
This ensures that \glsfmtshort expands to just \glsentryshort within the PDF bookmarks. Provided the field value doesn’t contain any problematic commands, this allows the actual value to be added to the bookmarks.

+Unfortunately the case-changing commands can’t expand and therefore aren’t appropriate for the bookmarks (which need to be a PDF string). This means that the sentence case and all caps commands also use the unmodified field value for the bookmark. For example, \Glsfmtshort is defined as:

\newcommand*{\Glsfmtshort}[1]{%
+ \texorpdfstring{\Glsxtrtitleshort{#1}}{\glsentryshort{#1}}%
 }
-
-

-

For the styles that have a name, description and location column, \glsdescwidth -is set using: -


\glslongextraLocSetDescWidth

-

-This uses \glslongextraSetDescWidth and then subtracts 2\tabcolsep and -\glspagelistwidth from \glsdescwidth. You can redefine this command to set -both \glsdescwidth and \glspagelistwidth if appropriate. -

For the styles that have a name, description, symbol and location column, -\glsdescwidth is set using: -


\glslongextraSymLocSetDescWidth

-

-This uses \glslongextraSymSetDescWidth and then subtracts 2\tabcolsep and -\glspagelistwidth from \glsdescwidth. Again, you can redefine this command to -explicitly set both lengths. -

In all cases, the top-level name is formatted according to: -


\glslongextraNameFmt{label}

-

-This does

-
-\glsentryitem{label}\glstarget{label}{\glossentryname{label}} -
-
which includes the entry counter (if enabled), the target and the post-name -link. -

The top-level description is formatted according to: -


\glslongextraDescFmt{label}

-

-This does \glossentrydesc{label} followed by the post-description hook. -

The styles that have a symbol column format the symbol using: -


\glslongextraSymbolFmt{label}

-

-This just does \glossentrysymbol{label}. -

The styles that have a location list column format the list using: -


\glslongextraLocationFmt{label}{locations}

-

-This just does ⟨locations⟩ and ignores the label. - - - -

The child entries have their name formatted according to: -


\glslongextraSubNameFmt{level}{label}

-

-where ⟨level⟩ is the hierarchical level. This defaults to:

-
-\glssubentryitem{label}\glstarget{label}{\strut} -
-
This includes the sub-entry counter (if enabled) and the target but doesn’t show the -name. The child description is formatted according to: -


\glslongextraSubDescFmt{level}{label}

-

-which defaults to just \glslongextraDescFmt{label} -

The child symbol is formatted (where appropriate) according to: -


\glslongextraSubSymbolFmt{level}{label}

-

-This just does \glslongextraSymbolFmt{label} by default. -

The styles that have a location list column format the list for child entries -using: -


\glslongextraSubLocationFmtlevel{label}{locations}

-

-This just does ⟨locations⟩ and ignores the level and label. -

The letter group headings are formatted according to: -


\glslongextraGroupHeading{n}{label}

-

-which does nothing by default. The first argument ⟨n⟩ is the number of columns in the -table. The second argument ⟨label⟩ is the group label (not the title, although they may -happen to be the same). -

This can be redefined to show the group heading. For example: - - - -

-
-\renewcommand*{\glslongextraGroupHeading}[2]{%
-  \glsxtrgetgrouptitle{#2}{\thisgrptitle}%
-  \glslongextraHeaderFmt{\thisgrptitle}%
-  \tabularnewline
-  \noalign{\vskip\normalbaselineskip}%
+

+The \glsxtrtitlefield set of commands all default to the corresponding \glstext-like command with the options given by \glsxtrtitleopts and an empty insert final argument. These title commands are redefined by \glsxtrmarkhook to the corresponding \glsxtrheadfield command. These “head” commands use \NoCaseChange to prevent interference from page headers that convert to all caps (which can inappropriately convert the entry label to all caps). Instead, the headuc attribute needs to be set to true to use the appropriate all caps command. A shortcut command is provided to test for this attribute:

+\glsxtrifheaduc{entry-label}{true}{false}
+ This is defined as:
\newcommand*{\glsxtrifheaduc}[3]{%
+ \glsxtrifintoc{#3}{\glsifattribute{#1}{headuc}{true}{#2}{#3}}%
 }
-
-

This ignores the first argument and just puts the group title in the first column -formatted according to \glslongextraHeaderFmt (to match the column -header). -

Remember that you can also adjust the styles through category attributes. The -name column’s title is given by \entryname, the description column’s title is given by -\descriptionname and (where present) the symbol column’s title is given by -\symbolname, as for the other long styles that have headers. -

-
long-name-desc This is like the longragged-booktabs style but doesn’t show the - location list (regardless of the nonumberlist option). The name is shown in - the first column and the description in the second. -

The symbol is not displayed. The header row is produced with: -


\glslongextraNameDescHeader

-

- This essentially uses the same code as for longragged-booktabs but makes it - easier to adjust the header without having to define a new style. This is defined - as: - - - -

-
-     \glslongextraNameDescTabularHeader\endhead
-     \glslongextraNameDescTabularFooter\endfoot
-
-

where: -


\glslongextraNameDescTabularHeader

-

- sets up the header and -


\glslongextraNameDescTabularFooter

-

- sets up the footer. If you have setup the tabular version of this style then the - above two commands are used at the start and end of the tabular environment - (and \glslongextraNameDescHeader isn’t used). -

For example, to simply remove the header and footer (for the default longtable - version of the style): - - - -

-
-     \renewcommand{\glslongextraNameDescHeader}{}
-
-

Or to change the name alignment to centred: - - - -

-
-     \renewcommand{\glslongextraNameAlign}{c}
-
-

-

-
long-name-desc-loc This is like the long-name-desc style but has a third column for - the location list. The longtable header is given by: -


\glslongextraNameDescLocationHeader

-

- which similarly defined in terms of the commands used for the tabular - version: -


\glslongextraNameDescLocationTabularHeader

-

- and -


\glslongextraNameDescLocationTabularFooter

-

-

-
long-desc-name This is like the long-name-desc style but swaps the columns. Note - that if the entry counter is displayed it will appear at the start of the - second column by default. The longtable header is formatted according - to: -


\glslongextraDescNameHeader

-

- which similarly defined in terms of the commands used for the tabular - version: -


\glslongextraDescNameTabularHeader

-

- and -


\glslongextraDescNameTabularFooter

-

-

-
long-loc-desc-name This has three columns containing the location list, - description and name. The longtable header is formatted according - to: - - - -


\glslongextraLocationDescNameHeader

-

- which similarly defined in terms of the commands used for the tabular - version: -


\glslongextraLocationDescNameTabularHeader

-

- and -


\glslongextraLocationDescNameTabularFooter

-

-

-
long-name-desc-sym This is has three columns, with the name in the first, the - description in the second and the symbol in the third. -

The longtable header row is produced with: -


\glslongextraNameDescSymHeader

-

- which similarly defined in terms of the commands used for the tabular - version: -


\glslongextraNameDescSymTabularHeader

-

- and -


\glslongextraNameDescSymTabularFooter

-

-

-
long-name-desc-sym-loc This is has four columns, with the name in the first, the - description in the second, the symbol in the third and the location list in the - fourth. -

The longtable header row is produced with: -


\glslongextraNameDescSymLocationHeader

-

- which similarly defined in terms of the commands used for the tabular - version: -


\glslongextraNameDescSymLocationTabularHeader

-

- and -


\glslongextraNameDescSymLocationTabularFooter

-

- - - -

-
long-name-sym-desc This is like the long-name-desc-sym but the second and third - column are swapped. The longtable header row is given by: -


\glslongextraNameSymDescHeader

-

- which similarly defined in terms of the commands used for the tabular - version: -


\glslongextraNameSymDescTabularHeader

-

- and -


\glslongextraNameSymDescTabularFooter

-

-

-
long-name-sym-desc-loc This is like the long-name-desc-sym-loc but the second and - third column are swapped. The longtable header row is given by: -


\glslongextraNameSymDescLocationHeader

-

- which similarly defined in terms of the commands used for the tabular - version: -


\glslongextraNameSymDescLocationTabularHeader

-

- and -


\glslongextraNameSymDescLocationTabularFooter

-

-

-
long-sym-desc-name This has the symbol in the first column, the description in the - second and the name in the third. The longtable header row is given - by: -


\glslongextraSymDescNameHeader

-

- which similarly defined in terms of the commands used for the tabular - version: -


\glslongextraSymDescNameTabularHeader

-

- and -


\glslongextraSymDescNameTabularFooter

-

- - - -

-
long-loc-sym-desc-name This has the location list in the first column, symbol in the - second column, the description in the third and the name in the fourth. The - longtable header row is given by: -


\glslongextraLocationSymDescNameHeader

-

- which similarly defined in terms of the commands used for the tabular - version: -


\glslongextraLocationSymDescNameTabularHeader

-

- and -


\glslongextraLocationSymDescNameTabularFooter

-

-

-
long-desc-sym-name This has the description in the first column, the symbol in the - second and the name in the third. The longtable header row is given - by: -


\glslongextraDescSymNameHeader

-

- which similarly defined in terms of the commands used for the tabular - version: -


\glslongextraDescSymNameTabularHeader

-

- and -


\glslongextraDescSymNameTabularFooter

-

-

-
long-loc-desc-sym-name This has the location list in the first column, the description - in the second column, the symbol in the third and the name in the fourth. The - longtable header row is given by: -


\glslongextraLocationDescSymNameHeader

-

- which similarly defined in terms of the commands used for the tabular - version: -


\glslongextraLocationDescSymNameTabularHeader

-

- and - - - -


\glslongextraLocationDescSymNameTabularFooter

-

-

-
-

-

-

Top

3.3 glossary-topic package

-

As from version 1.40, the glossaries-extra package comes with the supplementary -package glossary-topic that provides glossary styles designed for hierarchical glossaries -where the top-level entries are topic titles. This package automatically loads the -multicols package. If the glossary-tree package is also loaded then commands like -\glssetwidest can be used on these styles in much the same way as for the alttree -style. If a widest value isn’t set then these styles behave more like the tree -style. -

-topic
This style is similar to the tree style but the indentation doesn’t start until - the second sub-item level. The top-level entries have the name displayed - in a larger font with the description following in a new paragraph. This - style doesn’t support the nogroupskip setting. -
-topicmcols
This style is like the topic style but the sub-entries are placed inside a - multicols environment. The environment name is supplied in the value of the - command: -


\glstopicColsEnv

-

- You can change this to the starred form. For example: - - - -

-
-     \renewcommand{\glstopicColsEnv}{multicols*}
-
-

The number of columns is given by the command: -


\glstopicCols

-

- The default value is 2.

-

Both styles use the following commands. -


\glstopicParIndent

-

-This command is a length that’s used for the paragraph indentation in any -multi-paragraph description for top-level entries, but not for the first paragraph (at -the start of the description) which isn’t indented. -


\glstopicSubIndent

-

-This command is a length that’s used to calculate the hanging indentation for -sub-entries. The level 1 sub-entries don’t indent the name. Level n sub-entries have -the name indented by (n- 1)×\glstopicSubIndent. The hanging indent depends on -whether or not a widest name has been set for the level. -

As from v1.46, there is also a length for additional indentation used -in the second paragraph onwards for child entries with multi-paragraph -descriptions: -


\glstopicSubItemParIndent

-

-This is initialised to \parindent when glossary-topic is loaded. -


\glstopicInit

-

-Hook used at the start of the glossary. Does nothing by default. -

Although the styles don’t support letter groups by default, if you have many -topics (top-level entries) and you feel that it would help the reader to divide them up -into headed letter groups, you can redefine: -


\glstopicGroupHeading{group label}

-

-This does nothing by default. If you want to redefine it, you can fetch the -title corresponding to the group label with \glsxtrgetgrouptitle. For -example: - - - -

-
-\renewcommand*{\glstopicGroupHeading}[1]{%
-  \glsxtrgetgrouptitle{#1}{\thisgrptitle}%
-  \section*{\thisgrptitle}%
+
Since the header commands also end up in the contents, where the all caps conversion should not be applied, the definition includes \glsxtrifintoc to skip the check in the contents.

+

+\glsxtrtitleshort{entry-label}
+ The normal behaviour of \glsfmtshort. This is redefined by \glsxtrmarkhook to \glsxtrheadshort. The default is:
\glsxtrshort[noindex,hyper=false]{entry-label}[]
+
(This is performed indirectly via an internal command that ensures that \glsxtrtitleopts is expanded before being passed in the optional argument.)

+

+\glsxtrheadshort{entry-label}
+ Used to display the short form in the page header. This is defined as:
\newcommand*{\glsxtrheadshort}[1]{%
+ \protect\NoCaseChange
+ {%
+   \glsifattribute{#1}{headuc}{true}%
+   {%
+     \GLSxtrshort[noindex,hyper=false]{#1}[]%
+   }%
+   {%
+     \glsxtrshort[noindex,hyper=false]{#1}[]%
+   }%
+ }%
 }
-
-

Remember that if you use bib2gls, you will need the --group (or -g) switch to -support this. -


\glstopicItem{label}{location list}

-

-Used to format the name, symbol, description and location list for the top-level -entries. This starts with a paragraph break followed by: -


\glstopicPreSkip

-

-which defaults to \medskip. There is then a hook: -


\glstopicMarker{label}

-

-which does nothing by default, but may be redefined. For example, to add a line to -the table of contents. The name and symbol are set in the form of a title -using: -


\glstopicTitle{label}

-

-This uses \Glossentryname which converts the first letter to upper case. If there’s a -symbol, this is added in parentheses. Both name and symbol (if present) are -encapsulated by -


\glstopicTitleFont{text}

-

-This uses a bold, large font by default. -

If the entry has the description key set (tested with \ifglshasdesc) then a -paragraph break is inserted followed by: -


\glstopicMidSkip

-

-which defaults to \smallskip. This is followed by the description which is formatted -according to: -


\glstopicDesc{label}

-

-This just does \Glossentrydesc{label} followed by the post-description -hook. -

A paragraph break followed by: -


\glstopicPostSkip

-

-comes next regardless of whether or not the description was displayed. This defaults -to \smallskip. This is then followed by: - - - -


\glstopicLoc{label}{location list}

-

-which may be used to display the location list, but does nothing by default. -

The sub-entries first set up the paragraph and hanging indentations using: -


\glstopicAssignSubIndent{level}

-

-This uses: -


\glstopicAssignWidest{level}

-

-to determine if a widest name has been set for the given level. -

The sub-entry has its information displayed using: -


\glstopicSubItem{level}{label}{location}

-

-This encapsulates the name with: -


\glstopicSubNameFont{text}

-

-By default this just uses \textbf. This is followed by: -


\glstopicSubItemSep

-

-which defaults to \quad. The name and separator are passed in the ⟨text⟩ argument -of: -


\glstopicSubItemBox{level}{text}

-

-If a widest name was set for the given level, this will put ⟨text⟩ inside a box of that -width otherwise it just does ⟨text⟩. -

This is followed by the symbol in parentheses if set. Then, if the description is set, -the description and post-description hook are displayed followed by: -


\glstopicSubPreLocSep

-

-(This command isn’t used if the description isn’t set.) -

Finally the location list is displayed using: -


\glstopicSubLoc{label}{location}

-

-which just does ⟨location⟩ by default. - - - -

-

-

Top

4. Abbreviations

-

The new abbreviation system provided by glossaries-extra is more flexible -than the acronym handling provided by the base glossaries package. The -glossaries-extra package modifies the underlying formatting used by \gls (and its -variants) so that terms that are recognised as abbreviations can have their -formatting dealt with by the style. You therefore need to select an abbreviation -style that ensures that \gls (and its variants) displays the desired output. -See the file sample-abbr-styles.pdf for samples of all provided abbreviation -styles. -

Don’t use \glsfirst, \Glsfirst or \GLSfirst with abbreviations as they aren’t -flexible enough to handle some abbreviation styles and unexpected results may occur. -(To a lesser degree, this also applies to \glstext etc.) Use commands like -\glsfmttext, \glsfmtshort or \glsfmtlong in section headings or captions instead -of \gls. If you don’t want the full form to show on first use of \gls use one of the -“nolong” or “noshort” styles.
-

-

This lack of flexibility in \glsfirst can be demonstrated with the following -document: - - - -

-
-\documentclass{article}
-\usepackage{glossaries-extra}
-\setabbreviationstyle{footnote}
-\newabbreviation{ex}{EX}{Example}
-\begin{document}
-Compare \gls{ex}['s] with \glsfirst{ex}['s].
-\end{document}
-
-

The first use \gls has the footnote marker after the inserted material “EX’s1” but -\glsfirst has it before the inserted material “EX1’s” which is inappropriate. Note -that if the style is changed to postfootnote, the footnote marker appears after the -inserted material as \footnote is in the post-link hook. -

There are some instances where \glstext can be useful. It’s used internally by -\glsfmttext, which in turn is used by \glsseelistformat if the entry has a -short form. If \glsfmtshort is used, this enforces the short form, but if -\glsfmttext is used, then the long form will be used for the “noshort” styles, which -is more appropriate. In this particular situation, there’s no need to worry -about inserted material as the final optional argument isn’t supported by -\glsfmttext. -

Abbreviations include acronyms (words formed from initial letters, such as -“laser”), initialisms (initial letters of a phrase, such as “html”, that aren’t -pronounced as words) and contractions (where parts of words are omitted, often -replaced by an apostrophe, such as “don’t”). The “acronym” code provided by the -glossaries package is misnamed as it’s more often than not used for initialisms instead. -Acronyms tend not to be expanded on first use (although they may need -to be 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 glossaries-extra package corrects this misnomer, and provides better -abbreviation handling, with -


\newabbreviation[options]{label}{short}{long}

-

-

This sets the category key to abbreviation by default, but that value may -be overridden in ⟨options⟩. The category may have attributes that modify -the way abbreviations are defined. For example, the insertdots attribute -will automatically insert full stops (periods) into ⟨short⟩ or the noshortplural -attribute will set the default value of the shortplural key to just ⟨short⟩ (without -appending the plural suffix). See §7 Categories for further -details. -

See §2.8 Nested Links regarding the pitfalls of using commands like \gls - - - -or \glsxtrshort within ⟨short⟩ or ⟨long⟩. -

Make sure that you set the category attributes before defining new abbreviations -or they may not be correctly applied.
-

-

The \newacronym command provided by the glossaries package is redefined by -glossaries-extra to use \newabbreviation with the category set to acronym (see also -§2.9 Acronym Style Modifications) so -


\newacronym[options]{label}{short}{long}

-

-is -now -equivalent -to - -
\newabbreviation[type=\acronymtype,category=acronym,options] -{label} -{short} -{long} -
-

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

The way the abbreviations are displayed by commands like \gls varies according -to the abbreviation style. The styles are set according to the entry’s category so, -unlike the base glossaries package, you can have different abbreviation styles within -the same glossary. -

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

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

You can apply the formatting command used for the short form to some arbitrary -text using - - - -


\glsuseabbrvfont{text}{category}

-

-where ⟨category⟩ is the category label that identifies the abbreviation style. Similarly -for the formatting command use by the long form: -


\glsuselongfont{text}{category}

-

-

You can’t use the acronym commands provided by the base package with the new -abbreviations provided by the glossaries-extra package. The style commands that -replace \setacronymstyle, \acrshort etc are described in §4.2 -Abbreviation Styles. The acronymlists package option and associated commands -aren’t supported. The \forallacronyms command, which iterates over all acronym -lists, should be replaced with: -


\forallabbreviationlists{cs}{body}

-

-

-

Top

4.1 Tagging Initials

-

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 -


\GlsXtrEnableInitialTagging{categories}{cs}

-

-before you define your abbreviations. -

This command (robustly) defines ⟨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 tagging attribute set to -“true”. For those cases it will use -


\glsxtrtagfont{text}

-

-This command defaults to \underline{text} but may be redefined as required. -

The control sequence ⟨cs⟩ can’t already be defined when used with the unstarred -version of \GlsXtrEnableInitialTagging for safety reasons. The starred -version will overwrite any previous definition of ⟨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 \GlsXtrEnableInitialTagging is a comma-separated -list of category names. The tagging attribute will automatically be set for -those categories. You can later set this attribute for other categories (see -§7 Categories) but this must be done before the glossary is -displayed. -

The accompanying sample file sample-mixtures.tex uses initial tagging for both - - - -the acronym and abbreviation categories: - - - -

-
-\GlsXtrEnableInitialTagging{acronym,abbreviation}{\itag}
-
-

This defines the command \itag which can be used in the definitions. For -example: - - - -

-
-\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}
-
-

The underlining of the tagged letters only occurs in the glossary and then only for -entries with the tagging attribute set. -

-

-

Top

4.2 Abbreviation Styles

-

The abbreviation style must be set before abbreviations are defined using: -


\setabbreviationstyle[category]{style-name}

-

-where ⟨style-name⟩ is the name of the style and ⟨category⟩ is the category label -(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 abbreviation category. Some styles may automatically -modify one or more of the attributes associated with the given category. For -example, the long-noshort and short-nolong styles set the regular attribute to -true. -

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. -
-

-

Note that \setacronymstyle is disabled by glossaries-extra. Use

-
-\setabbreviationstyle[acronym]{style-name} - - - -
-
instead. The original acronym interface can be restored with \RestoreAcronyms (see -§2.9 Acronym Style Modifications). However the original acronym -interface is incompatible with all the commands described here. -

Abbreviations can be used with the standard glossaries commands, such as \gls, -but don’t use the acronym commands like \acrshort (which use \acronymfont). -The short form can be produced with: -


\glsxtrshort[options]{label}[insert]

-

-(Use this instead of \acrshort.) -

The long form can be produced with -


\glsxtrlong[options]{label}[insert]

-

-(Use this instead of \acrlong.) -

The inline full form can be produced with -


\glsxtrfull[options]{label}[insert]

-

-(This this instead of \acrfull.) -

In general, it’s best not to use commands like \glsfirst for abbreviations, -especially if you use the ⟨insert⟩ optional argument. Use either \gls (possibly with a -reset) or \glsxtrfull.
-

-

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

If you want to use an abbreviation in a chapter or section title, use the -commands described in §5 Entries in Sectioning Titles, Headers, -Captions and Contents instead.
-

-

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

First letter upper case short form: -


\Glsxtrshort[options]{label}[insert]

-

-

First letter upper case long form: -


\Glsxtrlong[options]{label}[insert]

-

-

First letter upper case inline full form: -


\Glsxtrfull[options]{label}[insert]

-

-

All upper case short form: - - - -


\GLSxtrshort[options]{label}[insert]

-

-

All upper case long form: -


\GLSxtrlong[options]{label}[insert]

-

-

All upper case inline full form: -


\GLSxtrfull[options]{label}[insert]

-

-

Plural forms are also available. -

Short form plurals: -


\glsxtrshortpl[options]{label}[insert]

-

-


\Glsxtrshortpl[options]{label}[insert]

-

-


\GLSxtrshortpl[options]{label}[insert]

-

-

Long form plurals: -


\glsxtrlongpl[options]{label}[insert]

-

-


\Glsxtrlongpl[options]{label}[insert]

-

-


\GLSxtrlongpl[options]{label}[insert]

-

-

Full form plurals: -


\glsxtrfullpl[options]{label}[insert]

-

-


\Glsxtrfullpl[options]{label}[insert]

-

-


\GLSxtrfullpl[options]{label}[insert]

-

-

Be careful about using \glsentryfull, \Glsentryfull, \glsentryfullpl and -\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 \glsxtrfull instead. Similarly for \glsentryshort etc. - - - -
-

-

-

-

Top

4.3 Shortcut Commands

-

The abbreviation shortcut commands can be enabled using the shortcuts=abbreviations -package option (or shortcuts=abbr) or shortcuts=ac. (You can use both settings at the -same time.) The provided shortcut commands listed in table 4.1. -

-
- - - -


- - - -
Table 4.1: Abbreviation Shortcut Commands
-
- - - - - - - - - - - - - - - - - - - - - - - - - -
Shortcut Shortcut Equivalent Command
(shortcuts=abbreviations)(shortcuts=ac)
\ab \ac \cgls
\abp \acp \cglspl
\as \acs \glsxtrshort
\asp \acsp \glsxtrshortpl
\al \acl \glsxtrlong
\alp \aclp \glsxtrlongpl
\af \acf \glsxtrfull
\afp \acfp \glsxtrfullpl
\Ab \Ac \cgls
\Abp \Acp \cglspl
\As \Acs \Glsxtrshort
\Asp \Acsp \Glsxtrshortpl
\Al \Acl \Glsxtrlong
\Alp \Aclp \Glsxtrlongpl
\Af \Acf \Glsxtrfull
\Afp \Acfp \Glsxtrfullpl
\AB \AC \cGLS
\ABP \ACP \cGLSpl
\AS \ACS \GLSxtrshort
\ASP \ACSP \GLSxtrshortpl
\AL \ACL \GLSxtrlong
\ALP \ACLP \GLSxtrlongpl
\AF \ACF \GLSxtrfull
\AFP \ACFP \GLSxtrfullpl
\newabbr \newabbr \newabbreviation
- - - -

-
-

Top

4.4 Predefined Abbreviation Styles

-

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

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

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

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

The sample file sample-abbr-styles.tex demonstrates all predefined styles -described here. -

For the “sc” styles that use \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 fontenc package with the T1 -option or something similar.
-

-

Many of the styles have helper commands in the form \glsxtr...name and -\glsxtr...sort that are expanded within the name and sort fields when the -abbreviation is defined. These commands may use the helper token registers available -within \newabbreviation, such as \glsshorttok. The contents of a register can be -accessed with \theregister⟩. It’s essential that these expand when the abbreviation is -defined so don’t hide them behind no-expandable content if you redefine these helper -commands. -

The parenthetical styles, such as long-short, use -


\glsxtrparen{text}

-

-to set the parenthetical material. This just puts parentheses around the text: -(⟨text⟩). -

The basic abbreviation styles, such as long-short and short-long use -


\glsabbrvdefaultfont{text}

- - - -

-for the short form. This just does ⟨text⟩ by default. (That is, no font change is -applied.) On first use, -


\glsfirstabbrvdefaultfont{text}

-

-is used instead. By default, this just does \glsabbrvdefaultfont. The long form is -formatted according to -


\glslongdefaultfont{text}

-

-which again just does ⟨text⟩ (no font change). On first use, -


\glsfirstlongdefaultfont{text}

-

-is used instead. This just does \glslongdefaultfont. The plural suffix used for the -short form is given by -


\glsxtrabbrvpluralsuffix

-

-which defaults to \glspluralsuffix. -

The small-cap styles, such as long-short-sc and short-sc-long, use -


\glsabbrvscfont{text}

-

-which uses \textsc.4.1 -On first use -


\glsfirstabbrvscfont{text}

-

-is used instead. This uses \glsabbrvscfont by default. So redefine, \glsabbrvscfont -to change first and subsequent uses or \glsfirstabbrvscfont to change just the -first use. -

The long form for the small-cap styles uses \glslongdefaultfont or -\glsfirstlongdefaultfont, as with the basic style. The suffix is given -by -


\glsxtrscsuffix

-

-This is defined as - - - -

-
-\newcommand*{\glsxtrscsuffix}{\glstextup{\glsxtrabbrvpluralsuffix}}
-
-

The \glstextup command is provided by glossaries and is used to switch off -the small caps font for the suffix. If you override the default short plural -using the 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 aposplural -and noshortplural attributes. See §7 Categories for further -details.) -

The small styles, such as long-short-sm and short-sm-long, use -


\glsabbrvsmfont{text}

-

-which uses \textsmaller. (This requires the relsizes package, which isn’t loaded by -glossaries-extra, so must be loaded explicitly.) On first use -


\glsfirstabbrvsmfont{text}

-

-is used instead. This uses \glsabbrvsmfont by default. -

The long form for the smaller styles uses \glslongdefaultfont or -\glsfirstlongdefaultfont, as with the basic style. The suffix is given -by -


\glsxtrsmsuffix

-

-which defaults to just \glsxtrabbrvpluralsuffix. -

The “short-em” (emphasize short) styles, such as long-short-em or short-em-long, -use -


\glsabbrvemfont{text}

-

-On first use -


\glsfirstabbrvemfont{text}

-

-is used instead. This uses \glsabbrvemfont by default. The suffix is given -by -


\glsxtremsuffix

-

-which defaults to just \glsxtrabbrvpluralsuffix. The long form is as for the basic -style unless the style is a “long-em” style. -

The “long-em” (emphasize long) styles, such as long-em-short-em or short-em-long-em, -use -


\glsfirstlongemfont{long-form}

-

-instead of \glsfirstlongdefaultfont{long-form} and - - - -


\glslongemfont{long-form}

-

-instead of \glslongdefaultfont{long-form}. The first form \glsfirstlongemfont -is initialised to use \glslongemfont. -

The user styles have similar commands: -


\glsabbrvuserfont{text}

-

-for the short form, -


\glsfirstabbrvuserfont{text}

-

-for the first use short form, -


\glslonguserfont{text}

-

-for the long form, -


\glsfirstlonguserfont{text}

-

-for the first use long form, and -


\glsxtrusersuffix

-

-for the short plural suffix. -

Similarly for the hyphen styles: -


\glsabbrvhyphenfont{text}

-

-for the short form, -


\glsfirstabbrvhyphenfont{text}

-

-for the first use short form, -


\glslonghyphenfont{text}

-

-for the long form, -


\glsfirstlonghyphenfont{text}

-

-for the first use long form, and -


\glsxtrhyphensuffix

-

-for the short plural suffix. -

Similarly for the “only” styles, such as long-only-short-only: -


\glsabbrvonlyfont{text}

-

-for the short form, -


\glsfirstabbrvonlyfont{text}

-

-for the first use short form, -


\glslongonlyfont{text}

-

-for the long form, - - - -


\glsfirstlongonlyfont{text}

-

-for the first use long form, and -


\glsxtronlysuffix

-

-for the short plural suffix. -

The “short-sc-only” styles, such as long-only-short-sc-only: -


\glsabbrvsconlyfont{text}

-

-for the short form (which uses \glsabbrvscfont), and -


\glsfirstabbrvsconlyfont{text}

-

-which uses \glsabbrvsconlyfont. The short plural suffix is obtained from: -


\glsxtrsconlysuffix

-

-This uses \glsxtrscsuffix. For other font types, use the one of “short-only” styles -and redefine \glsabbrvonlyfont as required. (The smallcaps style is a special case -as its plural suffix is awkward.) -

The “postshort-sc-user” styles, such as long-postshort-sc-user: -


\glsabbrvscuserfont{text}

-

-for the short form (which uses \glsabbrvscfont), and -


\glsfirstabbrvscuserfont{text}

-

-which uses \glsabbrvscuserfont. The short plural suffix is obtained from: -


\glsxtrscusersuffix

-

-This uses \glsxtrscsuffix. -

Note that by default inserted material (provided in the final optional argument of -commands like \gls), is placed outside the font command in the predefined styles. To -move it inside, use: -


\glsxtrinsertinsidetrue

-

-This applies to all the predefined styles. For example: - - - -

-
-\setabbreviationstyle{long-short}
-\renewcommand*{\glsfirstlongdefaultfont}[1]{\emph{#1}}
-\glsxtrinsertinsidetrue
-
-

This will make the long form and the inserted text emphasized, whereas the default -(without \glsxtrinsertinsidetrue) would place the inserted text outside of the -emphasized font. -

Note that for some styles, such as the 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). -

Remember that \textsc renders 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 \glsabbrvscfont to -convert its argument to lowercase. For example: - - - -

-
-\renewcommand*{\glsabbrvscfont}[1]{\textsc{\MakeLowercase{#1}}}
-
-

-

If you want to easily switch between the “sc” and “sm” styles, you may find it -easier to redefine this command to convert case: - - - -

-
-\renewcommand*{\glsabbrvscfont}[1]{\textsc{\MakeTextLowercase{#1}}}
-\renewcommand*{\glsabbrvsmfont}[1]{\textsmaller{\MakeTextUppercase{#1}}}
-
-

-

Some of the styles use -


\glsxtrfullsep{label}

-

-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: - - - -

-
-\renewcommand*{\glsxtrfullsep}[1]{~}
-
-

or - - - -

-
-\renewcommand*{\glsxtrfullsep}[1]{\glsacspace{#1}}
-
-

-

The new naming scheme for abbreviation styles is as follows:

-
    -
  • field1⟩[-modifier1⟩]-[post]⟨field2⟩[-modifier2⟩][-user] -

    This is for the parenthetical styles. The -modifier⟩ parts may be omitted. - These styles display ⟨field1⟩ followed by ⟨field2⟩ in parentheses. If ⟨field1⟩ or - ⟨field2⟩ starts with “no” then that element is omitted from the display style - (no parenthetical part) but is included in the inline style. -

    If the -modifier⟩ part is present, then the field has a font changing command - applied to it. The special modifier -only indicates that field is only present - according to whether or not the entry has been used. -

    If post is present then ⟨field2⟩ is placed after the link-text using the - post-link hook. -

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

    Examples:

    -
      -
    • long-noshort-sc: ⟨field1⟩ is the long form, the short form is set in - smallcaps but omitted in the display style. -
    • -
    • long-em-short-em: both the long form and the short form are - emphasized. The short form is in parentheses. -
    • -
    • long-short-em: the short form is emphasized but not the long form. - The short form is in parentheses. -
    • -
    • long-short-user: if the user1 key has been set, this produces the style - ⟨long⟩ (⟨short⟩, ⟨user1⟩) otherwise it just produces ⟨long⟩ (⟨short⟩). -
    • -
    • long-hyphen-postshort-hyphen: the short form and the inserted - material (provided by the final optional argument of commands like - \gls) is moved to the post-link hook. The long form is formatted - according to \glslonghyphenfont (or \glsfirstlonghyphenfont - on first use). The short form is formatted according to - \glsabbrvhyphenfont (or \glsfirstabbrvhyphenfont on first - use).
    - - - -
  • -
  • style-noreg -

    Some styles set the regular attribute. In some cases, there’s a version of the - style that doesn’t set this attribute. For example, long-em-noshort-em sets the - regular attribute. The long-em-noshort-em-noreg style is a minor variation that - style that doesn’t set the attribute. -

    There are a few “noshort” styles, such as long-hyphen-noshort-noreg, that have - “-noreg” version without a regular version. This is because the style won’t work - properly with the regular set, but the naming scheme is maintained for - consistency with the other “noshort” styles. -

  • -
  • field1⟩[-modifier1⟩]-[post]footnote -

    The display style uses ⟨field1⟩ followed by a footnote with the other field in it. If - post is present then the footnote is placed after the link-text using the - post-link hook. The inline style does ⟨field1⟩ followed by the other field in - parentheses. -

    If -modifier1⟩ is present, ⟨field1⟩ has a font-changing command applied to - it. -

    Examples:

    -
      -
    • short-footnote: short form in the text with the long form in the - footnote. -
    • -
    • short-sc-postfootnote: short form in smallcaps with the long form in - the footnote outside of the link-text.
    -

    Take care with the footnote styles. Remember that there are some situations - where \footnote doesn’t work.
    -

    -

  • -
  • style-desc -

    Like ⟨style⟩ but the description key must be provided when defining abbreviations - with this style. -

    Examples:

    - - - - -
-

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: -


\GlsXtrWarnDeprecatedAbbrStyle{old-name}{new-name}

-

-where ⟨old-name⟩ is the deprecated name and ⟨new-name⟩ is the preferred name. You -can suppress these warnings by redefining this command to do nothing. -

-

-

Top

4.4.1 Predefined Abbreviation Styles that Set the Regular Attribute

-

The following abbreviation styles set the regular attribute to “true” for all categories -that have abbreviations defined with any of these styles. -

-short-nolong
This only displays the short form on first use. The name is set to the - short form through the command -


\glsxtrshortnolongname

-

- (Similarly for the other shortmodifier-nolongmodifier⟩ styles, unless indicated - otherwise.) This command is expanded as the entry is defined, so any - redefinition must be done before \newabbreviation (or \newacronym) for it to - take effect. Make sure to \protect any formatting commands (or anything else - that shouldn’t be expanded). -

The description is set to the long form. The inline full form displays ⟨short⟩ - (⟨long⟩). The long form on its own can be displayed through commands like - \glsxtrlong. -

-short
A synonym for short-nolong. -
-nolong-short
Like short-nolong but the inline full form displays ⟨long⟩ (⟨short⟩). -
-short-sc-nolong
Like short-nolong but redefines \glsabbrvfont to use - \glsabbrvscfont (which defaults to \textsc). -
-short-sc
A synonym for short-sc-nolong - - - -
-nolong-short-sc
Like short-sc-nolong but the inline full form displays ⟨long⟩ (⟨short⟩). - The name is still obtained from \glsxtrshortnolongname (similarly for the - other styles in the form nolongmodifier-shortmodifier⟩ unless indicated - otherwise). -
-short-sm-nolong
Like short-nolong but redefines \glsabbrvfont to use - \glsabbrvsmfont (which defaults to \textsmaller). -
-short-sm
A synonym for short-sm-nolong. -
-nolong-short-sm
Like short-sm-nolong but the inline full form displays ⟨long⟩ - (⟨short⟩). -
-short-em-nolong
Like short-nolong but redefines \glsabbrvfont to use - \glsabbrvemfont. -
-short-em
A synonym for short-em-nolong -
-nolong-short-em
Like short-em-nolong but the inline full form displays ⟨long⟩ - (⟨short⟩). -
-short-nolong-desc
Like the short-nolong style, but the name is set to the full form - obtained by expanding -


\glsxtrshortdescname

-

- (Similarly for the other shortmodifier-nolongmodifier-desc styles, unless - indicated otherwise.) This command is expanded when the entry is defined, so - \protect fragile and formatting commands and only redefine this command - before \newabbreviation (or \newacronym). -

The description must be supplied by the user. You may prefer to use - the short-nolong style with the post-description hook set to display - the long form and override the description key. (See the sample file - sample-acronym-desc.tex.) -

-short-desc
A synonym for short-nolong-desc. -
-short-sc-nolong-desc
Like short-nolong but redefines \glsabbrvfont to use - \glsabbrvscfont (which defaults to \textsc). - - - -
-short-sc-desc
A synonym for short-sc-nolong-desc. -
-short-sm-nolong-desc
Like short-nolong-desc but redefines \glsabbrvfont to use - \glsabbrvsmfont (which defaults to \textsmaller). -
-short-sm-desc
A synonym for short-sm-nolong-desc. -
-short-em-nolong-desc
Like short-nolong-desc but redefines \glsabbrvfont to use - \glsabbrvemfont. -
-short-em-desc
A synonym for short-em-nolong-desc. -
-long-noshort-desc
This style only displays the long form, regardless of first or - subsequent use of commands \gls. The short form may be accessed - through commands like \glsxtrshort. The inline full form displays ⟨long⟩ - (⟨short⟩). -

The sort key are set to the long form. The name key is also set to the long form, - but this is done by expanding -


\glsxtrlongnoshortdescname

-

- (Similarly for the other longmodifier-noshortmodifier-desc styles, unless - indicated otherwise.) This command should only be redefined before - abbreviations are defined, and any fragile or formatting commands within it - need protecting. -

The 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 ⟨long⟩ (⟨short⟩). -

-long-desc
A synonym for long-noshort-desc. -
-long-noshort-sc-desc
Like the long-noshort-desc style but the short form (accessed - through commands like \glsxtrshort) use \glsabbrvscfont. (This style was - originally called long-desc-sc. Renamed in version 1.04, but original name - retained as a deprecated synonym for backward-compatibility.) -
-long-noshort-sm-desc
Like long-noshort-desc but redefines \glsabbrvfont to use - \glsabbrvsmfont. (This style was originally called long-desc-sm. Renamed in - version 1.04, but original name retained as a deprecated synonym for - backward-compatibility.) - - - -
-long-noshort-em-desc
Like long-noshort-desc but redefines \glsabbrvfont to use - \glsabbrvemfont. The long form isn’t emphasized. (This style was originally - called long-desc-em. Renamed in version 1.04, but original name retained as a - deprecated synonym for backward-compatibility.) -
-long-em-noshort-em-desc
New to version 1.04, like long-noshort-desc but - redefines \glsabbrvfont to use \glsabbrvemfont. The long form uses - \glsfirstlongemfont and \glslongemfont. -
-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 long-noshort-desc style, but the sort key is set to the short - form. The name key is also set to the short form, but this is done by - expanding -


\glsxtrlongnoshortname

-

- (Similarly for other longmodifier-noshortmodifier⟩ styles, unless indicated - otherwise.) This command should only be redefined before abbreviations are - defined, and fragile or formatting commands should be protected. -

The description is set to the long form. -

-long
A synonym for long-noshort -
-long-noshort-sc
Like the long-noshort style but the short form (accessed through - commands like \glsxtrshort) use \glsabbrvscfont. (This style was originally - called long-sc. Renamed in version 1.04, but original name retained as a - deprecated synonym for backward-compatibility.) -
-long-noshort-sm
Like long-noshort but redefines \glsabbrvfont to use - \glsabbrvsmfont. (This style was originally called long-sm. Renamed in - version 1.04, but original name retained as a deprecated synonym for - backward-compatibility.) -
-long-noshort-em
This style is like long-noshort but redefines \glsabbrvfont to use - \glsabbrvemfont. The long form isn’t emphasized. (This style was originally - called long-em. Renamed in version 1.04, but original name retained as a - deprecated synonym for backward-compatibility.) -
-long-em-noshort-em
New to version 1.04, this style is like long-noshort but redefines - - - - \glsabbrvfont to use \glsabbrvemfont, \glsfirstlongfont to use - \glsfirstlongemfont and \glslongfont to use \glslongemfont. The short - form isn’t used by commands like \gls, but can be obtained using - \glsxtrshort. The related style long-em-noshort-em-noreg doesn’t set the - regular attribute. -
-

-

-

Top

4.4.2 Predefined Abbreviation Styles that Don’t Set the Regular Attribute

-

The following abbreviation styles will set the regular attribute to “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. -

-long-short
On first use, this style uses the format ⟨long⟩ (⟨short⟩). The inline and - display full forms are the same. The sort key is set to the short form. The name - is also set to the short form through -


\glsxtrlongshortname

-

- (Similarly for other longmodifier-shortmodifier⟩ styles, unless indicated - otherwise.) Any redefinition of this command must come before the - abbreviations are defined as it expands on definition. Make sure you protect - any commands that shouldn’t be expanded. The long form can be referenced - with \the\glslongtok and the short form can be referenced with - \the\glsshorttok. -

The description is set to the long form. The long and short forms are separated - by \glsxtrfullsep. If you want to insert material within the parentheses - (such as a translation), try the long-short-user style. -

-long-short-sc
Like long-short but redefines \glsabbrvfont to use \glsabbrvscfont. -
-long-short-sm
Like long-short but redefines \glsabbrvfont to use \glsabbrvsmfont. -
-long-short-em
Like long-short but redefines \glsabbrvfont to use \glsabbrvemfont. -
-long-em-short-em
New to version 1.04, this style is like long-short-em but redefines - \glsfirstlongfont to use \glsfirstlongemfont. - - - -
-long-only-short-only
New to version 1.17, this style only shows the long form on first - use and only shows the short form on subsequent use. The inline full form - \glsxtrfull shows the long form followed by the short form in parentheses. - The name field is obtained from -


\glsxtronlyname

-

- Any redefinition of this command must come before the abbreviations - are defined as it expands on definition. Make sure you protect any - commands that shouldn’t be expanded. The long form can be referenced - with \the\glslongtok and the short form can be referenced with - \the\glsshorttok. -

-long-only-short-sc-only
-

New to version 1.48, this is like long-only-short-only but uses smallcaps for the - short form. The name is obtained from: -


\glsxtrsconlyname

-

-

-long-only-short-only-desc
New to version 1.17, this style is like long-only-short-only - but the user must supply the description. The name field is obtained - from -


\glsxtronlydescname

-

- The sort value is obtained from: -


\glsxtronlydescsort

-

-

Any redefinition of these commands must come before the abbreviations - are defined as it expands on definition. Make sure you protect any - commands that shouldn’t be expanded. The long form can be referenced - with \the\glslongtok and the short form can be referenced with - \the\glsshorttok. -

-long-only-short-sc-only-desc
New to version 1.48, this style is like - long-only-short-only-desc but it uses smallcaps for the short form. The name is - obtained from: -


\glsxtrsconlydescname

- - - -

- This defaults to \glsxtronlydescname. -

The sort value is obtained from: -


\glsxtrsconlydescsort

-

- This defaults to \glsxtronlydescsort. -

-long-em-noshort-em-noreg
New to version 1.17, this style is like long-em-noshort-em - but doesn’t set the regular attribute. -
-long-short-user
This style was introduced in version 1.04. It’s like the long-short style - but additional information can be inserted into the parenthetical material. This - checks the value of the field given by -


\glsxtruserfield

-

- (which defaults to useri) using \ifglshasfield (provided by glossaries). If the - field hasn’t been set, the style behaves like the long-short style and produces - ⟨long⟩ (⟨short⟩) but if the field has been set, the contents of that field are inserted - within the parentheses in the form ⟨long⟩ (⟨short⟩, ⟨field-value⟩). The format is - governed by -


\glsxtruserparen{text}{label}

-

- where ⟨text⟩ is the short form (for the long-short-user style) or the long form (for - the short-long-user style). This command first inserts a space using - \glsxtrfullsep and then the parenthetical content (using \glsxtrparen). - The description is set to -


\glsuserdescription{long}{label}

-

- The default definition ignores the ⟨label⟩ and encapsulates ⟨long⟩ with - \glslonguserfont. -

The name is obtained by expanding \glsxtrlongshortname (see above). The - ⟨text⟩ argument includes the font formatting command, \glsfirstabbrvfont - {short} in the case of the long-short-user style and \glsfirstlongfont{long} - in the case of the short-long-user style. -

For example: - - - -

-
-     \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}
-
-

On first use, \gls{tug} will appear as: -

-

TeX User Group (TUG)

-

whereas \gls{dante} will appear as: -

-

Deutschsprachige Anwendervereinigung TeX e.V (DANTE, - German Speaking TeX User Group)

-

The short form is formatted according to -


\glsabbrvuserfont{text}

-

- and the plural suffix is given by -


\glsxtrusersuffix

-

-

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 long-short-sc - style: - - - -

-
-     \renewcommand{\glsabbruserfont}[1]{\glsabbrvscfont{#1}}
-     \renewcommand{\glsxtrusersuffix}{\glsxtrscsuffix}
-
-

-

-long-noshort-noreg
This style is like long-noshort but it doesn’t set the regular - attribute. -
-long-noshort-desc-noreg
This style is like long-noshort-desc but it doesn’t set the - regular attribute. -
-long-short-desc
On first use, this style uses the format ⟨long⟩ (⟨short⟩). The - inline and display full forms are the same. The name is set to the full - form. The sort key is set to ⟨long⟩ (⟨short⟩). Before version 1.04, this was - incorrectly set to the short form. If you want to revert back to this you can - redefine -


\glsxtrlongshortdescsort

-

- For example: - - - -

-
-     \renewcommand*{\glsxtrlongshortdescsort}{\the\glsshorttok}
-
-

The description must be supplied by the user. The long and short - forms are separated by \glsxtrfullsep. The name field is obtained - from -


\glsxtrlongshortdescname

-

- (Similarly for other longmodifier-shortmodifier-desc styles, unless indicated - otherwise.) Any redefinition of this command must come before the - abbreviations are defined as it expands on definition. Make sure you protect - any commands that shouldn’t be expanded. The long form can be referenced - with \the\glslongtok and the short form can be referenced with - \the\glsshorttok. -

-long-short-sc-desc
Like long-short-desc but redefines \glsabbrvfont to use - \glsabbrvscfont. -
-long-short-sm-desc
Like long-short-desc but redefines \glsabbrvfont to use - \glsabbrvsmfont. -
-long-short-em-desc
Like long-short-desc but redefines \glsabbrvfont to use - \glsabbrvemfont. -
-long-em-short-em-desc
New to version 1.04, this style is like long-short-em-desc but - redefines \glsfirstlongfont to use \glsfirstlongemfont. -
-long-em-noshort-em-desc-noreg
New to version 1.17, this style is like - long-em-noshort-em-desc but doesn’t set the regular attribute. -
-long-short-user-desc
New to version 1.04, this style is like a cross between the - long-short-desc style and the long-short-user style. The display and - inline forms are as for long-short-user and the name key is obtained - from -


\glsxtrlongshortuserdescname

- - - -

- Again, this should only be redefined before \newabbreviation (or - \newacronym), and fragile and formatting commands need protecting. -

The description key must be supplied in the optional argument of - \newabbreviation (or \newacronym). The sort key is set to ⟨long⟩ (⟨short⟩) as per - the long-short-desc style. -

-short-nolong-noreg
This is like short-nolong but doesn’t set the regular attribute. -
-nolong-short-noreg
This is like nolong-short but doesn’t set the regular attribute. -
-short-long
On first use, this style uses the format ⟨short⟩ (⟨long⟩). The inline and - display full forms are the same. The name and sort keys are set to the - short form. The description is set to the long form. The short and long - forms are separated by \glsxtrfullsep. If you want to insert material - within the parentheses (such as a translation), try the short-long-user - style. -

The name field is obtained from -


\glsxtrshortlongname

-

- (Similarly for other shortmodifier-longmodifier⟩ styles, unless indicated - otherwise.) Any redefinition of this command must come before the - abbreviations are defined as it expands on definition. Make sure you protect - any commands that shouldn’t be expanded. The long form can be referenced - with \the\glslongtok and the short form can be referenced with - \the\glsshorttok. -

-short-sc-long
Like short-long but redefines \glsabbrvfont to use \glsabbrvscfont. -
-short-sm-long
Like short-long but redefines \glsabbrvfont to use \glsabbrvsmfont. -
-short-em-long
Like short-long but redefines \glsabbrvfont to use \glsabbrvemfont. -
-short-em-long-em
New to version 1.04, this style is like short-em-long but redefines - \glsfirstlongfont to use \glsfirstlongemfont. -
-short-long-user
New to version 1.04. This style is like the long-short-user style but - with the long and short forms switched. The parenthetical material is governed - by the same command \glsxtruserparen, but the first argument supplied to it - - - - is the long form instead of the short form. The name field is obtained by - expanding -


\glsxtrshortlongname

-

- Again, this should only be redefined before \newabbreviation (or - \newacronym) and commands that should be expanded need to be protected. - The description is set to \glsuserdescription{long}{label}. -

-short-nolong-desc-noreg
This style is like short-nolong-desc but it doesn’t set the - regular attribute. -
-short-long-desc
On first use, this style uses the format ⟨short⟩ (⟨long⟩). The - inline and display full forms are the same. The name is set to the full - form. The description must be supplied by the user. The short and long - forms are separated by \glsxtrfullsep. The name field is obtained - from -


\glsxtrshortlongdescname

-

- (Similarly for other shortmodifier-longmodifier-desc styles, unless indicated - otherwise.) Any redefinition of this command must come before the - abbreviations are defined as it expands on definition. Make sure you protect - any commands that shouldn’t be expanded. The long form can be referenced - with \the\glslongtok and the short form can be referenced with - \the\glsshorttok. -

-short-sc-long-desc
Like short-long-desc but redefines \glsabbrvfont to use - \glsabbrvscfont. -
-short-sm-long-desc
Like short-long-desc but redefines \glsabbrvfont to use - \glsabbrvsmfont. -
-short-em-long-desc
Like short-long-desc but redefines \glsabbrvfont to use - \glsabbrvemfont. -
-short-em-long-em-desc
New to version 1.04, this style is like short-em-long-desc but - redefines \glsfirstlongfont to use \glsfirstlongemfont. -
-short-long-user-desc
New to version 1.04, this style is like a cross between the - short-long-desc style and the short-long-user style. The display and - inline forms are as for short-long-user, but the name key is obtained - from - - - -


\glsxtrshortlonguserdescname

-

- Again, this should only be redefined before \newabbreviation (or - \newacronym), and fragile and formatting commands need protecting. -

The description key must be supplied in the optional argument of - \newabbreviation (or \newacronym). -

-short-footnote
On first use, this style displays the short form with the long form as - a footnote. This style automatically sets the nohyperfirst attribute to “true” for - the supplied category, so the first use won’t be hyperlinked (but the footnote - marker may be, if the hyperref package is used). -

The inline full form uses the ⟨short⟩ (⟨long⟩) style. The name is set to the short - form. The description is set to the long form. The name key is obtained by - expanding: -


\glsxtrfootnotename

-

- (Similarly for other shortmodifier-modifierfootnote styles, unless - indicated otherwise.) Again, this command should only be redefined before - \newabbreviation (or \newacronym), and fragile or formatting commands - should be protected from expansion. -

As from version 1.05, all the footnote styles use: -


\glsfirstlongfootnotefont{text}

-

- to format the long form on first use or for the full form and -


\glslongfootnotefont{text}

-

- to format the long form elsewhere (for example, when used with \glsxtrlong). -

As from version 1.07, all the footnote styles use: -


\glsxtrabbrvfootnote{label}{long}

-

- By default, this just does \footnote{long} (the first argument is ignored). For - example, to make the footnote text link to the relevant place in the - glossary: - - - -

-
-     \renewcommand{\glsxtrabbrvfootnote}[2]{%
-       \footnote{\glshyperlink[#2]{#1}}%
-     }
-
-

or to include the short form with a hyperlink: - - - -

-
-     \renewcommand{\glsxtrabbrvfootnote}[2]{%
-       \footnote{\glshyperlink[\glsfmtshort{#1}]{#1}: #2}%
-     }
-
-

Note that I haven’t used commands like \glsxtrshort to avoid interference - (see §2.4 Entry Display Style Modifications and §2.8 - Nested Links). -

-footnote
A synonym for short-footnote. -
-short-sc-footnote
Like short-footnote but redefines \glsabbrvfont to use - \glsabbrvscfont. (This style was originally called footnote-sc. Renamed in - version 1.04, but original name retained as a deprecated synonym for - backward-compatibility.) -
-short-sc-footnote
Like short-footnote but redefines \glsabbrvfont to use - \glsabbrvsmfont. (This style was originally called footnote-sm. Renamed in - version 1.04, but original name retained as a deprecated synonym for - backward-compatibility.) -
-short-em-footnote
Like short-footnote but redefines \glsabbrvfont to use - \glsabbrvemfont. (This style was originally called footnote-em. Renamed in - version 1.04, but original name retained as a deprecated synonym for - backward-compatibility.) -
-short-footnote-desc
(New to v1.42.) This is similar to short-footnote, but the - description must be supplied by the user. The name field is obtained - from: -


\glsxtrfootnotedescname

-

- which defaults to ⟨short⟩ followed by ⟨long⟩ in parentheses, and the sort field is - obtained from: -


\glsxtrfootnotedescsort

-

- which defaults to just the short form. (Similarly for other - shortmodifier-[post]footnote-desc styles, unless indicated otherwise.) - - - -

Any redefinition of these commands must come before the abbreviations - are defined as it expands on definition. Make sure you protect any - commands that shouldn’t be expanded. The long form can be referenced - with \the\glslongtok and the short form can be referenced with - \the\glsshorttok. -

-footnote-desc
A synonym for short-footnote-desc. -
-short-sc-footnote-desc
Like short-footnote-desc but redefines \glsabbrvfont to use - \glsabbrvscfont. -
-short-sm-footnote-desc
Like short-footnote-desc but redefines \glsabbrvfont to use - \glsabbrvsmfont. -
-short-em-footnote-desc
Like short-footnote-desc but redefines \glsabbrvfont to use - \glsabbrvemfont. -
-short-postfootnote
This is similar to the short-footnote style but doesn’t modify the - category attribute. Instead it changes \glsxtrpostlinkcategory to insert the - footnote after the link-text on first use. This will also defer the footnote - until after any following punctuation character that’s recognised by - \glsxtrifnextpunc. -

The inline full form uses the ⟨short⟩ (⟨long⟩) style. The name is set to the short - form. The description is set to the long form. Note that this style will change - \glsxtrfull (and its variants) so that it fakes non-first use. (Otherwise the - footnote would appear after the inline form.) -

-postfootnote
A synonym for short-postfootnote. -
-short-sc-postfootnote
Like short-postfootnote but redefines \glsabbrvfont to use - \glsabbrvscfont. (This style was originally called postfootnote-sc. Renamed in - version 1.04, but original name retained as a deprecated synonym for - backward-compatibility.) -
-short-sm-postfootnote
Like short-postfootnote but redefines \glsabbrvfont to use - \glsabbrvsmfont. (This style was originally called postfootnote-sm. Renamed - in version 1.04, but original name retained as a deprecated synonym for - backward-compatibility.) - - - -
-short-em-postfootnote
Like short-postfootnote but redefines \glsabbrvfont to use - \glsabbrvemfont. (This style was originally called postfootnote-em. Renamed - in version 1.04, but original name retained as a deprecated synonym for - backward-compatibility.) -
-short-postfootnote-desc
(New to v1.42.) This is similar to short-postfootnote, but - the description must be supplied by the user. The name and sort are set as for - short-footnote-desc. -
-postfootnote-desc
A synonym for short-postfootnote-desc. -
-short-sc-postfootnote-desc
Like short-postfootnote-desc but redefines \glsabbrvfont - to use \glsabbrvscfont. -
-short-sm-postfootnote-desc
Like short-postfootnote-desc but redefines \glsabbrvfont - to use \glsabbrvsmfont. -
-short-em-postfootnote-desc
Like short-postfootnote-desc but redefines \glsabbrvfont - to use \glsabbrvemfont. -
-short-postlong-user
This style was introduced in version 1.12. It’s like the - 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. The name key is obtained - from \glsxtrshortlongname. -
-short-postlong-user-desc
This style was introduced in version 1.12. It’s like the - above short-postlong-user style but the description must be specified. The name - is obtained from \glsxtrshortlonguserdescname. -
-long-postshort-user
This style was introduced in version 1.12. It’s like the - above short-postlong-user style but the long form is shown first and - the short form is in the parenthetical material (as for long-short-user) - style. -
-long-postshort-user-desc
This style was introduced in version 1.12. It’s like the - above long-postshort-user style but the description must be specified. The name - is obtained from \glsxtrlongshortuserdescname. - - - -
-long-postshort-sc-user
This style (new to v1.48) is like long-postshort-user but uses - smallcaps for the short form. -
-long-postshort-sc-user-desc
This style (new to v1.48) is like long-postshort-user-desc - but uses smallcaps for the short form. -
-long-hyphen-short-hyphen
This style (new to v1.17) is designed to work - with the markwords category attribute. The full form is formatted - using -


\glsxtrlonghyphenshort{label}{long}{short}{insert}

-

- where ⟨insert⟩ is the inserted material provided in the final optional argument of - commands like \insert. If ⟨insert⟩ start with a hyphen, then this locally - redefines \glsxtrwordsep to a hyphen, which means that if the markwords - attribute is set then the long form will become hyphenated. (If this attribute - isn’t set, there’s no alteration to the way the long form is displayed.) The name - key is obtained from \glsxtrlongshortname. -

Unlike the other ⟨long⟩ (⟨short⟩) type of styles, such as long-short, this style also - repeats the insertion in the parenthetical part, so that the first use form - is: -

-

\glsfirstlonghyphenfont{long}insert⟩ - (\glsfirstabbrvhyphenfont{short}insert⟩)

-

The space before the parenthetical material is actually given by - \glsxtrfullsep{label} which defaults to a space. The ⟨insert⟩ may be - moved into the formatting commands according to the conditional - \ifglsxtrinsertinside. -

For example, if ip is defined using: - - - -

-
-     \glssetcategoryattribute{english}{markwords}{true}
-     \setabbreviationstyle[english]{long-hyphen-short-hyphen}
-     \newabbreviation[category=english]{ip}{IP}{Internet Protocol}
-
-

then - - - -

-
-     \gls{ip}[-Adressen]
-
-

will do -

-

Internet-Protocol-Adressen (IP-Adressen)

-

on first use, whereas - - - -

-
-     \gls{ip}[ Address]
-
-

will do -

-

Internet Protocol Address (IP Address)

-

on first use. -

Note that the hyphenation isn’t applied when using commands like - \glsxtrlong. This means that - - - -

-
-     \glsxtrlong{ip}[-Adressen]
-
-

will do -

-

Internet Protocol-Adressen

-
-

-

If the markwords attribute hadn’t been set, then the first use of - - - -

-
-     \gls{ip}[-Adressen]
-
-

would do -

-

Internet Protocol-Adressen (IP-Adressen)

-

instead. -

If the inserted material ⟨insert⟩ is likely to contain commands like \gls, - then use long-hyphen-postshort-hyphen instead to avoid nested links. -
-

-

If you want the short version in small-caps, you can just redefine - \glsabbrvhyphenfont and \glsxtrhyphensuffix to use the small-caps - versions. For example: - - - -

-
-     \renewcommand{\glsabbrvhyphenfont}{\glsabbrvscfont}
-     \renewcommand{\glsxtrhyphensuffix}{\glsxtrscsuffix}
-
-

Similarly for other font-changing variations. -

-long-hyphen-noshort-desc-noreg
New to version 1.17, this style is like - long-hyphen-short-hyphen-desc except that the parenthetical part is omitted and - the long form is displayed on subsequent use. The short form can be accessed - with \glsxtrshort but just uses the default abbreviation font. There’s - no regular version of this style as the regular form doesn’t have the - flexibility to deal with the hyphen switch. The name is obtained from - \glsxtrlongnoshortdescname. -
-long-hyphen-noshort-noreg
New to version 1.17, this style is like - long-hyphen-noshort-desc-noreg but the name is set to the short form and the - description is set to the long form. -
-long-hyphen-short-hyphen-desc
-

New to version 1.17. This is similar to long-hyphen-short-hyphen but the user - supplies the description. The name is obtained from \glsxtrlongshortdescname. -

-long-hyphen-postshort-hyphen
-

New to version 1.17. This is similar to long-hyphen-short-hyphen but the - inserted and parenthetical material are moved to the post-link hook. On first - use, \gls{label}[insert] will do -
\glsxtrlonghyphen{long}{label}{insert}\glsxtrposthyphenshort - {label}insert⟩ -
- where -


\glsxtrposthyphenshort{label}insert

-

- is in the post-link hook. This uses the format: -
insert⟩ (\glsfirstabbrvhyphenfont{short}isnert⟩) -
- - - -

The singular short form is always used here, even with \glspl. (Unlike - long-hyphen-long-hyphen.)
-

-

The part in the link-text on first use: -


\glsxtrlonghyphen{long}{label}{insert}

-

- checks if ⟨insert⟩ starts with a hyphen. If it does, then \glsxtrwordsep is locally - redefined to a hyphen. This command only uses ⟨insert⟩ to test if it starts with a - hyphen. The actual insertion code isn’t typeset until the post-link hook and it’s - also localised, which means that you can use commands like \gls in ⟨insert⟩ for - this style without causing nested hyperlinks, but only for commands like - \gls. -

Don’t use \gls in the ⟨insert⟩ part for commands like \glsxtrfull, - \glsxtrshort or \glsxtrlong.
-

-

The inline full display format used by commands like \glsxtrfull - behaves differently to the first use of \gls with this style. It’s better - to use \glsreset{label}\gls{label} if you want to ensure the full - format. -

-long-hyphen-postshort-hyphen-desc
-

New to version 1.17. This is similar to long-hyphen-postshort-hyphen - but the user supplies the description. The name is obtained from - \glsxtrlongshortdescname. -

-short-hyphen-long-hyphen
This style (new to v1.17) is like long-hyphen-short-hyphen, - except that the short form is displayed first followed by the long form in - parentheses. The full form is formatted using -


\glsxtrshorthyphenlong{label}{short}{long}{insert}

-

- which behaves in an analogous way to \glsxtrlonghyphenshort. The name is - obtained from \glsxtrshortlongname. -

-short-hyphen-long-hyphen-desc
-

New to version 1.17. This is similar to short-hyphen-long-hyphen but the user - supplies the description. The name is obtained from \glsxtrshortlongdescname. - - - -

-short-hyphen-postlong-hyphen
This style (new to v1.17) is like - long-hyphen-postshort-hyphen, but the short form is displayed first followed by - the long form in parentheses. On first use, \gls{label}[insert] will do - -
\glsxtrshorthyphen{short}{label}{insert}\glsxtrposthyphenlong - {label}insert⟩ -
- where -


\glsxtrposthyphenlong{label}insert

-

- is in the post-link hook. These commands behave in an analogous manner to - those used with long-hyphen-postshort-hyphen. The name is obtained from - \glsxtrshortlongname. -

Don’t use \gls in the ⟨insert⟩ part for commands like \glsxtrfull, - \glsxtrshort or \glsxtrlong.
-

-

The inline full display format used by commands like \glsxtrfull - behaves differently to the first use of \gls with this style. It’s better - to use \glsreset{label}\gls{label} if you want to ensure the full - format. -

-short-hyphen-postlong-hyphen-desc
-

New to version 1.17. This is similar to short-hyphen-postlong-hyphen - but the user supplies the description. The name is obtained from - \glsxtrshortlongdescname. -

-
-

-

-

Top

4.5 Defining New Abbreviation Styles

-

New abbreviation styles may be defined using: -


\newabbreviationstyle{name}{setup}{fmts}

-

-

where ⟨name⟩ is the name of the new style (as used in the mandatory argument of -\setabbreviationstyle). This is similar but not identical to the glossaries package’s -\newacronymstyle command. - - - -

You can’t use styles defined by \newacronymstyle with glossaries-extra -unless you have reverted \newacronym back to its generic definition from -glossaries (using \RestoreAcronyms). The acronym styles from the glossaries -package can’t be used with abbreviations defined with \newabbreviation. -
-

-

The ⟨setup⟩ argument deals with the way the entry is defined and may -set attributes for the given abbreviation category. This argument should -redefine -


\CustomAbbreviationFields

-

-to set the entry fields including the name (defaults to the short form if omitted), -sort, first, firstplural. Other fields may also be set, such as text, plural and -description. -

\CustomAbbreviationFields is expanded by \newabbreviation so take care to -protect commands that shouldn’t be expanded.
-

-

For example, the long-short style has the following in ⟨setup⟩: - - - -

-
-  \renewcommand*{\CustomAbbreviationFields}{%
-    name={\protect\glsabbrvfont{\the\glsshorttok}},
-    sort={\the\glsshorttok},
-    first={\protect\glsfirstlongfont{\the\glslongtok}%
-     \protect\glsxtrfullsep{\the\glslabeltok}%
-     \glsxtrparen{\protect\glsfirstabbrvfont{\the\glsshorttok}}},%
-    firstplural={\protect\glsfirstlongfont{\the\glslongpltok}%
-     \protect\glsxtrfullsep{\the\glslabeltok}%
-     \glsxtrparen{\protect\glsfirstabbrvfont{\the\glsshortpltok}}},%
-    plural={\protect\glsabbrvfont{\the\glsshortpltok}},%
-    description={\the\glslongtok}}%
-
-

Note that the first and firstplural are set even though they’re not used by -\gls. -

The basic styles, such as long-short, use commands like \glsabbrvfont (which are -redefined whenever the style formatting is set) within \CustomAbbreviationFields. -Other styles, such as long-em-short-em directly use their own custom commands, such -as \glsabbrvemfont. With these styles, commands like \glsabbrvfont still need to -be defined as appropriate in the ⟨fmts⟩ argument even if they’re not used within -\CustomAbbreviationFields. -

The ⟨setup⟩ argument may also redefine -


\GlsXtrPostNewAbbreviation

-

-which can be used to assign attributes. (This will automatically be initialised to do -nothing.) -

For example, the short-footnote includes the following in ⟨setup⟩: - - - -

-
-  \renewcommand*{\GlsXtrPostNewAbbreviation}{%
-    \glssetattribute{\the\glslabeltok}{nohyperfirst}{true}%
-    \glshasattribute{\the\glslabeltok}{regular}%
-    {%
-      \glssetattribute{\the\glslabeltok}{regular}{false}%
-    }%
-    {}%
-  }%
-
-

This sets the nohyperfirst attribute to “true”. It also unsets the regular attribute if it -has previously been set. Note that the 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 glossaries): -


\glsshorttok

-

-

Short plural value (defined by glossaries-extra): -


\glsshortpltok

-

-(This may be the default value or, if provided, the value provided by the user -through the shortplural key in the optional argument of \newabbreviation.) -

Long value (defined by glossaries): -


\glslongtok

-

-

Long plural value (defined by glossaries-extra): -


\glslongpltok

-

-(This may be the default value or, if provided, the value provided by the user -through the longplural key in the optional argument of \newabbreviation.) -

The short or long values may be modified by attributes (such as markwords). The -above registers reflect the modification. If you want to access the original -(unmodified) short or long form (as provided in the final two arguments of -\newabbreviation), then use the commands: -


\glsxtrorgshort

-

-for the short form and -


\glsxtrorglong

-

-for the long form. (These may be useful for the sort key to avoid any formatting that - - - -may be added by the attribute setting.) -

There are two other registers available that are defined by glossaries: -


\glslabeltok

-

-which contains the entry’s label and -


\glskeylisttok

-

-which contains the values provided in the optional argument of \newabbreviation. -

Remember put \the in front of the register command as in the examples above. -The category label can be access through the command (not a register): -


\glscategorylabel

-

-This may be used inside the definition of \GlsXtrPostNewAbbreviation. -

If you want to base a style on an existing style, you can use -


\GlsXtrUseAbbrStyleSetup{name}

-

-where ⟨name⟩ is the name of the existing style. For example, the long-noshort-sc-desc -style simply does - - - -

-
-\GlsXtrUseAbbrStyleSetup{long-noshort-desc}
-
-

within ⟨setup⟩. -

The ⟨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 shortplural -key): -


\abbrvpluralsuffix

-

-(Note that this isn’t used for the plural long form, which just uses the regular -\glspluralsuffix.) -

The font used for the short form on first use or in the full forms: -


\glsfirstabbrvfont{text}

-

-

The font used for the short form on subsequent use or through commands like -\glsxtrshort: -


\glsabbrvfont{text}

-

-

The font used for the long form on first use or in the full forms: -


\glsfirstlongfont{text}

-

-

The font used for the long form in commands like \glsxtrlong use: -


\glslongfont{text}

-

-

Display full form singular no case-change (used by \gls on first use for -abbreviations without the regular attribute set): -


\glsxtrfullformat{label}{insert}

-

-

Display full form singular first letter converted to upper case (used by \Gls on -first use for abbreviations without the regular attribute set): -


\Glsxtrfullformat{label}{insert}

-

-

Display full form plural no case-change (used by \glspl on first use for -abbreviations without the regular attribute set): -


\glsxtrfullplformat{label}{insert}

- - - -

-

Display full form plural first letter converted to upper case (used by \Glspl on -first use for abbreviations without the regular attribute set): -


\Glsxtrfullplformat{label}{insert}

-

-

In addition ⟨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 \glsentryfull, \glsxtrfull and -\GLSxtrfull): -


\glsxtrinlinefullformat{label}{insert}

-

-

Inline singular first letter converted to upper case (used by \Glsentryfull and -\Glsxtrfull): -


\Glsxtrinlinefullformat{label}{insert}

-

-

Inline plural no case-change (used by \glsentryfullpl, \glsxtrfullpl and -\GLSxtrfullpl): -


\glsxtrinlinefullplformat{label}{insert}

-

-

Inline plural first letter converted to upper case (used by \Glsentryfullpl and -\Glsxtrfullpl): -


\Glsxtrinlinefullplformat{label}{insert}

-

-

(New to version 1.17.) You can also modify the way the subsequent use is -formatted by redefining the following four commands, but these won’t be used for -abbreviations with the regular attribute set. If the style doesn’t redefine these -commands, the default values are used. -

Singular with no case-change: -


\glsxtrsubsequentfmt{label}{insert}

-

-

Singular with first letter upper case: -


\Glsxtrsubsequentfmt{label}{insert}

-

-

Plural with no case-change: -


\glsxtrsubsequentplfmt{label}{insert}

-

- - - -

Plural with first letter upper case: -


\Glsxtrsubsequentplfmt{label}{insert}

-

-

If you want to provide support for glossaries-accsupp use the following -\glsaccessxxx⟩ commands (§13.2 Accessibility Support) within the -definitions of \glsxtrfullformat etc instead of the analogous \glsentryxxx⟩ -commands. (If you don’t use glossaries-accsupp, they will just do the corresponding -\glsentryxxx⟩ command.) -

For example, the short-long style has the following in ⟨fmts⟩: - - - -

-
-  \renewcommand*{\abbrvpluralsuffix}{\glsxtrabbrvpluralsuffix}%
-  \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}\ifglsxtrinsertinside##2\fi}%
-    \ifglsxtrinsertinside\else##2\fi
-    \glsxtrfullsep{##1}%
-    \glsxtrparen{\glsfirstlongfont{\glsaccesslong{##1}}}%
-  }%
-  \renewcommand*{\glsxtrfullplformat}[2]{%
-    \glsfirstabbrvfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}%
-    \ifglsxtrinsertinside\else##2\fi
-    \glsxtrfullsep{##1}%
-    \glsxtrparen{\glsfirstlongfont{\glsaccesslongpl{##1}}}%
-  }%
-  \renewcommand*{\Glsxtrfullformat}[2]{%
-    \glsfirstabbrvfont{\Glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}%
-    \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}%
-    \glsxtrparen{\glsfirstlongfont{\glsaccesslong{##1}}}%
-  }%
-  \renewcommand*{\Glsxtrfullplformat}[2]{%
-    \glsfirstabbrvfont{\Glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}%
-     \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}%
-    \glsxtrparen{\glsfirstlongfont{\glsaccesslongpl{##1}}}%
-  }%
-
-

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 -


\GlsXtrUseAbbrStyleFmts{name}

-

-within ⟨fmts⟩, where ⟨name⟩ is the name of the existing style. For example, the -long-short-desc style has the following in ⟨fmts⟩: - - - -

-
-  \GlsXtrUseAbbrStyleFmts{long-short}%
-
-

-

Here’s an example of an abbreviation style that’s based on long-short that displays -the short form within \textsf: - - - -

-
-\newabbreviationstyle
-{custom-sf}% label
-{% setup
-  \GlsXtrUseAbbrStyleSetup{short-long}%
+
The sentence case commands also check the headuc attribute.

+

+\Glsxtrtitleshort{entry-label}
+ The normal behaviour of \Glsfmtshort. This is redefined by \glsxtrmarkhook to \Glsxtrheadshort. The default is:
\Glsxtrshort[noindex,hyper=false]{entry-label}[]
+
(Again, this is performed indirectly via an internal command that ensures that \glsxtrtitleopts is expanded before being passed in the optional argument.)

+

+\Glsxtrheadshort{entry-label}
+ Used to display the sentence case short form in the page header. This is defined as:
\newcommand*{\Glsxtrheadshort}[1]{%
+ \protect\NoCaseChange
+ {%
+   \glsifattribute{#1}{headuc}{true}%
+   {%
+     \GLSxtrshort[noindex,hyper=false]{#1}[]%
+   }%
+   {%
+     \Glsxtrshort[noindex,hyper=false]{#1}[]%
+   }%
+ }%
+}
+

+

+\GLSxtrtitleshort{entry-label}
+ The normal behaviour of \GLSfmtshort. This is redefined by \glsxtrmarkhook to \GLSxtrheadshort. The default uses \GLSxtrshort in a similar way to \glsxtrtitleshort and \Glsxtrtitleshort.

+

+\GLSxtrheadshort{entry-label}
+ Used to display the all caps short form in the page header. In this case, there’s no need to check to the headuc attribute, but the label needs to be protected from any potential case-change:
\newcommand*{\GLSxtrheadshort}[1]{%
+ \protect\NoCaseChange
+ {%
+   \GLSxtrshort[noindex,hyper=false]{#1}[]%
+ }%
+}
+

+All the similar commands listed below are defined in an analogous way, except for the glossaries-prefix commands, where only the sentence case title version is provided. This is because commands like \Pglsfmtshort have to determine whether or not to use \glsfmtshort or \Glsfmtshort depending on whether or not the prefix has been set. Whereas commands like \pglsfmtshort simply need to insert the prefix and separator if set and then use the corresponding \glsfmtshort.

+

+\Pglsxtrtitleshort{entry-label}

+

+
+ The normal behaviour of \Pglsfmtshort.

+

+\Pglsxtrtitleshortpl{entry-label}

+

+
+ The normal behaviour of \Pglsfmtshortpl.

+

+\Pglsxtrtitlelong{entry-label}

+

+
+ The normal behaviour of \Pglsfmtlong.

+

+\Pglsxtrtitlelongpl{entry-label}

+

+
+ The normal behaviour of \Pglsfmtlongpl.

+

+

+\glsxtrtitleshortpl{entry-label}
+ The title plural short form. (Normal behaviour of \glsfmtshortpl.)

+

+\glsxtrheadshortpl{entry-label}
+ The header plural short form. (The behaviour of \glsfmtshortpl when it occurs in a header.)

+

+\Glsxtrtitleshortpl{entry-label}
+ The title plural sentence case short form. (Normal behaviour of \Glsfmtshortpl.)

+

+\Glsxtrheadshortpl{entry-label}
+ The header plural sentence case short form. (The behaviour of \Glsfmtshortpl when it occurs in a header.)

+

+\GLSxtrtitleshortpl{entry-label}
+ The title plural all caps short form. (Normal behaviour of \GLSfmtshortpl.)

+

+\GLSxtrheadshortpl{entry-label}
+ The header plural all caps short form. (The behaviour of \GLSfmtshortpl when it occurs in a header.)

+

+

+\glsxtrtitlelong{entry-label}
+ The title long form. (Normal behaviour of \glsfmtlong.)

+

+\glsxtrheadlong{entry-label}
+ The header long form. (The behaviour of \glsfmtlong when it occurs in a header.)

+

+\Glsxtrtitlelong{entry-label}
+ The title sentence case long form. (Normal behaviour of \Glsfmtlong.)

+

+\Glsxtrheadlong{entry-label}
+ The header sentence case long form. (The behaviour of \Glsfmtlong when it occurs in a header.)

+

+\GLSxtrtitlelong{entry-label}
+ The title all caps long form. (Normal behaviour of \GLSfmtlong.)

+

+\GLSxtrheadlong{entry-label}
+ The header all caps long form. (The behaviour of \GLSfmtlong when it occurs in a header.)

+

+

+\glsxtrtitlelongpl{entry-label}
+ The title plural long form. (Normal behaviour of \glsfmtlongpl.)

+

+\glsxtrheadlongpl{entry-label}
+ The header plural long form. (The behaviour of \glsfmtlongpl when it occurs in a header.)

+

+\Glsxtrtitlelongpl{entry-label}
+ The title plural sentence case long form. (Normal behaviour of \Glsfmtlongpl.)

+

+\Glsxtrheadlongpl{entry-label}
+ The header plural sentence case long form. (The behaviour of \Glsfmtlongpl when it occurs in a header.)

+

+\GLSxtrtitlelongpl{entry-label}
+ The title plural all caps long form. (Normal behaviour of \GLSfmtlongpl.)

+

+\GLSxtrheadlongpl{entry-label}
+ The header plural all caps long form. (The behaviour of \GLSfmtlongpl when it occurs in a header.)

+

+

+\glsxtrtitlefull{entry-label}
+ The title full form. (Normal behaviour of \glsfmtfull.)

+

+\glsxtrheadfull{entry-label}
+ The header full form. (The behaviour of \glsfmtfull when it occurs in a header.)

+

+\Glsxtrtitlefull{entry-label}
+ The title sentence case full form. (Normal behaviour of \Glsfmtfull.)

+

+\Glsxtrheadfull{entry-label}
+ The header sentence case full form. (The behaviour of \Glsfmtfull when it occurs in a header.)

+

+\GLSxtrtitlefull{entry-label}
+ The title all caps full form. (Normal behaviour of \GLSfmtfull.)

+

+\GLSxtrheadfull{entry-label}
+ The header all caps full form. (The behaviour of \GLSfmtfull when it occurs in a header.)

+

+

+\glsxtrtitlefullpl{entry-label}
+ The title plural full form. (Normal behaviour of \glsfmtfullpl.)

+

+\glsxtrheadfullpl{entry-label}
+ The header plural full form. (The behaviour of \glsfmtfullpl when it occurs in a header.)

+

+\Glsxtrtitlefullpl{entry-label}
+ The title plural sentence case full form. (Normal behaviour of \Glsfmtfullpl.)

+

+\Glsxtrheadfullpl{entry-label}
+ The header plural sentence case full form. (The behaviour of \Glsfmtfullpl when it occurs in a header.)

+

+\GLSxtrtitlefullpl{entry-label}
+ The title plural all caps full form. (Normal behaviour of \GLSfmtfullpl.)

+

+\GLSxtrheadfullpl{entry-label}
+ The header plural all caps full form. (The behaviour of \GLSfmtfullpl when it occurs in a header.)

+

+

+\glsxtrtitlename{entry-label}
+ The title name field. (Normal behaviour of \glsfmtname.)

+

+\glsxtrheadname{entry-label}
+ The header name field. (The behaviour of \glsfmtname when it occurs in a header.)

+

+\Glsxtrtitlename{entry-label}
+ The title sentence case name field. (Normal behaviour of \Glsfmtname.)

+

+\Glsxtrheadname{entry-label}
+ The header sentence case name field. (The behaviour of \Glsfmtname when it occurs in a header.)

+

+\GLSxtrtitlename{entry-label}
+ The title all caps name field. (Normal behaviour of \GLSfmtname.)

+

+\GLSxtrheadname{entry-label}
+ The header all caps name field. (The behaviour of \GLSfmtname when it occurs in a header.)

+

+

+\glsxtrtitletext{entry-label}
+ The title text field. (Normal behaviour of \glsfmttext.)

+

+\glsxtrheadtext{entry-label}
+ The header text field. (The behaviour of \glsfmttext when it occurs in a header.)

+

+\Glsxtrtitletext{entry-label}
+ The title sentence case text field. (Normal behaviour of \Glsfmttext.)

+

+\Glsxtrheadtext{entry-label}
+ The header sentence case text field. (The behaviour of \Glsfmttext when it occurs in a header.)

+

+\GLSxtrtitletext{entry-label}
+ The title all caps text field. (Normal behaviour of \GLSfmttext.)

+

+\GLSxtrheadtext{entry-label}
+ The header all caps text field. (The behaviour of \GLSfmttext when it occurs in a header.)

+

+

+\glsxtrtitleplural{entry-label}
+ The title plural field. (Normal behaviour of \glsfmtplural.)

+

+\glsxtrheadplural{entry-label}
+ The header plural field. (The behaviour of \glsfmtplural when it occurs in a header.)

+

+\Glsxtrtitleplural{entry-label}
+ The title sentence case plural field. (Normal behaviour of \Glsfmtplural.)

+

+\Glsxtrheadplural{entry-label}
+ The header sentence case plural field. (The behaviour of \Glsfmtplural when it occurs in a header.)

+

+\GLSxtrtitleplural{entry-label}
+ The title all caps plural field. (Normal behaviour of \GLSfmtplural.)

+

+\GLSxtrheadplural{entry-label}
+ The header all caps plural field. (The behaviour of \GLSfmtplural when it occurs in a header.)

+

+

+\glsxtrtitlefirst{entry-label}
+ The title first field. (Normal behaviour of \glsfmtfirst.)

+

+\glsxtrheadfirst{entry-label}
+ The header first field. (The behaviour of \glsfmtfirst when it occurs in a header.)

+

+\Glsxtrtitlefirst{entry-label}
+ The title sentence case first field. (Normal behaviour of \Glsfmtfirst.)

+

+\Glsxtrheadfirst{entry-label}
+ The header sentence case first field. (The behaviour of \Glsfmtfirst when it occurs in a header.)

+

+\GLSxtrtitlefirst{entry-label}
+ The title all caps first field. (Normal behaviour of \GLSfmtfirst.)

+

+\GLSxtrheadfirst{entry-label}
+ The header all caps first field. (The behaviour of \GLSfmtfirst when it occurs in a header.)

+

+

+\glsxtrtitlefirstplural{entry-label}
+ The title firstplural field. (Normal behaviour of \glsfmtfirstpl.)

+

+\glsxtrheadfirstplural{entry-label}
+ The header firstplural field. (The behaviour of \glsfmtfirstpl when it occurs in a header.)

+

+\Glsxtrtitlefirstplural{entry-label}
+ The title sentence case firstplural field. (Normal behaviour of \Glsfmtfirstpl.)

+

+\Glsxtrheadfirstplural{entry-label}
+ The header sentence case firstplural field. (The behaviour of \Glsfmtfirstpl when it occurs in a header.)

+

+\GLSxtrtitlefirstplural{entry-label}
+ The title all caps firstplural field. (Normal behaviour of \GLSfmtfirstpl.)

+

+\GLSxtrheadfirstplural{entry-label}
+ The header all caps firstplural field. (The behaviour of \GLSfmtfirstpl when it occurs in a header.)

+The definitions of \markright, \markboth and \@starttoc are saved (using \let) when glossaries-extra loads.

+\@glsxtr@org@markright{text}
+ The previous definition of \markright.

+

+\@glsxtr@org@markboth{left text}{right text}
+ The previous definition of \markboth.

+

+\@glsxtr@org@@starttoc{toc}
+ The previous definition of \@starttoc.

+The glossaries-extra definitions of \markright, \markboth and \@starttoc all start and end with hooks that redefine commands that are sensitive to being in the header or contents.

+\glsxtrmarkhook
+ This saves the original definitions and redefines the sensitive commands. This includes \MakeUppercase which is \let to \MakeTextUppercase.

+

+\@glsxtrinmark
+ This redefines \glsxtrifinmark to just do its first argument (true).
+\@glsxtrnotinmark
+ This redefines \glsxtrifinmark to just do its second argument (false).
+\glsxtrrestoremarkhook
+ This restores the sensitive commands to the saved definitions. (For use where grouping will cause interference.) For example, \markboth is redefined as:
\renewcommand*{\markboth}[2]{%
+ \glsxtrmarkhook
+ \@glsxtr@org@markboth
+   {\@glsxtrinmark#1\@glsxtrnotinmark}%
+   {\@glsxtrinmark#2\@glsxtrnotinmark}%
+ \glsxtrrestoremarkhook
+}
+

+ + + +

+

5.4. Nested Links

+

+Complications arise when you use the \gls-like commands in the value of the name field (or text or 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.

+For example, things can go wrong if the following is used with the glossaries package:

\newacronym{ssi}{SSI}{Server Side Includes}
+\newacronym{html}{HTML}{Hypertext Markup Language}
+\newacronym{shtml}{S\gls{html}}{\gls{ssi} enabled \gls{html}}
+

+The main problems are: +

    +
  1. 1. With older versions of mfirstuc and glossaries, the sentence case commands, such as \Gls, won’t work for the shtml entry on first use if the long form is displayed before the short form (which is the default abbreviation style). This will attempt to do
    \gls{\uppercase ssi} enabled \gls{html}
    +
    which just doesn’t work. Grouping the \gls{ssi} doesn’t work either as this will effectively try to do:
    \uppercase{\gls{ssi}} enabled \gls{html}
    +
    This will upper case the label ssi so the entry won’t be recognised. This problem will also occur if you use the all caps version, such as \GLS{shtml}.

    +With mfirstuc v2.08+ and glossaries v1.49+, this issue should now be resolved for sentence case where \gls{ssi} will be mapped to \Gls{ssi} within \Gls{shtml}. The all caps command \GLS{shtml} will treat \gls as an exclusion and so won’t perform a case-change. See §5.2 for further details.

    +

  2. 2. The long and abbreviated forms accessed through \glsentrylong and \glsentryshort are no longer expandable and so can’t be used be used in contexts that require this, such as PDF bookmarks.

    +

  3. 3. The nested commands may end up in the sort key, which will confuse the indexing.

    +

  4. 4. The shtml entry produces inconsistent results depending on whether the ssi or html entries have been used. Suppose both ssi and html are used before shtml. For example: +

    +

    +This section discusses 
    +\gls{ssi}, \gls{html} and
    +\gls{shtml}.
    +
    This section discusses server side includes (SSI), hypertext markup language (HTML) and SSI enabled HTML (SHTML).

    + In the above, the first use of the shtml entry produces “SSI enabled HTML (SHTML)”.

    +Now let’s suppose the html entry is used before the shtml but the ssi entry is used after the shtml entry, for example:

    +

    +

    +The sample files are
    +either \gls{html} or 
    +\gls{shtml}, but let's
    +first discuss \gls{ssi}.
    +
    The sample files are either hypertext markup language (HTML) or server side includes (SSI) enabled HTML (SHTML), but let’s first discuss SSI.

    + In this case, the first use of the shtml entry now produces “server side includes (SSI) enabled HTML (SHTML)”, which looks a bit cumbersome.

    +Now let’s suppose the shtml entry is used before (or without) the other two entries:

    +

    +

    +This article is an introduction 
    +to \gls{shtml}.
    +
    This article is an introduction to server side includes (SSI) enabled hypertext markup language (HTML) (SHTML).

    + Now the first use of the shtml entry produces “server side includes (SSI) enabled hypertext markup language (HTML) (SHTML)”, which looks strange.

    +This is all aggravated when using just the base glossaries package when the acronym style is set with \setacronymstyle. For example:

    \setacronymstyle{long-short}
    +
    as this references the label through the use of \glslabel when displaying the long and short forms, but this value changes with each use of \gls, so instead of displaying “(SHTML)” at the end of the first use, it now displays “(HTML)”, since \glslabel has been changed to html by \gls{html}.

    +

    +In v1.48, the glossaries-extra package added grouping with \glslinkwrcontent, which scoped the link text. Unfortunately this grouping caused problems in math mode and had to be removed in v1.49. You can redefine \glslinkwrcontent to put the grouping back, but it still won’t scope the definitions of the placeholder commands, such as \glslabel, which need to be outside of this scope for the benefit of the post-link hook.
    +

    +Another oddity occurs if you reset the html entry between uses of the shtml entry. For example:

    \gls{shtml} ... \glsreset{html}\gls{shtml}
    +
    The next use of shtml produces “Shypertext markup language (HTML)”, which is downright weird. (This is a result of the short form being set to S\gls{html}, but \gls{html} is showing the full form.)

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

    +

  5. 5. Each time the shtml entry is used, the html entry will also be indexed and marked as used, and on first use this will happen to both the ssi and html entries. This kind of duplication in the location list isn’t usually particularly helpful to the reader.

    +

  6. 6. If 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 first use case, the user clicks on the “HTML” part of the “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.

    + +

+

+For these reasons, with just the base glossaries package, it’s better to use the simple expandable commands like \glsentrytext or \glsentryshort in the definition of other entries.

+The glossaries-extra package provides two other ways of dealing with these problems: +

    +
  1. 1.If the term can simply be treated as a series of previously defined entries, then consider using multi-entries (or compound sets), as described in §7. This deals with all the issues, including case-changing.

    +

  2. 2.Use the partially-expandable \glsxtrp, described below. +
+

+

+\glsxtrp{field}{entry-label}
+ where field is the internal field label.

+This command partially expands, so it will expand to just the field value if it occurs in the PDF bookmarks. Otherwise it will behave much like the commands described in §5.3.2, but with additional outer scoping and the post-link hook is suppressed.

+Rather than testing the existence of the given field, this tests the existence of \glsfield or \glsxtrfield, which means that it may be confused if the field argument is set to something that isn’t a field but happens to match either of those command names (such as full).

+Note that, as with commands like \glsfmtshort, there’s no optional argument. The default settings are noindex and hyper=false. You can change this with:

+\glsxtrsetpopts{options}
+ The argument should be the new default options.

+At the start of each glossary, the default options are locally changed with:

+\glossxtrsetpopts
+ This is defined as:
\newcommand*{\glossxtrsetpopts}{%
+  \glsxtrsetpopts{noindex}%
+}
+
This allows hyperlinks for any instance of \glsxtrp that occurs in the name or description, where it shouldn’t be problematic.

+There are some shortcut commands for the most common fields:

+\glsps{entry-label}
+ which is equivalent to \glsxtrp{short}{entry-label}, and
+\glspt{entry-label}
+ which is equivalent to \glsxtrp{text}{entry-label}.

+There are also sentence case and all caps versions.

+\Glsxtrp{field}{entry-label}
+ This uses the corresponding sentence case command \Glsfield or \Glsxtrfield.

+

+\GLSxtrp{field}{entry-label}
+ This uses the corresponding all caps command \GLSfield or \GLSxtrfield.

+For example:

\documentclass{article}
+\usepackage[colorlinks]{hyperref}
+\usepackage{glossaries-extra}
+\setabbreviationstyle{long-em-short-em}
+\newabbreviation{html}{HTML}{hypertext markup language}
+\newabbreviation{ssi}{SSI}{server-side includes}
+\newabbreviation{shtml}{SHTML}{\glsps{html} enabled
+\glsps{ssi}}
+\begin{document}
+\tableofcontents
+\section{\glsfmtlong{shtml}}
+First use: \gls{shtml}, \gls{html}, \gls{ssi}.
+
+Next use: \gls{shtml}, \gls{html}, \gls{ssi}.
+
+\printunsrtglossaries
+\end{document}
+
+Example 95: Nested link text with \glspl 📥🖹 📥🖺

+Example document illustrating an entry that references other entries within one of its fields.

+

+The way that this works is as follows: +

+

+Note that in the above example, with older versions of mfirstuc and glossaries, it’s not possible to use \Glsxtrlong{shtml} or similar. The problem here is that it will attempt to do:

\makefirstuc{\glsps{html} enabled \glsps{ssi}}
+
This will essentially end up as:
\glsps{\uppercase html} enabled \glsps{ssi}
+
which doesn’t work. If you want to protect against automated case-changes, such as using the glossdesc attribute, insert an empty brace at the start:
\newabbreviation{shtml}{SHTML}{{}\glsps{html} enabled
+\glsps{ssi}}
+
Alternatively, upgrade to mfirstuc v2.08+ and glossaries v4.50+. See §5.2.

+ +

+ +
+

5.5. Adjusting the Text Style

+

+The \gls-like and \glstext-like commands produce text that’s essentially formatted either as (hyperoutside=true):

hyper-cs{target}{textformat-cs{content}}post-link hook
+
or (hyperoutside=false):
textformat-cs{hyper-cs{target}{content}}post-link hook
+
If hyperlinks are enabled then hyper-cs creates the hyperlink based on target with the hyperlink text given by the second argument. If hyperlinks aren’t enabled then hyper-cs ignores the target argument and simply does the second argument.

+The content part is the link text, which includes the final optional insert (if supplied). The actual content depends on the command used (for example, \gls or \glstext). The \gls-like commands all use the entry display style associated with the entry’s glossary type, (see §5.5.5). The \glstext-like commands set the content to the corresponding field value with the insert appended, all encapsulated with the inner formatting (see §5.5.3), with appropriate case-changing, if required.

+The abbreviation commands (\glsxtrshort, \glsxtrlong, \glsxtrfull etc) are considered part of the set of \glstext-like commands, but the content is set according to the abbreviation style (see §4.5).

+The commands \glsdisp and \glslink both have the content part explicitly set in their final argument. There’s no insert optional argument as it can simply be included in the content part. The difference between them is that \glsdisp is considered a \gls-like command (it unsets the first use flag, §5.10, and uses the entry display style, §5.5.5), whereas \glslink is considered a \glstext-like command.

+The post-link hook part is described in §5.5.4.

+The textformat-cs command is the outer formatting command, described in §5.5.1. This doesn’t include the post-link hook. If you want to include the post-link hook then you need to encapsulate the entire \gls-like and \glstext-like command (including the final optional argument, if present, and following punctuation, if the post-link hook looks ahead for punctuation).

+Some sensitive formatting commands need to have the actual text in their argument (or else have the argument in an unbreakable box). The content part is usually too complicated for these commands. To help support this type of command, there is also an inner format, which is described in §5.5.3. In general, unless you require one of these sensitive commands, avoid setting the inner text format as it requires support from the underlying style (either the entry format style or the abbreviation style), which may not be available.

+The following example document is ugly, but demonstrates the outer formatting (typewriter font), middle formatting (bold for regular entries and italic for abbreviations), inner formatting (highlighted in yellow), hyperlinks (red), and the category post-link hook (the description follows in parentheses for general entries on first use).

\usepackage{courier}
+\usepackage[T1]{fontenc}
+\usepackage{xcolor}
+\usepackage{soul}
+\usepackage[colorlinks]{hyperref}
+\usepackage[nogroupskip]{glossaries-extra}
+% outer formatting:
+\renewcommand{\glstextformat}[1]{\texttt{#1}}
+% middle formatting:
+\renewcommand{\glsxtrregularfont}[1]{\textbf{#1}}
+\renewcommand{\glsxtrabbreviationfont}[1]{\textit{#1}}
+% inner formatting:
+\renewcommand{\glsxtrdefaultentrytextfmt}[1]{\hl{#1}}
+% post-link hook for 'general' category:
+\glsdefpostlink{general}{\glsxtrpostlinkAddDescOnFirstUse}
+% define entries:
+\newglossaryentry{sample}{name={sample},description={an example}}
+\newabbreviation{html}{HTML}{hypertext markup language}
+\newacronym{nasa}{NASA}{National Aeronautics and Space Administration}
+\begin{document}
+First use: \gls{sample}, \gls{html}, \gls{nasa}.
+
+Next use: \gls{sample}, \gls{html}, \gls{nasa}.
+\printunsrtglossaries
+\end{document}
+
This produces:
+Example 96: Link text styles: outer, middle, inner, hyperlinks and post-link hook 📥🖹 📥🖺

+An example document that illustrates the outer, middle and inner formatting, hyperlinks and a category post-link hook.

+ Note that the hyperlink, outer and middle formatting aren’t applied to the post-link hook. The acronym category has the short-nolong abbreviation style, which sets the regular attribute to true. This means that the NASA entry uses the regular middle format (\glsxtrregularfont) not the abbreviation middle format (\glsxtrabbreviationfont).

+If you have a formatting command that needs to have its argument fully-expanded before being applied, you may be able to use:

+\GlsXtrExpandedFmt{cs}{content}
+ This fully-expands content and does cs{expanded-content}, where cs is a command that takes a single argument. For example, to use soul’s underlining command \ul:
\renewcommand{\glsxtrregularfont}[1]{\GlsXtrExpandedFmt{#1}}
+
(See Example 117.) This isn’t guaranteed to work as the link text may contain fragile content.

+The inner formatting can be unpredictable. For example, abbreviation styles are complicated and so the inner formatting command is included in some of the field values, such as the name, which is why the abbreviation name is highlighted in the glossary. In the above example, the inner formatting is included in the category post-link hook, but only because \glsxtrpostlinkAddDescOnFirstUse is designed to include it. If the category post-link hook was simply defined as:

\glsdefpostlink{general}{%
+ \glsxtrifwasfirstuse{ (\glsentrydesc{\glslabel})}{}}
+
then the inner formatting won’t be applied, since it’s not included in the hook. This is demonstrated in a slightly modified version of the above document (initial part of preamble that deals with loading packages and redefining formatting commands as before):
% post-link hook for 'general' category:
+\glsdefpostlink{general}{%
+ \glsxtrifwasfirstuse{ (\glsentrydesc{\glslabel})}{}}
+% this style sets the post-link hook for 'abbreviation' category:
+\setabbreviationstyle{long-postshort-user}
+% this style sets the post-link hook for 'acronym' category:
+\setabbreviationstyle[acronym]{short-postfootnote}
+% define entries:
+\newglossaryentry{sample}{name={sample},description={an example}}
+\newabbreviation{html}{HTML}{hypertext markup language}
+\newacronym{nasa}{NASA}{National Aeronautics and Space Administration}
+\begin{document}
+First use: \gls{sample}, \gls{html}, \gls{nasa}.
+
+Next use: \gls{sample}, \gls{html}, \gls{nasa}.
+\printunsrtglossaries
+\end{document}
+
This produces:
+Example 97: Link text styles: outer, middle, inner, hyperlinks and post-link hooks (custom and abbreviation style) 📥🖹 📥🖺

+An example document that illustrates the outer, middle and inner formatting, and hyperlinks, with a custom category post-link hook and abbreviation style that sets the category post-link hook.

+ The “post” abbreviation styles put some content into the post-link hook and provide support for the inner formatting. The above example sets the abbreviation style to long-postshort-user. This sets up the post-link hook for the associated category (abbreviation, in this case) to show the parenthetical material. Be aware that this will override any previous definition of that hook. This style supports the inner formatting (so the parenthetical material is highlighted).

+Similarly, the short-postfootnote style is applied to the acronym category, and sets the post-link hook for that category (which looks head for punctuation). The inner formatting is applied to the footnote text but not the marker.

+The post-link hook for the general category is now much simpler and doesn’t include support for the inner formatting, so it’s not highlighted.

+None of the post-link content is incorporated into the hyperlink, outer or middle formatting.

+In general, it’s better to adjust the abbreviation’s style commands (see §4.5.1.3) rather than use the middle or inner formatting if abbreviations need to be displayed in a particular font.

+ +

+ +
+

5.5.1. Outer Formatting

+

+By default, the outer formatting is produced with \glstextformat, which is defined by the base glossaries package. However it can be replaced by the textformat category attribute or by the textformat option. The order of precedence (not cumulative) is: the option supplied to the \gls-like or \glstext-like command, the category attribute, \glstextformat.

+For example:

\usepackage[colorlinks]{hyperref}
+\usepackage{glossaries-extra}
+\glsdefpostlink{general}{ (\glsentrydesc{\glslabel})}
+\newglossaryentry{sample}{name={sample},description={an example}}
+\newcommand{\strong}[1]{\textbf{\color{green}#1}}
+\renewcommand{\glstextformat}[1]{\emph{#1}}
+\begin{document}
+\gls{sample}[-insert]. \strong{\gls{sample}[-insert]}.
+
+\glssetcategoryattribute{general}{textformat}{strong}
+\gls{sample}[-insert].
+\gls[hyperoutside=false]{sample}[-insert].
+
+\gls[textformat=textsf]{sample}[-insert].
+\end{document}
+
+Example 98: Changing the outer text format 📥🖹 📥🖺

+Example document illustrating the difference between \glstextformat, the textformat category attribute, and the textformat option.

+ The red text colour is from the hyperlink (red is the default with hyperref’s colorlinks option). The green from the custom \strong command is cancelled by the hyperlink colour change when the hyperlink is inside \strong.

+After the textformat attribute is set, the \glstextformat command isn’t used, which is why the remaining lines don’t have any italic. The final line uses the textformat option, which overrides the textformat attribute, so neither \glstextformat nor the custom \strong are used.

+Note that the only time that the post-link hook is included in the formatting is when the entire \gls command has been encapsulated.

+ +

+ +
+

5.5.2. Middle Formatting

+

+The middle formatting comes between the outer formatting (§5.5.1 above) and the inner formatting5.5.3 below).

+The middle formatting is implemented by the entry format style (§5.5.5) for the \gls-like commands or is initialised by \glsxtrassignfieldfont for the \glstext-like commands.

+If you provide your own custom entry format style you will need to add support for the middle formatting, if required.

+

+\glsxtrregularfont{text}
+ The command to use for regular entries. This is initialised to just do its argument.

+

+\glsxtrabbreviationfont{text}
+ The command to use for abbreviations that considered non-regular entries.

+The following document has a regular entry (sample), a regular abbreviation (radar, which uses short-nolong the default acronym style), and a non-regular abbreviation (HTML, which uses long-short the default abbreviation style):

\newglossaryentry{sample}{name={sample},description={an example}}
+\newabbreviation{html}{HTML}{hypertext markup language}
+\newacronym{radar}{radar}{radio detection and ranging}
+\renewcommand{\glsxtrregularfont}[1]{\emph{#1}}
+\renewcommand{\glsxtrabbreviationfont}[1]{\textbf{#1}}
+\begin{document}
+\gls{sample}, \gls{html}, \gls{radar}.
+\end{document}
+
+Example 99: Middle formatting 📥🖹 📥🖺

+Example document illustrating middle formatting applied with \glsxtrregularfont for regular entries and \glsxtrabbreviationfont for non-regular abbreviations.

+ Note that even though radar is an abbreviation, it’s considered a regular entry because it uses a regular style.

+

+\glsxtrassignfieldfont{entry-label}
+ This command is used by all the \glstext-like commands to initialise the internal command used to encapsulate the field value. This will either be set to \glsxtrregularfont (for regular entries) or \@firstofone otherwise.

+Note that this doesn’t use \glsxtrabbreviationfont as non-regular abbreviations are too complicated to work with \glstext, \glsfirst, \glsplural, \glsfirstplural or their case-changing variants. Instead, use the \gls-like commands or the abbreviation commands, such as \glsxtrshort.

+ +

+ +
+

5.5.3. Inner Formatting

+

+If you want to format the link text, the best method is to either use the outer formatting or encapsulate the entire \gls-like or \glstext-like command, as described in §5.5.1. However, there are some sensitive commands that don’t work if the command argument doesn’t simply contain text.

+

+Sometimes the issue may occur when the sensitive command that needs to encapsulate \gls doesn’t like boolean variables being changed (which occurs when the first use flag is unset). If this is the case, you may want to consider buffering as an alternative (see §5.10.1).
+

+For example, if the sample document from §5.5.1 is adjusted to include the soul package and the following line is added to the document:

\gls[textformat=hl]{sample}
+
then the document build will fail with the error:
! Package soul Error: Reconstruction failed.
Once solution is to do the following instead:
\hl{\mbox{\gls{sample}}}
+
This will now work, but the box will prevent hyphenation, so it’s only useful if the link text is short, such as a symbol. If the link text is long (such as a phrase or the first use of an abbreviation), this method can produce undesirable results with overfull or underfull lines.

+The inner formatting is designed to provide a workaround, but it must be implemented deep within the entry style formatting. This means that if you provide your own custom style, you will need to add the appropriate commands if you want that style to support inner formatting. You may also need to switch to using \MFUsentencecase instead of \makefirstuc if any of the sentence case commands are required:

\renewcommand{\glssentencecase}[1]{\MFUsentencecase{#1}}
+
Although there’s no guarantee that this will work for some particularly problematic formatting commands.

+With the default entry style, the above example can be changed to:

\gls[innertextformat=hl]{sample}
+

+

+The inner formatting may be split up in order to move them into the arguments of internal commands, such as those used for case-changing. This can result in unwanted side-effects.
+

+The following uses \fbox (which draws a frame around its argument) and soul’s \so (which spaces out the letters):

% requires glossaries.sty v4.50+ and mfirstuc v2.08+
+\renewcommand{\glssentencecase}[1]{\MFUsentencecase{#1}}
+\newacronym{radar}{radar}{radio detection and ranging}
+\begin{document}
+\Gls[innertextformat=fbox]{radar}['s] system\ldots
+
+\Gls[innertextformat=so]{radar}['s] system\ldots
+
+\fbox{\Gls{radar}['s]} system\ldots
+
+\so{\mbox{\Gls{radar}['s]}} system\ldots
+\end{document}
+
+Example 100: Inner formatting 📥🖹 📥🖺

+Example document illustrating inner formatting.

+ Note the fragmentation of the inner formatting. The use of \mbox in the final line prevents an error but the letters aren’t spaced out. The only way to deal with this case is to use \glsdisp or \glslink with the text explicitly written:
\glslink{radar}{\so{Radar's}} system\ldots
+

+

+The above example requires mfirstuc v2.08+.
+

+Below are the commands used to support inner formatting.

+

+\glsxtrgenentrytextfmt
+ This is the command that’s used to encapsulate any content that should have the inner formatting applied. It should not be redefined within the document as it’s initialised within the \gls-like and \glstext-like commands. It’s used within \glsgenentryfmt and included in the helper commands used by the predefined abbreviation styles.

+Sometimes it may be necessary to include \glsxtrgenentrytextfmt within the actual field value to ensure that it’s as close as possible to the text. This is performed automatically when an entry is defined if the encapinnerfmt or encapnocaseinnerfmt attributes are set. Note that even in this case, fragmentation will occur with sentence case commands like \Gls or with the insert optional argument, as in the above example with \fbox and \so.

+

+\glsxtrdefaultentrytextfmt{text}
+ This is the default command that \glsxtrgenentrytextfmt will be \let to within the \gls-like and \glstext-like commands before their options are processed. This simply does its argument but may be redefined. (See Example 117.)

+

+\glsxtrattrentrytextfmt{text}
+ This command applies formatting according to whether or not the innertextformat attribute is set. It isn’t used by default as it should rarely be needed and increases complexity. However, if you would like to provide support for the innertextformat attribute, you can redefine \glsxtrdefaultentrytextfmt to use \glsxtrattrentrytextfmt:
\renewcommand{\glsxtrdefaultentrytextfmt}{\glsxtrattrentrytextfmt}
+

+

+This command expects the entry label to be stored in \glslabel (from which it obtains the category label).
+

+The \gls-like commands use \glsxtrgenentrytextfmt within \glsgenentryfmt for regular entries or within the abbreviation style commands for non-regular abbreviations (see §5.5.5).

+The \glstext-like commands all essentially perform the following steps: +

    +
  1. 1.Initialise the middle formatting command field-font-cs used for encapsulating the field with \glsxtrassignfieldfont (see §5.5.2).

    +

  2. 2.If \glsifapplyinnerfmtfield indicates that the field value should be encapsulated by \glsxtrgenentrytextfmt, then this essentially does (or appropriate case-change equivalent):
    field-font-cs{\glsaccessfmtfield{insert}{\glsxtrgenentrytextfmt}{entry-label}{internal-field}}
    +
    otherwise it does:
    field-font-cs{\glsaccessfield{entry-label}\glsxtrgenentrytextfmt{insert}}
    +
    (See §9 for the “access” commands.) +
+

+For example, the link text for \glstext is:

\glsifapplyinnerfmtfield{entry-label}{text}%
+{%
+ field-font-cs{\glsaccessfmttext{insert}{\glsxtrgenentrytextfmt}{entry-label}}%
 }%
-{% fmts
-  \GlsXtrUseAbbrStyleFmts{short-long}%
-  \renewcommand*{\glsabbrvfont}[1]{\textsf{##1}}%
+{%
+ field-font-cs{\glsaccesstext{entry-label}\glsxtrgenentrytextfmt{insert}}%
+}
+
The \glsaccessfmtfield commands internally use \glsfmtfield to apply the inner formatting.

+

+\glsifapplyinnerfmtfield{entry-label}{internal-field}{true}{false}
+ This determines whether or not the field identified by its internal field label for the given entry should have its value encapsulated by the inner formatting command. False indicates that the field value already contains the inner formatting command.

+

+\glsexclapplyinnerfmtfield{entry-label}{internal-field}
+ Locally adds the given field identified by its internal field label to the exclusion list for the given entry.

+

+\glsfmtfield{insert}{cs}{entry-label}{internal-field}
+ This command applies the formatting command cs (which takes one argument) to the entry’s field value identified by the given internal field label, including insert appended. This ensures that the internal control sequence used to store the field’s value is expanded before cs is applied.

+

+\Glsfmtfield{insert}{cs}{entry-label}{internal-field}
+ As above but sentence case.

+

+\GLSfmtfield{insert}{cs}{entry-label}{internal-field}
+ As above but all caps.

+ +

+ +
+

5.5.4. Post Link Hook

+

+The post-link hook is a convenient way of automatically appending content after each instant of the \gls-like and \glstext-like commands. The simplest method of implementing this is with the category post-link hook, which is only applied to entries that have the given category. For example, the following will place an asterisk (*) after all entries with the default general category:

\glsdefpostlink{general}{*}
+\newglossaryentry{sample}{name={sample},symbol={X},
+ description={an example}}
+\begin{document}
+\Gls{sample}, \glstext{sample}, \glsdesc{sample} 
+and \glssymbol{sample}.
+\end{document}
+
+Example 101: Category post-link hook 📥🖹 📥🖺

+Example document illustrating a simple category post-link hook.

+ Typically, the category post-link hook is more likely to include some conditional, such as to only insert text on first use. For example, \glsxtrpostlinkAddDescOnFirstUse can be used to insert the description in parentheses after the first use.

+

+The “post” abbreviation styles all set the category post-link hook, which will overwrite any previous definition for the abbreviation’s category.
+

+Within the post-link hook, you can use the placeholder commands, such as \glslabel (see §5.5.5), but note that you can’t use \ifglsused to determine whether or not the entry has been used, since the post-link hook comes after the entry has been unset. Instead, use \glsxtrifwasfirstuse. Additional commands provided for use within the post-link hooks are described in this section.

+The post-link hook is implemented with \glspostlinkhook, which is defined by the base glossaries package. It’s used at the end of the \gls-like and \glstext-like commands. The original base definition does nothing, but glossaries-extra redefines this:

\renewcommand*{\glspostlinkhook}{%
+ \ifglsentryexists{\glslabel}{\glsxtrpostlinkhook}{}%
+}
+
This uses:
+\glsxtrpostlinkhook
+ which is the main glossaries-extra post-link hook.

+

+If you are migrating over from only using the base glossaries package and you have redefined \glspostlinkhook, consider moving your modifications to the category post-link hook or prepend to \glsxtrpostlink, as some attributes and abbreviation styles rely on the features provided by \glsxtrpostlinkhook.
+

+The main post-link hook is defined as:

\newcommand*{\glsxtrpostlinkhook}{%
+ \glsxtrdiscardperiod{\glslabel}%
+ {\glsxtrpostlinkendsentence}%
+ {\glsxtrifcustomdiscardperiod
+  {\glsxtrifperiod{\glsxtrpostlinkendsentence}{\glsxtrpostlink}}%
+  {\glsxtrpostlink}%
+ }%
 }
-
-

Note that this wouldn’t work if it was instead based on one of the modified versions -such as short-sc-long as they explicitly use their own formatting commands, such as -\glsabbrvemfont. The base styles, such as short-long, use the more generic -\glsabbrvfont etc which makes them easier to adapt than the modified -styles. -

For further details, see the “Abbreviations” section in the documented code -(glossaries-extra-code.pdf). - - - -

-

-

Top

5. Entries in Sectioning Titles, Headers, Captions and Contents

-

The glossaries user manual cautions against using commands like \gls in chapter -or section titles. The principle problems are:

-
    -
  • if you have a table of contents, the first use flag will be unset in the contents - rather than later in the document; -
  • -
  • 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); -
  • -
  • 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 \gls etc) will be converted to upper case and the entry won’t be - recognised; -
  • -
  • if you use hyperref, commands like \gls can’t be expanded to a simple - string and only the label will appear in the PDF bookmark (with a warning - from hyperref); -
  • -
  • if you use hyperref, you will end up with nested hyperlinks in the table of - contents.
-

Similar problems can also occur with captions (except for the page header and bookmark -issues). -

-

Top

5.1 Simplistic Approach

-

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

-
-\chapter{A Chapter about \glsabbrvfont{\glsentryshort{html}}}
-
-

Or, if you are using hyperref: - - - -

-
-\chapter{A Chapter about
-\texorpdfstring{\glsabbrvfont{\glsentryshort{html}}}{\glsentryshort{html}}}
-
-

-

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 -\gls and \glsxtrshort redefine \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 \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 \MakeUppercase. -

The glossaries-extra package tries to resolve this by modifying \markright and -\markboth and \@starttoc. If you don’t like this change, you can restore their -former definitions using -


\glsxtrRevertMarks

-

-If you only want to restore \@starttoc you can use: -


\glsxtrRevertTocMarks

-

-If you restore the header or table of contents commands, you’ll have to use the -glossaries manual’s recommendations of either simply using \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: - - - -

-
-\chapter[A Chapter about \glsentryshort{html}]{A Chapter about \gls{html}}
-
-

Alternatively, you need to find a way to insert \glsxtrmarkhook and \@glsxtrinmark -at the start of the header or table of contents either scoped or afterwards cancelled -with \@glsxtrnotinmark and \glsxtrrestoremarkhook. -

If you don’t revert the mark commands back with \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. -

-

-

Top

5.2 New Commands Designed for Chapter/Section Headings

-

The commands listed below are designed for use in chapter or section headings. -There are still limitations, but they provide a better solution. They all use -\texorpdfstring if 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. If the required field contains non-expandable (robust or fragile) -commands that cause a problem for the bookmarks then \texorpdfstring will be -needed as appropriate in that field. (Take care if the field has its value expanded -before being assigned.) -

These commands essentially behave as though you have used \glsxtrshort, -\glstext etc with the options noindex and hyper=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 headuc attribute to “true” for the -appropriate category. -

If you use one of the \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, -even if you have set the headuc attribute since the all-capitals form still uses -\glsabbrvfont. You may want to consider using the slantsc package in this case. -
-

-

Display the short form: -


\glsfmtshort{label}

- - - -

-

Display the plural short form: -


\glsfmtshortpl{label}

-

-

First letter upper case singular short form: -


\Glsfmtshort{label}

-

-(No case-change applied to PDF bookmarks.) -

First letter upper case plural short form: -


\Glsfmtshortpl{label}

-

-(No case-change applied to PDF bookmarks.) -

All caps singular short form: -


\GLSfmtshort{label}

-

-(No case-change applied to PDF bookmarks.) -

All caps plural short form: -


\Glsfmtshortpl{label}

-

-(No case-change applied to PDF bookmarks.) -

Display the long form: -


\glsfmtlong{label}

-

-

Display the plural long form: -


\glsfmtlongpl{label}

-

-

First letter upper case singular long form: -


\Glsfmtlong{label}

-

-(No case-change applied to PDF bookmarks.) -

First letter upper case plural long form: -


\Glsfmtlongpl{label}

-

-(No case-change applied to PDF bookmarks.) -

All caps singular long form: -


\GLSfmtlong{label}

-

-(No case-change applied to PDF bookmarks.) -

All caps plural long form: -


\GLSfmtlongpl{label}

-

-(No case-change applied to PDF bookmarks.) - - - -

There are similar commands for the full form, but note that these use the inline -full form, which may be different from the full form used by \gls. The PDF version -has to be a simple fully expandable command, so one of two commands that are -unrelated to the style is used instead: -


\glspdffmtfull{label}

-

-for the singular form or: -


\glspdffmtfullpl{label}

-

-for the full form. These simply do the long form followed by the short form in -parentheses. -

Display the full form: -


\glsfmtfull{label}

-

-

Display the plural full form: -


\glsfmtfullpl{label}

-

-

First letter upper case singular full form: -


\Glsfmtfull{label}

-

-(No case-change applied to PDF bookmarks.) -

First letter upper case plural full form: -


\Glsfmtfullpl{label}

-

-(No case-change applied to PDF bookmarks.) -

All caps singular full form: -


\GLSfmtfull{label}

-

-(No case-change applied to PDF bookmarks.) -

All caps plural full form: -


\GLSfmtfullpl{label}

-

-(No case-change applied to PDF bookmarks.) -

There are also equivalent commands for the value of the text field: -


\glsfmttext{label}

-

-

First letter converted to upper case: -


\Glsfmttext{label}

-

-(No case-change applied to PDF bookmarks.) -

All caps: -


\GLSfmttext{label}

- - - -

-(No case-change applied to PDF bookmarks.) -

The plural equivalents: -


\glsfmtplural{label}

-

-First letter upper case: -


\Glsfmtplural{label}

-

-and all caps: -


\GLSfmtplural{label}

-

-

Likewise for the value of the name field: -


\glsfmtname{label}

-

-

First letter converted to upper case: -


\Glsfmtname{label}

-

-(No case-change applied to PDF bookmarks.) -

All caps: -


\GLSfmtname{label}

-

-(No case-change applied to PDF bookmarks.) -

Similarly for the value of the first field: -


\glsfmtfirst{label}

-

-

First letter converted to upper case: -


\Glsfmtfirst{label}

-

-(No case-change applied to PDF bookmarks.) -

All caps: -


\GLSfmtfirst{label}

-

-(No case-change applied to PDF bookmarks.) -

The plural equivalents: -


\glsfmtfirstpl{label}

-

-First letter upper case: -


\Glsfmtfirstpl{label}

-

-and all caps: -


\GLSfmtfirstpl{label}

-

- - - - - - -

-

-

Top

6. Multi (or Compound) Entries

-

Nested entries (where the entry definition references other entries) are discussed -in §2.8 Nested Links. This chapter deals with occasions where a term or -phrase may consist of multiple sub-terms that are independently defined. (Examples -in §6.1.5 Example: Skipping Elements (Fragment Element) and -§6.1.6 Example: Skipping Elements (Prefix and Post-Link Hooks) -provide workarounds for nested entries.) -

For example, the names of bacteria, such as Clostridium botulinum and -Clostridium perfringens, are made up of the genus (for example, Clostridium) and -the species (for example, botulinum or perfringens). The genus is often abbreviated -after first use. For example, C. botulinum. However, if the name is defined as a -single term consisting of both the genus and species then it’s not possible -to apply the abbreviation when a different species with the same genus is -used. -

Consider the following document: - - - -

-
-\documentclass{article}
-\usepackage{glossaries-extra}
-\setabbreviationstyle{long-only-short-only}
-\newabbreviation{cbot}{C. botulinum}{Clostridium botulinum}
-\newabbreviation{cperf}{C. perfringens}{Clostridium perfringens}
-\begin{document}
-\gls{cbot}, \gls{cbot}, \gls{cperf}.
-\end{document}
-
-

The result is: -
Clostridium botulinum, C. botulinum, Clostridium perfringens. -
-However, it should more typically be: -
Clostridium botulinum, C. botulinum, C. perfringens. -
-In this case, the genus should actually be a separate definition: - - - -

-
-\documentclass{article}
-\usepackage{glossaries-extra}
-\setabbreviationstyle{long-only-short-only}
-\newabbreviation{clostridium}{C.}{Clostridium}
-\newglossaryentry{botulinum}{name={botulinum},description={}}
-\newglossaryentry{perfringens}{name=perfringens,description={}}
-\begin{document}
-\gls{clostridium} \gls{botulinum},
-\gls{clostridium} \gls{botulinum},
-\gls{clostridium} \gls{perfringens}.
-\end{document}
-
-

This is quite awkward to write. This chapter describes how to provide a shortcut -for this kind of construct. Each term should be defined as normal (as in -the above example), and a “multi-entry” label is then defined with the list -of labels of the entries that need to be referenced. This is done with the -command: -


\multiglossaryentry[options]{multi-label}[main label]{label list} -

-

-where ⟨multi-label⟩ is the new label and ⟨label list⟩ is the list of labels (corresponding to -entries that have already been defined). -

The ⟨main label⟩ may be omitted, in which case the main label will be assumed to -be the final element in ⟨label list⟩. If ⟨main label⟩ is present, it must also be listed in ⟨label -list⟩. This is described in more detail in §6.2 Main and Other -Elements. -

The ⟨options⟩ are a comma-separated list of options to override the current settings -and are described in §6.9 Multi-Entry Settings. -

The earlier example can now be modified to include the following: - - - -

-
-\multiglossaryentry{cbot}{clostridium,botulinum}
-\multiglossaryentry{cperf}{clostridium,perfringens}
-
-

These commands must come after the definitions of clostridium, botulinum and -perfringens. -

Once defined, a multi-entry set can be referenced using commands like: -


\mgls[options]{multi-label}[insert]

-

-This command essentially does \gls{label} for each item in the ⟨label list⟩ (with -separators, see §6.4 Separators). If the final optional argument ⟨insert⟩ is -provided, it will be applied to the final (non-skipped) element in the list. So the -document body in the above example, can be rewritten as: - - - -

-
-\mgls{cbot}, \mgls{cbot}, \mgls{cperf}.
-
-

-

There are some variants of \mgls listed in §6.11 Variants of mgls. The -available ⟨options⟩ are listed in §6.10 mgls Options. They are applied after -the \multiglossaryentry options and will override settings for the individual -entries. -

You can’t use ⟨multi-label⟩ in commands like \gls as this label represents a set of -entry labels not a single entry.
-

-

The \multiglossaryentry command will generate an error if the label has -already been defined as a multi-entry. To do nothing if a multi-entry already exists, -use: -


\providemultiglossaryentry[options]{multi-label}[main label]{label -list}

-

-Notes and associated commands applying to \multiglossaryentry also apply to -\providemultiglossaryentry unless otherwise stated. -

\multiglossaryentry may be placed anywhere after the ⟨label list⟩ entries have -been defined. A multi-entry label can’t be referenced (with commands like \mgls) -before it has been defined.
-

-

There is limited support for docdef=true. The multi-entry definition can be picked -up from the aux file on the next run to allow cross-references in any glossaries that -occur at the start of the document. Any changes made with commands like -\mglsSetMain won’t be carried over to the next run. -

By default \multiglossaryentry will be localised to the current scope. If you -want to globally define a multi-entry you need to first switch on global definitions -with: -


\multiglossaryentryglobaltrue

-

-To switch back to local definitions use: -


\multiglossaryentryglobalfalse

-

-

If you want to change the multi-entry options (locally) you can use: -


\mglsSetOptions{multi-label}{new-options}

-

-This removes the original options. If you want to (locally) append to the existing -options, use: - - - -


\mglsAddOptions{multi-label}{new-options}

-

-

Note that \multiglossaryentry doesn’t make any adjustments to the -component entries. You will need to use the parent key when you define the entries -if you want a hierarchical structure in your glossary. (See the example in -§6.1.1 Example: Hierarchical.) -

If you don’t want the other elements in the glossary, you can suppress the -indexing with indexothers=false (§6.9.1 Indexing) or put -them in an ignored glossary. For example: - - - -

-
-\newignoredglossary{common}
-\newabbreviation[type=common]{clostridium}{C.}{Clostridium}
-
-

-

The ⟨multi-label⟩ can’t be used in commands like \gls since the label refers to a set -of entry labels not to an individual entry. Similarly, an individual entry label can’t be -used in commands like \mgls. It is possible (although potentially confusing) to use -the same label for a multi-entry as for an individual entry (see the example in -§6.1.6 Example: Skipping Elements (Prefix and Post-Link Hooks)). -Context will determine which is meant, except in the case of the cross-referencing -fields (see, seealso and alias) where the cross-referenced label will first be tested if it’s -a known multi-entry label. -

If you don’t want to have to keep track of which labels refer to multi-entries and -which refer to individual entries you can use: -


\GlsXtrMglsOrGls{mgls cs}{gls cs}modifier[options]{label}[insert] -

-

-where ⟨mgls cs⟩ is the \mgls-like command to use if ⟨label⟩ has been defined as a -multi-entry and ⟨gls cs⟩ is the \gls-like command to use otherwise. The ⟨modifier⟩ may -be omitted, otherwise it is the modifier that may be used with \mgls or \gls (*, + -or the character identified with \GlsXtrSetAltModifier). The modifier -and remaining options are passed to the relevant command (⟨mgls cs⟩ or ⟨gls -cs⟩). -

You may prefer to define your own shortcut commands for common combinations. -For example: - - - -

-
-\newcommand{\ac}{\GlsXtrMglsOrGls{\mgls}{\gls}}
-\newcommand{\acpl}{\GlsXtrMglsOrGls{\mglsmainpl}{\glspl}}
-\newcommand{\Ac}{\GlsXtrMglsOrGls{\Mgls}{\Gls}}
-\newcommand{\Acpl}{\GlsXtrMglsOrGls{\Mglsmainpl}{\Glspl}}
-
-

-

-

Top

6.1 Examples

-

-

-

Top

6.1.1 Example: Hierarchical

-

Bacteria names are represented by the genus (for example, Clostridium) followed by -the species (for example, botulinum). This example has the genus as a parent of the -species. - - - -

-
-\documentclass{article}
-\usepackage[colorlinks]{hyperref}
-\usepackage[stylemods=bookindex,style=bookindex]{glossaries-extra}
-\makeglossaries
-\newcommand{\latinname}[1]{\emph{#1}}
-\glssetcategoriesattributes
- {genus,species}{textformat,glossnamefont}{latinname}
-\setabbreviationstyle[genus]{long-only-short-only-desc}
-\newabbreviation
- [category=genus,description={}]
- {clostridium}{C.}{Clostridium}
-\newglossaryentry{botulinum}{name=botulinum,category=species,
-  description={},parent=clostridium}
-\newglossaryentry{perfringens}{name=perfringens,category=species,
-  description={},parent=clostridium}
-\newglossaryentry{tetani}{name=tetani,category=species,
-  description={},parent=clostridium}
-\multiglossaryentry{cbot}{clostridium,botulinum}
-\multiglossaryentry{cperf}{clostridium,perfringens}
-\multiglossaryentry{ctet}{clostridium,tetani}
-\multiglossaryentrysetup{indexothers=false,hyper=allmain}
-\begin{document}
-First use:
-\mgls{cbot}, \mgls{cperf}, \mgls{ctet}.
-Next use:
-\mgls{cbot}, \mgls{cperf}, \mgls{ctet}.
-\printglossaries
-\end{document}
-
-

This suppresses the indexing of the non-main elements (in this case, the genus). -However the genus is included in the glossary (without a number list) because it’s the -parent of the species (which are indexed). -

The hyper=allmain option makes the entire content of each \mgls a hyperlink to -the main entry in the glossary. The resulting document text (before the glossary) -is: - - - -

-

First use: Clostridium botulinum, C. perfringens, C. tetani. -

Next use: C. botulinum, C. perfringens, C. tetani.

-

-

-

Top

6.1.2 Example: Suffix

-

This example has a minor modification to the previous one. In this case the -multi-entries are defined with a suffix: - - - -

-
-\multiglossaryentry[firstsuffix=botulism]{cbot}{clostridium,botulinum}
-\multiglossaryentry[firstsuffix={gas gangrene}]{cperf}{clostridium,perfringens}
-\multiglossaryentry[firstsuffix=tetanus]{ctet}{clostridium,tetani}
-
-

The rest of the document is as in §6.1.1 Example: Hierarchical. The -document text is now: -

-

First use: Clostridium botulinum (botulism), C. perfringens (gas - gangrene), C. tetani (tetanus). -

Next use: C. botulinum, C. perfringens, C. tetani.

-

-

-

Top

6.1.3 Example: Category Suffix

-

This is an alternative to the previous example. Instead of storing the extra -information in the firstsuffix key, the information is stored in the user1 key of the last -element (the species). A category suffix is used to look up the field and append -it. - - - -

-
-\newglossaryentry{botulinum}{name=botulinum,category=species,
-  user1={botulism},
-  description={},parent=clostridium}
-\newglossaryentry{perfringens}{name=perfringens,category=species,
-  user1={gas gangrene},
-  description={},parent=clostridium}
-\newglossaryentry{tetani}{name=tetani,category=species,
-  user1={tetanus},
-  description={},parent=clostridium}
-\mglsdefcategorysuffix{bacteria}{%
- \mglsisfirstuse
- {\glsxtrifhasfield{useri}{\mglslastelementlabel}{ (\glscurrentfieldvalue)}{}}%
- {}%
+
This checks if a following full stop needs to be discarded and does the inner post-link hook \glsxtrpostlink. Note that \glsxtrdiscardperiod and \glsxtrifperiod look ahead for a following token, so if you need to modify this command, insert your custom code at the start or add it to the category post-link hook instead.

+

+\glsxtrdiscardperiod{entry-label}{discarded}{no discard}token
+ This discards token if it’s a full stop and the entry’s category attributes indicate that a full stop should be discarded (such as discardperiod). If the punctuation character is discarded, this will then do discarded, otherwise it will do no discard and process token as usual. If the retainfirstuseperiod attribute is set, then the following command is used to determine whether or not to discard token.

+

+\glsxtrdiscardperiodretainfirstuse{entry-label}{discarded}{no discard}token
+ This was introduced in v1.49 and is defined as:
\newcommand*{\glsxtrdiscardperiodretainfirstuse}[3]{% 
+ \glsxtrifwassubsequentorshort{\glsxtrifperiod{#2}{#3}}{#3}% 
 }
-\multiglossaryentry[category=bacteria]{cbot}{clostridium,botulinum}
-\multiglossaryentry[category=bacteria]{cperf}{clostridium,perfringens}
-\multiglossaryentry[category=bacteria]{ctet}{clostridium,tetani}
-
-

The result is the same as the previous example. -

-

-

Top

6.1.4 Example: Separators

-

The first example (§6.1.1 Example: Hierarchical) can be modified so that -the species are also abbreviations. In this case, the separators are modified to -suppress the space (\relax) if both the genus and species are abbreviated, or to use -a non-breaking space ~ between the genus short form (shown on subsequent use) and -the species long form (shown on first use). If the genus is showing the long form (first -use) then a normal space is used. -

Note that the separator attributes apply to the category of the element before the -separator (not to the multi-entry category). - - - -

-
-\glssetcategoryattribute{genus}{combinedfirstsepfirst}{\space}
-\glssetcategoryattribute{genus}{combinedfirstsep}{\space}
-\glssetcategoryattribute{genus}{combinedsepfirst}{~}
-\glssetcategoryattribute{genus}{combinedsep}{\relax}
-\setabbreviationstyle[species]{long-only-short-only-desc}
-\newabbreviation[category=species,
-  description={},parent=clostridium]{botulinum}{bot.}{botulinum}
-\newabbreviation[category=species,
-  description={},parent=clostridium]{perfringens}{per.}{perfringens}
-\newabbreviation[,category=species,
-  description={},parent=clostridium]{tetani}{tet.}{tetani}
-
-

This will cause a double dot at the end of the second sentence, which can be -suppressed using the discardperiod and retainfirstuseperiod attributes. - - - -

-
-\glssetcategoriesattributes{species}{discardperiod,retainfirstuseperiod}{true}
-
-

This works because the final element’s post-link hook is transferred to the -multi-entry post-link hook, which can detect the sentence terminating period. If the -post-link hook settings are changed, for example, to postlinks=all,mpostlink=false -then the feature won’t work as the final element’s post-link hook can’t detect the -period (because \gls is embedded too deeply inside the internal workings of -\mgls). -

The result is: -

-

First use: Clostridium botulinum, C. perfringens, C. tetani. -

Next use: C.bot., C.per., C.tet.

-

-

-

Top

6.1.5 Example: Skipping Elements (Fragment Element)

-

This example is an alternative way of dealing with nested links (see §2.8 -Nested Links). - - - -

-
-\documentclass{article}
-\usepackage[colorlinks]{hyperref}
-\usepackage[stylemods,style=long]{glossaries-extra}
-\makeglossaries
-\setabbreviationstyle{long-short-sc}
-\newabbreviation{ssi}{ssi}{server-side includes}
-\newabbreviation{html}{html}{hypertext markup language}
-\setabbreviationstyle[combinedabbrv]{long-only-short-sc-only}
-\newabbreviation
- [category=combinedabbrv,
-  description={\glsxtrshort{ssi} enabled \glsxtrshort{html}}]
- {shtml-frag}{shtml}{enabled}
-\glssetcategoryattribute{combinedabbrv}{multioptions}
- {usedskipothers,firstsuffix={\glsxtrshort{\mglslastmainlabel}}}
-\multiglossaryentry
- [category={combinedabbrv}]
- {shtml}[shtml-frag]{ssi,shtml-frag,html}
-\begin{document}
-Individual elements first use: \gls{ssi} and \gls{html}.
-Individual elements next use: \gls{ssi} and \gls{html}.
-Multi-entry first use: \mgls{shtml}.
-Multi-entry next use: \mgls{shtml}.
-Resetting all\glsresetall\mglsreset{shtml}:
-Multi-entry first use: \mgls{shtml}.
-Multi-entry next use: \mgls{shtml}.
-Individual elements: \gls{ssi} and \gls{html}.
-\printglossaries
-\end{document}
-
-

This uses the multioptions attribute to skip “other” elements on subsequent use. The -problematic abbreviation (SHTML) is defined as a fragment that simply expands to - - - -“enabled” on first use. Note that the description has to be supplied for the -glossary. -

The above produces (underlining added to mark the hyperlinks): -

-

Individual elements first use: server-side includes (ssi) and hypertext - markup language (html). -

Individual elements next use: ssi and html. -

Multi-entry first use: ssi enabled html (shtml). -

Multi-entry next use: shtml. -

Resetting all: -

Multi-entry first use: server-side includes (ssi) enabled hypertext - markup language (html) (shtml). -

Multi-entry next use: shtml. -

Individual elements: ssi and html.

-

The key difference here from the example using \glsps at the end of §2.8 -Nested Links is that the individual elements hyperlink to their respective entries in -the glossary on first use of \mgls. -

The problem is that with the colorlinks package option, it’s not obvious where the -hyperlinks start and end. The suffix (shtml) will hyperlink to the “shtml” entry in -the glossary, so the “enabled” hyperlink is redundant. The simplest fix for this is to -add hyper=notmainfirst to the option list, which will prevent “enabled” from being a -hyperlink. -

Another problem occurs where \mgls is used before the individual elements -are used, which leads to their full expansion with a confusing amount of -parentheses. A simple solution is to use the option mglsopts=unsetothers, -which will unset the other (not-main) elements first. This can be localised -with presetlocal but \gls will then unset the first use flag globally, which -means that the other elements won’t show the full form when they are first -used on their on after \mgls. This can be switched to a local unset with -others=local. -

The complete set of options are now: - - - -

-
-\glssetcategoryattribute{combinedabbrv}{multioptions}
- {%
-  hyper=notmainfirst,
-  mglsopts={presetlocal,unsetothers,others={local}},
-  usedskipothers,
-  firstsuffix={\glsxtrshort{\mglslastmainlabel}}
- }
-
-

This now produces (underlining added to mark the hyperlinks): -

-

Individual elements first use: server-side includes (ssi) and hypertext - markup language (html). -

Individual elements next use: ssi and html. -

Multi-entry first use: ssi enabled html (shtml). -

Multi-entry next use: shtml. -

Resetting all: -

Multi-entry first use: ssi enabled html (shtml). -

Multi-entry next use: shtml. -

Individual elements: server-side includes (ssi) and hypertext markup - language (html).

-

This method still has two main drawbacks: the description must be added manually and -the long form can’t be accessed with \glsxtrlong. The next example provides an -alternative approach. -

-

-

Top

6.1.6 Example: Skipping Elements (Prefix and Post-Link Hooks)

-

This is a modified version of the previous example. In this case, the main element -isn’t a fragment and also happens to have the same label as the multi-entry set. -(\mgls{shtml} references the multi-entry label and \gls{shtml} references the -individual entry.) -

In this case, the nested parts are marked up with custom commands: - - - -

-
-\newrobustcmd{\combinedpre}[1]{\glsps{#1}}
-\newrobustcmd{\combinedpost}[1]{\glsps{#1}}
-\newabbreviation{shtml}{shtml}
-{{}\combinedpre{ssi} enabled \combinedpost{html}}
-
-

This means that it’s no longer necessary to manually insert the description and the -long form can be accessed as usual with \glsxtrshort{shtml}. Note that it is -necessary to define the custom commands robustly otherwise they will need to be -protected against premature expansion: - - - -

-
-\newcommand{\combinedpre}[1]{\glsps{#1}}
-\newcommand{\combinedpost}[1]{\glsps{#1}}
-\newabbreviation{shtml}{shtml}
-{{}\protect\combinedpre{ssi} enabled \protect\combinedpost{html}}
-
-

In both cases, an initial empty group is added to guard against any first letter -uppercase commands, such as \Glsxtrlong. -

The abbreviations all use the long-postshort-sc-user style, which places the short -form in the post-link hook on first use. The \gls post-link hook for the main element -can be transferred to the \mgls post-link using: - - - -

-
-mpostlinkelement=main
-
-

All elements have their individual post-link hooks suppressed by default. As in -the previous example, the other elements can be skipped on subsequent -use: - - - -

-
-usedskipothers
-
-

Within \mgls, the nested content needs to be suppressed, which can be done by -redefining the custom commands. This can be done in the multi-entry prefix. Since -the entire content of \mgls (except for the final multi-entry post-link hook) occurs -inside a group, this redefinition will be localised. -

The complete document is as follows: - - - -

-
-\documentclass{article}
-\usepackage[colorlinks]{hyperref}
-\usepackage[stylemods,style=long]{glossaries-extra}
-\makeglossaries
-\setabbreviationstyle{long-postshort-sc-user}
-\newabbreviation{ssi}{ssi}{server-side includes}
-\newabbreviation{html}{html}{hypertext markup language}
-\newrobustcmd{\combinedpre}[1]{\glsps{#1}}
-\newrobustcmd{\combinedpost}[1]{\glsps{#1}}
-\newabbreviation{shtml}{shtml}
-{{}\combinedpre{ssi} enabled \combinedpost{html}}
-\glssetcategoryattribute{combinedabbrv}{multioptions}
- {%
-  mpostlinkelement=main,
-  usedskipothers
- }
-\multiglossaryentry
- [category={combinedabbrv}]
- {shtml}[shtml]{ssi,shtml,html}
-\mglsdefcategoryprefix{combinedabbrv}{%
- \renewcommand{\combinedpre}[1]{\ignorespaces}%
- \renewcommand{\combinedpost}[1]{\unskip}%
+
This will only discard the full stop if it follows the subsequent use of a \gls-like command or if it follows one of the \glsxtrshort set of commands. Note that this has a different effect from pre v1.49 with the \glstext-like commands, but it’s more appropriate since it’s typically only the short form that requires the period to be discarded. To restore the original behaviour:
\renewcommand*{\glsxtrdiscardperiodretainfirstuse}[3]{% 
+ \glsxtrifwasfirstuse{#3}{\glsxtrifperiod{#2}{#3}}% 
 }
-\begin{document}
-Individual elements first use: \gls{ssi} and \gls{html}.
-Individual elements next use: \gls{ssi} and \gls{html}.
-Multi-entry first use: \mgls{shtml}.
-Multi-entry next use: \mgls{shtml}.
-Individual entry first use: \gls{shtml}.
-Resetting all\glsresetall\mglsresetall:
-                                                                  
-
-                                                                  
-Multi-entry first use: \mgls{shtml}.
-Multi-entry next use: \mgls{shtml}.
-Individual elements: \gls{ssi} and \gls{html}.
-Resetting all\glsresetall\mglsresetall:
-Individual entry first use: \gls{shtml}.
-Multi-entry first use: \mgls{shtml}. (Wrong!)
-\printglossaries
-\end{document}
-
-

This now produces (underlining added to mark the hyperlinks): -

-

Individual elements first use: server-side includes (ssi) and hypertext - markup language (html). -

Individual elements next use: ssi and html. -

Multi-entry first use: ssi enabled html (shtml). -

Multi-entry next use: shtml. -

Individual entry first use: shtml. -

Resetting all: -

Multi-entry first use: server-side includes enabled hypertext markup - language (shtml). -

Multi-entry next use: shtml. -

Individual elements: ssi and html. -

Resetting all: -

Individual entry first use: ssi enabled html (shtml). -

Multi-entry first use: server-side includes shtml hypertext markup - language. (Wrong!)

-

Note the last two paragraphs, which highlights what happens if \gls{shtml} is used -before \mgls{shtml} when neither of the other elements (ssi and html) have been -used. The final instance of \mgls has produced the wrong result. This is because it’s -the first use of the multi-entry shtml but not the first use of the individual entry -shtml. -

One way around this is to modify the prefix to ensure that the main element’s -first use flag matches the multi-entry’s first use flag: - - - -

-
-\mglsdefcategoryprefix{combinedabbrv}{%
- \renewcommand{\combinedpre}[1]{\ignorespaces}%
- \renewcommand{\combinedpost}[1]{\unskip}%
- \mglsisfirstuse
- {\glslocalreset{\mglscurrentmainlabel}}%
- {\glslocalunset{\mglscurrentmainlabel}}%
+

+If you want your own custom code to determine whether or not to check for a period (instead of using known category attributes), you can redefine:

+\glsxtrifcustomdiscardperiod{true}{false}initial: false
+ This should expand to true if a check should be performed, otherwise it should expand to false. The default definition simply does false.

+

+\glsxtrpostlinkendsentence
+ This is done if a full stop is discarded. If there is a category post-link hook for the entry’s category, that hook is performed (\glsxtrpostlinkcategory not \glsxtrpostlink) and the full stop is put back followed by a space factor adjustment. Otherwise, just the space factor adjustment is done.

+The test to determine whether or not token is a full stop is determined by:

+\glsxtrifperiod{true}{false}token
+

+It may be useful to test for other punctuation characters. For example, styles such as short-postfootnote will move the footnote after certain punctuation characters.

+\glsxtrifnextpunc{true}{false}
+ This does true if it’s followed by one of the set of recognised punctuation characters, otherwise it does false. The set is initialised to .,:;?! (full stop, comma, colon, semi-colon, question mark, and exclamation mark).

+A convenient way of moving code after the punctuation character is to use:

+\glsxtrdopostpunc{code}token
+ If token is a recognised punctuation character, this will place code after the token, otherwise it will be placed before the token.

+The earlier example can be adapted to put the asterisk after following punctuation:

\glsdefpostlink{general}{\glsxtrdopostpunc{*}}
+\newglossaryentry{sample}{name={sample},symbol={X},
+ description={an example}}
+\begin{document}
+\Gls{sample}, \glstext{sample}, 
+(\glsdesc{sample}) and \glssymbol{sample}.
+\end{document}
+
+Example 102: Category post-link hook with punctuation lookahead 📥🖹 📥🖺

+Example document illustrating a category post-link hook that transfers content after a following punctuation character.

+ Note that the asterisk isn’t moved after the closing parenthesis. This is because that character isn’t included in the default list.

+You can add additional punctuation marks with:

+\glsxtraddpunctuationmark{token(s)}
+ You may list multiple characters at the same time to add a batch, but don’t add any separators (including spaces).

+

+Note that each character must be a single token, which means a single-byte character for pdfLaTeX. Multi-byte characters (UTF-8) will required a native Unicode engine (XeLaTeX or LuaLaTeX).
+

+For example:

\glsxtraddpunctuationmark{-'/}
+
This adds three extra punctuation marks (hyphen, apostrophe and slash). Note that this doesn’t allow for closing double-quotes and will break '' (double apostrophe sequence for a closing double-quote) if found. The following will only work with XeLaTeX or LuaLaTeX:
\usepackage{fontspec}
+\usepackage{glossaries-extra}
+\glsxtraddpunctuationmark{}
+

+You can set the list with:

+\glsxtrsetpunctuationmarks{token list}
+ This will remove the default set as well as any additional characters. As above, each character must be a single token with no separators in the list. For example:
\glsxtrsetpunctuationmarks{.?!}
+
This sets the list to just three punctuation characters (so comma, colon, and semi-colon are no longer recognised).

+

+\glsxtrpostlink
+ This does the category post-link hook (or nothing if it hasn’t been defined):
\newcommand*{\glsxtrpostlink}{%
+ \csuse{glsxtrpostlink\glscategory{\glslabel}}%
 }
-
-

-

The showtargets=annoteleft option can be used to mark up the links -with the targets. For example, the first instance of \mgls{shtml} will show -as: -

-

Multi-entry first use: [glo:ssi]ssi[glo:shtml]enabled - [glo:html]html(shtml).

-

Each entry has an individual hyperlink to its own glossary item, which may be -confusing. This can be made clearer by suppressing the main element link on first use -with: - - - -

-
-hyper=notmainfirst
-
-

(as in the previous example), and adjusting the abbreviation style so that the -parenthetical content in the post-link hook has a hyperlink: - - - -

-
-\renewcommand*{\glsxtruserparen}[2]{%
-  \glsxtrfullsep{#2}%
-  \glsxtrparen
-   {\glshyperlink[#1]{#2}%
-    \ifglshasfield{\glsxtruserfield}{#2}{, \glscurrentfieldvalue}{}%
-   }%
+
Customisation is best performed within the category post-link hook, which can be defined (or redefined) with:
+\glsdefpostlink{category}{definition}
+ The first argument is the category label and the second is the code to perform. Note that this doesn’t check if the hook has already been defined for the category. The hook is a command in the form \glsxtrpostlinkcategory. If the category label only consists of letters, you can also use \newcommand or \renewcommand instead.

+

+\glspretopostlink{category}{code}
+ Similar to the above but prepends code to the associated hook (or simply defines it, if the hook doesn’t already exist).

+

+\glsapptopostlink{category}{code}
+ Similar to the above but appends code to the associated hook.

+

+Take care not to choose category labels that will cause a conflict. For example, endsentence and hook will conflict with the commands \glsxtrpostlinkendsentence and \glsxtrpostlinkhook.
+

+If you want code in the post-link hook that’s not dependent on the category, consider prepending it to \glsxtrpostlink or \glsxtrpostlinkhook. Don’t append it to \glsxtrpostlinkhook otherwise it will interfere with the punctuation lookahead.

+For convenience, some commands are provided that may be of use in the category post-link hook:

+

+\glsxtrpostlinkAddDescOnFirstUse
+ This will add the description in parentheses if the hook follows the first use of the entry. This incorporates the inner formatting and description accessibility support, if provided.

+

+\glsxtrpostlinkAddSymbolOnFirstUse
+ This will add the symbol in parentheses if that field is set and the hook follows the first use of the entry. This incorporates the inner formatting and symbol accessibility support, if provided.

+

+\glsxtrpostlinkAddSymbolDescOnFirstUse
+ This will add the symbol, if that field is set, and the description (both within the same set of parentheses), if the hook follows the first use of the entry. This incorporates the inner formatting and accessibility support, if provided. The separator between the symbol and description is given by:
+\glsxtrpostlinkSymbolDescSep
+ The default is a comma followed by a space.

+For example:

\glsdefpostlink{general}{\glsxtrpostlinkAddDescOnFirstUse}
+\glsdefpostlink{symbol}{\glsxtrpostlinkAddSymbolOnFirstUse}
+\glsdefpostlink{number}{\glsxtrpostlinkAddSymbolDescOnFirstUse}
+\newglossaryentry{sample}{name={sample},description={an example}}
+\newglossaryentry{alpha}{name={alpha},symbol={\ensuremath{\alpha}},
+ description={a symbol},category={symbol}}
+\newglossaryentry{pi}{name={pi},symbol={\ensuremath{\pi}},
+ description={a constant},category={number}}
+\begin{document}
+First use: \gls{sample}, \gls{alpha}, \gls{pi}.
+
+Next use: \gls{sample}, \gls{alpha}, \gls{pi}.
+\end{document}
+
This produces:
+Example 103: Category post-link hooks 📥🖹 📥🖺

+Example document that uses category post-link hooks to append additional information after the link text on first use.

+

+The following commands are also provided for use in the post-link hook:

+

+\glsxtrcurrentfield
+ This expands to empty if the calling command isn’t associated with one specific field (such as \glslink, the \gls-like commands, the inline full form commands) otherwise it will expand to the name of the key associated with the singular form of the command. For example, this command will expand to text for both \glstext and \glsplural, to description for both \glsdesc and \glsdescplural, and to short for both \glsxtrshort and \glsxtrshortpl. Whereas it will expand to nothing for both \gls and \glsxtrfull.

+

+\glsxtrifwasglslike{true}{false}
+ This expands to true if the calling command was a \gls-like command and to false otherwise.

+

+\glsxtrifwasglslikeandfirstuse{true}{false}
+ This expands to true if the calling command was a \gls-like command and was the first use otherwise it expands to false. This is simply a shortcut command that uses both \glsxtrifwasglslike and \glsxtrifwasfirstuse.

+

+\glsxtrifwassubsequentuse{true}{false}
+ This expands to true if the calling command was a \gls-like command and was the subsequent use otherwise it expands to false. This is simply a shortcut command that uses both \glsxtrifwasglslike and \glsxtrifwasfirstuse.

+

+\glsxtrifwassubsequentorshort{true}{false}
+ This expands to true if the calling command was a \gls-like command and was the subsequent use or if the calling command set \glsxtrcurrentfield to short. Otherwise it expands to false.

+

+\glsxtrifallcaps{all caps}{not all caps}
+ This simply does:
\glscapscase{not all caps}{not all caps}{all caps}
+
It’s not usually necessary for the post-link hook to differentiate between no case-change and sentence case, so this provides a convenient shortcut if only the all caps case needs to be different.

+It’s possible you may also want to reference the inserted material. For the \gls-like commands, this can be obtained with the placeholder \glsinsert, but it’s not normally set by the \glstext-like commands, which don’t use the entry format style (§5.5.5) and instead incorporate the inserted material at the end of the link text. If you want the post-link hook to be able to access the inserted material for the \glstext-like commands, you must first save it, by redefining the following:

+

+\glsxtrsaveinsert{entry-label}{insert}
+ This is used by the \glstext-like commands to initialise \glsinsert. The default is:
\newcommand*{\glsxtrsaveinsert}[2]{\def\glsinsert{}}
+
For example, to always save the insert:
\renewcommand*{\glsxtrsaveinsert}[2]{\def\glsinsert{#2}}
+
The first argument can be used to conditionally assign the insert. For example, the following will only save it for entries with the general category:
\renewcommand*{\glsxtrsaveinsert}[2]{%
+ \glsifcategory{#1}{general}{\def\glsinsert{#2}}{\def\glsinsert{}}%
 }
-
-

-

The remaining problem is how to deal with the possibility that \mgls{shtml} -may come before the first use of the other elements. For example: - - - -

-
-Multi-entry first use: \mgls{shtml}.
-Individual elements: \gls{ssi} and \gls{html}.
-
-

This leads to: -

-

Multi-entry first use: server-side includes enabled hypertext markup - language (shtml). -

Individual elements: ssi and html.

-

This means that the abbreviations ssi and html aren’t explained in the document text. -One way around this is to only locally unset the other element first use -flags: - - - -

-
-\glssetcategoryattribute{combinedabbrv}{multioptions}
- {%
-  hyper=notmainfirst,
-  mpostlinkelement=main,
-  usedskipothers,
-  mglsopts={others={local}}
- }
-
-

With the above setting, the following: - - - -

-
-\glsresetall\mglsresetall
-Multi-entry first use: \mgls{shtml}.
-Multi-entry next use: \mgls{shtml}.
-Individual elements: \gls{ssi} and \gls{html}.
-
-

will now produce: -

-

Multi-entry first use: server-side includes enabled hypertext markup - language (shtml). -

Multi-entry next use: shtml. -

Individual elements: server-side includes (ssi) and hypertext markup - language (html).

-

-

-

Top

6.2 Main and Other Elements

-

The list of labels provided in the final argument of \multiglossaryentry -consists of a main element and all the other elements. If the main element isn’t -identified in the optional argument, it’s assumed to be the final element in the -list. -

The main element allows you to determine which target to use if you want the -entire content of \mgls to be a single hyperlink. You can also use the settings -described in §6.9 Multi-Entry Settings to only index the main -element. -

You can change the main element using: -


\mglsSetMain{multi-label}{new-main-label}

-

-The new main label provided in the second argument must be in the list -corresponding to ⟨multi-label⟩. This change is locally applied to the current scope. -Note that if you are using bib2gls, this change in the document can’t be -detected. -

The main element can also be used to identify which element should be displayed -in the plural with \mglsmainpl. For example: - - - -

-
-\newglossaryentry{great}{name={great},description={}}
-\newglossaryentry{little}{name={little},description={}}
-\newglossaryentry{grebe}{name={grebe},description={}}
-\multiglossaryentry{greatgrebe}{great,grebe}
-\multiglossaryentry{littlegrebe}{little,grebe}
-
-

In the above, two multi-entries are defined: greatgrebe and littlegrebe. In both -cases the main element is grebe (the last element). Using \mglspl will show the -plural for all elements, but using \mglsmainpl will only use the plural for the main -element (grebe). For example: - - - -

-
-Plural all: \mglspl{greatgrebe}, \mglspl{littlegrebe}.
-Plural main: \mglsmainpl{greatgrebe}, \mglsmainpl{littlegrebe}.
-
-

produces: -
Plural all: greats grebes, littles grebes. -
Plural main: great grebes, little grebes. -
-

-

-

Top

6.3 Prefixes and Suffixes

-

A multi-entry may have associated prefixes and suffixes. These are scoped and are -placed outside of the hyperlinks and encapsulating commands. They are not affected -by case-changing commands, such as \Mgls. If you want a prefix to obey -case-changing, use the \mpgls-like commands instead (§6.11.4 Support for -glossaries-prefix (pgls)). -

The prefix is inserted with: -


\mglsprefix

-

-The default definition is: - - - -

-
-\newcommand*{\mglsprefix}{%
- \ifdefempty\mglscurrentcategory
- {\mglscurrentprefix}%
- {%
-   \mglshascategoryprefix{\mglscurrentcategory}%
-   {\mglsusecategoryprefix{\mglscurrentcategory}}%
-   {\mglscurrentprefix}%
- }%
+

+If you only want to save the insert for the \glsxtrfull set of commands, you can redefine \glsxtrfullsaveinsert instead (see §4.3).

+

+\glsxtrassignlinktextfmt
+ This contains the assignments required to ensure that \glslabel, \glstextformat and \glsxtrgenentrytextfmt have the definitions they had within the link text. They would ordinarily still have those definitions within the post-link hook, but if, for example, the hook contains content that may be deferred, such as a footnote, then judicious use and expansion of \glsxtrassignlinktextfmt can allow the deferred code to pick up the label, outer and inner formatting.

+For example, the post-link hook might contain:

\expandafter\footnote\expandafter
+ {\glsxtrassignlinktextfmt\glstextformat{%
+   \Glsaccessfmtdesc{}{\glsxtrgenentrytextfmt}{\glslabel}}.}
+

+ + + +

+

5.5.5. Entry Format Style

+

+

+This section is for advanced users. Minor modifications can be made by adjusting the outer formatting (§5.5.1), the post-link hook5.5.4) or the abbreviation style commands (§4.5.1.3).
+

+The \gls-like commands have the link text set to the entry format style corresponding to the entry’s glossary type. This can be changed with \defglsentryfmt, but the default style is given by \glsentryfmt, which is defined by the base glossaries package. This uses the placeholder commands to determine the appropriate text. These are described in the glossaries manual, but to recap they are: \glslabel (the entry’s label), \glscustomtext (text provided by \glsdisp or empty otherwise), \glsinsert (supplied in the final optional argument except for \glsdisp, empty by default), \glsifplural, and \glscapscase.

+The glossaries-extra package redefines \glsentryfmt to test whether or not the entry is an abbreviation and, if so, whether or not the entry should be treated as a regular entry:

\renewcommand*{\glsentryfmt}{%
+  \ifglshasshort{\glslabel}
+    {\glssetabbrvfmt{\glscategory{\glslabel}}}{}%
+  \glsifregular{\glslabel}%
+  {\glsxtrregularfont{\glsgenentryfmt}}%
+  {%
+    \ifglshasshort{\glslabel}%
+    {\glsxtrabbreviationfont{\glsxtrgenabbrvfmt}}%
+    {\glsxtrregularfont{\glsgenentryfmt}}%
+  }%
 }
-
-

This will insert the current prefix unless there is prefix command associated with the -current category. -

The suffix is inserted with: -


\mglssuffix

-

-The command is defined as follows: - - - -

-
-\newcommand*{\mglssuffix}{%
- \ifdefempty\mglscurrentcategory
- {\ifdefempty{\mglscurrentsuffix}{}{\space(\mglscurrentsuffix)}}%
- {%
-   \mglshascategorysuffix{\mglscurrentcategory}%
-   {\mglsusecategorysuffix{\mglscurrentcategory}}%
-   {\ifdefempty{\mglscurrentsuffix}{}{\space(\mglscurrentsuffix)}}%
- }%
+
This uses \ifglshasshort to determine whether or not the entry is an abbreviation. If it is, then \glssetabbrvfmt is used to setup the abbreviation style commands for the entry’s category.

+Then there’s a check (with \glsifregular) to determine whether or not the entry should be treated as a regular entry. Note that if the regular attribute hasn’t been set to true, the entry will still be treated as a regular entry if it doesn’t have the short field set.

+Regular entries are formatted according to:

+\glsgenentryfmt
+ This is the generic regular entry format. It’s encapsulated with \glsxtrregularfont, but note that if the entry is an abbreviation, it will still use the abbreviation style formatting commands, which are contained within the first, firstplural, text and plural field values.

+The generic regular entry format \glsgenentryfmt is provided by the base glossaries package, but is redefined by glossaries-extra to support inner formatting (§5.5.3) and accessibility (§9), if required.

+Abbreviations that aren’t considered regular, are formatted according to:

+\glsxtrgenabbrvfmt
+ This is the generic non-regular abbreviation format. It’s encapsulated with \glsxtrabbreviationfont. Unlike \glsgenentryfmt this doesn’t reference the first, firstplural, text or plural fields, but instead uses the abbreviation formatting commands \glsxtrfullformat, \glsxtrsubsequentfmt and their plural and case-changing variants.

+If you want to define your own custom entry format, you will need to consider whether or not your format should support regular and non-regular abbreviation styles. Further detail can be found in the documented code:

texdoc glossaries-extra-code

+ +

+ +
+

5.6. Hyperlinks

+

+The \gls-like and \glstext-like commands will automatically create a hyperlink by default, if hyperref has been loaded (before glossaries/glossaries-extra). The hyperlink can be switched off with hyper=false but will also be switched off if the entry was assigned to an ignored glossary that was defined with the unstarred \newignoredglossary.

+The hyperfirst=false package option and the category attributes nohyper, nohyperfirst and nohypernext can also be used to automatically switch off the hyperlink. See also the hyperoutside option that determines whether the hyperlink should be inside or outside of the outer formatting.

+The hyperlink target is usually created by \glstarget which is used by all the predefined glossary styles by the standalone commands, such as \GlsXtrStandaloneEntryName.

+The target for an entry with the label entry-label is in the form prefixentry-label. The prefix is normally \glolinkprefix but may be changed with the prefix option when displaying the glossary.

+The target can also be changed to a link to an external file with the targeturl category attribute.

+ +

+ +
+

5.7. Label Prefixes

+

+It’s possible that you may want to prefix labels to ensure uniqueness. For example, this manual references both the \makeglossaries command and the makeglossaries Perl script. They are both defined as glossary entries, but they can’t both have the label makeglossaries. This manual uses bib2gls and is quite complicated, but a simplified version is as follows:

\newcommand{\csfmt}[1]{\texttt{\#1}}
+\newcommand{\appfmt}[1]{\texttt{#1}}
+\newglossaryentry{cs.makeglossaries}{name={\csfmt{makeglossaries}},
+ description={}}
+\newglossaryentry{app.makeglossaries}{name={\appfmt{makeglossaries}},
+ description={}}
+
So the label cs.makeglossaries refers to \makeglossaries and app.makeglossaries refers to makeglossaries. If you have a lot of prefixes like this, you may prefer to have a command that automatically adds the prefix. For example,
\newcommand*{\cs}[2][]{\gls[#1]{cs.#2}}
+
The problem with this is that the custom command \cs doesn’t allow for the *, + and alt-mod modifiers (such as \gls* or \gls+). Instead you can use:
+\glsxtrnewgls[default-options]{prefix}{cs}
+ which defines the command
csmodifier[options]{entry-label}[insert]
+
that behaves like
\glsmodifier[default options,options]{prefixentry-label}[insert]
+
For example:
\glsxtrnewgls{cs.}{\cs}
+
or (to default to no hyperlinks)
\glsxtrnewgls[hyper=false]{sym.}{\cs}
+
now you can use \cs+{M} to behave like \gls+{cs.M}.

+If you also want the plural and sentence case versions you can use

+\glsxtrnewglslike[default-options]{prefix}{\gls-like cs}{\glspl-like cs}{\Gls-like cs}{\Glspl-like cs}
+ For example:
\glsxtrnewglslike[hyper=false]{idx.}{\idx}{\idxpl}{\Idx}{\Idxpl}
+
For the all caps versions:
+\glsxtrnewGLSlike[default-options]{prefix}{\GLS-like cs}{\GLSpl-like cs}
+ For example:
\glsxtrnewGLSlike[hyper=false]{idx.}{\IDX}{\IDXpl}
+

+For commands that require the link text to be specified, you can use:

+\glsxtrnewglslink[default-options]{prefix}{cs}
+ which defines cs[options]{label}{text} to behave like \glslink[default-options,options]{prefixlabel}{text}, or
+\glsxtrnewglsdisp[default-options]{prefix}{cs}
+ which defines cs[options]{label}{text} to behave like \glsdisp[default-options,options]{prefixlabel}{text}.

+If you are using bib2gls, it can pick up the custom commands that are defined using the above, so it can detect dependencies when it parses fields such as description. If you provide your own custom command with just \newcommand that has syntax that starts with [options]{entry-label}, then you can notify bib2gls using:

+\glsxtridentifyglslike{label-prefix}{cs}
+ where label-prefix is the prefix to apply to the label that’s passed to the command cs. The information is written to the aux file so that bib2gls can add the given command to those it looks for when searching for dependencies.

+Another possibility when using bib2gls is to set up known label prefixes, see §11.5.7 for further details.

+If you use bib2gls with record counting, there are commands to \glsxtrnewgls for \rgls:

+\glsxtrnewrgls[default-options]{prefix}{cs}
+ and for \rgls, \rglspl, \rGls and \rGlspl:
+\glsxtrnewrglslike[default-options]{prefix}{\rgls-like cs}{\rglspl-like cs}{\rGls-like cs}{\rGlspl-like cs}
+ and for all caps:
+\glsxtrnewrGLSlike[default-options]{prefix}{\rGLS-like cs}{\rGLSpl-like cs}
+

+Defining commands in this manner (rather than simply using \newcommand) also allows the command to be identified as a sentence case blocker to prevent the label from being converted or, in the case of \glsxtrnewglslike and \glsxtrnewrglslike, as a mapping. See §5.2 for further details.

+ +

+ +
+

5.8. Indexing

+

+Indexing is normally performed implicitly by the \gls-like and \glstext-like commands, but this action can be prevented, such as by using the option noindex=true. These commands also generate text (the link text, §5.5). If you want to simply index an entry (to ensure that an entry is shown in the glossary) without producing any text then you can use \glsadd. Indexing is also performed by cross-referencing commands, such as \glssee. In the case of makeindex, \glssee simply behaves like \glsadd with a special format and the location set to Z (which pushes it to the end of the location list). Entries in ignored glossaries can only be indexed with bib2gls.

+If you want all defined entries to appear in the glossary, regardless of whether or not they have been used in the document, then you can use \glsaddall or \glsaddallunused (both provided by the base glossaries package). These both iterate over all entries (in all non-ignored glossaries). In the first case (\glsaddall), every entry is indexed with the \glsadd options provided in the optional argument of \glsaddall. In the second case (\glsaddallunused), only those entries that haven’t been marked as used so far will be indexed using \glsadd[format=glsignore]{label}. See the glossaries manual for further details of those commands.

+The glossaries-extra package provides a similar command:

+\glsaddallunindexed[glossary types]
+ This is like \glsaddallunused but indexes all entries that haven’t been indexed so far (again using the option format=glsignore). This is preferable to \glsaddallunused if you have to reset the first use flag for any entries. As with \glsaddallunused, if this command is required, it should be placed near the end of the document. Indexing any entries after either of these commands are used will cause spurious commas in the location lists.

+

+Iterative commands such as \glsaddall, \glsaddallunused and \glsaddallunindexed should not be used with bib2gls. Use the selection=all option instead.
+

+If you want to index a specific subset of entries, rather than all entries for a given glossary, you can use:

+\glsaddeach[options]{entry label list}
+ This does \glsadd[options]{entry-label} for each entry in the comma-separated entry label list. This command may be used with bib2gls, although it may be simpler to adjust the selection criteria or use filtering.

+

+\GlsXtrAutoAddOnFormat[entry-label]{format list}{glsadd options}
+ This will make the \gls-like and \glstext-like commands automatically use \glsadd[glsadd options]{entry-label} whenever a \gls-like or \glstext-like command is used for the entry given by entry-label when the format matches one of the formats in the comma-separated format list

+The optional argument label defaults to \glslabel (which will match entry-label that was used with \gls etc) and indicates the entry label to use in \glsadd and so needs to be expandable. The format list is a comma-separated list of format values that will trigger the automated adding. The glsadd options are the options to pass to \glsadd with format={format} prepended to the list.

+For example, with:

\GlsXtrAutoAddOnFormat{hyperbf}{counter=chapter}
+
then \gls[format=hyperbf]{sample} will be equivalent to:
\glsadd[format=hyperbf,counter=chapter]{sample}\gls[format=hyperbf]{sample}
+
Note that the explicit range markers will prevent a match unless you include them in format list (in which case, be sure to add both the start and end formats).

+Here’s another example:

\GlsXtrAutoAddOnFormat[dual.\glslabel]{hyperbf}{}
+
In this case \gls[format=hyperbf]{sample} will now be equivalent to:
\glsadd[format=hyperbf]{dual.sample}\gls[format=hyperbf]{sample}
+

+

+\GlsXtrAutoAddOnFormat is not applied to \glsadd as it could cause an infinite loop.
+

+In the context of glossaries and glossaries-extra, indexing refers to the mechanism used to ensure that an entry is included in its associated glossary. (If you also want to use \index, see §12.) This includes any entries that simply cross-reference another entry. The default is to use makeindex, which is a general purpose indexing application. Each time an entry is indexed, a line is added to an associated file that contains the indexing information, which includes the sort value, the hierarchical information (if the entry has a parent) and an associated location (the page number, by default). This information is used to sort the entries and collate the locations into a compact location list. The xindy package option switches to using xindy syntax, but the process is much the same.

+Since both makeindex and xindy are general purpose indexing applications they require an associated location (or a cross-reference) since indexes are typically used to lookup the locations in the document where the term occurs. Although glossaries are similar to indexes they can simply be used to provide brief summaries of each term without any locations. The way that makeindex and xindy work means that valid locations (that is, locations that conform to makeindex/xindy syntax) must be supplied even if no location list is required. If an invalid location is used, an error will occur during the makeindex/xindy step in the build process, even if the location will eventually be ignored when typesetting the glossary.

+All location lists can be suppressed with the nonumberlist option (which simply discards the location list for each entry), but there are occasions where only some locations need to be suppressed. The main way of hiding a location is to encapsulate the location with a command that does nothing. The \glsignore command is used for this purpose (format=glsignore). However, it’s important to remember that even though the location isn’t shown, it’s still present in the location list. This means that you will end up with spurious commas if there’s more than one item in the location list.

+The “noidx” method similarly writes indexing information, but in this case the information is written to the aux file. Again, empty locations can cause spurious commas in the location lists.

+The only method that recognises \glsignore as a special ignored location is bib2gls, where this format will trigger the entry’s selection but won’t add the ignored location to the location list. This avoids the problem of spurious commas caused by invisible locations.

+The location corresponds to a counter. The default is the page counter, but may be changed with the counter package option, the counter optional argument of \newglossary, the counter key when defining an entry, or the counter option when indexing an entry.

+Note that bib2gls v3.0+ converts an empty location (which can occur when the location counter is 0 and should be formatted as a Roman numeral) to an ignored location. For example, if you use counter=part but have \gls before the first \part. An empty location will trigger an error with makeindex and xindy.

+

+Since no entries are defined on the first LaTeX run with bib2gls, there’s no way of determining the entry’s glossary type or of finding if the entry’s counter key has been set. This means that if the counter has been assigned to either the entry’s glossary or to the entry itself, the location counter can’t be implemented until the entry has been defined. A second build is required to ensure that the locations use the correct counter.
+

+The location counter must expand to syntax that’s recognised by the indexing application. This is very restrictive with makeindex, which only recognises Western Arabic (\arabic), lowercase Roman numerals (\roman), uppercase Roman numerals (\Roman), lowercase Basic Latin (\alph) and uppercase Basic Latin (\Alph), with optionally a separator (hyphen by default). With xindy, the syntax must be defined (see the glossaries manual for further details).

+There’s no restriction on the location syntax with bib2gls. The only limitation is that if bib2gls can’t determine an associated numeric value according to its location parser, it won’t form ranges. This means that with bib2gls, you can set arbitrary text as the location (that’s not related to a counter) with thevalue. You can also use thevalue with makeindex and xindy, but only if the value matches the required location syntax.

+Both makeindex and xindy order the locations in the location lists. For example:

\makeglossaries
+\newglossaryentry{sample}{name={sample},description={an example}}
+\begin{document}
+\gls[thevalue=Z]{sample} (Z),  \gls[thevalue=4]{sample} (4),
+\gls[thevalue=xi]{sample} (xi), \gls[thevalue=2]{sample} (2),
+\gls[thevalue=iii]{sample} (iii), \gls[thevalue=A]{sample} (A).
+
+\printglossaries
+\end{document}
+
+Example 104: Location list ordering (makeindex) 📥🖹 📥🖺

+Example document with contrived locations that result in an ordered location list consisting of iii, xi, 2, 4, A, Z.

+

+With makeindex, the location list is grouped into the different number formats (\roman, \arabic and \Alph), with each group ordered numerically. The same result can be produced with xindy by adding the xindy package option to the above example.

+With bib2gls, the location list is always in order of indexing. The above example document can be converted to use bib2gls as follows:

\begin{filecontents*}{\jobname.bib}
+@entry{sample,name={sample},description={an example}}
+\end{filecontents*}
+\usepackage[record]{glossaries-extra}
+\GlsXtrLoadResources
+\begin{document}
+\gls[thevalue=Z]{sample} (Z),  \gls[thevalue=4]{sample} (4),
+\gls[thevalue=xi]{sample} (xi), \gls[thevalue=2]{sample} (2),
+\gls[thevalue=iii]{sample} (iii), \gls[thevalue=A]{sample} (A).
+\printunsrtglossaries
+\end{document}
+
+Example 105: Location list ordering (bib2gls) 📥🖹 📥🖺

+Example document with contrived locations that result in a location list consisting of Z, 4, xi, 2, ii, A, which corresponds to the record order.

+ This example is contrived. For most documents, the order of indexing will likely match the desired location list order.

+Another important difference between bib2gls and the other indexing methods is the treatment of cross-references identified by the cross-reference keys see, seealso and alias. With bib2gls, the cross-referencing information is picked up when bib2gls parses the bib file and is used to establish dependencies, which ensures that when entries with cross-references are selected, their cross-referenced entries will also be selected.

+With the other methods, cross-references are added to an entry’s location list by indexing the entry with a special format. The see, seealso and alias keys automatically trigger this indexing unless autoseeindex=false. See §5.9 for further details.

+Every time an entry is indexed, the following hook is also used:

+\glsxtrdowrglossaryhook{entry-label}
+ This does nothing by default. The argument is the entry’s label.

+The indexing code is encapsulated with:

+\glsencapwrcontent{code}
+ This adds grouping, which helps to prevent spacing issues caused by the whatsit that’s created by the indexing.

+The base glossaries package always performs the indexing before the link text for the \gls-like and \glstext-like commands. This means that if a page break occurs in the middle of the link text, the location will refer to the page number at the start of the link text (assuming the default page location counter). With glossaries-extra, you can use the option wrgloss=after to have the indexing occur after the link text. The wrgloss attribute can also be used. The default setting is initialised with \glsxtrinitwrgloss (see §5.1.1).

+Every time an entry is indexed, an internal field associated with the entry’s label is globally updated to keep a count of the number of times the entry has been indexed. The value can be accessed with:

+\glsentryindexcount{entry-label}
+ This command will expand to 0 if the entry hasn’t been indexed or hasn’t been defined. To test if the value is greater than 0 (that is, to test if the entry has been indexed yet), use:
+\glsifindexed{entry-label}{true}{false}
+ This expands to true if the entry is defined and has been indexed, otherwise it expands to false. No warning or error occurs if the entry hasn’t been defined.

+Note that the index count is a running total. This is not the same as the record count saved by bib2gls’s --record-count switch, which represents the total number of records for the given entry from the previous LaTeX run.

+The base glossaries package defines:

+\glswriteentry{entry-label}{code}
+ This command conditionally writes the indexing code (supplied by the second argument code). The original definition simply tests whether or not the indexonlyfirst setting is on. The glossaries-extra package redefines this command to perform additional checks to determine whether or not the indexing code should be performed.

+The modified definition uses:

+\glsxtrifindexing{true}{false}
+ to test the noindex setting. This does false if noindex=true, otherwise it does true.
+\ifglsindexonlyfirst true\else false\fiinitial: \iffalse
+ This is a conditional that corresponds to the indexonlyfirst package option. First use is tested using \GlsXtrIfUnusedOrUndefined rather than \ifglsused. The indexonlyfirst attribute is also tested. If the “index only first” setting is on and the entry has been used, code isn’t performed but auto-indexing via \glsxtrdoautoindexname is still performed (see §12).

+

+Since no entries are defined on the first LaTeX run with bib2gls, there’s no way of keeping track of whether or not an entry has been used or what its category is, which is required to query the indexonlyfirst attribute, so for the first document build all instances will be indexed. A second build is required for the “index only first” feature.
+

+ +

+ +
+

5.9. Cross-Referencing

+

+The base glossaries package only provides the see key, which automatically indexes the cross-reference using \glssee. The value of this key isn’t saved and can’t be accessed later. (The key was simply provided as a shortcut.) The indexing ensures that the cross-reference is shown in the location list.

+

+The auto-indexing feature of the see key was intended as a shortcut where only entries required in the document are defined. If you want to have a large file containing entries that may or may not be required in the document, then using see, seealso or alias can cause unwanted entries to appear in the glossary. In this case, see §5.9.1.
+

+The glossaries-extra package saves the value of the see key and additionally provides the seealso and alias keys that perform similar functions. The values of the see, seealso and alias keys can all be accessed at a later point in the document.

+If an entry with a cross-reference has been included in the glossary, there’s no guarantee that the cross-referenced entry will also be included. It won’t be included if it hasn’t been indexed anywhere in the document. You can use the indexcrossrefs package option to search for cross-references that require indexing at the end of the document, but note that this can be time-consuming if you have a large number of entries.

+

+With bib2gls you can simply change the selection criteria (selection={recorded and deps and see} or selection={recorded and deps and see not also}) to ensure that all cross-referenced entries are included even if they haven’t been indexed in the document.
+

+Example (see and seealso keys):

\newglossaryentry{pumpkin}{name={pumpkin},description={}}
+\newglossaryentry{cucumber}{name={cucumber},description={}}
+\newglossaryentry{melon}{name={melon},description={}}
+\newglossaryentry{gourd}{name={gourd},description={},
+ see={pumpkin,cucumber,melon}}
+\newglossaryentry{courgette}{name={courgette},description={}}
+\newglossaryentry{marrow}{name={marrow},description={},
+ seealso={courgette}}
+
When the gourd entry is defined, the cross-reference will automatically be indexed using \glssee. This means that the gourd entry will appear in the glossary, regardless of whether or not it is used in the document, with see pumpkin, cucumber & melon” in the location list. If gourd is also indexed in the document, then those locations will also be added to the gourd’s location list.

+The cross-referenced entries (pumpkin, cucumber and melon) will only appear in the glossary if they are also indexed in the document. This can be implemented automatically with indexcrossrefs.

+The seealso key in the marrow entry functions in much the same way, but it is indexed with \glsxtrindexseealso. This means that the marrow entry will have see also courgette” in its location list.

+The see key may optionally start with [tag] to replace the default \seename tag with tag. The seealso key doesn’t permit this. For example, the following is permitted:

\newglossaryentry{gourd}{name={gourd},description={},
+ see={[related topics]pumpkin,cucumber,melon}}
+
but you can’t replace see with seealso in the above as it would assume that the first label in the list is [related topics]pumpkin which is incorrect. The tag would have to be removed:
\newglossaryentry{gourd}{name={gourd},description={},
+ seealso={pumpkin,cucumber,melon}}
+
(You could then redefine \seealsoname to related topics, if required or redefine \glsxtruseseealsoformat as applicable.)

+Example (alias key):

\newglossaryentry{zucchini}{name={zucchini},description={},
+ alias={courgette}}
+
When the zucchini entry is defined, the alias key will automatically index zucchini with \glssee{zucchini}{courgette}. This means that the zucchini entry will be present in the glossary with see courgette” in the location list. If the zucchini entry is referenced in the document using a command like \gls, then the hyperlink (if enabled) will go to the courgette entry (not the zucchini entry) but the zucchini entry won’t be indexed.

+If you want the zucchini entry locations added to the courgette entry, you can redefine \glsxtrsetaliasnoindex (see §5.9.3) or, with bib2gls, use the alias-loc=transfer setting.

+

+With bib2gls, cross-references are selected according to the selection criteria. See the bib2gls manual for further details.
+

+ +

+ +
+

5.9.1. Entries that may not be required

+

+If you have a file containing a large number of entry definitions shared across multiple documents, then the use of the see, seealso or alias key can cause unwanted entries to appear in the document. This can be demonstrated as follows. Suppose the file myentries.tex contains:

\newglossaryentry{pumpkin}{name={pumpkin},description={}}
+\newglossaryentry{cucumber}{name={cucumber},description={}}
+\newglossaryentry{melon}{name={melon},description={}}
+\newglossaryentry{gourd}{name={gourd},description={},
+ see={pumpkin,cucumber,melon}}
+\newglossaryentry{cucurbit}{name={cucurbit},description={},
+ see={gourd}}
+\newglossaryentry{courgette}{name={courgette},description={}}
+\newglossaryentry{marrow}{name={marrow},description={},
+ seealso={courgette}}
+\newglossaryentry{zucchini}{name={zucchini},description={},
+ alias={courgette}}
+\newglossaryentry{broccoli}{name={broccoli},description={}}
+\newglossaryentry{cauliflower}{name={cauliflower},description={},
+ seealso={broccoli}}
+
Some of these entries have a cross-reference key set, but not all of these entries are required in the document:
\usepackage[colorlinks]{hyperref}
+\usepackage[nostyles,stylemods=bookindex,style=bookindex]
+ {glossaries-extra}
+\makeglossaries
+\loadglsentries{myentries}
+\begin{document}
+This document is only discussing \glspl{courgette} (baby
+\glspl{marrow}, also called a \gls{zucchini}),
+\glspl{pumpkin} and \glspl{melon}.
+\printglossaries
+\end{document}
+
+Example 106: Cross-references (autoseeindex=true) 📥🖹 📥🖺

+Example document illustrating the cross-referencing fields with the default auto-indexing of the cross-referenced terms.

+ Note that the glossary includes cucurbit and gourd, which aren’t referenced in the document. They could be useful as a redirect for the reader, but the gourd entry cross-references the cucumber entry, which isn’t included in the glossary, so the hyperlink target is undefined. The cauliflower entry has also been included in the glossary, but in this case it’s not useful for the reader as neither cauliflower nor broccoli (which it cross-references) are mentioned in the document. As with the cucumber cross-reference, the broccoli cross-reference hyperlink target is undefined.

+There are a number of methods to address some of these problems. The first method has the cross-referencing keys in the tex file (as above), but disables the auto-indexing:

\usepackage[colorlinks]{hyperref}
+\usepackage[autoseeindex=false,nostyles,stylemods=bookindex,
+ style=bookindex]{glossaries-extra}
+\makeglossaries
+\loadglsentries{myentries}
+\begin{document}
+This document is only discussing \glspl{courgette} (baby
+\glspl{marrow}, also called a \gls{zucchini}),
+\glspl{pumpkin} and \glspl{melon}.
+\printglossaries
+\end{document}
+
+Example 107: Cross-references (autoseeindex=false) 📥🖹 📥🖺

+Example document illustrating the cross-referencing fields without the auto-indexing of the cross-referenced terms.

+ This doesn’t show the zucchini entry or any of the cross-references in the glossary because the information hasn’t been added to the indexing files. One way around this is to insert the cross-reference in a post-description hook.

+

\usepackage[colorlinks]{hyperref}
+\usepackage[autoseeindex=false,nostyles,stylemods=bookindex,
+  style=bookindex]{glossaries-extra}
+\makeglossaries
+\loadglsentries{myentries}
+\glsdefpostdesc{general}{% 
+ \glsxtrseelists{\glscurrententrylabel}% 
 }
-
-

If there is a suffix associated with the current category, that will be used, otherwise -if the current suffix isn’t empty this inserts a space followed by the current suffix in -parentheses. You can access the label of the last (non-skipped) element with -\mglslastelementlabel. -

Note that in both cases the category corresponds to the multi-entry category (see -§6.8 Multi-Entry Category). -

To define a category-dependent prefix, use: -


\mglsdefcategoryprefix{category}{definition}

-

-You can reference the current prefix with \mglscurrentprefix. -

To define a category-dependent suffix, use: -


\mglsdefcategorysuffix{category}{definition}

-

-You can reference the current suffix with \mglscurrentsuffix. -

The default definition of \mglsprefix tests if there is a category prefix -using: -


\glshascategoryprefix{category}{true}{false}

-

-The category prefix is used with: -


\glsusecategoryprefix{category}

-

-

The default definition of \mglssuffix tests if there is a category suffix -using: -


\glshascategorysuffix{category}{true}{false}

-

-The category suffix is used with: -


\glsusecategorysuffix{category}

-

-

The current prefix \mglscurrentprefix and \mglscurrentsuffix are obtained -as follows:

- - - -
    -
  • if this is the first use of the multi-entry (§6.7 Multi-Entry - First Use) then the ⟨prefix⟩ is set to the value of the firstprefix option and - the ⟨suffix⟩ is set to the value of the firstsuffix option; -
  • -
  • otherwise the ⟨prefix⟩ is set to the value of the usedprefix option and the - ⟨suffix⟩ is set to the value of the usedsuffix option.
-

The prefix and suffix (if set) are placed outside of the hyperlink and text -formatting encapsulator. They are not affected by case-changing commands such as -\Mgls or \MGLS.
-

-

For example: - - - -

-
-\setabbreviationstyle{long-only-short-only}
-\newabbreviation{clostridium}{C.}{Clostridium}
-\newglossaryentry{botulinum}{name=botulinum,description={}}
-\multiglossaryentry[firstsuffix=botulism]
- {cbot}{clostridium,botulinum}
-
-

On first use, this produces (assuming the “clostridum” element hasn’t been used -previously): -

-

Clostridium botulinum (botulism).

-

On subsequent use, this produces: -

-

C. botulinum.

-

-

-

Top

6.4 Separators

-

The separators between each instance of \gls are given by the following -commands, which all take two arguments. The first argument is the label of -the previous element. The second argument is the label of the following -element. -


\glscombinedsep{prev label}{next label}

-

-This is inserted between two entries that have both been marked as used. The default -definition is: - - - -

-
-\newcommand*{\glscombinedsep}[2]{%
-  \glshasattribute{#1}{combinedsep}%
-  {\glsgetattribute{#1}{combinedsep}}%
-  { }%
+\begin{document}
+This document is only discussing 
+\glspl{courgette} (baby \glspl{marrow}, 
+also called a \gls{zucchini}), 
+\glspl{pumpkin} and \glspl{melon}.
+\printglossaries
+\end{document}
+
+Example 108: Cross-references (autoseeindex=false and post-name hook) 📥🖹 📥🖺

+Example document illustrating the cross-referencing fields without the auto-indexing of the cross-referenced terms but using the post-name hook.

+

+However, this still doesn’t solve the problem that the zucchini entry isn’t included in the glossary. It needs to be indexed, but indexing has been suppressed. Firstly, because the automatic indexing triggered by the alias key has been suppressed with autoseeindex=false, and, secondly, because the presence of the alias key automatically suppresses indexing with the \gls-like and \glstext-like commands. This doesn’t cause a problem for the zucchini hyperlink, since the target is courgette (obtained from the alias key).

+The second method is to not use those keys in the entry definitions and use \glssee or \glsxtrindexseealso within the document. For example, the file myentries.tex now contains:

\newglossaryentry{pumpkin}{name={pumpkin},description={}}
+\newglossaryentry{cucumber}{name={cucumber},description={}}
+\newglossaryentry{melon}{name={melon},description={}}
+\newglossaryentry{gourd}{name={gourd},description={}}
+\newglossaryentry{cucurbit}{name={cucurbit},description={}}
+\newglossaryentry{courgette}{name={courgette},description={}}
+\newglossaryentry{marrow}{name={marrow},description={}}
+\newglossaryentry{zucchini}{name={zucchini},description={}}
+\newglossaryentry{broccoli}{name={broccoli},description={}}
+\newglossaryentry{cauliflower}{name={cauliflower},description={}}
+
The document:
\usepackage[colorlinks]{hyperref}
+\usepackage[nostyles,stylemods=bookindex,style=bookindex]
+  {glossaries-extra}
+\makeglossaries
+\loadglsentries{myentries}
+\glssee{gourd}{pumpkin,melon,courgette}
+\glssee{zucchini}{courgette}
+\GlsXtrSetField{zucchini}{alias}{courgette}
+\begin{document}
+This document is only discussing \glspl{courgette} (baby
+\glspl{marrow}, also called a \gls{zucchini}),
+\glspl{pumpkin} and \glspl{melon}.
+\printglossaries
+\end{document}
+
+Example 109: Cross-references (no see, seealso or alias) 📥🖹 📥🖺

+Example document illustrating cross-references without using the see, seealso or alias keys.

+ Note that aliases require the alias field to be set. In this case, I’ve set it with \GlsXtrSetField. The gourd and zucchini entries have been included in the glossary because they were added with \glssee. The other entries are in the glossary because they were indexed when referenced with \gls or \glspl.

+Since cucumber isn’t required in the document, I haven’t included it in the cross-reference list for gourd. This method is flexible as it allows the cross-referencing to vary between documents. For example, another document may instead have:

\glsxtrindexseealso{pumpkin}{courgette,melon}
+\glsxtrindexseealso{melon}{pumpkin,courgette}
+\glsxtrindexseealso{courgette}{pumpkin,melon}
+

+The third method is to switch to bib2gls. The file myentries.tex can be converted to myentries.bib using:

convertgls2bib --index-conversion myentries.tex myentries.bib
+
I’ve used the option --index-conversion (or -i) which will use @index instead of @entry for entries that have an empty description (which is the case in this example). This creates the file myentries.bib, which contains the following (space compacted):
% Encoding: UTF-8
+@index{pumpkin, name={pumpkin}}
+@index{cucumber, name={cucumber}}
+@index{melon, name={melon}}
+@index{gourd, see={pumpkin,cucumber,melon}, name={gourd}}
+@index{cucurbit, see={gourd}, name={cucurbit}}
+@index{courgette, name={courgette}}
+@index{marrow, name={marrow}, seealso={courgette}}
+@index{zucchini, name={zucchini}, alias={courgette}}
+@index{broccoli, name={broccoli}}
+@index{cauliflower, name={cauliflower}, seealso={broccoli}}
+
The earlier example 106 on page 268 can be rewritten as:
\usepackage[colorlinks]{hyperref}
+\usepackage[record,nostyles,stylemods=bookindex,style=bookindex]
+ {glossaries-extra}
+\GlsXtrLoadResources[src=myentries]
+\begin{document}
+This document is only discussing \glspl{courgette} (baby
+\glspl{marrow}, also called a \gls{zucchini}),
+\glspl{pumpkin} and \glspl{melon}.
+\printunsrtglossaries
+\end{document}
+
In order to support letter groups, bib2gls needs to be invoked with the --group switch. The result is:
+Example 110: Cross-references (bib2gls) 📥🖹 📥🖺

+Example document illustrating the cross-referencing fields with bib2gls and selection=recorded and deps.

+ This uses the default selection={recorded and deps}, which selects entries that have records, and their dependencies. Records correspond to the usual indexing performed by the \gls-like, \glstext-like or \glsadd commands. With bib2gls, the cross-referencing fields don’t trigger an index but identify dependencies.

+Note that the above doesn’t include the gourd entry (which cross-references entries that have been indexed). The selection criteria can be changed to also include unrecorded entries that cross-reference selected entries. There are two options to choose from: selection={recorded and deps and see}, which will apply to all cross-reference fields (see, seealso and alias, or selection={recorded and deps and see not also}, which doesn’t consider the seealso field.

+Changing the resource options in the above example to:

\GlsXtrLoadResources[src=myentries,
+ selection={recorded and deps and see}]
+
results in:
+Example 111: Cross-references (bib2gls and selection=recorded and deps and see) 📥🖹 📥🖺

+Example document illustrating the cross-referencing fields with bib2gls and selection=recorded and deps and see.

+ This now includes the gourd entry because it cross-references pumpkin and melon, which have been recorded in the document. The cucurbit entry is also included because it cross-references the (now selected) gourd entry. Note that the cucumber entry has been selected because the gourd entry depends on it. This means there are no broken links in the glossary, but it looks a bit odd as the cucumber entry has no location list. As from bib2gls v3.0, this can be removed with one of the cross-reference pruning options, such as prune-xr. For example:
\GlsXtrLoadResources[src=myentries,
+ selection={recorded and deps and see},prune-xr]
+
results in:
+Example 112: Cross-references (bib2gls and selection=recorded and deps and see, prune-xr) 📥🖹 📥🖺

+Example document illustrating the cross-referencing fields with bib2gls and selection=recorded and deps and see and pruning.

+ This has removed the unnecessary cucumber from the gourd’s see list, and so cucumber doesn’t get selected.

+

+See the bib2gls user manual for further details on the cross-reference selection and pruning options.
+

+ +

+ +
+

5.9.2. Accessing the Cross-Referencing Fields

+

+If you have switched off the indexing of the cross-reference fields (with autoseeindex=false) or want to suppress the location lists, then you can adjust the glossary style or hooks to include the cross-references since they won’t be shown otherwise.

+

+\glsxtrseelists{entry-label}
+ If the entry given by entry-label has the see, seealso or alias fields set, this will display the cross reference according to \glsxtruseseeformat (for see and alias) or \glsxtruseseealsoformat (for seealso). If any of these fields are set, the list is encapsulated with:
+\glsxtrseelistsencap{content}
+ This simply does a space followed by content. If more than one of the fields are set (not recommended), then they will be displayed in the order: see, seealso and alias. The entire set will be encapsulated with \glsxtrseelistsencap and each sub-list will be separated with:
+\glsxtrseelistsdelim
+ which defaults to a comma followed by a space.

+

+\glsxtrusesee{entry-label}
+ If the entry given by entry-label has the see field set, this will display the cross reference according to \glsxtruseseeformat, otherwise this does nothing. An error (or warning with undefaction=warn) will occur if the entry hasn’t been defined.

+

+\glsxtrusealias{entry-label}
+ As \glsxtrusesee but for the alias field.

+

+\glsxtruseseealso{entry-label}
+ If the entry given by entry-label has the seealso field set, this will display the cross reference according to \glsxtruseseealsoformat, otherwise this does nothing. An error (or warning with undefaction=warn) will occur if the entry hasn’t been defined.

+

+\glsxtralias{entry-label}
+ This expands to the value of the alias field (which should be a single entry label) or empty if the field isn’t set. If the entry isn’t defined, this command will expand to \relax (without any error or warning). If you want to first test if the field is set, you can use \glsxtrifhasfield.

+

+\glsxtrseealsolabels{entry-label}
+ This expands to the value of the seealso field (which should be a comma-separated list of entry labels) or empty if the field isn’t set. If the entry isn’t defined, this command will expand to \relax (without any error or warning). If you want to first test if the field is set, you can use \glsxtrifhasfield.

+

+\glsxtruseseealsoformat{csv-list}
+ This command is used to format a “see also” cross-reference. This is simply defined to do:
\glsseeformat[\seealsoname]{csv-list}{}
+

+ +

+ +
+

5.9.3. Cross-Reference Indexing

+

+

+If you are using bib2gls, see the bib2gls user manual for information about the selection, see, seealso, alias, alias-loc options.
+

+The actual indexing of the seealso key is performed with:

+\glsxtrindexseealso{entry-label}{xr-list}
+ which is analogous to \glssee. As with \glssee, this can also be used explicitly.

+With makeindex, \glsxtrindexseealso simply does:

\glssee[\seealsoname]{entry-label}{xr-list}
+
With xindy, \glsxtrindexseealso behaves in an analogous way, using the appropriate cross-referencing markup.

+

+\glsxtrsetaliasnoindex
+ This hook is used within the \gls-like and \glstext-like commands to automatically switch off the indexing for aliases. (The hook is performed after the options set by \GlsXtrSetDefaultGlsOpts.)

+By default, this hook just sets noindex=true. If you would like to add locations to the aliased location list then you can redefine it to use:

+\glsxtrindexaliased
+ For example:
\renewcommand{\glsxtrsetaliasnoindex}{\glsxtrindexaliased}
+
Note that this needs noindex=false to ensure the indexing takes place so don’t simply append \glsxtrindexaliased to the definition of \glsxtrsetaliasnoindex.

+

+Don’t use the above hooks with bib2gls as this function is disabled with record=only and record=nameref. Use the alias-loc resource option instead.
+

+

+\glsxtraddallcrossrefs
+ This is used at the end of the document if indexcrossrefs=true to automatically index any cross-references (identified in the see, seealso and alias fields). This command iterates over all entries in all glossaries and, if an entry has been marked as used, does:
+\glsxtraddunusedxrefs
+ which indexes any labels identified in the cross-reference fields of the entry given by entry-label that haven’t been marked as used.

+This can be time consuming if there are a large number of entries defined. If this is the case, you may want to consider switching to bib2gls and use either selection={recorded and deps and see} or selection={recorded and deps and see not also}.

+There should be no need to use \glsxtraddallcrossrefs explicitly, but you may want to redefine it to only iterate over specific glossaries. The unused entries are indexed using the glsxtrunusedformat format.

+

+\glsxtrunusedformat{location}
+ This ignores its argument (the location) and just does \unskip.

+ +

+ +
+

5.10. First Use Flag

+

+Each entry has an associated first use flag (a conditional or boolean variable), which determines whether or not the entry has been marked as “used”. Unsetting this flag means that the entry is marked as used. Resetting the flag means that the entry is marked as unused.

+The \gls-like commands (which are the principle method of referencing an entry) all mark the entry as used after the link text is displayed but before the post-link hook is used.

+The purpose of this is to allow for additional information that needs to be shown when a term first appears in a document. For example, an abbreviation may need to have its full form shown on the instance. However, there are some cases where that additional information may need to be shown again or where the literal first instance of the term may need to be in its terse form. For example, if the term is used in the front matter.

+If any \gls-like commands (which are robust) are used in section headings or captions, they can end up in the table of contents or corresponding “list of …” (such as the list of figures). This can cause the first use flag to be unset too soon. For these situations, use the commands described in §5.3 instead.

+The base glossaries package provides commands to explicitly unset or reset the first use flag either locally (confined to the current scope) or globally. These commands are: \glsunset (global unset), \glslocalunset (local unset), \glsreset (global reset) and \glslocalreset (local reset).

+The glossaries-extra package adds hooks to the above commands. These do nothing by default, but are modified by \glsenableentrycount and \glsenableentryunitcount to perform the count increment or reset (see §6.1).

+

+\glsxtrpostunset{entry-label}
+ This hook is added to \glsunset.

+

+\glsxtrpostlocalunset{entry-label}
+ This hook is added to \glslocalunset.

+

+\glsxtrpostreset{entry-label}
+ This hook is added to \glsreset.

+

+\glsxtrpostlocalreset{entry-label}
+ This hook is added to \glslocalreset.

+The base package also provides commands to unset or reset all entries or all entries within particular glossaries: \glsunsetall and \glsresetall. For example, if you don’t want the first use in the front matter, you can unset all entries at the start of the front matter and reset them at the start of the main matter.

\frontmatter\glsunsetall
+…\mainmatter\glsresetall
+

+With glossaries-extra you can unset a specific subset of entries.

+\glslocalunseteach{entry-labels}
+ Locally unsets each entry in the given comma-separated list of entry labels.
+\glslocalreseteach{entry-labels}
+ Locally resets each entry in the given comma-separated list of entry labels.

+You can test if an entry has been marked as used with \ifglsused (but take care if you are using bib2gls or the undefaction=warn option, see below). This command allows the entry display style to vary the link text according to whether or not the entry has been marked as used. However, it can’t be used within the post-link hook as by that time, the first use flag will have already been unset.

+

+See the glossaries user manual for further details of the above commands.
+

+For example, in the following document the “html” entry is first used in the abstract, which shows both the long and the short form, but it would be helpful for the full form to be reshown in the main section about web pages. This is achieved by resetting the first use flag.

\newabbreviation{html}{HTML}{hypertext markup language}
+\begin{document}
+ \begin{abstract}
+ This abstract mentions \gls{html}.
+ \end{abstract}
+ Some casual reference to \gls{html}.
+ \section{Web Pages}
+ \glsreset{html}This section is all about \gls{html}.
+\end{document}
+
+Example 113: Resetting the first use flag (\glsreset) 📥🖹 📥🖺

+Example document illustrating the use of \glsreset.

+ In the above example, an alternative is to use \glsxtrfull where you particularly want the full form, but some abbreviation styles have a different expansion with the inline \glsxtrfull form compared with the first use of \gls.

+The glossaries-extra package provides the options preunset and prereset, which can be used to unset or reset the first use flag before the link text. This means that in the above example, the line:

\glsreset{html}This section is all about \gls{html}.
+
can be replaced with:
This section is all about \gls[prereset]{html}.
+

+As mentioned above, the first use flag is unset before the post-link hook, so \ifglsused isn’t helpful in the post-link hook. Instead, you can use:

+\glsxtrifwasfirstuse{true}{false}
+ This command is initialised by the \gls-like commands according to the value of the first use flag before the link text. It’s also initialised by the \glstext-like commands: not according to the value of the first use flag but according to whether or not the \glstext-like command emulates first use.

+For example, \gls will define \glsxtrifwasfirstuse to do its first argument if the first use flag indicates the entry hasn’t yet been used, otherwise it will define \glsxtrifwasfirstuse to do its second argument. Whereas \glsfirst will always define \glsxtrifwasfirstuse to do its first argument (unless used with preunset) and \glstext will always define \glsxtrifwasfirstuse to do its second argument (unless used with prereset), regardless of the state of the first use flag.

+The preunset and prereset options will additionally redefine \glsxtrifwasfirstuse to match the option. See §5.5.4 for further details about the post-link hook.

+If you want to check if the calling command was both the first use and it was a \gls-like command, you can use: \glsxtrifwasglslikeandfirstuse.

+The unset function performed by the \gls-like commands before the post-link hook uses the global \glsunset by default. If you want \glslocalunset instead, you can use the local option (provided by the base glossaries package) or postunset=local. To prevent the first use flag from being unset after the link text, use postunset=none.

+

\newabbreviation{html}{HTML}{hypertext markup language}
+\begin{document}
+{% local scope
+\gls[local]{html}. Used? \ifglsused{html}{Yes}{No}.
+}% end scope
+
+Used? \ifglsused{html}{Yes}{No}.
+
+\gls[postunset=none]{html}. Used? \ifglsused{html}{Yes}{No}.
+\end{document}
+
+Example 114: Local unset 📥🖹 📥🖺

+Example document illustrating locally unsetting the first use flag.

+

+If you are using the undefaction=warn option (which is automatically implemented by the record option), the first use flag is undefined and so is neither true nor false, in which case \ifglsused will trigger an error or warning and do neither. In this situation, you may need to use the following command instead.

+

+\GlsXtrIfUnusedOrUndefined{entry-label}{true}{false}
+ This does true if the entry hasn’t been defined or hasn’t been marked as used, otherwise does true. Note that this command will generate an error or warning (according to undefaction) if the entry hasn’t been defined, but will still do true. This is more useful than \ifglsused with bib2gls where the entries are never defined on the first LaTeX run.

+ +

+ +
+

5.10.1. Buffering Unsets

+

+Sometimes commands like \gls are used in a context where changing a boolean variable can cause things to go wrong. The outer, middle and inner formatting (see §5.5) can be used to change the font for the link text, but it may be that the \gls-like command occurs within a block of text that needs to be encapsulated by such a command.

+One example of this is using \gls in one of the commands provided with the soul package. For example:

\ul{Some text about \gls{html}.}
+
This causes the confusing error:
Glossary entry `{html}' has not been defined.
+
The simplest workaround is to put \gls{html} inside the argument of \mbox. For example:
\ul{Some text about \mbox{\gls{html}}.}
+
This can work provided it’s not the first use of this entry. It if is, then unsetting the first use flag causes a problem and results in the error:
! Package soul Error: Reconstruction failed.
+
The glossaries-extra package provides a way of temporarily switching off \glsunset so that it just makes a note of the entry’s label but doesn’t actually perform the change.
+\GlsXtrStartUnsetBufferingmodifier: *
+ This starts the buffering. The unstarred version doesn’t check for duplicates, so the internal list may end up with multiple occurrences of the same label. The starred version only adds a label to the internal list if it’s not already in it. If you are using entry counting (see §6.1) the unstarred version is preferable to ensure the entry count is correct.

+

+Buffering only applies to the global \glsunset and does not affect the local \glslocalunset.
+

+The buffer can be locally cleared with:

+\GlsXtrClearUnsetBuffer
+ This doesn’t stop buffering. It will simply discard the labels that have been buffered so far.

+In order to restore the normal behaviour of \glsunset, the buffering must be stopped or discarded.

+\GlsXtrStopUnsetBufferingmodifier: *
+ This stops the buffering, restores \glsunset, and unsets all the buffered labels. The starred form uses \glslocalunset to unset the buffered labels.

+Before you stop the unset buffering, you can iterate over the current buffer.

+\GlsXtrForUnsetBufferedList{handler-cs}
+ This iterates over the currently buffered list of entry labels and performs \handler-cs{entry-label} for each label, where cs is a control sequence that takes a single argument. This is best used with the starred version of \GlsXtrStartUnsetBuffering* to avoid duplicates.

+

+\GlsXtrDiscardUnsetBuffering
+ This discards the buffer and restores \glsunset to its normal behaviour.

+It’s possible to locally unset entries before use (analogous to preunset=local) if the entry has already been encountered in the buffer. This will still be problematic for situations where changing a conditional causes a problem, but may be useful in some situations. This feature is enabled with:

+\GlsXtrUnsetBufferEnableRepeatLocal
+ This may be placed before or after \GlsXtrStartUnsetBuffering but the locally collected list of unused entries will be cleared at the start of each instance of \GlsXtrStartUnsetBuffering. It will also be cleared by \GlsXtrClearUnsetBuffer. All entries that have been marked as unused can be reset with:
+\GlsXtrResetLocalBuffer
+ This will perform a local reset on all the entries in the “not used” list and do \GlsXtrClearUnsetBuffer.

+This feature can be switched off with:

+\GlsXtrUnsetBufferDisableRepeatLocal
+ It’s disabled by default.

+The way this feature works is as follows (while buffering is active): +

    +
  1. 1.Each time an entry is referenced with a \gls-like command, the \glsinitreunsets hook checks if the current entry (identified by \glslabel) has been added to the buffer. (Bear in mind that the label is added to the buffer after the link text when \glsunset is used.)

    + +

      +
    1. (a)If it has been added to the buffer, then this is an indication that the entry has already been used within the buffer zone (that is, an attempt has been made to globally unset the first use flag). A local unset is then performed, which is essentially equivalent to using the preunset=local option, so the reference will behave like subsequent use.

      +

    2. (b)If it hasn’t been added to the buffer, then this is an indication that the entry hasn’t already been used within the buffer zone, but it may or may not have been used before the buffering started. If the first use flag indicates that the entry hasn’t been used, the entry’s label will be added to the “not used” list. The reference will behave like first use, but the unset won’t be performed afterwards (because buffering is in progress). +
    +

    +

  2. 2.The entries that are in the “not used” list can be locally reset and both the buffer and the “not used” list can be cleared with \GlsXtrClearUnsetBuffer. +
+ Note that this approach can’t be used for situations where the change in conditional causes a problem, but it can be used in situations where the content of an environment or command is repeatedly processed, which upsets the first use flag.

+For example, consider the following beamer document:

\documentclass{beamer}
+\usepackage{glossaries-extra}
+\newabbreviation{svm}{SVM}{support vector machine}
+\newabbreviation{html}{HTML}{hypertext markup language}
+\begin{document}
+\begin{frame}
+  \frametitle{Frame 1}
+  \begin{itemize}
+   \item \gls{html} and \gls{html}
+  \end{itemize}
+\end{frame}
+\begin{frame}
+  \frametitle{Frame 2}
+  \begin{itemize}
+   \item<+-> \gls{svm} and \gls{svm}
+   \item<+-> \gls{svm} and \gls{html}
+  \end{itemize}
+\end{frame}
+\frame{\printunsrtglossaries}
+\end{document}
+
The first page isn’t a problem as the frame doesn’t have overlays. The first reference of the “html” entry shows the full form and the next shows just the short form. The second page (which is the first of the overlays of the second frame) correctly shows the full form of the “svm” entry for the first reference and the short form for the second reference, but on the third page (the second of the overlays) now has all instances of “svm” showing as subsequent use (just the short form).

+I could put \glslocalresetall at the start of the frame, but that would reset the “html” entry as well. Another workaround is to locally reset the first “svm” entry with preresetlocal, but that defeats the point of the first use flag, which is intended to keep track of whether or not you have used an entry so that you don’t have to.

+The frame can be placed inside a buffering zone:

\GlsXtrStartUnsetBuffering
+\begin{frame}
+  \frametitle{Frame 2}
+  \begin{itemize}
+   \item<+-> \gls{svm} and \gls{svm}
+   \item<+-> \gls{svm} and \gls{html}
+  \end{itemize}
+\end{frame}
+\GlsXtrStopUnsetBuffering
+
This ensures that the first use flag isn’t reset until after the frame, but it means that all references to the “svm” entry on both the second and third page show the full form.

+The “repeat local” function can be used so that repeated references for the same entry can be locally unset before use. This can be enabled with \GlsXtrUnsetBufferEnableRepeatLocal which fixes the second page, but not the third page, which shows all references to “svm” as the short form. What’s needed is to locally reset and entries that are in the frame but haven’t yet been used (“svm”, in this case) at the start of the frame with \GlsXtrResetLocalBuffer:

\GlsXtrStartUnsetBuffering
+\GlsXtrUnsetBufferEnableRepeatLocal
+\begin{frame}
+\GlsXtrResetLocalBuffer
+  \frametitle{Frame 2}
+  \begin{itemize}
+   \item<+-> \gls{svm} and \gls{svm}
+   \item<+-> \gls{svm} and \gls{html}
+  \end{itemize}
+\end{frame}
+\GlsXtrStopUnsetBuffering
+
Note that on the first overlay, the buffer and “not used” list are both empty. On the second overlay, the buffer contains the “svm” and “html” labels and the “not used” list just contains the “svm” label. The reset performed by \GlsXtrResetLocalBuffer will reset “svm” and then clear both the buffer and the “not used” list. This means that the first “svm” reference is once again considered first use and it will once again be added to the “not used” list (so that it would be reset again if there was a third overlay).
+Example 115: Abbreviations with beamer (unset buffering) 📥🖹 📥🖺

+Page 1. An example document that uses beamer with buffering.Page 2. An example document that uses beamer with buffering.Page 3. An example document that uses beamer with buffering.Page 4. An example document that uses beamer with buffering.

+ This is quite cumbersome, but these commands could potentially be added to hooks at the start and end of problematic environments (but the buffering needs to be started and ended outside of the repeated content).

+The following example uses \mbox to protect \gls within the buffer zone:

\documentclass{article}
+
+\usepackage[T1]{fontenc}
+\usepackage{soul}
+\usepackage{glossaries-extra}
+
+\newabbreviation{html}{HTML}{hypertext markup language}
+
+\begin{document}
+\GlsXtrStartUnsetBuffering
+\ul{Some text about \mbox{\gls{html}}.
+Next use: \mbox{\gls{html}}.}
+\GlsXtrStopUnsetBuffering
+
+Next use: \gls{html}.
+\end{document}
+
This produces:
+Example 116: Buffering first use unsets with \mbox 📥🖹 📥🖺

+Example document that uses buffering to defer unsetting the first use flag unset in problematic contexts. The use of box creates an overly long line.

+ Note that the use of \mbox prevents line-breaking and the second instance of \gls{html} is treated as first use.

+

+Note that since the change in the first use flag now doesn’t occur until \GlsXtrStopUnsetBuffering, multiple references of the same term within the buffering zone will always be treated as first use (if the term wasn’t used before the buffering started).
+

+Other alternatives include using \protect and inner formatting (see §5.5.3 for limitations) or middle formatting (see §5.5.2) with \GlsXtrExpandedFmt (which can’t be used with fragile link text). Both approaches are demonstrated in the following example:

\documentclass{article}
+
+\usepackage[T1]{fontenc}
+\usepackage{soul}
+\usepackage{glossaries-extra}
+
+\newabbreviation{html}{HTML}{hypertext markup language}
+% custom command to expand content before using \ul:
+\newrobustcmd{\xpul}[1]{\GlsXtrExpandedFmt{\ul}{#1}}
+
+\begin{document}
+First approach (inner formatting):
+{% scope
+ \renewcommand{\glsxtrdefaultentrytextfmt}[1]{\ul{#1}}%
+ \ul{Some text about \protect\gls{html}.
+ Next use: \protect\gls{html}}
 }
-
-

This will use the combinedsep attribute for the ⟨prev label⟩’s category, if set. Otherwise -this just does a space. Note that this ignores the second argument. -


\glscombinedfirstsep{prev label}{next label}

-

-This is inserted between two entries where only the next entry has been marked as -used. The default definition is: - - - -

-
-\newcommand*{\glscombinedfirstsep}[2]{%
- \glshasattribute{#1}{combinedfirstsep}%
- {\glsgetattribute{#1}{combinedfirstsep}}%
- {\glscombinedsep{#1}{#2}}%
+
+Next use: \gls{html}.
+
+Second approach (middle formatting with expanded link text):
+\glsresetall
+{% scope
+ \renewcommand{\glsxtrabbreviationfont}[1]{\xpul{#1}}%
+ \renewcommand{\glsxtrregularfont}[1]{\xpul{#1}}%
+ \ul{Some text about \protect\gls{html}.
+ Next use: \gls{html}.}
 }
-
-

This will use the combinedfirstsep attribute for ⟨prev label⟩’s category, if set. If that -attribute isn’t set, \glscombinedsep is used. -


\glscombinedsepfirst{prev label}{next label}

-

-This is inserted between two entries where only the previous entry has been marked -as used. The default definition is: - - - -

-
-\newcommand*{\glscombinedsepfirst}[2]{%
- \glshasattribute{#1}{combinedsepfirst}%
- {\glsgetattribute{#1}{combinedsepfirst}}%
- {\glscombinedsep{#1}{#2}}%
+
+Next use: \gls{html}.
+\end{document}
+
This produces:
+Example 117: Alternatives to buffering 📥🖹 📥🖺

+Example document illustrating inner and middle formatting alternatives to unset buffering where entries are referenced within sensitive formatting commands.

+

+The change in the first use flag isn’t the only content within the \gls-like commands that can cause a problem. The whatsit caused by indexing can also be problematic. Buffering can also be used to help with that situation. Indexing can be switched off at the start of the buffering and \GlsXtrForUnsetBufferedList can be used to perform the indexing outside of the problematic content. Note that this can cause a problem if the location changes (for example, if a page break occurs within the buffering zone).

+Buffering can also be used to simply gather the labels that have been referenced with a \gls-like command in order to, for example, display a mini-glossary at the end of the block. See for example, Gallery: Mini-Glossary.

+ +

+ +
+

5.11. Accessing Fields

+

+See §3.5 for setting fields after an entry has been defined, §5.13 for fields that contain comma-separated lists or whose values may be contained within comma-separated lists, §5.9.2 for cross-referencing fields (see, seealso and alias), and §5.15 for testing field values. See also the base glossaries package’s commands, such as \glsentryname and \glsletentryfield.

+

+\glsxtrusefield{entry-label}{field-label}
+ This expands to the value of the field (identified by its internal label field-label) for the entry identified by entry-label. Expands to \relax if the field or entry are undefined.

+

+\Glsxtrusefield{entry-label}{field-label}
+ This is like \glsxtrusefield but converts the first character to uppercase using \makefirstuc (provided by mfirstuc) which is robust. If hyperref is loaded, \Glsxtrusefield{entry-label} will use the expandable:
\MFUsentencecase{\glsxtrusefield{entry-label}}
+
in a PDF bookmark.

+

+\GLSxtrusefield{entry-label}{field-label}
+ This is like \glsxtrusefield but converts the field value to uppercase. See §5.2.3.

+

+\glsxtrfieldtitlecase{entry-label}{field-label}
+ This is like \glsxtrusefield but converts the field value to title case. This internally uses:
+\glsxtrfieldtitlecasecs{content}
+ This converts content to title case (expanding the first token once). If \glscapitalisewords has been defined, that will be used, otherwise \capitalisewords will be used.

+

+\glsxtrentryparentname{entry-name}
+ Expands to the entry’s parent name if defined. Expands to nothing if the entry doesn’t have a parent or if the entry isn’t defined. If you simply require the parent label then use \glsentryparent or, to first test if the entry has a parent, either use \ifglshasparent or use \glsxtrifhasfield with the field label set to parent.

+

+\glsxtrhiername{entry-label}
+ Displays the hierarchical name for the given entry. The cross-reference format \glsseeitemformat may be redefined to use this command to show the hierarchy, if required.

+This command has a recursive definition. If the entry given by entry-label has a parent, then this command will do \glsxtrhiername{parent-label} for the entry’s parent and will then do the separator \glsxtrhiernamesep.

+Then, regardless of whether or not the entry has a parent, it will do \glsfmttext{entry-label}, if the entry is an abbreviation (see §1.2.4), or \glsfmtname{entry-label} otherwise.

+

+If hyperref is loaded, \glsxtrhiername will behave as \glsentryname in a PDF bookmark.
+

+

+\glsxtrhiernamesep
+ Separator symbol ( ◁ ) used between each name in commands like \glsxtrhiername.

+

+\Glsxtrhiername{entry-label}
+ As \glsxtrhiername but the first name in the list has its first character converted to uppercase using \Glsfmttext or \Glsfmtname (sentence case). If hyperref is loaded, \Glsxtrhiername will expand to:
\MFUsentencecase{\glsentryname{entry-label}}
+
in a PDF bookmark. The \makefirstuc mapping from \glsxtrhiername to \Glsxtrhiername is set with \glsmfuaddmap, if supported.

+

+\GlsXtrhiername{entry-label}
+ As \glsxtrhiername but each name in the list has its first character converted to uppercase using \Glsfmttext or \Glsfmtname.

+

+\GLSxtrhiername{entry-label}
+ As \glsxtrhiername but the first name in the list is converted to uppercase using \GLSfmttext or \GLSfmtname.

+

+\GLSXTRhiername{entry-label}
+ As \glsxtrhiername but each name in the list is converted to uppercase using \GLSfmttext or \GLSfmtname (all caps).

+ +

+ +
+

5.12. Encapsulation (Formatting) Based on Field Values

+

+These commands assume that a given entry has a special purpose field that’s used to store information on how to format text.

+ +

+ +
+

5.12.1. Foreign Language Field

+

+

+\GlsXtrForeignTextField
+ This command should expand to the internal field label used to store a language tag (such as en-GB or de-CH-1996). The default value is userii (which corresponds to the user2 key).

+

+\GlsXtrForeignText{entry-label}{text}
+ If the entry given by entry-label has the field identified by \GlsXtrForeignTextField set, then this command will encapsulate text according to the language tag stored in that field.

+This uses tracklang’s interface to determine the language label that corresponds to the language tag. If the language label can be determined, the text will be encapsulated with \foreignlanguage otherwise just text is done.

+If \foreignlanguage isn’t defined (that is, there’s no language support for the document), this command simply does text. If an old version of tracklang is used, this command issues a warning and just does text.

+If tracklang can’t determine the corresponding language label to use with \foreignlanguage, then a warning is issued with:

+\GlsXtrUnknownDialectWarning{locale}{root language}
+ where locale is the language tag supplied in the given field value and root language is the root language that tracklang has inferred from the tag.

+

+\GlsXtrForeignText requires tracklang v1.3.6+.
+

+For example:

\usepackage[main=british,brazilian,ngerman]{babel}
+\usepackage{glossaries-extra}
+\setabbreviationstyle{long-short-user}
+\newabbreviation
+  [user1={Associação Brasileria de Normas Técnicas},
+   user2={pt-BR}
+ ]
+ {abnt}{ABNT}{Brazilian National Standards Organization}
+
+\newabbreviation
+ [user1={Deutsches Institut für Normung e.V.},
+  user2={de-DE-1996}]
+ {din}{DIN}{German Institute for Standardization}
+
+\newabbreviation{tug}{TUG}{\TeX\ User Group}
+
+\renewcommand*{\glsxtruserparen}[2]{%
+  \glsxtrfullsep{#2}%
+  \glsxtrparen
+  {#1%
+   \ifglshasfield{\glsxtruserfield}{#2}%
+   {, \emph{\GlsXtrForeignText{#2}{\glscurrentfieldvalue}}}%
+   {}%
+  }%
 }
-
-

This will use the combinedsepfirst attribute for ⟨prev label⟩’s category, if set. If that -attribute isn’t set, \glscombinedsep is used. -


\glscombinedfirstsepfirst{prev label}{next label}

-

-This is inserted between two entries where both have been marked as used. The -default definition is: - - - -

-
-\newcommand*{\glscombinedfirstsepfirst}[2]{%
- \glshasattribute{#1}{combinedfirstsepfirst}%
- {\glsgetattribute{#1}{combinedfirstsepfirst}}%
- {\glscombinedsep{#1}{#2}}%
+
+\begin{document}
+\gls{abnt}, \gls{din}, \gls{tug}.
+\printunsrtglossaries
+\end{document}
+
This produces:
+Example 118: Foreign language field encapsulation 📥🖹 📥🖺

+Example document illustrating fields containing different languages that need encapsulating with the relevant language command.

+

+ +

+ +
+

5.12.2. Associated Entry Format

+

+An entry may have a particular formatting style associated with it (rather than a more general category-wide format). This needs to be provided by a text-block command that takes a single argument. The name (without the leading backslash) should be stored in the field identified by:

+\GlsXtrFmtFieldinitial: useri
+ This command should expand to the internal field label used to store the formatting command’s control sequence name. The default value is useri (which corresponds to the user1 key).

+

+\glsxtrfmt[options]{entry-label}{text}
+ This command behaves like:
\glslink[options]{entry-label}{fmt-link-text}
+
where the link text fmt-link-text is formatted according to:
+\glsxtrfmtdisplay{csname}{text}{insert}
+ The default definition simply does \csname{text}insert where the control sequence name csname is obtained from the field given by \GlsXtrFmtField. If the field hasn’t been set, \@firstofone is used (which simply does its argument). The unstarred version assumes an empty insert. The default \glslink options are given by \GlsXtrFmtDefaultOptions.

+

+The post-link hook is suppressed with \glsxtrfmt.
+

+If you don’t want the complexity of \glslink, a partially expandable command is provided that may be used in section headings:

+\glsxtrentryfmt{entry-label}{text}
+ If hyperref has been loaded, this will expand to:
+\glsxtrpdfentryfmt{entry-label}{text}
+ within the PDF bookmarks, which just does text. Otherwise \glsxtrentryfmt will format text according to the control sequence name identified in the field given by \GlsXtrFmtField (or @firstofone, if not set). For example:
\documentclass{article}
+\usepackage[T1]{fontenc}
+\usepackage{amsmath}
+\usepackage[colorlinks]{hyperref}
+\usepackage[postdot,style=index]{glossaries-extra}
+\makeglossaries
+\newcommand*{\mtx}[1]{\boldsymbol{#1}}
+\newcommand*{\mtxinv}[1]{\mtx{#1}\sp{-1}}
+
+\newglossaryentry{matrix}{%
+  name={matrix},
+  symbol={\ensuremath{\mtx{M}}},
+  plural={matrices},
+  user1={mtx},% corresponds to \mtx
+  description={rectangular array of values}
 }
-
-

This will use the combinedfirstsepfirst attribute for ⟨prev label⟩’s category, if set. If that -attribute isn’t set, \glscombinedsep is used. -

These commands may be redefined as required. For example, to have no space -between two elements that have both been marked as used and are both -abbreviations (disregarding category attributes): - - - -

-
-\renewcommand*{\glscombinedfirstsepfirst}[2]{%
- \ifglshasshort{#1}{\ifglshasshort{#2}{}{\space}}{\space}%
+
+\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}
 }
-
-

-

There are some commands for redefining the above separators to common -combinations. -


\glssetcombinedsepabbrvnbsp

-

-This does the following: - - - -

-
-\renewcommand*{\glscombinedsep}[2]{%
- \glshasattribute{#1}{combinedsep}%
- {\glsgetattribute{#1}{combinedsep}}%
- {\ifhasshort{#1}{~}{ }}%
-}%
-\renewcommand*{\glscombinedsepfirst}[2]{%
- \glshasattribute{##1}{combinedsepfirst}%
- {\glsgetattribute{##1}{combinedsepfirst}}%
- {\ifhasshort{#1}{~}{ }}%
-}%
-\renewcommand*{\glscombinedfirstsep}[2]{%
- \glshasattribute{#1}{combinedfirstsep}%
- {\glsgetattribute{#1}{combinedfirstsep}}%
- { }%
+
+\newglossaryentry{matrixinv}{%
+  name={matrix inverse},
+  symbol={\ensuremath{\mtxinv{M}}},
+  user1={mtxinv},% corresponds to \mtxinv
+  description={a square \gls{matrix} such that    $\mtx{M}\mtxinv{M}=\glssymbol{identitymatrix}$}
+}
+\begin{document}
+A \gls{matrix} is denoted \glssymbol{matrix}.
+The inverse is denoted \glssymbol{matrixinv}.
+\[
+  \glsxtrfmt{matrix}{A} \glsxtrfmt{matrixinv}{A}
+  = \glssymbol{identitymatrix}
+\]
+Compare $\glsxtrfmt{matrix}{A}[_0]$
+with $\glsxtrfmt*{matrix}{A}[_0]$.
+\printglossaries
+\end{document}
+
This produces:
+Example 119: Storing a formatting command in a field 📥🖹 📥🖺

+Example document that uses a field to store the formatting command associated with the glossary entry.

+ Note the difference between using \glsxtrfmt* vs \glsxtrfmt.

+There are also sentence case versions of the above commands:

+\Glsxtrfmt[options]{entry-label}{text}
+ This is simply a shortcut for:
\glsxtrfmt[options]{entry-label}{\glssentencecase{text}}
+
Similarly for the starred form:
+\Glsxtrfmt*[options]{entry-label}{text}[insert]
+ which is a shortcut for:
\glsxtrfmt*[options]{entry-label}{\glssentencecase{text}}[insert]
+

+

+\Glsxtrentryfmt{entry-label}{text}
+ This is a shortcut for
\glsxtrentryfmt{entry-label}{\glssentencecase{text}}
+
but uses:
+\Glsxtrpdfentryfmt{entry-label}{text}
+ for the PDF bookmarks. This uses \MFUsentencecase to perform the case-change, which is expandable.

+If you are writing \glsxtrfmt or \glsxtrentryfmt explicitly in the document text, you can, of course, enter the appropriate case in text directly. The purpose of providing the sentence case commands is to enable a mapping to be setup with \MFUaddmap in the event that \glsxtrfmt or \glsxtrentryfmt occur at the start of content, such as another entry’s description, that will have sentence case automatically applied. This will require mfirstuc v2.08+ to support the mapping. See the mfirstuc manual for further details.

+ +

+ +
+

5.13. Comma-Separated Lists

+

+These commands are for field values that are comma-separated lists (for example, the field has been constructed with \glsxtrapptocsvfield) or for testing if field values are contained within comma-separated lists.

+

+If you are using bib2gls, you can sort field values that contain a comma-separated list of labels (such as the see or seealso field) with the sort-label-list option (provided bib2gls can access those fields). See the bib2gls manual for further details.
+

+

+\glsseelist{csv-list}
+ This is provided by the base glossaries package to format the entry labels in see cross-reference list. (It’s used internally by \glsseeformat, which adds the see prefix.) It may also be used for any comma-separated list of entry labels. Note that the argument isn’t expanded. If expansion is required, use:
+\glsxtrseelist{csv-list}
+ This fully expands its argument and passes the result to \glsseelist. With just the base glossaries package, each item is encapsulated with \glsseeitem. The glossaries-extra package redefines \glsseelist to make it more flexible and provides additional commands to further customize the formatting.

+

+\glsxtrtaggedlist{singular tag}{plural tag}{label prefix}{csv-list}
+ This is a similar command that has an initial tag inserted before the start of the list. If the list only contains one element, the singular tag is used. If the list contains more than one element, the plural tag is used. The separator between the tag and the list is given by:
+\glsxtrtaggedlistsepinitial: \space
+ The separators between the elements of the list and the formatting of each list element is as for \glsseelist (see below). If the list is empty, nothing is displayed. The label prefix is inserted before the current item in the list to form the entry label.

+

+Spaces in csv-list are significant. Avoid unwanted leading or trailing spaces and empty labels.
+

+

+\glsseeitemformat{entry-label}
+ The base glossaries package just uses \glsentryname or \glsentrytext in this command. The glossaries-extra package redefines this so that it does:
\ifglshasshort{entry-label}{\glsfmttext{entry-label}}
+{\glsfmtname{entry-label}}
+
Note that the use of \glsfmttext rather than \glsentrytext allows the abbreviation style to be used.

+With glossaries-extra, the first item in \glsseelist will be encapsulated with:

+\glsseefirstitem{entry-label}
+ The default definition is simply \glsseeitem{entry-label} but can be redefined, for example to convert the first character to uppercase if sentence case is required.

+

+If the label corresponds to a multi-entry, \mglsseefirstitem will be used instead (see §7.12). Similarly, \mglsseeitem will be used instead of \glsseeitem for a multi-entry label.
+

+

+\glsseesepinitial: ,␣
+ This is used between each entry in the list, except between the final pair.

+

+\glsseelastsep
+ This is used between the penultimate and final item in the list. The default definition is:
\space\andname\space
+

+With glossaries-extra, if there are at least three elements in the list, the separator between the final two elements will be given by:

+\glsseelastoxfordsep
+ This just defaults to \glsseelastsep but may be redefined to include a comma, if preferred.

+

+\glsxtrforcsvfield{entry-label}{field-label}{handler cs}modifier: *
+ This iterates over the comma-separated list stored in the given field (identified by its internal label) for the entry identified by entry-label and performs handler cs{element} for each element of the list. This command uses \glsxtrifhasfield so the complete list can be obtained with \glscurrentfieldvalue. Does nothing if the field hasn’t been set or the entry hasn’t been defined. The unstarred version adds implicit grouping. The starred version doesn’t.

+It’s possible to prematurely break the loop at the end of the current iteration with:

+\glsxtrendfor
+ If nested within another command that also uses \@for, use the unstarred version to localise the break. This command is simply set to \@endfortrue, which is provided by the xfor package.

+

+\glsxtrfieldformatcsvlist{entry-label}{field-label}
+ This formats the comma-separated list stored in the given field (identified by its internal label) for the entry identified by entry-label using datatool-base’s \DTLformatlist. This command uses \glsxtrifhasfield so the complete list can be obtained with \glscurrentfieldvalue. This adds implicit grouping. There is no starred version.

+The following demonstrates the difference between \glsseelist (which specifically requires a list of labels) and \glsxtrfieldformatcsvlist (which formats an arbitrary list):

\usepackage[colorlinks]{hyperref}
+\usepackage[autoseeindex=false]{glossaries-extra}
+\newglossaryentry{example}{name={example},description={},
+ see={another1,another2}}
+\newglossaryentry{another1}{name={another one},description={}}
+\newglossaryentry{another2}{name={another two},description={}}
+\begin{document}
+\glsxtrapptocsvfield{example}{animals}{duck}
+\glsxtrapptocsvfield{example}{animals}{albatross}
+\glsxtrapptocsvfield{example}{animals}{arara}
+Animal list: \glsxtrfieldformatcsvlist{example}{animals}
+
+See list: \glsxtrifhasfield{see}{example}
+ {\glsxtrseelist{\glscurrentfieldvalue}}{not set}.
+
+\printunsrtglossaries
+\end{document}
+
There’s no indexing in this document so I’ve used autoseeindex=false to avoid an error. This means there’s no cross-reference list in the glossary but, as demonstrated, the “see” list can be reproduced in the document. The result is:
+Example 120: Formatting lists contained in field values 📥🖹 📥🖺

+Example document that uses two different methods of sorting fields that contain a comma-separated list.

+ This first constructs a comma-separated list in a custom internal field with the label animals. There’s no associated key that can be used in \newglossaryentry. In this case, the field could simply be set in one command. For example:
\glsxtrdeffield{example}{animals}{duck,albatross,arara}
+
The main reason for providing \glsxtrapptocsvfield is for the benefit of bib2gls, as it sometimes has to construct a field value list while it’s writing the glstex file, but there may be other uses in complex documents that construct field values through some custom function.

+

+\GlsXtrIfValueInFieldCsvList{entry-label}{field-label}{value}{true}{false}modifier: *
+ This does true if the comma-separated list stored in the given field (identified by its internal label) contains the given value (using \DTLifinlist provided by datatool-base) or false if the value isn’t in the list or if the field hasn’t been set or the entry hasn’t been defined. The unstarred version adds implicit grouping. The starred version doesn’t.

+This command internally uses \glsxtrifhasfield, so take care if it’s nested. Within false, you can test if \glscurrentfieldvalue is empty or undefined. If it’s defined but not empty, then the field has been set but doesn’t contain value.

+

+\GlsXtrIfFieldValueInCsvList{entry-label}{field-label}{csv-list}{true}{false}modifier: *
+ This command is essentially the other way around to the above. In this case, the comma-separated list is provided in the argument csv-list and the search value is the field’s value. This does true if the value is found in csv-list or false if the value isn’t in csv-list or the field isn’t set or the entry hasn’t been defined. The unstarred version adds implicit grouping. The starred version doesn’t. Again, this command internally uses \glsxtrifhasfield, so you can test \glscurrentfieldvalue in false to determine whether or not the field has been set.

+

+\xGlsXtrIfValueInFieldCsvList{entry-label}{field-label}{value}{true}{false}modifier: *
+ As \GlsXtrIfValueInFieldCsvList but fully expands value first.

+ +

+ +
+

5.14. List Fields

+

+Comma-separated list fields are covered in §5.13. The commands in this section are for fields that store etoolbox internal lists. Elements can be appended to these fields using commands \glsxtrfieldlistadd, described in §3.5. The commands listed below provide an easy interface to iterate over the field values. See the etoolbox documentation for further details about internal lists.

+

+\glsxtrfieldformatlist{entry-label}{field-label}
+ Formats the list using the same separators as used by datatool’s \DTLformatlist. This internally uses etoolbox’s \forlistcsloop with the same handler macro as used with \DTLformatlist.

+

+\glsxtrfielddolistloop{entry-label}{field}
+ This uses etoolbox’s \dolistcsloop, which uses the command \do as the handler.

+

+\glsxtrfieldforlistloop{entry-label}{field}{handler-cs}
+ This uses etoolbox’s \forlistcsloop, which uses the handler-cs as the handler.

+

+\glsxtrfieldifinlist{entry-label}{field}{item}{true}{false}
+ This uses etoolbox’s \ifinlistcs to test if item is in the list.

+

+\glsxtrfieldxifinlist{entry-label}{field}{item}{true}{false}
+ This uses etoolbox’s \xifinlistcs to test if item is in the list.

+ +

+ +
+

5.15. Field Conditionals

+

+

+\GlsXtrIfFieldUndef{field-label}{entry-label}{true}{false}
+ Tests if the given field (identified by its internal label) is undefined for the entry given by entry-label. Does true if the entry doesn’t exists or if entry exists but the field hasn’t been set. Does false if the field has been set, even if it has been set to empty. Unlike \glsxtrifhasfield there is no grouping or starred version and no assignment of \glscurrentfieldvalue. This is simply a shortcut that internally uses etoolbox’s \ifcsundef. The base glossaries package provides a similar command \ifglsfieldvoid, which uses etoolbox’s \ifcsvoid instead.

+

+\glsxtrifhasfield{field-label}{entry-label}{true}{false}modifier: *
+ This tests if the entry given by entry-label has the field identified by its internal label field-label set. This is like \ifglshasfield but doesn’t produce a warning if the entry or field doesn’t exist.

+This command first assigns \glscurrentfieldvalue to the field value. If this is defined and not empty, true is done otherwise false is done. You can test \glscurrentfieldvalue within false to find out whether it’s undefined or empty using etoolbox’s commands, such as \ifundef or \ifdefempty.

+The unstarred version adds implicit grouping to make nesting easier. The starred version doesn’t (to make assignments easier).

+

+If you are simply displaying the value of the field (for example, in the post-description hook) then use the unstarred version. If you are making an assignment based on the value of the field, then use the starred version.
+

+

+\GlsXtrIfFieldCmpNum{field-label}{entry-label}{op}{number}{true}{false}modifier: *
+ This command should only be used with fields that contain integer values. It internally uses \glsxtrifhasfield (the starred or unstarred version, to match the starred or unstarred version of \GlsXtrIfFieldEqStr) and tests if \glscurrentfieldvalue is equal to (op is =), less than (op is <) or greater than (op is >) the given number number. If the field is empty or undefined, \glscurrentfieldvalue will be set to 0. Remember that the unstarred version adds implicit grouping.

+

+\GlsXtrIfFieldEqNum{field-label}{entry-label}{number}{true}{false}modifier: *
+ This is a shortcut that uses \GlsXtrIfFieldCmpNum with op set to =. The unstarred version adds implicit grouping.

+

+\GlsXtrIfFieldNonZero{field-label}{entry-label}{true}{false}modifier: *
+ This is a shortcut that uses \GlsXtrIfFieldCmpNum with op set to = and the final two arguments swapped. (So it’s true if the field value is not zero.) The unstarred version adds implicit grouping.

+

+\GlsXtrIfFieldEqStr{field-label}{entry-label}{value}{true}{false}modifier: *
+ This internally uses \glsxtrifhasfield (the starred or unstarred version, to match the starred or unstarred version of \GlsXtrIfFieldEqStr) and tests if \glscurrentfieldvalue is equal to value. Remember that the unstarred version adds implicit grouping.

+

+\GlsXtrIfFieldEqXpStr{field-label}{entry-label}{value}{true}{false}modifier: *
+ This is like \GlsXtrIfFieldEqStr but expands the string before the comparison. This also has an starred version that doesn’t add implicit grouping.

+

+\GlsXtrIfXpFieldEqXpStr{field-label}{entry-label}{value}{true}{false}modifier: *
+ This is like \GlsXtrIfFieldEqStr but expands both the field value and the string before the comparison. This also has an starred version that doesn’t add implicit grouping.

+ +

+ +
+

6. Counting References

+

+There are three basic ways of counting entry references: +

    +
  1. 1.Counting the total number of times \glsunset is used (\glsreset resets the count unless \glsresetcurrcountfalse and is best avoided). This is provided by the base glossaries package and is intended for documents where the term should be displayed differently if it’s only been used a certain number of times. The information has to be written to the aux file so that it’s available on the next LaTeX run.

    +This method is extended by glossaries-extra and is described in §6.1. This method relies on the document only using the \gls-like commands and is inappropriate with bib2gls.

    +

  2. 2.Counting the total number of records. This method is only available with bib2gls and is intended for documents where the term should be displayed differently if it’s only been recorded (indexed) a certain number of times. This is a more efficient method than entry counting. See §11.4 for further details.

    +

  3. 3.Counting the number of times the \gls-like or \glstext-like commands are used. Unlike the other two methods, this just provides a running total rather than the total from the previous LaTeX run. This method is intended to make it more convenient to work with hooks like \glslinkcheckfirsthyperhook, \glslinkpostsetkeys or \glslinkpresetkeys. See §6.2 for further details. +
+

+ +

+ +
+

6.1. Entry Counting (First Use Flag)

+

+

+If you are using bib2gls, you need to use record counting instead (see §11.4).
+

+Entry counting is provided by the base glossaries package and is enabled with \glsenableentrycount. This keeps a count of the number of times an entry is marked as used, which is done by hooking into the unset and reset commands (see §5.10). The current running total can be obtained with \glsentrycurrcount. The total from the end of the previous LaTeX run can be obtained with \glsentryprevcount.

+Since entry counting relies on the first use flag, it doesn’t take the \glstext-like commands into account.

+

+Entry counting is incompatible with docdef=true.
+

+The glossaries-extra package modifies \glsenableentrycount to allow for the entrycount attribute. This means that you not only need to enable entry counting with \glsenableentrycount, but you also need to set the entrycount attribute (see below).

+Prior to v1.49, the associated counter was reset back to 0 when the first use flag is reset. This behaviour is now only implemented if the following conditional is true:

+\ifglsresetcurrcount true\else false\fiinitial: \iffalse
+ To (locally) change this conditional to true use:
+\glsresetcurrcounttrue
+ To (locally) change this conditional to false use:
+\glsresetcurrcountfalse
+ As from v1.49, the default is now false. Note that this conditional is also available with glossaries v4.50+.

+

+Remember that entry counting only counts the number of times an entry is used by commands that change the first use flag. (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.
+

+With just the base glossaries package, the associated entry counting commands, such as \cgls, are only available when entry counting has been activated with \glsenableentrycount. Whereas with glossaries-extra, those commands are always available but behave in the same way as the corresponding \gls-like commands if entry counting hasn’t been activated. The commands provided by the shortcuts options, such as \ac are defined to use \cgls instead of \gls etc so you can use them either with or without entry counting.

+In order to activate entry counting with glossaries-extra, you not only need to use \glsenableentrycount but also need to specify the trigger value.

+

+\GlsXtrEnableEntryCounting{category-list}{trigger-value}
+ This command is provided as a shortcut to activate entry counting and assign the trigger value. This command performs the following: +
    +
  • enables entry counting with \glsenableentrycount;
  • redefines the \gls-like commands to do the equivalent \cgls commands (so you don’t need to keep track of which entries have entry counting enabled);
  • sets the entrycount attribute to trigger-value for all the supplied categories;
  • disables the unit counting command (which is incompatible). +
+ If you want to have different trigger values for different categories, you can set the entrycount attribute afterwards for the other category. For example:
\GlsXtrEnableEntryCounting{abbreviation,acronym}{1}
+\glssetcategoryattribute{general}{2}
+
If you use \GlsXtrEnableEntryCounting multiple times, the repeated instances will simply set the entrycount attribute for the listed categories. So the above can also be written as:
\GlsXtrEnableEntryCounting{abbreviation,acronym}{1}
+\GlsXtrEnableEntryCounting{general}{2}
+

+The commands like \cgls behave like the corresponding \gls-like command if the entry count at the end of the previous run was more than a trigger value. With just the base glossaries package, this trigger value is 1. With glossaries-extra you can specify a different value.

+

+The appropriate trigger value must be set for the required category or categories.
+

+As with the \gls-like commands, the \cgls set of commands may also be used with the star (*) or plus (+) modifiers or the modifier given by \GlsXtrSetAltModifier.

+If the entry count at the end of the previous run doesn’t exceed the trigger value, the corresponding formatting command is used instead. For example, \cgls will use \cglsformat. The complete set of commands are:

+\cgls[options]{entry-label}[insert]modifiers: * + alt-mod
+ If the trigger value has been supplied for the entry’s category and is exceeded, this behaves like \gls otherwise it uses:
+\cglsformat{entry-label}{insert}
+ This is redefined by glossaries-extra to test whether or not the entry has the regular attribute set or is an abbreviation:
\renewcommand*{\cglsformat}[2]{%
+  \glsifregular{#1}{\glsentryfirst{#1}}%
+  {\ifglshaslong{#1}{\glsentrylong{#1}}{\glsentryfirst{#1}}}#2%
+}
+
This show the first use value if the entry is regular otherwise it will show the long form. The insert is appended at the end.

+

+\cglspl[options]{entry-label}[insert]modifiers: * + alt-mod
+ If the trigger value has been supplied for the entry’s category and is exceeded, this behaves like \glspl otherwise it uses:
+\cglsplformat{entry-label}{insert}
+ This is like \cglsformat but uses the plural commands.

+

+\cGls[options]{entry-label}[insert]modifiers: * + alt-mod
+ If the trigger value has been supplied for the entry’s category and is exceeded, this behaves like \Gls otherwise it uses:
+\cGlsformat{entry-label}{insert}
+ This is like \cglsformat but uses the sentence case commands.

+

+\cGlspl[options]{entry-label}[insert]modifiers: * + alt-mod
+ If the trigger value has been supplied for the entry’s category and is exceeded, this behaves like \Glspl otherwise it uses:
+\cGlsplformat{entry-label}{insert}
+ This is like \cglsformat but uses the plural sentence case commands.

+The glossaries-extra package provides some additional commands:

+

+\cGLS[options]{entry-label}[insert]modifiers: * + alt-mod
+ If the trigger value has been supplied for the entry’s category and is exceeded, this behaves like \GLS otherwise it uses:
+\cGLSformat{entry-label}{insert}
+ This simply uses \cglsformat converted to uppercase.

+

+\cGLSpl[options]{entry-label}[insert]modifiers: * + alt-mod
+ If the trigger value has been supplied for the entry’s category and is exceeded, this behaves like \GLSpl otherwise it uses:
+\cGLSplformat{entry-label}{insert}
+ This simply uses \cglsplformat converted to uppercase.

+The test to determine whether or not an entry trips the trigger value is performed by:

+\glsxtrifcounttrigger{entry-label}{true}{false}
+ This obtains the trigger value from the entry’s entrycount attribute.

+

+Since these commands require information from the previous LaTeX run, and extra LaTeX call must be added to the build process (before the relevant indexing application).
+

+For example, in the following document the trigger value is set to 1. The CSS entry is only used once (which doesn’t exceed the trigger). The HTML entry is used twice (which does exceed the trigger). The sample entry is only used once, but entry counting hasn’t been enabled on its category (the default general).

+

\usepackage[colorlinks]{hyperref}
+\usepackage{glossaries-extra}
+\makeglossaries
+\GlsXtrEnableEntryCounting{abbreviation}{1}
+\newabbreviation{css}{CSS}{cascading style sheet}
+\newabbreviation{html}{HTML}{hypertext markup language}
+\newglossaryentry{sample}{name={sample},description={an example}}
+\begin{document}
+First use: \gls{css}, \gls{html} and \gls{sample}.
+Next use: \gls{html}.
+\printglossaries
+\end{document}
+
If the document is saved in a file called myDoc.tex then the build process is:
pdflatex myDoc
+pdflatex myDoc
+makeglossaries myDoc
+pdflatex myDoc
+
Note the second LaTeX call before makeglossaries. The result is shown below:
+Example 121: Entry counting according to category 📥🖹 📥🖺

+Example document illustrating entry counting.

+ Note that the CSS entry only shows the long form, doesn’t appear in the glossary and doesn’t have a hyperlink. This is because the total count from the previous LaTeX run doesn’t exceed the value (1, in this case) that triggers the normal behaviour of \gls. The HTML entry has a total count of 2 from the previous LaTeX run, so it’s displayed as normal with the full form on first use and has a hyperlink to its entry in the glossary.

+The sample entry is only used once, but it has the default general category, which doesn’t have the entrycount attribute set.

+Note that if the build process only had one LaTeX call before running makeglossaries, the HTML entry would also not appear in the glossary. This is because on the first LaTeX run, the total from the previous run is 0 (because there’s no information in the aux file).

+The glossaries-extra package also provides the ability to count per sectional unit instead:

+\glsenableentryunitcount
+

+

+It’s not possible to enable both document-wide entry counting (\glsenableentrycount) and unit entry counting (\glsenableentryunitcount).
+

+The unit entry counting provides separate totals for each section unit. As above, this uses the entrycount attribute to provide the trigger value but also requires the unitcount attribute, which should be set to the name of the appropriate counter, such as section or chapter.

+

+Due to the asynchronous nature of TeX’s output routine, discrepancies will occur in page spanning paragraphs if you use the page counter.
+

+As before, there is a command provided to enable the feature and set the corresponding attributes at the same time:

+\GlsXtrEnableEntryUnitCounting{category-list}{trigger-value}{counter}
+ This command performs the following: +
    +
  • enables unit entry counting with \glsenableentryunitcount;
  • redefines the \gls-like commands to do the equivalent \cgls commands (so you don’t need to keep track of which entries have entry counting enabled);
  • sets the entrycount attribute to the supplied trigger for all the supplied categories;
  • sets the unitcount attribute to the supplied counter for all the supplied categories;
  • disables the document-wide counting command (which is incompatible). +
+ If you use \GlsXtrEnableEntryUnitCounting multiple times, the repeated instances will simply set the entrycount and unitcount attributes for the listed categories.

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

+The commands for accessing the totals, \glsentrycurrcount and \glsentryprevcount have different definitions with unit entry counting and will expand to the total for the current unit. The overall totals can be obtained with additional commands:

+\glsentryprevtotalcount{entry-label}
+ This expands to the overall total from the previous LaTeX run.

+

+\glsentryprevmaxcount{entry-label}
+ This expands to the maximum per-unit total from the previous LaTeX run.

+For example:

\documentclass{article}
+\usepackage[colorlinks]{hyperref}
+\usepackage{glossaries-extra}
+
+\GlsXtrEnableEntryUnitCounting{abbreviation}{2}{section}
+
+\makeglossaries
+% category={abbreviation}:
+\newabbreviation{html}{HTML}{hypertext markup language}
+\newabbreviation{css}{CSS}{cascading style sheet}
+
+% category={general}:
+\newglossaryentry{sample}{name={sample},description={sample}}
+
+\begin{document}
+\section{Sample}
+
+Used once: \gls{html}.
+
+Used three times: \gls{css} and \gls{css} and \gls{css}.
+
+Used once: \gls{sample}.
+
+\section{Another Sample}
+
+Used once: \gls{css}.
+
+Used twice: \gls{html} and \gls{html}.
+
+\printglossaries
+\end{document}
+
As before, if the document is in a file called myDoc.tex then the build process is:
pdflatex myDoc
+pdflatex myDoc
+makeglossaries myDoc
+pdflatex myDoc
+
The result is:
+Example 122: Entry unit counting (per section) according to category 📥🖹 📥🖺

+Example document illustrating entry unit counting (per section).

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

+The HTML entry is used a total of three times, but the expansion and indexing suppression trigger is tripped in both sections because the per-unit total (1 for the first section and 2 for the second chapter) is less than or equal to the trigger value.

+The sample entry has only been used once, but it doesn’t trip the indexing suppression because it’s in the general category, which hasn’t been listed in \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 \gls by modifying the \glslinkcheckfirsthyperhook which is used at the end of the macro the determines whether or not to suppress the hyperlink.

+

\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
+   \setupglslink{hyper=false}%
+  \fi
+}
+
+\begin{document}
+
+A \gls{sample} entry.  Next use: \gls{sample}.
+
+\newpage
+Next page: \gls{sample}.  Again: \gls{sample}.
+
+\printglossaries
+\end{document}
+
This only produces a hyperlink for the first instance of \gls{sample} on each page.
+Example 123: Enabling unit counting to hook into hyperlink setting 📥🖹 📥🖺

+Page 1. Example document that demonstrates how to automatically switch off the hyperlink using unit counting.Page 2. Example document that demonstrates how to automatically switch off the hyperlink using unit counting.

+

+The earlier warning about using the page counter still applies. If the first instance of \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.

+ +

+ +
+

6.2. Link Counting

+

+As from version 1.26, an alternative method of entry counting is to count the number of times the \gls-like or \glstext-like commands are used. (The “link” in this method’s name refers to the use of the internal command \@gls@link not to \hyperlink although \@gls@link may use \hyperlink when displaying the link text.)

+To enable link counting use the preamble-only command:

+\GlsXtrEnableLinkCounting[parent counter]{categories}

+

+
+ where categories is a list of category labels. The optional argument parent counter may be used to identify a parent counter (which must already be defined). If present, the associated link counter will be reset when the parent counter is incremented. This command automatically sets the linkcount attribute for the given categories. If the optional argument is present, it also sets the linkcountmaster attribute.

+When enabled, the \gls-like and \glstext-like commands will increment the associated counter using

+\glsxtrinclinkcounter{counter}
+ This just does \stepcounter{counter} by default but if you need \refstepcounter instead, just redefine this command:
\renewcommand*{\glsxtrinclinkcounter}[1]{\refstepcounter{#1}}
+

+You can access the internal count register using:

+\GlsXtrLinkCounterValue{entry-label}
+ where label is the entry’s label. This will expand to 0 if the register hasn’t been defined.

+It’s also possible to access the display value (\thecounter) using

+\GlsXtrTheLinkCounter{entry-label}
+ (This will expand to 0 if the counter hasn’t been defined.)

+

+In order to conserve resources, the counter is only defined when it first needs to be incremented so terms that have been defined but haven’t been used in the document won’t have the associated count register allocated.
+

+You can test if the counter has been defined using:

+\GlsXtrIfLinkCounterDef{entry-label}{true}{false}
+ This expands to true if the link counter associated with the entry identified by entry-label has been defined, otherwise expands to false.

+The counter name can be obtained using

+\GlsXtrLinkCounterName{entry-label}
+ This simply expands to the counter name associated with the entry given by entry-label without any check for existence. For example, to change the display command (\thecounter) using etoolbox:
\csdef{the\GlsXtrLinkCounterName{duck}}%
+ {\Roman{\GlsXtrLinkCounterName{duck}}}
+

+This is useful if you just want to change the display for specific entries but isn’t convenient if you want to change the display for all entries. Instead, it’s simpler to redefine \GlsXtrTheLinkCounter. For example:

\renewcommand*{\GlsXtrTheLinkCounter}[1]{%
+ \GlsXtrIfLinkCounterDef{#1}%
+ {\Roman{\GlsXtrLinkCounterName{#1}}}%
+ {0}%
+}
+
In both cases, the redefinition should be implemented after \GlsXtrEnableLinkCounting.

+Here’s an example document that uses link counting to disable the hyperlink after the first reference. This redefines \glslinkpresetkeys (which is used by both \gls and \glstext) instead of \glslinkcheckfirsthyperhook (which is used by \gls but not by \glstext).

\documentclass{article}
+
+\usepackage[colorlinks]{hyperref}
+\usepackage{glossaries-extra}
+
+\makeglossaries
+
+\renewcommand*{\glslinkpresetkeys}{%
+ \ifnum\GlsXtrLinkCounterValue{\glslabel}>1
+  \setupglslink{hyper=false}%
+ \fi
+}
+
+\GlsXtrEnableLinkCounting{general}
+
+\newglossaryentry{sample1}{name={sample1},description={an example}}
+\newglossaryentry{sample2}{name={sample2},description={another example}}
+
+\newabbreviation{ex}{ex}{example}
+
+\begin{document}
+\section{Sample Section}
+
+\Gls{sample1}, \gls{sample2} and \gls{ex}.
+\Glstext{sample1} and \gls{ex} again.
+
+\section{Another Sample Section}
+
+\Gls{sample1}, \gls{sample2} and \gls{ex}.
+
+\printglossaries
+\end{document}
+
The use of \glslinkpresetkeys means that the options can override this. For example
\gls[hyper=true]{sample1}
+
(or simply \gls+{sample1}) will override the hyper=false setting in \glslinkpresetkeys. If \glslinkpostsetkeys is used instead, the hyper=false setting will override the setting provided in the optional argument. The resulting document is shown below:
+Example 124: Link counting used to selectively suppress hyperlinks 📥🖹 📥🖺

+Example document that uses link counting to selectively suppress hyperlinks.

+

+The abbreviation category doesn’t have the linkcount attribute set (since it’s not listed in the argument of \GlsXtrEnableLinkCounting). This means that \GlsXtrLinkCounterValue always expands to 0 for the abbreviation (ex), so the inequality test:

\ifnum\GlsXtrLinkCounterValue{\glslabel}>1
+
will always be false. This means that the abbreviation won’t have hyper=false applied. If the test is changed to
\ifnum\GlsXtrLinkCounterValue{\glslabel}=1
+\else
+ \setupglslink{hyper=false}%
+\fi
+
Then the abbreviation will always have hyper=false applied.

+To reset the counter every section use the optional argument to set the parent counter:

\GlsXtrEnableLinkCounting[section]{general}
+

+ +

+ +
+

7. Multi (or Compound) Entries

+

+Nested entries (where the entry definition references other entries) are discussed in §5.4. This chapter deals with occasions where a term or phrase may consist of multiple sub-terms that are independently defined. (Examples in §7.1.5 and §7.1.6 provide workarounds for nested entries.)

+For example, the names of bacteria, such as Clostridium botulinum and Clostridium perfringens, are made up of the genus (for example, Clostridium) and the species (for example, botulinum or perfringens). The genus is often abbreviated after first use. For example, C. botulinum. However, if the name is defined as a single term consisting of both the genus and species then it’s not possible to apply the abbreviation when a different species with the same genus is used. Consider the following document:

\documentclass{article}
+\usepackage{glossaries-extra}
+\setabbreviationstyle{long-only-short-only}
+\newabbreviation{cbot}{C. botulinum}{Clostridium botulinum}
+\newabbreviation{cperf}{C. perfringens}{Clostridium perfringens}
+\begin{document}
+\gls{cbot}, \gls{cbot}, \gls{cperf}.
+\end{document}
+
The result is:
+Clostridium botulinum, C. botulinum, Clostridium perfringens.
+ However, it should more typically be:
+Clostridium botulinum, C. botulinum, C. perfringens.
+ In this case, the genus should actually be a separate definition:
\documentclass{article}
+\usepackage{glossaries-extra}
+\setabbreviationstyle{long-only-short-only}
+\newabbreviation{clostridium}{C.}{Clostridium}
+\newglossaryentry{botulinum}{name={botulinum},description={}}
+\newglossaryentry{perfringens}{name={perfringens},description={}}
+\begin{document}
+\gls{clostridium} \gls{botulinum}, 
+\gls{clostridium} \gls{botulinum}, 
+\gls{clostridium} \gls{perfringens}.
+\end{document}
+

+This is quite awkward to write. This chapter describes how to provide a shortcut for this kind of construct. Each term should be defined as normal (as in the above example), and a “multi-entry” label is then defined with the list of labels of the entries that need to be referenced.

+

+\multiglossaryentry[options]{multi-label}[main-label]{entry-label-list}
+ This defines a multi-entry set with the label multi-label, consisting of the entries whose labels are listed in entry-label-list, where the main entry (which must be present in entry-label-list) is identified by main-label. If main-label is omitted, it’s assumed to be the final label in entry-label-list. The main entry is described in more detail in §7.2.

+

+The entries in entry-label-list must already be defined (using commands like \newglossaryentry or \newabbreviation).
+

+The options are a comma-separated list of options to override the current settings and are described in §7.9.

+The earlier example can now be modified to include the following:

\multiglossaryentry{cbot}{clostridium,botulinum}
+\multiglossaryentry{cperf}{clostridium,perfringens}
+
These commands must come after the clostridium, botulinum and perfringens definitions.

+Once defined, a multi-entry set can be referenced in the document using commands like:

+\mgls[options]{multi-label}[insert]modifiers: * + alt-mod
+ This command essentially does \gls{label} for each item in the label list (with separators, see §7.4). If the final optional argument insert is provided, it will be applied to the final (non-skipped) element in the list. So the document body in the above example, can be rewritten as:
\mgls{cbot}, \mgls{cbot}, \mgls{cperf}.
+

+There are some variants of \mgls listed in §7.11. The available options are listed in §7.10. They are applied after the \multiglossaryentry options and will override settings for the individual entries.

+

+You can’t use multi-label in commands like \gls as this label represents a set of entry labels not a single entry.
+

+The \multiglossaryentry command will generate an error if the label has already been defined as a multi-entry.

+

+\providemultiglossaryentry[options]{multi-label}[main-label]{entry-label-list}
+ This does nothing if a multi-entry set with the given label has already been defined otherwise it will act like \multiglossaryentry. Notes and associated commands applying to \multiglossaryentry also apply to \providemultiglossaryentry unless otherwise stated.

+

+\multiglossaryentry may be placed anywhere after the entries listed in label list have been defined. A multi-entry label can’t be referenced (with commands like \mgls) before it has been defined.
+

+There is limited support for docdef=true. The multi-entry definition can be picked up from the aux file on the next run to allow cross-references in any glossaries that occur at the start of the document. Any changes made with commands like \mglsSetMain won’t be carried over to the next run.

+By default \multiglossaryentry will be localised to the current scope. If you want to globally define a multi-entry you need to first switch on global definitions with:

+\multiglossaryentryglobaltrue
+ To switch back to local definitions use:
+\multiglossaryentryglobalfalse
+ You can test if this setting is on with:
+\ifmultiglossaryentryglobal true\else false\fiinitial: \iffalse
+

+If you want to change the multi-entry options (locally) you can use:

+\mglsSetOptions{multi-label}{new-options}
+ This removes the original options and replaces them with new-options. If you want to (locally) append to the existing options, use:
+\mglsAddOptions{multi-label}{new-options}
+

+Note that \multiglossaryentry doesn’t make any adjustments to the component entries. You will need to use the parent key when you define the entries if you want a hierarchical structure in your glossary. (See the example in §7.1.1.)

+If you don’t want the other elements in the glossary, you can suppress the indexing with indexothers=false7.9.1) or put them in an ignored glossary. For example:

\newignoredglossary{common}
+\newabbreviation[type={common}]{clostridium}{C.}{Clostridium}
+

+The multi-label can’t be used in commands like \gls since the label refers to a set of entry labels not to an individual entry. Similarly, an individual entry label can’t be used in commands like \mgls. It is possible (although potentially confusing) to use the same label for a multi-entry as for an individual entry (see the example in §7.1.6). Context will determine which is meant, except in the case of the cross-referencing fields (see, seealso and alias) where the cross-referenced label will first be tested if it’s a known multi-entry label.

+If you don’t want to have to keep track of which labels refer to multi-entries and which refer to individual entries you can use:

+\GlsXtrMglsOrGls{mgls cs}{gls cs}modifier[options]{label}[insert]
+ where mgls cs is the \mgls-like command to use if label has been defined as a multi-entry and gls cs is the \gls-like or \glstext-like command to use otherwise. The modifier may be omitted, otherwise it’s the modifier that may be used with \mgls or \gls (asterisk *, plus + or the token identified with \GlsXtrSetAltModifier). The modifier and remaining options are passed to the relevant command (mgls cs or gls cs).

+You may prefer to define your own shortcut commands for common combinations. For example, (assuming these commands haven’t already been defined by the shortcuts option):

\newcommand{\ac}{\GlsXtrMglsOrGls{\mgls}{\gls}}
+\newcommand{\acp}{\GlsXtrMglsOrGls{\mglsmainpl}{\glspl}}
+\newcommand{\Ac}{\GlsXtrMglsOrGls{\Mgls}{\Gls}}
+\newcommand{\Acp}{\GlsXtrMglsOrGls{\Mglsmainpl}{\Glspl}}
+

+ +

+ +
+

7.1. Examples

+

+ +

+ +
+

7.1.1. Example: Hierarchical

+

+Bacteria names are represented by the genus (for example, Clostridium) followed by the species (for example, botulinum). This example has the genus as a parent of the species.

\documentclass{article}
+
+\usepackage[colorlinks]{hyperref}
+\usepackage[stylemods=bookindex,style=bookindex]{glossaries-extra}
+
+\makeglossaries
+
+\newcommand{\latinname}[1]{\emph{#1}}
+\glssetcategoriesattributes
+ {genus,species}{textformat,glossnamefont}{latinname}
+
+\setabbreviationstyle[genus]{long-only-short-only-desc}
+\newabbreviation
+ [category={genus},description={}]
+ {clostridium}{C.}{Clostridium}
+
+\newglossaryentry{botulinum}{name={botulinum},category={species},
+  description={},parent={clostridium}}
+\newglossaryentry{perfringens}{name={perfringens},
+  category={species},description={},parent={clostridium}}
+\newglossaryentry{tetani}{name={tetani},category={species},
+  description={},parent={clostridium}}
+
+\multiglossaryentry{cbot}{clostridium,botulinum}
+\multiglossaryentry{cperf}{clostridium,perfringens}
+\multiglossaryentry{ctet}{clostridium,tetani}
+
+\multiglossaryentrysetup{indexothers=false,hyper=allmain}
+
+\begin{document}
+First use: \mgls{cbot}, \mgls{cperf}, \mgls{ctet}.
+
+Next use: \mgls{cbot}, \mgls{cperf}, \mgls{ctet}.
+\printglossaries
+\end{document}
+
This suppresses the indexing of the non-main elements (in this case, the genus). However the genus is included in the glossary (without a location list) because it’s the parent of the species (which are indexed).
+Example 125: Multi-entries: hierarchical 📥🖹 📥🖺

+Example document with hierarchical multi-entries.

+

+The hyper=allmain option makes the entire content of each \mgls a hyperlink to the main entry in the glossary.

+ +

+ +
+

7.1.2. Example: Suffix

+

+This example has a minor modification to the previous one. In this case the multi-entries are defined with a suffix:

\multiglossaryentry[firstsuffix=botulism]{cbot}{clostridium,botulinum}
+\multiglossaryentry[firstsuffix=gas gangrene]{cperf}{clostridium,perfringens}
+\multiglossaryentry[firstsuffix=tetanus]{ctet}{clostridium,tetani}
+
The rest of the document is as in §7.1.1.
+Example 126: Multi-entries: hierarchical with first-use suffix 📥🖹 📥🖺

+Example document with hierarchical multi-entries that have a first-use suffix.

+

+ +

+ +
+

7.1.3. Example: Category Suffix

+

+This is an alternative to the previous example. Instead of storing the extra information in the firstsuffix key, the information is stored in the user1 key of the last element (the species). A category suffix is used to look up the field and append it.

\newglossaryentry{botulinum}{name={botulinum},category={species},
+  user1={botulism},
+  description={},parent={clostridium}}
+\newglossaryentry{perfringens}{name={perfringens},category={species},
+  user1={gas gangrene},
+  description={},parent={clostridium}}
+\newglossaryentry{tetani}{name={tetani},category={species},
+  user1={tetanus},
+  description={},parent={clostridium}}
+
+\mglsdefcategorysuffix{bacteria}{%
+ \mglsisfirstuse
+ {\glsxtrifhasfield{useri}{\mglslastelementlabel}{ (\glscurrentfieldvalue)}}%
+ {}%
+}
+
+\multiglossaryentry[category=bacteria]{cbot}{clostridium,botulinum}
+\multiglossaryentry[category=bacteria]{cperf}{clostridium,perfringens}
+\multiglossaryentry[category=bacteria]{ctet}{clostridium,tetani}
+
The result is the same as the previous example.
+Example 127: Multi-entries: hierarchical with category suffix 📥🖹 📥🖺

+Example document with hierarchical multi-entries that have a category suffix.

+

+ +

+ +
+

7.1.4. Example: Separators

+

+The first example (§7.1.1) can be modified so that the species are also abbreviations. In this case, the separators are modified to suppress the space (\relax) if both the genus and species are abbreviated, or to use a non-breaking space (~) between the genus short form (shown on subsequent use) and the species long form (shown on first use). If the genus is showing the long form (first use) then a normal space is used.

+Note that the separator attributes apply to the category of the element before the separator (not to the multi-entry category).

\glssetcategoryattribute{genus}{combinedfirstsepfirst}{\space}
+\glssetcategoryattribute{genus}{combinedfirstsep}{\space}
+\glssetcategoryattribute{genus}{combinedsepfirst}{~}
+\glssetcategoryattribute{genus}{combinedsep}{\relax}
+
+\setabbreviationstyle[species]{long-only-short-only-desc}
+
+\newabbreviation[category={species},
+  description={},parent={clostridium}]{botulinum}{bot.}{botulinum}
+\newabbreviation[category={species},
+  description={},parent={clostridium}]{perfringens}{per.}{perfringens}
+\newabbreviation[category={species},
+  description={},parent={clostridium}]{tetani}{tet.}{tetani}
+
This will cause a double dot at the end of the second sentence, which can be suppressed using the discardperiod and retainfirstuseperiod attributes.
\glssetcategoriesattributes{species}{discardperiod,retainfirstuseperiod}{true}
+
This works because the final element’s post-link hook is transferred to the multi-entry post-link hook, which can detect the sentence terminating period. If the post-link hook settings are changed, for example, to postlinks=all,mpostlink=false then the feature won’t work as the final element’s post-link hook can’t detect the period (because \gls is embedded too deeply inside the internal workings of \mgls).
+Example 128: Multi-entries: separators 📥🖹 📥🖺

+Example document demonstrating multi-entry separators.

+

+ +

+ +
+

7.1.5. Example: Skipping Elements (Fragment Element)

+

+This example is an alternative way of dealing with nested links (see §5.4).

\documentclass{article}
+
+\usepackage[colorlinks]{hyperref}
+\usepackage[stylemods,style=long]{glossaries-extra}
+
+\makeglossaries
+
+\setabbreviationstyle{long-short-sc}
+\newabbreviation{ssi}{ssi}{server-side includes}
+\newabbreviation{html}{html}{hypertext markup language}
+
+\setabbreviationstyle[combinedabbrv]{long-only-short-sc-only}
+\newabbreviation
+ [category={combinedabbrv},
+  description={\glsxtrshort{ssi} enabled \glsxtrshort{html}}]
+ {shtml-frag}{shtml}{enabled}
+
+\glssetcategoryattribute{combinedabbrv}{multioptions}
+ {usedskipothers=,firstsuffix=\glsxtrshort{\mglslastmainlabel}}
+
+\multiglossaryentry
+ [category=combinedabbrv]
+ {shtml}[shtml-frag]{ssi,shtml-frag,html}
+
+\begin{document}
+Individual elements first use: \gls{ssi} and \glshtml.
+
+Individual elements next use: \gls{ssi} and \gls{html}.
+
+Multi-entry first use: \mgls{shtml}.
+
+Multi-entry next use: \mgls{shtml}.
+
+Resetting all\glsresetall\mglsreset{shtml}:
+
+Multi-entry first use: \mgls{shtml}.
+
+Multi-entry next use: \mgls{shtml}.
+
+Individual elements: \gls{ssi} and \gls{html}.
+\printglossaries
+\end{document}
+

+This uses the multioptions attribute to skip “other” elements on subsequent use. The problematic abbreviation (SHTML) is defined as a fragment that simply expands to “enabled” on first use. Note that the description has to be supplied for the glossary. The resulting document is shown below.

+Example 129: Multi-entries: skipping elements 📥🖹 📥🖺

+Example document demonstrating multi-entry sets with elements skipped.

+

+The key difference here from the example using \glsps at the end of §5.4 is that the individual elements hyperlink to their respective entries in the glossary on first use of \mgls.

+The problem is that with the colorlinks package option, it’s not obvious where the hyperlinks start and end. The suffix (shtml) will hyperlink to the “shtml” entry in the glossary, so the “enabled” hyperlink is redundant. The simplest fix for this is to add hyper=notmainfirst to the option list, which will prevent “enabled” from being a hyperlink.

+Another problem occurs where \mgls is used before the individual elements are used, which leads to their full expansion with a confusing amount of parentheses. A simple solution is to use the option mglsopts=unsetothers, which will unset the other (not-main) elements first. This can be localised with presetlocal but \gls will then unset the first use flag globally, which means that the other elements won’t show the full form when they are first used on their on after \mgls. This can be switched to a local unset with others=local.

+The complete set of options are now:

\glssetcategoryattribute{combinedabbrv}{multioptions}
+ {%
+  hyper=notmainfirst,
+  mglsopts=presetlocal,unsetothers,others=local,
+  usedskipothers=,
+  firstsuffix={}\glsxtrshort{\mglslastmainlabel}
+ }
+
+Example 130: Multi-entries: skipping elements (unsetting others) 📥🖹 📥🖺

+Example document demonstrating multi-entry sets with elements skipped and unset.

+

+This method still has two main drawbacks: the description must be added manually and the long form can’t be accessed with \glsxtrlong. The next example provides an alternative approach.

+ +

+ + + +
+

7.2. Main and Other Elements

+

+The list of labels provided in the final argument of \multiglossaryentry consists of a main element and all the other elements. If the main element isn’t identified in the optional argument, it’s assumed to be the final element in the list.

+The main element allows you to determine which target to use if you want the entire content of \mgls to be a single hyperlink. You can also use the settings described in §7.9 to only index the main element.

+You can change the main element using: \mglsSetMain The new main label provided in the second argument must be in the list corresponding to multi-label. This change is locally applied to the current scope. Note that if you are using bib2gls, this change in the document can’t be detected.

+The main element can also be used to identify which element should be displayed in the plural with \mglsmainpl. For example:

\newglossaryentry{great}{name={great},description={}}
+\newglossaryentry{little}{name={little},description={}}
+\newglossaryentry{grebe}{name={grebe},description={}}
+
+\multiglossaryentry{greatgrebe}{great,grebe}
+\multiglossaryentry{littlegrebe}{little,grebe}
+
In the above, two multi-entries are defined: greatgrebe and littlegrebe. In both cases the main element is grebe (the last element). Using \mglspl will show the plural for all elements, but using \mglsmainpl will only use the plural for the main element (grebe). For example:
Plural all: \mglspl{greatgrebe}, \mglspl{littlegrebe}.
+Plural main: \mglsmainpl{greatgrebe}, \mglsmainpl{littlegrebe}.
+
produces:
+Plural all: greats grebes, littles grebes. Plural main: great grebes, little grebes.
+

+ +

+ +
+

7.3. Prefixes and Suffixes

+

+A multi-entry may have associated prefixes and suffixes. These are scoped and are placed outside of the hyperlinks and encapsulating commands. They are not affected by case-changing commands, such as \Mgls. If you want a prefix to obey case-changing, use the \mpgls-like commands instead (§7.11.4).

+The prefix is inserted with:

+\mglsprefix
+ The default definition is:
\newcommand*{\mglsprefix}{%
+ \ifdefempty\mglscurrentcategory
+ {\mglscurrentprefix}%
+ {%
+   \mglshascategoryprefix{\mglscurrentcategory}%
+   {\mglsusecategoryprefix{\mglscurrentcategory}}%
+   {\mglscurrentprefix}%
+ }%
+}
+
This will insert the current prefix unless there is prefix command associated with the current category.

+The suffix is inserted with:

+\mglssuffix
+ This command is defined as follows:
\newcommand*{\mglssuffix}{%
+ \ifdefempty\mglscurrentcategory
+ {\ifdefempty\mglscurrentsuffix{}{\space(\mglscurrentsuffix)}}%
+ {%
+   \mglshascategorysuffix{\mglscurrentcategory}%
+   {\mglsusecategorysuffix{\mglscurrentcategory}}%
+   {\ifdefempty{\mglscurrentsuffix}{}{\space(\mglscurrentsuffix)}}%
+ }%
+}
+
If there is a suffix associated with the current category, that will be used, otherwise if the current suffix isn’t empty this inserts a space followed by the current suffix in parentheses. You can access the label of the last (non-skipped) element with \mglslastelementlabel.

+Note that in both cases the category corresponds to the multi-entry category (see §7.8).

+To define a category-dependent prefix, use:

+\mglsdefcategoryprefix{category-label}{definition}
+ You can reference the current prefix with \mglscurrentprefix within definition.

+To define a category-dependent suffix, use:

+\mglsdefcategorysuffix{category-label}{definition}
+ You can reference the current suffix with \mglscurrentsuffix within definition.

+The default definition of \mglsprefix tests if there is a category prefix using:

+\mglshascategoryprefix{category-label}{true}{false}
+ This does true if a prefix has been assigned to the given category, otherwise it does false.

+If you need to obtain the prefix for a particular category, you can use:

+\mglsusecategoryprefix{category-label}
+ This expands to the prefix, if set, for the given category or to nothing otherwise.

+The default definition of \mglssuffix tests if there is a category suffix using:

+\mglshascategorysuffix{category-label}{true}{false}
+ This does true if a suffix has been assigned to the given category, otherwise it does false.

+If you need to obtain the suffix for a particular category, you can use:

+\mglsusecategorysuffix{category-label}
+ This expands to the suffix, if set, for the given category or to nothing otherwise.

+The current prefix \mglscurrentprefix and \mglscurrentsuffix are obtained as follows: +

    +
  • if this is the first use of the multi-entry (§7.7) then the prefix is set to the value of the firstprefix option and the suffix is set to the value of the firstsuffix option;
  • otherwise the prefix is set to the value of the usedprefix option and the suffix is set to the value of the usedsuffix option. +
+

+

+The prefix and suffix (if set) are placed outside of the hyperlink and text formatting encapsulator. They are not affected by case-changing commands such as \Mgls or \MGLS.
+

+For example:

\setabbreviationstyle{long-only-short-only}
+\newabbreviation{clostridium}{C.}{Clostridium}
+\newglossaryentry{botulinum}{name={botulinum},description={}}
+
+\multiglossaryentry[firstsuffix=botulism]
+ {cbot}{clostridium,botulinum}
+
On first use, this produces (assuming the “clostridum” element hasn’t been used previously):
+Clostridium botulinum (botulism).
+ On subsequent use, this produces:
+C. botulinum.
+

+ +

+ +
+

7.4. Separators

+

+The separators between each instance of \gls are given by the following commands, which all take two arguments. The first argument is the label of the previous element. The second argument is the label of the following element.

+\glscombinedsep{prev label}{next label}
+ This is inserted between two entries that have both been marked as used. The default definition is:
\newcommand*{\glscombinedsep}[2]{%
+  \glshasattribute{#1}{combinedsep}%
+  {\glsgetattribute{#1}{combinedsep}}%
+  { }}
+
This will use the combinedsep attribute for the prev label’s category, if set. Otherwise this just does a space. Note that this ignores the second argument.

+

+\glscombinedfirstsep{prev label}{next label}
+ This is inserted between two entries where only the next entry has been marked as used. The default definition is:
\newcommand*{\glscombinedfirstsep}[2]{%
+ \glshasattribute{#1}{combinedfirstsep}%
+ {\glsgetattribute{#1}{combinedfirstsep}}%
+ {\glscombinedsep{#1}{#2}}%
+}
+
This will use the combinedfirstsep attribute for prev label’s category, if set. If that attribute isn’t set, \glscombinedsep is used.

+

+\glscombinedsepfirst{prev label}{next label}
+ This is inserted between two entries where only the previous entry has been marked as used. The default definition is:
\newcommand*{\glscombinedsepfirst}[2]{%
+ \glshasattribute{#1}{combinedsepfirst}%
+ {\glsgetattribute{#1}{combinedsepfirst}}%
+ {\glscombinedsep{#1}{#2}}%
+}
+
This will use the combinedsepfirst attribute for prev label’s category, if set. If that attribute isn’t set, \glscombinedsep is used.

+

+\glscombinedfirstsepfirst{prev label}{next label}
+ This is inserted between two entries where both have been marked as used. The default definition is:
\newcommand*{\glscombinedfirstsepfirst}[2]{%
+ \glshasattribute{#1}{combinedfirstsepfirst}%
+ {\glsgetattribute{#1}{combinedfirstsepfirst}}%
+ {\glscombinedsep{#1}{#2}}%
+}
+
This will use the combinedfirstsepfirst attribute for prev label’s category, if set. If that attribute isn’t set, \glscombinedsep is used.

+These commands may be redefined as required. For example, to have no space between two elements that have both been marked as used and are both abbreviations (disregarding category attributes):

\renewcommand*{\glscombinedfirstsepfirst}[2]{%
+ \ifglshasshort{#1}{\ifglshasshort{#2}{}{\space}}{\space}%
+}
+

+There are some commands for redefining the above separators to common combinations.

+

+\glssetcombinedsepabbrvnbsp
+ This does the following:
\renewcommand*{\glscombinedsep}[2]{%
+ \glshasattribute{#1}{combinedsep}%
+ {\glsgetattribute{#1}{combinedsep}}%
+ {\ifglshasshort{#1}{~}{ }}%
 }%
-\renewcommand*{\glscombinedfirstsepfirst}[2]{%
-  \glshasattribute{##1}{combinedfirstsepfirst}%
-  {\glsgetattribute{##1}{combinedfirstsepfirst}}%
-  { }%
+\renewcommand*{\glscombinedsepfirst}[2]{%
+ \glshasattribute{#1}{combinedsepfirst}%
+ {\glsgetattribute{#1}{combinedsepfirst}}%
+ {\ifglshasshort{#1}{~}{ }}%
 }%
-
-

This uses a non-breakable space ~ following an abbreviation (that has already been -marked as used). Note that if the associated attributes are set the commands will -behave according to the attribute. -


\glssetcombinedsepabbrvnone

-

-This does the following: - - - -

-
-\renewcommand*{\glscombinedsep}[2]{%
- \glshasattribute{#1}{combinedsep}%
- {\glsgetattribute{#1}{combinedsep}}%
- {\ifhasshort{#1}{}{\ifhasshort{#2}{}{ }}}%
+\renewcommand*{\glscombinedfirstsep}[2]{%
+ \glshasattribute{#1}{combinedfirstsep}%
+ {\glsgetattribute{#1}{combinedfirstsep}}%
+ { }%
 }%
-\renewcommand*{\glscombinedsepfirst}[2]{%
- \glshasattribute{#1}{combinedsepfirst}%
- {\glsgetattribute{#1}{combinedsepfirst}}%
- {\ifhasshort{#1}{}{ }}%
+\renewcommand*{\glscombinedfirstsepfirst}[2]{%
+  \glshasattribute{#1}{combinedfirstsepfirst}%
+  {\glsgetattribute{#1}{combinedfirstsepfirst}}%
+  { }%
+}
+
This uses a non-breaking space (~) following an abbreviation (that has already been marked as used). Note that if the associated attributes are set the commands will behave according to the attribute.

+

+\glssetcombinedsepabbrvnone
+
\renewcommand*{\glscombinedsep}[2]{%
+ \glshasattribute{#1}{combinedsep}%
+ {\glsgetattribute{#1}{combinedsep}}%
+ {\ifglshasshort{#1}{}{\ifglshasshort{#2}{}{ }}}%
 }%
-\renewcommand*{\glscombinedfirstsep}[2]{%
- \glshasattribute{##1}{combinedfirstsep}%
- {\glsgetattribute{##1}{combinedfirstsep}}%
- {\ifhasshort{##2}{}{ }}%
+\renewcommand*{\glscombinedsepfirst}[2]{%
+ \glshasattribute{#1}{combinedsepfirst}%
+ {\glsgetattribute{#1}{combinedsepfirst}}%
+ {\ifglshasshort{#1}{}{ }}%
 }%
-\renewcommand*{\glscombinedfirstsepfirst}[2]{%
- \glshasattribute{##1}{combinedfirstsepfirst}%
- {\glsgetattribute{##1}{combinedfirstsepfirst}}%
- { }%
+\renewcommand*{\glscombinedfirstsep}[2]{%
+ \glshasattribute{#1}{combinedfirstsep}%
+ {\glsgetattribute{#1}{combinedfirstsep}}%
+ {\ifglshasshort{#2}{}{ }}%
 }%
-
-

This does nothing if either element are abbreviations that have already been used. -Note that if the associated attributes are set the commands will behave according to -the attribute. -


\glssetcombinedsepnarrow{width}{narrow sep}

-

-This is rather more complicated as it measures a field value and uses ⟨narrow -sep⟩ if the width is less than ⟨width⟩. The field value is determined as follows: -

-
    -
  • on first use the long field is used if it is set otherwise the first field is used; -
  • -
  • otherwise the short field is used if it is set otherwise the text field is used;
-

Note that this doesn’t take into account fonts, hooks, abbreviation styles or -plural forms (e.g. \mglspl) or other field references (e.g. \mglsname). If the -associated attributes are set the commands will behave according to the -attribute. -

-

- - - -

Top

6.5 mgls Element Hooks

-

The \mgls-like commands use the following hooks: -


\mglselementprehook

-

-This is done before each (non-skipped) element. (Default does nothing.) -


\mglselementposthook

-

-This is done after each (non-skipped) element. (Default does nothing.) Note that this is -different from the normal entry post-link hook \glspostlinkhook. If the individual -entry post-link hook is enabled (see the postlinks key in §6.9 -Multi-Entry Settings), this will go before \mglselementposthook. -

The definitions of the following commands are scoped within the \mgls-like -commands so they can’t be accessed elsewhere (including in the post-link hook, see -§6.6 Post-Link Hook). They may be used in the above hooks -or in the separator commands (described in §6.4 Separators) or -in the command used to encapsulate the entire content. They can also be -used in the post-link hook (see §2.4 Entry Display Style -Modifications) to determine if an entry is being used within a \mgls-like -command. -

The multi-entry label is stored in: -


\mglscurrentmultilabel

-

-

The label of the main element: -


\mglscurrentmainlabel

-

-

The complete comma-separated list of elements: -


\mglscurrentlist

-

-

Multi-entry options: -


\mglscurrentoptions

-

-These are the options that were used when defining the multi-entry. This doesn’t -include options set with \multiglossaryentrysetup or those passed to \mgls (or -whichever variant is being used). -

The current multi-entry category in effect is stored in: -


\mglscurrentcategory

-

-

The calling command control sequence name (e.g. “mgls” or “mglspl”) can be -obtained with: -


\glsxtrcurrentmglscsname

-

- - - -

To test if the current multi-entry is the first use: -


\mglsisfirstuse{true}{false}

-

-This does ⟨true⟩ if this is the first use otherwise it does ⟨false⟩. Note that this -applies to the multi-entry first use flag not the first use flags of the individual -elements. -

At each iteration of the loop over the element list, the following commands are -set, which can be accessed in hooks such as \mglselementprehook or in hooks used -by the underlying \gls etc commands. For example, if \mglscurrentlabel is -defined then \gls is being used inside \mgls. -

The current element label: -


\mglscurrentlabel

-

-

This is a count register that is set to the element index: -


\mglselementindex

-

-

The current multi-entry prefix: -


\mglscurrentprefix

-

-

The current multi-entry suffix: -


\mglscurrentsuffix

-

-


\mglsiflast{true}{false}

-

-If this is the last iteration, does ⟨true⟩ otherwise does ⟨false⟩. This takes the skip options -into account, so the last iteration may not necessarily be when the element index is -equal to the total number of elements. -

-

-

Top

6.6 Post-Link Hook

-

There is a hook that occurs at the end the \mgls-like commands according to the -mpostlink setting (see §6.9 Multi-Entry Settings). The hook used -depends on the mpostlinkelement option. These hooks can’t access the commands -described in §6.5 mgls Element Hooks as the hook occurs -outside of the scope in which they are defined. -

The mpostlinkelement=custom option uses: -


\mglscustompostlinkhook

-

-This does nothing by default. - - - -

The mpostlinkelement=last option uses: -


\mglslastelementpostlinkhook

-

-which emulates the post-link hook of the last element. -

The mpostlinkelement=main option uses: -


\mglslastmainpostlinkhook

-

-which emulates the post-link hook of the main element. -

The default settings postlinks=none,mpostlink=true,mpostlinkelementlast will -suppress the individual element post-link hooks (\glspostlinkhook) and do the -multi-entry post-link hook for the last element (\mglslastelementpostlinkhook). -

If you have the final element’s post-link hook enabled and the multi-entry post-link -hook enabled (for example, postlinks=all, mpostlink=true, mpostlinkelement=last), the -final element’s post-link hook will be done twice. Similarly for the main element with -postlinks=all, mpostlink=true, mpostlinkelement=main. -

The following commands are available for use in these hooks and may also be -used in \mglssuffix. -

The multi-entry label: -


\mglslastmultilabel

-

-

The multi-entry category (§6.8 Multi-Entry Category): -


\mglslastcategory

-

-This will be empty if no category was assigned. -


\mglswasfirstuse{true}{false}

-

-If that was the first use of the multi-entry (§6.7 Multi-Entry First Use) -this does ⟨true⟩ otherwise it does ⟨false⟩. -

-

-

Top

6.6.1 Last Element

-

The following commands relate to the last element. -

The label of the last non-skipped element: -


\mglslastelementlabel

-

-If all elements were skipped or if the multi-entry wasn’t defined, this will be -empty. -

Test if the last element was skipped: -


\mglsiflastelementskipped{true}{false}

-

-If the last element was skipped this does ⟨true⟩ otherwise it does ⟨false⟩. If -all elements were skipped or if the multi-entry wasn’t defined, this will do - - - -⟨true⟩. -

Test if the last element was its first use: -


\mglsiflastelementwasfirstuse{true}{false}

-

-If the last non-skipped element was used for the first time this does ⟨true⟩ otherwise it -does ⟨false⟩. (Corresponds to \glsxtrifwasfirstuse.) If all elements were skipped or -if the multi-entry wasn’t defined, this will do ⟨true⟩. -

Test if the last element was plural: -


\mglsiflastelementwasplural{true}{false}

-

-If the last non-skipped element had the plural form displayed, this does ⟨true⟩ -otherwise it does ⟨false⟩. (Corresponds to \glsifplural.) If all elements were skipped -or if the multi-entry wasn’t defined, this will do ⟨false⟩. -

Test if the last element was had any case-changing applied: -


\mglsiflastelementcapscase{no-change}{firstuc}{all caps} -

-

-Corresponds to \glscapscase of the last non-skipped element. If all elements were -skipped or if the multi-entry wasn’t defined, this will do ⟨no-change⟩. -

-

-

Top

6.6.2 Main Element

-

The following commands relate to the main element. -

The label of the main element from the multi-entry that was just referenced: -


\mglslastmainlabel

-

-If the main element was skipped or if the multi-entry wasn’t defined, this will be -empty. If this is the same as \mglslastelementlabel then the main element was the -last element. -

Test if the main element was skipped: -


\mglsiflastmainskipped{true}{false}

-

-If the main element from the multi-entry that was just referenced was skipped this -does ⟨true⟩ otherwise it does ⟨false⟩. If the multi-entry wasn’t defined, this will do -⟨true⟩. -

Test if the main element was its first use: -


\mglsiflastmainwasfirstuse{true}{false}

-

-If the main element was used for the first time this does ⟨true⟩ otherwise it does ⟨false⟩. -(Corresponds to \glsxtrifwasfirstuse.) If the main element was skipped or if the -multi-entry wasn’t defined, this will do ⟨true⟩. -

Test if the main element was plural: -


\mglsiflastmainwasplural{true}{false}

- - - -

-If the main element from the multi-entry that was just referenced had its plural form -displayed this does ⟨true⟩ otherwise it does ⟨false⟩. (Corresponds to \glsifplural.) If -the main element was skipped or if the multi-entry wasn’t defined, this will do -⟨false⟩. -

Test if the main element was had any case-changing applied: -


\mglsiflastmaincapscase{no-change}{firstuc}{all caps}

-

-Corresponds to \glscapscase of the main element from the multi-entry that was -just referenced. If the main element was skipped or if the multi-entry wasn’t defined, -this will do ⟨no-change⟩. -

-

-

Top

6.7 Multi-Entry First Use

-

Each multi-entry set has an associated first use flag. This is independent of -the first use flag associated with the individual entries that make up the -set. As with the \gls-like commands, \mgls unsets this flag. Unlike the -\glstext-like commands, all the commands described in §6.11 Variants -of mgls (including commands like \mglsname) unset this flag, even if the -elements use commands like \glsname that don’t unset the entry’s first use -flag. -

You can determine whether or not a multi-entry set has been marked as used -with: -


\ifmglsused{multi-label}{true}{false}

-

-You can (globally) unset the flag (mark the set as having been referenced) -with: -


\mglsunset{multi-label}

-

-or reset it with: -


\mglsreset{multi-label}

-

-There are also local versions of these commands: -


\mglslocalunset{multi-label}

-

-and -


\mglslocalreset{multi-label}

-

-

To unset all multi-entries: -


\mglsunsetall

-

-To reset all multi-entries: - - - -


\mglsresetall

-

-

Note that unsetting or resetting any of the individual element first use flags -doesn’t affect the multi-entry flag. Similarly, unsetting or resetting the multi-entry -flag doesn’t affect the first use flags of the individual elements. -

-

-

Top

6.8 Multi-Entry Category

-

A multi-entry set may have an associated category set using the category key -described in §6.9 Multi-Entry Settings. This isn’t set by default, -but if it is set the category may have attributes set in the usual way. The multi-entry -category is independent of the individual entry categories. The following attribute is -recognised by commands like \mgls: -

-multioptions
default options to apply to any multi-entry set with the given - category. These can be overridden by the first optional argument of - \multiglossaryentry or by the setup key in the first optional argument - of commands like \mgls. -
-

Note that you can’t access the category or its attributes via the multi-entry label -(for example, with \glshasattribute). If you need to access the current -multi-entry’s category within any of the \mgls-like hooks (§6.5 -mgls Element Hooks), you can obtain the category with \mglscurrentcategory and -use commands like \glshascategoryattribute. -

-

-

Top

6.9 Multi-Entry Settings

-

The settings that govern all multi-entries can be set using: -


\multiglossaryentrysetup{options}

-

-The ⟨options⟩ are the same as for \multiglossaryentry. Options may also be set -according to the multi-entry category attribute multioptions. -

Whenever the \mgls-like commands are used, options are applied in the following -order: -

    -
  1. general options identified by \multiglossaryentrysetup; - - - -
  2. -
  3. the category key is assigned if it’s in the general options, - \multiglossaryentry or setup key; -
  4. -
  5. multioptions category attribute (if set); -
  6. -
  7. any options provided in the first optional argument of - \multiglossaryentry; -
  8. -
  9. any options provided in the setup key in the first optional argument of the - \mgls-like command.
-

These options are described below. -

-

-

Top

6.9.1 Indexing

-
-indexmain
This setting may take one of the following values: -
- false
don’t index the main entry; -
- true
index the main entry; -
- first
only index the main entry if it’s the first use (of the main entry).
-

The default is true. -

-indexothers
This setting may take one of the following values: -
- false
don’t index the other entries; -
- true
index the other entries; -
- first
only index the other entries if it’s the first use (of the non-main - entry).
-

The default is first.

- - - -

-

-

Top

6.9.2 Location Formats (Encaps)

-
-encapmain
This setting value should be the value to pass to format for the main - entry. (The location encapsulator.) The default is glsnumberformat. -
-encapothers
This setting value should be the value to pass to format for the - other (not main) entries. (The location encapsulator.) The default is - glsnumberformat.
-

-

-

Top

6.9.3 Post-Link Hooks

-
-postlinks
This setting determines whether or not to enable the individual - element’s post-link hook (\glspostlinkhook). The value may be one - of: -
- none
suppress the post-link hook for all elements; -
- all
don’t suppress the post-link hook for all elements; -
- notlast
only suppress the post-link hook for the last element; -
- mainnotlast
suppress the post-link hook for all “other” (not main) - elements and for the last element (so only the main element will have - its post-link hook as long as it’s not the last element); -
- mainonly
suppress the post-link hook for all “other” (not main) elements; -
- othernotlast
suppress the post-link hook for the main element and for - the last element (so only the other elements will have their post-link - hook as long as the element isn’t the last one); -
- otheronly
suppress the post-link hook for the main element.
-

The default is postlinks=none. - - - -

-mpostlink
This setting determines whether or not to enable the multi-entry post-link - hook (§6.6 Post-Link Hook). The value may be one - of: -
- false
suppress the multi-entry post-link hook; -
- true
enable the multi-entry post-link hook; -
- firstonly
enable the multi-entry post-link hook only for the first use of the - multi-entry; -
- usedonly
enable the multi-entry post-link hook only for the subsequent - (not first) use of the multi-entry.
-

The default is mpostlink=true. If the value is omitted, true is assumed. -

-mpostlinkelement
This setting indicates which post-link hook should be used if the - multi-entry post-link hook has been enabled. Allowed values: -
- last
use \mglslastelementpostlinkhook (that is, use the post-link hook - for the last element); -
- main
use \mglslastmainpostlinkhook (that is, use the post-link hook - for the main element); -
- custom
use \mglslastcustompostlinkhook.
-
-

Note that some combinations may cause a repeated hook. -

-

-

Top

6.9.4 Prefixes and Suffixes

-

See §6.3 Prefixes and Suffixes for more information on prefixes and -suffixes. Note that the prefixes and suffixes are not affected by case-changing -commands such as \Mgls or \MGLS. If you want a prefix to obey case-changing, use -the \mpgls-like commands instead (§6.11.4 Support for glossaries-prefix -(pgls)). - - - -

-firstprefix
The prefix to use on first use of the multi-entry. -
-usedprefix
The prefix to use on subsequent use of the multi-entry. -
-firstsuffix
The suffix to use on first use of the multi-entry. -
-usedsuffix
The suffix to use on subsequent use of the multi-entry.
-

-

-

Top

6.9.5 Skipping Elements

-
-firstskipmain
This is a boolean setting. If true, the main element will be omitted - on (multi-entry) first use. -
-firstskipothers
This is a boolean setting. If true, the other (non-main) elements - will be omitted on (multi-entry) first use. -
-usedskipmain
This is a boolean setting. If true, the main element will be - omitted on (multi-entry) subsequent use. -
-usedskipothers
This is a boolean setting. If true, the other (non-main) elements - will be omitted on (multi-entry) subsequent use. -
-

The skip options apply to the multi-entry first use flag not the individual element first -use. See §6.7 Multi-Entry First Use. -

Note that it is technically possible to set the skip options so that both the main -and the other elements are skipped. However, by default, this will generate a warning -and only the final optional argument (the ⟨insert⟩) will be displayed. There won’t -be a loop over all elements so the commands set at each iteration, such as -\mglscurrentlabel, won’t be defined. -

The warning and the insertion of the ⟨insert⟩ is done by: -


\glsxtrmglsWarnAllSkipped{message}{insert}{cs}

-

-where ⟨message⟩ is the warning message and ⟨cs⟩ is the control sequence that -encapsulates the entire content (including hyperlink and the textformat setting, if -enabled). - - - -

If, for some particular reason, you want this scenario, you can redefine this -command to omit the warning. -

-

-

Top

6.9.6 General

-
-hyper
This setting may take one of the following values: -
- none
no hyperlinks; -
- allmain
encapsulate the entire content with a single hyperlink to the main - entry’s target; -
- mainonly
only hyperlink the main entry; -
- individual
hyperlink each entry individually; -
- otheronly
only hyperlink the other entries; -
- notmainfirst
don’t hyperlink the main entry on multi-entry first use; -
- nototherfirst
don’t hyperlink the other entries on multi-entry first use; -
- notfirst
don’t hyperlink any entries on multi-entry first use.
-

The default is individual. -

-textformat
This setting value should be the control sequence name (without the - leading backslash) of the command used to encapsulate the entire content. The - default is @firstofone. -
-category
The category to apply to the multi-entry. This is independent of - the categories of each of the elements. The default is no category. See - §6.8 Multi-Entry Category. -
-mglsopts
Default options to pass to \mgls. Note that setup can’t be used within this - value. -
- - - -

-

-

Top

6.10 mgls Options

-

The ⟨options⟩ for \mgls (and similar commands) are listed below. Any additional -options provided will be appended to the all value. For example: - - - -

-
-\mgls[counter=chapter]{cbot}
-
-

is equivalent to: - - - -

-
-\mgls[all={counter=chapter}]{cbot}
-
-

Whereas: - - - -

-
-\mgls[counter=chapter,all={counter=section}]{cbot}
-
-

is treated as: - - - -

-
-\mgls[all={counter=section,counter=chapter}]{cbot}
-
-

which has the same effect as: - - - -

-
-\mgls[all={counter=chapter}]{cbot}
-
-

(The descriptions below reference \gls which is used internally by \mgls. Replace -this with \glspl etc as applicable for the variants, such as \mglspl.) -

-setup
The value should be a list of any options that can be passed - to \multiglossaryentrysetup. These options will override any - conflicting options that were supplied to \multiglossaryentry or - \multiglossaryentrysetup. Note that mgls can’t be used within this - value. -
-all
The value should be a list of any options that can be passed to \gls. These - options will be passed to each instance of \gls and will override any - conflicting setting in setup. -
-main
The value should be a list of any options that can be passed to \gls. - These options will be passed to the instance of \gls used for the main - label and will override any conflicting setting in all. -
-others
The value should be a list of any options that can be passed to \gls. - These options will be passed to each instance of \gls used for the other - (not main) labels and will override any conflicting setting in all. -
-hyper
a boolean option to determine whether or not to use hyperlinks (if - supported). This may cause a conflict with other options, but is essentially - provided to allow the starred version of \mgls to switch off all hyperlinks. -
-multiunset
This only applies to the multi-entry first use flag, described in - §6.7 Multi-Entry First Use, not the first use flags of the - elements. The value may be one of: -
-
global globally unset the flag (default); -
-
local locally unset the flag; -
-
none don’t unset the flag.
- - - -
-presetlocal
a boolean option that governs whether or not the following options - should have a local or global effect. The default is presetlocal=false - (global). -
-resetall
a boolean option to determine whether or not to reset all entries in ⟨label list⟩ - before using \gls. This option refers to the individual entry’s first use flag not - the multi-set flag. -
-resetmain
a boolean option to determine whether or not to reset the main entry - before using \gls. This option refers to the individual entry’s first use flag not - the multi-set flag. -
-resetothers
a boolean option to determine whether or not to reset the other (not - main) entries before using \gls. This option refers to the individual entry’s first - use flag not the multi-set flag. -
-unsetall
a boolean option to determine whether or not to unset all entries in ⟨label list⟩ - before using \gls. This option refers to the individual entry’s first use flag not - the multi-set flag. -
-unsetmain
a boolean option to determine whether or not to unset the main entry - before using \gls. This option refers to the individual entry’s first use flag not - the multi-set flag. -
-unsetothers
a boolean option to determine whether or not to unset the other (not - main) entries before using \gls. This option refers to the individual entry’s first - use flag not the multi-set flag.
-

The resetoptions all use: -


\mglselementreset{label}

-

-The unsetoptions all use: -


\mglselementunset{label}

-

-These take the presetlocal into account. -

An alternative way of resetting the other elements is to use: -


\mglsunsetothers{multi-label}

-

-or for a local reset: -


\mglslocalunsetothers{multi-label}

- - - -

-

-

-

Top

6.11 Variants of mgls

-

The commands listed in this section all behave like \mgls. These (including \mgls -itself) are collectively referred to as the \mgls-like commands. All commands unset -the multi-entry first use flag (unless the multiunset=none option is applied). Only -those commands that use the \gls-like commands (such as \gls or \glspl) will -unset the individual entry first use flag. -

-

-

Top

6.11.1 gls-like

-


\mglspl[options]{multi-label}[insert]

-

-This uses \glspl instead of \gls for each entry. -


\mglsmainpl[options]{multi-label}[insert]

-

-This uses \glspl instead of \gls for the main entry and \gls for all the other -entries. -


\Mgls[options]{multi-label}[insert]

-

-This uses \Gls for the first entry and \gls for the other entries. -


\MGls[options]{multi-label}[insert]

-

-This uses \Gls for all entries. -


\Mglspl[options]{multi-label}[insert]

-

-This uses \Glspl for the first entry and \glspl for the other entries. -


\Mglsmainpl[options]{multi-label}[insert]

-

-The first entry starts with an upper case. The plural form is used for the main -entry. -


\MGlspl[options]{multi-label}[insert]

-

-This uses \Glspl for all entries. -


\MGlsmainpl[options]{multi-label}[insert]

-

-This uses \Glspl for the main entry and \Gls for all other entries. -


\MGLS[options]{multi-label}[insert]

- - - -

-This uses \GLS instead of \gls for each entry. -


\MGLSpl[options]{multi-label}[insert]

-

-This uses \GLSpl instead of \gls for each entry. -


\MGLSmainpl[options]{multi-label}[insert]

-

-This uses all caps for all entries and \GLSpl for the main entry. -

-

-

Top

6.11.2 Abbreviations

-


\mglsshort[options]{multi-label}[insert]

-

-This will use \glsxtrshort for any entries that have the short key set and will use -\glstext otherwise. -


\mglslong[options]{multi-label}[insert]

-

-This will use \glsxtrlong for any entries that have the long key set and will use -\glstext otherwise. -


\mglsfull[options]{multi-label}[insert]

-

-This will use \glsxtrfull for any entries that have the short key set and will use -\glsfirst otherwise. -


\Mglsshort[options]{multi-label}[insert]

-

-As \mglsshort but with an initial capital on the first entry. -


\Mglslong[options]{multi-label}[insert]

-

-As \mglslong but with an initial capital on the first entry. -


\Mglsfull[options]{multi-label}[insert]

-

-As \mglsfull but with an initial capital on the first entry. -

-

-

Top

6.11.3 Other Fields

-


\mglsname[options]{multi-label}[insert]

-

-This uses \glsname instead of \gls for each entry. -


\MGlsname[options]{multi-label}[insert]

-

-This uses \Glsname instead of \gls for each entry. - - - -


\Mglsname[options]{multi-label}[insert]

-

-This uses \Glsname instead of \gls for the first entry and \glsname for all the other -entries. -


\mglssymbol[options]{multi-label}[insert]

-

-This uses \glssymbol if the symbol key has been set otherwise it uses \gls for each -element. -


\MGlssymbol[options]{multi-label}[insert]

-

-This uses \glssymbol if the symbol key has been set otherwise it uses \Gls for each -element. (Note that no case change is applied to the symbol as this usually isn’t -appropriate.) -


\Mglssymbol[options]{multi-label}[insert]

-

-As above, but \Gls is only used for the first element (if it doesn’t have the symbol -key set). -


\mglsusefield[options]{multi-label}[insert]

-

-Use \glsdisp{label}{field value⟩⟨insert} if the field given by: -


\mglsfield

-

-exists, otherwise use \gls. By default, this is useri (corresponding to the -user1 key). If you redefine \mglsfield, you will need to use the internal -name. -


\Mglsusefield[options]{multi-label}[insert]

-

-As \mglsusefield but the first element starts with an initial uppercase. -


\MGlsusefield[options]{multi-label}[insert]

-

-As \mglsusefield but each element starts with an initial uppercase. -

You can use the pre-element hook \mglselementprehook to locally redefine -\mglsfirst. Examples: -

    -
  1. if the multi-category is “sample” then use the user2 field otherwise use the user1 - field: - - - -
    -     \renewcommand{\mglselementprehook}{%
    -       \ifdefstring{\mglscurrentcategory}{sample}%
    -       {\renewcommand{\mglsfield}{userii}}%
    -       {\renewcommand{\mglsfield}{useri}}%
    -     }
    -
    -

    -

  2. -
  3. if the element’s category is “sample” then use the user2 field otherwise use the - user1 field: - - - -
    -     \renewcommand{\mglselementprehook}{%
    -       \glsifcategory{\mglscurrentlabel}{sample}%
    -       {\renewcommand{\mglsfield}{userii}}%
    -       {\renewcommand{\mglsfield}{useri}}%
    -     }
    -
    -

    -

  4. -
  5. if either the multi-entry’s category or the element’s category has the - custom attribute “mglsfield” set then use it otherwise use the user1 - field: - - - -
    -     \renewcommand{\mglselementprehook}{%
    -      \glshascategoryattribute{\mglscurrentcategory}{mglsfield}%
    -      {\renewcommand{\mglsfield}{\glsgetcategoryattribute{\mglscurrentcategory}{mglsfield}}}%
    -      {%
    -        \glshasattribute{\mglscurrentlabel}{mglsfield}%
    -        {\renewcommand{\mglsfield}{\glsgetattribute{\mglscurrentlabel}{mglsfield}}}%
    -        {\renewcommand{\mglsfield}{useri}}%
    -      }%
    -     }
    -
    -

-

-

-

Top

6.11.4 Support for glossaries-prefix (pgls)

-

If you load the glossaries-prefix package (either after glossaries-extra) or with the prefix -package option, then the following commands will use one of the \pgls-like -commands provided by that package. (See the glossaries user manual for further -details.) -

If the glossaries-prefix package hasn’t been loaded then \gls (or analogous -case-changing variant) will be used instead and a warning is issued. The warning can -be removed by redefining the following to do nothing: -


\mpglsWarning

-

-


\mpgls[options]{multi-label}[insert]

-

-Uses \pgls for the first element and \gls for the remaining elements. -


\mpglspl[options]{multi-label}[insert]

-

-Uses \pglspl for the first element and \glspl for the remaining elements. -


\mpglsmainpl[options]{multi-label}[insert]

-

-Only uses the plural form for the main element. The first element uses the prefixing -command (\pgls or \pglspl, depending on whether the first element is the main -element). -


\Mpgls[options]{multi-label}[insert]

-

-Uses \Pgls for the first element and \gls for the remaining elements. -


\Mpglsmainpl[options]{multi-label}[insert]

- - - -

-Only uses the plural form for the main element. The first element uses the first-letter -uppercase prefixing command (\Pgls or \Pglspl, depending on whether the first -element is the main element). -


\MPGls[options]{multi-label}[insert]

-

-Uses \Pgls for the first element and \Gls for the remaining elements. -


\MPGlspl[options]{multi-label}[insert]

-

-Uses \Pglspl for the first element and \Glspl for the remaining elements. -


\MPGlsmainpl[options]{multi-label}[insert]

-

-Only uses the plural form for the main element. The first element uses the prefixing -command (\Pgls or \Pglspl, depending on whether the first element is the main -element). All elements are converted to first letter uppercase. -


\MPGLS[options]{multi-label}[insert]

-

-Uses \PGLS for the first element and \GLS for the remaining elements. -


\MPGLSpl[options]{multi-label}[insert]

-

-Uses \PGLSpl for the first element and \GLSpl for the remaining elements. -


\MPGLSmainpl[options]{multi-label}[insert]

-

-Only uses the plural form for the main element. All elements are converted to -uppercase. The first element uses the prefixing command (\PGLS or \PGLSpl, -depending on whether the first element is the main element). -

-

-

Top

6.12 Cross-References

-

Multi-entry labels may be used in the cross-referencing keys see and seealso. The -formatting command will use: -


\mglsseefirstitem{label}

-

-for the first item in the list (if it’s a multi-entry) and -


\mglsseeitem{label}

-

-for any subsequent items that are multi-entries. The default definition of -\mglsseeitem is: - - - -

-
-\newcommand*{\mglsseeitem}[1]{%
- \mglsname[all={noindex},setup={hyper=allmain}]{#1}%
+\renewcommand*{\glscombinedfirstsepfirst}[2]{%
+ \glshasattribute{#1}{combinedfirstsepfirst}%
+ {\glsgetattribute{#1}{combinedfirstsepfirst}}%
+ { }%
 }
-
-

This switches off indexing, sets the hyperlink to encompass the entire multi-entry -content and uses the name field. The default definition of \mglsseefirstitem is -simply \mglsseeitem. -

For example, to use the short or text fields: - - - -

-
-\renewcommand*{\mglsseeitem}[1]{%
- \mglsshort[all={noindex},setup={hyper=allmain}]{#1}%
+
This does nothing if either element are abbreviations that have already been used. Note that if the associated attributes are set the commands will behave according to the attribute.

+

+\glssetcombinedsepnarrow{width}{narrow-sep}
+ This is rather more complicated as it measures a field value and uses narrow-sep if the width is less than width. The field value is determined as follows: +
    +
  • on first use the long field is used if it is set otherwise the first field is used;

    +

  • otherwise the short field is used if it is set otherwise the text field is used; +
+

+Note that this doesn’t take into account fonts, hooks, abbreviation styles or plural forms (e.g. \mglspl) or other field references (e.g. \mglsname). If the associated attributes are set the commands will behave according to the attribute.

+ +

+ +
+

7.5. \mgls Element Hooks

+

+The \mgls-like commands use the following hooks:

+\mglselementprehook
+ This is done before each (non-skipped) element. (Default does nothing.)

+

+\mglselementposthook
+ This is done after each (non-skipped) element. (Default does nothing.) Note that this is different from the normal entry post-link hook \glspostlinkhook. If the individual entry post-link hook is enabled (see the postlinks key in §7.9), this will go before \mglselementposthook.

+The definitions of the following commands are scoped within the \mgls-like commands so they can’t be accessed elsewhere (including in the post-link hook, see §7.6). They may be used in the above hooks or in the separator commands (described in §7.4) or in the command used to encapsulate the entire content. They can also be used in the post-link hook (see §5.5) to determine if an entry is being used within a \mgls-like command.

+

+\mglscurrentmultilabel
+ Expands to the multi-entry label.

+

+\mglscurrentmainlabel
+ Expands to the label of the main element.

+

+\mglscurrentlist
+ Expands to the complete comma-separated list of elements.

+

+\mglscurrentoptions
+ Expands to the options used when the multi-entry was defined. This doesn’t include options set with \multiglossaryentrysetup or those passed to \mgls (or whichever variant is being used).

+

+\mglscurrentcategory
+ Expands to the multi-entry category current in effect.

+

+\glsxtrcurrentmglscsname
+ Expands to the control sequence name of the calling command (for example, mgls or mglspl).

+To test if the current multi-entry is the first use:

+\mglsisfirstuse{true}{false}
+ This does true if this is the first use otherwise it does false. Note that this applies to the multi-entry first use flag not the first use flags of the individual elements.

+At each iteration of the loop over the element list, the following commands are set, which can be accessed in hooks such as \mglselementprehook or in hooks used by the underlying \gls etc commands. For example, if \mglscurrentlabel is defined then \gls is being used inside \mgls.

+

+\mglscurrentlabel
+ Expands to the current element label.

+

+\mglselementindex
+ This is a count register that is set to the element index.

+

+\mglscurrentprefix
+ Expands to the current multi-entry prefix.

+

+\mglscurrentsuffix
+ Expands to the current multi-entry suffix.

+

+\mglsiflast{true}{false}
+ If this is the last iteration, does true otherwise does false. This takes the skip options into account, so the last iteration may not necessarily be when the element index is equal to the total number of elements.

+ +

+ +
+

7.6. Post-Link Hook

+

+There is a hook that occurs at the end the \mgls-like commands according to the mpostlink setting (see §7.9). The hook used depends on the mpostlinkelement option. These hooks can’t access the commands described in §7.5 as the hook occurs outside of the scope in which they are defined.

+The mpostlinkelement=custom option uses:

+\mglscustompostlinkhook
+ This does nothing by default.

+The mpostlinkelement=last option uses:

+\mglslastelementpostlinkhook
+ which emulates the post-link hook of the last element.

+The mpostlinkelement=main option uses:

+\mglslastmainpostlinkhook
+ which emulates the post-link hook of the main element.

+The default settings postlinks=none, +mpostlink=true, mpostlinkelement=last will suppress the individual element post-link hooks (\glspostlinkhook) and do the multi-entry post-link hook for the last element (\mglslastelementpostlinkhook).

+If you have the final element’s post-link hook enabled and the multi-entry post-link hook enabled (for example, postlinks=all, mpostlink=true, +mpostlinkelement=last), the final element’s post-link hook will be done twice. Similarly for the main element with postlinks=all, mpostlink=true, +mpostlinkelement=main.

+The following commands are available for use in these hooks and may also be used in the definition of \mglssuffix.

+

+\mglslastmultilabel
+ Expands to the multi-entry label.

+

+\mglslastcategory
+ Expands to the multi-entry category (see §7.8). This will be empty if no category was assigned.

+

+\mglswasfirstuse{true}{false}
+ If that was the first use of the multi-entry (see §7.7) this does true otherwise it does false.

+ +

+ +
+

7.6.1. Last Element

+

+ The following commands relate to the last element.

+

+\mglslastelementlabel
+ Expands to the label of the last non-skipped element. If all elements were skipped or if the multi-entry wasn’t defined, this will be empty.

+Test if the last element was skipped:

+\mglsiflastelementskipped{true}{false}
+ If the last element was skipped this does true otherwise it does false. If all elements were skipped or if the multi-entry wasn’t defined, this will do true.

+Test if the last element was its first use:

+\mglsiflastelementwasfirstuse{true}{false}
+ If the last non-skipped element was used for the first time this does true otherwise it does false. (Corresponds to \glsxtrifwasfirstuse.) If all elements were skipped or if the multi-entry wasn’t defined, this will do true.

+Test if the last element was plural:

+\mglsiflastelementwasplural{true}{false}
+ If the last non-skipped element had the plural form displayed, this does true otherwise it does false. (Corresponds to \glsifplural.) If all elements were skipped or if the multi-entry wasn’t defined, this will do false.

+Test if the last element was had any case-changing applied:

+\mglsiflastelementcapscase{no-change}{firstuc}{all caps}
+ Corresponds to \glscapscase of the last non-skipped element. If all elements were skipped or if the multi-entry wasn’t defined, this will do no-change.

+ +

+ +
+

7.6.2. Main Element

+

+ The following commands relate to the main element.

+

+\mglslastmainlabel
+ Expands to the label of the main element from the multi-entry that was just referenced. If the main element was skipped or if the multi-entry wasn’t defined, this will be empty. If this is the same as \mglslastelementlabel then the main element was the last element.

+Test if the main element was skipped:

+\mglsiflastmainskipped{true}{false}
+ If the main element from the multi-entry that was just referenced was skipped this does true otherwise it does false. If the multi-entry wasn’t defined, this will do true.

+Test if the main element was its first use:

+\mglsiflastmainwasfirstuse{true}{false}
+ If the main element was used for the first time this does true otherwise it does false. (Corresponds to \glsxtrifwasfirstuse.) If the main element was skipped or if the multi-entry wasn’t defined, this will do true.

+Test if the main element was plural:

+\mglsiflastmainwasplural{true}{false}
+ If the main element from the multi-entry that was just referenced had its plural form displayed this does true otherwise it does false. (Corresponds to \glsifplural.) If the main element was skipped or if the multi-entry wasn’t defined, this will do false.

+Test if the main element was had any case-changing applied:

+\mglsiflastmaincapscase{no-change}{firstuc}{all caps}
+ Corresponds to \glscapscase of the main element from the multi-entry that was just referenced. If the main element was skipped or if the multi-entry wasn’t defined, this will do no-change.

+ +

+ +
+

7.7. Multi-Entry First Use

+

+Each multi-entry set has an associated first use flag. This is independent of the first use flag associated with the individual entries that make up the set. As with the \gls-like commands, \mgls unsets this flag. Unlike the \glstext-like commands, all the commands described in §7.11 (including commands like \mglsname) unset this flag, even if the elements use commands like \glsname that don’t unset the entry’s first use flag.

+You can determine whether or not a multi-entry set has been marked as used with:

+\ifmglsused{multi-label}{true}{false}
+ This does true if the given multi-entry has been marked as used, otherwise it does false.

+You can (globally) unset the flag (mark the set as having been referenced) with:

+\mglsunset{multi-label}
+ or reset it with:
+\mglsreset{multi-label}
+ There are also local versions of these commands:
+\mglslocalunset{multi-label}
+ which locally unsets the flag and
+\mglslocalreset{multi-label}
+ which locally resets the flag.

+It’s also possible to unset or reset all multi-entries.

+\mglsunsetall
+ Unsets all multi-entries.

+

+\mglsresetall
+ Resets all multi-entries.

+

+Note that unsetting or resetting any of the individual element first use flags doesn’t affect the multi-entry flag. Similarly, unsetting or resetting the multi-entry flag doesn’t affect the first use flags of the individual elements.
+

+ +

+ +
+

7.8. Multi-Entry Category

+

+A multi-entry set may have an associated category set using the category key described in §7.9. This isn’t set by default, but if it is set the category may have attributes set in the usual way. The multi-entry category is independent of the individual entry categories. The following attribute is recognised by commands like \mgls:

+

+multioptions=options
+ The value are the default options to apply to any multi-entry set with the given category. These can be overridden by the first optional argument of \multiglossaryentry or by the setup key in the first optional argument of commands like \mgls.

+

+combinedfirstsep=separator
+ The separator to use for \glscombinedfirstsep.

+

+combinedfirstsepfirst=separator
+ The separator to use for \glscombinedfirstsepfirst.

+

+combinedsepfirst=separator
+ The separator to use for \glscombinedsepfirst.

+

+combinedsep=separator
+ The separator to use for \glscombinedsep.

+Note that you can’t access the category or its attributes via the multi-entry label (for example, with \glshasattribute). If you need to access the current multi-entry’s category within any of the \mgls-like hooks (§7.5), you can obtain the category with \mglscurrentcategory and use commands like \glshascategoryattribute.

+ +

+ +
+

7.9. Multi-Entry Settings

+

+The settings that govern all multi-entries can be set using:

+\multiglossaryentrysetup{options}
+ The options are the same as for \multiglossaryentry.

+Whenever the \mgls-like commands are used, options are applied in the following order: +

    +
  1. 1.general options identified by \multiglossaryentrysetup;

    +

  2. 2.the category key is assigned if it’s in the general options, \multiglossaryentry or setup key;

    +

  3. 3.multioptions category attribute (if set);

    +

  4. 4.any options provided in the first optional argument of \multiglossaryentry;

    +

  5. 5.any options provided in the setup key in the first optional argument of the \mgls-like command. +
+

+These options are described below.

+ +

+ +
+

7.9.1. Indexing

+

+

+indexmain=valuedefault: true; initial: true
+ This setting may take one of the following values: +
+ false don’t index the main entry; true index the main entry; first only index the main entry if it’s the first use (of the main entry). +
+

+

+indexothers=valuedefault: true; initial: true
+ This setting may take one of the following values: +
+ false don’t index the other entries; true index the other entries; first only index the other entries if it’s the first use (of the non-main entry). +
+

+ +

+ +
+

7.9.2. Location Formats (Encaps)

+

+

+encapmain=valueinitial: glsnumberformat
+ This setting value should be the value to pass to format option (location encap) for the main entry.

+

+encapothers=valueinitial: glsnumberformat
+ This setting value should be the value to pass to format option (location encap) for the other (not main) entries.

+ +

+ + + +
+

7.9.4. Prefixes and Suffixes

+

+See §7.3 for more information on prefixes and suffixes. Note that the prefixes and suffixes are not affected by case-changing commands such as \Mgls or \MGLS. If you want a prefix to obey case-changing, use the \mpgls-like commands instead (see §7.11.4).

+

+firstprefix=value
+ The prefix to use on first use of the multi-entry.

+

+usedprefix=value
+ The prefix to use on subsequent use of the multi-entry.

+

+firstsuffix=value
+ The suffix to use on first use of the multi-entry.

+

+usedsuffix=value
+ The suffix to use on subsequent use of the multi-entry.

+ +

+ +
+

7.9.5. Skipping Elements

+

+

+The skip options apply to the multi-entry first use flag not the individual element first use. See §7.7.
+

+

+firstskipmain=booleandefault: true; initial: false
+ If true, the main element will be omitted on (multi-entry) first use.

+

+firstskipothers=booleandefault: true; initial: false
+ If true, the other (non-main) elements will be omitted on (multi-entry) first use.

+

+usedskipmain=booleandefault: true; initial: false
+ If true, the main element will be omitted on (multi-entry) subsequent use.

+

+usedskipothers=booleandefault: true; initial: false
+ If true, the other (non-main) elements will be omitted on (multi-entry) subsequent use.

+Note that it is technically possible to set the skip options so that both the main and the other elements are skipped. However, by default, this will generate a warning and only the final optional argument (the insert) will be displayed. There won’t be a loop over all elements so the commands set at each iteration, such as \mglscurrentlabel, won’t be defined.

+The warning and the insertion of the insert is done by:

+\glsxtrmglsWarnAllSkipped{message}{insert}{fmt-cs}
+ where message is the warning message and cs is the control sequence that encapsulates the entire content (including hyperlink and the textformat setting, if enabled).

+If, for some particular reason, you want this scenario, you can redefine this command to omit the warning.

+ +

+ +
+

7.9.6. General

+

+

+hyper=valueinitial: individual
+ This setting may take one of the following values: +
+ none no hyperlinks; allmain encapsulate the entire content with a single hyperlink to the main entry’s target; mainonly only hyperlink the main entry; individual hyperlink each entry individually; otheronly only hyperlink the other entries; notmainfirst don’t hyperlink the main entry on multi-entry first use; nototherfirst don’t hyperlink the other entries on multi-entry first use; notfirst don’t hyperlink any entries on multi-entry first use. +
+

+

+textformat=valueinitial: @firstofone
+ This setting value should be the control sequence name (without the leading backslash) of the command used to encapsulate the entire content.

+

+category=category-label
+ The category to apply to the multi-entry. This is independent of the categories of each of the elements. The default is no category. See §7.8.

+

+mglsopts=option list
+ Default options to pass to commands like \mgls. Note that setup can’t be used within this value.

+ +

+ +
+

7.10. \mgls Options

+

+The options for \mgls (and similar commands) are listed below. Any additional options provided will be appended to the all value. For example:

\mgls[counter=chapter]{cbot}
+
is equivalent to:
\mgls[all=counter=chapter]{cbot}
+
Whereas:
\mgls[counter=chapter,all=counter=section]{cbot}
+
is treated as:
\mgls[all=counter=section,counter=chapter]{cbot}
+
which has the same effect as:
\mgls[all=counter=chapter]{cbot}
+

+

+The descriptions below reference \gls which is used internally by \mgls. Replace this with \glspl etc as applicable for the variants, such as \mglspl.
+

+

+setup=option list
+ The value should be a list of any options that can be passed to \multiglossaryentrysetup. These options will override any conflicting options that were supplied to \multiglossaryentry or \multiglossaryentrysetup. Note that mglsopts can’t be used within this value.

+

+all=option list
+ The value should be a list of any options that can be passed to \gls. These options will be passed to each instance of \gls and will override any conflicting setting in setup.

+

+main=option list
+ The value should be a list of any options that can be passed to \gls. These options will be passed to the instance of \gls used for the main label and will override any conflicting setting in all.

+

+others=option list
+ The value should be a list of any options that can be passed to \gls. These options will be passed to each instance of \gls used for the other (not main) labels and will override any conflicting setting in all.

+

+hyper=booleandefault: true
+ A boolean option to determine whether or not to use hyperlinks (if supported). This may cause a conflict with other options, but is essentially provided to allow the starred version of \mgls to switch off all hyperlinks.

+

+multiunset=valueinitial: global
+ This only applies to the multi-entry first use flag, described in §7.7, not the first use flags of the elements. The value may be one of: +
+ global globally unset the flag; local locally unset the flag; none don’t unset the flag. +
+

+

+presetlocal=booleandefault: true; initial: false
+ A boolean option that governs whether or not the following options should have a local or global effect.

+

+resetall=booleandefault: true; initial: false
+ A boolean option to determine whether or not to reset all elements before using \gls. This option refers to the individual entry’s first use flag not the multi-entry first use flag. (This is similar to passing prereset to each \gls but it’s also applied to any skipped elements.)

+

+resetmain=booleandefault: true; initial: false
+ A boolean option to determine whether or not to reset the main entry’s first use flag before using \gls.

+

+resetothers=booleandefault: true; initial: false
+ A boolean option to determine whether or not to reset the first use flag of all the other (not main) elements before using \gls.

+

+unsetall=booleandefault: true; initial: false
+ A boolean option to determine whether or not to unset all elements before using \gls. This option refers to the individual entry’s first use flag not the multi-entry first use flag. (This is similar to passing preunset to each \gls but it’s also applied to any skipped elements.)

+

+unsetmain=booleandefault: true; initial: false
+ A boolean option to determine whether or not to unset the main entry’s first use flag before using \gls.

+

+unsetothers=booleandefault: true; initial: false
+ A boolean option to determine whether or not to unset the first use flag of all the other (not main) elements before using \gls.

+The reset… options all use:

+\mglselementreset{entry-label}
+ The unset… options all use:
+\mglselementunset{entry-label}
+ These take the presetlocal into account.

+An alternative way of resetting the other elements is to use:

+\mglsunsetothers{multi-label}
+ or for a local reset:
+\mglslocalunsetothers{multi-label}
+

+ +

+ +
+

7.11. Variants of \mgls

+

+The commands listed in this section all behave like \mgls. These (including \mgls itself) are collectively referred to as the \mgls-like commands. All commands unset the multi-entry first use flag (unless the multiunset=none option is applied). Only those commands that use the \gls-like commands (such as \gls or \glspl) will unset the individual entry’s first use flag.

+ +

+ +
+

7.11.1. \gls-like

+

+

+\mglspl[options]{multi-label}[insert]modifiers: * + alt-mod
+ This uses \glspl instead of \gls for each entry.

+

+\mglsmainpl[options]{multi-label}[insert]modifiers: * + alt-mod
+ This uses \glspl instead of \gls for the main entry and \gls for all the other entries.

+

+\Mgls[options]{multi-label}[insert]modifiers: * + alt-mod
+ This uses \Gls for the first entry and \gls for the other entries.

+

+\MGls[options]{multi-label}[insert]modifiers: * + alt-mod
+ This uses \Gls for all entries.

+

+\Mglspl[options]{multi-label}[insert]modifiers: * + alt-mod
+ This uses \Glspl for the first entry and \glspl for the remaining entries.

+

+\Mglsmainpl[options]{multi-label}[insert]modifiers: * + alt-mod
+ The first entry uses the appropriate sentence case command. The plural form is used for the main entry. So, if the first entry is also the main entry, \Glspl is used, otherwise \Gls is used. For the remaining entries, \glspl will be used if the entry is the main one, otherwise \gls will be used.

+

+\MGlspl[options]{multi-label}[insert]modifiers: * + alt-mod
+ This uses \Glspl for all entries.

+

+\MGlsmainpl[options]{multi-label}[insert]modifiers: * + alt-mod
+ This uses \Glspl for the main entry and \Gls for the other entries.

+

+\MGLS[options]{multi-label}[insert]modifiers: * + alt-mod
+ This uses \GLS for all entries.

+

+\MGLSpl[options]{multi-label}[insert]modifiers: * + alt-mod
+ This uses \GLSpl instead of \gls for each entry.

+

+\MGLSmainpl[options]{multi-label}[insert]modifiers: * + alt-mod
+ This uses \GLSpl for the main entry and \GLS for the others.

+ +

+ +
+

7.11.2. Abbreviations

+

+

+\mglsshort[options]{multi-label}[insert]modifiers: * + alt-mod
+ This will use \glsxtrshort for any entries that have the short field set and will use \glstext otherwise.

+

+\mglslong[options]{multi-label}[insert]modifiers: * + alt-mod
+ This will use \glsxtrlong for any entries that have the long field set and will use \glstext otherwise.

+

+\mglsfull[options]{multi-label}[insert]modifiers: * + alt-mod
+ This will use \glsxtrfull for any entries that have the short field set and will use \glsfirst otherwise.

+

+\Mglsshort[options]{multi-label}[insert]modifiers: * + alt-mod
+ As \mglsshort but sentence case for the first entry.

+

+\Mglslong[options]{multi-label}[insert]modifiers: * + alt-mod
+ As \mglslong but sentence case for the first entry.

+

+\Mglsfull[options]{multi-label}[insert]modifiers: * + alt-mod
+ As \mglsfull but sentence case for the first entry.

+ +

+ +
+

7.11.3. Other Fields

+

+

+\mglsname[options]{multi-label}[insert]modifiers: * + alt-mod
+ This uses \glsname for each entry.

+

+\Mglsname[options]{multi-label}[insert]modifiers: * + alt-mod
+ This uses \Glsname for the first entry and \glsname for the remaining entries.

+

+\MGlsname[options]{multi-label}[insert]modifiers: * + alt-mod
+ This uses \Glsname for each entry.

+

+\mglssymbol[options]{multi-label}[insert]modifiers: * + alt-mod
+ This uses \glssymbol for each entry if the symbol field has been set, otherwise it uses \gls.

+

+\MGlssymbol[options]{multi-label}[insert]modifiers: * + alt-mod
+ This uses \glssymbol if the symbol field has been set otherwise it uses \Gls for each element. (Note that no case change is applied to the symbol as this usually isn’t appropriate.)

+

+\Mglssymbol[options]{multi-label}[insert]modifiers: * + alt-mod
+ As \MGlssymbol, but \Gls is only used for the first element (if it doesn’t have the symbol field set).

+

+\mglsusefield[options]{multi-label}[insert]modifiers: * + alt-mod
+ If the field given by \mglsfield exists for an element, \glsdisp will be used for that element, with the link text obtained from the field value (followed by the insert), otherwise \gls will be used.

+

+\mglsfieldinitial: useri
+ This command expands to the internal field label required by \mglsusefield. The default value is useri, which corresponds to the user1 key.

+

+\Mglsusefield[options]{multi-label}[insert]modifiers: * + alt-mod
+ As \mglsusefield but sentence case for the first element.

+

+\MGlsusefield[options]{multi-label}[insert]modifiers: * + alt-mod
+ As \mglsusefield but sentence case for each element.

+You can use the pre-element hook \mglselementprehook to locally redefine \mglsfield. Examples: +

    +
  1. 1.if the multi-category is “sample” then use the user2 field otherwise use the user1 field:
    \renewcommand{\mglselementprehook}{%
    +  \ifdefstring{\mglscurrentcategory}{sample}%
    +  {\renewcommand{\mglsfield}{userii}}%
    +  {\renewcommand{\mglsfield}{useri}}%
     }
    -
    -

    -

    A multi-entry label may also be used in the alias key. The hyperlink target will be -the target for the main entry. For example: - - - -

    -
    -\multiglossaryentry{cbot}{clostridium,botulinum}
    -\newglossaryentry{botox}{name=botox,description={},alias={cbot}}
    -
    -

    In this case \gls{botox} will hyperlink to the botulinum target. -

    Any multi-entries used in the cross-referencing keys must be defined before the -glossary is displayed. There is some support for docdef=true but not for the other -docdef settings.
    -

    -

    -

    -

    Top

    6.13 Additional Commands

    -

    You can test if a label represents a multi-entry using: -


    \glsxtrifmulti{label}{true}{false}

    -

    -The following command will expand to the main entry label for the given multi-entry -label: -


    \glsxtrmultimain{multi-label}

    -

    -This will expand to nothing if the supplied ⟨multi-label⟩ hasn’t been defined as a -multi-entry. Similarly, for the complete label list: -


    \glsxtrmultilist{multi-label}

    -

    -

    To iterate over all the list of all elements: -


    \mglsforelements{multi-label}{cs}{body}

    -

    -This defines ⟨cs⟩ to the current element label on each iteration of the loop, which can -be used to reference the label in ⟨body⟩. This internally uses \@for (patched by the xfor -package). -

    There is a similar command that skips the main element: -


    \mglsforotherelements{multi-label}{cs}{body}

    -

    -

    The total number of elements can be obtained with: -


    \glsxtrmultitotalelements{multi-label}

    -

    -This expands to the number, if ⟨multi-label⟩ is defined, otherwise expands to -nothing. - - - -

    The index of the main element can be obtained with: -


    \glsxtrmultimainindex{multi-label}

    -

    -This expands to the index, if ⟨multi-label⟩ is defined, otherwise expands to nothing. -Indexing starts from 1 for the first element. The index of the final non-main element -can be obtained with: -


    \glsxtrmultilastotherindex{multi-label}

    -

    -

    The \multiglossaryentry command will write the label information to the aux -file using: -


    \writemultiglossentry{options}{multi-label}{main-label}{list} -

    -

    -This is will write the following line to the aux file: -


    \@glsxtr@multientry{options}{multi-label}{main-label}{list} -

    -

    -This is provided to support docdef=true and also for the benefit of any tools that -require the information (such as bib2gls or autocompletion tools). If it’s -not required and causes too much clutter, it can be disabled by redefining -\writemultiglossentry to do nothing. -

    -

    -

    Top

    6.14 bib2gls

    -

    In the bib2gls v2.9+ user manual, these multi-entry sets are referred to as -“compound entries” or “compound sets” to differentiate them from bib2gls’s -multi-entry types (such as @dualentry). -

    Each instance of one of the \mgls-like commands is written to the aux file and so -can be picked up by bib2gls (at least version 2.9). The resource options can be used -to determine whether or not to consider the other (non-main) elements to be -dependent on the main element. -

    With bib2gls, you can either define the compound entries in the document with -\multiglossaryentry (or \providemultiglossaryentry) or you can use the -@compoundset entry type in a bib file. Whichever method you use, remember that -the entries that form the elements of the set must be defined first. See the bib2gls -manual (v2.9+) for further details. -

    You can use the resource option compound-adjust-name to replace the name field -of the main entry to: -


    \glsxtrmultientryadjustedname{sublist1}{name}{sublist2}{label} -

    -

    -where ⟨label⟩ is the label identifying the compound set, ⟨name⟩ was the value of the - - - -name before adjustment, ⟨sublist1⟩ is the sub-list of other element labels before the -main element (empty if the main element is the first element in the list), and ⟨sublist2⟩ -is the sub-list of other elements after the main element (empty if the main label is the -final element). -

    This command is defined in glossaries-extra-bib2gls, which is automatically loaded -with record=only and record=nameref. Case-changing versions of this command are -also available. First letter uppercase: -


    \Glsxtrmultientryadjustedname{sublist1}{name}{sublist2}{label} -

    -

    -Title case: -


    \GlsXtrmultientryadjustedname{sublist1}{name}{sublist2}{label} -

    -

    -All uppercase: -


    \GLSxtrmultientryadjustedname{sublist1}{name}{sublist2}{label} -

    -

    -

    Note that this command doesn’t take the prefix or suffix into account (see -§6.3 Prefixes and Suffixes). -

    The separator between each element in the sub-lists is produced with: -


    \glsxtrmultientryadjustednamesep{pre label}{post label}

    -

    -The default definition just uses \glscombinedfirstsepfirst. -

    The separator between the last element of ⟨sublist1⟩ and the main element is -produced with: -


    \glsxtrmultientryadjustednamepresep{pre label}{post label} -

    -

    -Similarly for the separator between the main element and the first element of -⟨sublist2⟩: -


    \glsxtrmultientryadjustednamepostsep{pre label}{post label} -

    -

    -These both default to \glsxtrmultientryadjustednamesep. -

    The ⟨name⟩ is encapsulated with: -


    \glsxtrmultientryadjustednamefmt{text}

    -

    -This just does its argument by default. If ⟨sublist1⟩ is empty for the first letter upper -case version, then ⟨name⟩ is encapsulated with: -


    \Glsxtrmultientryadjustednamefmt{text}

    -

    -This does \makefirstuc{text} by default. For the title case version, the name is -encapsulated with: -


    \GlsXtrmultientryadjustednamefmt{text}

    - - - -

    -This uses \glscapitalisewords (provided by glossaries v4.48+) if defined or -\capitalisewords otherwise. The all uppercase version uses: -


    \GLSxtrmultientryadjustednamefmt{text}

    -

    -This uses \mfirstucMakeUppercase by default. -

    Each element label in the sub-lists is encapsulated with: -


    \glsxtrmultientryadjustednameother{label}

    -

    -This does \glsentryname{label} by default. For the first letter uppercase -version (where ⟨sublist1⟩ isn’t empty), then the element label is encapsulated -with: -


    \Glsxtrmultientryadjustednameother{label}

    -

    -This does \Glsentryname{label} by default. The title case version uses: -


    \GlsXtrmultientryadjustednameother{label}

    -

    -This does \glsentrytitlecase{label}{name} by default. The all uppercase version -uses: -


    \GLSxtrmultientryadjustednameother{label}

    -

    -This is defined as: - - - -

    -
    -\newcommand*{\GLSxtrmultientryadjustednameother}[1]{%
    - \mfirstucMakeUppercase{\glsentryname{#1}}}
    -
    -

    - - - -

    -

-

Top

7. Categories

-

Each entry defined by \newglossaryentry (or commands that internally use it -such as \newabbreviation) is assigned a category through the 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 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 category with type. -

For multi-entry categories, see §6.8 Multi-Entry Category. -

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

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

You can obtain the category label for a given entry using -


\glscategory{label}

-

-This is equivalent to commands like \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 -


\glsifcategory{entry-label}{category-label}{true part}{false part} -

-

-This is equivalent to

-
-\ifglsfieldeq{entry-label}{category}{category-label}{true -
part}{false part} -
-
so any restrictions that apply to \ifglsfieldeq also apply to \glsifcategory. -

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

Other attributes recognised by glossaries-extra are: -

- - - -nohyperfirst
When using commands like \gls this will automatically suppress the - hyperlink on first use for entries with a category that has this attribute set to - “true”. (This settings can be overridden by explicitly setting the hyper - key on or off in the optional argument of commands like \gls.) As - from version 1.07, \glsfirst, \Glsfirst, \GLSfirst and their plural - versions (which should ideally behave in a similar way to the first use of - \gls or \glspl) now honour this attribute (but not the package-wide - hyperfirst=false option, which matches the behaviour of glossaries). If you want - commands like \glsfirst to ignore the nohyperfirst attribute then just - redefine -


\glsxtrchecknohyperfirst{label}

-

- to do nothing. -

-nohyper
When using commands like \gls this will automatically suppress the - hyperlink for entries with a category that has this attribute set to “true”. (This - settings can be overridden by explicitly setting the hyper key on or off in the - optional argument of commands like \gls.) -
-indexonlyfirst
This is similar to the indexonlyfirst package option but only for entries - that have a category with this attribute set to “true”. -
-wrgloss
When using commands like \gls, if this attribute is set to “after”, it will - automatically implement wrgloss=after. (New to v1.14.) -
-discardperiod
If set to “true”, the post-link-text hook will discard a full stop - (period) that follows non-plural commands like \gls or \glstext. (Provided - for entries such as abbreviations that end with a full stop.) This attribute is - only applicable to entries defined using \newabbreviation (or \newacronym if - it’s using \newabbreviation.) This attribute doesn’t apply to the accessibility - fields. -

Note that this can cause a problem if you access a field that doesn’t end with a - full stop. For example: - - - -

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

Here the short and long fields end with a full stop, but the user1 field doesn’t. - The simplest solution in this situation is to put the sentence terminator in the - final optional argument. For example: - - - -

-
-     \glsuseri{dante}[.]
-
-

This will bring the punctuation character inside the link-text and it won’t be - discarded. -

-pluraldiscardperiod
If this attribute is set to “true” and the discardperiod attribute is - set to “true”, this will behave as above for the plural commands like \glspl or - \glsplural. This attribute is only applicable to entries defined using - \newabbreviation (or \newacronym if it’s using \newabbreviation.) -
-retainfirstuseperiod
If this attribute is set to “true” then the full stop won’t be - discarded for first use instances, even if discardperiod or pluraldiscardperiod are - set. This is useful for ⟨short⟩ (⟨long⟩) abbreviation styles where only the - short form has a trailing full stop. This attribute is only applicable to - entries defined using \newabbreviation (or \newacronym if it’s using - \newabbreviation.) This attribute doesn’t apply to the accessibility - fields. -
-markwords
If this attribute is set to “true” any entry defined using \newabbreviation - will automatically have spaces in the long form replaced with -


\glsxtrwordsep

-

- and each word is encapsulated with -


\glsxtrword{word}

-

- For example: - - - -

-
-     \glssetcategoryattribute{abbreviation}{markwords}{true}
-     \newabbreviation{ip}{IP}{Internet Protocol}
-
-

is essentially the same as - - - -

-
-     \newabbreviation{ip}{IP}
-     {\glsxtrword{Internet}\glsxtrwordsep\glsxtrword{Protocol}}
-
-

The “hyphen” styles, such as long-hyphen-short-hyphen, take advantage of this - markup. If the inserted material (provided in the final argument of commands - like \gls) starts with a hyphen then \glsxtrwordsep is locally redefined to a - hyphen. (The default value is a space). Note that this only applies to - commands like \gls and not like \glsxtrlong. You can provide your own - localised switch, if required. For example: - - - -

-
-     \newcommand{\hyplong}[2][]{%
-      {\def\glsxtrwordsep{-}\glsxtrlong[#1]{#2}}}
-
-

-

This setting will also adjust the long plural. This attribute is only applicable to - entries defined using \newabbreviation (or \newacronym if it’s using - \newabbreviation.) -

This setting may result in the \glsxtrword and \glsxtrwordsep markup - ending up in the sort field, depending on the style in use.
-

-

-markshortwords
This is similar to markwords but applies to the short form. (Only - useful for abbreviations that contain spaces.) This attribute is only applicable - to entries defined using \newabbreviation (or \newacronym if it’s using - \newabbreviation.) -

This setting will only adjust the short plural if the shortplural key isn’t used. - This setting will take precedence over insertdots. -

This setting may result in the \glsxtrword and \glsxtrwordsep markup - ending up in the sort field, depending on the style in use.
-

-

-insertdots
If this attribute is set to “true” any entry defined using \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 - ⟨short⟩ argument of \newabbreviation (rather than inserting them every time - the entry is used). The short plural form defaults to the new dotted version of - the original ⟨short⟩ form with the plural suffix appended. This setting is - incompatible with markshortwords. This attribute is only applicable to - entries defined using \newabbreviation (or \newacronym if it’s using - \newabbreviation.) -

If you explicitly override the short plural using the 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). -
-

- - - -

This attribute is best used with the discardperiod attribute set to “true”. -

-aposplural
If this attribute is set to “true”, \newabbreviation will insert an - apostrophe (’) before the plural suffix for the short plural form (unless - explicitly overridden with the shortplural key). The long plural form is - unaffected by this setting. This setting overrides noshortplural. This - attribute is only applicable to entries defined using \newabbreviation (or - \newacronym if it’s using \newabbreviation.) Check with your supervisor, - publisher or editor if you want to use this attribute as this usage is - controversial. -
-noshortplural
If this attribute is set to “true”, \newabbreviation won’t append - the plural suffix for the short plural form. This means the short and - shortplural values will be the same unless explicitly overridden. This setting - is incompatible with aposplural. This attribute is only applicable to - entries defined using \newabbreviation (or \newacronym if it’s using - \newabbreviation.) -
-headuc
If this attribute is set to “true”, commands like \glsfmtshort will use the - upper case version in the page headers. -
-tagging
If this attribute is set to “true”, the tagging command defined by - \GlsXtrEnableInitialTagging will be activated to use \glsxtrtagfont in - the glossary (see §4.1 Tagging Initials). -
-entrycount
Unlike the above attributes, this attribute isn’t boolean but instead must - be an integer value and is used in combination with \glsenableentrycount - (see §2.5 Entry Counting Modifications). Leave blank or - undefined for categories that shouldn’t have this facility enabled. The value of - this attribute is used by \glsxtrifcounttrigger to determine how commands - such as \cgls should behave. -

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

-linkcount
This attribute is set to true by \GlsXtrEnableLinkCounting (see - §8.2 Link Counting). -
-linkcountmaster
This attribute is set to the name of the master counter by - - - - \GlsXtrEnableLinkCounting if the optional argument is provided (see - §8.2 Link Counting). -
-glossdesc
The \glossentrydesc command (used in the predefined glossary styles) is - modified by glossaries-extra to check for this attribute. The attribute may have - one of the following values: -
    -
  • firstuc: the first letter of the description will be converted to upper - case (using \Glsentrydesc). -
  • -
  • title: the description will be used in the argument of the title - casing command. If you have at least glossaries v4.48, the title - casing is indirectly performed by \glscapitalisewords, which - defaults to \capitalisewords (provided by mfirstuc). You can either - redefine \glscapitalisewords if you want the change to also affect - \glsentrytitlecase or if you only want the change to apply to the - attribute case-changing then redefine: -


    \glsxtrfieldtitlecasecs{phrase cs}

    -

    - For example: - - - -

    -
    -         \newcommand*{\glsxtrfieldtitlecasecs}[1]{\xcapitalisefmtwords*{#1}}
    -
    -

    (Note that the argument to \glsxtrfieldtitlecasecs will be a control - sequence whose replacement text is the entry’s description, which is why - \xcapitalisefmtwords is needed instead of \capitalisefmtwords.) -

    -
-

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 mfirstuc user manual for further details. -

-glossdescfont
(New to version 1.04) In addition to the above, the modified - \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: - - - -
-     \glssetcategoryattribute{general}{glossdescfont}{emph}
-
-

-

-glossname
As glossdesc but applies to \glossentryname. Additionally, if this - attribute is set to “uc” the name is converted to all capitals. -
-indexname
If set, the \glsxtrpostnamehook hook used at the end of \glossentryname - will index the entry using \index. See §9 Auto-Indexing for - further details. -
-glossnamefont
(New to version 1.04) In addition to the above, the modified - \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: - - - -
-     \glssetcategoryattribute{general}{glossnamefont}{emph}
-
-

Note that this overrides \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 - \item. -

-glosssymbolfont
(New to version 1.42.) This is similar to glossnamefont and - glossdescfont but is used by \glossentrysymbol. -
-textformat
(New to version 1.21.) Commands like \gls and \glstext have the link - text encapsulated in the argument of \glstextformat by default. If this - attribute is set, the control sequence given by the attribute value will be used - instead. As with the above, the attribute value should be the name (without - the leading backslash) of a command that takes a single argument (the link - text). Remember that the abbreviation styles may apply an additional font - change. -
-hyperoutside
(New to v1.21.) The attribute value may be false, true or unset. If - unset, true is assumed. This indicates the default setting of the hyperoutside - key, described in §2.2 Entry Indexing. -
-dualindex
If set, whenever a glossary entry has information written to the external - glossary file through commands like \gls and \glsadd, a corresponding line - will be written to the indexing file using \index. See §9 - Auto-Indexing for further details. -
-targeturl
If set, the hyperlink generated by commands like \gls will be set to the - URL provided by this attributes value. For example: - - - -
-     \glssetcategoryattribute{general}{targeturl}{master-doc.pdf}
-
-

(See also the accompanying sample file sample-external.tex.) If the URL - contains awkward characters (such as % or ~) remember that the base glossaries - package provides commands like \glspercentchar and \glstildechar that - expand to literal characters. -

If you want to a named anchor within the target URL (notionally adding - #name⟩ to the URL), then you also need to set targetname to the anchor ⟨name⟩. - You may use \glslabel within ⟨name⟩ which is set by commands like \gls to - the entry’s label. -

All the predefined glossary styles start each entry listing with \glstarget - which sets the anchor to \glolinkprefix\glslabel, so if you want - entries to link to glossaries in the URL given by targeturl, you can just - do: - - - -

-
-     \glssetcategoryattribute{general}{targetname}{\glolinkprefix\glslabel}
-
-

(If the target document changed \glolinkprefix then you will need to adjust - the above as appropriate.) -

If the anchor is in the form ⟨name1.name2⟩ then use targetname for the ⟨name2⟩ - part and targetcategory for the ⟨name1⟩ part. -

For example: - - - -

-
-     \glssetcategoryattribute{general}{targeturl}{master-doc.pdf}
-     \glssetcategoryattribute{general}{targetcategory}{page}
-     \glssetcategoryattribute{general}{targetname}{7}
-
-

will cause all link text for general entries to link to 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 \newignoredglossary for the external list. For - example: - - - -

-
-     \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}}
-
-

-

-externallocation
The value should be the file name of the target document when - manually indexing an external location (see §2.2 Entry Indexing). - In general, it’s better to use bib2gls v1.7+ which can handle multiple external - sources and doesn’t require this attribute. -
-

If a term is defined using \newabbreviation and accessibility support has been -supplied via the accsupp package option then the following attributes are also -available. If shortaccess isn’t set its value will be obtained from: -


\glsdefaultshortaccess{short}{long}

-

-This is defined by glossaries-accsupp to just do ⟨long⟩ but glossaries-extra redefines it to -do ⟨long⟩ (⟨short⟩). The accessinsertdots, accessaposplural and accessnoshortplural -attributes below refer to the ⟨short⟩ form that’s passed to this command. -

The following attributes are only applicable to entries defined using -\newabbreviation (or \newacronym if it’s using \newabbreviation). They have no -effect if the accsupp package option hasn’t been used. -

-accessinsertdots
If this attribute is set to “true” and the glossaries-accsupp - package has been loaded (with the accsupp option), then this behaves - like insertdots but for the ⟨short⟩ part used in the shortaccess field instead - of the short field. This setting will be overridden by an explicit use of - the shortaccess key in the optional argument of \newabbreviation (or - \newacronym). -
-accessaposplural
This boolean attribute overrides aposplural for - - - - the shortpluralaccess key. Has no effect if there’s no accessibility support - or if the shortaccess key hasn’t been set or if the shortpluralaccess key - is explicitly set. If the aposplural is set and this attribute isn’t set and - the shortaccess key is set, then the aposplural setting governs the default - shortpluralaccess setting. If you want aposplural but don’t want it applied to - the accessibility support, set the accessaposplural attribute to “false”. This - attribute is only applicable to entries defined using \newabbreviation (or - \newacronym if it’s using \newabbreviation.) -
-accessnoshortplural
- This boolean attribute overrides noshortplural for the shortpluralaccess key. - The same conditions apply as for accessaposplural. This attribute is only - applicable to entries defined using \newabbreviation (or \newacronym if - it’s using \newabbreviation.) -
-nameshortaccess
If this attribute is set to “true”, the access field (used for - the name field’s accessibility support) automatically assigned if it’s not - provided. -
-textshortaccess
Like nameshortaccess but applies to the textaccess field - automatically assigned if it’s not provided. -
-firstshortaccess
Like nameshortaccess but applies to the firstaccess field - automatically assigned if it’s not provided. -
-combinedfirstsep
The separator to use for \glscombinefirstsep. -
-combinedfirstsepfirst
The separator to use for \glscombinedfirstsepfirst. -
-combinedsepfirst
The separator to use for \glscombinesepfirst. -
-combinedsep
The separator to use for \glscombinedsep. -
-

An attribute can be set using: -


\glssetcategoryattribute{category-label}{attribute-label}{value} -

-

-where ⟨category-label⟩ is the category label, ⟨attribute-label⟩ is the attribute label -and ⟨value⟩ is the new value for the attribute. This will be localised to the - - - -current scope. If you want a global definition use the following command -instead. -

If you want to apply the same attribute to multiple categories then use: -


\glssetcategoriesattribute{category-label list}{attribute-label} -{value}

-

-This has a global effect. -

If you also want to set multiple attributes to the same value, then you can -use: -


\glssetcategoriesattributes{category-label list}{attribute-label -list}{value}

-

-This has a global effect. -

For example: - - - -

-
-\newcommand{\latinname}[1]{\emph{#1}}
-\glssetcategoriesattributes{genus,species}{textformat,glossnamefont}{latinname}
-
-

-

There is a shortcut version to set the regular attribute to “true”: -


\glssetregularcategory{category-label}

-

-This internally uses \glssetcategoryattribute so it has a local effect. -

If you need to lookup the category label for a particular entry, you can use the -shortcut command: -


\glssetattribute{entry-label}{attribute-label}{value}

-

-This uses \glssetcategoryattribute with \glscategory to set the attribute. Note -that this will affect all other entries that share this entry’s category. -

The above use local assignments so they can be placed inside a group to limit -their definition. As from v1.47, the value can be unset using: -


\glsunsetcategoryattribute{category-label}{attribute-label} -

-

-

You can fetch the value of an attribute for a particular category using: -


\glsgetcategoryattribute{category-label}{attribute-label} -

-

-Again there is a shortcut if you need to lookup the category label for a given -entry: -


\glsgetattribute{entry-label}{attribute-label}

-

-

You can test if an attribute has been assigned to a given category using: -


\glshascategoryattribute{category-label}{attribute-label}{true -code}{false code}

-

-This uses etoolbox’s \ifcsvoid and does ⟨true code⟩ if the attribute has been set and -isn’t blank and isn’t \relax. The shortcut if you need to lookup the category label -from an entry is: -


\glshasattribute{entry-label}{attribute-label}{true code}{false -code}

-

-

You can test the value of an attribute for a particular category using: - - - -


\glsifcategoryattribute{category-label}{attribute-label}{value} -{true-part}{false-part}

-

-This tests if the attribute (given by ⟨attribute-label⟩) for the category (given by -⟨category-label⟩) is set and equal to ⟨value⟩. If true, ⟨true-part⟩ is done. If the attribute -isn’t set or is set but isn’t equal to ⟨value⟩, ⟨false part⟩ is done. -

For example: - - - -

-
-\glsifcategoryattribute{general}{nohyper}{true}{NO HYPER}{HYPER}
-
-

This does “NO HYPER” if the general category has the nohyper attribute set to -true otherwise if does “HYPER”. -

With boolean-style attributes like nohyper, make sure you always test for true -not 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: -


\glsifattribute{entry-label}{attribute-label}{value}{true-part} -{false-part}

-

-

There’s also a shortcut to determine if a particular category has the regular -attribute set to “true”: -


\glsifregularcategory{category-label}{true-part}{false-part} -

-

-Alternatively, if you need to lookup the category for a particular entry: -


\glsifregular{entry-label}{true-part}{false-part}

-

-Note that if the regular attribute hasn’t be set, the above do ⟨false-part⟩. There -are also reverse commands that test if the regular attribute has been set to -“false”: -


\glsifnotregularcategory{category-label}{true-part}{false-part} -

-

-or for a particular entry: -


\glsifnotregular{entry-label}{true-part}{false-part}

-

-Again, if the regular attribute hasn’t been set, the above do ⟨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: -


\glsforeachincategory[glossary-labels]{category-label} {glossary-cs} -{label-cs}{body}

-

-This iterates through all entries in the glossaries identified by the comma-separated -list ⟨glossary-labels⟩ that have the category given by ⟨category-label⟩ and performs ⟨body⟩ -for each match. Within ⟨body⟩, you can use ⟨glossary-cs⟩ and ⟨label-cs⟩ (which much be -control sequences) to access the current glossary and entry label. If ⟨glossary-labels⟩ is -omitted, all glossaries are assumed. -

Similarly, you can iterate through all entries that have a category with a given -attribute using: - - - -


\glsforeachwithattribute[glossary-labels]{attribute-label} -{attribute-value}{glossary-cs}{label-cs}{body}

-

-This will do ⟨body⟩ for each entry that has a category with the attribute ⟨attribute-label⟩ -set to ⟨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 \glsfielddef. Alternatively, you can -use -


\glsxtrsetcategory{entry-labels}{category-label}

-

-This will change the category to ⟨category-label⟩ for each entry listed in the -comma-separated list ⟨entry-labels⟩. This command uses \glsfieldxdef so it will -expand ⟨category-label⟩ and make the change global. -

You can also change the category for all entries with a glossary or glossaries -using: -


\glsxtrsetcategoryforall{glossary-labels}{category-label} -

-

-where ⟨glossary-labels⟩ is a comma-separated list of glossary labels. - - - -

-

-

Top

8. Counting References

-

There are three basic ways of counting entry references: -

    -
  1. Counting the total number of times \glsunset is used (\glsreset resets - the count and is best avoided). This is provided by the base glossaries - package and is intended for documents where the term should be displayed - differently if it’s only been used a certain number of times. The information - has to be written to the .aux file so that it’s available on the next - LaTeX run. -

    This method is extended by glossaries-extra and is described in - §8.1 Entry Counting (First Use Flag). -

  2. -
  3. Counting the total number of records. This method is only available with - bib2gls and is intended for documents where the term should be displayed - differently if it’s only been recorded (indexed) a certain number of times. - See §10.5 Record Counting for further details. -
  4. -
  5. Counting the number of times the \gls-like or \glstext-like - commands are used. (That is, those commands that internally use - \@gls@link.) Unlike the other two methods, this just provides a - running total rather than the total from the previous LaTeX run. - This method is intended to make it more convenient to work with - hooks like \glslinkcheckfirsthyperhook, \glslinkpostsetkeys or - \glslinkpresetkeys. See §8.2 Link Counting for further - details.
-

Top

8.1 Entry Counting (First Use Flag)

-

As mentioned in §2.5 Entry Counting Modifications, glossaries-extra -modifies the \glsenableentrycount command to allow for the entrycount -attribute. This means that you not only need to enable entry counting with -\glsenableentrycount, but you also need to set the appropriate attribute (see -§7 Categories). -

Remember that entry counting only counts the number of times an entry is used -by commands that change the first use flag. (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. -
-

-

With glossaries-extra, you may use \cgls instead of \gls even if you haven’t enabled -entry counting. You will only get a warning if you use \glsenableentrycount - - - -without setting the entrycount attribute. (With glossaries, commands like \cgls will -generate a warning if \glsenableentrycount hasn’t been used.) The abbreviation -shortcut \ab uses \cgls (see §4.3 Shortcut Commands). The -acronym shortcut \ac uses \cgls if it’s been defined with shortcuts=ac (or -shortcuts=all) but uses \gls if it’s been defined with shortcuts=acronyms (or -shortcuts=acro). -

All upper case versions (not provided by glossaries) are also available: -


\cGLS[options]{label}[insert]

-

-and -


\cGLSpl[options]{label}[insert]

-

-These are analogous to \cgls and \cglspl but they use -


\cGLSformat{label}{insert}

-

-and -


\cGLSplformat{label}{insert}

-

-which convert the analogous \cglsformat and \cglsplformat to upper -case. -

Just using glossaries: - - - -

-
-\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}
-
-

-

If you switch to glossaries-extra you must set the entrycount attribute: - - - -

-
-\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}
-
-

-

When activated with \glsenableentrycount, commands such as \cgls now -use -


\glsxtrifcounttrigger{label}{trigger code}{normal code}

-

-to determine if the entry trips the entry count trigger. The ⟨trigger code⟩ uses -commands like \cglsformat and unsets the first use flag. The ⟨normal code⟩ is the -code that would ordinarily be performed by whatever the equivalent command is (for -example, \cgls will use \cglsformat in ⟨trigger code⟩ but the usual \gls behaviour in -⟨normal code⟩). -

The default definition is: - - - -

-
-\newcommand*{\glsxtrifcounttrigger}[3]{%
- \glshasattribute{#1}{entrycount}%
- {%
-   \ifnum\glsentryprevcount{#1}>\glsgetattribute{#1}{entrycount}\relax
-    #3%
-   \else
-    #2%
-   \fi
- }%
- {#3}%
+

+

  • 2.if the element’s category is “sample” then use the user2 field otherwise use the user1 field:
    \renewcommand{\mglselementprehook}{%
    +  \glsifcategory{\mglscurrentlabel}{sample}%
    +  {\renewcommand{\mglsfield}{userii}}%
    +  {\renewcommand{\mglsfield}{useri}}%
     }
    -
    -

    This means that if an entry is assigned to a category that has the entrycount -attribute then the ⟨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: - - - -

    -
    -\glssetcategoryattribute{abbreviation}{entrycount}{4}
    -
    -

    -

    There is a convenient command provided to enable entry counting, set the -entrycount attribute and redefine \gls, etc to use \cgls etc: -


    \GlsXtrEnableEntryCounting{categories}{value}

    -

    -The first argument ⟨categories⟩ is a comma-separated list of categories. For each -category, the entrycount attribute is set to ⟨value⟩. In addition, this does: - - - -

    -
    -\renewcommand*{\gls}{\cgls}%
    -\renewcommand*{\Gls}{\cGls}%
    -\renewcommand*{\glspl}{\cglspl}%
    -\renewcommand*{\Glspl}{\cGlspl}%
    -\renewcommand*{\GLS}{\cGLS}%
    -\renewcommand*{\GLSpl}{\cGLSpl}%
    -
    -

    This makes it easier to enable entry-counting on existing documents. -

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

    The above example document can then become: - - - -

    -
    -\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}
    -
    -

    -

    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 -


    \GlsXtrEnableEntryUnitCounting{categories}{value}{counter-name} -

    -

    -where ⟨categories⟩ is a comma-separated list of categories to which this feature should -be applied, ⟨value⟩ is the trigger value and ⟨counter-name⟩ is the name of the counter -used by the sectional unit. -

    Due to the asynchronous nature of TeX’s output routine, discrepancies will occur -in page spanning paragraphs if you use the page counter.
    -

    -

    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 \thecounter-name⟩ -needs to be expandable. Since hyperref also has a similar requirement and provides -\theHcounter-name⟩ as an expandable alternative, glossaries-extra will use -\theHcounter-name⟩ if it exists otherwise it will use \thecounter-name⟩. -

    The per-unit counting function uses two attributes: entrycount (as before) and - - - -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: -


    \glsentrycurrcount{label}

    -

    -and the final value from the previous run: -


    \glsentryprevcount{label}

    -

    -In the case of the per-unit counting, this is the final value for the current unit. In -both commands ⟨label⟩ is the entry’s label. -

    The per-unit counting mechanism additionally provides: -


    \glsentryprevtotalcount{label}

    -

    -which gives the sum of all the per-unit totals from the previous run for the entry -given by ⟨label⟩, and -


    \glsentryprevmaxcount{label}

    -

    -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: - - - -

    -
    -\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}
    -
    -

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

    The 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 sample entry has only been used once, but it doesn’t trip the indexing -suppression because it’s in the general category, which hasn’t been listed in -\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 \gls by modifying the hook -


    \glslinkcheckfirsthyperhook

    -

    -which is used at the end of the macro the determines whether or not to suppress the -hyperlink. - - - -

    -
    -\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
    +

    +

  • 3.if either the multi-entry’s category or the element’s category has the custom attribute “mglsfield” set then use it otherwise use the user1 field:
    \renewcommand{\mglselementprehook}{%
    + \glshascategoryattribute{\mglscurrentcategory}{mglsfield}%
    + {\renewcommand{\mglsfield}{\glsgetcategoryattribute{\mglscurrentcategory}{mglsfield}}}%
    + {%
    +   \glshasattribute{\mglscurrentlabel}{mglsfield}%
    +   {\renewcommand{\mglsfield}{\glsgetattribute{\mglscurrentlabel}{mglsfield}}}%
    +   {\renewcommand{\mglsfield}{useri}}%
    + }%
     }
    -\begin{document}
    -A \gls{sample} entry.
    -Next use: \gls{sample}.
    -\newpage
    -Next page: \gls{sample}.
    -Again: \gls{sample}.
    -\printglossaries
    -\end{document}
    -
    -

    This only produces a hyperlink for the first instance of \gls{sample} on each -page. -

    The earlier warning about using the page counter still applies. If the -first instance of \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. -

    -

    -

    Top

    8.2 Link Counting

    -

    As from version 1.26, an alternative method of entry counting is to count the number - - - -of times the \gls-like or \glstext-like commands are used. (The “link” in this -method’s name refers to the use of the internal command \@gls@link not to -\hyperlink although \@gls@link may use \hyperlink when displaying the -link-text.) -

    To enable link counting use the preamble-only command: -


    \GlsXtrEnableLinkCounting[master counter]{categories}

    -

    -where ⟨categories⟩ is a list of category labels. The optional argument ⟨master -counter⟩ may be used to identify a master counter (which must be defined). If -present, the associated link counter will be reset when the master counter is -incremented. This command automatically sets the linkcount attribute for the given -categories. If the optional argument is present, it also sets the linkcountmaster -attribute. -

    When enabled, commands like \gls and \glstext increment the associated -counter using -


    \glsxtrinclinkcounter{counter name}

    -

    -This just does \stepcounter{counter name} by default but if you need -\refstepcounter instead, just redefine this command: - - - -

    -
    -\renewcommand*{\glsxtrinclinkcounter}[1]{\refstepcounter{#1}}
    -
    -

    -

    You can access the internal count register using -


    \GlsXtrLinkCounterValue{label}

    -

    -where ⟨label⟩ is the entry’s label. This will expand to 0 if the counter hasn’t been -defined. -

    It’s also possible to access the display value (\thecounter⟩) using -


    \GlsXtrTheLinkCounter{counter}

    -

    -(This will expand to 0 if the counter hasn’t been defined.) -

    In order to conserve resources, the counter is only defined when it first -needs to be incremented so terms that have been defined but haven’t been -used in the document won’t have the associated count register allocated. -
    -

    -

    You can test if the counter has been defined using: -


    \GlsXtrIfLinkCounterDef{label}{true}{false}

    -

    -where ⟨label⟩ is the entry’s label. -

    The counter name can be obtained using -


    \GlsXtrLinkCounterName{label}

    -

    -This simply expands to the counter name associated with the entry given by ⟨label⟩ -without any check for existence. For example, to change the display command -(\thecounter⟩) using etoolbox: - - - -

    -
    -\csdef{the\GlsXtrLinkCounterName{duck}}{\Roman{\GlsXtrLinkCounterName{duck}}}
    -
    -

    This is useful if you just want to change the display for specific entries but isn’t -convenient if you want to change the display for all entries. Instead, it’s simpler to -redefine \GlsXtrTheLinkCounter. For example: - - - -

    -
    -\renewcommand*{\GlsXtrTheLinkCounter}[1]{%
    - \GlsXtrIfLinkCounterDef{#1}%
    - {\Roman{\GlsXtrLinkCounterName{#1}}}%
    - {0}%
    +
    + +

    + + + +

    +

    7.11.4. Support for glossaries-prefix (\pgls)

    +

    +If you load the glossaries-prefix package (either after glossaries-extra) or with the prefix package option, then the following commands will use one of the \pgls-like commands provided by that package. (See the glossaries user manual for further details.)

    +If the glossaries-prefix package hasn’t been loaded then \gls (or analogous case-changing variant) will be used instead and a warning is issued with:

    +\mpglsWarning
    + This may be redefined to do nothing to remove the warning.

    +

    +\mpgls[options]{multi-label}[insert]modifiers: * + alt-mod
    + Uses \pgls for the first element and \gls for the remaining elements.

    +

    +\mpglspl[options]{multi-label}[insert]modifiers: * + alt-mod
    + Uses \pglspl for the first element and \glspl for the remaining elements.

    +

    +\mpglsmainpl[options]{multi-label}[insert]modifiers: * + alt-mod
    + Only uses the plural form for the main element. The first element uses the prefixing command (\pgls or \pglspl, depending on whether the first element is the main element).

    +

    +\Mpgls[options]{multi-label}[insert]modifiers: * + alt-mod
    + Uses \Pgls for the first element and \gls for the remaining elements.

    +

    +\Mpglsmainpl[options]{multi-label}[insert]modifiers: * + alt-mod
    + Only uses the plural form for the main element. The first element uses the sentence case prefixing command (\Pgls or \Pglspl, depending on whether the first element is the main element).

    +

    +\MPGls[options]{multi-label}[insert]modifiers: * + alt-mod
    + Uses \Pgls for the first element and \Gls for the remaining elements.

    +

    +\MPGlspl[options]{multi-label}[insert]modifiers: * + alt-mod
    + Uses \Pglspl for the first element and \Glspl for the remaining elements.

    +

    +\MPGlsmainpl[options]{multi-label}[insert]modifiers: * + alt-mod
    + Only uses the plural form for the main element. The first element uses the prefixing command (\Pgls or \Pglspl, depending on whether the first element is the main element). All elements are use sentence case.

    +

    +\MPGLS[options]{multi-label}[insert]modifiers: * + alt-mod
    + Uses \PGLS for the first element and \GLS for the remaining elements.

    +

    +\MPGLSpl[options]{multi-label}[insert]modifiers: * + alt-mod
    + Uses \PGLSpl for the first element and \GLSpl for the remaining elements.

    +

    +\MPGLSmainpl[options]{multi-label}[insert]modifiers: * + alt-mod
    + Only uses the plural form for the main element. All elements are converted to all caps. The first element uses the prefixing command (\PGLS or \PGLSpl, depending on whether the first element is the main element).

    + +

    + +
    +

    7.12. Cross-References

    +

    +Multi-entry labels may be used in the cross-referencing keys see and seealso. The formatting command will use:

    +\mglsseefirstitem{multi-label}
    + for the first item in the list (if it’s a multi-entry) and
    +\mglsseeitem{multi-label}
    + for any subsequent items that are multi-entries. The default definition of \mglsseeitem is:
    \newcommand*{\mglsseeitem}[1]{%
    + \mglsname[all=noindex,setup={hyper=allmain}]{#1}%
    +} 
    +
    This switches off indexing, sets the hyperlink to encompass the entire multi-entry content and uses the name field. The default definition of \mglsseefirstitem is simply \mglsseeitem.

    +For example, to use the short or text fields:

    \renewcommand*{\mglsseeitem}[1]{%
    + \mglsshort[all=noindex,setup={hyper=allmain}]{#1}%
    +} 
    +

    +A multi-entry label may also be used in the alias key. The hyperlink target will be the target for the main entry. For example:

    \multiglossaryentry{cbot}{clostridium,botulinum}
    +\newglossaryentry{botox}{name={botox},description={},alias={cbot}}
    +
    In this case \gls{botox} will hyperlink to the botulinum target.

    +

    +Any multi-entries used in the cross-referencing keys must be defined before the glossary is displayed. There is some support for docdef=true but not for the other docdef settings.
    +

    + +

    + +
    +

    7.13. Additional Commands

    +

    +You can test if a label represents a multi-entry using:

    +\glsxtrifmulti{multi-label}{true}{false}
    + This does true if a multi-entry has been defined with the label multi-label otherwise it does false.

    +

    +\glsxtrmultimain{multi-label}
    + Expands to the main entry label for the multi-entry identified by multi-label or nothing if not defined.

    +

    +\glsxtrmultilist{multi-label}
    + Expands to the list of element labels for the multi-entry identified by multi-label or nothing if not defined.

    +

    +\mglsforelements{multi-label}{cs}{body}
    + Iterates over all the list of element labels for the multi-entry identified by multi-label. This defines cs to the current element label on each iteration of the loop, which can be used to reference the label in body. This internally uses \@for (patched by the xfor package, which allows the loop to be broken).

    +

    +\mglsforotherelements{multi-label}{cs}{body}
    + As \mglsforelements but skips the main entry label.

    +

    +\glsxtrmultitotalelements{multi-label}
    + Expands to the total number of elements in the given multi-entry or nothing if multi-label hasn’t been defined.

    +

    +\glsxtrmultimainindex{multi-label}
    + Expands to the index of the main element in the given multi-entry or nothing if multi-label hasn’t been defined. Indexing starts from 1 for the first element.

    +

    +\glsxtrmultilastotherindex{multi-label}
    + Expands to the index of the final non-main element in the given multi-entry or nothing if multi-label hasn’t been defined.

    +The \multiglossaryentry command will write the label information to the aux file using:

    +\writemultiglossentry{options}{multi-label}{main-label}{list}
    + This is will write the following line to the aux file:
    +\@glsxtr@multientry{options}{multi-label}{main-label}{list}
    + This is provided to support docdef=true and also for the benefit of any tools that require the information (such as bib2gls or autocompletion tools). If it’s not required and causes too much clutter, it can be disabled by redefining \writemultiglossentry to do nothing.

    + +

    + +
    +

    7.14. bib2gls

    +

    +In the bib2gls v2.9+ user manual, these multi-entry sets are referred to as “compound entries” or “compound sets” to differentiate them from bib2gls’s multi-entry types (such as @dualentry).

    +Each instance of one of the \mgls-like commands is written to the aux file and so can be picked up by bib2gls (at least version 2.9). The resource option can be used to determine whether or not to consider the other (non-main) elements to be dependent on the main element.

    +With bib2gls, you can either define the compound entries in the document with \multiglossaryentry (or \providemultiglossaryentry) or you can use the @compoundset entry type in a bib file. Whichever method you use, remember that the entries that form the elements of the set must be defined first. See the bib2gls manual (v2.9+) for further details.

    +You can use the resource option compound-adjust-name to replace the name field of the main entry to:

    +\glsxtrmultientryadjustedname{sublist1}{name}{sublist2}{multi-label}
    + where multi-label is the label identifying the compound set, name was the value of the name before adjustment, sublist1 is the sub-list of other element labels before the main element (empty if the main element is the first element in the list), and sublist2 is the sub-list of other elements after the main element (empty if the main label is the final element).

    +This command is defined in glossaries-extra-bib2gls, which is automatically loaded with record=only and record=nameref. Case-changing versions of this command are also available.

    +

    +\Glsxtrmultientryadjustedname{sublist1}{name}{sublist2}{multi-label}
    + This is a sentence case version of \glsxtrmultientryadjustedname.

    +

    +\GlsXtrmultientryadjustedname{sublist1}{name}{sublist2}{multi-label}
    + This is a title case version of \glsxtrmultientryadjustedname.

    +

    +\GLSxtrmultientryadjustedname{sublist1}{name}{sublist2}{multi-label}
    + This is an all caps version of \glsxtrmultientryadjustedname.

    +Note that the above commands don’t take the prefix or suffix into account (see §7.3).

    +The separator between each element in the sub-lists is produced with:

    +\glsxtrmultientryadjustednamesep{pre-label}{post-label}
    + The default definition just uses \glscombinedfirstsepfirst.

    +The separator between the last element of sublist1 and the main element is produced with:

    +\glsxtrmultientryadjustednamepresep{pre-label}{post-label}
    + Similarly for the separator between the main element and the first element of sublist2:
    +\glsxtrmultientryadjustednamepostsep{pre-label}{post-label}
    + These both default to \glsxtrmultientryadjustednamesep.

    +The name is encapsulated with:

    +\glsxtrmultientryadjustednamefmt{text}
    + This just does its argument by default. If sublist1 is empty for the sentence case version, then name is encapsulated with:
    +\Glsxtrmultientryadjustednamefmt{text}
    + This does \makefirstuc{text} by default. For the title case version, the name is encapsulated with:
    +\GlsXtrmultientryadjustednamefmt{text}
    + This uses \glscapitalisewords, if defined, or \capitalisewords otherwise. The all caps version uses:
    +\GLSxtrmultientryadjustednamefmt{text}
    + This uses \mfirstucMakeUppercase by default.

    +Each element label in the sub-lists is encapsulated with:

    +\glsxtrmultientryadjustednameother{text}
    + This does \glsentryname{label} by default. For the sentence case version (where sublist1 isn’t empty), then the element label is encapsulated with:
    +\Glsxtrmultientryadjustednameother{text}
    + This does \Glsentryname{label} by default. The title case version uses:
    +\GlsXtrmultientryadjustednameother{text}
    + This does \glsentrytitlecase{label}{name} by default. The all caps version uses:
    +\GLSxtrmultientryadjustednameother{text}
    + This is defined as:
    \newcommand*{\GLSxtrmultientryadjustednameother}[1]{%
    + \mfirstucMakeUppercase{\glsentryname{#1}}}
    +

    + +

    + +
    +

    8. Defining and Displaying Glossaries

    +

    +As with the base glossaries package, you need to establish the indexing method in the preamble and use the appropriate \printglossary command. For example, to use the “noidx” method you need \makenoidxglossaries in the preamble and \printnoidxglossary in the document. Whereas if you want to use makeindex or xindy, you need \makeglossaries in the preamble and \printglossary in the document. The glossaries-extra package provides a hybrid approach:

    +\makeglossaries[types]
    + If the optional argument is present, then types should be a comma-separated list of glossary labels that should be processed by makeindex or xindy as per the normal behaviour of \makeglossaries. Any non-ignored glossaries that are not listed in types should be treated as though \makenoidxglossaries was used. This means that the glossaries listed in types should be displayed using \printglossary and the other (non-ignored glossaries) should be displayed with \printnoidxglossary. See sample-mixedsort.tex for an example.

    +If the optional argument is omitted, it will be treated as per the original \makeglossaries provided by the base glossaries package. If the optional argument is present, \glsindexingsetting will be set to makeindex-noidx or xindy-noidx, depending on whether makeindex or xindy should be used.

    +

    +Glossaries can’t be defined after \makeglossaries. This ensures that all the required indexing files are opened. If you’re not using \makeglossaries, glossaries need to be defined before any entries that should belong to them are defined.
    +

    +The base glossaries package provides \newignoredglossary to define an ignored glossary that doesn’t have any associated indexing files. This will automatically switch off hyperlinks for any entries assigned to the glossary (since there will be no target). With glossaries-extra, it’s possible to have targets without using the indexing methods provided by the base package. For example, it’s possible to have standalone entries (see §8.5) or targets can be created with \printunsrtglossary, so glossaries-extra provides a starred version.

    +\newignoredglossary*{glossary-label}
    + This behaves like the unstarred version but doesn’t disable hyperlinks. The glossary will still be omitted by iterative commands, such as \printunsrtglossaries, and can’t be used with \printglossary or \printnoidxglossary. If you use an ignored glossary with \printunsrtglossary, you will need to use the title option to override the default title, if required.

    +

    +\provideignoredglossary{glossary-label}modifier: *
    + This is like \newignoredglossary but does nothing if the glossary has already been defined.

    +With the indexing options provided by the base glossaries package, if you want a term to appear in more than one glossary, it’s necessary to define a duplicate entry with a different label. With the “unsrt” family of commands, the same entry can appear in multiple glossaries. This can be done by simply copying the entry’s label to the required glossary using:

    +\glsxtrcopytoglossary{entry-label}{glossary-type}modifier: *
    + This just adds the label to the target glossary’s internal comma-separated list that commands like \printunsrtglossary iterate over. The unstarred version locally adds the label. The starred version performs a global change.

    +

    +\glsxtrcopytoglossary is not compatible with docdef=true.
    +

    +Note that the type field will still be set to the original glossary. This is considered the entry’s primary glossary. There’s no field that keeps track of the additional glossaries the entry has been copied to.

    +If used with \printglossary or \printnoidxglossary, the entry will only be indexed for its primary glossary. It won’t show up in the other glossaries, but will be found when using an iterative command, such as \glsaddall, over the target glossary.

    +The base glossaries package provides \forallglossaries to iterate over a list of glossaries labels (all non-ignored glossaries by default). This can also be used with glossaries-extra but \forallacronyms is only for glossaries that have been declared as lists of acronyms, so it’s inappropriate with the glossaries-extra package. Instead, you can use the analogous command:

    +\forallabbreviationlists{cs}{body}
    + Each instance of \newabbreviation will add the abbreviation’s associated glossary (identified by the type key) to the internal list of labels (if not already added). Note that this won’t take into account any glossaries that had abbreviations copied or moved to it.

    + +

    + +
    +

    8.1. Entry Page Reference

    +

    +The base glossaries package provides \glsrefentry, which uses \ref to reference the entry’s associated counter (enabled with entrycounter or subentrycounter, not the location counter). The glossaries-extra package additionally provides:

    +\glsxtrpageref{entry-label}
    + This works in the same way but uses \pageref instead of \ref. As with \glsrefentry, if the corresponding counter has not been enabled, this just does \gls{entry-label}.

    + +

    + +
    +

    8.2. Glossary Preamble

    +

    +The base package provides \glossarypreamble, which is used at the start of the glossary. By default, this will use the preamble associated with the current glossary. If you redefine \glossarypreamble, this will set the preamble for all glossaries. To set the preamble for a particular glossary, you can use \setglossarypreamble. With glossaries-extra, you can additionally append to an existing preamble using:

    +\apptoglossarypreamble[type]{text}
    + This (locally) appends text to the preamble for the glossary identified by type. If type is omitted, \glsdefaulttype is assumed.

    +

    +\pretoglossarypreamble[type]{text}
    + This (locally) prepends text to the preamble for the glossary identified by type. If type is omitted, \glsdefaulttype is assumed.

    + +

    + +
    +

    8.3. Options

    +

    +In addition to the options available with \printglossary, the following options are also provided. Some of these listed here are specific to \printunsrtglossary and printunsrtglossarywrap. Options provided by the base package that aren’t available for the “unsrt” family of commands are identified below.

    +

    +sort=method
    + This option is only available for \printnoidxglossary. The \printunsrtglossary and \printunsrtinnerglossary commands simply iterate over the glossary’s internal list in the order in which the entries have been added to that glossary. If you are using bib2gls, use the sort resource option instead.

    +

    +title=text
    + This option is provided by the base glossaries package to override the default title for the glossary. This option is also available for \printunsrtglossary and printunsrtglossarywrap but not for \printunsrtinnerglossary.

    +

    +toctitle=text
    + This option is provided by the base glossaries package to override the default table of contents title for the glossary. This option is also available for \printunsrtglossary and printunsrtglossarywrap but not for \printunsrtinnerglossary.

    +

    +numberedsection=valuedefault: nolabel; initial: false
    + This option is provided by the base glossaries package to indicate whether or not the section header used at the start of the glossary should be numbered rather than unnumbered (and whether or not to automatically label the glossary with \label{\glsautoprefixglossary-type}). The numberedsection package option will change the default setting to match. This option is not available for \printunsrtinnerglossary.

    +

    +style=style-name
    + This option is provided by the base glossaries package to set the glossary style. This option is not available for \printunsrtinnerglossary.

    +

    +label=label
    + This option is provided by glossaries-extra to add \label{label} after the section header. This is essentially like numberedsection=nameref but you supply the label. This option is not available for \printunsrtinnerglossary. Alternatively, you can use:
    +\glsxtrsetglossarylabel{label}
    + This will need to be scoped or changed between glossaries or use a command in label that expands differently for each glossary to avoid duplicate labels.

    +

    +leveloffset=offsetinitial: 0
    + This option sets or increments the hierarchical level offset. If offset starts with ++ then the current offset is incremented by the given amount otherwise the current offset is set to offset. For example, an entry with a normal hierarchical level of 1 will be treated as though it has hierarchical level 1+offset. Note that the glossary style may not support the resulting hierarchical level. This option is only available for the “unsrt” family of commands and the printunsrtglossarywrap environment. See §8.4.3.1 for an example.

    +

    +flatten=booleandefault: true; initial: false
    + Treats all entries as though they have the same hierarchical level (the value of leveloffset). This option is only available for the “unsrt” family of commands and the printunsrtglossarywrap environment. Unlike the flatten resource option, this option doesn’t actually remove the parent field.

    +

    +groups=booleandefault: true; initial: true
    + This option is only applicable to the “unsrt” family of commands and printunsrtglossarywrap. If set to false, it will prevent groups from being formed. If true (the default), groups will only be formed if they are supported. See §8.4 for further details.

    +

    +prefix=prefix
    + This option is provided by glossaries-extra and simply redefines \glolinkprefix to expand to prefix. If hyperlinks are supported and the glossary style uses \glstarget to create the entry’s hypertarget, the target name is obtained from \glolinkprefixentry-label. If you are displaying multiple glossaries with shared entries (for example, using the secondary resource option with bib2gls), then changing the prefix can avoid duplicate targets.

    +Note that this option will also affect the targets used by the \gls-like and \glstext-like commands. This means that if you have, for example, \gls in the description of an entry, then its hyperlink will go to that entry’s item in the current glossary. Whereas referencing that entry outside of the glossary will hyperlink to the glossary that uses the prefix matching the setting at that point in the document. For example:

    \usepackage[colorlinks]{hyperref}
    +\usepackage[showtargets=annoteleft,style=tree]{glossaries-extra}
    +\newglossaryentry{sample}{name={sample},
    + description={an example description that references \gls{another}}}
    +\newglossaryentry{another}{name={another},
    + description={some other example description that references \gls{sample}}}
    +\begin{document}
    +Link to glossary 1: \gls{sample}.
    +
    +Link to glossary 2: \gls[prefix=other-]{sample}.
    +\printunsrtglossary
    +\printunsrtglossary[prefix=other-]
    +\end{document}
    +
    This uses the showtargets package option to show the target names to the left of the hyperlink or hypertarget. The result is:
    +Example 132: Changing the target prefix 📥🖹 📥🖺

    +Example document that illustrates two glossaries with different target prefixes.

    + Within the main part of the document, the first reference to “sample” has a hyperlink to the first glossary (with the target glo:sample, which uses the default prefix), and the second reference has a hyperlink to the second glossary (with the target other-sample).

    +Within the glossaries, the \gls references use the current glossary prefix, so the target is in the same glossary.

    +

    +targetnameprefix=prefix
    + This is similar to the previous option but only affects the prefix for the entry item’s target and doesn’t change the prefix for any references contained within the glossary. This prepends the given prefix to the default prefix.

    +If the above example is modified to:

    Link to glossary 1: \gls{sample}.
    +
    +Link to glossary 2: \gls[prefix=other-glo:]{sample}.
    +\printunsrtglossary
    +\printunsrtglossary[targetnameprefix=other-]
    +
    Then the result will be:
    +Example 133: Prepending to the target prefix for just the entry item 📥🖹 📥🖺

    +Example document that illustrates two glossaries with different target prefixes using targetprefixname.

    +

    +Note that this has prepended other- to the existing glo: prefix. This is why the prefix option in the second \gls reference had to be changed to match the appropriate hypertarget name. The \gls references in the second glossary now point to the relevant line in the first glossary.

    +It’s possible to combine targetnameprefix with prefix={} but that will also affect the \gls references within the glossary.

    +

    +target=booleandefault: true; initial: true
    + This is a boolean option that can be used to switch off the automatic creation of the entry hypertargets but still allows hyperlinks within the glossary. This can be used to prevent duplicate destinations for secondary glossaries.

    +

    +preamble=text
    + Redefines \glossarypreamble to text.

    +

    +postamble=text
    + Redefines \glossarypostamble to text.

    + +

    + +
    +

    8.4. Displaying a Glossary Without Sorting or Indexing

    +

    +The base glossaries package provides two ways of displaying a glossary, depending on the indexing option: \printglossary (used with \makeglossaries) or \printnoidxglossary (used with \makenoidxglossaries).

    +The glossaries-extra package provides an alternative that doesn’t require sorting or indexing.

    +\printunsrtglossary[options]
    + This behaves in a similar way to \printnoidxglossary, but it always lists all the defined entries for the given glossary in the order in which they were added to the glossary. Unlike \printglossary, you may use \printunsrtglossary with an ignored glossary.

    +

    +The “unsrt” family of commands and printunsrtglossarywrap are not intended for use with \makeglossaries and \makenoidxglossaries. Mixing these different methods can result in unexpected behaviour.
    +

    +There is also a starred version which has a mandatory argument:

    +\printunsrtglossary*[options]{init-code}
    + This is equivalent to:
    \begingroup
    +  init-code\printunsrtglossary[options]
    +\endgroup
    +
    There’s no significant difference between doing:
    {init-code\printunsrtglossary[options]}
    +
    and
    \printunsrtglossary*[options]{init-code}
    +
    Note that unlike \glossarypreamble, the supplied init-code is done before the glossary header.

    +

    +If you want to use one of the tabular-like styles with \printunsrtglossary, make sure you load glossaries-extra-stylemods which modifies the definition of \glsgroupskip to avoid the “Incomplete \iftrue error that may otherwise occur.
    +

    +As with \printglossary and \printnoidxglossary, there is also a command to print all non-ignored glossaries in the order in which they were defined:

    +\printunsrtglossaries
    +

    +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 location list in this case, as that has to be set by a post-processor such as bib2gls (see §11).

    +

    +No attempt is made to gather hierarchical elements. If child entries aren’t defined immediately after their parent entry, they won’t be together in the glossary when using \printunsrtglossary.
    +

    +The way that \printunsrtglossary basically works is to iterate over every label in the glossary’s internal label list and format each entry according to the way the glossary style would normally format the entry’s hierarchical level (described in more detail in §8.4.3). If a change in letter group is detected, the letter group heading and group skip will be inserted.

    +A label is appended to the glossary’s internal label list whenever an entry is defined. This means that the list will normally be in order of definition, but it’s also possible to copy an entry’s label to another glossary’s internal label list using \glsxtrcopytoglossary, which can be used to provide a different order. A simple example:

    \documentclass{article}
    +\usepackage[style=treegroup]{glossaries-extra}
    +\newglossaryentry{ant}{name={ant},description={}}
    +\newglossaryentry{gazelle}{name={gazelle},description={}}
    +\begin{document}
    +\printunsrtglossary
    +\end{document}
    +
    The document build only requires one LaTeX call in this case.
    +Example 134: Displaying unsorted glossaries 📥🖹 📥🖺

    +Example document that doesn’t require any external indexing.

    + Note the difference if the stylemods option is used:
    \usepackage[stylemods,style=treegroup]{glossaries-extra}
    +
    +Example 135: Displaying unsorted glossaries with stylemods 📥🖹 📥🖺

    +Example document that doesn’t require any external indexing using the stylemods option.

    + In this case, the group headings are now numbers instead of letters. The styles provided with glossaries-extra and those modified by glossaries-extra-stylemods are designed to assist integration with bib2gls. Without these modifications, \printunsrtglossary behaves like the less sophisticated \printnoidxglossary which checks if the label is an integer less than 256 and uses \char to create the title (if no title has been provided).

    +If you really want to use \printunsrtglossary without bib2gls and you want letter groups with stylemods without having to define all the titles, you can use:

    +\glsxtrnoidxgroups
    + which will switch over to using the group titling method used with \printnoidxglossary (which only supports ASCII). This command is only available with record=off and can’t be used with \makeglossaries.

    +If, conversely, you don’t want any groups formed, regardless of the glossary style, you can disable them with groups=false. The above example can be modified so that the document contains:

    \printunsrtglossary[title={Glossary 1}]
    +\glsxtrnoidxgroups
    +\printunsrtglossary[title={Glossary 2}]
    +\printunsrtglossary[groups=false,title={Glossary 3}]
    +\printunsrtglossary[style=tree,nogroupskip,title={Glossary 4}]
    +
    This repeats the same glossary. The first is the same as the previous example. The second is the same as the example that didn’t use stylemods. The final two glossaries have the groups suppressed. Using groups=false (Glossary 3) is more efficient than using nogroupskip and switching to a style that doesn’t show the header (Glossary 4).

    +I’ve also switched to two column mode to display the result in a more compact form. The first two glossaries are shown on the left and the last two are on the right:

    +Example 136: Displaying unsorted glossaries with different group settings 📥🖹 📥🖺

    +Example document that doesn’t require any external indexing with different group settings.

    +

    +The “unsrt” family of commands were designed for use with bib2gls, which uses more complex alphanumeric group labels to allow for greater customization and to avoid conflict where there are multiple glossaries or hierarchical levels with potentially the same letter groups.

    +The way that bib2gls works is to select entries from a bib file, according to the document requirements, sort the entries, and then write the entry definitions (with commands like \longnewglossaryentry* or \newabbreviation) in the glstex in the desired order, which is then input by \GlsXtrLoadResources. This means that \printunsrtglossary will display the entries in that order since, from glossaries-extra’s point of view, that’s the order of definition.

    +While it is possible to use \printunsrtglossary without bib2gls, as in the above example, for long or complex glossaries it’s better to use bib2gls which can automatically assign appropriate titles to the groups.

    +Groups and hierarchy are discussed in more detail in §8.4.1. See §8.4.2 for location lists and §8.4.3.1. Advanced commands and further detail about the way \printunsrtglossary works are covered in §8.4.3.

    + +

    + +
    +

    8.4.1. Groups and Hierarchy

    +

    +

    +See Gallery: Logical Glossary Divisions (type vs group vs parent) for the difference between the group, type and parent fields.
    +

    +Here’s a longer example that uses stylemods to automatically load glossary-bookindex:

    \documentclass{article}
    +\usepackage[stylemods=bookindex,style=bookindex]{glossaries-extra}
    +\newglossaryentry{waterfowl}{name={waterfowl},description={}}
    +\newglossaryentry{ant}{name={ant},description={}}
    +\newglossaryentry{adder}{name={adder},description={}}
    +\newglossaryentry{duck}{name={duck},parent={waterfowl},
    + description={}}
    +\newglossaryentry{zebra}{name={zebra},description={}}
    +\newglossaryentry{aardvark}{name={aardvark},description={}}
    +\newglossaryentry{gazelle}{name={gazelle},description={}}
    +\newglossaryentry{mallard}{name={mallard},parent={duck},
    + description={}}
    +
    +\newglossary*{another}{Another Glossary}
    +\glsxtrcopytoglossary{mallard}{another}
    +\glsxtrcopytoglossary{aardvark}{another}
    +\glsxtrcopytoglossary{zebra}{another}
    +\glsxtrcopytoglossary{ant}{another}
    +\glsxtrcopytoglossary{duck}{another}
    +\begin{document}
    +\printunsrtglossary
    +\printunsrtglossary[type=another]
    +\end{document}
    +
    Unlike the previous examples that defined the entries in alphabetical order, this example hasn’t used any logical order. Note, in particular, that the child entries “duck” and “mallard” (which have the parent key set) have not been defined immediately after their parent.

    +The first \printunsrtglossary has the default type=main and lists all entries defined in the main glossary, in the order in which they were defined. The second \printunsrtglossary lists all entries in the custom another glossary and is in the order in which the entries were copied to that glossary.

    +The document build again simply requires one LaTeX call. The result is shown in Example 137.

    +Example 137: Displaying unsorted glossaries with a copied list 📥🖹 📥🖺

    +Example document that doesn’t require any external indexing that copies entries to another glossary. Entries are listed in order of definition with child entries indented, that results in a confusing list.

    +

    +There are some oddities in both lists. It’s the glossary style that determines the formatting of the entries according to the entry’s hierarchical level, but it looks strange for the duck and mallard entries to be indented when they don’t follow after their parent entry.

    +As the internal loop within \printunsrtglossary iterates over each entry, it tries to determine which letter group the entry belongs to. If it’s different from the group for the previous entry (in the same hierarchical level), a group header is added (which may or may not be displayed, depending on the glossary style). This means than an unordered list of entries, such as in the above example, may contain repeated headers.

    +The way that the group is determined depends on whether or not the group key has been defined. If it isn’t defined (the default), then the group label is obtained from the uppercase character code of the first token of the sort key. If the token doesn’t have an uppercase character code (indicating that it’s not a letter) or if the sort value is empty then the label will be set to glssymbols (which corresponds to the symbol group). This is the same way that \printnoidxglossary inserts groups.

    +Remember that if the sort key hasn’t been set, it will be assigned automatically to the same value as the name key (or with sort=use or sort=def to a numerical value). The sort key will be empty if you use sort=clear. The sort=none setting simply skips the pre-processing of the sort key (such as sanitizing).

    +For example, the ant entry doesn’t explicitly use the sort key, so the sort value is obtained from the name key, which is set to ant. The first token is “a”, which is a letter. The group’s label is obtained from the letter’s uppercase character decimal code (65). There’s no associated title (which can be assigned with \glsxtrsetgrouptitle), so the title is simply “65” (with stylemods, see earlier) or “A” (without stylemods or with \glsxtrnoidxgroups).

    +The ant entry is followed by “adder”. The same process determines that the “adder” group label is also 65. There’s no change in the group label from the previous entry (ant) so no header is inserted.

    +By default, this group check is omitted for child entries, which is why no group header is inserted before duck or mallard. So the next entry to be checked for a group is the zebra entry, which has the group label 90 (the decimal code for “Z”). Again there’s no title associated with that label so the title is simply the label.

    +The zebra entry is followed by aardvark which, following the same process, has the group label 65. This is different from the previous group label (90) so a group header is inserted. This is why there are two “90” letter groups.

    +

    +The “unsrt” family of commands don’t order the entries.
    +

    +If the group key has been defined (which is the case with record=only and record=nameref) then the group label is obtained from the group field. If the group field is defined but empty then the entry will belong to the empty group. The value of the sort field is now irrelevant.

    +So, simply adding the record option to the above example document will cause the group headers to disappear. This is because the group key will now be defined but is empty for each entry. Even with a style like bookindex, there won’t be any group headers.

    +Provided the group key has been defined, the field used to store the group label is given by:

    +\glsxtrgroupfieldinitial: group
    + This expands to group, by default. However it’s possible to use a different field in which to store the group label, in which case \glsxtrgroupfield will need to be redefined. For example:
    {\renewcommand{\glsxtrgroupfield}{othergroup}\printunsrtglossary}
    +
    or
    \printunsrtglossary*{\renewcommand{\glsxtrgroupfield}{othergroup}}
    +
    (but this still requires the group key to be defined, even if it’s not being used to store the group label). With bib2gls, the secondary resource option (combined with --group) will store the group label obtained from the secondary sort in the secondarygroup field and adds the redefinition of \glsxtrgroupfield to the associated glossary preamble. This prevents it from clashing with the group field in the event that the secondary sort method has produced a different set of groups (which is likely).

    +The follow example document uses record to create the group key and assigns group labels with associated titles. Note that the secondarygroup field doesn’t have an associated key, so it needs to be set with a field assignment command, such as \GlsXtrSetField.

    \documentclass{article}
    +\usepackage[record,stylemods=bookindex,style=bookindex]{glossaries-extra}
    +
    +\glsxtrsetgrouptitle{group1label}{Group 1}
    \glsxtrsetgrouptitle{group2label}{Group 2}
    \glsxtrsetgrouptitle{group3label}{Group 3}
    \glsxtrsetgrouptitle{group4label}{Group 4}
    +\newglossaryentry{waterfowl}{name={waterfowl},description={},
    group={group1label}}
    \newglossaryentry{ant}{name={ant},description={},
    group={group1label}}
    \GlsXtrSetField{ant}{secondarygroup}{group4label}
    \newglossaryentry{adder}{name={adder},description={},
    group={group2label}}
    \newglossaryentry{duck}{name={duck},parent={waterfowl},
    description={},group={group4label}}
    \GlsXtrSetField{duck}{secondarygroup}{group2label}
    \newglossaryentry{zebra}{name={zebra},description={},
    group={group2label}}
    \GlsXtrSetField{zebra}{secondarygroup}{group3label}
    \newglossaryentry{aardvark}{name={aardvark},description={},
    group={group2label}}
    \GlsXtrSetField{aardvark}{secondarygroup}{group1label}
    \newglossaryentry{gazelle}{name={gazelle},description={},
    group={group1label}}
    \newglossaryentry{mallard}{name={mallard},parent={duck},
    description={},group={group2label}} +\GlsXtrSetField{mallard}{secondarygroup}{group3label}
    +\newglossary*{another}{Another Glossary}
    \glsxtrcopytoglossary{mallard}{another}
    \glsxtrcopytoglossary{aardvark}{another}
    \glsxtrcopytoglossary{zebra}{another}
    \glsxtrcopytoglossary{ant}{another}
    \glsxtrcopytoglossary{duck}{another}
    \setglossarypreamble[another]{\renewcommand{\glsxtrgroupfield}{secondarygroup}} +\begin{document} +\printunsrtglossary +\printunsrtglossary[type=another] +\end{document} +
    This is essentially mimicking the way that the secondary resource option sets the secondarygroup field and adds the redefinition of \glsxtrgroupfield to the secondary glossary’s preamble. (Although in this case, there’s no logical order.) The result is shown in Example 138.
    +Example 138: Displaying unsorted glossaries with custom groups 📥🖹 📥🖺

    +Example document that doesn’t require any external indexing and has the group labels explicitly set.

    +

    +Note that even though the duck and mallard entries have the group and secondarygroup fields set, there’s no group title for them in either glossary because they are child entries.

    +

    +\glsxtraddgroup{entry-label}{code}
    + This command will perform code if the entry identified by entry-label should have group support (provided the group field has been set). The default definition is:
    \newcommand*{\glsxtraddgroup}[2]{%
    +  \ifglsxtrprintglossflatten
    +    #2%
    +  \else
    +    \ifglshasparent{#1}{}{#2}%
    +  \fi
     }
    -
    -

    In both cases, the redefinition should be implemented after \GlsXtrEnableLinkCounting. -

    Here’s an example document that uses link counting to disable the hyperlink after -the first reference. This redefines \glslinkpresetkeys (which is used by both \gls -and \glstext) instead of \glslinkcheckfirsthyperhook (which is used by \gls -but not by \glstext). - - - -

    -
    -\documentclass{article}
    -\usepackage[colorlinks]{hyperref}
    -\usepackage{glossaries-extra}
    -\makeglossaries
    -\renewcommand*{\glslinkpresetkeys}{%
    - \ifnum\GlsXtrLinkCounterValue{\glslabel}>1
    -  \setkeys{glslink}{hyper=false}%
    - \fi
    +
    This means that only entries that don’t have a parent (with flatten=false) or any entry (with flatten=true) will have the group check performed. With bib2gls, the group-level will redefine \glsxtraddgroup to always do code, which means that all entries will have the group check performed.

    +

    +If no group label has been provided no header will be added.
    +

    +The above document can be modified to show the sub-group headings:

    \renewcommand*{\glsxtraddgroup}[2]{#2}
    +\printunsrtglossary
    +\renewcommand*{\glsxtraddgroup}[2]{%
    +  \ifnum\glscurrententrylevel<2 #2\fi}
    +\printunsrtglossary[type=another]
    +
    The result is shown in Example 139.
    +Example 139: Displaying unsorted glossaries with custom groups and sub-group headings 📥🖹 📥🖺

    +Example document that doesn’t require any external indexing and has the group labels explicitly set with sub-group headings.

    +

    +Note that the mallard entry (which has hierarchical level 2) has its group shown in the first glossary (where the group is formed for all levels) but not in the second glossary (where the redefinition of \glsxtraddgroup restricts group formation to just level 0 and level 1).

    +There’s a small visual distinction between the group titles in different hierarchical levels in the above. The top-level (level 0) groups have the title centred, whereas the sub-groups have their titles indented by the same amount as the corresponding sub-entries. This is due to the glossary style. Other styles may use the same formatting for all hierarchical levels.

    +The glossary styles provided with glossaries-extra and the base styles patched by glossaries-extra-stylemods all redefine:

    +\glssubgroupheading{previous level}{level}{parent-label}{group-label}
    + to format the sub-group headings in a manner applicable to the style. For example, styles that don’t show sub-entry names typically redefine this command to do nothing.

    +A default definition that simply does \glsgroupheading{group-label} is automatically initialised by \setglossarystyle (via \glsxtrpreglossarystyle) to allow for styles that don’t redefine this command. The first two arguments refer to the hierarchical level, where previous level is the level of the previous group and level is the level of this new sub-group. The parent-label is the label of the current entry’s parent, where the current entry is the first entry of the sub-group that immediately follows the heading.

    +The bookindex style defines \glssubgroupheading to use the style’s associated command \glsxtrbookindexformatsubheader. This can be redefined as required. For example, the following uses the parent entry’s hierarchical information:

    \renewcommand*{\glsxtrbookindexformatsubheader}[5]{%
    + \ifnum#2>1\relax
    +  \glstreesubsubitem\glstreegroupheaderfmt{\GlsXtrhiername{#3} / #5}%
    + \else
    +  \glstreesubitem\glstreegroupheaderfmt{\GlsXtrhiername{#3} / #5}%
    + \fi
     }
    -\GlsXtrEnableLinkCounting{general}
    -\newglossaryentry{sample1}{name={sample1},description={an example}}
    -\newglossaryentry{sample2}{name={sample2},description={another example}}
    -\newabbreviation{ex}{ex}{example}
    -\begin{document}
    -\section{Sample Section}
    -\Gls{sample1}, \gls{sample2} and \gls{ex}.
    -\Glstext{sample1} and \gls{ex} again.
    -\section{Another Sample Section}
    -\Gls{sample1}, \gls{sample2} and \gls{ex}.
    -\printglossaries
    -\end{document}
    -
    -

    The use of \glslinkpresetkeys means that the options can override this. For -example - - - -

    -
    -\gls[hyper=true]{sample1}
    -
    -

    will override the hyper=false setting in \glslinkpresetkeys. If \glslinkpostsetkeys -is used instead, the hyper=false setting will override the setting provided in the -optional argument. -

    The abbreviation category doesn’t have the linkcount attribute set (since it’s not -listed in the argument of \GlsXtrEnableLinkCounting). This means that -\GlsXtrLinkCounterValue always expands to 0 for the abbreviation (ex), so the -inequality test - - - -

    -
    -\ifnum\GlsXtrLinkCounterValue{\glslabel}>1
    -
    -

    will always be false. This means that the abbreviation won’t have hyper=false -applied. If the test is changed to - - - -

    -
    -\ifnum\GlsXtrLinkCounterValue{\glslabel}=1
    -\else
    - \setkeys{glslink}{hyper=false}%
    -\fi
    -
    -

    Then the abbreviation will always have hyper=false applied. -

    To reset the counter every section use the optional argument to set the master -counter: - - - -

    -
    -\GlsXtrEnableLinkCounting[section]{general}
    -
    -

    - - - -

    -

  • -

    Top

    9. Auto-Indexing

    -

    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: indexname and -dualindex. -

    The auto-indexing is designed for makeindex syntax. If you’ve used the xindy -package option, the automatic escaping of xindy special characters in the sort field -may result in an incorrect sort value for the \index command used by the -auto-indexing. Note also that texindy has a fixed set of special characters -(corresponding to makeindex’s defaults) that can’t be customized. You may want -to consider using bib2gls and its dual entries as an alternative approach. -
    -

    -

    The \glsxtrpostnamehook macro, used at the end of \glossentryname and -\Glossentryname, checks the indexname attribute for the category associated with -that entry. Since \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 name -key. -

    The internal macro used by the glossaries package to write the information to the -external glossary file is modified to check for the dualindex attribute. -

    In both cases, the indexing is done through -


    \glsxtrdoautoindexname{label}{attribute-label}

    -

    -This uses the standard \index command with the sort value taken from the entry’s -sort key and the actual value set to \glsentryname{label}. As from v1.16, there are -user-level commands available to change the sort and actual value used by the -automated index. -

    The actual value is given by -


    \glsxtrautoindexentry{label}

    -

    -where ⟨label⟩ is the entry’s label. The default definition is: - - - -

    -
    -\newcommand*{\glsxtrautoindexentry}[1]{\string\glsentryname{#1}}
    -
    -

    Note the use of \string to prevent \glsentryname from being expanded as it’s -written to the index file. -

    The sort value is assigned using: -


    \glsxtrautoindexassignsort{cs}{label}

    -

    -where ⟨label⟩ is the entry label and ⟨cs⟩ is the command which needs to be set to the -sort value. The default definition is: - - - -

    -
    -\newcommand*{\glsxtrautoindexassignsort}[2]{%
    -  \glsletentryfield{#1}{#2}{sort}%
    +

    +The above examples are contrived and demonstrate the need to define entries in a sensible order to achieve a sensible glossary with \printunsrtglossary. If you want to use this approach to display a glossary, you would need to make sure that you take care with the order that you define entries. This can be quite tedious for a large number of entries.

    +To switch to bib2gls, the entry data needs to be provided in a bib file. For example, the file animalfamilies.bib might contain:

    @index{waterfowl,user1={Anseriformes}}
    @index{ant,user1={Formicidae}}
    @index{adder,user1={Vipera berus}}
    @index{duck,parent={waterfowl},user1={Anatidae}}
    @index{zebra,user1={Hippotigris}}
    @index{aardvark,user1={Orycteropus afer}}
    @index{gazelle,user1={Gazella}}
    @index{mallard,parent={duck},user1={Anas platyrhynchos}} +
    I’ve included some additional information stored in the user1 field that wasn’t in the earlier examples. The document needs to use the record option and \GlsXtrLoadResources in order for it to work properly with bib2gls:
    \usepackage[record,stylemods=bookindex,style=bookindex]
    + {glossaries-extra}
    +\newglossary*{another}{Another Glossary}
    +\GlsXtrLoadResources[selection=all,% select all entries
    + src={animalfamilies},% identify bib file(s)
    + sort=en-GB,% sort method
    + secondary={la:user1:another}% sort again and copy to `another'
    +]
    +\glsdefpostname{index}{ 
    + (\emph{\glsentryuseri{\glscurrententrylabel}})}
    +\begin{document}
    +\printunsrtglossary
    +\printunsrtglossary[type=another]
    +\end{document}
    +
    If this code is saved in the file myDoc.tex then the build process is now:
    pdflatex myDoc
    +bib2gls --group myDoc
    +pdflatex myDoc
    +
    The --group (or -g) switch is important as it instructs bib2gls to set the group field for the primary sort and the secondarygroup for the secondary sort. The primary sort will sort entries according to en-GB (British English). This can simply be set to en without a region. The secondary sort will resort the entries, but this time according to la (Latin) using the user1 key as the sort value. The entry labels will then be copied to the custom another glossary.

    +The glstex file created by bib2gls (which will then be input by \GlsXtrLoadResources on the subsequent LaTeX run) essentially contains the following code:

    \glsxtrsetgrouptitle{6881280}{W}
    +\glsxtrsetgrouptitle{5832704}{G}
    +\glsxtrsetgrouptitle{5373952}{A}
    +\glsxtrsetgrouptitle{7077888}{Z}
    +\glsxtrsetgrouptitle{another5373952}{A}
    +\glsxtrsetgrouptitle{another5767168}{F}
    +\glsxtrsetgrouptitle{another6356992}{O}
    +\glsxtrsetgrouptitle{another5898240}{H}
    +\glsxtrsetgrouptitle{another6815744}{V}
    +\glsxtrsetgrouptitle{another5832704}{G}
    +
    +\longnewglossaryentry*{aardvark}{name={aardvark},
    + user1={Orycteropus afer},group={5373952}}{}
    +\longnewglossaryentry*{adder}{name={adder},
    + user1={Vipera berus},group={5373952}}{}
    +\longnewglossaryentry*{ant}{name={ant},
    + user1={Formicidae},group={5373952}}{}
    +\longnewglossaryentry*{gazelle}{name={gazelle},
    + user1={Gazella},group={5832704}}{}
    +\longnewglossaryentry*{waterfowl}{name={waterfowl},
    + user1={Anseriformes},group={6881280}}{}
    +\longnewglossaryentry*{duck}{name={duck},
    + parent={waterfowl},user1={Anatidae},group={}}{}
    +\longnewglossaryentry*{mallard}{name={mallard},
    + parent={duck},user1={Anas platyrhynchos},group={}}{}
    +\longnewglossaryentry*{zebra}{name={zebra},
    + user1={Hippotigris},group={7077888}}{}
    +
    +\apptoglossarypreamble[another]
    + {\renewcommand{\glsxtrgroupfield}{secondarygroup}}
    +\glsxtrcopytoglossary{waterfowl}{another}
    +\GlsXtrSetField{waterfowl}{secondarygroup}{another5373952}
    +\glsxtrcopytoglossary{duck}{another}
    +\glsxtrcopytoglossary{mallard}{another}
    +\glsxtrcopytoglossary{ant}{another}
    +\GlsXtrSetField{ant}{secondarygroup}{another5767168}
    +\glsxtrcopytoglossary{gazelle}{another}
    +\GlsXtrSetField{gazelle}{secondarygroup}{another5832704}
    +\glsxtrcopytoglossary{zebra}{another}
    +\GlsXtrSetField{zebra}{secondarygroup}{another5898240}
    +\glsxtrcopytoglossary{aardvark}{another}
    +\GlsXtrSetField{aardvark}{secondarygroup}{another6356992}
    +\glsxtrcopytoglossary{adder}{another}
    +\GlsXtrSetField{adder}{secondarygroup}{another6815744}
    +

    +It’s more complicated than this as helper commands are provided to make it easier to customize and the entries will all have category={index} since they were defined with @index, but this is basically like the preamble in the earlier examples, except that the ordering and groups are more logical. The result is shown in Example 140.

    +

    +Example 140: Displaying sorted glossaries with groups using bib2gls 📥🖹 📥🖺

    +Example document that uses bib2gls to created a two differently sorted lists with the same entries.

    +

    +Note that the group and secondarygroup fields haven’t been set for the child entries (duck and mallard). This is the default behaviour and it means that regardless of the definition you provide for \glsxtraddgroup, sub-groups won’t be displayed. If you want those fields set for child entries, you need to use the group-level resource option. For example:

    \GlsXtrLoadResources[selection=all,% select all entries
    + group-level={<=1},% level 0 and 1
    + src={animalfamilies},% identify bib file(s)
    + sort=en-GB,% sort method
    + secondary={la:user1:another}% sort again and copy
    +]
    +

    +This will add support for level 0 (no parent) and level 1 (parent but no grandparent) entries. Deeper levels won’t have support. The --group switch is still required.

    + + + +

    +

    8.4.2. Location Lists

    +

    +The “unsrt” family of commands check for the existence of the location and loclist keys. These are both defined by the record option. (The loclist field is also used by \makenoidxglossaries but isn’t defined as a key.)

    +The location field (if set) should contain the formatted location list. This is checked first and used if not empty. Otherwise the loclist field (if set) is used, but that will use the same method as \printnoidxglossary to format, which doesn’t compact consecutive locations.

    +It’s possible to choose a different field for the formatted location list by redefining:

    +\GlsXtrLocationFieldinitial: location
    + This should expand to the internal field label. If the field is not the default location then the test for loclist is omitted.

    +Whichever field is used, the formatted location list is passed to the appropriate glossary style command (\glossentry or \subglossentry) encapsulated with \glossaryentrynumbers.

    +If there’s no location field or if the tested fields are empty, then an empty argument (with no \glossaryentrynumbers encapsulator) is passed to the glossary style command. In this case, the nonumberlist option is redundant as there’s no location list to suppress.

    + +

    + +
    +

    8.4.3. Advanced Commands

    +

    +To provide a better understanding of how filtered and inner glossaries work, it’s useful to understand the difference between \printglossary (used with makeindex and xindy) and \printunsrtglossary (used with bib2gls).

    +In the first case, makeindex or xindy is used to create a file that contains content in the form:

    \glossarysection[\glossarytoctitle]{\glossarytitle}% 
    +\glossarypreamble
    +\begin{theglossary}\glossaryheader
    +content
    +\end{theglossary}\glossarypostamble
    +
    where content contains lines such as:
    \glsgroupheading{group label}\relax \glsresetentrylist
    +\glossentry{entry label}{location list}% 
    +\subglossentry{level}{entry label}{location list}% 
    +

    +The group headings (see §8.4.1) are typeset using \glsgroupheading. Top-level entries are typeset with \glossentry and child entries are typeset with \subglossentry where level indicates the hierarchical level. Both makeindex and xindy order the items so that the child entries are placed immediately after the corresponding parent entry.

    +The \printglossary command essentially does:

    Set default title and style.
    +\bgroup
    +  Initial setup.
    +  Input the file created by makeindex or xindy.
    +\egroup
    +

    +The initial setup part sets the glossary style (which determines the definitions of theglossary, \glossaryheader, \glsgroupheading, \glossentry and \subglossentry), assigns the title (\glossarytitle and \glossarytoctitle) and defines \currentglossary. (There is some other stuff done both before and after the file is input, but that’s not relevant here.)

    +In the case of bib2gls, there isn’t a glossary file to input. Instead, bib2gls is used to create a file that contains the entry definitions, which is input in the document preamble (via \GlsXtrLoadResources). The entries are defined in the required order and use internal fields to store the indexing information (such as the group label and location lists). Now \printunsrtglossary is used to display the glossary, which essentially does:

    Set default title and style.
    +\bgroup
    +  Initial setup.
    +  \glossarysection[\glossarytoctitle]{\glossarytitle}% 
    +  \glossarypreamble
    +  Construct internal control sequence containing glossary content.
    +  Expand internal control sequence.
    +  \glossarypostamble
    +\egroup
    +

    +The initial setup is the same as for \printglossary. The key difference here is that there’s no file containing the typeset glossary that can be simply input. Instead it’s necessary to iterate over the glossary’s internal label list. Some of the glossary styles use a tabular-like environment (such as longtable, which is used by the long styles). It’s always problematic having a loop inside a tabular context so \printunsrtglossary by-passes the problem by moving the loop outside of the theglossary environment. The command iterates over all entry labels (in the order in which they were added to the glossary) and constructs an internal control sequence (\@glsxtr@doglossary), which ends up containing:

    \begin{theglossary}\glossaryheader\glsresetentrylist
    +content
    +\end{theglossary}
    +

    +The content in this case is different as it doesn’t explicitly contain \glossentry and \subglossentry but instead uses an internal handler that just takes the entry label as the argument. The \glsgroupheading{group label} command is inserted whenever a top-level entry has the group field set to a label that’s different to the previous top-level entry’s group field (and, if supported, sub-groups are similarly inserted with \glssubgroupheading, see §8.4.1). So the content is in the form:

    \glsgroupheading{group label}% 
    +\internal cs handler{entry label}% 
    +\internal cs handler{entry label}% 
    +…\glsgroupheading{group label}% 
    +\internal cs handler{entry label}% 
    +\internal cs handler{entry label}% 
    +…

    +There are hooks and commands available for use within those hooks that may be adjusted to customize the way the glossary is displayed. These are described below.

    +At each iteration (while the glossary content is being constructed), the following steps are performed: +

      +
    1. 1.Store the current entry label in \glscurrententrylabel.
    2. 2.If \glscurrententrylabel is empty, skip this iteration.
    3. 3.Define placeholder commands:
      +\glscurrententrylevel
      + This is set to the current entry’s hierarchical level (taking leveloffset and flatten options into account);
      +\glscurrenttoplevelentry
      + This is set to the current entry label if \glscurrententrylevel is 0 (that is, it expands to the most recent top-level entry, allowing for flatten and leveloffset);
      +\glscurrentrootentry
      + This is set to the current entry label if flatten=true or if the current entry doesn’t have a parent (that is, it expands to the most recent top-level entry, allowing for flatten but not leveloffset).
    4. 4.Perform the entry process hook:
      +\printunsrtglossaryentryprocesshook{entry-label}
      + This does nothing by default. Within the definition of this hook, you may use:
      +\printunsrtglossaryskipentry
      + This will cause the remainder of the current iteration to be skipped, which will prevent the current entry from being shown in the glossary.
    5. 5.If groups=true, use \glsxtraddgroup (see §8.4.1) to append the top-level group heading (\glsgroupheading) or the sub-group heading (\glssubgroupheading) to \@glsxtr@doglossary.
    6. 6.Append \internal cs handler{entry label} to \@glsxtr@doglossary. +
    +

    +

    +The placeholders \glscurrenttoplevelentry and \glscurrentrootentry may not be an ancestor of the current entry. For example, if the glossary doesn’t have child entries immediately following their parent entry.
    +

    +Once the glossary construction (\@glsxtr@doglossary) has been completed, the following hook is performed:

    +\printunsrtglossarypredoglossary
    + This does nothing by default. You can redefine this to show the definition of \@glsxtr@doglossary for debugging purposes:
    \renewcommand{\printunsrtglossarypredoglossary}{% 
    + \csshow{@glsxtr@doglossary}}
    +
    This will interrupt the LaTeX run and display the definition in the transcript.

    +The handler command \internal cs handler performs the following:

    \protected@xdef\glscurrententrylabel{entry-label}% 
    +\printunsrtglossaryhandler\glscurrententrylabel
    +
    This stores the entry’s label in \glscurrententrylabel (which allows it to be referenced in style hooks, such as the post-name hook or post-description hook). Note that it uses a global definition to avoid scoping issues caused with tabular-like styles. The main handling of the entry is performed by:
    +\printunsrtglossaryhandler{entry-label}
    + This is simply defined to use:
    +\glsxtrunsrtdo{entry-label}
    + This displays the entry according to the current glossary style, taking the hierarchical level into account (as given by \glscurrententrylevel).

    +The following are additional commands that may be useful in the above hooks.

    +\glsxtriflabelinlist{label}{label-list}{true}{false}
    + Does true if the given label is in the given comma-separated list of labels, otherwise does false. The label and list are fully expanded.

    +

    +\ifglsxtrprintglossflatten true\else false\fiinitial: \iffalse
    + This conditional is set by the flatten option and can be used to test if the option has been set.

    +For example, the following skips all entries that have the category set to symbol:

    \usepackage[style=index]{glossaries-extra}
    +\newglossaryentry{ant}{name={ant},description={}}
    +\newglossaryentry{pi}{name={\ensuremath{\pi}},description={}, 
    + category={symbol}}
    +\newglossaryentry{aardvark}{name={aardvark},description={}}
    +\newglossaryentry{alpha}{name={\ensuremath{\alpha}},description={}, 
    + category={symbol}}
    +\begin{document}
    +\renewcommand{\printunsrtglossaryentryprocesshook}[1]{%
    + \glsifcategory{#1}{symbol}%
    + {\printunsrtglossaryskipentry}%
    + {}%
     }
    -
    -

    After this macro is called, ⟨cs⟩ is then processed to escape any of makeindex’s special -characters. Note that this escaping is only performed on the sort not on the actual -value. The escaping of the sort value is performed by -


    \glsxtrautoindexesc

    -

    -You can redefine this to do nothing if you want to omit the escaping. You may want -to consider providing another field to obtain the appropriate sort value if the one -provided in the sort field isn’t suitable (because it may already have had special -characters escaped or it may be a numeric value in the case of sort by use or -definition). -

    The command used to perform the actual indexing is: -


    \glsxtrautoindex{text}

    -

    -This just does \index{text} by default. -

    The entry’s parent field isn’t referenced in this automated indexing. -
    -

    -

    For example, to index the value of the first key, instead of the name key: - - - -

    -
    -\renewcommand*{\glsxtrautoindexentry}[1]{\string\glsentryfirst{#1}}
    -
    -

    and if the sort value also needs to be set to the long field, if present, otherwise the -sort field: - - - -

    -
    -\renewcommand*{\glsxtrautoindexassignsort}[2]{%
    -  \ifglshaslong{#2}%
    -  {\glsletentryfield{#1}{#2}{long}}%
    -  {\glsletentryfield{#1}{#2}{sort}}%
    +\printunsrtglossary
    +\end{document}
    +
    +Example 141: Filtering by category 📥🖹 📥🖺

    +Example document that displays a glossary with entries filtered by category.

    +

    + +

    + +
    +

    8.4.3.1. Inner Glossaries

    +

    +

    +

    +It’s possible you may want to combine multiple glossaries sequentially, as sub-blocks of a single list. The inner part of \printunsrtglossary can be created with:

    +\printunsrtinnerglossary[options]{pre-code}{post-code}
    + This can’t be used on its own, as it only forms a fragment. It doesn’t include the section header, style initialisation, preamble, theglossary environment, header and postamble.

    +As with \printunsrtglossary, \printunsrtinnerglossary constructs an internal control sequence containing the content, but it adds scoping to localise the effects of any supplied options. So it essentially does:

    \begingroup
    +  Initial setup (process options).
    +  pre-code
    +  Construct internal control sequence containing glossary content.
    +  Expand internal control sequence.
    +  post-code
    +\endgroup
    +

    +There are two ways this command may be used.

    +\begin{printunsrtglossarywrap}[options]content\end{printunsrtglossarywrap}
    + The printunsrtglossarywrap environment takes one optional argument that uses the same keys as \printunsrtglossary (see §8.3). Note that in this case the type key simply provides a title (if one has been assigned to that glossary). It doesn’t indicate the content. There’s no point using both type and title.

    +The start of the environment sets up the glossary style and does the header:

    Set default title and style.
    +Initial setup.
    +\glossarysection[\glossarytoctitle]{\glossarytitle}% 
    +\glossarypreamble
    +\begin{theglossary}\glossaryheader\glsresetentrylist
    +
    The end of this wrapper environment ends theglossary and does the postamble:
    \end{theglossary}\glossarypostamble
    +

    +For example, the following has two glossaries but displays them as inner glossaries:

    \newglossaryentry{ant}{name={ant},description={}}
    +\newglossaryentry{bee}{name={bee},description={}}
    +\newignoredglossary*{other}
    +\newglossaryentry{duck}{name={duck},description={}}
    +\newglossaryentry{goose}{name={goose},description={}}
    +\begin{document}
    +\begin{printunsrtglossarywrap}[style=index]
    +\glstreeitem First Glossary
    +\printunsrtinnerglossary[leveloffset=1]{}{}
    +\glstreeitem Second Glossary
    +\printunsrtinnerglossary[type=other,leveloffset=1]{}{}
    +\end{printunsrtglossarywrap}
    +\end{document}
    +
    +Example 142: Inner glossaries using printunsrtglossarywrap 📥🖹 📥🖺

    +Example document illustrating two inner glossaries offset by 1 level.

    +

    +The other way that \printunsrtinnerglossary can be used is within \printunsrtglossary. The handler function described in §8.4.3 that’s used to process each entry to be displayed in the glossary, is defined as:

    \newcommand{\printunsrtglossaryhandler}[1]{\glsxtrunsrtdo{#1}}
    +

    +It’s possible to redefine this so that it also displays an inner glossary. The following example has the terms “pictograph” and “Greek symbol” in the main glossary. Two ignored glossaries are created (which don’t require a title) where the glossary label matches an entry label in the main glossary.

    \usepackage{fontawesome}
    +\usepackage[style=tree]{glossaries-extra}
    +\newglossaryentry{pictograph}{name={pictograph},
    + description={picture or symbol representing a word or phrase}}
    +\newglossaryentry{mathgreek}{name={Greek symbol},
    + description={mathematical constants or functions}}
    +\newignoredglossary*{pictograph}
    +\newignoredglossary*{mathgreek}
    +\newglossaryentry{cut}{type={pictograph},
    + name={\faCut},
    + description={cut}}
    +\newglossaryentrypaste{type={pictograph},
    +name={\faPaste},
    + description={paste}}
    +\newglossaryentry{alpha}{type={mathgreek},
    + name={\ensuremath{\alpha}},
    + description={alpha}}
    +\newglossaryentry{beta}{type={mathgreek},
    + name={\ensuremath{\beta}},
    + description={beta}}
    +\begin{document}
    +\newcommand{\nestedhandler}[1]{%
    +  \glsxtrunsrtdo{#1}%
    +  \ifglossaryexists*{#1}%
    +  {%
    +    \printunsrtinnerglossary[type={#1},leveloffset={++1},
    +      groups=false]{}{}%
    +  }%
    +  %
     }
    -
    -

    -

    If the value of the attribute given by ⟨attribute-label⟩ is “true”, no encap will be -added, otherwise the encap will be the attribute value. For example: - - - -

    -
    -\glssetcategoryattribute{general}{indexname}{textbf}
    -
    -

    will set the encap to textbf which will display the relevant page number in bold -whereas - - - -

    -
    -\glssetcategoryattribute{general}{dualindex}{true}
    -
    -

    won’t apply any formatting to the page number in the index. -

    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 -\index to use some thing else.)
    -

    -

    By default the format key won’t be used with the dualindex attribute. You can -allow the format key to override the attribute value by using the preamble-only -command: -


    \GlsXtrEnableIndexFormatOverride

    -

    -If you use this command and hyperref has been loaded, then the theindex -environment will be modified to redefine \glshypernumber to allow formats that use -that command. -

    The dualindex attribute will still be used on subsequent use even if the -indexonlyfirst attribute (or indexonlyfirst package option) is set. However, the dualindex -attribute will honour the noindex key.
    -

    -

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

    If this isn’t the case, you can use the following preamble-only commands to set -the correct characters. -

    Be very careful of possible shifting category codes!
    -

    -


    \GlsXtrSetActualChar{char}

    -

    -Set the actual character to ⟨char⟩. -


    \GlsXtrSetLevelChar{char}

    -

    -Set the level character to ⟨char⟩. -


    \GlsXtrSetEscChar{char}

    -

    -Set the escape (quote) character to ⟨char⟩. -


    \GlsXtrSetEncapChar{char}

    - - - -

    -Set the encap character to ⟨char⟩. - - - -

    -

    -

    Top

    10. bib2gls: Managing Reference Databases

    -

    There is a new command line application called bib2gls, which works in much -the same way as a combination of bibtex and makeindex/xindy. Instead of -storing all your entry definitions in a .tex and loading them using \input or -\loadglsentries, the entries can instead be stored in a .bib file and bib2gls can -selectively write the appropriate commands to a .glstex file which is loaded using -\glsxtrresourcefile (or \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 .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. (You can convert an existing .tex file -containing glossary definitions to a .bib file using convertgls2bib, supplied with -bib2gls.) -

    There are some new commands and options added to glossaries-extra to help assist -the integration of bib2gls into the document build process. -

    This chapter just provides a general overview of bib2gls. The full details and -some sample documents are provided in the bib2gls manual. -

    An example of the contents of .bib file that stores glossary entries that can be -extracted with bib2gls: - - - -

    -
    -@entry{bird,
    -  name={bird},
    -  description = {feathered animal},
    -  see={[see also]{duck,goose}}
    +\printunsrtglossary*{\let\printunsrtglossaryhandler\nestedhandler}
    +\end{document}
    +

    +This creates a custom command \nestedhandler that can be used as the handler to create nested glossaries. After each item in the glossary, if the entry’s label matches the label of a defined glossary, that glossary is displayed with its hierarchical level incremented by 1, which creates the illusion of child entries. The resulting document is shown in Example 143.

    +

    +Example 143: Nested glossaries 📥🖹 📥🖺

    +Example document with a glossary that has inner glossaries.

    +

    + + + +

    +

    8.4.3.2. Per-Unit Glossaries

    +

    +If you are using bib2gls then it’s possible to only list entries that match a particular counter value. For example, you may want a mini-glossary at the start of a section that only lists the entries that have been recorded in that section. This can be done by using the handler to skip entries that don’t have a matching record. It can also be implemented with record counting, as shown in Example 156 in §11.4.

    +It’s also possible to make each indexing instance automatically make a note of a particular counter using:

    +\GlsXtrRecordCounter{counter-name}

    +

    +
    + (This doesn’t correspond to a bib2gls record. That’s dealt with by the indexing that comes first.)

    +This command may only be used in the preamble (with record) and indicates that whenever an entry is indexed, the following line should be added to the aux file:

    +\glsxtr@counterrecord{entry-label}{counter}{value}
    + where value is given by \thecounter. On the next LaTeX run, this information is picked up from the aux file and the information is added to the record.counter field (stored as an etoolbox internal list). This internal command is only used in the aux file and has a user-level hook:
    +\glsxtrAddCounterRecordHook{entry-label}{counter}{value}
    + This does nothing by default. If you want to redefined this, the redefinition must be placed in the document preamble before the aux file is input.

    +There are two ways of skipping an entry. The first is to redefine \printunsrtglossaryentryprocesshook to perform the test and use \printunsrtglossaryskipentry to skip an unwanted entry (as illustrated earlier). The second is to perform the test in \printunsrtglossaryhandler. The first method is the better option for large lists that may contain group headers. The example below uses the second method.

    +The file myentries.bib contains the following:

    @symbol{pi,name={\ensuremath{\pi}},
    description={ratio of the length of the circumference of a circle to its diameter}}
    @symbol{root2,name={\ensuremath{\surd2}},
    description={Pythagoras' constant}}
    @symbol{zeta3,name={\ensuremath{\zeta(3)}},
    description={Ap\'ery's constant}}
    @symbol{zero,name={0},
    description={nothing or nil}}
    @symbol{one,name={1},
    description={single entity, unity}} +
    The document redefines the handler to only show entries in the current section:
    \usepackage[record,stylemods,style=index]{glossaries-extra}
    +\GlsXtrRecordCounter{section}
    +\GlsXtrLoadResources[src={myentries}]
    +\begin{document}
    +\renewcommand{\printunsrtglossaryhandler}[1]{%
    +  \glsxtrfieldxifinlist{#1}{record.section}{\thesection}
    +  {\glsxtrunsrtdo{#1}}%
    +  {}%
     }
    -@entry{duck,
    -  name={duck},
    -  description = {a waterbird with short legs}
    +\section{Sample}
    +\printunsrtglossary
    +This section discusses \gls{pi}, \gls{root2} and
    +\gls{zeta3}.
    +
    +\section{Another Sample}
    +\printunsrtglossary
    +This section discusses \gls{one}, \gls{pi} and
    +\gls{zero}.
    +\end{document}
    +
    If the document is saved in the file myDoc.tex then the build process is:
    pdflatex myDoc
    +bib2gls myDoc
    +pdflatex myDoc
    +
    The first LaTeX run adds the records to the aux file for bib2gls to pick up, but also adds the \glsxtr@counterrecord lines (which bib2gls ignores) that setup the record.section list field for the given entry.

    +This means that \glsxtrfieldxifinlist can be used to determine whether or not the current section number (\thesection) is in the list. If it is, then the entry is displayed in the current glossary style using the default \glsxtrunsrtdo. Otherwise nothing is displayed.

    +The following command is provided that performs something similar:

    +\printunsrtglossaryunit[options]{counter-name}
    + This is equivalent to:
    \printunsrtglossary*[type=\glsdefaulttype,#1]{% 
    +  \printunsrtglossaryunitsetup{#2}% 
    +}
    This initialises the hook via:
    +\printunsrtglossaryunitsetup{counter-name}
    + This is essentially does:
    % redefine handler to only show entries with a match:
    +\renewcommand{\printunsrtglossaryhandler}[1]{% 
    +  \glsxtrfieldxifinlist{#1}{record.counter-name}{\thecounter-name}
    +  {\glsxtrunsrtdo{#1}}% 
    +  {}% 
    +}% 
    +assign target name prefixes (see below)
    +% suppress section header:
    +\renewcommand*{\glossarysection}[2][]{}% 
    +% append vertical space after the glossary:
    +\appto\glossarypostamble{\printunsrtglossaryunitpostskip}% 
    +
    This is more complicated than the original example as it also suppresses the glossary section header and modifies the target name prefix. Additionally, the following is appended to the end of the glossary:
    +\printunsrtglossaryunitpostskip
    + This simply does:
    \glspar\medskip\glspar
    +
    which creates a small vertical space. The target name prefix (targetnameprefix) is assigned as follows. If \thecounter-name has been defined, the prefix is:
    record.counter-name.\thecounter-name.\@gobble
    +
    otherwise the prefix is:
    record.counter-name.\thecounter-name.\@gobble
    +
    The use of \@gobble at the end discards \glolinkprefix.

    +The above example can be rewritten using \printunsrtglossaryunit. I’ve added symbol-sort-fallback to sort by the description and a full glossary at the end of the document.

    \usepackage[record,stylemods,style=index]{glossaries-extra}
    +\GlsXtrRecordCounter{section}
    +\GlsXtrLoadResources[src={myentries},
    + symbol-sort-fallback=description
    +]
    +\begin{document}
    +\section{Sample}
    +\printunsrtglossaryunit{section}
    +This section discusses \gls{pi}, \gls{root2} and
    +\gls{zeta3}.
    +
    +\section{Another Sample}
    +\printunsrtglossaryunit{section}
    +This section discusses \gls{one}, \gls{pi} and
    +\gls{zero}.
    +
    +\printunsrtglossaries
    +\end{document}
    +
    The build process is the same as before:
    pdflatex myDoc
    +bib2gls myDoc
    +pdflatex myDoc
    +
    The resulting document is shown in Example 144. Note that all glossaries show the location lists, which all contain the page number 1, since the example document is only one page long.

    +

    +Example 144: Sub-glossary for a given counter value 📥🖹 📥🖺

    +Example document demonstrating a mini-glossary that only shows entries recorded in the current section.

    +

    +Other variations include creating a secondary glossary that’s ordered differently for the mini-glossaries. For example:

    \newignoredglossary*{glossary2}
    +\GlsXtrLoadResources[src={\jobname},
    + symbol-sort-fallback=description,
    + secondary=use:glossary2
    +]
    +
    This orders the secondary glossary according to use (the first record for the entire document not for the given unit). The mini-glossaries will then need the type option:
    \printunsrtglossaryunit[type=glossary2]{section}
    +

    +There is an alternative method that ensures the mini-glossaries are ordered by use within the section. This can be done by redefining \glsxtrAddCounterRecordHook to create a glossary for each unit (instead of using a secondary glossary):

    \renewcommand{\glsxtrAddCounterRecordHook}[3]{% 
    + \provideignoredglossary{#2.#3}% 
    + \glsxtrcopytoglossary*{#1}{#2.#3}% 
     }
    -@entry{goose,
    -  name="goose",
    -  plural="geese",
    -  description={a waterbird with a long neck}
    +
    (Remember this needs to be done in the preamble, before the aux file is input.)

    +This creates a glossary with the label counter.value, if it’s not already defined, and adds the entry’s label to it. This means that this glossary will only contain the entries for the matching counter and value, and the entry labels are in the order they were added to the aux file.

    +The glossary needs to be set appropriately. For example:

    \printunsrtglossaryunit[type=section.\thesection]{section}
    +
    There’s now no filtering required, but \printunsrtglossaryunit is still useful as it automatically suppresses the section header, alters the hyperlink prefix and adds extra spacing after the glossary. However, if you prefer, you can simply do something like:
    \printunsrtglossary*[type=section.\thesection,
    + target=false]
    +\renewcommand*{\glossarysection}[2][]{}
    +\printunsrtglossaryunitpostskip
    +
    This is done in Example 145.

    +

    +Example 145: Sub-glossary for a given counter value ordered by use in the section 📥🖹 📥🖺

    +Example document demonstrating a mini-glossary that only shows entries recorded in the current section in the order they were recorded in that section.

    +

    + +

    + +
    +

    8.5. Standalone Entry Items

    +

    +It may be that you don’t want a list but would rather display entry details throughout the document. You can simply do \glsentryname followed by \glsentrydesc. (Remember that if you don’t want a sorted list, use sort=none or sort=clear to skip the preprocessing of the sort field.) For example, in the preamble provide a custom command to display the entry’s name and description:

    \newcommand{\displayterm}[1]{%
    + \par\medskip\par\noindent
    + Definition: \glsentryname{#1}.\par
    + \glsentrydesc{#1}
    + \par\medskip
     }
    -
    -

    -

    The follow provides some abbreviations: - - - -

    -
    -@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}}
    +
    define your entries, for example:
    \newglossaryentry{function}{name={function},
    +  description={a relation or expression involving variables}
     }
    -@abbreviation{html,
    -  short ="html",
    -  long  = html,
    -  description={a markup language for creating web pages}
    +
    and then later in the text:
    \displayterm{function}
    +

    +However, if may be that you want to use hyperref and have commands like \gls link back to the place where the term is described. Instead of using \glsentryname use:

    +\glsxtrglossentry{entry-label}
    + where entry-label is the entry’s label.

    +This is designed to behave much like the way the name is displayed in the glossary. It performs the following: +

      +
    • Defines \glscurrententrylabel to the entry’s label. This is usually done at the start of the glossary style commands \glossentry and \subglossentry and may be used by hooks, such as the post-name hook. Here the definition is localised so that it’s only available for use in \glossentryname.

      +

    • Defines \currentglossary to the entry’s glossary type. This is usually done at the start of commands like \printglossary and may be used by style hooks. Here the definition is localised so that it’s only available for use in \glsentryitem and \glssubentryitem. The value is obtained by fully expanding:
      +\GlsXtrStandaloneGlossaryType
      + which defaults to the value of the type field for the current entry.

      +

    • Increments and display the entry counters if the entrycounter or subentrycounter package options are set. If the entry doesn’t have a parent, then this does:
      \glsentryitem{entry-label}
      +
      otherwise it does:
      +\GlsXtrStandaloneSubEntryItem{entry-label}
      + which defaults to \glssubentryitem{entry-label} if the entry has a parent but not a grandparent.

      +This reflects the behaviour of the predefined hierarchical styles. A bug in pre-version 1.31 used \glsentryitem for all child levels, which doesn’t match the hierarchical glossary styles. If you want to restore this behaviour, just do:

      \renewcommand*{\GlsXtrStandaloneSubEntryItem}[1]{% 
      + \glssubentryitem{#1}}
      +

      +

    • Sets the hyper-target if supported (using \glstarget) and displays the entry name using:
      +\GlsXtrStandaloneEntryName{entry-label}
      + which uses \glstarget{entry-label}{\glossentryname{entry-label}} by default. Remember that \glossentryname uses \glsnamefont or picks up the style from category attributes such as glossnamefont. +
    + If you have used \nopostdesc or \glsxtrnopostpunc in any of your description fields, you can use:
    +\glsxtractivatenopost
    + to make these commands behave as they normally do within a glossary. This needs to be placed before:
    \glossentrydesc{entry-label}\glspostdescription
    +
    and scoped. Note that \glsnonextpages and \glsnextpages have no effect outside of the glossary and are not intended for use in a standalone context.

    +It’s also possible to select a different field (rather than using name):

    +\glsxtrglossentryother{header}{entry-label}{field-label}
    + The field-label must be given using its internal field label. The header argument is the code to pass to the third argument of \glsxtrtitleorpdforheading. It may be left empty in which case the default is determined as follows: +
      +
    • If \glsxtrheadfield-label is defined (see §5.3.3), then header is \glsxtrheadfield-label{entry-label}.

      +

    • Otherwise header is simply the field value. +
    + The \glsxtrglossentryother command internally uses
    +\GlsXtrStandaloneEntryOther{entry-label}{field-label}
    + instead of \GlsXtrStandaloneEntryName, which uses \glossentrynameother{entry-label}{field-label} instead of \glossentryname{entry-label}.

    +If you have loaded the glossaries-accsupp package (through the accsupp option) then accessibility support will be provided if there’s a corresponding command:

    \glsfield-labelaccessdisplay{text}{entry-label}
    +
    (for example, \glssymbolaccessdisplay).

    +This means that my custom command can be changed to:

    \newcommand{\displayterm}[1]{%
    + \par\medskip\par\noindent
    + Definition: \glsxtrglossentry{#1}.\par
    + \glsentrydesc{#1}
    + \par\medskip
     }
    -@abbreviation{ssi,
    -  short="ssi",
    -  long = ssi,
    -  description={a simple interpreted server-side scripting language}
    +
    If I want numbered definitions, then I can use the package options entrycounter or subentrycounter and remove the colon:
    \newcommand{\displayterm}[1]{%
    + \par\medskip\par\noindent
    + Definition \glsxtrglossentry{#1}.\par
    + \glsentrydesc{#1}
    + \par\medskip
     }
    -
    -

    -

    Here are some symbols: - - - -

    -
    -preamble{"\providecommand{\mtx}[1]{\boldsymbol{#1}}"}
    -@symbol{M,
    -  name={$\mtx{M}$},
    -  text={\mtx{M}},
    -  description={a matrix}
    +
    The counter label uses a dot after the number by default but this can be changed to a colon:
    \renewcommand*{\glsentrycounterlabel}{\theglossaryentry:\space}
    +
    It’s now possible to not only use \gls to link back to the definition but also use \glsrefentry to reference the counter and \glsxtrpageref to reference the page number.

    +If I want the description to behave more like it does in a glossary in need to make the following modification:

    \newcommand{\displayterm}[1]{%
    + \par\medskip\par\noindent
    + Definition \glsxtrglossentry{#1}.\par
    + \begingroup
    +  \glsxtractivatenopost
    +  \glossentrydesc{#1}\glspostdescription
    + \endgroup
    + \par\medskip
     }
    -@symbol{v,
    -  name={$\vec{v}$},
    -  text={\vec{v}},
    -  description={a vector}
    +
    (Note the grouping to localise \glsxtractivatenopost.)

    +You can also use \glsxtrglossentry within section headings. For example:

    \section{\glsxtrglossentry{function}}
    +

    +If \glsxtrglossentry occurs in a section title and hyperref has been loaded, then \glsxtrglossentry will expand in the PDF bookmark as:

    +\GlsXtrStandaloneEntryPdfName{entry-label}
    + This defaults to \glsentryname{entry-label} The page headers and table of contents will use
    +\GlsXtrStandaloneEntryHeadName{entry-label}
    + which defaults to \glsxtrheadname{entry-label}. For example, to ensure that the name is displayed in sentence case in the title, PDF bookmarks and heading:
    \glssetcategoryattribute{general}{glossname}{firstuc}
    +\renewcommand{\GlsXtrStandaloneEntryPdfName}[1]{\Glsentryname{#1}}
    +\renewcommand{\GlsXtrStandaloneEntryHeadName}[1]{\Glsentryname{#1}}
    +
    Note that this requires glossaries v4.50+ to ensure that \Glsentryname expands. An alternative is to use \Glsxtrusefield.

    +If \glsxtrglossentryother occurs in a section title and hyperref has been loaded, then \glsxtrglossentryother will expand in the PDF bookmark as:

    +\GlsXtrStandaloneEntryPdfOther{entry-label}{field-label}
    + This defaults to the value of the given field. The page headers and table of contents will use the header argument, if not empty, otherwise it will use:
    +\GlsXtrStandaloneEntryHeadOther{entry-label}{field-label}
    + This does \glsxtrheadfield-label, if it exists, or otherwise it just does the value of the given field (which can be obtained with \glsxtrusefield).

    +If you’re using a page style or table of contents that doesn’t use \markright or \markboth or \@starttoc then you need to insert \glsxtrmarkhook and \@glsxtrinmark at the start of the header or table of contents either scoped or afterwards cancelled with \@glsxtrnotinmark and \glsxtrrestoremarkhook, see §5.3.3.

    + +

    + +
    +

    8.6. Glossary Style Modifications

    +

    +The glossaries-extra package redefines \setglossarystyle, and it now includes a hook that’s performed before the style is set:

    +\glsxtrpreglossarystyle
    + This allows for new style commands that aren’t provided by the base glossaries package to be initialised in the event that a style that doesn’t redefine them is used. The default definition is:
    \newcommand{\glsxtrpreglossarystyle}{% 
    +  \renewcommand*{\glssubgroupheading}[4]{\glsgroupheading{##4}}% 
     }
    -@symbol{S,
    -  name={$\mathcal{S}$},
    -  text={\mathcal{S}},
    -  description={a set}
    +
    If you prefer a different default, you can redefine this command as appropriate.

    +The commands \glossentryname and \glossentrydesc are modified to take into account the glossname, glossnamefont, glossdesc and glossdescfont attributes (see §10). This means you can make simple font or case-changing modifications to the name and description without defining a new glossary style.

    +The command \glossentrysymbol is modified to take into account the glosssymbolfont attribute. Note that, unlike the above, there’s no corresponding attribute to change the case as it’s usually not appropriate to change the case of a symbol (and for some symbols, such as pictographs, there’s no concept of case). If \texorpdfstring has been defined \glossentrysymbol will be defined to do:

    \texorpdfstring{TeX code}{PDF}
    +
    The TeX code part is robust and deals with the actual typesetting of the symbol. The PDF part is simply:
    +\glsentrypdfsymbol{entry-label}
    + which is defined to just do \glsentrysymbol{entry-label}. The chances are that the code in the symbol key won’t be valid in the PDF bookmarks, so you can redefine \glsentrypdfsymbol to use a more appropriate field. (If you do redefine this command, remember that it needs to fully expand.)

    +For example, if you are using glossaries-accsupp, you could use the symbolaccess field:

    \renewcommand{\glsentrypdfsymbol}[1]{% 
    + \glsentrysymbolaccess{#1}}
    +
    Alternatively, if you are using bib2gls you can use the TeX parser library to interpret a copy of the symbol field and use that. For example, with the resource options:
    replicate-fields={symbol=user1},
    +interpret-fields=user1
    +
    This copies the value of the symbol field to the user1 field (replicate-fields) and then replaces the value of the user1 field with its interpreted value (interpret-fields).

    +This means you can then do:

    \renewcommand{\glsentrypdfsymbol}[1]{% 
    + \glsentryuseri{#1}}
    +
    (You may need XeLaTeX or LuaLaTeX with this method.) This allows \glossentrysymbol to be used in a section heading with standalone definitions. See the bib2gls manual for further details about the TeX interpreter.

    +If you want to adapt a style to use another field instead of name, you can use:

    +\glossentrynameother{entry-label}{field-label}
    + This behaves just like \glossentryname (that is, it obeys the glossname attribute, uses either the glossnamefont attribute or \glsnamefont to format the text, and uses the post-name hook) but the text is obtained from the field given field-label instead of name. The field-label argument must be the internal field label (for example desc rather than description).

    + +

    + +
    +

    8.6.1. Post-Name Hooks

    +

    +The glossaries-extra package adds a hook to \glossentryname and \Glossentryname (which is used in glossary styles to display the entry’s name):

    +\glsxtrpostnamehook{entry-label}
    + This is the main post-name hook, which implements additional hooks to allow for customisation. By default, \glsxtrpostnamehook checks the indexname attribute. If the attribute exists for the category to which the entry belongs, then the name is automatically indexed using:
    \glsxtrdoautoindexname{entry-label}{indexname}
    +
    See §12 for further details.

    +The post-name hook \glsxtrpostnamehook will also use:

    +\glsxtrpostnamecategory
    + if it exists. You can use \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 “symbol” category:
    \newcommand*{\glsxtrpostnamesymbol}{\space
    + (\glsentrysymbol{\glscurrententrylabel})}
    +
    For convenience, you can use:
    +\glsdefpostname{category}{definition}
    + This is simply a shortcut for:
    \csdef{\glsxtrpostnamecategory}{definition}
    +
    Note that it doesn’t check if the command has already been defined.

    +The post-name hook also does:

    +\glsextrapostnamehook{entry-label}
    + (before \glsxtrpostnamecategory) to allow for additional non-category related code. This does nothing by default.

    + +

    + +
    +

    8.6.2. Post-Description Hooks

    +

    +The glossaries package provides the hook \glspostdescription, which is placed after the description in some of the predefined styles. The glossaries-extra-stylemods package modifies the predefined styles to ensure that they all use this hook. This provides a convenient way to make slight adjustments, such as appending content after the description, without having to define a custom glossary style.

    +The glossaries-extra package redefines \glspostdescription so that it includes the following hook:

    +

    +\glsxtrpostdescription
    + This new hook simply performs the category post-description hook:
    \newcommand*{\glsxtrpostdescription}{% 
    +  \csuse{glsxtrpostdesc\glscategory{\glscurrententrylabel}}% 
     }
    -
    -

    -

    To ensure that bib2gls can find out which entries have been used in the -document, you need the record package option: - - - -

    -
    -\usepackage[record]{glossaries-extra}
    -
    -

    If this option’s value is omitted (as above), the normal indexing will be switched off, -since 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 -xindy rule), then just use record=hybrid and continue to use \makeglossaries and -\printglossary (or \printglossaries), but you also need to instruct -bib2gls to omit sorting to save time and to prevent the sort key from being -set. -

    The .glstex file created by bib2gls is loaded using: -


    \glsxtrresourcefile[options]{filename}

    -

    -(Don’t include the file extension in ⟨filename⟩.) There’s a shortcut version -(recommended over the above) that sets ⟨filename⟩ to use \jobname: -


    \GlsXtrLoadResources[options]

    -

    -On the first use, this command is a shortcut for

    -
    -\glsxtrresourcefile[options]{\jobname} -
    -
    On subsequent use,10.1 this -command is a shortcut for
    -
    -\glsxtrresourcefile[options]{\jobname-n} -
    -
    where ⟨n⟩ is the current value of -


    \glsxtrresourcecount

    -

    -which is incremented at the end of \GlsXtrLoadResources. Any advisory notes -regarding \glsxtrresourcefile also apply to \GlsXtrLoadResources. -

    The \glsxtrresourcefile command writes the line

    -
    -\glsxtr@resource{options}{filename} -
    -
    to the .aux file and will input ⟨filename.glstex if it -exists.10.2 - - - -

    Since the .glstex file won’t exist on the first LaTeX run, the record package -option additionally switches on undefaction=warn. Any use of commands like \gls or -\glstext will produce ?? in the document, since the entries are undefined at this -point. Once bib2gls has created the .glstex file the references should be resolved. -This may cause a shift in the locations if the actual text produced once the entry is -defined is significantly larger than the placeholder ?? (as this can alter the page -breaking). -

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

    -

    Top

    10.1 Selection

    -

    The default behaviour is for bib2gls to select all entries that have a record in the -.aux file, and any dependent entries (including parent and cross-references). The -glsignore format (for example, \gls[format=glsignore]{duck}) is recognised by -bib2gls as a special ignored record. This means that it will match the selection -criteria but the record won’t be added to the location list. This means that you won’t -get spurious commas in the location list (as can happen with the other indexing -methods), so you can do, for example, - - - -

    -
    -\GlsXtrSetDefaultNumberFormat{glsignore}
    -
    -

    at the start of the front matter and - - - -

    -
    -\GlsXtrSetDefaultNumberFormat{glsnumberformat}
    -
    -

    at the start of the main matter to prevent any records in the front matter from -occurring in the location lists. -

    Note that commands like \glsaddall and \glsaddallunused don’t -work with bib2gls as the command has to iterate over the internal lists of -defined entry labels, which will be empty on the first run and on subsequent -runs will only contain those entries that have been selected by bib2gls. -
    -

    -

    If you want to add all entries to the glossary, you need to tell bib2gls this in the -options list. For example: - - - -

    -
    -\GlsXtrLoadResources[src={terms},selection={all}]
    -
    -

    This will add all entries, regardless of whether or not they have any records in the -.aux file. Those that don’t have any records will have an empty location list. See the -bib2gls user manual for more details of this option. -

    -

    -

    Top

    10.2 Sorting and Displaying the Glossary

    -

    There are many sorting options provided by bib2gls. The default is to sort -according to the system locale. If the document has a language setting, you can use -sort=doc to instruct bib2gls to sort according to that. (The language tag obtained -from tracklang’s interface is written to the .aux file.) For a multilingual document -you need to explicitly set the locale using a well-formed language tag. For -example: - - - -

    -
    -\GlsXtrLoadResources[
    -  src=terms, % data in terms.bib
    -  sort=de-DE-1996 % sort according to this locale
    -]
    -
    -

    The locale-sensitive sort methods usually ignore most punctuation so for lists of -symbols you may find it more appropriate to use one of the letter-base sort methods -that sort according to the Unicode value of each character. Alternatively you can -provide a custom rule. See the bib2gls manual for full details of all the available sort -methods. -

    Since the .glstex file only defines those references required within the document -(selected according to the selection option) and the definitions have been written in -the order corresponding to bib2gls’s sorted list, the glossaries can simply be -displayed using \printunsrtglossary (or \printunsrtglossaries), described in -§11.2 Display All Entries Without Sorting or Indexing. -

    Suppose the .bib examples shown above have been stored in the files terms.bib, -abbrvs.bib and symbols.bib which may either be in the current directory or on -TeX’s path. Then the document might look like: - - - -

    -
    -\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}
    -
    -

    The document build process (assuming the document is called mydoc) is: - - - -

    -
    -pdflatex mydoc
    -bib2gls mydoc
    -pdflatex mydoc
    -
    -

    This creates a single glossary containing the entries: bird, duck, goose, html, M, -shtml and ssi (in that order). The bird, shtml and M entries were added because -bib2gls detected (from the .aux file) that they had been used in the document. The -other entries were added because bib2gls detected (from the .bib files) that they -are referenced by the used entries. In the case of duck and goose, they are -in the see field for bird. In the case of ssi and html, they are referenced -in the description field of 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: - - - -

    -
    -\documentclass{article}
    -\usepackage[record,abbreviations,symbols]{glossaries-extra}
    -\setabbreviationstyle{long-short-desc}
    -\GlsXtrLoadResources[src={terms},sort={en-GB},type=main]
    -\GlsXtrLoadResources
    - [src={abbrvs},sort={letter-nocase},type=abbreviations]
    -\GlsXtrLoadResources
    - [src={symbols},sort={use},type={symbols}]
    -\begin{document}
    -\gls{bird}
    -\gls{shtml}
    -\gls{M}
    -\printunsrtglossaries
    -\end{document}
    -
    -

    -

    Or you can have multiple instance of \GlsXtrLoadResources with the same -type, which will produce a glossary with ordered sub-blocks. For example: - - - -

    -
    -\documentclass{article}
    -\usepackage[record,style=indexgroup]{glossaries-extra}
    -\setabbreviationstyle{long-short-desc}
    -\GlsXtrLoadResources
    - [src={abbrvs},sort={letter-nocase},type=main,
    -  group={Abbreviations}]
    -\GlsXtrLoadResources
    - [src={symbols},sort={use},type=main,
    -  group={Symbols}]
    -\GlsXtrLoadResources[src={terms},sort={en-GB},type=main]
    -\begin{document}
    -\gls{bird}
    -\gls{shtml}
    -\gls{M}
    -\printunsrtglossaries
    -\end{document}
    -
    -

    This will result in a glossary where the first group has the title “Abbreviations”, the -second group has the title “Symbols” and then follow the usual letter groups. Note -that for this example to work, you must run bib2gls with the --group (or -g) -switch. For example, if the document is called myDoc.tex: - - - -

    -
    -pdflatex myDoc
    -bib2gls -g myDoc
    -pdflatex myDoc
    -
    -

    The value of the group field must always be a label. You can set the corresponding -title with \glsxtrsetgrouptitle (see §2.11 Glossary Style -Modifications). If no title is set then the label is used as the group title. -

    You can provide your own custom sort rule. For example, if you are using -XƎLATEX or LuaLATEX:

    -
    -\GlsXtrLoadResources[ -
      src=terms, % entries in terms.bib -
      sort=custom, % custom sort rule -
      sort-rule={% required with sort=custom -
      < æ;Æ < a;á;å;ä,Ä;Á;Å;Ä < b,B -
      < c;ć,C;Ć < d,D < e;é,E;É < f,F < g,G -
      < h,H < i;í,I;Í < j,J < l;ł,L;Ł < m,M < n,N -
      < o;ö;ø,O;Ö < p,P < q,Q < r,R < s;ś,S;Ś -
      < t,T < u;ú,U;Ú < v,V < w,W < x,X < y,Y < -
      z;ż,Z;Ż -
      } -
    ] -
    -
    Remember that if you are using inputenc then extended characters, such as é or ø, -are active and will expand when written to the .aux file. So with PDFLaTeX the -above would have to be changed to protect against expansion. Some of the -options, including sort-rule, allow Unicode characters to be indicated in the -format \uhex⟩ (or \u ⟨hex⟩) in the .aux file. bib2gls will recognise this as the -character given by the hexadecimal value ⟨hex⟩. The \u also needs protection from -expansion, so with a non-Unicode aware engine, the character æ needs to be -written as \string\uE6 and so on. This is quite cumbersome, but you can -use the shortcut \glshex E6 instead, so the above needs to be written as: -
    -
    -\GlsXtrLoadResources[ -
      src=terms, % entries in terms.bib -
      sort=custom, % custom sort rule - - - -
      sort-rule={% required with sort=custom -
      < \glshex E6;\glshex C6 -
      < a;\glshex E1;\glshex E5,\glshex E4,A;\glshex C1;\glshex C5;\glshex C4 -
      < b,B < c;\glshex 0107,C;\glshex 0106 < d,D -
      < e;\glshex E9,E;\glshex C9 < f,F < g,G -
      < h,H < i;\glshex ED,I;\glshex CD < j,J -
      < l;\glshex 0142,L;\glshex 0141 < m,M < n,N -
      < o;\glshex F6;\glshex F8,O;\glshex D6;\glshex D8 -
      < p,P < q,Q < r,R < s;\glshex 013F,S;\glshex 015A -
      < t,T < u;\glshex FA,U;\glshex DA < v,V < w,W < x,X < y,Y -
      < z;\glshex 017C,Z;\glshex 017B -
      }] -
    -
    -

    -

    -

    Top

    10.3 The glossaries-extra-bib2gls package

    -

    The package option record=only (or simply record) automatically loads the -supplementary package glossaries-extra-bib2gls, which provides some commands that -are specific to bib2gls. The package isn’t loaded by record=hybrid as that option is -intended for sorting with makeindex or xindy and it is expected that the sorting will -be switched off (with the resource option sort=none). -

    If glossaries-extra-bib2gls is loaded via the record package option then the check for -associated language resource files (see §15 Multi-Lingual Support) -will also search for the existence of glossariesxtr-script.ldf for each -document dialect (where ⟨script⟩ is the four letter script identifier, such as -Latn). -

    This package provides some shortcut commands that use \printunsrtglossary if the -relevant package option has defined the associated glossary: \printunsrtabbreviations, -\printunsrtacronyms, \printunsrtsymbols, \printunsrtnumbers and -\printunsrtindex. -

    The savenumberlist package option doesn’t have any effect with bib2gls. -The location lists are saved by default, so glossaries-extra-bib2gls patches -\glsentrynumberlist and \glsdisplaynumberlist to work with the location -field -


    \glsxtrprovidecommand{cs}[n][default]{definition}

    -

    -This command is intended for use in @preamble. It’s simply defined to -\providecommand in glossaries-extra-bib2gls but bib2gls’s interpreter treats it as -\renewcommand. This means that you can override bib2gls’s internal definition of a -command without overriding the command definition in the document (if it’s already -defined before the resource file is input). For example - - - -

    -
    -@preamble{"\glsxtrprovidecommand{\int}{integral}"}
    -
    -

    This will force bib2gls to treat \int as the word “integral” to assist sorting but if -this preamble code is written to the .glstex file (as it is by default) then it won’t -override the current definition (provided by the kernel or redefined by a -package). -

    The helper commands in the resource files are defined using \providecommand. -For many of them, if you want to provide an alternative definition then you need to -define the command before the resource file is loaded. There are a few that may be -redefined afterwards but if you use \renewcommand then you will get an error on the -first LaTeX run when the .glstex file doesn’t exist. In this case, you may prefer to -use: -


    \glsrenewcommand{cs}[n][default]{definition}

    -

    -This behaves like \renewcommand but only generates a warning rather than an error -if the command isn’t already defined so it won’t interrupt the document -build. -


    \GlsXtrIndexCounterLink{text}{label}

    -

    -If the \hyperref command has been defined (that is, hyperref has been -loaded before glossaries-extra) then this command checks for the existence of -the indexcounter field. If this field is set for the entry given by ⟨label⟩, this -command does \hyperref[wrglossary.value]{text}, where ⟨value⟩ is the -value of the indexcounter field. If the field isn’t set or if \hyperref hasn’t -been defined, this just does ⟨text⟩. This command is provided for use with the -indexcounter package option combined with bib2gls’s save-index-counter -resource option. See the bib2gls manual for further details (at least version -1.4). -

    If you use the set-widest resource option, bib2gls v1.8+ will now -use: -


    \glsxtrSetWidest{type}{level}{text}

    -

    -(if it has been defined) to set the widest name for the given glossary type and level. -This allows for both the alttree style and the styles provided by glossary-longextra, -which need to know the widest name. -

    If bib2gls can’t determine the widest name (typically because the name field -consists of commands that aren’t recognised by the interpreter) then bib2gls v1.8+ -will now use: -


    \glsxtrSetWidestFallback{max depth}{list}

    -

    -(if defined). Currently the maximum hierarchical depth ⟨max depth⟩ may only be 0 or -2. This command requires commands provided by the glossaries-extra-stylemods - - - -package with the alttree style enabled. In this case, it may be simpler to just use -\glssetwidest. -

    -

    -

    Top

    10.3.1 Supplemental Locations

    -


    \glsxtrdisplaysupploc{prefix}{counter}{format}{src}{location} -

    -

    -This is used by bib2gls version 1.7+ for supplemental locations, instead of using -\glsxtrsupphypernumber with the externallocation attribute. This command sets up -the location counter and prefix (used in the formation of hyperlinks) and then -uses -


    \glsxtrmultisupplocation{location}{src}{format}

    -

    -to format the actual location (with an external hyperlink, if supported). -

    -

    -

    Top

    10.3.2 Nameref Record

    -

    Normally locations are recorded in the .aux file in the form: -


    \glsxtr@record{label}{prefix}{counter}{format}{location} -

    -

    -The record=nameref option, which requires at least bib2gls v1.8, instead -uses: -


    \glsxtr@record@nameref{label}{prefix}{counter}{format}{location} -{title}{href}{hcounter}

    -

    -where ⟨title⟩ is obtained from \@currentlabelname and ⟨href ⟩ is obtained from -\@currentHref. These commands require hyperref. If they are undefined, ⟨title⟩ and -⟨href ⟩ will be left empty and bib2gls will treat it as a regular record. -

    Be careful with this option as ⟨href ⟩ will globally change on every instance of -\refstepcounter but ⟨title⟩ won’t necessarily change. It can therefore cause -unexpected behaviour.
    -

    -

    The final argument ⟨hcounter⟩ is obtained from \theHcounter⟩ which provides the -partial target name associated with the indexing counter. With the original -makeindex/xindy approach, it’s not possible to include this information in the -location, so the base glossaries package attempts to derive a prefix from which the -⟨hcounter⟩ value can be reconstituted by appending the prefix. Unfortunately, not all -definitions of \theHcounter⟩ are in the form ⟨prefix\thecounter⟩ (most notably the - - - -equation counter with chapters) so this can fail. -

    Since bib2gls is customized specifically for use with glossaries-extra, it’s now -possible to save ⟨hcounter⟩, so the record=nameref option does this. By providing both -⟨href ⟩ and ⟨hcounter⟩, you can determine which target you would rather use. The default -is to use ⟨hcounter⟩, which will take you to the place where the corresponding counter -was incremented with \refstepcounter. However, you may choose to switch to -using the ⟨href ⟩ target, which will take you to the nearest target before the indexing -took place. -

    With bib2gls v1.8+, normal locations are displayed using: -


    \glsnoidxdisplayloc{prefix}{counter}{format}{location}

    -

    -This is provided by the base glossaries package and is simply defined to do: -


    \setentrycounter[prefix]{counter}\csuse{format}{location} -

    -

    -Earlier versions of bib2gls only used this in the loclist field and explicitly used -\setentrycounter in the location field followed by \format{location}, which follows -the code that’s created with the default makeindex setting. The \setentrycounter -command sets up the prefix needed for \glshypernumber to reform the target name -from the given location. -

    The locations identified by \glsxtr@record@nameref are written by bib2gls to -the location list using: -


    \glsxtrdisplaylocnameref{prefix}{counter}{format}{location} -{title}{href}{hcounter}{file}

    -

    -With normal internal locations, ⟨file⟩ will always be empty. With supplemental -locations, ⟨file⟩ will be the external file reference. -

    The default definition is: - - - -

    -
    -\newcommand*{\glsxtrdisplaylocnameref}[8]{%
    -  \ifstrequal{#2}{equation}%
    -  {\glsxtrnamereflink{#3}{(#4)}{#2.#7}{#8}}%
    -  {%
    -     \ifstrempty{#5}%
    -     {%
    -       \glsxtrnamereflink{#3}{#4}{#2.#7}{#8}%
    -     }%
    -     {%
    -       \ifstrequal{#2}{page}%
    -       {\glsxtrnamereflink{#3}{#4}{#2.#7}{#8}}%
    -       {\glsxtrnamereflink{#3}{#5}{#2.#7}{#8}}%
    -     }%
    -  }%
    +

    +

    +The punctuation that is automatically inserted with postdot or postpunc is placed after \glsxtrpostdescription, not before.
    +

    +If you want to modify the hook for all entries (without affecting the postpunc or postdot options), then redefine \glsxtrpostdescription. If you want to adjust this hook according to the entry’s category, then you can simply redefine the category post-description hook.

    +\glsxtrpostdesccategory
    + Some common category post-description hooks are provided:
    +\glsxtrpostdescgeneralinitial: empty
    + The post-description hook for the general category.

    +

    +\glsxtrpostdescterminitial: empty
    + The post-description hook for the term category.

    +

    +\glsxtrpostdescacronyminitial: empty
    + The post-description hook for the acronym category.

    +

    +\glsxtrpostdescabbreviationinitial: empty
    + The post-description hook for the abbreviation category.

    +The above all do nothing by default. You can redefine them with \renewcommand or use:

    +\glsdefpostdesc{category}{definition}
    + This will define (or redefine) \glsxtrpostdesccategory. The package options symbols, numbers and index provide corresponding category post-description hooks.

    +You can reference the current entry within these hooks using \glscurrententrylabel, which is defined within the glossary (any of the \print…glossary commands) and also within the standalone commands, such as \glsxtrglossentry.

    +

    +\glsxtrnopostpunc
    + Suppresses the post-description punctuation that is automatically inserted by package options postdot or postpunc.

    +The glossaries package provides \nopostdesc, which may be used in the description to suppress the post-description hook for that entry. This suppresses both the post-description punctuation and the additional \glsxtrpostdescription hook. If you only want to suppress to punctuation, then use \glsxtrnopostpunc instead.

    +

    +The post-description hooks are implemented by \glspostdescription within the glossary style. If this command isn’t used in the style, then the additional hooks won’t be available.
    +

    +

    +\glsxtrrestorepostpunc
    + If this command is placed in the definition of \glsxtrpostdescription or added to the category post-link hook, then it will counter-act any use of \glsxtrnopostpunc to restore the post-description punctuation.

    +These commands have no effect outside of the glossary (except with standalone entries that use \glsxtractivatenopost and \glspostdescription, see §8.5).

    + +

    + +
    +

    8.6.3. Number (Location) List

    +

    +The location list is now placed inside the argument of:

    +\GlsXtrFormatLocationList{location list}
    + This is internally used by \glossaryentrynumbers. The nonumberlist option redefines \glossaryentrynumbers so that it doesn’t display the number list, but it still saves the number list in case it’s required. The desired font formatting for the location list can now more easily be set by redefining \GlsXtrFormatLocationList, without interfering with \glossaryentrynumbers.

    +

    +If you want to suppress the number list always use the nonumberlist option instead of redefining \glossaryentrynumbers to do nothing.
    +

    +Note that if you are using the “unsrt” family of commands the location list will only be present if the appropriate field has been set (see §8.4.2). There’s no need to save locations with bib2gls or with \printnoidxglossary because this is performed automatically (unlike \printglossary where the trick with \glossaryentrynumbers is required to capture the location list).

    +Sometimes users like to insert “page” or “pages” in front of the location list. This is quite fiddly to do with the base glossaries package, but glossaries-extra provides a way of doing this. First you need to enable this option and specify the text to display using:

    +\GlsXtrEnablePreLocationTag{page tag}{pages tag}
    + where page tag is the text to display if the location list only contains a single location and pages tag is the text to display otherwise. For example:
    \GlsXtrEnablePreLocationTag{Page: }{Pages: }
    +
    An extra run is required when using this command.

    +

    +Use glsignore not @gobble as the format if you want to suppress the page number (and only index the entry once).
    +

    +See the accompanying sample file sample-pages.tex for an example.

    +

    +Note that bib2gls the loc-prefix resource option inserts a prefix at the start of non-empty location lists, which can be used as an alternative to \GlsXtrEnablePreLocationTag. There is also a corresponding loc-suffix option to provide a suffix.
    +

    +Location lists displayed with \printnoidxglossary internally use: \glsnoidxdisplayloc This command is provided by glossaries, but is modified by glossaries-extra to check for the start and end range formation identifiers ( and ) 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

    +\glsxtrdisplaysingleloc{format}{location}
    + otherwise it uses
    +\glsxtrdisplaystartloc{format}{location}
    + for the start of a range (where the identifier has been stripped from format) or
    +\glsxtrdisplayendloc{format}{location}
    + for the end of a range (where the identifier has been stripped from format).

    +By default the start range command saves the format in:

    +\glsxtrlocrangefmt
    + and does:
    \glsxtrdisplaysingleloc{format}{location}
    +
    (If the format is empty, it will be replaced with glsnumberformat.)

    +The end command checks that the format matches the start of the range, does:

    +\glsxtrdisplayendlochook
    + (which does nothing by default), followed by:
    \glsxtrdisplaysingleloc{format}{location}
    +
    and then sets \glsxtrlocrangefmt to empty.

    +This means that the list

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

    + +

    + +
    +

    8.6.4. Indexing Groups

    +

    +The letter or symbol or number groups are a by-product of the indexing application. These are usually determined during the sorting according to the first (significant) character of the sort value. If the first character is an alphabetical character, the group is a letter group, with the group label the same as the letter. If the sort value is numeric, the group is a number group, with the label glsnumbers, otherwise the group is a symbol group with the label glssymbols.

    +

    +For the “unsrt” family of commands, see §8.4.1 for more details about how group headers are inserted into the glossary. Only those commands are able to support sub-groups.
    +

    +With xindy, the number group is automatically provided with the xindy=glsnumbers package option. It can be suppressed with xindy={glsnumbers=false} (see the base glossaries user manual for further details).

    +With bib2gls, group formation requires --group (or -g). This setting is off by default to allow for a faster process where no groups are required. When this setting is on, there are additional groups, depending on the sort method. For example, if you use a date-time sort method, then you will have date-time groups.

    +

    +Take care not to confusion groups with hierarchy. See Gallery: Logical Glossary Divisions (type vs group vs parent) for the difference between the group, type and parent fields.
    +

    +The base glossaries package provides a simplistic way of assigning a title to a group to allow for the use of language-sensitive commands \glssymbolsgroupname and \glsnumbersgroupname, which correspond to the glssymbols and glsnumbers groups. The more flexible groups that can be created with bib2gls require a better approach that is less likely to cause a conflict.

    +

    +\glsxtrsetgrouptitle{group-label}{group-title}
    + Globally assigns the given title group-title to the group identified by group-label. This command is used implicitly within the glstex file to assign titles to groups obtained by bib2gls. Judicious definitions of the helper commands provided by bib2gls can provide a more flexible way of assigning groups.

    +

    +\glsxtrlocalsetgrouptitle{group-label}{group-title}
    + As above but the assignment is local.

    +

    +\glsxtrgetgrouptitle{group-label}{cs}
    + Obtains the title corresponding to the group identified by group-label and stores the result in cs. This command first checks if a title has been assigned by \glsxtrgetgrouptitle and then, for compatibility with the base glossaries package, it will test for the existence of \group-labelgroupname if group-label is glssymbols or glsnumbers or a single character. If no title is obtained from any of these tests, then the title will be assumed to be the same as the label.

    +

    +The \printnoidxglossary command has a slightly different method, which uses the character code so it’s not suitable with UTF-8. In general, \printnoidxglossary is best avoided, where possible, and is inappropriate for locale-sensitive sorting.
    +

    + +

    + +
    +

    8.6.5. glossaries-extra-stylemods

    +

    +The glossaries-extra-stylemods package (more conveniently loaded through the glossaries-extra stylemods option) modifies some of the predefined styles that are provided with the glossaries package.

    +

    +Any styles loaded after glossaries-extra-stylemods won’t be patched.
    +

    +The stylemods option may be provided without a value, in which case all currently defined styles will be patched. Alternatively, you can supply a comma-separated list as the value, which indicates that, for each element in the list, the package glossary-element should be loaded and, if it’s a package provided with the base glossaries package, patched. For example:

    \usepackage{glossaries-extra}
    +\usepackage{glossary-longragged}
    +\usepackage{glossary-mcols}
    +\usepackage{glossaries-extra-stylemods}
    +\setglossarystyle{mcolindex}
    +
    is equivalent to:
    \usepackage[stylemods={longragged,mcols},style=mcolindex]{glossaries-extra}
    +
    You may prefer to combine stylemods=with nostyles to reduce the overhead of loading unnecessary packages.

    +The glossaries-extra-stylemods package adjusts the predefined styles so that they all use \glspostdescription and replaces any hard-coded space before the location list with

    +\glsxtrprelocationinitial: \space
    + You can therefore redefine that command in combination with postpunc to alter the separator before the location list. For example, to have a comma followed by \hfil:
    \usepackage[postpunc=comma,stylemods]{glossaries-extra}
    +\renewcommand{\glsxtrprelocation}{\hfil}
    +

    +

    +Be careful with doing this as it will look odd if the location list is missing.
    +

    +With bib2gls you can instead redefine \glsxtrprelocation to do nothing and set the location prefixes with loc-prefix which will only apply if the entry has a location list. Alternatively, you could redefine \glsxtrprelocation to check if the location field is set.

    + +

    + +
    +

    8.6.5.1. Inline Style

    +

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

    + +

    + +
    +

    8.6.5.2. Tabular Styles

    +

    +The tabular-like styles, such as long are adjusted so that the \ifglsnogroupskip conditional (set with nogroupskip) is moved outside of the definition of \glsgroupskip to avoid problems that cause an “Incomplete \iftrue error with \printunsrtglossary and \printnoidxglossary. This means that if you want to change this conditional using \setupglossaries or using the nogroupskip option in \printglossary, \printnoidxglossary or \printunsrtglossary, you must also reset the glossary style.

    + +

    + +
    +

    8.6.5.3. List Styles

    +

    +The list styles use:

    +\glslistprelocationinitial: \glsxtrprelocation
    + (which defaults to \glsxtrprelocation) for top-level items and:
    +\glslistchildprelocationinitial: \glslistprelocation
    + (which defaults to \glslistprelocation) for child items.

    +The description (including the post-description hook) is governed by:

    +\glslistdesc{entry-label}
    + for the list and altlist styles (but not the listdotted variations).

    +The hard-coded \item[target and name] is replaced with:

    +\glslistitem{entry-label}
    + The altlist styles use:
    +\glsaltlistitem{entry-label}
    + which internally uses \glslistitem. The header item (for the list styles that should the group title, such as listgroup) is governed by:
    +\glslistgroupheaderitem{group-label}{header code}
    + This ignores the group-label by default and simply places the second argument in the optional argument of \item. The header code is the formatted group title, possibly including a hypertarget. The spacing after the group item is given by:
    +\glslistgroupafterheader
    +

    +For just the list style and its letter group variations (not the altlist or listdotted variations) the location list for child entries is followed by:

    +\glslistchildpostlocationinitial: .
    + which defaults to a full stop.

    +The default value of \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 \hsize isn’t set until the start of the document.

    +The separator between groups (if not nogroupskip) is now given by:

    +\glslistgroupskip
    + This defaults to \indexspace with penalties to deter page breaks. This command isn’t used if nogroupskip is set.

    + +

    + +
    +

    8.6.5.4. Tree Styles

    +

    +The group headings for styles like treegroup are formatted with:

    +\glstreegroupheaderfmt{text}
    + The navigation elements for styles like treehypergroup is formatted with:
    +\glstreenavigationfmt{text}
    + The above two commands are defined in terms of \glstreenamefmt, since that was the command originally used for the group headings and navigation. This now allows these different elements to be defined independently, but the most common redefinition is for \glstreenamefmt to remove the bold in the name. If the bold is still required for the group heading and navigation elements, then both other commands also need redefining. To simplify matters, all three commands have been defined to use:
    +\glstreedefaultnamefmt{text}
    + This simply does \textbf{text}.

    +This means that if you want to change all three to use a particular style you only need to redefine \glstreedefaultnamefmt, but if you only want to redefine \glstreenamefmt without affecting the other two commands, then you now can.

    +The separator between groups without headers is given by:

    +\glstreegroupskip
    + This defaults to just \indexspace without penalties. This command isn’t used if nogroupskip is set. (The penalties introduced in v1.41 were moved to \glstreegroupheaderskip in v1.42 as they are inappropriate when there’s no header.)

    +The separator between groups with headers is now given by:

    +\glstreegroupheaderskip
    + This defaults to \glstreegroupskip with penalties to deter page breaks after the group heading.

    +The styles that display the group titles now use:

    +\glstreePreHeader{group-label}{group-title}
    + This does nothing by default and is inserted before the group title. You can redefine it to add the group title to the PDF bookmarks. For example, if the glossary title uses \chapter then:
    \renewcommand{\glstreePreHeader}[2]{% 
    + \pdfbookmark[1]{#2}{\currentglossary.#1}% 
     }
    -
    -

    which uses: -


    \glsxtrnamereflink{format}{title}{target}{file}

    -

    -This ignores the ⟨prefix⟩, ⟨counter⟩ and {location} arguments and instead creates a -hyperlink with the target name obtained from ⟨target⟩ (and ⟨file⟩, if not empty). -

    Since pages and equations typically don’t have titles, the default definition of -\glsxtrdisplaylocnameref checks the counter was used as the location. If it’s page -or if ⟨title⟩ is empty, then just the location is used as the hyperlink text. If the counter -equation, then the text is the location in parentheses. Otherwise the text is obtained -from ⟨title⟩. -

    If ⟨file⟩ is empty an internal link is created with: -


    \glsxtrfmtinternalnameref{target}{format}{title}

    -

    -otherwise an external link is created with: -


    \glsxtrfmtexternalnameref{target}{format}{title}{file}

    -

    -The ⟨file⟩ argument is set by bib2gls for supplemental locations. -

    Here’s alternative definition that uses the ⟨prefix⟩ and ⟨counter⟩ to reform the -target name (as \glsnoidxdisplayloc) but uses the ⟨title⟩ as the hyperlink -text: - - - -

    -
    -\renewcommand*{\glsxtrdisplaylocnameref}[7]{%
    - \glsxtrnamereflink{#3}{#5}{#6}{#7}%
    +
    will insert section-level bookmarks. The use of \currentglossary helps to provide unique bookmark labels in the event of multiple glossaries.

    +The glossary-tree package provides the commands

    +\glstreepredesc
    + and
    +\glstreechildpredesc
    + (which both default to a space) and uses them in the tree-like styles, but not for the alttree style. The glossaries-extra-stylemods package modifies the alttree style so that it has equivalent hooks:
    +\glsalttreepredesc
    + and
    +\glsalttreechildpredesc
    + These do nothing by default.

    +The index-like and tree-like styles insert the pre-location list space with:

    +\glstreeprelocationinitial: \glsxtrprelocation
    + (which defaults to \glsxtrprelocation) for top-level items and
    +\glstreechildprelocationinitial: \glstreeprelocation
    + (which defaults to \glstreeprelocation) for child items.

    +The styles like treenoname use:

    +\glstreenonamedesc{entry-label}
    + to display the pre-description separator, the description and the post-description hook. Similarly for the symbol:
    +\glstreenonamesymbol{entry-label}
    + The above are just used for top-level entries. Child entries don’t have the name or symbol displayed for the treenoname styles, so there’s only a command for the child description:
    +\glstreenonamechilddesc{entry-label}
    +

    +For the tree styles (but not the treenoname or alttree styles), the description is displayed using:

    +\glstreedesc{entry-label}
    + and the symbol with:
    +\glstreesymbol{entry-label}
    + Again the above two commands are just for top-level entries. The child entries use:
    +\glstreechilddesc{entry-label}
    + for the description and
    +\glstreechildsymbol{entry-label}
    + for the symbol. There are now wrapper commands for \glstreedesc and \glstreechilddesc that check for the description and symbol to determine what separator to use before the page list:
    +\glstreeDescLoc{entry-label}{location list}
    + for top-level entries and
    +\glstreeChildDescLoc{entry-label}{location list}
    + for sub-entries.

    +If either the symbol or description is present these will use \glstreeprelocation or \glstreechildprelocation, respectively. Otherwise, both will use:

    +\glstreeNoDescSymbolPreLocation
    + The default is a space. This means that you could have, say, a comma followed by a space for terms that are simply an alias, but just have a space for terms that have a description that ends with a full stop (or that just have a symbol without a description) where the comma would be inappropriate.

    +

    +Version 1.42 has corrected an error that was introduced to v1.41 that caused the name to run into the location list if there was no symbol and no description.
    +

    +There are some additional commands for use with the alttree style to make it easier to modify. These commands are only defined if the glossary-tree package has already been loaded, which is typically the case unless the notree or nostyles option has been used when loading glossaries.

    +

    +\gglssetwidest[level]{name}
    + This is like \glssetwidest but performs a global assignment.

    +

    +\eglssetwidest[level]{name}
    + This is like \glssetwidest but expands name.

    +

    +\xglssetwidest[level]{name}
    + This is like \eglssetwidest but performs a global assignment.

    +The following only set the value if name is wider than the current value. Local update:

    +\glsupdatewidest[level]{name}
    + Global update:
    +\gglsupdatewidest[level]{name}
    + Locale update (expands name):
    +\eglsupdatewidest[level]{name}
    + Global update (expands name):
    +\xglsupdatewidest[level]{name}
    +

    +The widest entry value can later be retrieved using:

    +\glsgetwidestname
    + which expands to the widest top-level name and:
    +\glsgetwidestsubname{level}
    + expands to either the widest name for the given hierarchical level or to the widest top-level name, if no widest name set for level.

    +Note that if you are using bib2gls, you can use the resource option set-widest which will try to determine the widest name of all the selected entries. This isn’t guaranteed to work as it may depend on fonts or commands that bib2gls can’t replicate, but it should be suitable for names that just consist of text, and can be more efficient than iterating over all the defined entries using TeX.

    +The command \glsfindwidesttoplevelname provided by glossary-tree has a CamelCase synonym:

    +\glsFindWidestTopLevelName
    + Similar commands are also provided. If the optional glossary labels is omitted, the list of all non-ignored glossaries is assumed.
    +\glsFindWidestUsedTopLevelName[glossary labels]
    + This has an additional check that the entry has been used. Naturally this is only useful if the glossaries that use the 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.)

    +

    +\glsFindWidestUsedAnyName[glossary labels]
    + This is like the previous command but if doesn’t check the parent key. This is useful if all hierarchical levels should have the same width for the name.

    +

    +\glsFindWidestAnyName[glossary labels]
    + This is like the previous command but doesn’t check if the entry has been used.

    +

    +\glsFindWidestUsedLevelTwo[glossary labels]
    + This is like \glsFindWidestUsedTopLevelName but also sets the first two sub-levels as well. Any entry that has a great-grandparent is ignored.

    +

    +\glsFindWidestLevelTwo[glossary labels]
    + This is like the previous command but doesn’t check if the entry has been used.

    +

    +\glsFindWidestUsedAnyNameSymbol[glossary labels]{register}
    + This is like \glsFindWidestUsedAnyName but also measures the symbol. The length of the widest symbol is stored in register.

    +

    +\glsFindWidestAnyNameSymbol[glossary labels]{register}
    + This is like the previous command but it doesn’t check if the entry has been used.

    +

    +\glsFindWidestUsedAnyNameSymbolLocation[glossary labels]{register1}{register2}
    + This is like \glsFindWidestUsedAnyNameSymbol but also measures the location list. This requires \glsentrynumberlist. The length of the widest symbol is stored in register1 and the length of the widest location list is stored in register2.

    +

    +\glsFindWidestAnyNameSymbolLocation[glossary labels]{register1}{register2}
    + This is like the previous command but it doesn’t check if the entry has been used.

    +

    +\glsFindWidestUsedAnyNameLocation[glossary labels]{register}
    + This is like \glsFindWidestUsedAnyNameSymbolLocation but doesn’t measure the symbol. The length of the widest location list is stored in register.

    +

    +\glsFindWidestAnyNameLocation[glossary labels]{register}
    + This is like the previous command but doesn’t check if the entry has been used.

    +The layout of the symbol, description and location list is governed by:

    +\glsxtralttreeSymbolDescLocation{entry-label}{location list}
    + for top-level entries and
    +\glsxtralttreeSubSymbolDescLocation{entry-label}{location list}
    + for sub-entries.

    +There is now a user level command that performs the initialisation for the alttree style:

    +\glsxtralttreeInit
    + The paragraph indent for subsequent paragraphs in multi-paragraph descriptions is provided by the length:
    +\glsxtrAltTreeIndent
    +

    +For additional commands that are available with the alttree style, see the documented code (glossaries-extra-code.pdf). See also the accompanying sample files sample-alttree.tex, sample-alttree-sym.tex and sample-alttree-marginpar.tex.

    + +

    + +
    +

    8.7. New Glossary Styles

    +

    +The glossaries-extra package comes with some new styles. The associated style package needs to be loaded. This can be done with \usepackage but it’s simpler to use the stylemods option. For example:

    \usepackage[stylemods=bookindex,style=bookindex]{glossaries-extra}
    +
    If you don’t require any of the base styles, use nostyles (but note that some style packages automatically load another style package if it the style builds on an existing one).

    + +

    + +
    +

    8.7.1. glossary-bookindex package

    +

    +The glossary-bookindex package provides the glossary style bookindex. This is very similar to the mcolindexgroup style but is designed for indexes, so by default only the name and location list are displayed. This style is demonstrated in Example 146 (using bib2gls). Note that some entries don’t have location lists because they weren’t recorded in the document, but were included as dependencies. See §5.9.1 for dealing with cross-references that may not be required.

    +

    +Example 146: The bookindex style 📥🖹 📥🖺

    +Example document demonstrating the bookindex style.

    +

    +The bookindex style only supports a maximum hierarchical level of 2 (top-level, level 1 and level 2). It’s primarily designed for use with bib2gls. It may be used with other indexing options, but some features may not be present and UTF-8 characters may cause a problem with non-Unicode engines in letter group headings or PDF bookmarks. (bib2gls uses numeric identifies by default to avoid these problems, see §8.4.1.)

    +The number of columns is given by:

    +\glsxtrbookindexcolsinitial: 2
    + which defaults to 2.

    +This style uses the multicols environment. If the command:

    +\glsxtrbookindexcolspread
    + isn’t empty then it’s supplied as the optional argument following \begin{multicols}{n}. You can switch from multicols to multicols* by redefining:
    +\glsxtrbookindexmulticolsenv
    + For example:
    \renewcommand{\glsxtrbookindexmulticolsenv}{multicols*}
    +

    +Each top-level entry is displayed using:

    +\glsxtrbookindexname{entry-label}
    + This just does \glossentryname{entry-label} by default. For example, if you want the symbol to be included:
    \renewcommand*{\glsxtrbookindexname}[1]{% 
    + \glossentryname{#1}% 
    + \ifglshassymbol{#1}{\space (\glossentrysymbol{#1})}{}% 
     }
    -
    -

    which uses: -


    \glsxtrnameloclink{prefix}{counter}{format}{location}{title} -{file}

    -

    -This uses the same commands as \glsxtrnamereflink to produce the hyperlinks. -

    In both cases, the link is encapsulated with the text-block command whose -name is given by ⟨format⟩, but \glshypernumber is first locally redefined to -\@firstofone to prevent a conflict with the usual location hyperlink formation. -This means that if the ⟨format⟩ is hyperbf then it will simply behave like -textbf. -

    For compactness, bib2gls merges normal records if the ⟨prefix⟩, ⟨counter⟩ and -⟨location⟩ all match. (An order of precedence can be provided for format conflicts.) -With nameref records, you can use the --merge-nameref-on switch provided by -bib2gls v1.8+ to determine how to merge nameref records. This switch -must be followed by one of the following keywords: hcounter (merge on -⟨hcounter⟩, default) href (merge on ⟨href ⟩), title (merge on ⟨title⟩) and location -(merge on ⟨location⟩, as regular records). In all cases, the ⟨counter⟩ must also -match. -

    -

    -

    Top

    10.3.3 Helper Commands for Resource Options

    -


    \glshex

    -

    -This is just defined as \string\u, which is required when you need to indicate a -Unicode character in the form \uhex⟩ in some of the resource options (as illustrated -above). -


    \glscapturedgroup

    -

    -This is just defined as \string\$ and is used for the captured group reference in a -replacement part of a regular expression substitution (requires at least bib2gls -version 1.5). For example: - - - -

    -
    -sort-replace={{([a-zA-Z])\string\.}{\glscapturedgroup1}}
    -
    -

    This only removes a full stop that follows any of the characters a,…,z or -A,…,Z. -

    If you use the save-child-count resource option, you can test if the childcount -field is non-zero using: -


    \GlsXtrIfHasNonZeroChildCount{label}{true}{false}

    -

    -This internally uses \GlsXtrIfFieldNonZero and will do ⟨false⟩ if the field isn’t -set. Within ⟨true⟩ and ⟨false⟩ you can use \glscurrentfieldvalue to access -the value. (It will be 0 in ⟨false⟩ if the field isn’t set.) As from v1.47, there -is also a starred version which uses \GlsXtrIfFieldNonZero* (don’t add -grouping). -

    A convenient shortcut for use in the entry-type-aliases setting: -


    \GlsXtrBibTeXEntryAliases

    -

    -This provides aliases for BibTeX’s standard entry types to bib2gls’s @bibtexentry -entry type (requires at least bib2gls version 1.4). -

    You may also want to provide storage keys for BibTeX’s standard fields rather -than having to alias them all. This can be done with: -


    \GlsXtrProvideBibTeXFields

    -

    -Note that BibTeX’s type field clashes with the glossaries package’s type key, so -this command provides the key bibtextype instead. You can alias it with -field-aliases=type=bibtextype in the resource options. Each storage -key is provided with a convenient command to access the value in the form -\glsxtrbibfield⟩. For example, \glsxtrbibaddress. The bibtextype field can be -accessed with \glsxtrbibtype. Each of these commands takes the entry label as the -sole argument. -

    The glossaries-extra-bib2gls package also provides definitions of the missing -mathematical Greek commands: \Alpha, \Beta, \Epsilon, \Zeta, \Eta, \Iota, -\Kappa, \Mu, \Nu, \Omicron, \Rho, \Tau, \Chi, \Digamma, \omicron. These are all -defined with \providecommand, so they won’t override any definitions provided by -any package loaded before glossaries-extra. Since bib2gls’s interpreter recognises -these commands, using them instead of explicitly using the Latin characters with the -same shape helps to keep the Greek symbols together when sorting. Similarly, -if upgreek has been loaded, the missing upright Greek commands are also -provided. -

    The remaining commands provide common rule blocks for use in the -sort-rule resource option. If you want a rule for a specific locale, you can -provide similar commands in a file called glossariesxtr-tag.ldf, where ⟨tag⟩ -identifies the dialect, locale, region or root language. See the description of - - - -\IfTrackedLanguageFileExists in the tracklang documentation for further details. -If this file is on TeX’s path and the tracklang package (automatically loaded by -glossaries) detects that the document has requested that language or locale, then the -file will automatically be loaded. For example, if you want to provide a rule -block for Welsh, then create a file called glossariesxtr-welsh.ldf that -contains: - - - -

    -
    -\ProvidesGlossariesExtraLang{welsh}[2018/02/23 v1.0]
    -\@ifpackageloaded{glossaries-extra-bib2gls}
    -{
    -  \newcommand{\glsxtrWelshRules}{%
    -   \glsxtrLatinA
    -   \string<b,B
    -   \string<c,C
    -   \string<ch,CH
    -   \string<d,D
    -   \string<dd,DD
    -   \string<\glsxtrLatinE
    -   \string<f,F
    -   \string<ff,FF
    -   \string<g,G
    -   \string<ng,NG
    -   \string<\glsxtrLatinH
    -   \string<\glsxtrLatinI
    -   \string<j,J
    -   \string<\glsxtrLatinL
    -   \string<ll,LL
    -   \string<\glsxtrLatinM
    -   \string<\glsxtrLatinN
    -   \string<\glsxtrLatinO
    -   \string<\glsxtrLatinP
    -   \string<ph,PH
    -   \string<r,R
    -   \string<rh,RH
    -   \string<\glsxtrLatinS
    -   \string<\glsxtrLatinT
    -   \string<th,TH
    -   \string<u,U
    -   \string<w,W
    -   \string<y,Y
    -  }
    +
    or if you want the description (if set):
    \renewcommand*{\glsxtrbookindexname}[1]{% 
    + \glossentryname{#1}% 
    + \ifglshasdesc{#1}{\space \glossentrydesc{#1}\glspostdescription}% 
     }
    -{}% glossaries-extra-bib2gls.sty not loaded
    -
    -

    (The use of \string is in case the < character has been made active.) You can -provide more than one rule-block per local, to allow for loanwords or foreign words. -For example, you could provide \glsxtrWelshIRules, \glsxtrWelshIIRules -etc. -

    If the rules are for a particular script (independent of language or region) then -they can be provided in a file given by glossariesxtr-script.ldf instead. For -example, the file glossariesxtr-Cyrl.ldf could contain: - - - -

    -
    -\ProvidesGlossariesExtraLang{Cyrl}[2018/02/23 v1.0]
    -\newcommand*{\glsxtrGeneralCyrillicIRules}{%
    -  % Cyrillic rules
    +
    (which picks up the post-description hook).

    +Alternatively you can use the \glsxtrpostnamecategory hook to append information after the name according to the entry’s category.

    +Sub-entries are displayed using:

    +\glsxtrbookindexsubname{entry-label}
    + which just defaults to \glsxtrbookindexname{entry-label}.

    +The separator used before the location list for top-level entries is given by:

    +\glsxtrbookindexprelocation{entry-label}
    + where entry-label is the entry’s label. This checks if the location field has been set. If it has, it does:
    ,\glsxtrprelocation
    +
    otherwise it just does \glsxtrprelocation (which defaults to \space) with no comma. If you’re using bib2gls with save-locations=false, the location field won’t be set.

    +The separator used before the location list for sub-entries is given by:

    +\glsxtrbookindexsubprelocation{entry-label}
    + which defaults to \glsxtrbookindexprelocation{entry-label}.

    +The actual location list is encapsulated with:

    +\glsxtrbookindexlocation{entry-label}{location list}
    + for top-level entries and:
    +\glsxtrbookindexsublocation{entry-label}{location list}
    + for sub-entries. These both just do location list by default.

    +The separator used between a top-level parent and child entry is given by:

    +\glsxtrbookindexparentchildsep
    + This defaults to \nopagebreak.

    +The separator used between a sub-level parent and child entry is given by:

    +\glsxtrbookindexparentsubchildsep
    + This defaults to \glsxtrbookindexparentchildsep.

    +The separator between top-level entries is given by:

    +\glsxtrbookindexbetween{entry1-label}{entry2-label}
    + This comes after the entry given by entry1-label, if the entry has no children, or after the last descendent otherwise, so it always comes immediately before the entry given by entry2-label unless the entry occurs at the start of a group. This does nothing by default.

    +The separator between two level 1 entries is given by:

    +\glsxtrbookindexsubbetween{entry1-label}{entry2-label}
    +

    +The separator between two level 2 entries is given by:

    +\glsxtrbookindexsubsubbetween{entry1-label}{entry2-label}
    +

    +At the end of each letter group, the following hooks are done in order:

    +\glsxtrbookindexsubsubatendgroup{entry-label}
    + where entry-label is the label of the last level 2 entry
    +\glsxtrbookindexsubatendgroup{entry-label}
    + where entry-label is the label of the last level 1 entry
    +\glsxtrbookindexatendgroup{entry-label}
    + where entry-label is the label of the last level 0 entry.

    +For example, the resource option seealso=omit instructs bib2gls to omit the seealso cross-reference from the location list. (The see cross-reference will still be added unless you also have see=omit.) The seealso cross-reference can instead be appended after the child entries using:

    \renewcommand{\glsxtrbookindexatendgroup}[1]{% 
    +  \glsxtrifhasfield{seealso}{#1}% 
    +  {\glstreesubitem\glsxtruseseealso{#1}}{}% 
     }
    -\newcommand*{\glsxtrGeneralCyrillicIIRules}{%
    -  % an alternative set of Cyrillic rules
    +\renewcommand{\glsxtrbookindexbetween}[2]{% 
    +  \glsxtrbookindexatendgroup{#1}% 
     }
    -
    -

    (Remember that the required document language scripts need to be tracked through -the tracklang package, in order for these files to be automatically loaded. This -essentially means ensuring you load the appropriate language package before -tracklang is loaded by the base glossaries package or any other package that uses it. -See the tracklang documentation for further details.) -

    Alternatively, if the rules are specific to a subject rather than a region or -language, then you can provide a supplementary package. For example, if you have a -package called, say, mapsymbols that provides map symbols, then the file -mapsymbols.sty might contain: - - - -

    -
    -\NeedsTeXFormat{LaTeX2e}
    -\ProvidesPackage{mapsymbols}
    - some package or font loading stuff here to provide
    - the appropriate symbols
    -\newcommand{\Stadium}{...}
    -\newcommand{\Battlefield}{...}
    -\newcommand{\Harbour}{...}
    - etc
    - Provide a rule block:
    -\newcommand{\MapSymbolOrder}{%
    - \glshex 2694 % crossed-swords 0x2694
    - \string< \glshex 2693 % anchor 0x2693
    - \string< \glshex 26BD % football 0x26BD
    +\renewcommand{\glsxtrbookindexsubatendgroup}[1]{% 
    +  \glsxtrifhasfield{seealso}{#1}% 
    +  {\glstreesubsubitem\glsxtruseseealso{#1}}{}% 
     }
    -
    -

    and the supplementary file mapsymbols.bib can provide the appropriate definitions -for bib2gls: - - - -

    -
    -@preamble{"\glsxtrprovidecommand{\Harbour}{\char"2693}
    -\glsxtrprovidecommand{\Battlefield}{\char"2694}
    -\glsxtrprovidecommand{\Stadium}{\char"26BD}"}
    -
    -

    Now both the preamble and rule block can be used in the resource set: - - - -

    -
    -\usepackage{mapsymbols}% my custom package
    -\usepackage[record]{glossaries-extra}
    -\GlsXtrLoadResources[
    -  src={mapsymbols,% <--- my custom mapsymbols.bib
    -   entries% data in entries.bib
    -  },
    -  sort={custom},
    -  sort-rule={\glsxtrcontrolrules % control codes
    - ;\glsxtrspacerules % space characters
    - ;\glsxtrnonprintablerules % non-printable characters
    - ;\glsxtrcombiningdiacriticrules % combining diacritics
    - ,\glsxtrhyphenrules % hyphens
    - <\glsxtrgeneralpuncrules % general punctuation
    - <\glsxtrdigitrules % 0, ..., 9
    - <\glsxtrfractionrules % fraction symbols
    - <\MapSymbolOrder % <--- custom map symbols
    - <\glsxtrMathItalicGreekIrules % math-greek symbols
    - <\glsxtrGeneralLatinIrules % Latin letters
    - }
    -]
    -
    -

    -

    The following commands are provided by glossaries-extra-bib2gls. They should be -separated by the rule separator characters ; (semi-colon) or , (comma) or -& (ampersand) or < (less than). See Java’s RuleBasedCollator documentation for -details of the rule syntax. -

    For example, the following will place the mathematical Greek symbols (\alpha, -\Alpha, \beta, \Beta etc) in a block before Latin characters: - - - -

    -
    -sort-rule={\glsxtrcontrolrules
    - ;\glsxtrspacerules
    - ;\glsxtrnonprintablerules
    - ;\glsxtrcombiningdiacriticrules
    - ,\glsxtrhyphenrules
    - <\glsxtrgeneralpuncrules
    - <\glsxtrdigitrules
    - <\glsxtrfractionrules
    - <\glsxtrMathItalicGreekIrules
    - <\glsxtrGeneralLatinIVrules
    - <\glsxtrLatinAA
    - <\glsxtrLatinOslash
    +
    +\renewcommand{\glsxtrbookindexsubbetween}[2]{% 
    +  \glsxtrbookindexsubatendgroup{#1}% 
    +}
    +
    +\renewcommand{\glsxtrbookindexsubsubatendgroup}[1]{% 
    +  \glsxtrifhasfield{seealso}{#1}% 
    +  {\glstreeitem\hspace*{40pt}\glsxtruseseealso{#1}}{}% 
    +}
    +
    +\renewcommand{\glsxtrbookindexsubsubbetween}[2]{% 
    +  \glsxtrbookindexsubsubatendgroup{#1}% 
     }
    -
    -

    -


    \glsxtrcontrolrules

    -

    -These are control characters that are usually placed at the start of a rule in the -ignored section. They typically won’t occur in any sort values, but if they do they -should normally be ignored. -


    \glsxtrspacerules

    -

    -These are space characters. They typically come after the control characters with the -two blocks separated by a ; (semi-colon). -


    \glsxtrnonprintablerules

    -

    -These are non-printable characters (BOM, tabs, line feed and carriage return). They -typically come after the spaces separated by a ; (semi-colon). These characters -aren’t checked for by bib2gls when it determines whether or not to use the -interpreter, so a TAB or newline character may end up in the sort value if it wasn’t -interpreted. -


    \glsxtrcombiningdiacriticrules

    -

    -These are combining diacritic marks which typically follow the space and -non-printable blocks (separated by a semi-colon). This command is defined in terms -of sub-block commands: - - - -

    -
    -\newcommand*{\glsxtrcombiningdiacriticrules}{%
    - \glsxtrcombiningdiacriticIrules\string;
    - \glsxtrcombiningdiacriticIIrules\string;
    - \glsxtrcombiningdiacriticIIIrules\string;
    - \glsxtrcombiningdiacriticIVrules
    +
    This uses \glstreesubitem and \glstreesubsubitem to indent the cross-reference according to the next level down, so the cross-reference for a top-level entry is aligned with the sub-entries, and a level 1 entry has its cross-reference aligned with sub-sub-entries. In the event that a level 2 entry has a cross-reference, this is indented a bit further (but it won’t be aligned with any deeper level as the bookindex style only supports a maximum of two sub-levels).

    +The bookindex style uses group headings. (If you use bib2gls remember to invoke it with the --group or -g switch, see §8.4.1.) The heading will use:

    +\glsxtrbookindexbookmark{group-title}{bookmark-name}
    + If \pdfbookmark has been defined, this will use that command to bookmark the group title. If section=chapter is set (default if chapters are defined) then this uses level 1 otherwise it uses level 2. You can redefine this command if this isn’t appropriate. If \pdfbookmark hasn’t been defined, this command does nothing.

    +The group heading is formatted according to:

    +\glsxtrbookindexformatheader{group-title}
    + which is defined as:
    \newcommand*{\glsxtrbookindexformatheader}[1]{% 
    +  \par{\centering\glstreegroupheaderfmt{#1}\par}% 
     }
    -
    -

    If you prefer, you can use the sub-blocks directly in your required ordered. -


    \glsxtrcombiningdiacriticIrules

    -

    -This contains the combining diacritics: acute, grave, breve, circumflex, caron, ring, -vertical line above, diaeresis (umlaut), double acute, tilde, dot above, combining -macron. -


    \glsxtrcombiningdiacriticIIrules

    -

    -This contains the combining diacritics: short solidus overlay, cedilla, ogonek, dot -below, low line, overline, hook above, double vertical line above, double grave -accent, candrabindu, inverted breve, turned comma above, comma above, -reversed comma above, comma above right, grave accent below, acute accent -below. -


    \glsxtrcombiningdiacriticIIIrules

    -

    -This contains the combining diacritics: left tack below, right tack below, left angle -above, horn, left half ring below, up tack below, down tack below, plus sign below, -minus sign below, palatalized hook below, retroflex hook below, diaresis below, ring -below, comma below, vertical line below, bridge below, inverted double arch below, -caron below, circumflex accent below, breve below, inverted breve below, tilde below, -macron below, double low line, tilde overlay, short stroke overlay, long stroke overlay, -long solidus overlay, right half ring below, inverted bridge below, square below, -seagull below, x above, vertical tilde, double overline, Greek perispomeni, Greek -dialytika tonos, Greek ypogegrammeni, double tilde, double inverted breve, -Cyrillic titlo, Cyrillic palatalization, Cyrillic dasia pneumata, Cyrillic psili -pneumata. -


    \glsxtrcombiningdiacriticIVrules

    -

    -This contains the combining diacritics: left harpoon above, right harpoon above, long -vertical line overlay, short vertical line overlay, anticlockwise arrow above, clockwise -arrow above, left arrow above, right arrow above, ring overlay, clockwise ring overlay, -anticlockwise ring overlay, three dots above, four dots above, enclosing circle, -enclosing square, enclosing diamond, enclosing circle backslash, left right arrow -above. -


    \glsxtrhyphenrules

    - - - -

    -This contains hyphens (including the minus sign 0x2212). This rule block typically -comes after the diacritic rules separated by a comma. -


    \glsxtrgeneralpuncrules

    -

    -This contains punctuation characters. This rule block typically comes after the -hyphen rules separated by a less than (<). As with the combining diacritics, this -command is defined in terms of sub-blocks which may be used directly instead if a -different order is required: - - - -

    -
    -\newcommand*{\glsxtrgeneralpuncrules}{%
    -  \glsxtrgeneralpuncIrules
    -  \string<\glsxtrcurrencyrules
    -  \string<\glsxtrgeneralpuncIIrules
    +
    where \glstreegroupheaderfmt is provided by the glossary-tree package, which is automatically loaded. Note that the entry names aren’t encapsulated with \glstreenamefmt.

    +The skip after a group header is given by:

    +\glsxtrbookindexpregroupskip{skip}
    + The argument is the skip that would normally be inserted if there wasn’t a group header.

    +The glossary-bookindex package provides some supplementary commands that aren’t used by default, but may be used when adjusting the style. These commands should only be used within one of the \print…glossary commands. (That is, they should only be used in glossary styles or in hooks.)

    +\glsxtrbookindexmarkentry{entry-label}
    + This writes information to the aux file that can be read on the next run to obtain the first and last entry on each page of the glossary.

    +You can display the first entry associated with the current page using:

    +\glsxtrbookindexfirstmark{entry-label}
    + and the last entry associated with the current page using:
    +\glsxtrbookindexlastmark{entry-label}
    + These do nothing if there are no entries marked on the current page (or if the document build isn’t up to date).

    +The entry is formatted using:

    +\glsxtrbookindexfirstmarkfmt{entry-label}
    + for the first instance and
    +\glsxtrbookindexlastmarkfmt{entry-label}
    + for the last.

    +These commands are designed for use in page headers or footers where the page number is stable. For example, \glsxtrbookindexname can be redefined to mark the current entry:

    \renewcommand{\glsxtrbookindexname}[1]{% 
    +  \glsxtrbookindexmarkentry{#1}% 
    +  \glossentryname{#1}% 
     }
    -
    -

    -


    \glsxtrgeneralpuncIrules

    -

    -This is the first punctuation sub-block containing: underscore, macron, comma, -semi-colon, colon, exclamation mark, inverted exclamation mark, question -mark, inverted question mark, solidus, full stop, acute accent, grave accent, -circumflex accent, diaersis, tilde, middle dot, cedilla, straight apostrophe, -straight double quote, left guillemet, right guillemet, left parenthesis, right -parenthesis, left square bracket, right square bracket, left curly bracket, right -curly bracket, section sign, pilcrow sign, copyright sign, registered sign, at -sign. -


    \glsxtrcurrencyrules

    -

    -This sub-block contains some currency symbols: currency sign, Thai currency symbol -baht, cent sign, colon sign, cruzeiro sign, dollar sign, dong sign, euro sign, French -franc sign, lira sign, mill sign, naira sign, peseta sign, pound sign, rupee sign, new -sheqel sign, won sign, yen sign. -


    \glsxtrgeneralpuncIIrules

    -

    -This sub-block contains some other punctuation symbols: asterisk, backslash, -ampersand, hash sign, percent sign, plus sign, plus-minus sign, division sign, -multiplication sign, less-than sign, equals sign, greater-than sign, not sign, vertical -bar (pipe), broken bar, degree sign, micron sign. -


    \glsxtrdigitrules

    -

    -This rule block contains the Basic Latin digits (0, …, 9) and the subscript and -superscript digits (0 0 etc) made equivalent to the corresponding Basic Latin digit. -The digit block typically comes after the punctuation rules separated by a less than -(<). -


    \glsxtrBasicDigitrules

    -

    -This rule block contains just the Basic Latin digits (0, …, 9). -


    \glsxtrSubScriptDigitrules

    -

    -This rule block contains just the subscript digits (0 … 9). -


    \glsxtrSuperScriptDigitrules

    - - - -

    -This rule block contains just the superscript digits (0 … 9). -


    \glsxtrfractionrules

    -

    -This rule block contains vulgar fraction characters. The digit block typically comes -after the digit rules separated by a less than (<). -

    There are a number of Latin rule blocks. Some of these included extended -characters or ligatures (such as ß or œ) but they don’t include accented -characters. If you require a Latin rule block that includes accented characters, -digraphs, trigraphs or other extended characters, then it’s best to provide similar -commands in a glossariesxtr-tag.ldf file for the particular language or -region. -


    \glsxtrGeneralLatinIrules

    -

    -This is just the basic (non-extended) Latin alphabet with the superscript and -subscript Latin letters (a a etc) treated as the equivalent basic Latin letter. (If you -don’t want the subscripts and superscripts included you can redefine \glsxtrLatinA -etc to omit them.) -


    \glsxtrGeneralLatinIIrules

    -

    -This is like \glsxtrGeneralLatinIrules but it includes eth (Ð) between ‘D’ and ‘E’ -and eszett (ß) treated as ‘ss’. -


    \glsxtrGeneralLatinIIIrules

    -

    -This is like \glsxtrGeneralLatinIrules but it includes eth (Ð) between ‘D’ and ‘E’ -and eszett (ß) treated as ‘sz’. -


    \glsxtrGeneralLatinIVrules

    -

    -This is like \glsxtrGeneralLatinIrules but it includes eth (Ð) between ‘D’ and ‘E’, -ae-ligature (æ) is treated as ‘ae’, oe-ligature (œ) is treated as ‘oe’, eszett (ß) treated -as ‘ss’ and thorn (þ) is treated as ‘th’. -


    \glsxtrGeneralLatinVrules

    -

    -This is like \glsxtrGeneralLatinIrules but it includes eth (Ð) between ‘D’ and ‘E’, -eszett (ß) treated as ‘ss’ and thorn (þ) treated as ‘th’. -


    \glsxtrGeneralLatinVIrules

    -

    -This is like \glsxtrGeneralLatinIrules but it includes eth (Ð) between ‘D’ and ‘E’, -eszett (ß) treated as ‘sz’ and thorn (þ) treated as ‘th’. -


    \glsxtrGeneralLatinVIIrules

    -

    -This is like \glsxtrGeneralLatinIrules but it includes ae-ligature (æ) between ‘A’ -and ‘B’, eth (Ð) between ‘D’ and ‘E’, insular G (Ᵹ) instead of ‘G’, oe-ligature between -‘O’ and ‘P’, long s (ſ) equivalent to ‘s’, thorn (þ) between ‘T’ and ‘U’ and wynn (Ƿ) -instead of W. -


    \glsxtrGeneralLatinVIIIrules

    - - - -

    -This is like \glsxtrGeneralLatinIrules but ae-ligature (æ) is treated as ‘ae’, -oe-ligature (œ) is treated as ‘oe’, eszett (ß) treated as ‘ss’, thorn (þ) is treated as ‘th’, -Ø is treated as ‘O’ and ‘Ł’ is treated as ‘L’. -


    \glsxtrLatinA

    -

    -A mini-rule that just covers ‘A’ but includes the sub- and superscript A. -


    \glsxtrLatinE

    -

    -A mini-rule that just covers ‘E’ but includes the subscript E. -


    \glsxtrLatinH

    -

    -A mini-rule that just covers ‘H’ but includes the subscript H. -


    \glsxtrLatinK

    -

    -A mini-rule that just covers ‘K’ but includes the subscript K. -


    \glsxtrLatinI

    -

    -A mini-rule that just covers ‘I’ but includes the superscript I. -


    \glsxtrLatinL

    -

    -A mini-rule that just covers ‘L’ but includes the subscript L. -


    \glsxtrLatinM

    -

    -A mini-rule that just covers ‘M’ but includes the subscript M. -


    \glsxtrLatinN

    -

    -A mini-rule that just covers ‘N’ but includes the sub- and superscript N. -


    \glsxtrLatinO

    -

    -A mini-rule that just covers ‘O’ but includes the sub- and superscript O. -


    \glsxtrLatinP

    -

    -A mini-rule that just covers ‘P’ but includes the subscript P. -


    \glsxtrLatinS

    -

    -A mini-rule that just covers ‘S’ but includes the subscript S. -


    \glsxtrLatinT

    -

    -A mini-rule that just covers ‘T’ but includes the subscript T. -


    \glsxtrLatinX

    -

    -A mini-rule that just covers ‘X’ but includes the subscript X. -


    \glsxtrLatinEszettSs

    -

    -A mini-rule that just covers eszett (ß) and makes long s (ſ) followed by short ‘s’ - - - -equivalent to ‘ß’. (This is used in the above blocks that treat ‘ß’ as ‘ss’.) -


    \glsxtrLatinEszettSz

    -

    -A mini-rule that just covers eszett (ß) and makes long s (ſ) followed by ‘z’ equivalent -to ‘ß’. (This is used in the above blocks that treat ‘ß’ as ‘sz’.) -


    \glsxtrLatinEth

    -

    -A mini-rule for eth (Ð) so you don’t need to remember the Unicode values. -


    \glsxtrLatinThorn

    -

    -A mini-rule for thorn (þ) so you don’t need to remember the Unicode values. -


    \glsxtrLatinAELigature

    -

    -A mini-rule for ae-ligature (æ) so you don’t need to remember the Unicode -values. -


    \glsxtrLatinOELigature

    -

    -A mini-rule for oe-ligature (œ) so you don’t need to remember the Unicode -values. -


    \glsxtrLatinOslash

    -

    -A mini-rule for ‘Ø’ so you don’t need to remember the Unicode values. -


    \glsxtrLatinLslash

    -

    -A mini-rule for ‘Ł’ so you don’t need to remember the Unicode values. -


    \glsxtrLatinWynn

    -

    -A mini-rule for wynn (Ƿ) so you don’t need to remember the Unicode values. -


    \glsxtrLatinInsularG

    -

    -A mini-rule for insular G (Ᵹ) so you don’t need to remember the Unicode -values. -


    \glsxtrLatinSchwa

    -

    -A mini-rule that just covers schwa (Ə) but includes the subscript schwa. (Not used in -any of the provided Latin rule blocks described above.) -


    \glsxtrLatinAA

    -

    -A mini-rule for ‘Å’ so you don’t need to remember the Unicode values. (Not used in -any of the provided Latin rule blocks described above.) -


    \glsxtrMathGreekIrules

    -

    -A rule block for mathematical Greek (\alpha, \beta etc) and upright Greek -(\upalpha, etc, from the upgreek package) characters that includes digamma -(\digamma and \Digamma) between epsilon and zeta. The upright and italic versions -are gathered together into the same letter group. - - - -


    \glsxtrMathGreekIIrules

    -

    -As \glsxtrMathGreekIrules but doesn’t include digamma. -


    \glsxtrMathUpGreekIrules

    -

    -A rule block for upright Greek (\upalpha, etc, from the upgreek package) -characters that includes digamma (\digamma and \Digamma) between epsilon and -zeta. -


    \glsxtrMathUpGreekIIrules

    -

    -A rule block for upright Greek (\upalpha, etc, from the upgreek package) that -doesn’t include digamma. -


    \glsxtrMathItalicGreekIrules

    -

    -A rule block for mathematical Greek (\alpha, \Alpha, etc) characters that includes -digamma (\diagamma and \Digamma) between epsilon and zeta. Note that even -though the upper case \Delta etc are actually rendered upright by LaTeX, bib2gls’s -interpreter treats them as italic to help keep them close to the lower case -versions. -


    \glsxtrMathItalicGreekIIrules

    -

    -A rule block for mathematical Greek (\alpha, \Alpha, etc) characters that doesn’t -include digamma. -


    \glsxtrMathItalicUpperGreekIrules

    -

    -A rule block for upper case mathematical Greek (\Alpha, \Beta, etc) characters that -includes digamma (\Digamma) between epsilon and zeta. -


    \glsxtrMathItalicUpperGreekIIrules

    -

    -A rule block for upper case mathematical Greek (\Alpha, \Beta, etc) characters that -doesn’t include digamma. -


    \glsxtrMathItalicLowerGreekIrules

    -

    -A rule block for lower case mathematical Greek (\alpha, \beta, etc) characters that -includes digamma (\digamma) between epsilon and zeta. -


    \glsxtrMathItalicLowerGreekIIrules

    -

    -A rule block for lower case mathematical Greek (\alpha, \beta, etc) characters that -doesn’t include digamma. -

    Additionally, there are commands in the form \glsxtrUpAlpha, \glsxtrUpBeta -etc and \glsxtrMathItalicAlpha, \glsxtrMathItalicBeta etc that just cover the -upper and lower case forms of a special Greek character (\Upalpha, \upalpha etc -and \Alpha, \alpha etc) as well as the following: -


    \glsxtrMathItalicPartial

    -

    -The partial derivative symbol (). - - - -


    \glsxtrMathItalicNabla

    -

    -The nabla symbol (). -

    -

    -

    Top

    10.4 Supplementary Commands

    -

    These commands are provided by glossaries-extra for use with bib2gls. -

    The information provided with \GlsXtrLoadResources is written to the .aux file -using

    -
    -\protected@write\@auxout{\glsxtrresourceinit}{information} -
    -
    where ⟨information⟩ is the information to pass to bib2gls. The command in the -second argument -


    \glsxtrresourceinit

    -

    -may be used to temporarily redefine commands before the information is written to -the file. This does nothing by default, but may be redefined to allow the use of short -commands for convenience. For example, with: - - - -

    -
    -\renewcommand{\glsxtrresourceinit}{\let\u\glshex}
    -
    -

    you can just use, for example, \u E6 instead of \string\uE6 in the custom rule. -This redefinition of \u is scoped so its original definition is restored after the write -operation. -

    If you have multiple resource commands and you want a default set of options you -can supply them in the definition of: -


    \GlsXtrDefaultResourceOptions

    -

    -For example: - - - -

    -
    -\renewcommand{\GlsXtrDefaultResourceOptions}{selection=all}
    -
    -

    This should be done before the resource commands. -

    It’s possible to specify label prefixes. For example, modifying the earlier -example: - - - -

    -
    -\documentclass{article}
    -\usepackage[record,style=indexgroup]{glossaries-extra}
    -\setabbreviationstyle{long-short-desc}
    -\GlsXtrLoadResources
    - [src={abbrvs},sort={letter-nocase},type=main,
    -  label-prefix={abr.},
    -  group={Abbreviations}]
    -\GlsXtrLoadResources
    - [src={symbols},sort={use},type=main,
    -  label-prefix={sym.},
    -  group={Symbols}]
    -\GlsXtrLoadResources[src={terms},sort={en-GB},type=main
    -  label-prefix={trm.}]
    -\begin{document}
    -\gls{trm.bird}
    -\gls{abr.shtml}
    -\gls{sym.M}
    -\printunsrtglossaries
    -\end{document}
    -
    -

    If you do something like this, you may find it more convenient to define custom -commands that set the prefix. For example: - - - -

    -
    -\newcommand*{\sym}[2][]{\gls[#1]{sym.#2}}
    -
    -

    The problem with this is that the custom command \sym doesn’t allow for modifiers -(such as \gls* or \gls+). Instead you can use: -


    \glsxtrnewgls[default options]{prefix}{cs}

    -

    -which defines the command ⟨cs⟩ that behaves like

    -
    -\glsmodifier[default options,options]{prefix⟩⟨label}[insert] -
    -
    For example: - - - -
    -\glsxtrnewgls{sym.}{\sym}
    -
    -

    or (to default to no hyperlinks) - - - -

    -
    -\glsxtrnewgls[hyper=false]{sym.}{\sym}
    -
    -

    now you can use \sym+{M} to behave like \gls+{sym.M}. -

    If you also want the plural and first letter upper case versions you can -use -


    \glsxtrnewglslike[default options]{prefix}{\gls-like cs} -{\glspl-like cs}{\Gls-like cs}{\Glspl-like cs}

    -

    -For example: - - - -

    -
    -\glsxtrnewglslike[hyper=false]{idx.}{\idx}{\idxpl}{\Idx}{\Idxpl}
    -
    -

    For the all caps versions: -


    \glsxtrnewGLSlike[default options]{prefix}{\GLS-like cs} -{\GLSpl-like cs}

    -

    -For example: - - - -

    -
    -\glsxtrnewGLSlike[hyper=false]{idx.}{\IDX}{\IDXpl}
    -
    -

    -

    There’s an analogous command for \rgls: -


    \glsxtrnewrgls[default options]{prefix}{cs}

    -

    -and for \rgls, \rglspl, \rGls and \rGlspl: -


    \glsxtrnewrglslike[default options]{prefix}{\rgls-like cs} -{\rglspl-like cs}{\rGls-like cs}{\rGlspl-like cs}

    -

    -and for the all caps: -


    \glsxtrnewrGLSlike[default options]{prefix}{\rGLS-like cs} -{\rGLSpl-like cs}

    -

    -

    If you provide your own custom command with just \newcommand that -has syntax that starts with [options]{label}, then you can notify bib2gls -using: -


    \glsxtridentifyglslike{prefix}{command}

    -

    -This writes information to the .aux file so that bib2gls can search for the given -command when looking for dependencies. -

    Another possibility is to set up known label prefixes, with each one identified -by: -


    \glsxtraddlabelprefix{prefix}

    -

    -These should be listed in order of precedence. Since no entries are defined on the first -LaTeX run, the final prefix should be the fallback. You can prepend a prefix to the -list using: -


    \glsxtrprependlabelprefix{prefix}

    -

    -which gives it the highest order of precedence. -

    The ⟨prefix⟩ argument may be empty. You can clear the list with: -


    \glsxtrclearlabelprefixes

    -

    -

    You can test if a prefix is already in the list with: -


    \glsxtrifinlabelprefixlist{prefix}{true}{false}

    -

    -In general it’s best to avoid adding multiple instances of the same prefix, so you can -check with this command before adding a prefix to the list. However, it can be useful - - - -to repeat a prefix at the end of the list so that it can be used as a fallback for entries -that haven’t yet been defined. -

    With the list of possible prefixes set up (including an empty prefix if necessary), -you can use: -


    \dgls[options]{label}[insert]

    -

    -which behaves like

    -
    -\gls[options]{prefix⟩⟨label}[insert] -
    -
    where ⟨prefix⟩ is the first prefix in the list such that ⟨prefix⟩⟨label⟩ matches a defined -entry (or the last entry in the prefix list if none match). -

    There are also analogous commands for the plural and case-changing -versions: -


    \dglspl[options]{label}[insert]

    -

    -(uses \glspl), -


    \dGls[options]{label}[insert]

    -

    -(uses \Gls), -


    \dGlspl[options]{label}[insert]

    -

    -(uses \Glspl), -


    \dGLS[options]{label}[insert]

    -

    -(uses \GLS), -


    \dGLSpl[options]{label}[insert]

    -

    -(uses \GLSpl), -


    \dglslink[options]{label}[insert]

    -

    -(uses \glslink), -


    \dglsdisp[options]{label}[insert]

    -

    -(uses \glsdisp). -

    These commands are essentially provided for a mixture of single and dual entries. -Suppose the file entries.bib contains: - - - -

    -
    -@index{duck}
    -@dualindexabbreviation{svm,
    -  short={SVM},
    -  long={support vector machine}
    +
    If you only want to mark the top-level entries, remember to redefine \glsxtrbookindexsubname as it defaults to \glsxtrbookindexname:
    \renewcommand{\glsxtrbookindexsubname}[1]{% 
    +  \glossentryname{#1}% 
     }
    -@dualindexsymbol{pi,
    -  symbol={\ensuremath{\pi}},
    -  description={ratio of a circle's circumference to its
    -    diameter}
    +

    +Then if you’re using fancyhdr you can set the page style to show the first and last entry for the current page with:

    \pagestyle{fancy}% 
    +\lhead{\thepage}% 
    +\lfoot{\glsxtrbookindexfirstmark}% 
    +\cfoot{}% 
    +\rfoot{\glsxtrbookindexlastmark}% 
    +

    + +

    + +
    +

    8.7.2. glossary-longextra package

    +

    +The glossary-longextra package provides additional tabular-like styles similar to those provided by glossary-longbooktabs (which is automatically loaded). These don’t support hierarchical levels except for homographs (level 1 entries with the same name as their parent).

    +By default, these styles use the longtable environment, but if you know that your glossary won’t span more than a page and you need to use it in a context that’s incompatible with longtable, you can instead setup these styles to use tabular instead. In order to do this you must use:

    +\GlsLongExtraUseTabulartrue
    + before the style is set. If you later want to switch back to using longtable for another glossary, use:
    +\GlsLongExtraUseTabularfalse
    + (or scope \GlsLongExtraUseTabulartrue). Again, the style must be set after this change to the conditional is implemented. You can test this setting with:
    +\ifGlsLongExtraUseTabular true\else false\fiinitial: \iffalse
    +

    +For example:

    \GlsLongExtraUseTabulartrue
    +\setglossarystyle{long-name-desc}
    +
    or
    \GlsLongExtraUseTabulartrue
    +\printunsrtglossary[style=long-name-desc]
    +
    If you switch to tabular, the default vertical alignment is obtained from:
    +\glslongextraTabularVAligninitial: c
    + This should expand to one of: c (centred), t (top) or b (bottom). The default is c.

    +For either tabular or longtable, the column titles are formatted according to:

    +\glslongextraHeaderFmt{text}
    + which simply does \textbf{text} by default. As with the long-like styles, the header text for the columns are given by the language-sensitive commands: \entryname, \descriptionname, \symbolname and \pagelistname.

    +Most styles show the name which, as with other predefined styles, also includes the entry item number (if entrycounter is on) and hypertarget anchor. These are all performed for top-level entries with:

    +\glslongextraNameFmt{entry-label}
    + This uses \glossentryname, so it supports the post-name hook and associated attributes. Child entries are displayed with:
    +\glslongextraSubNameFmt{level}{entry-label}
    + This includes the sub-entry item number (if subentrycounter is on) and the hypertarget anchor. The actual name isn’t shown by default.

    +The horizontal alignment for the name column is obtained with:

    +\glslongextraNameAligninitial: l
    + This expands to l by default.

    +For styles that show the description, that’s formatted with:

    +\glslongextraDescFmt{entry-label}
    + for top-level entries, which uses \glossentrydesc and the post-description hook, and
    +\glslongextraSubDescFmt{level}{entry-label}
    + for child entries (which just uses \glslongextraDescFmt).

    +The horizontal alignment for the description column is obtained with:

    +\glslongextraDescAlign
    + This expands to >{\raggedright}p{\glsdescwidth} by default. This means ragged-right paragraph style with width given by \glsdescwidth. (See the documentation for the array package for information about this alignment syntax.) If a widest name has been set, \glsdescwidth will be calculated according to the best fit for the given style.

    +If you are using bib2gls, you may be able to use the set-widest option, otherwise to set the widest name, use:

    +\glslongextraSetWidest{widest-name}
    + If you have already used \glssetwidest provided with the alttree style, the default widest name will be obtained from that, but note that only level 0 is supported for the glossary-longextra styles.

    +You can update the widest name with:

    +\glslongextraUpdateWidest{name}
    + This is like \glslongextraSetWidest but will only set the new value if it’s wider than the current widest name.

    +Although these styles don’t support hierarchy, the following is provided for child entries:

    +\glslongextraUpdateWidestChild{level}{name}
    + This does nothing by default. If \glslongextraSubNameFmt is redefined to show the child name, then the above command will need to be redefined to use \glslongextraUpdateWidest.

    +For styles that show the location list, that’s formatted with:

    +\glslongextraLocationFmt{entry-label}{location list}
    + for top-level entries. Child location lists are formatted with:
    +\glslongextraSubLocationFmt{level}{entry-label}{location list}
    + Both of these simply do the location list argument.

    +The horizontal alignment for the location list column is obtained with:

    +\glslongextraLocationAlign
    + This expands to >{\raggedright}p{\glspagelistwidth} by default. This means ragged-right paragraph style with width given by \glspagelistwidth.

    +For styles that show the symbol (in addition to the name), that’s formatted with:

    +\glslongextraSymbolFmt{entry-label}
    + for top-level entries. This simply uses \glossentrysymbol. Child entries use:
    +\glslongextraSubSymbolFmt{level}{entry-label}
    + which uses \glslongextraSymbolFmt.

    +The horizontal alignment for the symbol column (except for the long-sym-desc and long-desc-sym styles) is obtained with:

    +\glslongextraSymbolAligninitial: c
    + This expands to c by default.

    +Top-level group headings are formatted with:

    +\glslongextraGroupHeading{number columns}{group-label}
    + The first argument is the total number of columns in the table. For example, 2 for the long-name-desc style or 3 for the long-name-sym-desc style. The second argument is the group’s label (not the title). This command does nothing by default. (If you are using bib2gls, remember that you need to use the --group or -g switch to support groups.)

    +Sub-level groups are only supported with the “unsrt” family of commands (see §8.4.1). When they are supported, the heading will be formatted with:

    +\glslongextraSubGroupHeading{number columns}{prev group level}{group level}{parent-entry-label}{group-label}
    +

    +The styles are sub-divided below into the set of elements that are shown in each column, which may consist of: name, symbol, description or location list. There will be blank cells if any of the corresponding fields have not been set or if the location list has been suppressed.

    + +

    + +
    +

    8.7.2.1. Name and Description Only

    +

    +These styles don’t display the symbol or location list, regardless of whether or not they have been set. In each case, the style starts with:

    +\glslongextraSetDescWidth
    + which updates \glsdescwidth according to the widest name, identified with \glslongextraSetWidest. The column header text is also taken into account. If a widest name hasn’t been set and the column header is shorter than one or more names, the description column may be too wide. The value of \glsdescwidth is calculated as \linewidth-4\tabcolsep-W, where W is the width of the widest name.

    +If you want to set \glsdescwidth to a specific value, then redefine \glslongextraSetDescWidth with the desired length assignment.

    +

    +long-name-desc
    + This has two columns: the name on the left and the description on the right. The table header is given by:
    +\glslongextraNameDescTabularHeader
    + which shows the column headers with horizontal rules. The table footer is given by:
    +\glslongextraNameDescTabularFooter
    + which just does a horizontal rule. With longtable, the table header and footer are set with:
    +\glslongextraNameDescHeader
    + which uses the above header and footer commands.

    +

    +long-desc-name
    + This has two columns: the name on the right and the description on the left. The table header is given by:
    +\glslongextraDescNameTabularHeader
    + which shows the column headers with horizontal rules. The table footer is given by:
    +\glslongextraDescNameTabularFooter
    + which just does a horizontal rule. With longtable, the table header and footer are set with:
    +\glslongextraDescNameHeader
    + which uses the above header and footer commands.

    + +

    + +
    +

    8.7.2.2. Name, Symbol and Description Only

    +

    +These styles don’t show the location list. In each case, the style starts with:

    +\glslongextraSymSetDescWidth
    + which updates \glsdescwidth according to the widest name, identified with \glslongextraSetWidest. This starts by calculating \glsdescwidth with \glslongextraSetDescWidth and then subtracts the width of the symbol column header text (which is assumed to be the widest text in that column).

    +If you want to set \glsdescwidth to a specific value, then redefine \glslongextraSymSetDescWidth with the desired length assignment.

    +

    +long-name-desc-sym
    + This has three columns: the name on the left, the description in the middle and the symbol on the right. The table header is given by:
    +\glslongextraNameDescSymTabularHeader
    + which shows the column headers with horizontal rules. The table footer is given by:
    +\glslongextraNameDescSymTabularFooter
    + which just does a horizontal rule. With longtable, the table header and footer are set with:
    +\glslongextraNameDescSymHeader
    + which uses the above header and footer commands.

    +

    +long-name-sym-desc
    + This has three columns: the name on the left, the symbol in the middle and the description on the right. The table header is given by:
    +\glslongextraNameSymDescTabularHeader
    + which shows the column headers with horizontal rules. The table footer is given by:
    +\glslongextraNameSymDescTabularFooter
    + which just does a horizontal rule. With longtable, the table header and footer are set with:
    +\glslongextraNameSymDescHeader
    + which uses the above header and footer commands.

    +

    +long-sym-desc-name
    + This has three columns: the name on the right, the description in the middle and the symbol on the left. The table header is given by:
    +\glslongextraSymDescNameTabularHeader
    + which shows the column headers with horizontal rules. The table footer is given by:
    +\glslongextraSymDescNameTabularFooter
    + which just does a horizontal rule. With longtable, the table header and footer are set with:
    +\glslongextraSymDescNameHeader
    + which uses the above header and footer commands.

    +

    +long-desc-sym-name
    + This has three columns: the name on the right, the symbol in the middle and the description on the left. The table header is given by:
    +\glslongextraDescSymNameTabularHeader
    + which shows the column headers with horizontal rules. The table footer is given by:
    +\glslongextraDescSymNameTabularFooter
    + which just does a horizontal rule. With longtable, the table header and footer are set with:
    +\glslongextraDescSymNameHeader
    + which uses the above header and footer commands.

    + +

    + +
    +

    8.7.2.3. Name, Description and Location Only

    +

    +These styles don’t display the symbol, regardless of whether or not the symbol field has been set. In each case, the style starts with:

    +\glslongextraLocSetDescWidth
    + which updates \glsdescwidth according to the widest name, identified with \glslongextraSetWidest. This starts by calculating \glsdescwidth with \glslongextraSetDescWidth and then subtracts 2\tabcolsep-\glspagelistwidth.

    +If you want to set \glsdescwidth to a specific value, then redefine \glslongextraLocSetDescWidth with the desired length assignment.

    +

    +long-name-desc-loc
    + This has three columns: the name on the left, the description in the middle and the location list on the right. The table header is given by:
    +\glslongextraNameDescLocationTabularHeader
    + which shows the column headers with horizontal rules. The table footer is given by:
    +\glslongextraNameDescLocationTabularFooter
    + which just does a horizontal rule. With longtable, the table header and footer are set with:
    +\glslongextraNameDescLocationHeader
    + which uses the above header and footer commands.

    +

    +long-loc-desc-name
    + This has three columns: the name on the right, the description in the middle and the location list on the left. The table header is given by:
    +\glslongextraLocationDescNameTabularHeader
    + which shows the column headers with horizontal rules. The table footer is given by:
    +\glslongextraLocationDescNameTabularFooter
    + which just does a horizontal rule. With longtable, the table header and footer are set with:
    +\glslongextraLocationDescNameHeader
    + which uses the above header and footer commands.

    + +

    + +
    +

    8.7.2.4. Name, Description, Symbol and Location

    +

    +These styles show the name, description, symbol and location list. In each case, the style starts with:

    +\glslongextraSymLocSetDescWidth
    + which updates \glsdescwidth according to the widest name, identified with \glslongextraSetWidest. This starts by calculating \glsdescwidth with \glslongextraSymSetDescWidth and then subtracts 2\tabcolsep-\glspagelistwidth.

    +If you want to set \glsdescwidth to a specific value, then redefine \glslongextraSymLocSetDescWidth with the desired length assignment.

    +

    +long-name-desc-sym-loc
    + This has four columns, from left to right: the name, description, symbol and the location list. The table header is given by:
    +\glslongextraNameDescSymLocationTabularHeader
    + which shows the column headers with horizontal rules. The table footer is given by:
    +\glslongextraNameDescSymLocationTabularFooter
    + which just does a horizontal rule. With longtable, the table header and footer are set with:
    +\glslongextraNameDescSymLocationHeader
    + which uses the above header and footer commands.

    +

    +long-name-sym-desc-loc
    + This has four columns, from left to right: the name, symbol, description and the location list. The table header is given by:
    +\glslongextraNameSymDescLocationTabularHeader
    + which shows the column headers with horizontal rules. The table footer is given by:
    +\glslongextraNameSymDescLocationTabularFooter
    + which just does a horizontal rule. With longtable, the table header and footer are set with:
    +\glslongextraNameSymDescLocationHeader
    + which uses the above header and footer commands.

    +

    +long-loc-sym-desc-name
    + This has four columns, from left to right: the location list, symbol, description and the name. The table header is given by:
    +\glslongextraLocationSymDescNameTabularHeader
    + which shows the column headers with horizontal rules. The table footer is given by:
    +\glslongextraLocationSymDescNameTabularFooter
    + which just does a horizontal rule. With longtable, the table header and footer are set with:
    +\glslongextraLocationSymDescNameHeader
    + which uses the above header and footer commands.

    +

    +long-loc-desc-sym-name
    + This has four columns, from left to right: the location list, description, symbol and the name. The table header is given by:
    +\glslongextraLocationDescSymNameTabularHeader
    + which shows the column headers with horizontal rules. The table footer is given by:
    +\glslongextraLocationDescSymNameTabularFooter
    + which just does a horizontal rule. With longtable, the table header and footer are set with:
    +\glslongextraLocationDescSymNameHeader
    + which uses the above header and footer commands.

    + +

    + +
    +

    8.7.2.5. Symbol and Description Only

    +

    +These are two-column styles designed to show only the symbol and description. However, if the symbol isn’t set then the name will be used instead. If this occurs, you may need to change the width of the description column.

    +The horizontal alignment for the symbol column is obtained with:

    +\glslongextraSymbolNameAligninitial: l
    + which expands to l by default. Note that this is different from the alignment used for styles like long-name-sym-desc.

    +These styles have the entry item number (if entrycounter is on) and the hypertarget anchor (if enabled) in the symbol column since there’s no name shown (unless the symbol is missing). These are all performed by for top-level entries by:

    +\glslongextraSymbolTargetFmt{entry-label}
    + The symbol is formatted according to \glslongextraSymbolFmt. Child entries use:
    +\glslongextraSubSymbolTargetFmt{level}{entry-label}
    + Unlike \glslongextraSubNameFmt this shows the field value (formatted with \glslongextraSymbolFmt).

    +The following commands use the above if the symbol field is set, otherwise they show the name.

    +

    +\glslongextraSymbolOrName{entry-label}
    + Shows the symbol, if set, or the name otherwise, with the target. Child entries use:
    +\glslongextraSubSymbolOrName{level}{entry-label}
    + Shows the symbol with \glslongextraSubSymbolTargetFmt, if set, or the name otherwise, with the target.

    +In each case, the style starts with:

    +\glslongextraSymNoNameSetDescWidth
    + which calculates \glsdescwidth as \linewidth-4\tabcolsep-W, where W is the width of the symbol column header. Note that this assumes the content of the symbol column isn’t wider than the column header.

    +If you want to set \glsdescwidth to a specific value, then redefine \glslongextraSymNoNameSetDescWidth with the desired length assignment.

    +

    +long-sym-desc
    + The symbol is in the left column (or the name, if the symbol isn’t set). The description is in the right. The location list isn’t shown. The table header is given by:
    +\glslongextraSymDescTabularHeader
    + which shows the column headers with horizontal rules. The table footer is given by:
    +\glslongextraSymDescTabularFooter
    + which just does a horizontal rule. With longtable, the table header and footer are set with:
    +\glslongextraSymDescHeader
    + which uses the above header and footer commands.

    +

    +long-desc-sym
    + The symbol is in the right column (or the name, if the symbol isn’t set). The description is in the left. The location list isn’t shown. The table header is given by:
    +\glslongextraDescSymTabularHeader
    + which shows the column headers with horizontal rules. The table footer is given by:
    +\glslongextraDescSymTabularFooter
    + which just does a horizontal rule. With longtable, the table header and footer are set with:
    +\glslongextraDescSymHeader
    + which uses the above header and footer commands.

    + +

    + +
    +

    8.7.2.6. Abbreviations Only

    +

    +These styles are designed for abbreviations. They display the short and long forms, rather than the name and description, although these may happen to match. They are primarily intended for mini-glossaries or similar summary lists.

    +Although these styles don’t show the name or description, they still use some of the name and description settings provided by glossary-longextra. The column for the short form uses the same alignment as for the name columns (\glslongextraNameAlign). The column for the long form uses the same alignment as for the description columns (\glslongextraDescAlign) and has the width set to \glsdescwidth. However, the name and description formatting commands or attributes (such as \glsnamefont, glossnamefont or glossname) aren’t used as the formatting is left to the abbreviation style.

    +If the short field hasn’t been set, the short column will show the name instead, and if the long field hasn’t been set, the long column will show the description instead (using the same commands as for styles like long-name-desc, which do use the associated formatting commands and attributes).

    +These styles use the following commands:

    +\glslongextraShortHeaderinitial: \entryname
    + The header for the column showing the short form. This is defined as:
    \newcommand{\glslongextraShortHeader}{\entryname}
    +

    +

    +\glslongextraLongHeaderinitial: \descriptionname
    + The header for the column showing the long form. This is defined as:
    \newcommand{\glslongextraLongHeader}{\descriptionname}
    +

    +

    +\glslongextraShortTargetFmt{entry-label}
    + This governs the way that the short form should be displayed, including the target. This is defined as:
    \newcommand{\glslongextraShortTargetFmt}[1]{% 
    + \glsentryitem{#1}\glstarget{#1}{{\glsxtrshort[noindex,hyper=false]{#1}}}% 
    + \glsxtrpostnamehook{#1}}
    +
    Note that the post-name hook is included.

    +

    +\glslongextraLongFmt{entry-label}
    + This governs the way that the long form should be displayed. This is defined as:
    \newcommand{\glslongextraLongFmt}[1]{% 
    + {\glsxtrlong[noindex,hyperfalse]{#1}}\glspostdescription
     }
    -
    -

    and suppose the document code is: - - - -

    -
    -\documentclass{article}
    -\usepackage{hyperref}
    -\usepackage[record,abbreviations,symbols]{glossaries-extra}
    -\newcommand{\bibglsnewdualindexsymbolsecondary}[5]{%
    - \longnewglossaryentry*{#1}{name={#3},category={symbol},
    -   type={symbols},symbol={#4},#2}{#5}%
    +
    Note that the post-description hook is included.

    +

    +\glslongextraSubShortTargetFmt{level}{entry-label}
    + This governs the way that the short form for child entries should be displayed, including the target. This is defined as:
    \newcommand{\glslongextraSubShortTargetFmt}[2]{% 
    + \glssubentryitem{#2}\glstarget{#2}{{\glsxtrshort[noindex,hyper=false]{#2}}}% 
    + \glsxtrpostnamehook{#2}}
    +

    +

    +\glslongextraSubLongFmt{level}{entry-label}
    + This governs the way that the long form for child entries should be displayed. This is defined as:
    \newcommand{\glslongextraSubLongFmt}[2]{\glslongextraLongFmt{#2}}
    +

    +

    +\glslongextraShortNoNameSetDescWidth
    + This is used to compute the value of \glsdescwidth and assumes that none of the short forms are wider than \glslongextraShortHeader.

    +

    +abbr-short-long
    + A two column style. The short form is in the left column. The long form is in the right. The location list isn’t shown.

    +The table header is given by:

    +\glslongextraShortLongTabularHeader
    + which shows the column headers with horizontal rules.

    +The table footer is given by:

    +\glslongextraShortLongTabularFooter
    + which just does a horizontal rule. With longtable, the table header and footer are set with:
    +\glslongextraShortLongHeader
    + which uses the above header and footer commands.

    +

    +abbr-long-short
    + A two column style. The short form is in the right column. The long form is in the left. The location list isn’t shown.

    +The table header is given by:

    +\glslongextraLongShortTabularHeader
    + which shows the column headers with horizontal rules.

    +The table footer is given by:

    +\glslongextraLongShortTabularFooter
    + which just does a horizontal rule. With longtable, the table header and footer are set with:
    +\glslongextraLongShortHeader
    + which uses the above header and footer commands.

    +

    + +

    + +
    +

    8.7.3. glossary-topic package

    +

    +The glossary-topic package provides glossary styles designed for hierarchical glossaries where the top-level entries are topic titles. This package automatically loads the multicol package. If the glossary-tree package is also loaded then commands like \glssetwidest can be used on these styles in much the same way as for the alttree style. If a widest value isn’t set then these styles behave more like the tree style.

    +This package provides styles designed for glossaries that are lists of topics. That is, the top-level entries are considered topic titles (which may or may not have an associated symbol or description) and the sub-entries are items within that topic. By default the location list isn’t shown for the top-level entries but is shown after the description for sub-entries (unless suppressed with nonumberlist or save-locations=false).

    +The following styles are provided:

    +topic
    + This style is similar to the tree style but the indentation doesn’t start until the second sub-item level. The top-level entries have the name displayed in a larger font with the description following in a new paragraph (see Example 147). This style doesn’t support the nogroupskip setting.

    +

    +Example 147: The topic style 📥🖹 📥🖺

    +Example document demonstrating the topic style.

    +

    +

    +topicmcols
    + This style is like the topic style but the sub-entries are placed inside a multicols environment (unlike styles such as mcoltree where the entire glossary content is within a single multicols environment). The environment name is supplied in the value of the command:
    +\glstopicColsEnv
    + This defaults to multicols. You can change this to the starred form. For example:
    \renewcommand{\glstopicColsEnv}{multicols*}
    +
    The number of columns is given by the command:
    +\glstopicCols
    + This expands to 2, by default. This style is demonstrated in Example 148.

    +

    +Example 148: The topicmcols style 📥🖹 📥🖺

    +Example document demonstrating the topicmcols style.

    +

    +Both styles can have a widest name set like the alttree style, using the commands provided by glossary-tree and glossaries-extra-stylemods or with the set-widest resource option. If a widest name is set, then the sub-entry names will be placed in a box of the given width otherwise they won’t be placed in a box. In Example 149, the widest names have been set for level 1 and level 2 using:

    \glssetwidest[1]{parameter}
    +\glssetwidest[2]{\glsentryname{cosine}}
    +
    Note that this doesn’t change the indentation at the start of the level 2 items to match the width of the level 1 widest name.

    +

    +Example 149: The topicmcols style with the widest name set 📥🖹 📥🖺

    +Example document demonstrating the topicmcols style.

    +

    +Both of the above styles use the following commands.

    +\glstopicParIndent
    + This command is a length that’s used for the paragraph indentation in any multi-paragraph description for top-level entries, but not for the first paragraph (at the start of the description) which isn’t indented.

    +

    +\glstopicSubIndent
    + This command is a length that’s used to calculate the hanging indentation for sub-entries. The level 1 sub-entries don’t indent the name. Level n sub-entries have the name indented by (n-1)×\glstopicSubIndent. The hanging indent depends on whether or not a widest name has been set for the level.

    +There is also a length for additional indentation used in the second paragraph onwards for child entries with multi-paragraph descriptions:

    +\glstopicSubItemParIndent
    + This is initialised to \parindent when glossary-topic is loaded.

    +

    +\glstopicInit
    + This hook is used at the start of the glossary. It does nothing by default.

    +Although the styles don’t support letter groups by default, if you have many topics (top-level entries) and you feel that it would help the reader to divide them up into headed letter groups, you can redefine:

    +\glstopicGroupHeading{group-label}
    + This does nothing by default. If you want to redefine it, you can fetch the title corresponding to the group label with \glsxtrgetgrouptitle. For example:
    \renewcommand*{\glstopicGroupHeading}[1]{% 
    +  \glsxtrgetgrouptitle{#1}{\thisgrptitle}% 
    +  \section*{\thisgrptitle}% 
     }
    -\GlsXtrLoadResources[src=entries]
    -\begin{document}
    -First use: \gls{duck}, \gls{svm}, \gls{pi}.
    -Next use: \gls{duck}, \gls{svm}, \gls{pi}.
    -\printunsrtglossaries
    -\end{document}
    -
    -

    This uses the default empty primary prefix and dual. for the dual prefix, so -\gls{svm} is referencing the primary entry, which is (essentially) an @index type -not an abbreviation. It therefore doesn’t follow the abbreviation style, and -it also hyperlinks to the index not to the list of abbreviations. Similarly -for \gls{pi}, which references the primary @index entry rather than the -symbol. -

    What’s really needed is: - - - -

    -
    -\gls{duck}, \gls{dual.svm}, \gls{dual.pi}.
    -
    -

    or with - - - -

    -
    -\GlsXtrLoadResources[src=entries,
    - label-prefix={idx.},
    - dual-prefix={}
    -]
    -
    -

    then only the entries without a dual need a prefix: - - - -

    -
    -\gls{idx.duck}, \gls{svm}, \gls{pi}.
    -
    -

    Using \glsxtrnewglslike, as earlier, this can be simplified to: - - - -

    -
    -\idx{duck}, \gls{svm}, \gls{pi}.
    -
    -

    but this requires remembering which terms have duals. -

    An alternative is to use \dgls instead: - - - -

    -
    -\documentclass{article}
    -\usepackage{hyperref}
    -\usepackage[record,abbreviations,symbols]{glossaries-extra}
    -\newcommand{\bibglsnewdualindexsymbolsecondary}[5]{%
    - \longnewglossaryentry*{#1}{name={#3},category={symbol},
    -   type={symbols},symbol={#4},#2}{#5}%
    +
    Remember that if you are using bib2gls, you will need the --group or -g switch to support groups (see §8.4.1).

    +Sub-groups are only available with bib2gls and the group-level option. If they are supported, sub-group headings are formatted according to:

    +\glstopicSubGroupHeading{prev group level}{group level}{parent entry}{group-label}
    + This formats the sub-group heading. Note that unlike \glstopicGroupHeading this command does actually format the sub-group heading by default. This means that it you use group-level=all, the top-level groups won’t be displayed, but the sub-groups will be.

    +Top-level entries are formatted according to:

    +\glstopicItem{entry-label}{location list}
    + This formats the name and (if provided) the symbol. The description (if set) will follow in a new paragraph. At the start of \glstopicItem, a vertical space is added with:
    +\glstopicPreSkip
    + which defaults to \medskip. There is then a hook:
    +\glstopicMarker{entry-label}
    + which does nothing by default, but may be redefined. For example, to add a line to the table of contents. The name and symbol are set in the form of a title using:
    +\glstopicTitle{entry-label}
    + This uses \Glossentryname which uses sentence case. If there’s a symbol, this is added in parentheses. Both name and symbol (if present) are encapsulated by:
    +\glstopicTitleFont{text}
    + This uses a bold, large font by default.

    +If the entry has the description key set (tested with \ifglshasdesc) then a paragraph break is inserted followed by:

    +\glstopicMidSkip
    + which defaults to \smallskip. This is followed by the description which is formatted according to:
    +\glstopicDesc{entry-label}
    + This just does \Glossentrydesc{entry-label} followed by the post-description hook. There is then a paragraph break followed by:
    +\glstopicPostSkip
    + regardless of whether or not the description was displayed. This defaults to \smallskip. This is then followed by:
    +\glstopicLoc{entry-label}{location list}
    + which may be used to display the location list, but does nothing by default.

    +The sub-entries first set up the paragraph and hanging indentations using:

    +\glstopicAssignSubIndent{level}
    + This uses:
    +\glstopicAssignWidest{level}
    + to determine if a widest name has been set for the given level.

    +The sub-entry has its information displayed using:

    +\glstopicSubItem{level}{entry-label}{location list}
    + This encapsulates the name with:
    +\glstopicSubNameFont{text}
    + By default this just uses \textbf. This is followed by:
    +\glstopicSubItemSep
    + which defaults to \quad. The name and separator are passed in the text argument of:
    +\glstopicSubItemBox{level}{text}
    + If a widest name was set for the given level, this will put text inside a box of that width otherwise it just does text.

    +This is followed by the symbol in parentheses if set. Then, if the description is set, the description and post-description hook are displayed followed by:

    +\glstopicSubPreLocSep
    + (This command isn’t used if the description isn’t set.)

    +Finally the location list is displayed using:

    +\glstopicSubLoc{entry-label}{location list}
    + which just does location by default.

    + +

    + +
    +

    8.7.4. glossary-table package

    +

    +The glossary-table package is new to version 1.49 and is still experimental. It automatically loads glossary-longbooktabs.

    +It doesn’t provide any general purpose styles, but instead provides one highly customized style table designed to work with a supplied command:

    +\printunsrttable[options]
    + The aim of this command is to show the glossary as a longtable, where the caption is what would normally be the glossary header (title). What’s normally the table of contents title (toctitle) will be added to the list of tables instead.

    +This internally uses \printunsrtglossary with the style set to table and is intended for use with bib2gls. It supports up to 1 hierarchical level, but you will need the save-child-count resource option if you want the level 1 sub-entries to show. Deeper level entries are omitted. If you want any additional filtering, you can redefine:

    +\glstableiffilter{entry-label}{true}{false}
    + This command should do true if the entry identified by entry-label should be skipped, otherwise it should do false. For example, the following will filter entries that have the category set to general:
    \renewcommand{\glstableiffilter}[1]% 
    + \glsifcategory{#1}{general}
    +
    Note that if this command is redefined to do neither true nor false or does both, it will interfere with the width calculations if par isn’t set to the default par=false.

    +Styles like long create a longtable with one entry per row. The table style allows multiple entries per row. A “block” indicates a block of columns used to format one entry. One row of the table contains multiple blocks.

    +An extra field may be added with the other key. If this value is empty, then no extra field will be added. Block styles that show the description will put this other field in before the description, in the same column as the description. Block styles that don’t show the description, will put the other field after the name, in the same column as the name. Some block styles, such as symbol-name and symbol-other put the other field in its own column.

    +The optional argument may have the options that can typically be passed to \printunsrtglossary, except that the nogroupskip, nonumberlist and style options won’t have an effect. If you want the location list, it can simply be obtained from the location field in the appropriate style hook.

    +Additionally, the following options may also be used.

    +

    +blocks=ninitial: 2
    + The value is the number of blocks in the table. The total number of columns in the table will be this value multiplied by the number of columns per block, which is determined by the block style. For example, the name-desc has two columns, so if there are three blocks then there will be a total of six columns.

    +

    +header=booleandefault: true; initial: true
    + A boolean option to determine whether or not to show the header row. The header text is produced with one of the following commands:
    +\glstablenameheader
    + Expands to the header for the name column. Just uses \entryname by default.

    +

    +\glstabledescheader
    + Expands to the header for the description column for block styles like name-desc and name-symbol-desc. Just uses \descriptionname by default.

    +

    +\glstablesymbolheader
    + Expands to the header for the symbol column for block styles like name-symbol and name-symbol-desc. Just uses \symbolname by default.

    +

    +\glstableotherheader
    + Expands to the header for the other column. The default definition applies \MFUsentencecase to the other field label.

    +

    +rules=booleandefault: true; initial: true
    + A boolean option to determine whether or not to show the horizontal rules (provided by booktabs). If used with header=true, there will be a rule above and below the header row. If used with header=false, there will only be one rule at the top of the table. In both cases, there will be a rule at the bottom of the table.

    +

    +blocksep=alignment specinitial: |
    + The value is inserted into the alignment specifier list between blocks. For example, the default value of the pipe character will insert a vertical line. Set this value to empty to remove it.

    +

    +par=valueinitial: false
    + Indicates whether or not the columns should be paragraphs. The value may be one of: false, justified or ragged. The default par=false will just use one of the column specifiers l, r or c. The other values will use the p specifier, in which case the column widths will be calculated.

    +

    +other=field-labelinitial: empty
    + This should be set to the internal field label of the other field or to empty if no other field should be included.

    +

    +init={code}initial: empty
    + The code will be added shortly before \printunsrtglossary is called and any local changes will be scoped.

    +

    +block-style=valueinitial: name-desc
    + The block style, which may be one of the following:

    +

    +block-style=name-desc
    + Blocks have two columns with the name in the first column of the block and the description in the second. This is the default style.

    +

    +block-style=desc-name
    + Blocks have two columns with the description in the first column of the block and the name in the second.

    +

    +block-style=name-symbol
    + Blocks have two columns with the name in the first column of the block and the symbol in the second.

    +

    +block-style=symbol-name
    + Blocks have two columns with the symbol in the first column of the block and the name in the second.

    +

    +block-style=name-symbol-desc
    + Blocks have three columns with the name in the first column of the block, the symbol in the second, and the description in the third.

    +

    +block-style=name-desc-symbol
    + Blocks have three columns with the name in the first column of the block, the description in the second, and the symbol in the third.

    +

    + Blocks have one column with the name followed by the symbol and description in parentheses, if they have been set.

    +

    +block-style=name-other
    + This is like name-desc but puts the other field in the second column. The description and symbol aren’t shown. Note that you will need to set the other key to the required field, otherwise you will end up with an empty column.

    +

    +block-style=other-name
    + This is like desc-name but puts the other field in the second column. The description and symbol aren’t shown. Note that you will need to set the other key to the required field, otherwise you will end up with an empty column.

    +

    +block-style=symbol-other
    + This is like name-other but shows the symbol instead of the name.

    +

    +block-style=other-symbol
    + This is like other-name but shows the symbol instead of the name.

    +The block styles alter the way the table style sets up the longtable environment and the way that the entries are formatted. The top level glossary style command \glossentry is defined to do the block according to the designated block style and then it will follow the block with the child entries, if the childlist field has been set.

    +

    +The \subglossentry command is redefined to do nothing, but it won’t be used as the child entries are all filtered out. If you don’t use the save-child-count resource option, no child entries will be shown. There’s no recursive descent down the hierarchical levels.
    +

    +This means that the child entries will be listed at the end of the last column in the block. This can make the column quite wide. The child names aren’t displayed by default but supports the subentrycounter option. The child entries are listed in a tabular environment, which means they are contained in the same row as their parent and can’t be broken across a page.

    +

    +The remaining commands are undocumented as they are liable to change.
    +

    +The following example uses the name block style, which only has one column per block. The name is followed by the description in parentheses (if set), which is then followed by the child list. I redefined \glsnamefont to make the name appear in bold, to highlight it. I’ve used the par=ragged option, otherwise the table will be too wide to fit the page.

    \usepackage 
    + [record,stylemods=table,subentrycounter]
    + {glossaries-extra}
    +
    +\GlsXtrLoadResources[
    + % entries in example-glossaries-childnoname.bib:
    + src=example-glossaries-childnoname,
    + selection=all,
    + save-child-count=]
    +\begin{document}
    +\printunsrttable
    + [
    +  block-style=name,par=ragged,
    +  preamble={Some preamble text},
    +  postamble={Some postamble text},
    +  init={%      \let\glsnamefont\textbf     \def\glstablenameheader{Summary}%    }
    + ]
    +\end{document}
    +
    This creates a table with two entries per row.
    +Example 150: Two entries per row with \printunsrttable 📥🖹 📥🖺

    +Example document with a tabular glossary with two entries per row. The child list is in the same cell as the parent..

    + Note that each row is as deep as the entry with the most children. So where a row has one column with two children and another with seven, the row is deep enough to accommodate the seven child entries, which leaves a gap below the smaller list of two children.

    +

    + +

    + +
    +

    9. Accessibility Support

    +

    +The glossaries package comes with a supplementary package glossaries-accsupp that helps provide accessibility support. The glossaries-extra package provides additional support, but only if the glossaries-accsupp package has already been loaded when the relevant commands are defined. The best and simplest way to do this is through the accsupp package option.

    +See the “Accessibility Support” chapter in the glossaries user guide for further information about glossaries-accsupp.

    + +

    + +
    +

    9.1. Abbreviations

    +

    +The accessibility fields relating to abbreviations are shortaccess, shortpluralaccess, longaccess and longpluralaccess. These provide the replacement text for the corresponding short, shortplural, long and longplural fields. The access field provides the replacement text for the name field.

    +Some of these accessibility fields are automatically assigned by \newabbreviation if they haven’t been set.

    +

    +\glsxtrassignactualsetup

    +

    +
    + This command is used to locally redefine common formatting commands so that they can be stripped to obtain only the text. You can add additional commands with \appto. For example, the following eccentric example has some strange styling in the abbreviation:
    \newabbreviation{foo}{f\textsuperscript{o}\textsubscript{o}}{furry old otters}
    +
    If an accessibility field is being automatically assigned with text obtained from the short value, then the subscript and superscript commands will need to be stripped. These need to be locally redefined to just do their arguments:
    \appto\glsxtrassignactualsetup{%
    +  \letcs{\textsuperscript}{@firstofone}%
    +  \letcs{\textsubscript}{@firstofone}%
     }
    -\GlsXtrLoadResources[src=entries]
    -\glsxtraddlabelprefix{dual.}
    -\glsxtraddlabelprefix{}
    -\begin{document}
    -First use: \dgls{duck}, \dgls{svm}, \dgls{pi}.
    -Next use: \dgls{duck}, \dgls{svm}, \dgls{pi}.
    -\printunsrtglossaries
    -\end{document}
    -
    -

    On the first LaTeX call (when the .glstex file doesn’t exist), neither dual.svm nor -svm exists, so \dgls uses the last prefix (which is empty in this case). This means -that on the first LaTeX run, \dgls{svm} behaves like \gls{svm}, which adds a -record for the primary svm entry. The default primary-dual dependency means that -this will cause both the primary (svm) and dual (dual.svm) entry to be selected. The -location will be added to the primary entry’s location list, unless overridden by -resource options, such as combine-dual-locations. -

    Once bib2gls has been run and the .glstex file exists, then dual.svm exists. -So \dgls{svm} will again first try dual.svm (as dual. is the first in the -list of label prefixes). That now exists, so \dgls{svm} now behaves like -\gls{dual.svm}, which follows the abbreviation style and hyperlinks to the list of -abbreviations. -

    Similarly for the index-symbol combination dual.pi and pi. In the case of -\dgls{duck}, the label dual.duck never exists, so that’s never selected. The empty -prefix is the only one that matches, so \dgls{duck} always behaves like -\gls{duck}. -

    If you haven’t used combine-dual-locations an extra bib2gls+LaTeX run -may be required to correct the location lists. -

    If you change the label prefixes, remember to update the corresponding -\glsxtraddlabelprefix{prefix}. If no prefixes have been added to the list (or if the -list is cleared), just an empty prefix is assumed. -

    As from version 1.8, bib2gls provides hooks that identify the label prefixes in the -.glstex file:

    - - - -
    -\bibglstertiaryprefixlabel{prefix} -
    \bibglsdualprefixlabel{prefix} -
    \bibglsprimaryprefixlabel{prefix} -
    -
    These do nothing by default, but they can be defined before the resource file is -loaded to set up the prefix list. For example: - - - -
    -\newcommand{\bibglsprimaryprefixlabel}[1]{\glsxtraddlabelprefix{#1}}
    -\newcommand{\bibglsdualprefixlabel}[1]{\glsxtrprependlabelprefix{#1}}
    -\GlsXtrLoadResources[src=entries]
    -
    -

    Remember that this will only have an effect once the .glstex file has been created. -The prefix list will be empty on the first run (which is treated as a single empty -prefix). If this isn’t a suitable fallback, it may be necessary to add one after all the -resource commands: - - - -

    -
    -\newcommand{\bibglsprimaryprefixlabel}[1]{\glsxtraddlabelprefix{#1}}
    -\newcommand{\bibglsdualprefixlabel}[1]{\glsxtrprependlabelprefix{#1}}
    -\GlsXtrLoadResources[src=entries,label-prefix={idx.}]
    -\glsxtraddlabelprefix{idx.}
    -
    -

    Although this rather defeats the purpose of using the hooks as you still have to keep -track of the fallback prefix. -

    -

    -

    Top

    10.5 Record Counting

    -

    As from version 1.1 of bib2gls, you can save the total record count for each entry by -invoking bib2gls with the --record-count or --record-count-unit switches. -These options will ensure that when each entry is written to the .glstex file -bib2gls will additionally set the following internal fields for that entry: -

    -
      -
    • recordcount: set to the total number of records found for the entry; -
    • -
    • recordcount.counter⟩: set to the total number of records found for the - entry for the given counter.
    -

    If --record-count-unit is used then additionally:

    -
      -
    • recordcount.counter.location⟩: set to the total number of records - found for the entry for the given counter with the given location.
    -

    Only use the unit counting option if the locations don’t contain any special characters. If -you really need it with locations that may contain formatting commands, then you -can try redefining: -


    \glsxtrdetoklocation{location}

    -

    -so that it detokenizes ⟨location⟩ but take care when using \GlsXtrLocationRecordCount -with commands like \thepage as they can end up becoming detokenized too -early. -

    Note that the record count includes locations that bib2gls discards, such as -ignored records, duplicates and partial duplicates. It doesn’t include cross-reference -records. For example, if \gls{bird} is used twice on page 1, once on page 2 and -fours times on page 3, and \gls[counter=section]{bird} is used once in - - - -section 3, then the total record count (stored in the recordcount field) is -2 + 1 + 4 + 1 = 8, the total for the page counter (stored in the recordcount.page -field) is 2 + 1 + 4 = 7, and the total for the section counter (stored in the -recordcount.section field) is 1. -

    With the unit counting on as well, the field recordcount.page.1 is set to -2, recordcount.page.2 is set to 1, recordcount.page.3 is set to 4 and -recordcount.section.3 is set to 1. -

    You can access these fields using the following commands which will expand to -the field value if set or to 0 if unset: -


    \GlsXtrTotalRecordCount{label}

    -

    -This expands to the total record count for the entry given by ⟨label⟩. - - - -

    -
    -\GlsXtrTotalRecordCount{bird}
    -
    -

    expands to 8. -


    \GlsXtrRecordCount{label}{counter}

    -

    -This expands to the counter total for the entry given by ⟨label⟩ where ⟨counter⟩ is the -counter name. For example: - - - -

    -
    -\GlsXtrRecordCount{bird}{page}
    -
    -

    expands to 7 and - - - -

    -
    -\GlsXtrRecordCount{bird}{section}
    -
    -

    expands to 1. -


    \GlsXtrLocationRecordCount{label}{counter}{location}

    -

    -This expands to the total for the given location. For example - - - -

    -
    -\GlsXtrLocationRecordCount{bird}{page}{3}
    -
    -

    expands to 4. Be careful about using \thepage in the ⟨location⟩ part. Remember that -due to TeX’s asynchronous output routine, \thepage may not be correct. -

    There are commands analogous to the entry counting commands like \cgls -and \cglsformat that are triggered by the record count. These are listed -below. -


    \rglsmodifier[options]{label}[insert]

    -

    -


    \rglsplmodifier[options]{label}[insert]

    -

    -


    \rGlsmodifier[options]{label}[insert]

    -

    -


    \rGlsplmodifier[options]{label}[insert]

    -

    -


    \rGLSmodifier[options]{label}[insert]

    -

    -


    \rGLSplmodifier[options]{label}[insert]

    -

    -These commands check the recordcount attribute which, if set, should be a number. -For example: - - - -

    -
    -\glssetcategoryattribute{abbreviation}{recordcount}{1}
    -
    -

    For convenience, you can use -


    \GlsXtrSetRecordCountAttribute{category list}{n}

    -

    -to set the recordcount attribute to ⟨n⟩ for all the categories listed in ⟨category -list⟩. -

    The \rgls-like commands use -


    \glsxtrifrecordtrigger{label}{trigger code}{normal}

    -

    -to determine whether the \rgls-like command should behave like its \gls -counterpart (⟨normal⟩) or whether it should instead use ⟨trigger code⟩. -

    This command checks if the recordcount attribute is set. If not is just does -⟨normal⟩, otherwise it tests if -


    \glsxtrrecordtriggervalue{label}

    -

    -is greater than the value given in the recordcount attribute for that entry’s category. -If true, this does ⟨normal⟩ otherwise it does ⟨trigger code⟩. The default definition of the -trigger value command is: - - - -

    -
    -\newcommand*{\glsxtrrecordtriggervalue}[1]{%
    - \GlsXtrTotalRecordCount{#1}%
    +

    +The attributes that specifically relate to accessibility in abbreviations are listed below. The “actual short value” means the value obtained from the short value after any markup commands have have locally redefined using \glsxtrassignactualsetup. The actual short value may then be modified by these attributes. Similarly, for the “actual long value”.

    +Finally, if shortaccess hasn’t already been set, it will be set to:

    \glsdefaultshortaccess{actual long}{actual short}
    +
    (with \glsdefaultshortaccess expanded). This command is provided by glossaries-accsupp and is defined to do just {actual long}. It was redefined by glossaries-extra v1.42 to do {actual long} ({actual short}), but has been reverted back to its original definition in v1.49.

    +

    +accessinsertdots=boolean
    + If the shortaccess key hasn’t been set then this attribute will be checked. If true, the actual short value will have dots inserted (as per insertdots). Note that if this attribute hasn’t been set but insertdots is true (and the shortaccess key hasn’t been set), then the actual short value will also have dots inserted.

    +

    +accessaposplural=boolean
    + If the shortpluralaccess key hasn’t been set then this attribute will be checked. If true, the actual short plural value will have the apostrophe suffix (similar to aposplural but using \glsxtrabbrvpluralsuffix instead of \abbrvpluralsuffix). Note that if this attribute hasn’t been set but aposplural is true (and the shortpluralaccess key hasn’t been set), then the actual short plural value will also have the apostrophe suffix.

    +

    +accessnoshortplural=boolean
    + If the shortpluralaccess key hasn’t been set and the accessaposplural attribute hasn’t been set, then this attribute will be checked. If true, the actual short plural value will be the same as the singular (as noshortplural). Note that if this attribute hasn’t been set but noshortplural is true (and the shortpluralaccess key hasn’t been set), then the actual short plural value will also be the singular form.

    +

    +nameshortaccess=boolean
    + If the access key hasn’t been set and this attribute is true, then the access field will be set to the same as the shortaccess.

    +

    +textshortaccess=boolean
    + If the textaccess key hasn’t been set and this attribute is true, then the textaccess field will be set to the same as the shortaccess. Additionally, if the pluralaccess key hasn’t been set, then it will be set to the same as the shortpluralaccess value.

    +

    +firstshortaccess=boolean
    + If the firstaccess key hasn’t been set and this attribute is true, then the firstaccess field will be set to the same as the shortaccess. Additionally, if the firstpluralaccess key hasn’t been set, then it will be set to the same as the shortpluralaccess value.

    + +

    + +
    +

    9.2. Accessibility Wrappers

    +

    +The glossary style commands such as \glossentryname incorporate accessibility support by using the \glsaccessfield commands instead of the corresponding \glsentryfield commands.

    +If the glossaries-accsupp package hasn’t been loaded or if the relevant accessibility field hasn’t been set, these commands simply do the corresponding \glsentryfield command.

    +

    +\glsaccessname{entry-label}
    + This shows the name field encapsulated with \glsnameaccessdisplay or just \glsentryname{entry-label}.

    +

    +\Glsaccessname{entry-label}
    + As above but sentence case.

    +

    +\GLSaccessname{entry-label}
    + As above but all caps.

    +

    +\glsaccesstext{entry-label}
    + This shows the text field encapsulated with \glstextaccessdisplay or just \glsentrytext{entry-label}.

    +

    +\Glsaccesstext{entry-label}
    + As above but sentence case.

    +

    +\GLSaccesstext{entry-label}
    + As above but all caps.

    +

    +\glsaccessplural{entry-label}
    + This shows the plural field encapsulated with \glspluralaccessdisplay or just \glsentryplural{entry-label}.

    +

    +\Glsaccessplural{entry-label}
    + As above but sentence case.

    +

    +\GLSaccessplural{entry-label}
    + As above but all caps.

    +

    +\glsaccessfirst{entry-label}
    + This shows the first field encapsulated with \glsfirstaccessdisplay or just \glsentryfirst{entry-label}.

    +

    +\Glsaccessfirst{entry-label}
    + As above but sentence case.

    +

    +\GLSaccessfirst{entry-label}
    + As above but all caps.

    +

    +\glsaccessfirstplural{entry-label}
    + This shows the firstplural field encapsulated with \glsfirstpluralaccessdisplay or just \glsentryfirstplural{entry-label}.

    +

    +\Glsaccessfirstplural{entry-label}
    + As above but sentence case.

    +

    +\GLSaccessfirstplural{entry-label}
    + As above but all caps.

    +

    +\glsaccesssymbol{entry-label}
    + This shows the symbol field encapsulated with \glssymbolaccessdisplay or just \glsentrysymbol{entry-label}.

    +

    +\Glsaccesssymbol{entry-label}
    + As above but sentence case.

    +

    +\GLSaccesssymbol{entry-label}
    + As above but all caps.

    +

    +\glsaccesssymbolplural{entry-label}
    + This shows the symbolplural field encapsulated with \glssymbolpluralaccessdisplay or just \glsentrysymbolplural{entry-label}.

    +

    +\Glsaccesssymbolplural{entry-label}
    + As above but sentence case.

    +

    +\GLSaccesssymbolplural{entry-label}
    + As above but all caps.

    +

    +\glsaccessdesc{entry-label}
    + This shows the description field encapsulated with \glsdescriptionaccessdisplay or just \glsentrydesc{entry-label}.

    +

    +\Glsaccessdesc{entry-label}
    + As above but sentence case.

    +

    +\GLSaccessdesc{entry-label}
    + As above but all caps.

    +

    +\glsaccessdescplural{entry-label}
    + This shows the descriptionplural field encapsulated with \glsdescriptionpluralaccessdisplay or just \glsentrydescplural{entry-label}.

    +

    +\Glsaccessdescplural{entry-label}
    + As above but sentence case.

    +

    +\GLSaccessdescplural{entry-label}
    + As above but all caps.

    +

    +\glsaccessshort{entry-label}
    + This shows the short field encapsulated with \glsshortaccessdisplay or just \glsentryshort{entry-label}.

    +

    +\Glsaccessshort{entry-label}
    + As above but sentence case.

    +

    +\GLSaccessshort{entry-label}
    + As above but all caps.

    +

    +\glsaccessshortpl{entry-label}
    + This shows the shortplural field encapsulated with \glsshortpluralaccessdisplay or just \glsentryshortpl{entry-label}.

    +

    +\Glsaccessshortpl{entry-label}
    + As above but sentence case.

    +

    +\GLSaccessshortpl{entry-label}
    + As above but all caps.

    +

    +\glsaccesslong{entry-label}
    + This shows the long field encapsulated with \glslongaccessdisplay or just \glsentrylong{entry-label}.

    +

    +\Glsaccesslong{entry-label}
    + As above but sentence case.

    +

    +\GLSaccesslong{entry-label}
    + As above but all caps.

    +

    +\glsaccesslongpl{entry-label}
    + This shows the longplural field encapsulated with \glslongpluralaccessdisplay or just \glsentrylongpl{entry-label}.

    +

    +\Glsaccesslongpl{entry-label}
    + As above but sentence case.

    +

    +\GLSaccesslongpl{entry-label}
    + As above but all caps.

    +

    +\glsaccessuseri{entry-label}
    + This shows the user1 field encapsulated with \glsuseriaccessdisplay or just \glsentryuseri{entry-label}.

    +

    +\Glsaccessuseri{entry-label}
    + As above but sentence case.

    +

    +\GLSaccessuseri{entry-label}
    + As above but all caps.

    +

    +\glsaccessuserii{entry-label}
    + This shows the user2 field encapsulated with \glsuseriiaccessdisplay or just \glsentryuserii{entry-label}.

    +

    +\Glsaccessuserii{entry-label}
    + As above but sentence case.

    +

    +\GLSaccessuserii{entry-label}
    + As above but all caps.

    +

    +\glsaccessuseriii{entry-label}
    + This shows the user3 field encapsulated with \glsuseriiiaccessdisplay or just \glsentryuseriii{entry-label}.

    +

    +\Glsaccessuseriii{entry-label}
    + As above but sentence case.

    +

    +\GLSaccessuseriii{entry-label}
    + As above but all caps.

    +

    +\glsaccessuseriv{entry-label}
    + This shows the user4 field encapsulated with \glsuserivaccessdisplay or just \glsentryuseriv{entry-label}.

    +

    +\Glsaccessuseriv{entry-label}
    + As above but sentence case.

    +

    +\GLSaccessuseriv{entry-label}
    + As above but all caps.

    +

    +\glsaccessuserv{entry-label}
    + This shows the user5 field encapsulated with \glsuservaccessdisplay or just \glsentryuserv{entry-label}.

    +

    +\Glsaccessuserv{entry-label}
    + As above but sentence case.

    +

    +\GLSaccessuserv{entry-label}
    + As above but all caps.

    +

    +\glsaccessuservi{entry-label}
    + This shows the user6 field encapsulated with \glsuserviaccessdisplay or just \glsentryuservi{entry-label}.

    +

    +\Glsaccessuservi{entry-label}
    + As above but sentence case.

    +

    +\GLSaccessuservi{entry-label}
    + As above but all caps.

    + +

    + +
    +

    9.3. Inner Formatting Wrappers

    +

    +These \glsaccessfmtfield commands are similar to the corresponding \glsaccessfield commands described above, but they format the field value using \glsfmtfield, \Glsfmtfield or \GLSfmtfield with the supplied cs encapsulating command.

    +The default entry display style \glsgenentryfmt, and the predefined abbreviation styles all incorporate accessibility support by using these commands in order to support the inner formatting.

    +

    +\glsaccessfmtname{insert}{cs}{entry-label}
    + This shows the name field formatted with cs and, if accessibility support provided, encapsulated with \glsnameaccessdisplay.

    +

    +\Glsaccessfmtname{insert}{cs}{entry-label}
    + As above but sentence case.

    +

    +\GLSaccessfmtname{insert}{cs}{entry-label}
    + As above but all caps.

    +

    +\glsaccessfmttext{insert}{cs}{entry-label}
    + This shows the text field formatted with cs and, if accessibility support provided, encapsulated with \glstextaccessdisplay.

    +

    +\Glsaccessfmttext{insert}{cs}{entry-label}
    + As above but sentence case.

    +

    +\GLSaccessfmttext{insert}{cs}{entry-label}
    + As above but all caps.

    +

    +\glsaccessfmtplural{insert}{cs}{entry-label}
    + This shows the plural field formatted with cs and, if accessibility support provided, encapsulated with \glspluralaccessdisplay.

    +

    +\Glsaccessfmtplural{insert}{cs}{entry-label}
    + As above but sentence case.

    +

    +\GLSaccessfmtplural{insert}{cs}{entry-label}
    + As above but all caps.

    +

    +\glsaccessfmtfirst{insert}{cs}{entry-label}
    + This shows the first field formatted with cs and, if accessibility support provided, encapsulated with \glsfirstaccessdisplay.

    +

    +\Glsaccessfmtfirst{insert}{cs}{entry-label}
    + As above but sentence case.

    +

    +\GLSaccessfmtfirst{insert}{cs}{entry-label}
    + As above but all caps.

    +

    +\glsaccessfmtfirstplural{insert}{cs}{entry-label}
    + This shows the firstplural field formatted with cs and, if accessibility support provided, encapsulated with \glsfirstpluralaccessdisplay.

    +

    +\Glsaccessfmtfirstplural{insert}{cs}{entry-label}
    + As above but sentence case.

    +

    +\GLSaccessfmtfirstplural{insert}{cs}{entry-label}
    + As above but all caps.

    +

    +\glsaccessfmtsymbol{insert}{cs}{entry-label}
    + This shows the symbol field formatted with cs and, if accessibility support provided, encapsulated with \glssymbolaccessdisplay.

    +

    +\Glsaccessfmtsymbol{insert}{cs}{entry-label}
    + As above but sentence case.

    +

    +\GLSaccessfmtsymbol{insert}{cs}{entry-label}
    + As above but all caps.

    +

    +\glsaccessfmtsymbolplural{insert}{cs}{entry-label}
    + This shows the symbolplural field formatted with cs and, if accessibility support provided, encapsulated with \glssymbolpluralaccessdisplay.

    +

    +\Glsaccessfmtsymbolplural{insert}{cs}{entry-label}
    + As above but sentence case.

    +

    +\GLSaccessfmtsymbolplural{insert}{cs}{entry-label}
    + As above but all caps.

    +

    +\glsaccessfmtdesc{insert}{cs}{entry-label}
    + This shows the description field formatted with cs and, if accessibility support provided, encapsulated with \glsdescriptionaccessdisplay.

    +

    +\Glsaccessfmtdesc{insert}{cs}{entry-label}
    + As above but sentence case.

    +

    +\GLSaccessfmtdesc{insert}{cs}{entry-label}
    + As above but all caps.

    +

    +\glsaccessfmtdescplural{insert}{cs}{entry-label}
    + This shows the descriptionplural field formatted with cs and, if accessibility support provided, encapsulated with \glsdescriptionpluralaccessdisplay.

    +

    +\Glsaccessfmtdescplural{insert}{cs}{entry-label}
    + As above but sentence case.

    +

    +\GLSaccessfmtdescplural{insert}{cs}{entry-label}
    + As above but all caps.

    +

    +\glsaccessfmtshort{insert}{cs}{entry-label}
    + This shows the short field formatted with cs and, if accessibility support provided, encapsulated with \glsshortaccessdisplay.

    +

    +\Glsaccessfmtshort{insert}{cs}{entry-label}
    + As above but sentence case.

    +

    +\GLSaccessfmtshort{insert}{cs}{entry-label}
    + As above but all caps.

    +

    +\glsaccessfmtshortpl{insert}{cs}{entry-label}
    + This shows the shortplural field formatted with cs and, if accessibility support provided, encapsulated with \glsshortpluralaccessdisplay.

    +

    +\Glsaccessfmtshortpl{insert}{cs}{entry-label}
    + As above but sentence case.

    +

    +\GLSaccessfmtshortpl{insert}{cs}{entry-label}
    + As above but all caps.

    +

    +\glsaccessfmtlong{insert}{cs}{entry-label}
    + This shows the long field formatted with cs and, if accessibility support provided, encapsulated with \glslongaccessdisplay.

    +

    +\Glsaccessfmtlong{insert}{cs}{entry-label}
    + As above but sentence case.

    +

    +\GLSaccessfmtlong{insert}{cs}{entry-label}
    + As above but all caps.

    +

    +\glsaccessfmtlongpl{insert}{cs}{entry-label}
    + This shows the longplural field formatted with cs and, if accessibility support provided, encapsulated with \glslongpluralaccessdisplay.

    +

    +\Glsaccessfmtlongpl{insert}{cs}{entry-label}
    + As above but sentence case.

    +

    +\GLSaccessfmtlongpl{insert}{cs}{entry-label}
    + As above but all caps.

    +

    +\glsaccessfmtuseri{insert}{cs}{entry-label}
    + This shows the user1 field formatted with cs and, if accessibility support provided, encapsulated with \glsuseriaccessdisplay.

    +

    +\Glsaccessfmtuseri{insert}{cs}{entry-label}
    + As above but sentence case.

    +

    +\GLSaccessfmtuseri{insert}{cs}{entry-label}
    + As above but all caps.

    +

    +\glsaccessfmtuserii{insert}{cs}{entry-label}
    + This shows the user2 field formatted with cs and, if accessibility support provided, encapsulated with \glsuseriiaccessdisplay.

    +

    +\Glsaccessfmtuserii{insert}{cs}{entry-label}
    + As above but sentence case.

    +

    +\GLSaccessfmtuserii{insert}{cs}{entry-label}
    + As above but all caps.

    +

    +\glsaccessfmtuseriii{insert}{cs}{entry-label}
    + This shows the user3 field formatted with cs and, if accessibility support provided, encapsulated with \glsuseriiiaccessdisplay.

    +

    +\Glsaccessfmtuseriii{insert}{cs}{entry-label}
    + As above but sentence case.

    +

    +\GLSaccessfmtuseriii{insert}{cs}{entry-label}
    + As above but all caps.

    +

    +\glsaccessfmtuseriv{insert}{cs}{entry-label}
    + This shows the user4 field formatted with cs and, if accessibility support provided, encapsulated with \glsuserivaccessdisplay.

    +

    +\Glsaccessfmtuseriv{insert}{cs}{entry-label}
    + As above but sentence case.

    +

    +\GLSaccessfmtuseriv{insert}{cs}{entry-label}
    + As above but all caps.

    +

    +\glsaccessfmtuserv{insert}{cs}{entry-label}
    + This shows the user5 field formatted with cs and, if accessibility support provided, encapsulated with \glsuservaccessdisplay.

    +

    +\Glsaccessfmtuserv{insert}{cs}{entry-label}
    + As above but sentence case.

    +

    +\GLSaccessfmtuserv{insert}{cs}{entry-label}
    + As above but all caps.

    +

    +\glsaccessfmtuservi{insert}{cs}{entry-label}
    + This shows the user6 field formatted with cs and, if accessibility support provided, encapsulated with \glsuserviaccessdisplay.

    +

    +\Glsaccessfmtuservi{insert}{cs}{entry-label}
    + As above but sentence case.

    +

    +\GLSaccessfmtuservi{insert}{cs}{entry-label}
    + As above but all caps.

    + +

    + +
    +

    10. Categories

    +

    +

    +For multi-entry categories, see §7.8.
    +

    +Each entry defined by \newglossaryentry (or commands that internally use it such as \newabbreviation) is assigned a category through the 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 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 category with type.

    +

    +\glscategory{entry-label}
    + Expands to the category of the given entry or does nothing if the entry doesn’t exist (analogous to \glsentryname).

    +

    +\glsifcategory{entry-label}{category}{true}{false}
    + Tests if the entry given by entry-label has the category set to category.

    +An entry may have its category field changed using commands such as \GlsXtrSetField (see §3.5). In addition, the following commands are provided to batch set the category for a collection of entries.

    +

    +\glsxtrsetcategory{entry-labels}{category-label}
    + Globally sets the category field to the fully expanded category-label for each entry listed in entry-labels.

    +

    +\glsxtrsetcategoryforall{glossary-labels}{category-label}
    + Globally sets the category field to the fully expanded category-label for each entry belonging to the glossaries listed in glossary-labels.

    +There are also some iterative commands available:

    +

    +\glsforeachincategory[glossary-types]{category}{glossary-cs}{label-cs}{body}
    + This iterates through all entries in the glossaries identified by the comma-separated list glossary-labels that have the category given by category-label and performs body for each match. Within body, you can use glossary-cs and label-cs (which much be control sequences) to access the current glossary and entry label. If glossary-labels is omitted, all glossaries are assumed.

    +

    +\glsforeachwithattribute[glossary-types]{attribute-label}{attribute-value}{glossary-cs}{label-cs}{body}
    + This iterates over all entries in the given list of glossaries that have a category with the given attribute-label set to attribute-value and performs body at each iteration. If glossary-types is omitted, the list of all non-ignored glossaries is assumed. The remaining arguments are as for \glsforeachincategory.

    + +

    + +
    +

    10.1. Known Categories

    +

    +These are the category labels that are set or referenced by glossaries-extra.

    +

    +general
    + The default category assumed by \newglossaryentry.

    +

    +abbreviation
    + The default category assumed by \newabbreviation.

    +

    +acronym
    + The default category assumed by \newacronym.

    +

    +index
    + The default category assumed by \newterm.

    +

    +symbol
    + The default category assumed by \glsxtrnewsymbol.

    +

    +number
    + The default category assumed by \glsxtrnewnumber.

    + +

    + +
    +

    10.2. Attributes

    +

    +Each category may have a set of attributes, where each attribute has an associated value for its given category. An entry’s attribute set corresponds to the attributes associated with the entry’s category.

    +As with the category, the attribute name is also a label. You can provide your own custom attributes, which you can set and access with the commands described in §10.2.2.

    + +

    + +
    +

    10.2.1. Known Attributes

    +

    +This section lists attributes that glossaries-extra sets or accesses. If an attribute hasn’t been set, a default is assumed. For boolean attributes, the test may simply be to determine if the attribute has been set to true, in which case any other value or a missing value will be interpreted as false. Conversely, the test may be to determine if the attribute has been set to false, in which case any other value or a missing value will be interpreted as true.

    +

    +See §7.8 for attributes relating to multi-entry categories.
    +

    + +

    + +
    +

    10.2.1.1. Abbreviation Attributes

    +

    +See §9.1 for abbreviation accessibility attributes.

    +

    +regular=boolean
    + This attribute indicates whether or not an entry should be considered a regular entry. This enables \glsentryfmt to determine whether to use \glsgenentryfmt or \glsxtrgenabbrvfmt.

    +The general and acronym categories have the regular attribute automatically set to true. Some abbreviation styles change this value.

    +

    +discardperiod=boolean
    + If set to “true”, the post-link hook will discard a full stop that follows non-plural commands like \gls or \glstext(see §5.5.4).

    +

    +This attribute doesn’t apply to the accessibility fields. See §9.1 for attributes related to accessibility support for abbreviations.
    +

    +Note that this can cause a problem if you access a field that doesn’t end with a full stop. For example:

    \newabbreviation
    + [user1={German Speaking \TeX\ User Group}]
    + {dante}{DANTE e.V.}{Deutschsprachige Anwendervereinigung 
    +  \TeX\ e.V.}
    +
    Here the short and long fields end with a full stop, but the user1 field doesn’t. The simplest solution in this situation is to put the sentence terminator in the final optional argument. For example:
    \glsuseri{dante}[.]
    +
    This will bring the punctuation character inside the link text and it won’t be discarded.

    +

    +pluraldiscardperiod=boolean
    + If this attribute is set to “true” and the discardperiod attribute is set to “true”, this will behave as above for the plural commands like \glspl or \glsplural.

    +

    +retainfirstuseperiod=boolean
    + If this attribute is set to “true” then the discard is determined by \glsxtrdiscardperiodretainfirstuse, regardless of the discardperiod or pluraldiscardperiod attributes. This is useful for short (long) abbreviation styles where only the short form has a trailing full stop.

    +

    +This attribute doesn’t apply to the accessibility fields. See §9.1 for attributes related to accessibility support for abbreviations.
    +

    +

    +markwords=boolean
    + If this attribute is set to “true” any entry defined using \newabbreviation will automatically have spaces in the long form replaced with:
    +\glsxtrwordsep
    + and each word is encapsulated with:
    +\glsxtrword{word}
    + For example:
    \glssetcategoryattribute{abbreviation}{markwords}{true}
    +\newabbreviation{ip}{IP}{Internet Protocol}
    +
    is essentially the same as
    \newabbreviation{ip}{IP}
    +{\glsxtrword{Internet}\glsxtrwordsep\glsxtrword{Protocol}}
    +
    The “hyphen” styles, such as long-hyphen-short-hyphen, take advantage of this markup. If the inserted material (provided in the final argument of \gls-like commands) starts with a hyphen then \glsxtrwordsep is locally redefined to a hyphen. (The default value is a space). Note that this only applies to commands like \gls and not like \glsxtrlong. You can provide your own localised switch, if required. For example:
    \newcommand{\hyplong}[2][]{%
    + {\def\glsxtrwordsep{-}\glsxtrlong[#1]{#2}}}
    +

    +This setting will also adjust the long plural. This attribute is only applicable to entries defined using \newabbreviation (or \newacronym if it’s using \newabbreviation.)

    +

    +This setting may result in the \glsxtrword and \glsxtrwordsep markup ending up in the sort field, depending on the style in use.
    +

    +

    +markshortwords=boolean
    + This is similar to markwords but applies to the short form. (Only useful for abbreviations that contain spaces.) This attribute is only applicable to entries defined using \newabbreviation (or \newacronym if it’s using \newabbreviation.)

    +This setting will only adjust the short plural if the shortplural key isn’t used. This setting will take precedence over insertdots.

    +

    +This setting may result in the \glsxtrword and \glsxtrwordsep markup ending up in the sort field, depending on the style in use.
    +

    +

    +insertdots=boolean
    + If this attribute is set to “true” any entry defined using \newabbreviation will automatically have full stops inserted after each letter. The entry will be defined with those dots present as though they had been present in the short argument of \newabbreviation (rather than inserting them every time the entry is used). The short plural form defaults to the new dotted version of the original short form with the plural suffix appended. This setting is incompatible with markshortwords. This attribute is only applicable to entries defined using \newabbreviation (or \newacronym if it’s using \newabbreviation.)

    +

    +If you explicitly override the short plural using the 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).
    +

    +This attribute is best used with the discardperiod attribute set to “true”.

    +

    +aposplural=boolean
    + If this attribute is set to “true”, \newabbreviation will insert an apostrophe (’) before the plural suffix for the short plural form (unless explicitly overridden with the shortplural key). The long plural form is unaffected by this setting. This setting overrides noshortplural. This attribute is only applicable to entries defined using \newabbreviation (or \newacronym if it’s using \newabbreviation.) Check with your supervisor, publisher or editor if you want to use this attribute as this usage is controversial.

    +

    +noshortplural=boolean
    + If this attribute is set to “true”, \newabbreviation won’t append the plural suffix for the short plural form. This means the short and shortplural values will be the same unless explicitly overridden. This setting is incompatible with aposplural. This attribute is only applicable to entries defined using \newabbreviation (or \newacronym if it’s using \newabbreviation.)

    +

    +tagging=boolean
    + If this attribute is set to “true”, the tagging command defined by \GlsXtrEnableInitialTagging will be activated to use \glsxtrtagfont in the glossary (see §4.4)

    + +

    + +
    +

    10.2.1.2. Attributes that Alter \glslink Options

    +

    +

    +nohyperfirst=boolean
    + When used with the \gls-like commands, if this attribute is set to true, this will automatically suppress the hyperlink on first use.

    +

    +This settings can be overridden by explicitly setting the hyper key on or off in the optional argument of the \gls-like command.
    +

    +As from version 1.07, \glsfirst, \Glsfirst, \GLSfirst and their plural versions (which should ideally behave in a similar way to the first use of \gls or \glspl) now honour this attribute (but not the package-wide hyperfirst=false option, which matches the behaviour of glossaries). If you want commands like \glsfirst to ignore the nohyperfirst attribute then just redefine \glsxtrchecknohyperfirst to do nothing.

    +

    +nohypernext=boolean
    + If set to true, this will automatically set hyper=false on subsequent use when using the \gls-like commands.

    +

    +nohyper=boolean
    + If set to true, this will automatically set hyper=false when using the \gls-like or \glstext-like commands.

    +

    +indexonlyfirst=boolean
    + This is similar to the indexonlyfirst package option but only for entries that have a category with this attribute set to “true”.

    +

    +wrgloss=value
    + When using the \gls-like or \glstext-like commands, this will automatically set wrgloss=after it this attribute is set to “after”.

    +

    +textformat=cs-name
    + The \gls-like and \glstext-like commands have the link text encapsulated in the argument of \glstextformat by default (the outer formatting, see §5.5.1). If the textformat attribute is set, the control sequence given by the attribute value will be used instead. The attribute value should be the name (without the leading backslash) of a command that takes a single argument (the link text). Remember that the abbreviation styles may apply an additional font change.

    +

    +hyperoutside=boolean
    + This boolean attribute may be false, true or unset. If unset, true is assumed. This indicates the default setting of the hyperoutside option, described in §5.1.

    + +

    + +
    +

    10.2.1.3. Glossary Attributes

    +

    +

    +glossdesc=value
    + This attribute is checked by the \glossentrydesc to determine whether or not to apply any case change. The value may be one of: +
    +
    firstuc
    + +
    Applies sentence case. That is, the first letter of the description will be converted to uppercase (using \Glsentrydesc).
    +

    +

    title
    + +
    Applies title case. If you have at least glossaries v4.48, the title casing is indirectly performed by \glscapitalisewords, which defaults to \capitalisewords (provided by mfirstuc). You can either redefine \glscapitalisewords if you want the change to also affect \glsentrytitlecase or if you only want the change to apply to the attribute case-changing then redefine \glsxtrfieldtitlecasecs. For example:
    \newcommand*{\glsxtrfieldtitlecasecs}[1]{\xcapitalisefmtwords*{#1}}
    +
    (Note that the argument to \glsxtrfieldtitlecasecs will be a control sequence whose replacement text is the entry’s description, which is why \xcapitalisefmtwords is needed instead of \capitalisefmtwords.)

    +

    +If an error occurs with this setting, try redefining \glsxtrfieldtitlecasecs as shown above.
    +
    +

    + +

    + Any other values of this attribute are ignored. Remember that there are design limitations for both the sentence case and the title case commands. See the mfirstuc user manual for further details.

    +

    +If you are using bib2gls, you can use the description-case-change setting instead.
    +

    +

    +glossdescfont=cs-name
    + If set, the value should be the name of a control sequence (without the leading backslash) that takes one argument. This control sequence will be applied by \glossentrydesc to the description text. For example:
    \glssetcategoryattribute{general}{glossdescfont}{emph}
    +

    +

    +glossname=value
    + As glossdesc but applies to \glossentryname. Additionally, if this attribute is set to “uc” the name is converted to all caps.

    +

    +If you are using bib2gls, you can use the name-case-change setting instead.
    +

    +

    +indexname={value}
    + If set, the post-name hook will index the entry using \index. See §12 for further details.

    +

    +glossnamefont=cs-name
    + As glossdescfont but applies to \glossentryname. Note that this overrides \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 \item.

    +

    +glosssymbolfont=cs-name
    + This is similar to glossnamefont and glossdescfont but is used by \glossentrysymbol.

    + +

    + +
    +

    10.2.1.4. Other Attributes

    +

    +

    +headuc=boolean
    + If this attribute is set to “true”, commands like \glsfmtshort will use the upper case version in the page headers.

    +

    +entrycount=trigger-value
    + The value of this attribute (if set) must be an integer and is used in combination with \glsenableentrycount (see §6.1). Leave blank or undefined for categories that shouldn’t have this facility enabled. The value of this attribute is used by \glsxtrifcounttrigger to determine how commands such as \cgls should behave.

    +

    +linkcount=boolean
    + This attribute is set to true by \GlsXtrEnableLinkCounting (see §6.2).

    +

    +linkcountmaster=counter-name
    + This attribute is set by \GlsXtrEnableLinkCounting to the name of the counter that requires the link counter to be added to its reset list (see §6.2).

    +

    +dualindex=value
    + If this attribute is set, whenever a glossary entry has information written to the external glossary file through commands like \gls and \glsadd, a corresponding line will be written to the indexing file using \index. The value may be true to simply enable this feature or the value may be the encap to use with \index. See §12 for further details.

    +

    +targeturl=url
    + If set, the hyperlink generated by commands like \gls will be set to the URL provided by this attribute’s value. For example:
    \glssetcategoryattribute{general}{targeturl}{master-doc.pdf}
    +
    (See also the accompanying sample file sample-external.tex.) If the URL contains awkward characters (such as % or ~) remember that the base glossaries package provides commands like \glspercentchar and \glstildechar that expand to literal characters.

    +

    +targetname=anchor
    + If you want to a named anchor within the target URL (notionally adding #name to the URL), then you also need to set targetname to the anchor name. You may use \glslabel within name which is set by commands like \gls to the entry’s label.

    +All the predefined glossary styles start each entry listing with \glstarget which sets the anchor to \glolinkprefix\glslabel, so if you want entries to link to glossaries in the URL given by targeturl, you can just do:

    \glssetcategoryattribute{general}{targetname}{\glolinkprefix\glslabel}
    +
    (If the target document changed \glolinkprefix then you will need to adjust the above as appropriate.)

    +

    +targetcategory=anchor
    + If the anchor is in the form name1.name2 then use targetname for the name2 part and targetcategory for the name1 part.

    +For example:

    \glssetcategoryattribute{general}{targeturl}{master-doc.pdf}
    +\glssetcategoryattribute{general}{targetcategory}{page}
    +\glssetcategoryattribute{general}{targetname}{7}
    +
    will cause all link text for general entries to link to 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 \newignoredglossary* for the external list. For example:

    \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}}
    +

    +

    +externallocation=PDF filename
    + The value should be the file name of the target document when manually indexing an external location with thevalue. In general, it’s better to use bib2gls v1.7+ which can handle multiple external sources and doesn’t require this attribute.

    + +

    + +
    +

    10.2.2. Accessing and Setting Attributes

    +

    +Attributes can be set using the following commands:

    +

    +\glssetcategoryattribute{category}{attribute}{value}
    + Locally sets the given attribute to value for the given category.

    +

    +\glssetcategoriesattribute{category list}{attribute}{value}
    + Globally sets the given attribute to value for all the categories in the comma-separated list category list.

    +

    +\glssetcategoryattributes{category}{attribute list}{value}
    + Globally sets each attribute in the comma separated attribute list to value for the given category.

    +

    +\glssetcategoriesattributes{category list}{attribute list}{value}
    + Globally sets each attribute in the comma separated attribute list to value for each category in the comma-separated list category list.

    +

    +\glssetattribute{entry-label}{attribute}{value}
    + Locally sets the given attribute to value for the category associated with the entry identified by entry-label. This command can’t be used to assign an attribute for a multi-entry category.

    +

    +\glssetregularcategory{category}
    + A shortcut that sets the regular attribute to true for the given category using \glssetcategoryattribute.

    +An attribute can be locally unset using:

    +\glsunsetcategoryattribute{category}{attribute}
    +

    +Attribute values can be obtained with the following commands:

    +

    +\glsgetcategoryattribute{category}{attribute}
    + Expands to the value of the given attribute for the given category. Expands to nothing if the attribute hasn’t been set.

    +

    +\glsgetattribute{entry-label}{attribute}
    + Expands to the value of the given attribute for the category associated with the entry identified by entry-label. Expands to nothing if the attribute hasn’t been set. This command can’t be used to assign an attribute for a multi-entry category.

    +Attributes can be tested with the following commands.

    +

    +\glshascategoryattribute{category}{attribute}{true}{false}
    + This uses etoolbox’s \ifcsvoid and does true if the attribute has been set and isn’t blank and isn’t \relax otherwise it does false.

    +

    +\glshasattribute{entry-label}{attribute}{true}{false}
    + As \glshascategoryattribute but the category is obtained from the given entry. This command can’t be used to test an attribute associated with a multi-entry category.

    +

    +\glsifcategoryattribute{category}{attribute}{value}{true}{false}
    + This tests if the given attribute for the given category is set and equal to value. If true, true is done. If the attribute isn’t set or is set but isn’t equal to value, false is done.

    +For example:

    \glsifcategoryattribute{general}{nohyper}{true}{NO HYPER}{HYPER}
    +
    This does “NO HYPER” if the general category has the nohyper attribute set to true otherwise if does “HYPER”.

    +

    +\glsifattribute{entry-label}{attribute}{value}{true}{false}
    + As \glsifcategoryattribute but the category is obtained from the given entry. This command can’t be used to test an attribute associated with a multi-entry category.

    +

    +\glsifregularcategory{category}{true}{false}
    + A shortcut that tests if the given category has the regular attribute set to true.

    +

    +\glsifnotregularcategory{category}{true}{false}
    + A shortcut that tests if the given category has the regular attribute set to false.

    +

    +If the regular attribute hasn’t been set, both \glsifregularcategory and \glsifnotregularcategory will do false. The choice of command needs to be determined by what outcome should occur if the attribute hasn’t been set.
    +

    +

    +\glsifregular{entry-label}{true}{false}
    + As \glsifregularcategory but the category is obtained from the given entry. This command can’t be used to test an attribute associated with a multi-entry category.

    +

    +\glsifnotregular{entry-label}{true}{false}
    + As \glsifnotregularcategory but the category is obtained from the given entry. This command can’t be used to test an attribute associated with a multi-entry category.

    +

    +\glsifcategoryattributetrue{category}{attribute}{true}{false}
    + Expands to true if the attribute is true and false otherwise. Expands to false if there’s no such attribute for the given category.

    +

    +\glsifattributetrue{entry-label}{attribute}{true}{false}
    + As \glsifcategoryattributetrue but the category is obtained from the given entry. Expands to false if the entry isn’t defined. This command can’t be used to test an attribute associated with a multi-entry category.

    +

    +\glsifcategoryattributehasitem{category}{attribute}{item}{true}{false}
    + Does true if the category has the attribute (whose value is a comma-separated list) contains the given item and false otherwise. Does false if there’s no such attribute for the given category. The item and list are expanded and passed to datatool’s \DTLifinlist to perform the test.

    + +

    + +
    +

    11. bib2gls: Managing Reference Databases

    +

    +

    +The command line application bib2gls performs two functions in one: +

    + Instead of storing all your entry definitions in a tex and loading them using \input or \loadglsentries, the entries can instead be stored in a bib file and bib2gls can selectively write the appropriate commands to a glstex file which is loaded using \GlsXtrLoadResources.

    +This means that you can use a reference managing system 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 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. (You can convert an existing tex file containing glossary definitions to a bib file using convertgls2bib, supplied with bib2gls.)

    +There are some new commands and options added to glossaries-extra to help assist the integration of bib2gls into the document build process.

    +This chapter just provides a general overview of bib2gls. The full details and some sample documents are provided in the bib2gls manual

    texdoc bib2gls

    +An example of the contents of bib file that stores glossary entries that can be extracted with bib2gls called, say, terms.bib:

    @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}
    }
    The following provides some abbreviations in a file called, say, abbrvs.bib:
    @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}
    } +@abbreviation{xml,
    short={xml}, +long={extensible markup language}, +description={a simple text-base format for +representing structured information} +}
    The above defines bib strings (with @string) and uses string concatenation (with #), which is a BibTeX feature. Another supported bib feature is @preamble, which may be used to provide command definitions.

    +Here are some symbols in a file called, say, symbols.bib:

    @preamble{"\providecommand{\mtx}[1]{\boldsymbol{#1}}"}
    +
    +@symbol{M,
    name={\ensuremath{\mtx{M}}},
    description={a matrix}
    } + +@symbol{v,
    name={\ensuremath{\vec{v}}},
    description={a vector}
    } + +@symbol{S,
    name={\ensuremath{\mathcal{S}}},
    description={a set}
    }

    +To ensure that bib2gls can find out which entries have been used in the document, you need the record package option:

    \usepackage[record]{glossaries-extra}
    +
    If you are using hyperref, you may prefer to use record=nameref.

    +The glstex file created by bib2gls is loaded using:

    +\glsxtrresourcefile[options]{basename}
    + where basename is the basename (without the extension) of the glstex file. This command will redefine \glsindexingsetting to bib2gls (or bib2gls-xindy or bib2gls-makeindex if record=hybrid). There’s a shortcut version:
    +\GlsXtrLoadResources[options]
    + This internally uses \glsxtrresourcefile and sets the basename to \jobname in the first instance and to \jobname-n on subsequent instances (where n is incremented at the end of every \GlsXtrLoadResources). For example:
    \usepackage[record]{glossaries-extra}
    +\GlsXtrLoadResources[src={terms,moreterms}]
    +\GlsXtrLoadResources[src={symbols,constants}]
    +\GlsXtrLoadResources[src={abbreviations}]
    +
    is equivalent to:
    \usepackage[record]{glossaries-extra}
    +\glsxtrresourcefile[src={terms,moreterms}]{\jobname}
    +\glsxtrresourcefile[src={symbols,constants}]{\jobname-1}
    +\glsxtrresourcefile[src={abbreviations}]{\jobname-2}
    +
    If required, the value of n is stored in the count register:
    +\glsxtrresourcecount
    + although there should be little need to use this.

    +

    +Since \GlsXtrLoadResources is more convenient to use than \glsxtrresourcefile, all examples use \GlsXtrLoadResources.
    +

    +The \glsxtrresourcefile command writes the following to the aux file:

    +\glsxtr@resource{options}{basename}
    + and will input filename.glstex if it exists. (Version 1.08 assumed filename.tex but that’s potentially dangerous if, for example, filename happens to be the same as \jobname. The glstex extension was enforced by version 1.11.)

    +If you are using or developing a build system that needs to know which applications to run as part of the document build, you can search the aux for for instances of \glsxtr@resource. For example, using arara:

    % arara: bib2gls if found("aux", "glsxtr@resource")
    +

    +Since the glstex file won’t exist on the first LaTeX run, the record package option additionally switches on undefaction=warn. Any use of commands like \gls or \glstext will produce ?? in the document, since the entries are undefined at this point. Once bib2gls has created the glstex file the references should be resolved. This may cause a shift in the locations if the actual text produced once the entry is defined is significantly larger than the placeholder ?? (as this can alter the page breaking).

    +Note that as from v1.12, \glsxtrresourcefile temporarily switches the category code of @ to 11 (letter) while it reads the file to allow for any internal commands.

    +

    +The package options record=only and record=nameref automatically load glossaries-extra-bib2gls, which provides additional commands that are useful with bib2gls. Since they cover sorting and location lists, they’re not relevant with the record=hybrid option.
    +

    +These commands are provided by glossaries-extra for use with bib2gls.

    +The information provided with \GlsXtrLoadResources is written to the aux file using:

    \protected@write\@auxout{\glsxtrresourceinit}{information}
    +
    where information is the information to pass to bib2gls. The command in the second argument:
    +\glsxtrresourceinit
    + may be used to temporarily redefine commands before the information is written to the file. This does nothing by default, but may be redefined to allow the use of short commands for convenience. For example, with:
    \renewcommand{\glsxtrresourceinit}{\let\u\glshex}
    +
    you can just use, for example, \u E6 instead of \string\uE6 in the custom rule. This redefinition of \u is scoped so its original definition is restored after the write operation.

    +

    +\glsxtrMFUsave
    + If you have mfirstuc v2.08+, this command will be used on the first instance of \glsxtrresourcefile, and will add \MFUsave to the begin document hook and then disable itself. This is provided to help bib2gls v3.0+ pick up any of mfirstuc’s exclusions, blockers and mappings to assist with its sentence case function. The assumption is that all exclusions, blockers and mappings will be set up in the preamble. If there are any within the document environment that you want bib2gls to be aware of, redefine this command to do nothing before the first instance of \glsxtrresourcefile (or \GlsXtrLoadResources) and use \MFUsaveatend instead.

    +If you have multiple resource commands and you want a default set of options you can supply them in the definition of:

    +\GlsXtrDefaultResourceOptions
    + For example:
    \renewcommand{\GlsXtrDefaultResourceOptions}{selection=all}
    +
    This should be done before the resource commands to which the options should apply.

    + +

    + +
    +

    11.1. Indexing (Recording)

    +

    +As with makeindex and xindy, the \gls-like and \glstext-like commands automatically index, but the underlying indexing mechanism is more like that used with \makenoidxglossaries. Each indexing instance creates a record in the aux file, which bib2gls can then pick up when it parses the aux file. Each record has an associated format (the location encap) which can be set with the format key and an associated location counter (as with the other indexing methods).

    +The formatted location list is stored in the location field (unless save-locations=false). Additionally, the individual locations are stored in the loclist field as an etoolbox internal list (as with \makenoidxglossaries). This may be used to pick out individual locations to avoid the complexity of parsing the formatted list.

    +See the bib2gls manual for information on how to separate the location list into groups associated with different counters.

    + +

    + +
    +

    11.2. Selection

    +

    +The default behaviour is for bib2gls to select all entries that have a record in the aux file, and any dependent entries (including parent and cross-references). The glsignore format (for example, \gls[format=glsignore]{duck}) is recognised by bib2gls as a special ignored record. This means that it will match the selection criteria but the record won’t be added to the location list. This means that you won’t get spurious commas in the location list (as can happen with the other indexing methods), so you can do, for example,

    \GlsXtrSetDefaultNumberFormat{glsignore}
    +
    at the start of the front matter and
    \GlsXtrSetDefaultNumberFormat{glsnumberformat}
    +
    at the start of the main matter to prevent any records in the front matter from occurring in the location lists.

    +

    +Commands like \glsaddall and \glsaddallunused don’t work with bib2gls as the command has to iterate over each glossary’s internal lists of defined entry labels, which will be empty on the first run and on subsequent runs will only contain those entries that have been selected by bib2gls. Use selection=all to select all entries instead.
    +

    +The selection option indicates which entries should be selected from the bib files (listed in src). For example, selection=all indicates to select all entries, regardless of whether or not the entries have been referenced in the document. This will lead to empty location lists for some (or all) entries. The default setting is selection=recorded and deps, which indicates to select all entries that have records and any dependent entries. See the bib2gls user manual for more details of this option.

    + +

    + +
    +

    11.3. Sorting and Displaying the Glossary

    +

    +With makeindex and xindy, the terms (read from the associated input file) are sorted and the code to typeset the glossary is written to an output file, which is then input by \printglossary. With bib2gls, the entries supplied in the bib files are sorted and the entry definition code (\longnewglossaryentry or \newabbreviation) is written to the glstex file in the order obtained by sorting. This means that the glossary’s internal list is in the required order, so the glossary can be displayed with \printunsrtglossary (see §8.4).

    +The indexing information, such as the location list or letter groups, is stored in fields such as location or group (where applicable), so the information can be included by \printunsrtglossary, but it means that the information is also available for use elsewhere in the document (so the savenumberlist package option provided by glossaries is redundant).

    +There are many sorting options provided by bib2gls. The default is to sort according to the system locale. If the document has a language setting, you can use sort=doc to instruct bib2gls to sort according to that. (The language tag obtained from tracklang’s interface is written to the aux file.) For a multilingual document you need to explicitly set the locale using a well-formed language tag. For example:

    \GlsXtrLoadResources[
    +  src=terms, %  data in terms.bib
    +  sort=de-DE-1996 %  sort according to this locale
    +]
    +
    The locale-sensitive sort methods usually ignore most punctuation so for lists of symbols you may find it more appropriate to use one of the letter-base sort methods that sort according to the Unicode value of each character. Alternatively you can provide a custom rule. See the bib2gls manual for full details of all the available sort methods.

    +Suppose the bib examples shown earlier have been stored in the files terms.bib, abbrvs.bib and symbols.bib which may either be in the current directory or on TeX’s path. Then the document might look like:

    \documentclass{article}
    +
    +\usepackage[record]{glossaries-extra}
    +
    +\setabbreviationstyle{long-short-sc-desc}
    +
    +\GlsXtrLoadResources[src=terms,abbrvs,symbols]
    +
    +\begin{document}
    +\gls{bird}
    +
    +\gls{shtml}
    +
    +\gls{M}
    +
    +\gls{printunsrtglossaries}
    +\end{document}
    +
    The document build process (assuming the document is called mydoc) is:
    pdflatex mydoc
    +bib2gls mydoc
    +pdflatex mydoc
    +
    +Example 151: Using bib2gls: one resource set 📥🖹 📥🖺

    +Example document using bib2gls with one resource set.

    + This creates a single glossary containing the entries: bird, duck, goose, html, M, shtml and ssi (in that order). The bird, shtml and M entries were added because bib2gls detected (from the aux file) that they had been used in the document. The other entries were added because bib2gls detected (from the bib files) that they are referenced by the used entries. In the case of duck and goose, they are in the see field for bird. In the case of ssi and html, they are referenced in the description field of 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 xml entry isn’t required at all, and so hasn’t been defined (from LaTeX’s point of view).

    +The entries can be separated into different glossaries with different sort methods:

    \usepackage[record,abbreviations,symbols]{glossaries-extra}
    +
    +\setabbreviationstyle{long-short-sc-desc}
    +
    +\GlsXtrLoadResources[src=terms,sort=en-GB,type=main]
    +
    +\GlsXtrLoadResources
    + [src=abbrvs,sort=letter-nocase,type=abbreviations]
    +
    +\GlsXtrLoadResources
    + [src=symbols,sort=use,type=symbols]
    +
    +\begin{document}
    +\gls{bird}
    +
    +\gls{shtml}
    +
    +\gls{M}
    +
    +\printunsrtglossaries
    +\end{document}
    +

    +

    +Example 152: Using bib2gls: multiple resource sets 📥🖹 📥🖺

    +Example document using bib2gls with multiple resource sets.

    +

    +Or you can have multiple instance of \GlsXtrLoadResources with the same type, which will produce a glossary with ordered sub-blocks. For example:

    \usepackage[record,style=indexgroup]{glossaries-extra}
    +
    +\setabbreviationstyle{long-short-sc-desc}
    +
    +\GlsXtrLoadResources
    + [src=abbrvs,sort=letter-nocase,type=main,
    +  group=abbreviations]
    +\glsxtrsetgrouptitle{abbreviations}{Abbreviations}
    +
    +\GlsXtrLoadResources
    + [src=symbols,sort=use,type=main,
    +  group=symbols]
    +\glsxtrsetgrouptitle{symbols}{Abbreviations}
    +
    +\GlsXtrLoadResources[src=terms,sort=en-GB,type=main]
    +
    +\begin{document}
    +\gls{bird}
    +
    +\gls{shtml}
    +
    +\gls{M}
    +
    +\printunsrtglossaries
    +\end{document}
    +
    This sets the group field for each resource set to the label given by the group resource option.

    +This will result in a glossary where the first group has the label abbreviations and title “Abbreviations”, the second group has the label symbols and title “Symbols” and then follow the usual letter groups. Note that for this example to work, you must run bib2gls with the --group (or -g) switch. For example, if the document is called myDoc.tex:

    pdflatex myDoc
    +bib2gls -g myDoc
    +pdflatex myDoc
    +
    +Example 153: Using bib2gls: sub-blocks 📥🖹 📥🖺

    +Example document using bib2gls with multiple resource sets for a single glossary to create a glossary with sub-blocks.

    +

    +

    +The value of the group field must always be a label (so avoid special characters). You can set the corresponding title with glsxtrsetgrouptitle (see §8.6). If no title is set then the label is used as the group title.
    +

    +You can provide your own custom sort rule. For example, if you are using XeLaTeX or LuaLaTeX:

    \GlsXtrLoadResources[
    +  src={terms}, % entries in terms.bib
    +  sort=custom, % custom sort rule
    +  sort-rule={% required with sort=custom   < æ;Æ < a;á;å;ä,Ä;Á;Å;Ä < b,B   < c;ć,C;Ć < d,D < e;é,E;É < f,F < g,G   < h,H < i;í,I;Í < j,J < l;ł,L;Ł < m,M < n,N   < o;ö;ø,O;Ö;Ø < p,P < q,Q < r,R < s;ś,S;Ś   < t,T < u;ú,U;Ú < v,V < w,W < x,X < y,Y <   z;ż,Z;Ż   }
    +]
    +

    +

    +With old versions of the LaTeX kernel, UTF-8 characters, such as é or ø, will expand when written to the aux file.
    +

    +Some of the options, including sort-rule, allow Unicode characters to be indicated in the format \uhex (or \u hex). bib2gls will recognise this as the character given by the hexadecimal value hex.

    +

    +The options provided to \GlsXtrLoadResources will expand as they are written to the aux file (unless protected). This includes \u, so with a non-Unicode aware engine or where the document source is required to be ASCII, the character æ needs to be written as \string\u E6 and so on. Alternatively, use the shortcut \string\u E6.
    +

    +For example, the above can be rewritten as:

    \GlsXtrLoadResources[
    +  src={terms}, % entries in terms.bib
    +  sort=custom, % custom sort rule
    +  sort-rule={% required with sort=custom   < \glshex E6;\glshex C6   < a;\glshex E1;\glshex E5,\glshex E4,A;\glshex C1;\glshex C5;\glshex C4   < b,B < c;\glshex 0107,C;\glshex 0106 < d,D   < e;\glshex E9,E;\glshex C9 < f,F < g,G   < h,H < i;\glshex ED,I;\glshex CD < j,J   < l;\glshex 0142,L;\glshex 0141 < m,M < n,N   < o;\glshex F6;\glshex F8,O;\glshex D6;\glshex D8   < p,P < q,Q < r,R < s;\glshex 013F,S;\glshex 015A   < t,T < u;\glshex FA,U;\glshex DA < v,V < w,W < x,X < y,Y   < z;\glshex 017C,Z;\glshex 017B   }
    +]
    +

    + +

    + +
    +

    11.4. Record Counting

    +

    +As from version 1.1 of bib2gls, you can save the total record count for each entry by invoking bib2gls with the --record-count or --record-count-unit switches. These options will ensure that when each entry is written to the glstex file bib2gls will additionally set the following internal fields for that entry: +

    + If --record-count-unit is used then additionally: + + Only use the unit counting option if the locations don’t contain any special characters. With hyperref use \thecounter-name rather than \thecounter-name. Otherwise, if you really need unit counting with locations that may contain formatting commands, then you can try redefining:
    +\glsxtrdetoklocation{location}
    + so that it detokenizes location but take care when using \GlsXtrLocationRecordCount with commands like \thepage as they can end up becoming detokenized too early.

    +Note that the record count includes locations that bib2gls discards, such as ignored records, duplicates and partial duplicates (unless you filter them out with --record-count-rule). It doesn’t include cross-reference records. For example, suppose a document has an entry with the label bird that is recorded (indexed) as follows: +

    + Page 1 two (2) instances of \gls{bird}; Page 2 one (1) instance of \gls{bird}; Page 3 four (4) instances of \gls{bird}; Section 3 one (1) instance of \gls[counter=section]{bird}. +
    +

    +Then the total record count (stored in the recordcount field) is 2+1+4+1=8, the total for the page counter (stored in the recordcount.page field) is 2+1+4=7, and the total for the section counter (stored in the recordcount.section field) is 1.

    +With the unit counting on as well, the following fields are assigned: +

    +

    +You can access these fields using the following commands which will expand to the field value if set or to 0 if unset:

    +\GlsXtrTotalRecordCount{entry-label}
    + This expands to the total record count for the entry given by label. For example:
    \GlsXtrTotalRecordCount{bird}
    +
    expands to 8.

    +

    +\GlsXtrRecordCount{entry-label}{counter}
    + This expands to the counter total for the entry given by entry-label where counter is the counter name. For example:
    \GlsXtrRecordCount{bird}{page}
    +
    expands to 7 and
    \GlsXtrRecordCount{bird}{section}
    +
    expands to 1.

    +

    +\GlsXtrLocationRecordCount{entry-label}{counter}{location}
    + This expands to the total for the given location. For example
    \GlsXtrLocationRecordCount{bird}{page}{3}
    +
    expands to 4. Be careful about using \thepage in the location part. Remember that due to TeX’s asynchronous output routine, \thepage may not be correct.

    +There are commands analogous to the entry counting commands like \cgls and \cglsformat that are triggered by the record count. These are listed below. The test to determine if the entry’s record count exceeds the trigger value (which should be stored in the recordcount attribute) is obtained with:

    +\glsxtrifrecordtrigger{entry-label}{true}{false}
    + If the recordcount attribute is set and total exceeds the value given by the recordcount attribute, then this does true otherwise it does false. The total is given by:
    +\glsxtrrecordtriggervalue{entry-label}
    + This should expand to the record count value that needs testing. The default definition is:
    \newcommand*{\glsxtrrecordtriggervalue}[1]{%
    + \GlsXtrTotalRecordCount{#1}%
     }
    -
    -

    The ⟨trigger code⟩ part writes a record with the format set to glstriggerrecordformat -(which bib2gls v1.1+ recognises as a special type of ignored location format) and -does ⟨trigger format⟩. Then it unsets the first use flag. Note that it doesn’t implement -the post-link hook. This ensures that the record count is correct on the next -run. -

    The ⟨trigger format⟩ depends on the \rgls-like command used and will be one of -the following: -


    \rglsformat{label}{insert}

    -

    -


    \rglsplformat{label}{insert}

    -

    -


    \rGlsformat{label}{insert}

    -

    -


    \rGlsplformat{label}{insert}

    -

    -


    \rGLSformat{label}{insert}

    -

    -


    \rGLSplformat{label}{insert}

    -

    -These all behave much like their \cglsformat counterparts. If the entry’s regular -attribute is set or if the entry doesn’t have a long form, the first or first plural is -used, otherwise the long or long plural form is used. -

    You can use -


    \glsxtrenablerecordcount

    -

    -to redefine \gls, \glspl, \Gls, \Glspl, \GLS, \GLSpl to \rgls, \rglspl, \rGls, -\rGlspl, \rGLS, \rGLSpl, respectively, for convenience. -

    If you don’t want the entries that use ⟨trigger code⟩ to appear in the glossary, you -need to use the resource option trigger-type to assign them to another glossary. -For example: - - - -

    -
    -\documentclass{article}
    -\usepackage[record]{glossaries-extra}
    -\newignoredglossary{ignored}
    -\GlsXtrLoadResources[
    - src=example-glossaries-acronym,
    - trigger-type=ignored,
    - category=abbreviation
    +
    This command may be redefined as appropriate. For example, it may be redefined to use \GlsXtrRecordCount for a particular location counter or to use \GlsXtrLocationRecordCount for a particular location.

    +The recordcount attribute may be set with \glssetcategoryattribute or can be set for each listed category with:

    +\GlsXtrSetRecordCountAttribute{category-list}{value}
    + The value must be an integer.

    +Commands like \rgls behave slightly differently to \cgls. It’s necessary for the command to add a record to the aux file in order for the entry to be selected and for the record count to be correct on the next bib2gls+LaTeX run (for the default selection={recorded and deps}). The trigger record is created with format=glstriggerrecordformat, which bib2gls v1.1+ recognises as a special type of ignored location format. This corresponds to the command:

    +\glstriggerrecordformat{location}
    + As with \glsignore, this command does nothing and is considered an ignored record (so it won’t appear in the location list), but it indicates to bib2gls that the entry must be selected and, if the trigger-type option has been set, the entry will be assigned to the trigger-type glossary.

    +For example, to assign the entry to an ignored glossary:

    \newignoredglossary{ignored}
    +\GlsXtrLoadResources[trigger-type=ignored]
    +
    This ensures that the entry is defined but it won’t show up the normal glossary.

    +

    +The post-link hook won’t be implemented if the record trigger is tripped. (That is, if the \rglsformat-like command is used instead of the \gls-like command.)
    +

    +

    +\rgls[options]{entry-label}[insert]modifiers: * + alt-mod
    + If the value has been supplied by the recordcount attribute and is exceeded, this behaves like \gls otherwise it creates a trigger record and uses:
    +\rglsformat{entry-label}{insert}
    + This has the same definition as \cglsformat.

    +

    +\rglspl[options]{entry-label}[insert]modifiers: * + alt-mod
    + If the value has been supplied by the recordcount attribute and is exceeded, this behaves like \glspl otherwise it creates a trigger record and uses:
    +\rglsplformat{entry-label}{insert}
    + which uses the appropriate plural fields.

    +

    +\rGls[options]{entry-label}[insert]modifiers: * + alt-mod
    + If the value has been supplied by the recordcount attribute and is exceeded, this behaves like \Gls otherwise it creates a trigger record and uses:
    +\rGlsformat{entry-label}{insert}
    + which performs the appropriate case-change.

    +

    +\rGlspl[options]{entry-label}[insert]modifiers: * + alt-mod
    + If the value has been supplied by the recordcount attribute and is exceeded, this behaves like \Glspl otherwise it creates a trigger record and uses:
    +\rGlsplformat{entry-label}{insert}
    + which uses the appropriate plural fields and case-change.

    +

    +\rGLS[options]{entry-label}[insert]modifiers: * + alt-mod
    + If the value has been supplied by the recordcount attribute and is exceeded, this behaves like \GLS otherwise it creates a trigger record and uses:
    +\rGLSformat{entry-label}{insert}
    + which performs the appropriate case-change.

    +

    +\rGLSpl[options]{entry-label}[insert]modifiers: * + alt-mod
    + If the value has been supplied by the recordcount attribute and is exceeded, this behaves like \GLSpl otherwise it creates a trigger record and uses:
    +\rGLSplformat{entry-label}{insert}
    + which uses the appropriate plural fields and case-change.

    +To make it easier to switch on record counting for an existing document, you can use:

    +\glsxtrenablerecordcount
    + This redefines \gls, \glspl, \Gls, \Glspl, \GLS, \GLSpl to \rgls, \rglspl, \rGls, \rGlspl, \rGLS, \rGLSpl, respectively, for convenience. This command will also switch the shortcut commands such as \ac or \ab, if they have been enabled, from using the \cgls-like commands to the corresponding \rgls command.

    +For example, using the earlier terms.bib, abbrvs.bib and symbols.bib example files:

    \documentclass{article}
    +
    +\usepackage[colorlinks]{hyperref}
    +\usepackage[record]{glossaries-extra}
    +
    +\newignoredglossary{ignored}
    +
    +\setabbreviationstyle{long-short-sc-desc}
    +\GlsXtrLoadResources[
    + src={terms,abbrvs,symbols},
    + trigger-type=ignored,
    + category={same as entry}
     ]
    -\glsxtrenablerecordcount
    -\GlsXtrSetRecordCountAttribute{abbreviation}{1}
    -\begin{document}
    -\gls{lid}.  \gls{stc}. \gls{lid}.  \gls{aeu}.
    -\gls{upa}. \gls{aeu}.
    -\printunsrtglossaries
    -\end{document}
    -
    -

    In the above, stc and upa both only have one record, so they are assigned to the -ignored glossary instead of the main one. - - - -

    -

    -

    Top

    11. Miscellaneous New Commands

    -

    The glossaries package provides \glsrefentry entry to cross-reference entries -when used with the entrycounter or subentrycounter options. The glossaries-extra -package provides a supplementary command -


    \glsxtrpageref{label}

    -

    -that works in the same way except that it uses \pageref instead of \ref. -

    You can copy an entry to another glossary using -


    \glsxtrcopytoglossary{entry-label}{glossary-type}

    -

    -This appends ⟨entry-label⟩ to the end of the internal list for the glossary given by -⟨glossary-type⟩. Be careful if you use the hyperref package as this may cause duplicate -hypertargets. You will need to change \glolinkprefix to another value or disable -hyperlinks when you display the duplicate. Alternatively, use the new target key to -switch off the targets: - - - -

    -
    -\printunsrtglossary[target=false]
    -
    -

    -

    The glossaries package allows you to set preamble code for a given glossary -type using \setglossarypreamble. This overrides any previous setting. -With glossaries-extra (as from v1.12) you can instead append to the preamble -using -


    \apptoglossarypreamble[type]{code}

    -

    -or prepend using -


    \pretoglossarypreamble[type]{code}

    -

    -

    -

    Top

    11.1 Entry 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 -


    \GlsXtrFmtField

    -

    -The default value is useri. Note that the value must be the control sequence name -without the initial backslash. -

    For example: - - - -

    -
    -\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}
    +
    +\glsxtrenablerecordcount
    +\GlsXtrSetRecordCountAttribute{general,abbreviation}{1}
    +
    +\glsdefpostlink{entry}{\glsxtrpostlinkAddDescOnFirstUse}
    +\glsdefpostlink{symbol}{\glsxtrpostlinkAddDescOnFirstUse}
    +
    +\begin{document}
    +\gls{bird}, \gls{ssi}, \gls{bird}, \gls{html},
    +\gls{M}, \gls{html}.
    +
    +\printunsrtglossaries
    +\end{document}
    +
    If the document is called myDoc.tex, then the build process is:
    pdflatex myDoc
    +bib2gls --record-count myDoc
    +pdflatex myDoc
    +
    The category={same as entry} resource option assigns the category field to the bib entry type (without the initial @). This means that the entries defined in terms.bib (with @entry) have their category set to entry, the entries defined in abbrvs.bib (with @abbreviation) have their category set to abbreviation, and the entries defined in symbols.bib (with @symbol) have their category set to symbol.

    +I’ve added post-link hooks to the entry and symbol categories to show the description on first use (but not for the abbreviation category).

    +Example 154: Using bib2gls: record counting 📥🖹 📥🖺

    +Example document using bib2gls with multiple resource sets.

    + In the above, ssi and bird only have one record. However, they have been treated differently. The ssi entry is using \rglsformat whereas the bird entry is using the normal \gls behaviour. This is because the record counting hasn’t been applied to the custom entry category, whereas it has been applied to the abbreviation and symbol categories.

    + + + +

    +

    11.4.1. Unit Record Counting

    +

    +If you want unit record counting you need to remember to invoke bib2gls with --record-count-unit and you will also need to redefine \glsxtrrecordtriggervalue appropriately. For example, suppose you want to reset all abbreviations at the start of each chapter, so that the full form is shown again, but only if the abbreviation isn’t used elsewhere in the chapter.

    +This would require records with the counter set to chapter. This can be done with the counter package option:

    \usepackage[record,counter=chapter]{glossaries-extra}
    +
    However, this will have chapter numbers instead of page numbers in the location lists. If you don’t want location lists then this isn’t a problem. The list can simply be suppressed with nonumberlist.

    +If you want page numbers in the location lists then you will need to record each entry with both the page and chapter counters. This can be done with the hook that occurs before the \gls options are set:

    \renewcommand{\glslinkpresetkeys}{% 
    + \glsadd[format=glsignore,counter=chapter]{\glslabel}}
    +
    Note that I’ve used the ignored location format to prevent the chapter number from being added to the location list. An alternative is to use the loc-counters=page resource option to only show the locations that use the page counter.

    +The definition of \glsxtrrecordtriggervalue needs to be changed so that it uses the total for the given location. If hyperref is used, you will need \theHchapter:

    \renewcommand*{\glsxtrrecordtriggervalue}[1]{% 
    + \GlsXtrLocationRecordCount{#1}{chapter}{\theHchapter}% 
    +}
    +
    otherwise use \thechapter.

    +Consider the following (using the abbreviations defined in the earlier abbrvs.bib):

    \begin{document}
    +\chapter{First}
    +\gls{html}. \gls{html}.  \gls{html}. \gls{ssi}.
    +
    +\chapter{Second}
    +\gls{html}. \gls{ssi}.  \gls{ssi}.
    +\gls{xml}.
    +
    +\printunsrtglossaries
    +\end{document}
    +
    Note that the xml entry is only used once in the entire document, but it will still be added to the glossary.

    +The previous example used the trigger-type resource option to move entries with the glstriggerrecordformat encap (that is, they didn’t exceed the trigger value) to another glossary. Unfortunately, using that option in this case will move all three abbreviations to the trigger-type glossary. The ssi entry is only used once in the first chapter (but is used twice in the second chapter), and the html is only used once in the second chapter (but is used three times in the first chapter). So all three will have records in the aux file with the special glstriggerrecordformat format.

    +A simple solution is to omit any entries that don’t have the location field set when displaying the glossary:

    \renewcommand*{\printunsrtglossaryentryprocesshook}[1]{% 
    + \glsxtrifhasfield*{location}{#1}
    + {}{\printunsrtglossaryskipentry}% 
    +}
    +\printunsrtglossaries
    +
    An alternative is to test the total record count, but remember that each entry is being recorded twice: once with the page counter and once with the chapter counter, so the total count for the ssi entry will be 2 not 1.

    +

    +Take care not to strip entries from a hierarchical glossary as it will break the hierarchy and will cause formatting problems in the glossary.
    +

    +The complete document is:

    \documentclass{scrreport}
    +\usepackage[T1]{fontenc}
    +\usepackage[colorlinks]{hyperref}
    +\usepackage[record,postdot]{glossaries-extra}
    +
    +\setabbreviationstyle{long-short-sc-desc}
    +
    +\GlsXtrLoadResources[src={abbrvs}]
    +
    +\preto{\chapter}{\glsresetall}
    +\glsxtrenablerecordcount
    +\GlsXtrSetRecordCountAttribute{abbreviation}{1}
    +
    +\renewcommand{\glslinkpresetkeys}{% 
    + \glsadd[format=glsignore,counter=chapter]{\glslabel}}
    +
    +\renewcommand*{\glsxtrrecordtriggervalue}[1]{% 
    + \GlsXtrLocationRecordCount{#1}{chapter}{\thechapter}% 
     }
    -\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}
    +\begin{document}
    +\chapter{First}
    +\gls{html}. \gls{html}. \gls{html}. \gls{ssi}.
    +
    +\chapter{Second}
    +\gls{html}. \gls{ssi}. \gls{ssi}.  \gls{xml}.
    +
    +\renewcommand*{\printunsrtglossaryentryprocesshook}[1]{% 
    + \glsxtrifhasfield*{location}{#1}
    + {}{\printunsrtglossaryskipentry}% 
     }
    -\newglossaryentry{matrixinv}{%
    -  name={matrix inverse},
    -  symbol={\ensuremath{\mtxinv{M}}},
    -  user1={mtxinv},
    -  description={a square \gls{matrix} such that
    -   $\mtx{M}\mtxinv{M}=\glssymbol{identitymatrix}$}
    +\printunsrtglossaries
    +\end{document}
    +
    If the document is in a file called myDoc.tex then the document build is:
    pdflatex myDoc
    +bib2gls --record-count-unit myDoc
    +pdflatex myDoc
    +
    +Example 155: Using bib2gls: unit record counting 📥🖹 📥🖺

    +Page 1. Example document using bib2gls with unit records.Page 2. Example document using bib2gls with unit records.Page 3. Example document using bib2gls with unit records.

    +

    + +

    + +
    +

    11.4.2. Mini-Glossaries

    +

    +Record counting doesn’t have to be used with the \rgls set of commands. When bib2gls writes the code to the glstex file to save the record counting information, it does it with helper commands that it provides in the glstex file:

    +\bibglssettotalrecordcount{entry-label}{value}
    + This sets the total record count and is defined in the glstex file as:
    \providecommand*{\bibglssettotalrecordcount}[2]{% 
    + \GlsXtrSetField{#1}{recordcount}{#2}% 
     }
    -
    -

    -

    There are two commands provided that allow you to apply the command to an -argument: -


    \glsxtrfmt[options]{label}{text}

    -

    -This effectively does

    -
    -\glslink[default-options,options]{label}{\glsxtrfmtdisplay -{cs name}{text}{}} -
    -
    where ⟨cs name⟩ is the control sequence name supplied in the provided field, which -must be defined to take a single required argument. Although it effectively acts like -\glslink it misses out the post-link hook. -

    The default ⟨default-options⟩ are given by - - - -


    \GlsXtrFmtDefaultOptions

    -

    -This is defined as noindex but may be redefined as appropriate. Note that the -replacement text of \GlsXtrFmtDefaultOptions is prepended to the optional -argument of \glslink. -

    As from version 1.23, there’s also a starred version of this command that has a -final optional argument: -


    \glsxtrfmt*[options]{label}{text}[insert]

    -

    -Both the starred and unstarred versions use: -


    \glsxtrfmtdisplay{cs name}{text}{insert}

    -

    -within the link text. In the case of the unstarred version ⟨insert⟩ will be empty. It will -also be empty if the final option argument is missing from the starred form. If the -entry given by ⟨label⟩ is undefined \glsxtrfmt and \glsxtrfmt* will issue an error (or -warning if undefaction=warn). There won’t be a warning or error if the entry is -defined by the given field is missing. In either case, (the entry is undefined or the field -is missing) ⟨cs name⟩ will be @firstofone otherwise it will be the field value. The -default definition is: - - - -

    -
    -\newcommand{\glsxtrfmtdisplay}[3]{\csuse{#1}{#2}#3}
    -
    -

    which puts ⟨text⟩ inside the argument of the control sequence and ⟨insert⟩ outside it -(but it will still be inside the link text). -

    Remember that nested links cause a problem so avoid using commands like \gls -or \glsxtrfmt within ⟨text⟩.
    -

    -

    For example: - - - -

    -
    -\[
    -  \glsxtrfmt{matrix}{A}
    -  \glsxtrfmt{matrixinv}{A}
    -  =
    -  \glssymbol{identitymatrix}
    -\]
    -
    -

    If the default options are set to noindex then \glsxtrfmt won’t index, but will -create a hyperlink (if hyperref has been loaded). This can be changed so that it also -suppresses the hyperlink: - - - -

    -
    -\renewcommand{\GlsXtrFmtDefaultOptions}{hyper=false,noindex}
    -
    -

    -

    Note that \glsxtrfmt won’t work with PDF bookmarks. Instead you can -use -


    \glsxtrentryfmt{label}{text}

    -

    -If hyperref is used, this uses \texorpdfstring and will expand to -


    \glsxtrpdfentryfmt{label}{text}

    -

    -within the PDF bookmarks, but in the document it will do ⟨cs{text} if a control -sequence name has been provided or just ⟨text⟩ otherwise. The PDF bookmark version -simply does ⟨text⟩. It may be redefined, but remember that it needs to expand -fully. -

    The glossaries package provides \glsaddstoragekey to add new keys. This -command will cause an error if the key has already been defined. The glossaries-extra -package provides a supplementary command that will only define the key if it doesn’t -already exist: -


    \glsxtrprovidestoragekey{key}{default}{cs}

    -

    -If the key has already been defined, it will still provide the command given in the -third argument ⟨cs⟩ (if it hasn’t already been defined). Unlike \glsaddstoragekey, ⟨cs⟩ -may be left empty if you’re happy to just use \glsfieldfetch to fetch the value of -this new key. -

    You can test if a key has been provided with: -


    \glsxtrifkeydefined{key}{true}{false}

    -

    -This tests if ⟨key⟩ is available for use in the ⟨key⟩= list in the second argument of -\newglossaryentry (or the optional argument of commands like \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 text field won’t update the plural field. There are also -some fields that should really only be set when entries are defined (such as -the parent field). Unexpected results may occur if they are subsequently -changed. -


    \GlsXtrSetField{label}{field}{value}

    -

    -Sets the field given by ⟨field⟩ to ⟨value⟩ for the entry given by ⟨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 \glsxtrusefield. Note that \glsxtrifkeydefined only - - - -tests if a key has been defined for use with commands like \newglossaryentry. If a -field without a corresponding key is assigned a value, the key remains undefined. This -command is robust. -

    \GlsXtrSetField uses -


    \glsxtrsetfieldifexists{label}{field}{code}

    -

    -where ⟨label⟩ is the entry label and ⟨code⟩ is the assignment code. -

    This command just uses \glsdoifexists{label}{code} (ignoring the -⟨field⟩ argument), so by default it causes an error if the entry doesn’t exist. -This can be changed to a warning with undefaction=warn. You can redefine -\glsxtrsetfieldifexists to simply do ⟨code⟩ if you want to skip the existence check. -Alternatively you can instead use -


    \glsxtrdeffield{label}{field}arguments{replacement text} -

    -

    -This simply uses etoolbox’s \csdef without any checks. This command -isn’t robust. There is also a version that uses \protected@csedef -instead:11.1 -


    \glsxtredeffield{label}{field}arguments{replacement text} -

    -

    -

    The following command was added to glossaries-extra v1.47 primarily for the -convenience of bib2gls: -


    \glsxtrapptocsvfield{label}{field}{value}

    -

    -There’s no check for the existence of either the entry or the field. If the entry -identified by ⟨label⟩ has the given field set then this command will append a comma -followed by ⟨value⟩ to the existing value, otherwise it will set the field to just ⟨value⟩. -This uses \csdef or \csappto so the effect can be localised. -


    \gGlsXtrSetField{label}{field}{value}

    -

    -As \GlsXtrSetField but globally. -


    \eGlsXtrSetField{label}{field}{value}

    -

    -As \GlsXtrSetField but uses protected expansion. -


    \xGlsXtrSetField{label}{field}{value}

    -

    -As \gGlsXtrSetField but uses protected expansion. -


    \GlsXtrLetField{label}{field}{cs}

    -

    -Sets the field given by ⟨field⟩ to the replacement text of ⟨cs⟩ for the entry given by ⟨label⟩ -(using \let). -


    \csGlsXtrLetField{label}{field}{cs name}

    -

    -As \GlsXtrLetField but the control sequence name is supplied instead. - - - -


    \GlsXtrLetFieldToField{label-1}{field-1}{label-2}{field-2} -

    -

    -Sets the field given by ⟨field-1⟩ for the entry given by ⟨label-1⟩ to the field given by -⟨field-2⟩ for the entry given by ⟨label-2⟩. There’s no check for the existence of ⟨label-2⟩, -but \glsxtrsetfieldifexists{label-1}{field-1}{code} is still used, as for -\GlsXtrSetField. -

    The glossaries package provides \ifglshasfield to determine if a field has been -set. The glossaries-extra package provides a simpler version: -


    \glsxtrifhasfield{field}{label}{true}{false}

    -

    -(New to v1.19.) Note that in this case the ⟨field⟩ must be the internal field label (for -example, useri rather than user1). Unlike \ifglshasfield, this version -doesn’t complain if the entry (given by ⟨label⟩) or the field don’t exist and -will simply do ⟨false⟩. If the field does exist for the given entry and it’s not -empty, the ⟨true⟩ part is done otherwise it does ⟨false⟩. Within ⟨true⟩ you may -use -


    \glscurrentfieldvalue

    -

    -to access the field value. This command includes grouping which scopes the ⟨true⟩ and -⟨false⟩ parts. The starred version -


    \glsxtrifhasfield*{field}{label}{true}{false}

    -

    -omits the implicit grouping. -

    Be careful of keys that use \relax as the default value (such as the symbol). Use -\ifglshassymbol instead.
    -

    -

    There is also a version that simply uses \ifcsundef. It doesn’t save the field -value, but can be used if you only need to check if the field is defined without -accessing it: -


    \GlsXtrIfFieldUndef{field}{label}{true}{false}

    -

    -

    There’s a difference between an undefined field and an unset field. An undefined -field hasn’t been assigned any value (no associated internal control sequence -has been defined). If a defined field has been defined to empty, then it’s -considered unset. \GlsXtrIfFieldUndef implement ⟨false⟩ for a defined but -empty field whereas \glsxtrifhasfield and \ifglshasfield will implement -⟨false⟩ a defined but empty field. Remember that any keys that may be used -in \newglossaryentry will have a default value if not provided. In many -cases, the default value is empty, so only use \GlsXtrIfFieldUndef for -fields that can only be defined through commands like \GlsXtrSetField. -
    -

    - - - -

    You can test if a field value equals a string using -


    \GlsXtrIfFieldEqStr{field}{label}{text}{true}{false}

    -

    -If the entry exists and has the given field set to the given text then this does ⟨true⟩ -otherwise it does ⟨false⟩. This uses \glsxtrifhasfield to test if the field exists and -then compares the replacement text of \glscurrentfieldvalue with ⟨text⟩ using -etoolbox’s \ifdefstring. Version 1.39 introduced a starred form of this command, -which uses the starred form of \glsxtrifhasfield. -

    As from version 1.31, there’s a similar command: -


    \GlsXtrIfFieldEqXpStr{field}{label}{text}{true}{false}

    -

    -This is like \GlsXtrIfFieldEqStr but first (protected) fully expands ⟨text⟩ (but not -the field value). If you want to compare the (protected) full expansion of both the -field value and ⟨text⟩ use: -


    \GlsXtrIfXpFieldEqXpStr{field}{label}{text}{true}{false} -

    -

    -Again, version 1.39 introduced a starred form of these commands, which use the -starred form of \glsxtrifhasfield. -

    As from v1.42, you can test if the field value is contained in a comma-separated -list with: -


    \GlsXtrIfFieldValueInCsvList{label}{field}{list}{true}{false} -

    -

    -The unstarred version uses the unstarred form of \glsxtrifhasfield (which -adds grouping so ⟨true⟩ and ⟨false⟩ will be localised). The starred version uses -\glsxtrifhasfield*. If the field value (without expansion) is contained in ⟨list⟩ then -⟨true⟩ is done otherwise ⟨false⟩ is done. If the field hasn’t been set ⟨false⟩ is done. This -internally uses \DTLifinlist provided by datatool-base which performs -a one level expansion on ⟨list⟩. See the datatool documentation for further -details. -

    This command is intended for fields that contain a label. For example, to test if -the category is one of a set of labels: - - - -

    -
    -\GlsXtrIfFieldValueInCsvList{examplelabel}{category}%
    - {abbreviation,acronym}% set of labels
    - {true part}{false part}
    -
    -

    -

    As from v1.31, if a field represents a numeric (integer) value, you can use the -following two numeric tests. If the field is set, it must expand to an integer. You may -use \glscurrentfieldvalue within ⟨true⟩ or ⟨false⟩ to access the actual value. Both -⟨true⟩ and ⟨false⟩ are scoped. If the field is undefined or empty, the value is assumed to -be 0, and \glscurrentfieldvalue is set accordingly. As from version 1.39, these -numeric tests have starred versions. The unstarred versions add implicit grouping. -The starred versions don’t. -

    As from v1.47 there’s a similar command: -


    \GlsXtrIfValueInFieldCsvList{label}{field}{value}{true}{false} -

    -

    -This is essentially the opposite situation where the list is stored in the given field and -⟨value⟩ is the element to find in the list. Again the unstarred versions add implicit -grouping. Note that the ⟨value⟩ isn’t expanded. If you need it to be fully expanded -before searching for it use: -


    \xGlsXtrIfValueInFieldCsvList{label}{field}{value}{true}{false} -

    -

    -(To add a value to a field containing a comma-separated list, use \glsxtrapptocsvfield. -To iterate over the field use \glsxtrforcsvfield.) -

    To test if the value is non-zero: -


    \GlsXtrIfFieldNonZero{field}{label}{true}{false}

    -

    -Alternatively, you can test if the field expands to a specific number using: -


    \GlsXtrIfFieldEqNum{field}{label}{n}{true}{false}

    -

    -This does ⟨true⟩ if the field value equals ⟨n⟩ (using \ifnum for the comparison) -otherwise it does ⟨false⟩. For a more general numeric comparison you can -use: -


    \GlsXtrIfFieldCmpNum{field}{label}{comparison}{n}{true}{false} -

    -

    -where ⟨comparison⟩ is one of =, < or >. -

    The glossaries package provides \glsfieldfetch which can be used to fetch the -value of the given field and store it in a control sequence. The glossaries-extra package -provides another way of accessing the field value: -


    \glsxtrusefield{entry-label}{field-label}

    - - - -

    -This works in the same way as commands like \glsentrytext but the field label is -specified in the first argument. Note that the ⟨field-label⟩ corresponds to the internal -field tag, which isn’t always the same as the key name. See Table 4.1 of the 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 -\Glsentrytext): -


    \Glsxtrusefield{entry-label}{field-label}

    -

    -and, as from v1.37, a command that converts the entire value to upper case: -


    \GLSxtrusefield{entry-label}{field-label}

    -

    -

    If you want to use a field to store a list that can be used as an etoolbox internal -list, you can use the following command that adds an item to the field using -etoolbox’s \listcsadd: -


    \glsxtrfieldlistadd{label}{field}{item}

    -

    -where ⟨label⟩ is the entry’s label, ⟨field⟩ is the entry’s field and ⟨item⟩ is the item to -add. There are analogous commands that use \listgadd, \listeadd and -\listxadd: -


    \glsxtrfieldlistgadd{label}{field}{item}

    -

    -


    \glsxtrfieldlisteadd{label}{field}{item}

    -

    -


    \glsxtrfieldlistxadd{label}{field}{item}

    -

    -You can then iterate over the list using: -


    \glsxtrfielddolistloop{label}{field}

    -

    -or -


    \glsxtrfieldforlistloop{label}{field}{handler}

    -

    -that internally use \dolistcsloop and \forlistloop, respectively. You can use -\listbreak to break out of the loop (see the etoolbox manual for further -details). -

    For fields that contain comma-separated lists use \glsxtrforcsvfield -instead. -

    New to v1.42: -


    \glsxtrfieldformatlist{label}{field}

    -

    -Like datatool-base’s \DTLformatlist, this iterates over an (etoolbox) internal list and -formats each item. Uses all the same helper commands as \DTLformatlist (the same - - - -list handler macro is used). Unlike the datatool-base command, this command has no -starred version. Grouping is automatically applied. -

    For example, with bib2gls’s save-child-count resource option: - - - -

    -
    -\newcommand*{\listchildren}[1]{%
    -  \GlsXtrIfFieldNonZero{childcount}{#1}%
    -  {child count: \glscurrentfieldvalue; children:
    -   \let\DTLlistformatitem\glsfmtname
    -   \glsxtrfieldformatlist{#1}{childlist}%
    -  }%
    -  {no children}%
    +
    +\bibglssetrecordcount{entry-label}{counter}{value}
    + This sets the total for the given counter and is defined as:
    \providecommand*{\bibglssetrecordcount}[3]{% 
    + \GlsXtrSetField{#1}{recordcount.#2}{#3}% 
     }
    -
    -

    For fields that contain a comma-separated list use \glsxtrfieldformatcsvlist -instead. -

    There are also commands that use \ifinlistcs: -


    \glsxtrfieldifinlist{label}{field}{item}{true}{false}

    -

    -and \xifinlistcs -


    \glsxtrfieldxifinlist{label}{field}{item}{true}{false}

    -

    -

    See the etoolbox’s user manual for further details of these commands, in particular -the limitations of \ifinlist. -

    If the field has a comma-separated list value instead, you can iterate over it -using: -


    \glsxtrforcsvfield{label}{field}{handler}

    -

    -where again ⟨handler⟩ is a control sequence that takes a single argument. Unlike the -etoolbox loops, this doesn’t ignore empty elements nor does it discard leading / -trailing spaces. Internally it uses \@for (modified by xfor which is automatically -loaded by glossaries). The xfor package modifies the behaviour of \@for to allow the -loop to be broken prematurely using \@endfortrue. The \glsxtrforcsvfield -command locally defines a user level command: -


    \glsxtrendfor

    -

    -which is just a synonym for \@endfortrue. -

    The loop is performed within the true part of \glsxtrifhasfield so scoping is -automatically applied. If you don’t want scoping use \glsxtrforcsvfield* which -will use \glsxtrifhasfield* instead but take care if you nest these starred -commands as unexpected results can occur without the scoping. -

    New to v1.42: -


    \glsxtrfieldformatcsvlist{label}{field}

    -

    -Like \glsxtrfieldformatcsvlist but for fields that contain comma-separated -lists. - - - -

    As from version 1.32, if the field given by -


    \GlsXtrForeignTextField

    -

    -(which defaults to userii) contains a locale tag, then -


    \GlsXtrForeignText{entry label}{text}

    -

    -can be used to encapsulate ⟨text⟩ in \foreignlanguage{dialect}{text} where ⟨dialect⟩ is -obtained from the locale tag through tracklang’s \GetTrackedDialectFromLanguageTag -command. You need at least tracklang v1.3.6 for this to work properly. The ⟨dialect⟩ -must be one that’s tracked (which typically means that babel or polyglossia has been -loaded with the appropriate setting for that language). If \foreignlanguage hasn’t -been defined, this just does ⟨text⟩. For example: - - - -

    -
    -\documentclass{article}
    -\usepackage[main=british,brazilian,ngerman]{babel}
    -\usepackage{glossaries-extra}
    -\setabbreviationstyle{long-short-user}
    -\newabbreviation
    - [user1={Associa\c{c}\~ao Brasileria de Normas T\'ecnicas},
    -  user2= {pt-BR}
    - ]
    - {abnt}{ABNT}{Brazilian National Standards Organization}
    -\newabbreviation
    - [user1={Deutsches Institut f\"ur Normung e.V.},
    -  user2={de-DE-1996}]
    - {din}{DIN}{German Institute for Standardization}
    -\renewcommand*{\glsxtruserparen}[2]{%
    -  \glsxtrfullsep{#2}%
    -  \glsxtrparen
    -  {#1%
    -   \ifglshasfield{\glsxtruserfield}{#2}%
    -   {, \emph{\GlsXtrForeignText{#2}{\glscurrentfieldvalue}}}%
    -   {}%
    -  }%
    +
    The following is only available with --record-count-unit:
    +\bibglssetlocationrecordcount{entry-label}{counter}{location}{value}
    + This sets the total for the given location and is defined as:
    \providecommand*{\bibglssetlocationrecordcount}[4]{% 
    + \GlsXtrSetField{#1}{recordcount.#2.\glsxtrdetoklocation{#3}}{#4}% 
     }
    -\begin{document}
    -\gls{abnt}, \gls{din}.
    -\end{document}
    -
    -

    -

    When using the 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: -


    \GlsXtrRecordCounter{counter name}

    -

    -For example: - - - -

    -
    -\usepackage[record]{glossaries-extra}
    -\GlsXtrRecordCounter{section}
    -
    -

    Each time an entry is referenced with commands like \gls or \glstext, -the .aux file will not only contain the \glsxtr@record command but also -

    -
    -\glsxtr@counterrecord{label}{section}{n} -
    -
    where ⟨n⟩ is the current expansion of \thesection and ⟨label⟩ is the entry’s -label. On the next run, when the .aux file is run, this command will do -
    -
    -\glsxtrfieldlistgadd{label}{record.counter}{n} -
    -
    In the above example, if \gls{bird} is used in section 1.2 this would be - - - -
    -\glsxtrfieldlistgadd{bird}{record.section}{1.2}
    -
    -

    Note that there’s no key corresponding to this new record.section field, but its -value can be accessed with \glsxtrfielduse or the list can be iterated over with -\glsxtrfielddolistloop etc. -

    -

    -

    Top

    11.2 Display All Entries Without Sorting or Indexing

    -


    \printunsrtglossary[options]

    -

    -This behaves like \printnoidxglossary but never sorts the entries and -always lists all the defined entries for the given glossary (and doesn’t require -\makenoidxglossaries). If you want to use one of the tabular-like styles with -\printunsrtglossary, make sure you load glossaries-extra-stylemods which modifies -the definition of \glsgroupskip to avoid the “Incomplete \iftrue” error that may -otherwise occur. -

    There’s also a starred form -


    \printunsrtglossary*[options]{code}

    -

    -which is equivalent to

    -
    -\begingroup -
     code\printunsrtglossary[options]% -
    \endgroup -
    -
    Note that unlike \glossarypreamble, the supplied ⟨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 number -list in this case, as that has to be set by a post-processor such as bib2gls (see -§10 bib2gls: Managing Reference Databases). -

    No attempt is made to gather hierarchical elements. If child entries aren’t defined -immediately after their parent entry, they won’t be together in the glossary when -using \printunsrtglossary.
    -

    - - - -

    There’s a difference in behaviour depending on whether or not the group key is -defined. If not defined (default), the group label will be formed from the first letter of -the name field. The corresponding group title will be obtained as discussed in -§2.11 Glossary Style Modifications. This can lead to an odd effect if -you are using a style that separates letter groups when the ordering isn’t -alphabetical. -

    If the group key is defined (which it is with the record option) then the group label -will be obtained from the value of that field. If the field is empty, no grouping is -performed, even if the style supports it. (That is, there won’t be a header or a vertical -separation.) If the group field is non-empty, then the corresponding title is obtained -as described earlier. -

    In either case, if the groups option is set to false then no group formation will be -performed. -

    If you want to use a different field for the group label, you can redefine -


    \glsxtrgroupfield

    -

    -to the relevant internal field label, but the group key must still be defined (through -the record option or with commands like \glsaddstoragekey) to ensure that -\printunsrtglossary uses \glsxtrgroupfield. (This method is used by bib2gls -for secondary entries, which have the group label stored in the secondarygroup -internal field.) -

    If you have any entries with the see key set, you will need the glossaries package -option seenoindex=ignore or seenoindex=warn to prevent an error occurring from the -automated \glssee normally triggered by this key. The record=only package option -will automatically deal with this. -

    For example: - - - -

    -
    -\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}
    -
    -

    In the above, zebra will be listed before ant as it was defined first. -

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

    The optional argument is as for \printnoidxglossary (except for the sort key, -which isn’t available). -

    All glossaries may be displayed in the order of their definition using: -


    \printunsrtglossaries

    -

    -which is analogous to \printnoidxglossaries. This just iterates over all defined -glossaries (that aren’t on the ignored list) and does \printunsrtglossary[type=⟨type⟩]. -

    -

    -

    Top

    11.2.1 Hooks

    -

    To avoid complications caused by tabular-like glossary styles, \printunsrtglossary -iterates over all entries in the selected glossary and appends the appropriate code to -an internal command. Once the construction of this command is complete, then it’s -performed to display the glossary. This puts the loop outside the style code. For -convenience, there’s a hook used within the loop: -


    \printunsrtglossaryentryprocesshook{label}

    -

    -This hook should not display any content, but may be used to perform calculations. -For example, to calculate widths. Within this hook you can use: -


    \printunsrtglossaryskipentry

    -

    -to skip the current entry. This will prevent the entry from being added to the internal -command. - - - -

    There’s another hook immediately before the internal command containing the -glossary code is performed: -


    \printunsrtglossarypredoglossary

    -

    -

    The internal command uses -


    \printunsrtglossaryhandler{label}

    -

    -to display each item in the list, where ⟨label⟩ is the current label. -

    By default the handler just does -


    \glsxtrunsrtdo{label}

    -

    -which determines whether to use \glossentry or \subglossentry and checks the -location and loclist fields for the number list. If you want to use a different field to be -used instead of location then redefine: -


    \GlsXtrLocationField

    -

    -to the internal name of the desired field. For example: - - - -

    -
    -\renewcommand{\GlsXtrLocationField}{primarylocation}
    -
    -

    -

    Note that if the given location field is undefined or unset, the handler will -fallback on the loclist field.
    -

    -You can instruct bib2gls to omit setting the loclist field with the resource option ---save-loclist=false to prevent it from being used as a fallback. -

    -

    -

    Top

    11.2.2 Filtering

    -

    You can redefine the handler used by \printunsrtglossary if required. For -example, you may want to filter entries according to the category label. You can test -if a label is contained in a comma-separated list of labels using: -


    \glsxtriflabelinlist{label}{label list}{true}{false}

    -

    -The ⟨label⟩ and ⟨label list⟩ will be fully expanded. -

    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.
    -

    -

    For example, if the preamble includes: - - - -

    -
    -\usepackage[record,style=index]{glossaries-extra}
    -\GlsXtrRecordCounter{section}
    -
    -

    then you can print the glossary but first redefine the handler to only select entries -that include the current section number in the record.section field: - - - -

    -
    -\renewcommand{\printunsrtglossaryhandler}[1]{%
    -  \glsxtrfieldxifinlist{#1}{record.section}{\thesection}
    -  {\glsxtrunsrtdo{#1}}%
    -  {}%
    +

    +By defining one of more of these commands before the glstex file is input, it’s possible to pick up the information, without the need to iterate over all entries later. For example, the following will create a mini-glossary for each particular location and populate it with entries that have a record for that location.

    \newcommand*{\bibglssetlocationrecordcount}[4]{% 
    + \GlsXtrSetField{#1}{recordcount.#2.#3}{#4}% 
    + \provideignoredglossary{minigloss.#2.#3}% 
    + \glsxtrcopytoglossary{#1}minigloss.#2.#3% 
     }
    -
    -

    -

    Alternatively you can use the starred form of \printunsrtglossary which will -localise the change: - - - -

    -
    -\printunsrtglossary*{%
    -  \renewcommand{\printunsrtglossaryhandler}[1]{%
    -    \glsxtrfieldxifinlist{#1}{record.section}{\thesection}
    -    {\glsxtrunsrtdo{#1}}%
    -    {}%
    -  }%
    +
    I’ve omitted \glsxtrdetoklocation for clarity and because I’m confident the locations won’t be problematic. The mini-glossary can then be displayed at the start of the chapter with:
    \printunsrtglossary[type=minigloss.chapter.\theHchapter]
    +

    +The previous example can be altered to strip the \rgls commands and instead add a mini-glossary at the start of each chapter (the redefinition of \glslinkpresetkeys remains to ensure there are locations with the chapter counter). I’ve also provided a command to make it easier to display the mini-glossaries:

    \newcommand{\minigloss}{%  
    + \printunsrtglossary*[style=abbr-short-long,type=minigloss.chapter.\theHchapter,groups=false,target=false]%  
    + {\renewcommand{\glossarysection}[2][]{}% 
    +  \renewcommand{\glslongextraShortLongTabularHeader}{\toprule}% 
    + }}
    +
    The document build is the same.

    +

    +Example 156: Using bib2gls: unit record counting mini-glossary 📥🖹 📥🖺

    +Page 1. Example document using bib2gls to create a mini-glossary with unit records.Page 2. Example document using bib2gls to create a mini-glossary with unit records.Page 3. Example document using bib2gls to create a mini-glossary with unit records.

    +

    + +

    + +
    +

    11.5. The glossaries-extra-bib2gls package

    +

    +

    +\usepackage{glossaries-extra-bib2gls}

    +

    automatically loaded with \usepackage[record]{glossaries-extra} or \usepackage[record=nameref]{glossaries-extra}
    +
    + The package options record=only (or simply record) and record=nameref automatically loads the supplementary package glossaries-extra-bib2gls, which provides some commands that are specific to bib2gls, in particular to sorting and location lists which aren’t relevant with record=hybrid.

    +If glossaries-extra-bib2gls is loaded via the record package option then the check for associated language files (see §15) will also search for the existence of glossariesxtr-script.ldf for each document dialect (where script is the four letter script identifier, such as Latn).

    + +

    + +
    +

    11.5.1. Displaying Glossaries

    +

    +Glossaries are displayed with the “unsrt” family of commands (see §8.4). Some styles, such as bookindex, are customized for use with bib2gls.

    +The following commands are shortcuts that use \printunsrtglossary. However, they are only defined if a corresponding package option has been set before glossaries-extra-bib2gls is loaded. This means that the options must be passed as a package option, not using \glossariesextrasetup, if the shortcut commands are required.

    +

    +\printunsrtabbreviations[options]

    +

    +
    + This shortcut is provided if the abbreviations package option has been used. This is a shortcut for:
    \printunsrtglossary[type=abbreviations,options]
    +

    +

    +\printunsrtacronyms[options]

    +

    +
    + This shortcut is provided if the acronyms (or acronym) package option has been used. This is a shortcut for:
    \printunsrtglossary[type=\acronymtype,options]
    +

    +

    +\printunsrtsymbols[options]

    +

    +
    + This shortcut is provided if the symbols package option has been used. This is a shortcut for:
    \printunsrtglossary[type=symbols,options]
    +

    +

    +\printunsrtnumbers[options]

    +

    +
    + This shortcut is provided if the numbers package option has been used. This is a shortcut for:
    \printunsrtglossary[type=numbers,options]
    +

    +

    +\printunsrtindex[options]

    +

    +
    + This shortcut is provided if the index package option has been used. This is a shortcut for:
    \printunsrtglossary[type=index,options]
    +

    + +

    + +
    +

    11.5.2. Helper Commands for Resource Options

    +

    +

    +\glshexhex
    + This simply expands to \string\uhex, which is used to identify the Unicode character hex in the value of some resource options.

    +

    +\glshashchar
    + This expands to a literal # character (similar to \glsbackslash).

    +

    +\glscapturedgroupn
    + This simply expands to \string\$n which is used to indicate the nth captured group in a regular expression replacement in the value of some resource options (requires bib2gls v1.5+), such as sort-replace. For example:
    sort-replace={{([a-zA-Z])\string\.}{\glscapturedgroup1}}
    +
    This removes a full stop that follows any of the characters a,…,z or A,…,Z.

    +A convenient shortcut for use in the entry-type-aliases setting:

    +\GlsXtrBibTeXEntryAliases
    + This provides aliases for BibTeX’s standard entry types (such as @article and @book) to bib2gls’s @bibtexentry entry type (requires bib2gls v1.4+).

    +You may also want to provide storage keys for BibTeX’s standard fields rather than having to alias them all. This can be done with:

    +\GlsXtrProvideBibTeXFields
    + This defines each BibTeX field, such as author, as a glossary entry key:
    \glsaddstoragekey{address}{}{\glsxtrbibaddress}%
    + \glsaddstoragekey{author}{}{\glsxtrbibauthor}%
    + \glsaddstoragekey{booktitle}{}{\glsxtrbibbooktitle}%
    + \glsaddstoragekey{chapter}{}{\glsxtrbibchapter}%
    + \glsaddstoragekey{edition}{}{\glsxtrbibedition}%
    + \glsaddstoragekey{howpublished}{}{\glsxtrbibhowpublished}%
    + \glsaddstoragekey{institution}{}{\glsxtrbibinstitution}%
    + \glsaddstoragekey{journal}{}{\glsxtrbibjournal}%
    + \glsaddstoragekey{month}{}{\glsxtrbibmonth}%
    + \glsaddstoragekey{note}{}{\glsxtrbibnote}%
    + \glsaddstoragekey{number}{}{\glsxtrbibnumber}%
    + \glsaddstoragekey{organization}{}{\glsxtrbiborganization}%
    + \glsaddstoragekey{pages}{}{\glsxtrbibpages}%
    + \glsaddstoragekey{publisher}{}{\glsxtrbibpublisher}%
    + \glsaddstoragekey{school}{}{\glsxtrbibschool}%
    + \glsaddstoragekey{series}{}{\glsxtrbibseries}%
    + \glsaddstoragekey{title}{}{\glsxtrbibtitle}%
    + \glsaddstoragekey{bibtextype}{}{\glsxtrbibtype}%
    + \glsaddstoragekey{volume}{}{\glsxtrbibvolume}%
    +
    This command should be placed before the first \GlsXtrLoadResources.

    +

    +BibTeX’s type field clashes with the glossaries package’s type key, so this command provides the key bibtextype instead. You can alias it with field-aliases={type=bibtextype} in the resource options.
    +

    + +

    + +
    +

    11.5.2.1. Custom Sort

    +

    +There are many locale alphabetical rules provided with bib2gls, such as sort=de-1996 for German new orthography. However, it may be that your particular locale isn’t supported, or you want a rule that covers multiple scripts or non-alphabetic symbols.

    +The sort=custom setting combined with sort-rule provides a way to define your own sort rule. For example, suppose I have a file called animals.bib that contains:

    @index{bee}
    @index{lion}
    @index{ant}
    @index{cow}
    @index{goose}
    @index{zebu}
    @index{egret}
    @index{elk}
    @index{llama}
    @index{lynx}
    @index{bat}
    Here’s a very limited rule that only recognises five letters:
    \usepackage[record,nostyles,stylemods=bookindex,style=bookindex]
    +{glossaries-extra}
    +
    +\newcommand{\bibglssetlastgrouptitle}[2]{%
    + \glsxtrsetgrouptitle{#1#2}{Other}%
    +}
    +\GlsXtrLoadResources[src=animals,selection=all,
    + sort=custom,sort-rule={ < a,A < b,B < e,E < l,L < ll,Ll,LL < z,Z}]
    +
    +\begin{document}
    +\printunsrtglossaries
    +\end{document}
    +
    Any characters that aren’t included in the rule (such as “c” and “g”) are placed at the end. I’ve defined \bibglssetlastgrouptitle to label that final group of characters “Other”. If the document is in a file called myDoc.tex, the build process is:
    pdflatex myDoc
    +bib2gls -g myDoc
    +pdflatex myDoc
    +
    The result is:
    +Example 157: Using bib2gls: simple custom sort rule 📥🖹 📥🖺

    +Example document that provides a simplistic custom sort rule.

    + Note that “egret” has been placed after “elk”. This is because “l” is included in the rule but “g” isn’t. Whereas “lynx” comes before “llama” because there’s a separate “ll” group after the “l” group.

    +The commands listed below provide common rule blocks for use in the sort-rule resource option. If you want a rule for a specific locale, you can provide similar commands in a file called glossariesxtr-tag.ldf, where tag identifies the dialect, locale, region or root language. See the description of \IfTrackedLanguageFileExists in the tracklang documentation for further details. If this file is on TeX’s path and the tracklang package (automatically loaded by glossaries) detects that the document has requested that language or locale, then the file will automatically be loaded. For example, if you want to provide a rule block for Welsh, then create a file called glossariesxtr-welsh.ldf that contains:

    \ProvidesGlossariesExtraLang{welsh}[2018/02/23 v1.0]
    +
    +\@ifpackageloaded{glossaries-extra-bib2gls}
    +{
    +  \newcommand{\glsxtrWelshRules}{%
    +   \glsxtrLatinA
    +   \string<b,B
    +   \string<c,C
    +   \string<ch,CH
    +   \string<d,D
    +   \string<dd,DD
    +   \string<\glsxtrLatinE
    +   \string<f,F
    +   \string<ff,FF
    +   \string<g,G
    +   \string<ng,NG
    +   \string<\glsxtrLatinH
    +   \string<\glsxtrLatinI
    +   \string<j,J
    +   \string<\glsxtrLatinL
    +   \string<ll,Ll,LL
    +   \string<\glsxtrLatinM
    +   \string<\glsxtrLatinN
    +   \string<\glsxtrLatinO
    +   \string<\glsxtrLatinP
    +   \string<ph,PH
    +   \string<r,R
    +   \string<rh,RH
    +   \string<\glsxtrLatinS 
    +   \string<\glsxtrLatinT
    +   \string<th,TH
    +   \string<u,U
    +   \string<w,W
    +   \string<y,Y
    +  }
     }
    -
    -

    -

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

    -
    -\printunsrtglossary*{%
    -  \renewcommand{\printunsrtglossaryhandler}[1]{%
    -    \glsxtrfieldxifinlist{#1}{record.section}{\thesection}
    -    {\glsxtrunsrtdo{#1}}%
    -    {}%
    -  }%
    -  \ifcsundef{theHsection}%
    -  {%
    -    \renewcommand*{\glolinkprefix}{record.\csuse{thesection}.}%
    -  }%
    -  {%
    -    \renewcommand*{\glolinkprefix}{record.\csuse{theHsection}.}%
    -  }%
    +{}% glossaries-extra-bib2gls.sty not loaded
    +
    (The use of \string is in case the < character has been made active.) You can provide more than one rule-block per local, to allow for loanwords or foreign words. For example, you could provide \glsxtrWelshIRules, \glsxtrWelshIIRules etc.

    +If the rules are for a particular script (independent of language or region) then they can be provided in a file given by glossariesxtr-script.ldf instead. For example, the file glossariesxtr-Cyrl.ldf could contain:

    \ProvidesGlossariesExtraLang{Cyrl}[2018/02/23 v1.0]
    +\newcommand*{\glsxtrGeneralCyrillicIRules}{%
    +  % Cyrillic rules
     }
    -
    -

    Note that this will cause a problem if your descriptions contain commands like \gls -that need to link an entry that doesn’t appear in the summary. In this case, it’s a -better approach to use: - - - -

    -
    -\printunsrtglossary*{%
    -  \renewcommand{\printunsrtglossaryhandler}[1]{%
    -    \glsxtrfieldxifinlist{#1}{record.section}{\thesection}
    -    {\glsxtrunsrtdo{#1}}%
    -    {}%
    -  }%
    -  \ifcsundef{theHsection}%
    -  {%
    -    \setkeys{printgloss}{targetnameprefix={record.\csuse{thesection}.}}%
    -  }%
    -  {%
    -    \setkeys{printgloss}{targetnameprefix={record.\csuse{theHsection}.}}%
    -  }%
    +\newcommand*{\glsxtrGeneralCyrillicIIRules}{%
    +  % an alternative set of Cyrillic rules
     }
    -
    -

    -

    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: - - - -

    -
    -\printunsrtglossary*{%
    -  \renewcommand{\printunsrtglossaryhandler}[1]{%
    -    \glsxtrfieldxifinlist{#1}{record.section}{\thesection}
    -    {\glsxtrunsrtdo{#1}}%
    -    {}%
    -  }%
    -  \ifcsundef{theHsection}%
    -  {%
    -    \renewcommand*{\glolinkprefix}{record.\csuse{thesection}.}%
    -  }%
    -  {%
    -    \renewcommand*{\glolinkprefix}{record.\csuse{theHsection}.}%
    -  }%
    -  \renewcommand*{\glossarysection}[2][]{}%
    -  \appto\glossarypostamble{\glspar\medskip\glspar}%
    +
    Remember that the required document language scripts need to be tracked through the tracklang package, in order for these files to be automatically loaded. This essentially means ensuring you load the appropriate language package before tracklang is loaded by the base glossaries package or any other package that uses it. See the tracklang documentation for further details.

    +Alternatively, if the rules are specific to a subject rather than a region or language, then you can provide a supplementary package. For example, if you have a package called, say, mapsymbols that provides map symbols, then the file mapsymbols.sty might contain:

    \ProvidesPackage{mapsymbols}
    +% some package or font loading stuff here to provide
    +% the appropriate symbols
    +\newcommand{\Stadium}{...}
    +\newcommand{\Battlefield}{...}
    +\newcommand{\Harbour}{...}
    +% etc
    +
    +% Provide a rule block:
    +\newcommand{\MapSymbolOrder}{%
    + \glshex 2694 % crossed-swords 0x2694
    + \string< \glshex 2693 % anchor 0x2693
    + \string< \glshex 26BD % football 0x26BD
     }
    -
    -

    -

    There’s a shortcut command that essentially does this: -


    \printunsrtglossaryunit[options]{counter name}

    -

    -The above example can simply be replaced with: - - - -

    -
    -\printunsrtglossaryunit{section}
    -
    -

    -

    This shortcut command is actually defined to use \printunsrtglossary* -with -


    \printunsrtglossaryunitsetup{counter name}

    -

    -so if you want to just make some minor modifications you can do - - - -

    -
    -\printunsrtglossary*{\printunsrtglossaryunitsetup{section}%
    -  \renewcommand*{\glossarysection}[2][]{\subsection*{Summary}}%
    +
    and the supplementary file mapsymbols.bib can provide the appropriate definitions for bib2gls:
    @preamble{"\glsxtrprovidecommand{\Harbour}{\char"2693}
    +\glsxtrprovidecommand{\Battlefield}{\char"2694}
    +\glsxtrprovidecommand{\Stadium}{\char"26BD}"}
    +
    Now both the preamble and rule block can be used in the resource set:
    \usepackage{mapsymbols}% my custom package
    +\usepackage[record]{glossaries-extra}
    +
    +\GlsXtrLoadResources[
    +  src={mapsymbols,% <--- my custom mapsymbols.bib    entries% data in entries.bib   },
    +  sort=custom,
    +  sort-rule={\glsxtrcontrolrules % control codes  ;\glsxtrspacerules % space characters  ;\glsxtrnonprintablerules % non-printable characters  ;\glsxtrcombiningdiacriticrules % combining diacritics  ,\glsxtrhyphenrules % hyphens  <\glsxtrgeneralpuncrules % general punctuation  <\glsxtrdigitrules % 0, ..., 9  <\glsxtrfractionrules % fraction symbols  <\MapSymbolOrder % <--- custom map symbols  <\glsxtrMathItalicGreekIrules % math-greek symbols  <\glsxtrGeneralLatinIrules % Latin letters  }
    +]
    +
    (As before, you may need to use \string in front of characters like < if they have been made active.)

    +The following commands are provided by glossaries-extra-bib2gls. They should be separated by the rule separator characters ; (semi-colon) or , (comma) or & (ampersand) or < (less than). See Java’s RuleBasedCollator documentation for details of the rule syntax.

    +For example, the following will place the mathematical Greek symbols (\alpha, \Alpha, \beta, \Beta etc) in a block before Latin characters:

    sort-rule={\glsxtrcontrolrules  ;\glsxtrspacerules  ;\glsxtrnonprintablerules  ;\glsxtrcombiningdiacriticrules  ,\glsxtrhyphenrules  <\glsxtrgeneralpuncrules  <\glsxtrdigitrules  <\glsxtrfractionrules  <\glsxtrMathItalicGreekIrules  <\glsxtrGeneralLatinIVrules  <\glsxtrLatinAA  <\glsxtrLatinOslash }
    +

    + +

    + +
    +
    11.5.2.1.1. Non-Letters
    +

    +

    +\glsxtrcontrolrules
    + These are control characters that are usually placed at the start of a rule in the ignored section. They typically won’t occur in any sort values, but if they do they should normally be ignored.

    +

    +\glsxtrspacerules
    + These are space characters. They typically come after the control characters with the two blocks separated by a ; (semi-colon).

    +

    +\glsxtrnonprintablerules
    + These are non-printable characters (BOM, tabs, line feed and carriage return). They typically come after the spaces separated by a ; (semi-colon). These characters aren’t checked for by bib2gls when it determines whether or not to use the interpreter, so a TAB or newline character may end up in the sort value if it wasn’t interpreted.

    +

    +\glsxtrcombiningdiacriticrules
    + These are combining diacritic marks which typically follow the space and non-printable blocks (separated by a semi-colon). This command is defined in terms of sub-block commands:
    \newcommand*{\glsxtrcombiningdiacriticrules}{%
    + \glsxtrcombiningdiacriticIrules\string;
    + \glsxtrcombiningdiacriticIIrules\string;
    + \glsxtrcombiningdiacriticIIIrules\string;
    + \glsxtrcombiningdiacriticIVrules
     }
    -
    -

    which will start the list with a subsection header with the title “Summary” -(overriding the glossary’s title). -

    Note that this shortcut command is only available with the record (or -record=hybrid) package option. -

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

    -

    -

    Top

    11.3 Partial Glossaries

    -

    It’s possible that you may require greater customisation over the way the glossary is -displayed that can’t be simply achieved with the hooks or glossary styles. This -section describes a command and environment provided to assist with this, but note -that they aren’t compatible with tabular-like glossary styles, such as long or super, -due to their complexity and internal scoping that interferes with alignment. -You will also need to take care with list styles (provided in the glossary-list -package). -

    To get a better understanding of how this works, it’s useful to consider how a -glossary with makeindex works. Here’s a simple example document: - - - -

    -
    -\documentclass{article}
    -\usepackage{glossaries}
    -\makeglossaries
    -\newglossaryentry{cabbage}{name={cabbage},
    - description={vegetable with thick green or purple leaves}}
    -\newglossaryentry{broccoli}{name={broccoli},
    - description={vegetable with heads of small green or purple flower buds}}
    -\begin{document}
    -\Gls{cabbage} and \gls{broccoli}.
    -\printglossary
    -\end{document}
    -
    -

    When the document is built, makeindex creates a file that contains:

    -
    -\glossarysection[\glossarytoctitle]{\glossarytitle}\glossarypreamble -
    \begin{theglossary}\glossaryheader -
    \glsgroupheading{B}\relax \glsresetentrylist -
    \glossentry{broccoli}{location list}\glsgroupskip -
    \glsgroupheading{C}\relax \glsresetentrylist -
    \glossentry{cabbage}{location list}% -
    \end{theglossary}\glossarypostamble -
    -
    The \printglossary command defines the commands shown above after it’s -detected the glossary type, the title and style. It then inputs the file. -

    The \printunsrtglossary command performs the same preliminary setup but -there’s no file to input. Instead it then does the section heading (\glossarysection) -and preamble (\glossarypreamble) and constructs a control sequence that contains -\begin{theglossary} content\end{theglossary}. -

    The letter group markup (\glsgroupheading and \glsgroupskip) is inserted -whenever the group label changes between top-level entries. In this case, ⟨content⟩ -doesn’t explicitly contain \glossentry but uses a handler function instead. For -example, instead of:

    - - - -
    -\glossentry{broccoli}{location list} -
    -
    the ⟨content⟩ will contain:
    -
    -⟨internal handler{broccoli} -
    -
    This internal handler uses \printunsrtglossaryhandler to determine the required -information (location list, hierarchical level) that’s needed to typeset the entry (using -\glossentry or \subglossentry). -


    \begin{printunsrtglossarywrap}[options]
    content\end{printunsrtglossarywrap}

    -

    -The printunsrtglossarywrap environment provides a wrapper in which you can -place the actual glossary code. The optional argument is the same as for -\printunsrtglossary, but note that in this case the type key simply provides the -glossary title and doesn’t identify the content. -

    This environment essentially does:

    -
    -⟨initial setup⟩ -
    \glossarysection[\glossarytoctitle]{\glossarytitle}\glossarypreamble -
    \begin{theglossary}\glossaryheader\glsresetentrylist -
    content⟩ -
    \end{theglossary}\glossarypreamble -
    -
    where ⟨initial setup⟩ is much the same code as used by \printglossary -and \printunsrtglossary. Most importantly, ⟨initial setup⟩ sets the current -glossary style, which determines the definition of theglossary, \glossentry and -\subglossentry. -

    Whilst it is possible to explicitly use the commands that create letter group -headings and the handler within ⟨content⟩, it would be quite laborious and prone to -error to do so for anything other than a very short list. This can be illustrated with -the following silly example: - - - -

    -
    -\begin{printunsrtglossarywrap}[style=indexgroup]%
    -\glsgroupheading{W}%
    -\gdef\glscurrententrylabel{cabbage}%
    -\printunsrtglossaryhandler\glscurrententrylabel
    -\glsgroupskip
    -\glsgroupheading{Z}%
    -\gdef\glscurrententrylabel{broccoli}%
    -\printunsrtglossaryhandler\glscurrententrylabel
    -\end{printunsrtglossarywrap}
    -
    -

    This trivial example will work with a tabular-like style, such as long (although the -group headings will be ignored). A more practical example that uses a loop within -⟨content⟩ won’t. -


    \printunsrtinnerglossary[options]{pre-code}{post-code}

    -

    -This command is provided for use within printunsrtglossarywrap. The optional -argument ⟨options⟩ is similar to \printunsrtglossary but the following keys are -unavailable: title, toctitle, style, numberedsection and label. -

    This will do:

    -
    - \begingroup -
      initial setup⟩ -
      pre-code⟩ -
      content⟩ -
      post-code⟩ -
     \endgroup -
    -
    where ⟨initial setup⟩ processes the options and assigns \currentglossary, ⟨pre-code⟩ is -some preliminary code and ⟨post-code⟩ is some final code before the end of the scoping. -The ⟨content⟩ is the sequence of code that \printunsrtglossary would normally -insert within the theglossary environment. -

    For example: - - - -

    -
    -\begin{printunsrtglossarywrap}[style=indexgroup]
    -\printunsrtinnerglossary[type=main]{}{}
    -\end{printunsrtglossarywrap}
    -
    -

    This produces a result very similar to that obtained with just: - - - -

    -
    -\printunsrtglossary[style=indexgroup,type=main]
    -
    -

    The first case is unsuitable for use with a tabular-style. It will also cause a -problem with a list style when used with bib2gls (where the inner content -will be empty on the first LaTeX run which will cause a missing \item -error). -

    This partial glossary command is more useful when you need to apply filtering -(which can be set up in the ⟨pre-code⟩ argument as in \printunsrtglossary*) or if -you have multiple glossaries. For example: - - - -

    -
    -\begin{printunsrtglossarywrap}[style=list]
    -\item[Animals]
    -\printunsrtinnerglossary[type=animal]{}{}
    -\item[Vegetables]
    -\printunsrtinnerglossary[type=vegetable]{}{}
    -\item[Minerals]
    -\printunsrtinnerglossary[type=mineral]{}{}
    -\end{printunsrtglossarywrap}
    -
    -

    In this case, the list style doesn’t cause a problem as there will be three instances of -\item on the first LaTeX run. -

    Here’s another example: - - - -

    -
    -\begin{printunsrtglossarywrap}[style=indexgroup]
    -\glsgroupheading{animal}%
    -\printunsrtinnerglossary[type=animal]{}{}
    -\glsgroupskip
    -\glsgroupheading{vegetable}%
    -\printunsrtinnerglossary[type=vegetable]{}{}
    -\glsgroupskip
    -\glsgroupheading{mineral}%
    -\printunsrtinnerglossary[type=mineral]{}{}
    -\end{printunsrtglossarywrap}
    -
    -

    Note that in both of the above cases, the inner glossaries have been arranged -manually (animal, then vegetable and then mineral). -

    It’s also possible to use \printunsrtinnerglossary within the handler -function used by \printunsrtglossary. The internal scoping within -\printunsrtinnerglossary helps to reduce interference. -

    This is a rather more complicated example that requires bib2gls. Suppose I have -a file called topictitles.bib that contains: - - - -

    -
    -@indexplural{animal}
    -@indexplural{mineral}
    -@indexplural{vegetable}
    -
    -

    And also a file called topics.bib that contains entries like: - - - -

    -
    -@entry{zebra,
    -  name={zebra},
    -  description={striped African horse},
    -  category={animal}
    +
    If you prefer, you can use the sub-blocks directly in your required ordered.

    +

    +\glsxtrcombiningdiacriticIrules
    + This contains the combining diacritics: acute, grave, breve, circumflex, caron, ring, vertical line above, diaeresis (umlaut), double acute, tilde, dot above, combining macron.

    +

    +\glsxtrcombiningdiacriticIIrules
    + This contains the combining diacritics: short solidus overlay, cedilla, ogonek, dot below, low line, overline, hook above, double vertical line above, double grave accent, candrabindu, inverted breve, turned comma above, comma above, reversed comma above, comma above right, grave accent below, acute accent below.

    +

    +\glsxtrcombiningdiacriticIIIrules
    + This contains the combining diacritics: left tack below, right tack below, left angle above, horn, left half ring below, up tack below, down tack below, plus sign below, minus sign below, palatalized hook below, retroflex hook below, diaresis below, ring below, comma below, vertical line below, bridge below, inverted double arch below, caron below, circumflex accent below, breve below, inverted breve below, tilde below, macron below, double low line, tilde overlay, short stroke overlay, long stroke overlay, long solidus overlay, right half ring below, inverted bridge below, square below, seagull below, x above, vertical tilde, double overline, Greek perispomeni, Greek dialytika tonos, Greek ypogegrammeni, double tilde, double inverted breve, Cyrillic titlo, Cyrillic palatalization, Cyrillic dasia pneumata, Cyrillic psili pneumata.

    +

    +\glsxtrcombiningdiacriticIVrules
    + This contains the combining diacritics: left harpoon above, right harpoon above, long vertical line overlay, short vertical line overlay, anticlockwise arrow above, clockwise arrow above, left arrow above, right arrow above, ring overlay, clockwise ring overlay, anticlockwise ring overlay, three dots above, four dots above, enclosing circle, enclosing square, enclosing diamond, enclosing circle backslash, left right arrow above.

    +

    +\glsxtrhyphenrules
    + This contains hyphens (including the minus sign 0x2212). This rule block typically comes after the diacritic rules separated by a comma.

    +

    +\glsxtrgeneralpuncrules
    + This contains punctuation characters. This rule block typically comes after the hyphen rules separated by a less than (<). As with the combining diacritics, this command is defined in terms of sub-blocks which may be used directly instead if a different order is required:
    \newcommand*{\glsxtrgeneralpuncrules}{%
    +  \glsxtrgeneralpuncIrules
    +  \string<\glsxtrcurrencyrules
    +  \string<\glsxtrgeneralpuncIIrules
     }
    -@entry{broccoli,
    -  name={broccoli},
    -  description={vegetable with heads of small green or purple flower buds},
    -  category={vegetable}
    +

    +

    +\glsxtrgeneralpuncIrules
    + This is defined as:
    \newcommand*{\glsxtrgeneralpuncIrules}{% 
    + \glsxtrgeneralpuncmarksrules
    + \string<\glsxtrgeneralpuncaccentsrules
    + \string<\glsxtrgeneralpuncquoterules
    + \string<\glsxtrgeneralpuncbracketrules
    + \string<\glsxtrgeneralpuncsignrules
     }
    -@entry{quartz,
    -  name={quartz},
    -  description={hard mineral consisting of silica},
    -  category={mineral}
    +

    +

    +\glsxtrgeneralpuncmarksrules
    + This contains: underscore, macron, comma, semi-colon, colon, exclamation mark, inverted exclamation mark, question mark, inverted question mark, solidus, full stop.

    +

    +\glsxtrgeneralpuncaccentsrules
    + This contains: acute accent, grave accent, circumflex accent, diaeresis, tilde, middle dot, cedilla.

    +

    +\glsxtrgeneralpuncquoterules
    + This contains: straight apostrophe, straight double quote, left guillemet, right guillemet.

    +

    +\glsxtrgeneralpuncbracketrules
    + This contains: left parenthesis, right parenthesis, left square bracket, right square bracket, left curly bracket, right curly bracket.

    +

    +\glsxtrgeneralpuncsignrules
    + This contains: section sign, pilcrow sign, copyright sign, registered sign, at sign.

    +

    +\glsxtrcurrencyrules
    + This sub-block contains some currency symbols: currency sign, Thai currency symbol baht, cent sign, colon sign, cruzeiro sign, dollar sign, dong sign, euro sign, French franc sign, lira sign, mill sign, naira sign, peseta sign, pound sign, rupee sign, new sheqel sign, won sign, yen sign.

    +

    +\glsxtrgeneralpuncIIrules
    + This sub-block contains some other punctuation symbols: asterisk, backslash, ampersand, hash sign, percent sign, plus sign, plus-minus sign, division sign, multiplication sign, less-than sign, equals sign, greater-than sign, not sign, vertical bar (pipe), broken bar, degree sign, micron sign.

    +

    +\glsxtrdigitrules
    + This rule block contains the Basic Latin digits (0, …, 9) and the subscript and superscript digits (₀ ⁰ etc) made equivalent to the corresponding Basic Latin digit. The digit block typically comes after the punctuation rules separated by a less than (<).

    +

    +\glsxtrBasicDigitrules
    + This rule block contains just the Basic Latin digits (0, …, 9).

    +

    +\glsxtrSubScriptDigitrules
    + This rule block contains just the subscript digits (₀ … ₉).

    +

    +\glsxtrSuperScriptDigitrules
    + This rule block contains just the superscript digits (⁰ … ⁹).

    +

    +\glsxtrfractionrules
    + This rule block contains vulgar fraction characters from the Unicode Number Forms block. The digit block typically comes after the digit rules separated by a less than (<).

    +

    +\glsxtrIgnorableRules
    + A shortcut that expands to the ignorable rules:
    \glsxtrcontrolrules
    + ;\glsxtrspacerules
    + ;\glsxtrnonprintablerules
    +

    +

    +\glsxtrGeneralInitRules
    + A shortcut that expands to common initial rules:
    \glsxtrIgnorableRules
    + ;\glsxtrcombiningdiacriticrules
    + ;\glsxtrhyphenrules
    + <\glsxtrgeneralpuncrules
    + <\glsxtrdigitrules
    + <\glsxtrfractionrules
    +
    Note that this includes the combining diacritic rules, which won’t be appropriate for languages with accented characters.

    +There are a number of Latin rule blocks. Some of these included extended characters or ligatures (such as ß or œ) but they don’t include accented characters. If you require a Latin rule block that includes accented characters, digraphs, trigraphs or other extended characters, then it’s best to provide similar commands in a glossariesxtr-tag.ldf file for the particular language or region.

    + +

    + +
    +
    11.5.2.1.2. Latin Letters
    +

    +

    +\glsxtrGeneralLatinIrules
    + This is just the basic (non-extended) Latin alphabet with the superscript and subscript Latin letters (ª ₐ etc) treated as the equivalent basic Latin letter. (If you don’t want the subscripts and superscripts included you can redefine \glsxtrLatinA etc to omit them.)

    +

    +\glsxtrGeneralLatinIIrules
    + This is like \glsxtrGeneralLatinIrules but it includes eth (Ð) between “D” and “E” and eszett (ß) treated as “ss”.

    +

    +\glsxtrGeneralLatinIIIrules
    + This is like \glsxtrGeneralLatinIrules but it includes eth (Ð) between “D” and “E” and eszett (ß) treated as “sz”.

    +

    +\glsxtrGeneralLatinIVrules
    + This is like \glsxtrGeneralLatinIrules but it includes eth (Ð) between “D” and “E”, ae-ligature (æ) is treated as “ae”, oe-ligature (œ) is treated as “oe”, eszett (ß) treated as “ss” and thorn (þ) is treated as “th”.

    +

    +\glsxtrGeneralLatinVrules
    + This is like \glsxtrGeneralLatinIrules but it includes eth (Ð) between “D” and “E”, eszett (ß) treated as “ss” and thorn (þ) treated as “th”.

    +

    +\glsxtrGeneralLatinVIrules
    + This is like \glsxtrGeneralLatinIrules but it includes eth (Ð) between “D” and “E”, eszett (ß) treated as “sz” and thorn (þ) treated as “th”.

    +

    +\glsxtrGeneralLatinVIIrules
    + This is like \glsxtrGeneralLatinIrules but it includes ae-ligature (æ) between “A” and “B”, eth (Ð) between “D” and “E”, insular G (ᵹ) instead of “G”, oe-ligature (œ) between “O” and “P”, long s (ſ) equivalent to “s”, thorn (þ) between “T” and “U” and wynn (ƿ) instead of “W”.

    +

    +\glsxtrGeneralLatinVIIIrules
    + This is like \glsxtrGeneralLatinIrules but ae-ligature (æ) is treated as “ae”, oe-ligature (œ) is treated as “oe”, eszett (ß) treated as “ss”, thorn (þ) is treated as “th”, Ø is treated as “O” and “Ł” is treated as “L”.

    +

    +\glsxtrGeneralLatinAtoMrules
    + A mini-rule subset of General Latin I rules that just covers A–M.

    +

    +\glsxtrGeneralLatinNtoZrules
    + A mini-rule subset of General Latin I rules that just covers N–Z.

    +

    +\glsxtrGeneralLatinAtoGrules
    + A mini-rule subset of General Latin I rules that just covers A–G.

    +

    +\glsxtrGeneralLatinHtoMrules
    + A mini-rule subset of General Latin I rules that just covers H–M.

    +

    +\glsxtrGeneralLatinNtoSrules
    + A mini-rule subset of General Latin I rules that just covers N–S.

    +

    +\glsxtrGeneralLatinTtoZrules
    + A mini-rule subset of General Latin I rules that just covers T–Z.

    +

    +\glsxtrLatinA
    + A mini-rule that just covers “A” but includes the sub- and superscript A.

    +

    +\glsxtrLatinE
    + A mini-rule that just covers “E” but includes the subscript E.

    +

    +\glsxtrLatinH
    + A mini-rule that just covers “H” but includes the subscript H.

    +

    +\glsxtrLatinK
    + A mini-rule that just covers “K” but includes the subscript K.

    +

    +\glsxtrLatinI
    + A mini-rule that just covers “I” but includes the subscript I.

    +

    +\glsxtrLatinM
    + A mini-rule that just covers “M” but includes the subscript M.

    +

    +\glsxtrLatinN
    + A mini-rule that just covers “N” but includes the sub- and superscript N.

    +

    +\glsxtrLatinO
    + A mini-rule that just covers “O” but includes the sub- and superscript O.

    +

    +\glsxtrLatinP
    + A mini-rule that just covers “P” but includes the subscript P.

    +

    +\glsxtrLatinS
    + A mini-rule that just covers “S” but includes the subscript S.

    +

    +\glsxtrLatinT
    + A mini-rule that just covers “T” but includes the subscript T.

    +

    +\glsxtrLatinX
    + A mini-rule that just covers “X” but includes the subscript X.

    +

    +\glsxtrLatinEszettSs
    + A mini-rule that just covers eszett (ß) and makes “ſs” (long s followed by short s) equivalent to “ß”. (This is used in the above blocks that treat “ß” as “ss”.)

    +

    +\glsxtrLatinEszettSz
    + A mini-rule that just covers eszett (ß) and makes “ſz” (long s followed by z) equivalent to “ß”. (This is used in the above blocks that treat “ß” as “sz”.)

    +

    +\glsxtrLatinEth
    + A mini-rule for eth (Ð, ð) so you don’t need to remember the Unicode values.

    +

    +\glsxtrLatinThorn
    + A mini-rule for thorn (Þ, þ) so you don’t need to remember the Unicode values.

    +

    +\glsxtrLatinAELigature
    + A mini-rule for ae-ligature (Æ, æ) so you don’t need to remember the Unicode values.

    +

    +\glsxtrLatinOELigature
    + A mini-rule for oe-ligature (Œ, œ) so you don’t need to remember the Unicode values.

    +

    +\glsxtrLatinOslash
    + A mini-rule for o-slash (Ø, ø) so you don’t need to remember the Unicode values.

    +

    +\glsxtrLatinLslash
    + A mini-rule for l-slash (Ł, ł) so you don’t need to remember the Unicode values.

    +

    +\glsxtrLatinWynn
    + A mini-rule for wynn (Ƿ, ƿ) so you don’t need to remember the Unicode values.

    +

    +\glsxtrLatinInsularG
    + A mini-rule for insular-G (Ᵹ, ᵹ) so you don’t need to remember the Unicode values.

    +

    +\glsxtrLatinSchwa
    + A mini-rule for schwa (Ə, ə, ə) so you don’t need to remember the Unicode values. (Not used in any of the provided Latin rule blocks described above.)

    +

    +\glsxtrLatinAA
    + A mini-rule for “a with ring above” (Å, å) so you don’t need to remember the Unicode values. (Not used in any of the provided Latin rule blocks described above.)

    + +

    + +
    +
    11.5.2.1.3. Math Greek
    +

    +

    +\glsxtrMathGreekIrules
    + A rule block for mathematical Greek (\alpha, \beta etc) and upright Greek (\upalpha, etc, from the upgreek package) characters that includes digamma (\digamma and \Digamma) between epsilon and zeta. The upright and italic versions are gathered together into the same letter group.

    +

    +\glsxtrMathGreekIIrules
    + As \glsxtrMathGreekIrules but doesn’t include digamma.

    +

    +\glsxtrMathUpGreekIrules
    + A rule block for upright Greek (\upalpha, etc, from the upgreek package) characters that includes digamma (\digamma and \Digamma) between epsilon and zeta.

    +

    +\glsxtrMathUpGreekIIrules
    + A rule block for upright Greek (\upalpha, etc, from the upgreek package) that doesn’t include digamma.

    +

    +\glsxtrMathItalicGreekIrules
    + A rule block for mathematical Greek (\alpha, \Alpha, etc) characters that includes digamma (\digamma and \Digamma) between epsilon and zeta. Note that even though the uppercase \Delta etc are actually rendered upright by LaTeX, bib2gls’s interpreter treats them as italic to help keep them close to the lowercase versions.

    +

    +\glsxtrMathItalicGreekIIrules
    + A rule block for mathematical Greek (\alpha, \Alpha, etc) characters that doesn’t include digamma.

    +

    +\glsxtrMathItalicUpperGreekIrules
    + A rule block for uppercase mathematical Greek (\Alpha, \Beta, etc) characters that includes digamma (\Digamma) between epsilon and zeta.

    +

    +\glsxtrMathItalicUpperGreekIIrules
    + A rule block for uppercase mathematical Greek (\Alpha, \Beta, etc) characters that doesn’t include digamma.

    +

    +\glsxtrMathItalicLowerGreekIrules
    + A rule block for lowercase mathematical Greek (\alpha, \beta, etc) characters that includes digamma (\digamma) between epsilon and zeta.

    +

    +\glsxtrMathItalicLowerGreekIIrules
    + A rule block for lower case mathematical Greek (\alpha, \beta, etc) characters that doesn’t include digamma.

    +Additionally, there are commands that just cover the uppercase and lowercase forms of a special Greek character (\Upalpha, \upalpha etc and \Alpha, \alpha etc): \glsxtrUpAlpha, \glsxtrMathItalicAlpha, \glsxtrUpBeta, \glsxtrMathItalicBeta, \glsxtrUpGamma, \glsxtrMathItalicGamma, \glsxtrUpDelta, \glsxtrMathItalicDelta, \glsxtrUpEpsilon, \glsxtrMathItalicEpsilon, \glsxtrUpDigamma, \glsxtrMathItalicDigamma, \glsxtrUpZeta, \glsxtrMathItalicZeta, \glsxtrUpEta, \glsxtrMathItalicEta, \glsxtrUpTheta, \glsxtrMathItalicTheta, \glsxtrUpIota, \glsxtrMathItalicIota, \glsxtrUpKappa, \glsxtrMathItalicKappa, \glsxtrUpLambda, \glsxtrMathItalicLambda, \glsxtrUpMu, \glsxtrMathItalicMu, \glsxtrUpNu, \glsxtrMathItalicNu, \glsxtrUpXi, \glsxtrMathItalicXi, \glsxtrUpOmicron, \glsxtrMathItalicOmicron, \glsxtrUpPi, \glsxtrMathItalicPi, \glsxtrUpRho, \glsxtrMathItalicRho, \glsxtrUpSigma, \glsxtrMathItalicSigma, \glsxtrUpTau, \glsxtrMathItalicTau, \glsxtrUpUpsilon, \glsxtrMathItalicUpsilon, \glsxtrUpPhi, \glsxtrMathItalicPhi, \glsxtrUpChi, \glsxtrMathItalicChi, \glsxtrUpPsi, \glsxtrMathItalicPsi, \glsxtrUpOmega, and \glsxtrMathItalicOmega.

    +Additionally, there are commands for math italic partial differential ∂ (0x1D715) \glsxtrMathItalicPartial and nabla 𝛻 (0x1D6FB) \glsxtrMathItalicNabla.

    + +

    + +
    +

    11.5.3. Commands Used Within Resource Files

    +

    +A glstex file will typically start with \glsnoexpandfields, since supporting field expansion is only necessary where entry definitions may be programmatically performed within a loop or some other command. (This may be suppressed.)

    +If you use the set-widest resource option, bib2gls v1.8+ will write the following command in the glstex file:

    +\glsxtrSetWidest{type}{level}
    + This sets the widest name for the given glossary type and hierarchical level. This supports both the alttree style and the styles provided by glossary-longextra, which need to know the widest name.

    +If bib2gls can’t determine the widest name (typically because the name field consists of commands that aren’t recognised by the interpreter) then bib2gls v1.8+ will write the following to the glstex file:

    +\glsxtrSetWidestFallback{type}{level}
    +{max depth}{list} Currently the maximum hierarchical depth max depth may only be 0 or 2. This command requires commands provided by the glossaries-extra-stylemods package with the alttree style enabled. In this case, it may be simpler to just use \glssetwidest.

    +The glstex files may also contain instances of \glsxtrprovidestoragekey to provide new glossary entry keys or \provideignoredglossary to provide glossaries to ensure they are defined.

    +The \bibgls… commands provided by bib2gls are defined in the glstex files with \providecommand. See the bib2gls manual for further details of those commands.

    + +

    + +
    +

    11.5.4. Hierarchy

    +

    +The parent key identifies a parent entry (by its label), so determining if an entry has a parent can easily be achieved by testing if the parent field has been set (using \ifglshasparent or a command like \glsxtrifhasfield).

    +The other way around, testing if an entry has any children, is much harder. The base glossaries package provides \ifglshaschildren, which is very inefficient as it has to iterate over all entries in the entry’s glossary to determine which ones have a matching parent field.

    +It’s much easier with bib2gls, as there are resource options available to save this information. The save-child-count option saves the child count for each entry in the childcount internal field. This total only includes the child entries that have been selected by the resource set.

    +

    +\GlsXtrIfHasNonZeroChildCount{entry-label}{true}{false}modifier: *
    + A shortcut that uses \GlsXtrIfFieldNonZero to test if the value supplied in the childcount field is non-zero. The starred form uses the starred form of \GlsXtrIfFieldNonZero.

    + +

    + +
    +

    11.5.5. Supplemental Locations

    +

    +Locations in external documents can be manually added by explicitly setting thevalue when an entry is indexed. However, this is a bit inconvenient so bib2gls provides a way to do this automatically. Both the main document and the supplemental document need to use the record option, and the entries provided via src in the main document must have the same labels as those in the supplementary document. The supplemental document is identified by the supplemental-locations resource option. See the bib2gls manual for further details.

    +

    +\glsxtrdisplaysupploc{prefix}{counter}{format}{src}{location}modifier: *
    + This is used by bib2gls version v1.7+ for supplemental locations, instead of using \glsxtrsupphypernumber with the externallocation attribute. This command sets up the location counter and prefix (used in the formation of hyperlinks) and then uses:
    +\glsxtrmultisupplocation{src}{location}{format}modifier: *
    + to format the actual location (with an external hyperlink, if supported). The format (the original location encap) is ignored by default.

    + +

    + +
    +

    11.5.6. Nameref Records

    +

    +Nameref records include the current title and hypertarget. These records are enabled with record=nameref and provide a more reliable way of saving the location hypertarget, which can’t be obtained with makeindex or xindy.

    +This option is best used with counter=chapter or counter=section if you want the title included in the location list. If the indexing counter is the default page, only the location number is shown. Similarly for counter=equation (or equations=true).

    +Normally locations are recorded in the aux file in the form:

    +\glsxtr@record{entry-label}{h-prefix}{counter}{encap}{location}
    + This is similar to the command used with \makenoidxglossaries and provides the same information about the location and how to form the hypertarget as is passed to makeindex and xindy. The record=nameref option, which requires at least bib2gls v1.8, instead uses:
    +\glsxtr@record@nameref{entry-label}{h-prefix}{counter}{encap}{location}{current title}{current anchor}{the-h-counter}
    + where title is obtained from \@currentlabelname and href is obtained from \@currentHref. These commands require hyperref. If they are undefined, title and href will be left empty and bib2gls will treat it as a regular record.

    +

    +Be careful with this option as href will globally change on every instance of \refstepcounter but title won’t necessarily change. It can therefore cause unexpected behaviour.
    +

    +The final argument hcounter is obtained from \theHcounter which provides the partial target name associated with the location counter. With the original makeindex/xindy approach, it’s not possible to include this information in the location, so the base glossaries package attempts to derive a prefix from which the hcounter value can be reconstituted by appending the prefix. Unfortunately, not all definitions of \theHcounter are in the form prefix\thecounter (most notably the equation counter with chapters) so this can fail.

    +Since bib2gls is customized specifically for use with glossaries-extra, it’s now possible to save hcounter, so the recordnameref option does this. By providing both href and hcounter, you can determine which target you would rather use. The default is to use hcounter, which will take you to the place where the corresponding counter was incremented with \refstepcounter. However, you may choose to switch to using the href target, which will take you to the nearest target before the indexing took place.

    +With bib2gls v1.8+, normal locations are displayed using:

    +\glsnoidxdisplayloc{prefix}{counter}{format}{location}
    + This is provided by the base glossaries package and is simply defined to do:
    \setentrycounter[prefix]{counter}\csuse{format}{location}
    +
    Earlier versions of bib2gls only used this in the loclist field and explicitly used \setentrycounter in the location field followed by \format{location}, which follows the code that’s created with the default makeindex setting. The \setentrycounter command sets up the prefix needed for \glshypernumber to reform the target name from the given location.

    +The locations identified by \glsxtr@record@nameref are written by bib2gls to the location list using:

    +\glsxtrdisplaylocnameref{prefix}{counter}{format}{location}{title}{href}{hcounter}{file}
    + With normal internal locations, file will always be empty. With supplemental locations, file will be the external file reference. If hyperref hasn’t been loaded, this command behaves like \glsnoidxdisplayloc, so it will simply encapsulate the location with the given formatting command.

    +If hyperref has been loaded, then \glsxtrdisplaylocnameref will try to work out the appropriate hyperlink anchor and text. The prefix argument is redundant. It first defines the following commands:

    +\glsxtrrecentanchor
    + This expands to the href argument, which corresponds to the \@currentHref value at the time the location was recorded. If this is used as the anchor, the link will go to the most recent anchor before the record was created. This is more likely to match the given title, but won’t necessarily match the corresponding counter.

    +For example, if the record was created with counter=section but occurred in a table caption, then \glsxtrrecentanchor and the title will correspond to the table caption. If you have defined \glsxtrsectionlocfmt to show the section number (see below), then this may cause some confusion if clicking on the section number leads to a table caption. However, it will lead to the closest location to where the record was created, which may be preferred.

    +

    +\glsxtrlocationanchor
    + This expands to the anchor that corresponds to the record’s location counter, which is constructed from the counter and hcounter arguments.

    +In the above example with the section counter, hcounter will be the value of \theHsection when the record was created, so the constructed anchor will be section.hcounter which corresponds to the anchor at the start of the section. However, if you haven’t defined \glsxtrsectionlocfmt, then the title will correspond to the table caption, which may be a little confusing.

    +The actual anchor used is obtained from the expansion of:

    +\glsxtractualanchor
    + This is initialised to the value of \glsxtrlocationanchor but may be changed by:
    +\glsxtrsetactualanchor{counter}
    + The argument is the counter name, which may be used to set choose an alternative anchor depending on the counter. This command does nothing by default, which means that \glsxtrlocationanchor will be used.

    +For example, to switch to \glsxtrrecentanchor if the counter is page:

    \renewcommand{\glsxtrsetactualanchor}[1]{% 
    +  \ifstrequal{#1}{page}
    +  \let\glsxtractualanchor\glsxtrrecentanchor  }
    +

    +

    +If you are using indexcounter then the recent anchor will be the one created by the wrglossary increment just before the indexing occurs. This means that with counter=wrglossary, the location anchor and recent anchor will be the same. With other counters, the recent anchor will be the closest anchor to the place where indexing occurred.
    +

    +To allow for different formatting according to the counter name, \glsxtrdisplaylocnameref first checks for the existence of:

    +\glsxtrcounterlocfmt{location}{title}

    +

    +
    + If this command is defined, the location will be displayed using:
    \glsxtrnamereflink{format}\glsxtrcounterlocfmt{location}{title}{href}{file}
    +
    Note the above warning about the possible mismatch of the title with the anchor. For example, if the following is defined for the section counter:
    \newcommand{\glsxtrsectionlocfmt}[2]{\S#1 (#2)}
    +
    then this could lead to the section number followed by the table caption. A more compact form that omits the title is better:
    \newcommand{\glsxtrsectionlocfmt}[2]{\S#1}
    +

    +The following location formats are predefined. The equation counter:

    +\glsxtrequationlocfmt{location}{title}
    + This simply expands to (location) since equations typically don’t have a title, but are usually enclosed in parentheses.

    +

    +\glsxtrwrglossarylocfmt{location}{title}
    + This is used when the indexcounter option creates records with the wrglossary counter. This ensures that the page name is shown rather than the value of the wrglossary counter.

    +If the corresponding \glsxtrcounterlocfmt hasn’t been defined, \glsxtrdisplaylocnameref will do one of the following: +

      +
    • if title is empty or the counter is page, \glsxtrnamereflink with the title set to the location;

      +

    • otherwise it will do:
      +\glsxtrtitlednamereflink{format}{location}{title}{file}
      + which uses \glsxtrnamereflink with the given title and \glsxtrrecentanchor as the anchor. This has a better chance of matching the title with the anchor, but it’s not guaranteed as some anchors are created without a title. This is defined as:
      \newcommand{\glsxtrtitlednamereflink}[4]{% 
      + \glsxtrnamereflink{#1}{#2}{\glsxtrrecentanchor}{#4}% 
       }
      -
      -

      Note that the category labels in the second file match the entry labels in the first -file. -

      The simplest way of creating a hierarchical glossary from this data is to input -both files and copy the category field to the parent field: - - - -

      -
      -\GlsXtrLoadResources[src={topictitles,topics},
      - replicate-fields={category=parent}]
      -
      -

      The glossary can then simply be displayed with: - - - -

      -
      -\printunsrtglossary[style=indexgroup]
      -
      -

      This will now be ordered: animal (followed by animal child entries), mineral -(followed by mineral child entries), vegetable (followed by vegetable child -entries). -

      Suppose (for some strange reason) that I now need the ordering to be vegetable, -mineral, animal (that is, reverse alphabetical) but the child entries still need to be in -the normal alphabetical order. -

      It’s not possible to use different sort methods for different hierarchical levels with -bib2gls, but it is possible to simulate it. -

      Instead of making the entries within topics.bib children of the entries defined -in topictitles.bib, I’m now going to create separate glossaries for each -type: - - - -

      -
      -\newignoredglossary*{animal}
      -\newignoredglossary*{mineral}
      -\newignoredglossary*{vegetable}
      -
      -

      The entries in topictitles.bib go in the default main glossary and are sorted in -reverse: - - - -

      -
      -\GlsXtrLoadResources[src=topictitles,type=main,selection=all,
      - sort=en-GB-reverse]
      -
      -

      Note that I’ve selected all entries in this example. It becomes more complicated with -the default selection criteria. (See the sample-nested.tex example provided with -bib2gls v2.3+.) -

      Now the entries in topics.bib are selected but the type field is set to the category -field: - - - -

      -
      -\GlsXtrLoadResources[src=topics,type={same as category},selection=all,
      - sort=en-GB]
      -
      -

      The aim here is to use \printunsrtglossary to list all the entries in the main -glossary (that is, all the topic titles) and use a handler that tests if there is a glossary -that has the same label as the current entry label. If one exists, it’s then listed using -\printunsrtinnerglossary with the level offset shifted to give a hierarchical -appearance: - - - -

      -
      -\newcommand{\nestedhandler}[1]{%
      -  \glsxtrunsrtdo{#1}%
      -  \ifglossaryexists*{#1}%
      -  {%
      -    \printunsrtinnerglossary[type={#1},leveloffset=++1]{}{}%
      -  }%
      -  {}%
      +
      This shows the formatted title with the recent anchor. The location isn’t shown. If you would prefer to just show the location and use the anchor corresponding to the location counter:
      \renewcommand{\glsxtrtitlednamereflink}[4]{% 
      + \glsxtrnamereflink{#1}{#2}{\glsxtrlocationanchor}{#3}% 
       }
      -\printunsrtglossary*[type=main,style=index]{%
      -  \let\printunsrtglossaryhandler\nestedhandler
      +
      +
    +

    +If file is empty an internal link is created with:

    +\glsxtrfmtinternalnameref{target}{format}{file}
    + otherwise an external link is created with:
    +\glsxtrfmtexternalnameref{target}{format}{title}{file}
    + The file argument is set by bib2gls for supplemental locations (obtained from supplemental-locations).

    +The link is encapsulated with the text-block command whose name is given by format, but \glshypernumber is first locally redefined to \@firstofone to prevent a conflict with the usual location hyperlink formation. This means that if the format is \hyperbf then it will simply behave like \textbf.

    +The following command is provided but not used by default:

    +\glsxtrnameloclink{prefix}{counter}{format}{location}{text}{file}
    + This creates a hyperlink to the target in the given external file obtained from the prefix, counter and location but uses text as the hyperlink text. As with regular indexing, this will fail if the target name can’t be formed by prefixing the location value.

    +For compactness, bib2gls merges normal records if the prefix, counter and location all match. (An order of precedence can be provided for format conflicts.) With nameref records, you can use the --merge-nameref-on switch provided by bib2gls v1.8+ to determine how to merge nameref records. This switch must be followed by one of the following keywords: hcounter (merge on hcounter, default) href (merge on href), title (merge on title) and location (merge on location, as regular records). In all cases, the counter must also match.

    + +

    + +
    +

    11.5.7. Dual Entry Commands

    +

    +Dual entries can be defined with entry types like @dualentry or @dualindexabbreviation. A single entry definition within the bib file creates two dependent entries that may be referenced within the document and assigned to different glossaries. The default selection={recorded and deps} will ensure that dependent entries are selected, even if they don’t have any records. For example, the following bib entry:

    @dualindexsymbol{L,
    +  name={Lagrangian function},
    +  symbol={\ensuremath{L}},
    +  description={a function of generalized co-ordinates}
     }
    -
    -

    -

    I’ve used \newignoredglossary* as I don’t need to specify a title for any of those -glossaries nor do I need to use those glossaries with \printunsrtglossaries. With -bib2gls v2.3+, I can omit the three \newignoredglossary* lines and use the ---provide-glossaries switch which will make bib2gls automatically provide -any unknown glossaries (with \provideignoredglossary) in the .glstex -file. -

    -

    -

    Top

    11.4 Standalone Entry Items

    -

    It may be that you don’t want a list but would rather display entry details -throughout the document. You can simply do \glsentryname followed by -\glsentrydesc. (Remember that if you don’t want a sorted list, use sort=none to -skip the construction of the sort field.) For example, in the preamble provide a -custom command: - - - -

    -
    -\newcommand{\displayterm}[1]{%
    - \par\medskip\par\noindent
    - Definition: \glsentryname{#1}.\par
    - \glsentrydesc{#1}
    - \par\medskip
    +
    is essentially like:
    @index{L,
    +  name={Lagrangian function},
    +  symbol={\ensuremath{L}},
    +  description={a function of generalized co-ordinates}
     }
    -
    -

    define your entries - - - -

    -
    -\newglossaryentry{function}{name={function},
    -  description={a relation or expression involving variables}
    +@symbol{dual.L,
    +  name={\ensuremath{L}},
    +  symbol={Lagrangian function},
    +  description={a function of generalized co-ordinates}
     }
    -
    -

    and then later in the text: - - - -

    -
    -\displayterm{function}
    -
    -

    -

    However, if may be that you want to use hyperref and have commands like \gls -link back to the place where the term is described. Instead of using \glsentryname -use -


    \glsxtrglossentry{label}

    -

    -where ⟨label⟩ is the entry’s label. -

    This is designed to behave much like the way the name is displayed in the -glossary. It performs the following:

    -
      -
    • Defines \glscurrententrylabel to the entry’s label. This is usually - done at the start of the glossary style commands \glossentry and - \subglossentry and may be used by hooks, such as the post-name - hooks. Here the definition is localised so that it’s only available for use in - \glossentryname. -
    • -
    • Defines \currentglossary to the entry’s glossary type. This is usually done at - the start of commands like \printglossary and may be used by style hooks. - Here the definition is localised so that it’s only available for use in - \glsentryitem and \glssubentryitem. The value is obtained by fully - expanding: -


      \GlsXtrStandaloneGlossaryType

      -

      - which defaults to the value of the type field for the current entry. -

    • -
    • Increments and display the entry counters if the entrycounter or subentrycounter - package options are set. If the entry doesn’t have a parent, then this - does -
        -
      • \glsentryitem{label}
      -

      otherwise it does (as from v1.31)

      -
        -
      • \GlsXtrStandaloneSubEntryItem - {label} which defaults to \glssubentryitem{label} if the entry has - a parent but not a grandparent.
      - - - -

      This reflects the behaviour of the predefined hierarchical styles. A bug in - pre-version 1.31 used \glsentryitem for all child levels, which doesn’t match - the hierarchical glossary styles. If you want to restore this behaviour, just - do: - - - -

      -
      -     \renewcommand*{\GlsXtrStandaloneSubEntryItem}[1]{\glssubentryitem{#1}}
      -
      -

      -

    • -
    • Sets the hyper-target if supported (using \glstarget) and displays the entry - name using: -


      \GlsXtrStandaloneEntryName{label}

      -

      - which uses \glstarget{label}{\glossentryname{label}} by default. - Remember that \glossentryname uses \glsnamefont or picks up the style - from category attributes such as glossnamefont.

    -

    If you have used \nopostdesc or \glsxtrnopostpunc in any of your description fields, -you can use -


    \glsxtractivatenopost

    -

    -to make these commands behave as they normally do within a glossary. This needs to -be placed before

    -
    -\glossentrydesc{label}\glspostdescription -
    -
    and scoped. Note that \glsnonextpages and \glsnextpages have no effect outside -of the glossary and are not intended for use in a standalone context. -

    It’s also possible to select a different field (rather than using name): -


    \glsxtrglossentryother{header}{label}{field}

    -

    -The ⟨field⟩ must be given using its internal field label which may not be the same as -the key used to set the field. See the key to field mappings table in the glossaries user -manual. The ⟨header⟩ argument is the code to pass to the third argument of -\glsxtrtitleorpdforheading. It may be left empty in which case the default is -determined as follows:

    -
      -
    • If \glsxtrheadfield⟩ is defined, then ⟨header⟩ is \glsxtrheadfield⟩ - {label}. -
    • -
    • Otherwise ⟨header⟩ is simply the field value.
    - - - -

    The \glsxtrglossentryother command internally uses -


    \GlsXtrStandaloneEntryOther{label}{field}

    -

    -instead of \GlsXtrStandaloneEntryName, which uses \glossentrynameother{label} -{field} instead of \glossentryname{label}. -

    If you have loaded the glossaries-accsupp package (through the accsupp option) -then accessibility support will be provided if there’s a corresponding command -

    -
    -\glsfieldaccessdisplay{text}{label} -
    -
    (for example, \glssymbolaccessdisplay). -

    This means that my custom command can be changed to: - - - -

    -
    -\newcommand{\displayterm}[1]{%
    - \par\medskip\par\noindent
    - Definition: \glsxtrglossentry{#1}.\par
    - \glsentrydesc{#1}
    - \par\medskip
    +
    but additionally the two entries (the primary L and the dual dual.L) are dependent. The following document only references the primary entry, but the dependency ensures that that the dual is also selected:
    \usepackage[record,symbols,nostyles,
    + stylemods={tree,bookindex}]{glossaries-extra}
    +\GlsXtrLoadResources[src=entries,dual-type=symbols]
    +\glsdefpostlink{index}{\glsxtrpostlinkAddDescOnFirstUse}
    +\glsdefpostname{index}{%
    + \ifglshassymbol{\glscurrententrylabel}
    + { (\glsentrysymbol{\glscurrententrylabel})}{}}
    +\begin{document}
    +Primary: \gls{L}.
    +\printunsrtglossary[type=symbols,style=tree]
    +\printunsrtglossary[title=Index,style=bookindex]
    +\end{document}
    +
    The dependency ensures that the dual entry dual.L is selected, and the dual-type setting adds the dual entry to the symbols glossary (which was defined with the symbols package option).

    +It may be useful to have a hyperlink from the entry in one glossary to its dependent in the other glossary. This can be achieved by instructing bib2gls to save the label of the entry’s opposite using dual-field. The value of this resource option indicates the field in which to save the label. If omitted, dual is assumed.

    +The glossary style can then be adapted to check if the field has been set and, if so, to create a hyperlink. The following command is provided to assist with this:

    +\GlsXtrDualBackLink{text}{entry-label}
    + This is defined as:
    \newcommand*{\GlsXtrDualBackLink}[2]{%
    +  \glsxtrifhasfield{\GlsXtrDualField}{#2}%
    +  {\glshyperlink[#1]{\glscurrentfieldvalue}}%
    +  {#1}%
     }
    -
    -

    If I want numbered definitions, then I can use the package options entrycounter or -subentrycounter and remove the colon: - - - -

    -
    -\newcommand{\displayterm}[1]{%
    - \par\medskip\par\noindent
    - Definition \glsxtrglossentry{#1}.\par
    - \glsentrydesc{#1}
    - \par\medskip
    +
    This obtains the field from:
    +\GlsXtrDualFieldinitial: dual
    + This expands to dual, which is the default for dual-field if no value is supplied.

    +The above example can be adapted as follows:

    \usepackage[colorlinks]{hyperref}
    +\usepackage[record,symbols,nostyles,stylemods={tree,bookindex}]{glossaries-extra}
    +\GlsXtrLoadResources[src=entries, dual-type=symbols,dual-field]
    +\glsdefpostlink{index}{\glsxtrpostlinkAddSymbolOnFirstUse}
    +\glsdefpostname{index}{%
    + \ifglshassymbol{\glscurrententrylabel}
    + { (\GlsXtrDualBackLink{\glsentrysymbol{\glscurrententrylabel}}{\glscurrententrylabel})}{}}
    +\begin{document}
    +Primary: \gls{L}.
    +\printunsrtglossary[type=symbols,style=tree]
    +\printunsrtglossary[title=Index,style=bookindex]
    +\end{document}
    +
    +Example 158: Using bib2gls: dual backlinks 📥🖹 📥🖺

    +Example document that has backlinks in the glossaries between the primary and dual entries.

    + This checks if the symbol key has been set in both the category post-link hook and the category post-name hook to append the symbol in parentheses. In addition, the category post-name hook adds a link to the corresponding dual entry.

    +If you prefer instead to have the backlink on the name in both glossaries, then this can more easily be achieved with a resource option such as dual-backlink.

    +The commands described below were designed for use with bib2gls’s dual entries, but may also be used in other contexts where a label may potentially have a number of possible prefixes.

    +It’s possible to use commands like \glsxtrnewgls to create \gls-like commands that automatically insert a label prefix (such as dual. for dual entries). The commands described in this section provide a similar set of \gls-like commands that iterate over a set of possible prefixes until a match is found.

    +Each possible prefix (which may be empty) is identified by:

    +\glsxtraddlabelprefix{label-prefix}
    +{prefix} These should be listed in order of precedence.

    +You can prepend a prefix to the list using:

    +\glsxtrprependlabelprefix{label-prefix}
    + which gives it the highest order of precedence.

    +The list of known prefixes can be (locally) cleared with:

    +\glsxtrclearlabelprefixes
    +

    +You can test if a prefix is already in the list with:

    +\glsxtrifinlabelprefixlist{label-prefix}{true}{false}
    + This does true if the given prefix has been added to the list. No expansion is performed on label-prefix.

    +In the event that there’s no match for any of the prefixes (which will occur on the first LaTeX run before the glstex file has been created), the fallback is determined by the conditional:

    +\ifGlsXtrPrefixLabelFallbackLast true\else false\fiinitial: \iftrue
    + If true, this will fallback on the last prefix, otherwise it will fallback on the first. This conditional can be set to true with:
    +\GlsXtrPrefixLabelFallbackLasttrue
    + and to false with:
    +\GlsXtrPrefixLabelFallbackLastfalse
    + The default is true.

    +

    +As from v1.49, all possible matches will be recorded using a special syntax if none are found. This ensures there will be at least one match on the first run. However, note that this requires bib2gls v3.0+.
    +

    +In general it’s best to avoid adding multiple instances of the same prefix, so you can check with this command before adding a prefix to the list. However, it can be useful to repeat a prefix at the start or end of the list so that it can be used as a fallback for entries that haven’t yet been defined.

    +With the list of possible prefixes set up (including an empty prefix if necessary), you can use:

    +\dgls[options]{entry-label}[insert]modifiers: * + alt-mod
    + which behaves like
    \gls[options]{prefix{entry-label}}[insert]
    +
    where prefix is the first prefix in the list such that prefixlabel matches a defined entry. This requires bib2gls v3.0+ to work properly on the first LaTeX run (when no entries are defined).

    +There are also analogous commands for the plural and case-changing versions:

    +\dglspl[options]{entry-label}[insert]modifiers: * + alt-mod
    + (uses \glspl),
    +\dGls[options]{entry-label}[insert]modifiers: * + alt-mod
    + (uses \Gls),
    +\dGlspl[options]{entry-label}[insert]modifiers: * + alt-mod
    + (uses \Glspl),
    +\dGLS[options]{entry-label}[insert]modifiers: * + alt-mod
    + (uses \GLS),
    +\dGLSpl[options]{entry-label}[insert]modifiers: * + alt-mod
    + (uses \GLSpl),
    +\dglslink[options]{entry-label}{text}modifiers: * + alt-mod
    + (uses \glslink),
    +\dGlslink[options]{entry-label}{text}modifiers: * + alt-mod
    + (uses \Glslink),
    +\dglsdisp[options]{entry-label}{text}modifiers: * + alt-mod
    + (uses \glsdisp) and
    +\dGlsdisp[options]{entry-label}{text}modifiers: * + alt-mod
    + (uses \Glsdisp).

    +If you want to use a specific field you can instead use:

    +\dglsfield[options]{entry-label}{field-label}{text}modifiers: * + alt-mod
    + This will find the first match that has the given field set (that is, the field value has been defined and is not empty or \relax). The field should be identified by its internal field label. There are also case-changing versions:
    +\dGlsfield[options]{entry-label}{field-label}{text}modifiers: * + alt-mod
    + which applies a sentence case change and
    +\dGLSfield[options]{entry-label}{field-label}{text}modifiers: * + alt-mod
    + which applies all caps. Note that at least one of the potential labels must have the given field set in order for the reference to be correctly resolved. For example:
    \dglsfield{pi}{symbol}
    +
    If you find this a bit long-winded to type and you want to provide a shorter command that recognises the modifiers, then you can use:
    +\newdglsfield[default-options]{field}{cs}
    + For example:
    \newdglsfield{symbol}{\sym}
    +\sym{pi}
    +
    If you also want sentence case and all caps versions use:
    +\newdglsfieldlike[default-options]{field}{cs}{Cs}{CS}
    + where cs is the command without a case-change (which will use \dglsfield), Cs is the sentence case command (which will use \dGlsfield) and CS is the all caps command (which will use \dGLSfield). This will also use \glsmfuaddmap and \glsmfublocker to establish the sentence case mapping from cs to Cs and block the case change for CS.

    +

    +No expansion is performed on default-options or field while the new commands are being defined.
    +

    +This family of \dglsfield commands all define:

    +\dglsfieldcurrentfieldlabel
    + This expands to the given field label.

    +If the requested field isn’t set (according to \ifcsvoid) then the fallback field will be tried instead.

    +\dglsfieldfallbackfieldlabelinitial: text
    + This expands to the fallback field, which defaults to the text field.

    +If you need to know whether the requested field or the fallback field was used, the following will be set to the actual field used.

    +\dglsfieldactualfieldlabel
    +

    +For example, suppose the file entries.bib contains:

    @index{duck}
    +@dualindexabbreviation{svm,
    +  short={SVM},
    +  long={support vector machine}
     }
    -
    -

    The counter label uses a dot after the number by default but this can be changed to -a colon: - - - -

    -
    -\renewcommand*{\glsentrycounterlabel}{\theglossaryentry:\space}
    -
    -

    It’s now possible to not only use \gls to link back to the definition but also use -\glsrefentry to reference the counter and \glsxtrpageref to reference the page -number. -

    If I want the description to behave more like it does in a glossary in need to make -the following modification: - - - -

    -
    -\newcommand{\displayterm}[1]{%
    - \par\medskip\par\noindent
    - Definition \glsxtrglossentry{#1}.\par
    - \begingroup
    -  \glsxtractivatenopost
    -  \glossentrydesc{#1}\glspostdescription
    - \endgroup
    - \par\medskip
    +@dualindexsymbol{pi,
    +  symbol={\ensuremath{\pi}},
    +  description=ratio of a circle's circumference to its diameter
     }
    -
    -

    (Note the grouping to localise \glsxtractivatenopost.) -

    You can also use \glsxtrglossentry within section headings. For example: - - - -

    -
    -\section{\glsxtrglossentry{function}}
    -
    -

    This will use \glsentryname in PDF bookmarks (if \texorpdfstring is defined) -and will use \glsxtrheadname in page headers and table of contents. (If you’re using -a page style or table of contents that doesn’t use \markright or \markbook or -\@starttoc then you need to insert \glsxtrmarkhook and \@glsxtrinmark at the -start of the header or table of contents either scoped or afterwards cancelled with -\@glsxtrnotinmark and \glsxtrrestoremarkhook.) -

    -

    -

    Top

    11.5 Entry Aliases

    -

    An entry can be made an alias of another entry using the 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 -bib2gls.) -

    If an entry ⟨entry-1⟩ is made an alias of ⟨entry-2⟩ then:

    -
      -
    • If the see field wasn’t provided when ⟨entry-1⟩ was defined, the alias key will - automatically trigger
      -
      - \glssee{entry-1}{entry-2} -
      -
      -
    • -
    • If the hyperref package has been loaded then \gls{entry-1} will link to - ⟨entry-2⟩’s target. (Unless the targeturl attribute has been set for ⟨entry-1⟩’s - category.) -
    • -
    • With record=off or record=hybrid, the noindex setting will automatically - be triggered when referencing ⟨entry-1⟩ with commands like \gls or - \glstext. This prevents ⟨entry-1⟩ from have a location list (aside from - the cross-reference added with \glssee) unless it’s been explicitly - indexed with \glsadd or if the indexing has been explicitly set using - noindex=false. - - - -

      Note that with record=only, the location list for aliased entries is controlled - with bib2gls’s settings.

    -

    The index suppression trigger is performed by -


    \glsxtrsetaliasnoindex

    -

    -This is performed after the default options provided by \GlsXtrSetDefaultGlsOpts -have been set. With record=only, \glsxtrsetaliasnoindex will default to do -nothing. -

    Within the definition of \glsxtrsetaliasnoindex you can use -


    \glsxtrindexaliased

    -

    -to index ⟨entry-2⟩. -

    The index suppression command can be redefined to index the main term instead. -For example: - - - -

    -
    -\renewcommand{\glsxtrsetaliasnoindex}{%
    - \glsxtrindexaliased
    - \setkeys{glslink}{noindex}%
    +
    and suppose the document code is:
    \documentclass{article}
    +\usepackage{hyperref}
    +\usepackage[record,abbreviations,symbols]{glossaries-extra}
    +
    +\newcommand{\bibglsnewdualindexsymbolsecondary}[5]{%
    + \longnewglossaryentry*{#1}{name={#3},category={symbol},
    +   type={symbols},symbol={#4},#2}{#5}%
     }
    -
    -

    -

    The value of the alias field can be accessed using -


    \glsxtralias{label}

    -

    - - - -

    -

    -

    Top

    12. On-the-Fly Document Definitions

    -

    The commands described here may superficially look like ⟨word\index{word}, -but they behave rather differently. If you want to use \index then just use \index. -
    -

    -

    The glossaries package advises against defining entries in the document -environment. As mentioned in §1.2 New or Modified Package Options -above, this ability is disabled by default with glossaries-extra but can be enabled using -the docdefs package options. -

    Although this can be problematic, the glossaries-extra package provides a way of -defining and using entries within the document environment without the tricks used -with the docdefs option. 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: -


    \GlsXtrEnableOnTheFly

    -

    -When used, this defines the commands described below. -

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

    -


    \glsxtr[gls-options][dfn-options]{label}

    -

    -If an entry with the label ⟨label⟩ has already been defined, this just does \gls -[gls-options]{label}. If ⟨label⟩ hasn’t been defined, this will define the entry using: -

    -
    -\newglossaryentry{label}{name={label}, -
     category=\glsxtrcat, -
     description={\nopostdesc}, -
     dfn-options} -
    -
    -

    The ⟨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 ⟨label⟩ and placed in the name key must be provided in the optional -argument ⟨dfn-options⟩.
    -

    - - - -

    The second optional argument ⟨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 -


    \GlsXtrWarning{dfn-options}{label}

    -

    -

    For example, this warning will be generated on the second instance of \glsxtr -below: - - - -

    -
    -\glsxtr[][plural=geese]{goose}
    - ... later
    -\glsxtr[][plural=geese]{goose}
    -
    -

    -

    If you are considering doing something like: - - - -

    -
    -\newcommand*{\goose}{\glsxtr[][plural=geese]{goose}}
    -\renewcommand*{\GlsXtrWarning}[2]{}
    - ... later
    -\goose\ some more text here
    -
    -

    then don’t bother. It’s simpler and less problematic to just define the entries in the -preamble with \newglossaryentry and then use \gls in the document. -

    There are plural and case-changing alternatives to \glsxtr: -


    \glsxtrpl[gls-options][dfn-options]{label}

    -

    -This is like \glsxtr but uses \glspl instead of \gls. -


    \Glsxtr[gls-options][dfn-options]{label}

    -

    -This is like \glsxtr but uses \Gls instead of \gls. -


    \Glsxtrpl[gls-options][dfn-options]{label}

    -

    -This is like \glsxtr but uses \Glspl instead of \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 XƎLATEX or LuaLATEX instead of -LaTeX (or pdfLATEX). If you really desperately want to use UTF-8 entry labels -without switching to XƎLATEX or LuaLATEX then there is a starred version of -\GlsXtrEnableOnTheFly that allows you to use UTF-8 characters in ⟨label⟩, but it’s -experimental and may not work in some cases. -

    If you use the starred version of \GlsXtrEnableOnTheFly don’t use any -commands in the ⟨label⟩, even if they expand to just text.
    -

    - - - -

    -

    -

    Top

    13. Supplemental Packages

    -

    The glossaries bundle provides additional support packages glossaries-prefix (for -prefixing) and glossaries-accsupp (for accessibility support). These packages aren’t -automatically loaded. -

    -

    Top

    13.1 Prefixes or Determiners

    -

    If prefixing is required, you can simply load glossaries-prefix after glossaries-extra. For -example: - - - -

    -
    -\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}
    -
    -

    -

    -

    -

    Top

    13.2 Accessibility Support

    -

    The glossaries-accsupp package is still experimental and so accessibility features are -liable to change.
    -

    -

    The glossaries-accsupp package needs to be loaded before glossaries-extra or through -the accsupp package option: - - - -

    -
    -\usepackage[accsupp]{glossaries-extra}
    -
    -

    If you don’t load glossaries-accsupp or you load glossaries-accsupp after glossaries-extra -the new \glsaccessxxx⟩ commands described below will simply be equivalent to the -corresponding \glsentryxxx⟩ commands. Other accessibility features, such as the -attributes used by \newabbreviation also won’t work if glossaries-accsupp is loaded -too late. -

    The following \glsaccessxxx⟩ commands add accessibility information wrapped -around the corresponding \glsentryxxx⟩ commands. There is no check for existence -of the entry nor do any of these commands add formatting, hyperlinks or indexing -information. -


    \glsaccessname{label}

    -

    -This displays the value of the name field for the entry identified by ⟨label⟩. -

    If the glossaries-accsupp package isn’t loaded, this is simply defined as: - - - -

    -
    -\newcommand*{\glsaccessname}[1]{\glsentryname{#1}}
    -
    -

    otherwise it’s defined as: - - - -

    -
    -\newcommand*{\glsaccessname}[1]{%
    -  \glsnameaccessdisplay
    -  {%
    -    \glsentryname{#1}%
    -  }%
    -  {#1}%
    +
    +\GlsXtrLoadResources[src=entries]
    +
    +\begin{document}
    +First use: \gls{duck}, \gls{svm}, \gls{pi}.
    +Next use: \gls{duck}, \gls{svm}, \gls{pi}.
    +\printunsrtglossaries
    +\end{document}
    +
    This uses the default empty primary prefix and dual. for the dual prefix, so \gls{svm} is referencing the primary entry, which is (essentially) an @index type not an abbreviation. It therefore doesn’t follow the abbreviation style, and it also hyperlinks to the index not to the list of abbreviations. Similarly for \gls{pi}, which references the primary @index entry rather than the symbol.

    +What’s really needed is:

    \gls{duck}, \gls{dual.svm}, \gls{dual.pi}.
    +
    or use label-prefix and dual-prefix to set the label prefixes:
    \GlsXtrLoadResources[src=entries,
    + label-prefix={idx.},dual-prefix={}
    +]
    +
    then only the entries without a dual need a prefix:
    \gls{idx.duck}, \gls{svm}, \gls{pi}.
    +
    Using \glsxtrnewgls or \glsxtrnewglslike (see §5.7) to define the custom \idx:
    \glsxtrnewgls{idx.}{\idx}
    +
    the entry references can be simplified to:
    \idx{duck}, \glssvm, \glspi.
    +
    but this requires remembering which terms have duals.

    +An alternative is to use \dgls instead:

    \GlsXtrLoadResources[src=entries,
    + combine-dual-locations=primary]
    +
    +\glsxtraddlabelprefix{dual.}
    +\glsxtraddlabelprefix{}
    +
    +\begin{document}
    +First use: \dgls{duck}, \dgls{svm}, \dgls{pi}.
    +Next use: \dgls{duck}, \dgls{svm}, \dgls{pi}.
    +\printunsrtglossaries
    +\end{document}
    +
    +Example 159: Using bib2gls: dual entry label prefixes 📥🖹 📥🖺

    +Example document that uses bib2gls’s dual entries with the primary and dual prefixes identified.

    +

    +On the first LaTeX call (when the glstex file doesn’t exist), neither dual.svm nor svm exists, so \dgls uses the last prefix (which is empty in this case). This means that on the first LaTeX run, \dgls{svm} behaves like \gls{svm}, which adds a record for the primary svm entry. The default primary-dual dependency means that this will cause both the primary (svm) and dual (dual.svm) entry to be selected. The location will be added to the primary entry’s location list, unless overridden by resource options, such as combine-dual-locations.

    +Once bib2gls has been run and the glstex file exists, then dual.svm exists. So \dgls{svm} will again first try dual.svm (as dual. is the first in the list of label prefixes). That now exists, so \dgls{svm} now behaves like \gls{dual.svm}, which follows the abbreviation style and hyperlinks to the list of abbreviations. Similarly for the index-symbol combination dual.pi and pi.

    +In the case of \dgls{duck}, which doesn’t have a dual, the label dual.duck never exists, so that’s never selected. However, when there’s no match, such as when the glstex file doesn’t exist, the duck entry will be recorded with both the dual. prefix and the empty prefix. This allows bib2gls to test which prefix+label combination matches.

    +

    +If you haven’t used combine-dual-locations an extra bib2gls+LaTeX run may be required to correct the location lists.
    +

    +If you change the label prefixes, remember to update the corresponding \glsxtraddlabelprefix{label-prefix}. If no prefixes have been added to the list (or if the list is cleared), just an empty prefix is assumed.

    +Note that bib2gls v1.8+ provides hooks that identify the label prefixes in the glstex file:

    \bibglstertiaryprefixlabel{label-prefix}
    +\bibglsdualprefixlabel{label-prefix}
    +\bibglsprimaryprefixlabel{label-prefix}
    +
    These do nothing by default, but they can be defined before the resource file is loaded to set up the prefix list. For example:
    \newcommand{\bibglsprimaryprefixlabel}[1]{%
    + \glsxtraddlabelprefix{#1}}
    +\newcommand{\bibglsdualprefixlabel}[1]{%
    + \glsxtrprependlabelprefix{#1}}
    +\GlsXtrLoadResources[src=entries]
    +
    Remember that this will only have an effect once the glstex file has been created. The prefix list will be empty on the first run (which is treated as a single empty prefix). If this isn’t a suitable fallback, it may be necessary to add one after all the resource commands:
    \newcommand{\bibglsprimaryprefixlabel}[1]{%
    + \glsxtraddlabelprefix{#1}}
    +\newcommand{\bibglsdualprefixlabel}[1]{%
    + \glsxtrprependlabelprefix{#1}}
    +\GlsXtrLoadResources[src=entries,label-prefix={idx.}]
    +\glsxtraddlabelprefix{idx.}
    +
    Although this rather defeats the purpose of using the hooks as you still have to keep track of the fallback prefix.

    + + + +

    +

    11.5.8. Supplementary Commands

    +

    +

    +\glsdisplaynumberlist{entry-label}
    + This command is provided by the base glossaries package, but it requires hooking into the location list formatting within the glossary to obtain the list. This information is more easily available with bib2gls, which stores the formatted location list in the location field, so glossaries-extra-bib2gls redefines this command to use that field value. Likewise for:
    +\glsentrynumberlist{entry-label}
    + which is redefined to simply do:
    \glsxtrusefield{#1}{location}
    +

    +

    +\IfTeXParserLib{TeX parser lib code}{LaTeX code}
    + This command is defined by glossaries-extra-bib2gls to expand to LaTeX code, but is defined by the TeX parser library used by bib2gls’s to expand to TeX parser lib code. May be used in the @preamble or in field values to provide bib2gls with alternative content.

    +

    +\glsxtrprovidecommand{cs}[n][default]{definition}modifier: *
    + This command is intended for use in @preamble. It’s simply defined to \providecommand in glossaries-extra-bib2gls but bib2gls’s interpreter treats it as \renewcommand. This means that you can override bib2gls’s internal definition of a command without overriding the command definition in the document (if it’s already defined before the resource file is input). For example:
    @preamble{"\glsxtrprovidecommand{\int}{integral}"}
    +
    This will force bib2gls to treat \int as the word “integral” to assist sorting but if this preamble code is written to the glstex file (as it is by default) then it won’t override the current definition (provided by the kernel or redefined by a package).

    +The helper commands in the resource files are defined using \providecommand. For many of them, if you want to provide an alternative definition then you need to define the command before the resource file is loaded. There are a few that may be redefined afterwards but if you use \renewcommand then you will get an error on the first LaTeX run when the glstex file doesn’t exist. In this case, you may prefer to use:

    +\glsrenewcommand{cs}[n][default]{definition}modifier: *
    + This behaves like \renewcommand but only generates a warning rather than an error if the command isn’t already defined so it won’t interrupt the document build.

    +

    +\GlsXtrIndexCounterLink{text}{entry-label}
    + For use with the indexcounter package option and the save-index-counter resource option. This command creates a hyperlink (if supported) to the target obtained from the indexcounter field (which will be set in the glstex file, if applicable).

    +If then indexcounter field is set for the entry given by entry-label, this command does \hyperref[wrglossary.value]{text}, where value is the value of the indexcounter field. If the field isn’t set or if \hyperref hasn’t been defined, this just does text. See the bib2gls manual (v1.4+) for further details.

    +The glossaries-extra-bib2gls package also provides definitions of the missing mathematical Greek commands: \Alpha, \Beta, \Epsilon, \Zeta, \Eta, \Iota, \Kappa, \Mu, \Nu, \Omicron, \Rho, \Tau, \Chi, \Digamma, \omicron. These are all defined with \providecommand, so they won’t override any definitions provided by any package loaded before glossaries-extra. Since bib2gls’s interpreter recognises these commands, using them instead of explicitly using the Latin characters with the same shape helps to keep the Greek symbols together when sorting. Similarly, if upgreek has been loaded, the missing upright Greek commands are also provided: \Upalpha, \Upbeta, \Upepsilon, \Upzeta, \Upeta, \Upiota, \Upkappa, \Upmu, \Upnu, \Upomicron, \Uprho, \Uptau, \Upchi, \upomicron.

    +

    + +

    + +
    +

    12. Auto-Indexing

    +

    +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: indexname and dualindex.

    +

    +The auto-indexing is designed for makeindex syntax. If you’ve used the xindy package option, the automatic escaping of xindy special characters in the sort field may result in an incorrect sort value for the \index command used by the auto-indexing. Note also that texindy has a fixed set of special characters (corresponding to makeindex’s defaults) that can’t be customized. You may want to consider using bib2gls and its dual entries as an alternative approach.
    +

    +The \glsxtrpostnamehook macro, used at the end of \glossentryname and \Glossentryname, checks the indexname attribute for the category associated with that entry. Since \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 name key.

    +The internal macro used by the glossaries package to write the information to the external glossary file is modified to check for the dualindex attribute.

    +In both cases, the indexing is done through:

    +\glsxtrdoautoindexname{entry-label}{attribute}
    + This uses the standard \index command with the sort value taken from the entry’s sort key and the actual value set to \glsentryname{entry-label}. There are user-level commands available to change the sort and actual value used by the automated index.

    +The actual value is given by:

    +\glsxtrautoindexentry{entry-label}
    + where entry-label is the entry’s label. The default definition is:
    \newcommand*{\glsxtrautoindexentry}[1]{\string\glsentryname{#1}}
    +
    Note the use of \string to prevent \glsentryname from being expanded as it’s written to the index file.

    +The sort value is assigned using:

    +\glsxtrautoindexassignsort{entry-label}
    + where entry-label is the entry label and cs is the command which needs to be set to the sort value. The default definition is:
    \newcommand*{\glsxtrautoindexassignsort}[2]{%
    +  \glsletentryfield{#1}{#2}{sort}%
     }
    -
    -

    (\glsnameaccessdisplay is defined by the glossaries-accsupp package.) The first -letter upper case version is: -


    \Glsaccessname{label}

    -

    -Without the glossaries-accsupp package this is just defined as: - - - -

    -
    -\newcommand*{\Glsaccessname}[1]{\Glsentryname{#1}}
    -
    -

    With the glossaries-accsupp package this is defined as: - - - -

    -
    -\newcommand*{\Glsaccessname}[1]{%
    -  \glsnameaccessdisplay
    -  {%
    -    \Glsentryname{#1}%
    -  }%
    -  {#1}%
    +
    After this macro is called, cs is then processed to escape any of makeindex’s special characters. Note that this escaping is only performed on the sort not on the actual value. The escaping of the sort value is performed by
    +\glsxtrautoindexesc
    + You can redefine this to do nothing if you want to omit the escaping. You may want to consider providing another field to obtain the appropriate sort value if the one provided in the sort field isn’t suitable (because it may already have had special characters escaped or it may be a numeric value in the case of sort by use or definition).

    +The command used to perform the actual indexing is:

    +\glsxtrautoindexinitial: \index
    + This just does \index{text} by default.

    +

    +The entry’s parent field isn’t referenced in this automated indexing.
    +

    +For example, to index the value of the first key, instead of the name key:

    \renewcommand*{\glsxtrautoindexentry}[1]{\string\glsentryfirst{#1}}
    +
    and if the sort value also needs to be set to the long field, if present, otherwise the sort field:
    \renewcommand*{\glsxtrautoindexassignsort}[2]{%
    +  \ifglshaslong{#2}%
    +  {\glsletentryfield{#1}{#2}{long}}%
    +  {\glsletentryfield{#1}{#2}{sort}}%
     }
    -
    -

    -

    The following commands are all defined in an analogous manner. -


    \glsaccesstext{label}

    -

    -This displays the value of the text field. -


    \Glsaccesstext{label}

    -

    -This displays the value of the text field with the first letter converted to upper -case. -


    \glsaccessplural{label}

    -

    -This displays the value of the plural field. -


    \Glsaccessplural{label}

    -

    -This displays the value of the plural field with the first letter converted to upper -case. -


    \glsaccessfirst{label}

    -

    -This displays the value of the first field. -


    \Glsaccessfirst{label}

    -

    -This displays the value of the first field with the first letter converted to upper -case. -


    \glsaccessfirstplural{label}

    -

    -This displays the value of the firstplural field. -


    \Glsaccessfirstplural{label}

    -

    -This displays the value of the firstplural field with the first letter converted to upper -case. -


    \glsaccesssymbol{label}

    -

    -This displays the value of the symbol field. -


    \Glsaccesssymbol{label}

    - - - -

    -This displays the value of the symbol field with the first letter converted to upper -case. -


    \glsaccesssymbolplural{label}

    -

    -This displays the value of the symbolplural field. -


    \Glsaccesssymbolplural{label}

    -

    -This displays the value of the symbolplural field with the first letter converted to -upper case. -


    \glsaccessdesc{label}

    -

    -This displays the value of the description field. -


    \Glsaccessdesc{label}

    -

    -This displays the value of the description field with the first letter converted to upper -case. -


    \glsaccessdescplural{label}

    -

    -This displays the value of the descriptionplural field. -


    \Glsaccessdescplural{label}

    -

    -This displays the value of the descriptionplural field with the first letter converted to -upper case. -


    \glsaccessshort{label}

    -

    -This displays the value of the short field. -


    \Glsaccessshort{label}

    -

    -This displays the value of the short field with the first letter converted to upper -case. -


    \glsaccessshortpl{label}

    -

    -This displays the value of the shortplural field. -


    \Glsaccessshortpl{label}

    -

    -This displays the value of the shortplural field with the first letter converted to upper -case. -


    \glsaccesslong{label}

    -

    -This displays the value of the long field. -


    \Glsaccesslong{label}

    -

    -This displays the value of the long field with the first letter converted to upper -case. -


    \glsaccesslongpl{label}

    - - - -

    -This displays the value of the longplural field. -


    \Glsaccesslongpl{label}

    -

    -This displays the value of the longplural field with the first letter converted to upper -case. - - - -

    -

    -

    Top

    14. Sample Files

    -

    The following sample files are provided with this package: -

    -sample.tex
    Simple sample file that uses one of the dummy files provided by - the glossaries package for testing. -
    -sample-abbr-styles.tex
    Demonstrates all predefined abbreviation styles. -
    -sample-mixture.tex
    General entries, acronyms and initialisms all treated - differently. -
    -sample-name-font
    Categories and attributes are used to customize the way - different entries appear. -
    -sample-abbrv.tex
    General abbreviations. -
    -sample-acronym.tex
    Acronyms aren’t initialisms and don’t expand on first - use. -
    -sample-acronym-desc.tex
    Acronyms that have a separate long form and - description. -
    -sample-crossref.tex
    Unused entries that have been cross-referenced - automatically are added at the end of the document. -
    -sample-indexhook.tex
    Use the index hook to track which entries have been - indexed (and therefore find out which ones haven’t been indexed). -
    -sample-footnote.tex
    Footnote abbreviation style that moves the footnote - marker outside of the hyperlink generated by \gls and moves it after - certain punctuation characters for neatness. -
    -sample-undef.tex
    Warn on undefined entries instead of generating an error. -
    -sample-mixed-abbrv-styles.tex
    Different abbreviation styles for different - entries. - - - -
    -sample-initialisms.tex
    Automatically insert dots into initialisms. -
    -sample-postdot.tex
    Another initialisms example. -
    -sample-postlink.tex
    Automatically inserting text after the link-text - produced by commands like \gls (outside of hyperlink, if present). -
    -sample-header.tex
    Using entries in section/chapter headings. -
    -sample-autoindex.tex
    Using the dualindex and indexname attributes to - automatically add glossary entries to the index (in addition to the glossary - location list). -
    -sample-autoindex-hyp.tex
    As previous but uses hyperref. -
    -sample-nested.tex
    Using \gls within the value of the name key. -
    -sample-entrycount.tex
    Enable entry-use counting (only index if used more - than n times, see §8.1 Entry Counting (First Use Flag)). -
    -sample-unitentrycount.tex
    Enable use of per-unit entry-use counting - (§8.1 Entry Counting (First Use Flag)). -
    -sample-onelink.tex
    Using the per-unit entry counting (§8.1 - Entry Counting (First Use Flag)) to only have one hyperlink per entry - per page. -
    -sample-linkcount.tex
    Using link counting (§8.2 Link Counting) - to only have one hyperlink per entry. -
    -sample-pages.tex
    Insert “page” or “pages” before the location list. -
    -sample-altmodifier.tex
    Set the default options for commands like \gls and - add an alternative modifier. -
    -sample-mixedsort.tex
    Uses the optional argument of \makeglossaries to - allow a mixture of \printglossary and \printnoidxglossary. - - - -
    -sample-external.tex
    Uses the targeturl attribute to allow for entries that - should link to an external URL rather than to an internal glossary. -
    -sample-fmt.tex
    Provides text-block commands associated with entries in - order to use \glsxtrfmt. -
    -sample-alias.tex
    Uses the alias key. (See §11.5 Entry Aliases.) -
    -sample-alttree.tex
    Uses the glossaries-extra-stylemods package with the alttree - style (see §2.11.3 The glossaries-extra-stylemods Package). -
    -sample-alttree-sym.tex
    Another alttree example that measures the symbol - widths. -
    -sample-alttree-marginpar.tex
    Another alttree example that puts the - number list in the margin. -
    -sample-onthefly.tex
    Using on-the-fly commands. Terms with accents must - have the name key explicitly set. -
    -sample-onthefly-xetex.tex
    Using on-the-fly commands with XƎLATEX. - Terms with UTF-8 characters don’t need to have the name key explicitly - set. Terms that contain commands must have the name key explicitly set - with the commands removed from the label. -
    -sample-onthefly-utf8.tex
    Tries to emulate the previous sample file for use - with LaTeX through the starred version of \GlsXtrEnableOnTheFly. - This is a bit iffy and may not always work. Terms that contain commands - must have the name key explicitly set with the commands removed from - the label. -
    -sample-accsupp.tex
    Integrate glossaries-accsupp. -
    -sample-prefix.tex
    Integrate glossaries-prefix. -
    -sample-suppl-main.tex
    Uses thevalue to reference a location in the - supplementary file sample-suppl.tex. - - - -
    -sample-suppl-main-hyp.tex
    A more complicated version to the above that - uses the hyperref package to reference a location in the supplementary file - sample-suppl-hyp.tex. -
    - - - -

    -

    Top

    15. Multi-Lingual Support

    -

    There’s only one command provided by glossaries-extra that you’re likely to want -to change in your document and that’s \abbreviationsname (§1.2 New or -Modified Package Options) if you use the abbreviations package option to -automatically create the glossary labelled abbreviations. If this command -doesn’t already exist, it will be defined to “Abbreviations” if babel hasn’t -been loaded, otherwise it will be defined as \acronymname (provided by -glossaries). -

    You can redefine it in the usual way. For example: - - - -

    -
    -\renewcommand*{\abbreviationsname}{List of Abbreviations}
    -
    -

    Or using babel or polyglossia captions hook: - - - -

    -
    -\appto\captionsenglish{%
    - \renewcommand*{\abbreviationsname}{List of Abbreviations}%
    +

    +If the value of the attribute is “true”, no encap will be added, otherwise the encap will be the attribute value. For example:

    \glssetcategoryattribute{general}{indexname}{textbf}
    +
    will set the encap to textbf which will display the relevant page number in bold whereas
    \glssetcategoryattribute{general}{dualindex}{true}
    +
    won’t apply any formatting to the page number in the index.

    +

    +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 \index to use some thing else.)
    +

    +By default the format key won’t be used with the dualindex attribute. You can allow the format key to override the attribute value by using the preamble-only command:

    +\GlsXtrEnableIndexFormatOverride

    +

    +
    + If you use this command and hyperref has been loaded, then the theindex environment will be modified to redefine \glshypernumber to allow formats that use that command.

    +

    +The dualindex attribute will still be used on subsequent use even if the indexonlyfirst attribute (or indexonlyfirst package option) is set. However, the dualindex attribute will honour the noindex key.
    +

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

    +If this isn’t the case, you can use the following preamble-only commands to set the correct characters.

    +Be very careful of possible shifting category codes!
    +

    +

    +\GlsXtrSetActualChar{character}

    +

    +
    + Set the actual character to char.

    +

    +\GlsXtrSetLevelChar{character}

    +

    +
    + Set the level character to char.

    +

    +\GlsXtrSetEscChar{character}

    +

    +
    + Set the escape (quote) character to char.

    +

    +\GlsXtrSetEncapChar{character}

    +

    +
    + Set the encap character to char.

    + + + +

    +

    13. On-the-Fly Document Definitions

    +

    +

    +The commands described here may superficially look like word\index{word}, but they behave rather differently. If you want to use \index then just use \index.
    +

    +The base glossaries package advises against defining entries in the document environment. As mentioned in §2.4, this ability is disabled by default with glossaries-extra but can be enabled using the docdef package options.

    +Although this can be problematic, the glossaries-extra package provides a way of defining and using entries within the document environment without the tricks used with the docdef option. 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:

    +\GlsXtrEnableOnTheFlymodifier: *
    + When used, this defines the commands described below. The starred version was provided to help support UTF-8 with inputenc. Recent versions of the LaTeX kernel now provide better support. Both glossaries and glossaries-extra have been updated to help integrate the new kernel features, so the unstarred version may also work with UTF-8.

    +

    +If you use the starred version of \GlsXtrEnableOnTheFly don’t use any commands in the label, even if they expand to just text.
    +

    +

    +\glsxtr[gls-options][dfn-options]{entry-label}
    + If an entry with the label entry-label has already been defined, this just does \gls[gls-options]{entry-label}. If entry-label hasn’t been defined, this will define the entry using:
    \newglossaryentry{entry-label}{name={entry-label},
    + category={\glsxtrcat},
    + description={\nopostdesc},
    + dfn-options}
    +

    +

    +The 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 entry-label and placed in the name key within the optional argument dfn-options.
    +

    +The second optional argument 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:

    +\GlsXtrWarning{options}{entry}
    + For example, this warning will be generated on the second instance of \glsxtr below:
    \glsxtr[][pluralgeese]{goose}
    +% ... later
    +\glsxtr[][pluralgeese]{goose}
    +

    +If you are considering doing something like:

    \newcommand*{\goose}{\glsxtr[][plural={geese}]{goose}}
    +\renewcommand*{\GlsXtrWarning}[2]{}
    +% ... later
    +\goose\ some more text here
    +
    then don’t bother. It’s simpler and less problematic to just define the entries in the preamble with \newglossaryentry and then use \gls in the document.

    +There are also plural and case-changing alternatives to \glsxtr.

    +\glsxtrpl[gls-options][dfn-options]{entry-label}
    + This is like \glsxtr but uses \glspl instead of \gls.
    +\Glsxtr[gls-options][dfn-options]{entry-label}
    + This is like \glsxtr but uses \Gls instead of \gls.
    +\Glsxtrpl[gls-options][dfn-options]{entry-label}
    + This is like \glsxtr but uses \Glspl instead of \gls.

    +The category is set to:

    +\glsxtrcatinitial: general
    + This should simply expand to the required category label. The default definition is general.

    +

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

    + +

    + +
    +

    14. Supplementary Files

    +

    +The glossaries-extra package comes with some additional files. Those listed in §14.1 provide dummy entries for testing various styles. They should be placed on TeX’s path.

    +There are also some sample files listed in §14.2. These should be located in the package documentation directory.

    + +

    + +
    +

    14.1. Dummy Files for Testing

    +

    +The base glossaries package provides files with dummy entries for testing. The glossaries-extra package provides an additional file with entries.

    +

    🗋📥 example-glossaries-xr.tex
    + This file contains entries that have the see, seealso or alias keys set.

    +There are also bib files corresponding to all the available tex files for use with bib2gls.

    +

    🗋📥 example-glossaries-acronym.bib
    + Corresponds to example-glossaries-acronym.tex
    🗋📥 example-glossaries-acronym-desc.bib
    + Corresponds to example-glossaries-acronym-desc.tex
    🗋📥 example-glossaries-acronyms-lang.bib
    + Corresponds to example-glossaries-acronyms-lang.tex
    🗋📥 example-glossaries-brief.bib
    + Corresponds to example-glossaries-brief.tex
    🗋📥 example-glossaries-childmultipar.bib
    + Corresponds to example-glossaries-childmultipar.tex
    🗋📥 example-glossaries-childnoname.bib
    + Corresponds to example-glossaries-childnoname.tex
    🗋📥 example-glossaries-cite.bib
    + Corresponds to example-glossaries-cite.tex
    🗋📥 example-glossaries-images.bib
    + Corresponds to example-glossaries-images.tex
    🗋📥 example-glossaries-long.bib
    + Corresponds to example-glossaries-long.tex
    🗋📥 example-glossaries-longchild.bib
    + Corresponds to example-glossaries-longchild.tex
    🗋📥 example-glossaries-multipar.bib
    + Corresponds to example-glossaries-multipar.tex
    🗋📥 example-glossaries-parent.bib
    + Corresponds to example-glossaries-parent.tex
    🗋📥 example-glossaries-symbolnames.bib
    + Corresponds to example-glossaries-symbolnames.tex
    🗋📥 example-glossaries-symbols.bib
    + Corresponds to example-glossaries-symbols.tex
    🗋📥 example-glossaries-url.bib
    + Corresponds to example-glossaries-url.tex
    🗋📥 example-glossaries-xr.bib
    + Corresponds to example-glossaries-xr.tex

    + +

    + +
    +

    14.2. Sample Files

    +

    +The glossaries-extra package comes with some sample files that are listed below. There are also sample files provided with the glossaries package and with bib2gls. See also the Dickimaw Books Gallery.

    +

    🗋📥 sample.tex
    + Simple sample file that uses one of the dummy files provided by the glossaries package for testing.
    pdflatex sample
    +makeglossaries sample
    +pdflatex sample
    +pdflatex sample
    +

    +

    🗋📥 sample-abbr-styles.tex
    +
    pdflatex sample-abbr-styles
    +makeglossaries sample-abbr-styles
    +pdflatex sample-abbr-styles
    +pdflatex sample-abbr-styles
    +
    Demonstrates all predefined abbreviation styles.

    +

    🗋📥 sample-mixture.tex
    +
    pdflatex sample-mixture
    +makeglossaries sample-mixture
    +pdflatex sample-mixture
    +makeglossaries sample-mixture
    +pdflatex sample-mixture
    +
    General entries, acronyms and initialisms all treated differently.

    +

    🗋📥 sample-name-font.tex
    +
    pdflatex sample-name-font
    +makeglossaries sample-name-font
    +pdflatex sample-name-font
    +pdflatex sample-name-font
    +
    Categories and attributes are used to customize the way different entries appear.

    +

    🗋📥 sample-abbrv.tex
    +
    pdflatex sample-abbrv
    +makeglossaries sample-abbrv
    +pdflatex sample-abbrv
    +pdflatex sample-abbrv
    +
    General abbreviations.

    +

    🗋📥 sample-acronym.tex
    +
    pdflatex sample-acronym
    +makeglossaries sample-acronym
    +pdflatex sample-acronym
    +
    Acronyms aren’t initialisms and don’t expand on first use.

    +

    🗋📥 sample-acronym-desc.tex
    +
    pdflatex sample-acronym-desc
    +makeglossaries sample-acronym-desc
    +pdflatex sample-acronym-desc
    +makeglossaries sample-acronym-desc
    +pdflatex sample-acronym-desc
    +
    Acronyms that have a separate long form and description.

    +

    🗋📥 sample-crossref.tex
    +
    pdflatex sample-crossref
    +makeglossaries sample-crossref
    +pdflatex sample-crossref
    +
    Unused entries that have been cross-referenced automatically are added at the end of the document.

    +

    🗋📥 sample-indexhook.tex
    +
    pdflatex sample-indexhook
    +makeglossaries sample-indexhook
    +pdflatex sample-indexhook
    +
    Use the index hook to track which entries have been indexed (and therefore find out which ones haven’t been indexed).

    +

    🗋📥 sample-footnote.tex
    +
    pdflatex sample-footnote
    +makeglossaries sample-footnote
    +pdflatex sample-footnote
    +
    Footnote abbreviation style that moves the footnote marker outside of the hyperlink generated by \gls and moves it after certain punctuation characters for neatness.

    +

    🗋📥 sample-undef.tex
    +
    pdflatex sample-undef
    +makeglossaries sample-undef
    +pdflatex sample-undef
    +pdflatex sample-undef
    +
    Warn on undefined entries instead of generating an error.

    +

    🗋📥 sample-mixed-abbrv-styles.tex
    +
    pdflatex sample-mixed-abbrv-styles
    +makeglossaries sample-mixed-abbrv-styles
    +pdflatex sample-mixed-abbrv-styles
    +
    Different abbreviation styles for different entries.

    +

    🗋📥 sample-initialisms.tex
    +
    pdflatex sample-initialisms
    +makeglossaries sample-initialisms
    +pdflatex sample-initialisms
    +
    Automatically insert dots into initialisms.

    +

    🗋📥 sample-postdot.tex
    +
    pdflatex sample-postdot
    +makeglossaries sample-postdot
    +pdflatex sample-postdot
    +
    Another initialisms example.

    +

    🗋📥 sample-postlink.tex
    +
    pdflatex sample-postlink
    +makeglossaries sample-postlink
    +pdflatex sample-postlink
    +
    Automatically inserting text after the link text produced by commands like \gls (outside of hyperlink, if present).

    +

    🗋📥 sample-header.tex
    +
    pdflatex sample-header
    +makeglossaries sample-header
    +pdflatex sample-header
    +pdflatex sample-header
    +
    Using entries in section/chapter headings.

    +

    🗋📥 sample-autoindex.tex
    +
    pdflatex sample-autoindex
    +makeglossaries sample-autoindex
    +pdflatex sample-autoindex
    +makeindex sample-autoindex
    +pdflatex sample-autoindex
    +
    Using the dualindex and indexname attributes to automatically add glossary entries to the index (in addition to the glossary location list).

    +

    🗋📥 sample-autoindex-hyp.tex
    +
    pdflatex sample-autoindex-hyp
    +makeglossaries sample-autoindex-hyp
    +pdflatex sample-autoindex-hyp
    +makeindex sample-autoindex-hyp
    +pdflatex sample-autoindex-hyp
    +
    As previous but uses hyperref.

    +

    🗋📥 sample-nested.tex
    +
    pdflatex sample-nested
    +makeglossaries sample-nested
    +pdflatex sample-nested
    +
    Using \gls within the value of the name key.

    +

    🗋📥 sample-entrycount.tex
    +
    pdflatex sample-entrycount
    +pdflatex sample-entrycount
    +makeglossaries sample-entrycount
    +pdflatex sample-entrycount
    +
    Enable entry-use counting (only index if used more than n times, see §6.1).

    +

    🗋📥 sample-unitentrycount.tex
    +
    pdflatex sample-unitentrycount
    +pdflatex sample-unitentrycount
    +makeglossaries sample-unitentrycount
    +pdflatex sample-unitentrycount
    +
    Enable use of per-unit entry-use counting (§6.1).

    +

    🗋📥 sample-onelink.tex
    +
    pdflatex sample-onelink
    +makeglossaries sample-onelink
    +pdflatex sample-onelink
    +
    Using the per-unit entry counting (§6.1) to only have one hyperlink per entry per page.

    +

    🗋📥 sample-linkcount.tex
    +
    pdflatex sample-linkcount
    +makeglossaries sample-linkcount
    +pdflatex sample-linkcount
    +
    Using link counting (§6.2) to only have one hyperlink per entry.

    +

    🗋📥 sample-pages.tex
    +
    pdflatex sample-pages
    +makeglossaries sample-pages
    +pdflatex sample-pages
    +pdflatex sample-pages
    +
    Insert “page” or “pages” before the location list.

    +

    🗋📥 sample-altmodifier.tex
    +
    pdflatex sample-altmodifier
    +makeglossaries sample-altmodifier
    +pdflatex sample-altmodifier
    +pdflatex sample-altmodifier
    +
    Set the default options for commands like \gls and add an alternative modifier.

    +

    🗋📥 sample-mixedsort.tex
    +
    pdflatex sample-mixedsort
    +pdflatex sample-mixedsort
    +
    Uses the optional argument of \makeglossaries to allow a mixture of \printglossary and \printnoidxglossary.

    +

    🗋📥 sample-external.tex
    +
    pdflatex sample-external
    +makeglossaries sample-external
    +pdflatex sample-external
    +
    Uses the targeturl attribute to allow for entries that should link to an external URL rather than to an internal glossary.

    +

    🗋📥 sample-fmt.tex
    +
    pdflatex sample-fmt
    +makeglossaries sample-fmt
    +pdflatex sample-fmt
    +
    Provides text-block commands associated with entries in order to use \glsxtrfmt.

    +

    🗋📥 sample-alias.tex
    +
    pdflatex sample-alias
    +makeglossaries sample-alias
    +pdflatex sample-alias
    +
    Uses the alias key (see §3.4).

    +

    🗋📥 sample-alttree.tex
    +
    pdflatex sample-alttree
    +makeglossaries sample-alttree
    +pdflatex sample-alttree
    +
    Uses the glossaries-extra-stylemods package with the alttree style (see §8.6.5).

    +

    🗋📥 sample-alttree-sym.tex
    +
    pdflatex sample-alttree-sym
    +makeglossaries sample-alttree-sym
    +pdflatex sample-alttree-sym
    +
    Another alttree example that measures the symbol widths.

    +

    🗋📥 sample-alttree-marginpar.tex
    +
    pdflatex sample-alttree-marginpar
    +makeglossaries sample-alttree-marginpar
    +pdflatex sample-alttree-marginpar
    +
    Another alttree example that puts the location list in the margin.

    +

    🗋📥 sample-onthefly.tex
    +
    pdflatex sample-onthefly
    +makeglossaries sample-onthefly
    +pdflatex sample-onthefly
    +
    Using on-the-fly commands. Terms with accents must have the name key explicitly set.

    +

    🗋📥 sample-onthefly-xetex.tex
    +
    xelatex sample-onthefly-xetex
    +makeglossaries sample-onthefly-xetex
    +xelatex sample-onthefly-xetex
    +
    Using on-the-fly commands with XeLaTeX. Terms with UTF-8 characters don’t need to have the name key explicitly set. Terms that contain commands must have the name key explicitly set with the commands removed from the label.

    +

    🗋📥 sample-onthefly-utf8.tex
    +
    pdflatex sample-onthefly-utf8
    +makeglossaries sample-onthefly-utf8
    +pdflatex sample-onthefly-utf8
    +
    Tries to emulate the previous sample file for use with LaTeX through the starred version of \GlsXtrEnableOnTheFly. This is a bit iffy and may not always work. Terms that contain commands must have the name key explicitly set with the commands removed from the label.

    +

    🗋📥 sample-accsupp.tex
    +
    pdflatex sample-accsupp
    +makeglossaries sample-accsupp
    +pdflatex sample-accsupp
    +
    Integrate glossaries-accsupp.

    +

    🗋📥 sample-prefix.tex
    +
    pdflatex sample-prefix
    +makeglossaries sample-prefix
    +pdflatex sample-prefix
    +
    Integrate glossaries-prefix.

    +

    🗋📥 sample-suppl-main.tex
    +
    pdflatex sample-suppl
    +pdflatex sample-suppl-main
    +makeglossaries sample-suppl-main
    +pdflatex sample-suppl-main
    +
    Uses thevalue to reference a location in the supplementary file sample-suppl.tex.

    +

    🗋📥 sample-suppl-main-hyp.tex
    +
    pdflatex sample-suppl-hyp
    +makeglossaries sample-suppl-hyp
    +pdflatex sample-suppl-hyp
    +pdflatex sample-suppl-main-hyp
    +makeglossaries sample-suppl-main-hyp
    +pdflatex sample-suppl-main-hyp
    +
    A more complicated version to the above that uses the hyperref package to reference a location in the supplementary file sample-suppl-hyp.tex.

    + +

    + +
    +

    15. Multi-Lingual Support

    +

    +There’s only one command provided by glossaries-extra that you’re likely to want to change in your document and that’s \abbreviationsname if you use the abbreviations package option to automatically create the glossary labelled abbreviations. If this command doesn’t already exist, it will be defined to “Abbreviations” if babel hasn’t been loaded, otherwise it will be defined as \acronymname (provided by glossaries), which is language-sensitive.

    +You can redefine \abbreviationsname in the usual way. For example:

    \renewcommand*{\abbreviationsname}{List of Abbreviations}
    +
    Or using babel or polyglossia captions hook:
    \appto\captionsenglish{% 
    + \renewcommand*{\abbreviationsname}{List of Abbreviations}% 
     }
    -
    -

    -

    Alternatively you can use the title key when you print the list of abbreviations. -For example: - - - -

    -
    -\printabbreviations[title={List of Abbreviations}]
    -
    -

    or - - - -

    -
    -\printglossary[type=abbreviations,title={List of Abbreviations}]
    -
    -

    -

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

    The glossaries-extra package has the facility to load language modules (whose -filename is in the form glossariesxtr-language.ldf) if they exist, but won’t warn if -they don’t. If glossaries-extra-bib2gls is loaded via the record package option then the -check for language resource files will additionally search for an associated language -script file given by glossariesxtr-script.ldf where ⟨script⟩ is the four letter script -identifier, such as Latn, associated with the given dialect. There’s no warning -if the associated file isn’t found. The script file is loaded after the dialect -file. -

    If you want to write your own language module, you just need to create a file -called glossariesxtr-lang.ldf, where ⟨lang⟩ identifies the language or dialect (see -the tracklang package). For example, glossariesxtr-french.ldf. -

    The simplest code for this file is: - - - -

    -
    -\ProvidesGlossariesExtraLang{french}[2015/12/09 v1.0]
    -\newcommand*{\glossariesxtrcaptionsfrench}{%
    - \def\abbreviationsname{Abr\'eviations}%
    +

    +Alternatively you can use the title key when you print the list of abbreviations. For example:

    \printabbreviations[title={List of Abbreviations}]
    +
    or
    \printabbreviations[typeabbreviations,title={List of Abbreviations}]
    +

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

    +The glossaries-extra package has the facility to load language modules (whose filename is in the form glossariesxtr-language.ldf) if they exist, but won’t warn if they don’t. If glossaries-extra-bib2gls is loaded via the record package option then the check for language resource files will additionally search for an associated language script file given by glossariesxtr-script.ldf where script is the four letter script identifier, such as Latn, associated with the given dialect. There’s no warning if the associated file isn’t found. The script file is loaded after the dialect file.

    +If you want to write your own language module, you just need to create a file called glossariesxtr-lang.ldf, where lang identifies the language or dialect (see the tracklang package). For example, glossariesxtr-french.ldf. The file should start with:

    +\ProvidesGlossariesExtraLang{tag}
    + The simplest code for this file is:
    \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
    +
    +\ifcsdef{captions\CurrentTrackedDialect}
    +{% 
    +  \csappto{captions\CurrentTrackedDialect}% 
    +  {% 
    +    \glossariesxtrcaptionsfrench
    +  }% 
    +}% 
    +{% 
    +  \ifcsdef{captions\CurrentTrackedLanguage}
    +  {% 
    +    \csappto{captions\CurrentTrackedLanguage}% 
    +    {% 
    +      \glossariesxtrcaptionsfrench
    +    }% 
    +  }% 
    +  {}% 
     }
    -
    -

    -

    You can adapt this for other languages by replacing all instances of the language -identifier french and the translated text Abr\’eviations as appropriate. You can -also use the .ldf file to provide rule blocks for a particular language for use with -bib2gls’s custom sort rule. See §10.3 The glossaries-extra-bib2gls -package for further details. -

    This .ldf file then needs to be put somewhere on TeX’s path so that it can be -found by 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: -


    \GlsXtrNoGlsWarningHead{label}{file}

    -

    -This produces the following text in English: -

    -

    This document is incomplete. The external file associated with the - glossary ‘⟨label⟩’ (which should be called ⟨file⟩) hasn’t been created.

    - - - -


    \GlsXtrNoGlsWarningEmptyStart

    -

    -This produces the following text in English: -

    -

    This has probably happened because there are no entries defined in - this glossary.

    -


    \GlsXtrNoGlsWarningEmptyMain

    -

    -This produces the following text in English: -

    -

    If you don’t want this glossary, add nomain to your package option - list when you load glossaries-extra.sty. For example:

    -


    \GlsXtrNoGlsWarningEmptyNotMain{label}

    -

    -This produces the following text in English: -

    -

    Did you forget to use type=label⟩ when you defined your entries? - If you tried to load entries into this glossary with \loadglsentries - did you remember to use [label] as the optional argument? If you - did, check that the definitions in the file you loaded all had the type - set to \glsdefaulttype.

    -


    \GlsXtrNoGlsWarningCheckFile{file}

    -

    -This produces the following text in English: -

    -

    Check the contents of the file ⟨file⟩. If it’s empty, that means you - haven’t indexed any of your entries in this glossary (using commands - like \gls or \glsadd) so this list can’t be generated. If the file isn’t - empty, the document build process hasn’t been completed.

    -


    \GlsXtrNoGlsWarningMisMatch

    -

    -This produces the following text in English: -

    -

    You need - to either replace \makenoidxglossaries with \makeglossaries or - replace \printglossary (or \printglossaries) - with \printnoidxglossary (or \printnoidxglossaries) and then - rebuild this document.

    - - - -


    \GlsXtrNoGlsWarningNoOut{file}

    -

    -This produces the following text in English: -

    -

    The file ⟨file⟩ doesn’t exist. This most likely means you haven’t used - \makeglossaries or you have used \nofiles. If this is just a draft - version of the document, you can suppress this message using the - nomissingglstext package option.

    -


    \GlsXtrNoGlsWarningTail

    -

    -This produces the following text in English: -

    -

    This message will be removed once the problem has been fixed.

    -


    \GlsXtrNoGlsWarningBuildInfo

    -

    -This is advice on how to generate the glossary files. -


    \GlsXtrNoGlsWarningAutoMake{label}

    -

    -This is the message produced when the 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 (glossaries-extra-code.pdf) for further -details. - - - -

    - - - -

    -

    -

    Top

    Glossary

    -
    -bib2gls
    A command line Java application that selects entries from a .bib file - and converts them - to glossary definitions (like bibtex but also performs hierarchical sorting - and collation, thus omitting the need for xindy or makeindex). Further - details at: http://www.dickimaw-books.com/software/bib2gls/. -
    -entry location
    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. -
    -first use
    The first time a glossary entry is used (from the start of the document - or after a reset) with one of the following commands: \gls, \Gls, \GLS, - \glspl, \Glspl, \GLSpl or \glsdisp. -
    -first use flag
    A conditional that determines whether or not the entry has been - used according to the rules of first use. -
    -first use text
    The text that is displayed on first use, which is governed by the - first and firstplural keys of \newglossaryentry. (May be overridden by - \glsdisp.) -
    -link-text
    The text produced by commands such as \gls. It may or may not - have a hyperlink to the glossary. -
    -location list
    A list of entry locations. See number list. -
    -makeglossaries
    A custom designed Perl script interface provided with the - glossaries package to run xindy or makeindex according to the document - settings. - - - -
    -makeglossaries-lite
    A custom designed Lua script interface to xindy and - makeindex provided with the glossaries package. This is a cut-down - alternative to the Perl makeglossaries script. If you have Perl installed, - use the Perl script instead. This script is distributed in the source code - on CTAN with the file name makeglossaries-lite.lua but TeX Live - on Unix-like systems creates a symbolic link called makeglossaries-lite - (without the .lua extension) to the actual makeglossaries-lite.lua - script, and TeX distributions on Windows convert the script to an - executable makeglossaries-lite.exe. -
    -makeindex
    An indexing application. -
    -number list
    A list of entry locations (also called a location list). The number - list can be suppressed using the nonumberlist package option. -
    -xindy
    An flexible indexing application with multilingual support written in - Perl.
    - - - -

    Index

    -

    A -

    -
    abbreviation styles (deprecated):
    -    footnote-em  1
    -    footnote-sc  2
    -    footnote-sm  3
    -    long-desc-em  4
    -    long-desc-sc  5
    -    long-desc-sm  6
    -    long-em  7
    -    long-sc  8
    -    long-sm  9
    -    postfootnote-em  10
    -    postfootnote-sc  11
    -    postfootnote-sm  12
    -abbreviation styles:
    -    footnote  13
    -    footnote-desc  14
    -    long  15
    -    long-desc  16
    -    long-em-noshort-em  17, 18, 19
    -    long-em-noshort-em-desc  20, 21
    -    long-em-noshort-em-desc-noreg  22
    -    long-em-noshort-em-noreg  23, 24, 25
    -    long-em-short-em  26, 27, 28, 29
    -    long-em-short-em-desc  30
    -    long-hyphen-long-hyphen  31
    -    long-hyphen-noshort-desc-noreg  32, 33
    -    long-hyphen-noshort-noreg  34, 35
    -    long-hyphen-postshort-hyphen  36, 37, 38, 39, 40, 41
    -    long-hyphen-postshort-hyphen-desc  42
    -    long-hyphen-short-hyphen  43, 44, 45, 46, 47
    -    long-hyphen-short-hyphen-desc  48, 49
    -    long-noshort  50, 51, 52, 53, 54, 55, 56, 57, 58
    -    long-noshort-desc  59, 60, 61, 62, 63, 64, 65, 66, 67, 68
    - - - -    long-noshort-desc-noreg  69
    -    long-noshort-em  70
    -    long-noshort-em-desc  71
    -    long-noshort-noreg  72
    -    long-noshort-sc  73, 74
    -    long-noshort-sc-desc  75, 76
    -    long-noshort-sm  77
    -    long-noshort-sm-desc  78
    -    long-only-short-only  79, 80, 81, 82
    -    long-only-short-only-desc  83, 84
    -    long-only-short-sc-only  85, 86
    -    long-only-short-sc-only-desc  87
    -    long-postshort-sc-user  88, 89, 90
    -    long-postshort-sc-user-desc  91
    -    long-postshort-user  92, 93, 94
    -    long-postshort-user-desc  95, 96
    -    long-short  97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112
    -    long-short-desc  113, 114, 115, 116, 117, 118, 119, 120, 121
    -    long-short-em  122, 123, 124, 125
    -    long-short-em-desc  126, 127
    -    long-short-sc  128, 129, 130, 131
    -    long-short-sc-desc  132, 133
    -    long-short-sm  134, 135, 136
    -    long-short-sm-desc  137, 138
    -    long-short-user  139, 140, 141, 142, 143, 144, 145, 146, 147
    -    long-short-user-desc  148
    -    nolong-short  149, 150
    -    nolong-short-em  151
    -    nolong-short-noreg  152
    -    nolong-short-sc  153
    -    nolong-short-sm  154
    -    postfootnote  155, 156
    -    postfootnote-desc  157
    -    short  158
    -    short-desc  159
    -    short-em  160
    -    short-em-desc  161
    -    short-em-footnote  162, 163
    -    short-em-footnote-desc  164, 165
    -    short-em-long  166, 167, 168
    -    short-em-long-desc  169, 170
    -    short-em-long-em  171, 172
    -    short-em-long-em-desc  173
    -    short-em-nolong  174, 175, 176
    -    short-em-nolong-desc  177, 178
    -    short-em-postfootnote  179
    - - - -    short-em-postfootnote-desc  180
    -    short-footnote  181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191
    -    short-footnote-desc  192, 193, 194, 195, 196, 197, 198
    -    short-hyphen-long-hyphen  199, 200
    -    short-hyphen-long-hyphen-desc  201
    -    short-hyphen-postlong-hyphen  202, 203
    -    short-hyphen-postlong-hyphen-desc  204
    -    short-long  205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215
    -    short-long-desc  216, 217, 218, 219, 220, 221, 222
    -    short-long-user  223, 224, 225, 226, 227, 228, 229
    -    short-long-user-desc  230
    -    short-nolong  231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245
    -    short-nolong-desc  246, 247, 248, 249, 250
    -    short-nolong-desc-noreg  251
    -    short-nolong-noreg  252
    -    short-postfootnote  253, 254, 255, 256, 257, 258, 259, 260
    -    short-postfootnote-desc  261, 262, 263, 264, 265
    -    short-postlong-user  266, 267, 268
    -    short-postlong-user-desc  269
    -    short-sc  270
    -    short-sc-desc  271
    -    short-sc-footnote  272, 273, 274
    -    short-sc-footnote-desc  275, 276
    -    short-sc-long  277, 278, 279, 280
    -    short-sc-long-desc  281, 282
    -    short-sc-nolong  283, 284, 285
    -    short-sc-nolong-desc  286, 287
    -    short-sc-postfootnote  288, 289
    -    short-sc-postfootnote-desc  290
    -    short-sm  291
    -    short-sm-desc  292
    -    short-sm-footnote  293
    -    short-sm-footnote-desc  294, 295
    -    short-sm-long  296, 297, 298
    -    short-sm-long-desc  299, 300
    -    short-sm-nolong  301, 302, 303
    -    short-sm-nolong-desc  304, 305
    -    short-sm-postfootnote  306
    -    short-sm-postfootnote-desc  307
    -\abbreviationsname  308
    -\abbrvpluralsuffix  309
    -acronym styles (glossaries):
    -    dua  310
    -    dua-desc  311
    -    footnote  312
    -    footnote-desc  313
    - - - -    footnote-sc  314
    -    footnote-sc-desc  315
    -    footnote-sm  316
    -    footnote-sm-desc  317
    -    long-sc-short  318
    -    long-sc-short-desc  319
    -    long-short-desc  320
    -    long-sm-short  321
    -    long-sm-short-desc  322
    -    long-sp-short  323, 324
    -    long-sp-short-desc  325
    -    sc-short-long  326
    -    sc-short-long-desc  327
    -    short-long  328
    -    short-long-desc  329
    -    sm-short-long  330
    -    sm-short-long-desc  331
    -amsgen package  332
    -amsmath package  333
    -\apptoglossarypreamble  334
    -

    B -babel package  335, 336, 337, 338, 339, 340, 341, 342, 343
    -bib2gls  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
    -

    C -categories:
    -    abbreviation  479, 480, 481, 482, 483
    -    acronym  484, 485, 486, 487, 488, 489
    -    general  490, 491, 492, 493, 494, 495, 496, 497
    -    index  498, 499
    -    number  500
    -    symbol  501, 502
    -category attributes:
    -    accessaposplural  503, 504, 505, 506
    -    accessinsertdots  507, 508
    -    accessnoshortplural  509, 510
    -    aposplural  511, 512, 513, 514, 515, 516, 517, 518
    -    combinedfirstsep  519, 520
    -    combinedfirstsepfirst  521, 522
    -    combinedsep  523, 524
    -    combinedsepfirst  525, 526
    -    discardperiod  527, 528, 529, 530, 531, 532
    - - - -    dualindex  533, 534, 535, 536, 537, 538, 539
    -    entrycount  540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550
    -    externallocation  551, 552, 553, 554
    -    firstshortaccess  555
    -    glossdesc  556, 557, 558
    -    glossdescfont  559, 560, 561
    -    glossname  562, 563, 564
    -    glossnamefont  565, 566, 567, 568, 569
    -    glosssymbolfont  570, 571
    -    headuc  572, 573, 574, 575
    -    hyperoutside  576, 577
    -    indexname  578, 579, 580, 581, 582
    -    indexonlyfirst  583, 584, 585
    -    insertdots  586, 587, 588, 589
    -    linkcount  590, 591, 592
    -    linkcountmaster  593, 594
    -    markshortwords  595, 596
    -    markwords  597, 598, 599, 600, 601, 602
    -    multioptions  603, 604, 605, 606
    -    nameshortaccess  607
    -    nohyper  608, 609, 610
    -    nohyperfirst  611, 612, 613, 614, 615
    -    noshortplural  616, 617, 618, 619, 620, 621
    -    pluraldiscardperiod  622, 623
    -    recordcount  624, 625, 626, 627
    -    regular  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
    -    retainfirstuseperiod  660, 661
    -    tagging  662, 663, 664, 665
    -    targetcategory  666
    -    targetname  667, 668
    -    targeturl  669, 670, 671, 672, 673
    -    textformat  674, 675, 676, 677, 678
    -    textshortaccess  679
    -    unitcount  680
    -    wrgloss  681, 682
    -\cGLS  683
    -\cGLSformat  684
    -\cGLSpl  685
    -\cGLSplformat  686
    -convertgls2bib  687
    -\csGlsXtrLetField  688
    -\CustomAbbreviationFields  689
    -

    D -datatool package  690
    - - - -datatool-base package  691, 692, 693, 694
    -\dGLS  695
    -\dGls  696
    -\dgls  697
    -\dglsdisp  698
    -\dglslink  699
    -\dGLSpl  700
    -\dGlspl  701
    -\dglspl  702
    -

    E -\eglssetwidest  703
    -\eglsupdatewidest  704
    -\eGlsXtrSetField  705
    -entry location  706, 707, 708
    -entrycounter package  709
    -equation (counter)  710, 711, 712, 713, 714
    -etoolbox package  715, 716, 717, 718, 719, 720, 721, 722, 723, 724, 725
    -

    F -\false options
    -    groups  726
    -fancyhdr package  727
    -file types
    -    aux  728, 729, 730, 731
    -    bib  732, 733
    -    glg-abr  734
    -    glo-abr  735
    -    gls-abr  736
    -first use  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
    -first use flag  796, 797, 798, 799, 800, 801, 802, 803, 804, 805, 806, 807, 808, 809, 810, 811, 812, 813, 814, 815, 816, 817, 818
    -first use text  819, 820
    -fontenc package  821
    -\forallabbreviationlists  822
    -

    G -\gglssetwidest  823
    -\gglsupdatewidest  824
    -\gGlsXtrSetField  825
    -glossaries package  826, 827, 828, 829, 830, 831, 832, 833, 834, 835, 836, 837, 838, 839, 840, 841, 842, 843, 844, 845
    - - - -glossaries-accsupp package  846, 847, 848, 849, 850, 851, 852, 853, 854, 855, 856, 857, 858, 859, 860, 861, 862, 863, 864, 865, 866, 867
    -glossaries-extra package  868, 869, 870, 871, 872, 873, 874
    -glossaries-extra-bib2gls package  875, 876, 877, 878, 879, 880, 881, 882, 883, 884, 885, 886, 887, 888, 889, 890
    -glossaries-extra-stylemods package  891, 892, 893, 894, 895, 896, 897, 898, 899, 900
    -glossaries-prefix package  901, 902, 903, 904, 905
    -\glossariesextrasetup  906
    -glossary styles:
    -    altlist  907, 908, 909
    -    alttree  910, 911, 912, 913, 914, 915, 916, 917, 918, 919, 920, 921, 922, 923, 924
    -    bookindex  925, 926, 927, 928
    -    index  929
    -    inline  930, 931
    -    list  932, 933, 934, 935
    -    listdotted  936, 937
    -    listhypergroup  938
    -    long  939, 940, 941
    -    long-desc-name  942
    -    long-desc-sym-name  943
    -    long-loc-desc-name  944
    -    long-loc-desc-sym-name  945
    -    long-loc-sym-desc-name  946
    -    long-name-desc  947, 948, 949
    -    long-name-desc-loc  950
    -    long-name-desc-sym  951, 952
    -    long-name-desc-sym-loc  953, 954
    -    long-name-sym-desc  955
    -    long-name-sym-desc-loc  956
    -    long-sym-desc-name  957
    -    long3col  958
    -    longragged-booktabs  959, 960
    -    mcolindexgroup  961
    -    super  962
    -    topic  963, 964
    -    topicmcols  965
    -    tree  966, 967, 968, 969, 970
    -    treenoname  971, 972, 973
    -glossary-bookindex package  974, 975
    -glossary-inline package  976
    -glossary-list package  977
    -glossary-long package  978, 979
    -glossary-longextra package  980, 981
    -glossary-topic package  982, 983
    -glossary-tree package  984, 985, 986, 987, 988, 989, 990
    -\glossentrynameother  991
    -\glossxtrsetpopts  992
    - - - -\glsabbrvdefaultfont  993, 994
    -\glsabbrvemfont  995
    -\glsabbrvfont  996
    -\glsabbrvhyphenfont  997
    -\glsabbrvonlyfont  998
    -\glsabbrvscfont  999
    -\glsabbrvsconlyfont  1000
    -\glsabbrvscuserfont  1001
    -\glsabbrvsmfont  1002
    -\glsabbrvuserfont  1003, 1004
    -\Glsaccessdesc  1005
    -\glsaccessdesc  1006
    -\Glsaccessdescplural  1007
    -\glsaccessdescplural  1008
    -\Glsaccessfirst  1009
    -\glsaccessfirst  1010
    -\Glsaccessfirstplural  1011
    -\glsaccessfirstplural  1012
    -\Glsaccesslong  1013
    -\glsaccesslong  1014
    -\Glsaccesslongpl  1015
    -\glsaccesslongpl  1016
    -\Glsaccessname  1017
    -\glsaccessname  1018
    -\Glsaccessplural  1019
    -\glsaccessplural  1020
    -\Glsaccessshort  1021
    -\glsaccessshort  1022
    -\Glsaccessshortpl  1023
    -\glsaccessshortpl  1024
    -\Glsaccesssymbol  1025
    -\glsaccesssymbol  1026
    -\Glsaccesssymbolplural  1027
    -\glsaccesssymbolplural  1028
    -\Glsaccesstext  1029
    -\glsaccesstext  1030
    -\glsacspace  1031
    -\glsacspacemax  1032
    -\glsadd options
    -    format  1033
    -    theHvalue  1034, 1035
    -    thevalue  1036, 1037, 1038, 1039, 1040
    -\glsaddeach  1041
    -\glsaddpostsetkeys  1042
    -\glsaddpresetkeys  1043
    -\glsaltlistitem  1044
    - - - -\glsalttreechildpredesc  1045
    -\glsalttreepredesc  1046
    -\glscapturedgroup  1047
    -\glscategory  1048
    -\glscategorylabel  1049
    -\glscombinedfirstsep  1050
    -\glscombinedfirstsepfirst  1051
    -\glscombinedsep  1052
    -\glscombinedsepfirst  1053
    -\glscurrententrylabel  1054
    -\glscurrentfieldvalue  1055
    -\glsdefaultshortaccess  1056
    -\glsdefpostdesc  1057
    -\glsdefpostlink  1058
    -\glsdefpostname  1059
    -\glsentrycurrcount  1060
    -\glsentrypdfsymbol  1061
    -\glsentryprevcount  1062
    -\glsentryprevmaxcount  1063
    -\glsentryprevtotalcount  1064
    -\glsextrapostnamehook  1065
    -\glsFindWidestAnyName  1066
    -\glsFindWidestAnyNameLocation  1067
    -\glsFindWidestAnyNameSymbol  1068
    -\glsFindWidestAnyNameSymbolLocation  1069
    -\glsFindWidestLevelTwo  1070
    -\glsFindWidestTopLevelName  1071
    -\glsFindWidestUsedAnyName  1072
    -\glsFindWidestUsedAnyNameLocation  1073
    -\glsFindWidestUsedAnyNameSymbol  1074
    -\glsFindWidestUsedAnyNameSymbolLocation  1075
    -\glsFindWidestUsedLevelTwo  1076
    -\glsFindWidestUsedTopLevelName  1077
    -\glsfirstabbrvdefaultfont  1078
    -\glsfirstabbrvemfont  1079
    -\glsfirstabbrvfont  1080
    -\glsfirstabbrvhyphenfont  1081
    -\glsfirstabbrvonlyfont  1082
    -\glsfirstabbrvsconlyfont  1083
    -\glsfirstabbrvscuserfont  1084
    -\glsfirstabbrvsmfont  1085
    -\glsfirstabbrvuserfont  1086
    -\glsfirstlongdefaultfont  1087
    -\glsfirstlongemfont  1088
    -\glsfirstlongfont  1089
    -\glsfirstlongfootnotefont  1090
    - - - -\glsfirstlonghyphenfont  1091
    -\glsfirstlongonlyfont  1092
    -\glsfirstlonguserfont  1093
    -\GLSfmtfirst  1094
    -\Glsfmtfirst  1095
    -\glsfmtfirst  1096
    -\GLSfmtfirstpl  1097
    -\Glsfmtfirstpl  1098
    -\glsfmtfirstpl  1099
    -\GLSfmtfull  1100
    -\Glsfmtfull  1101
    -\glsfmtfull  1102
    -\GLSfmtfullpl  1103
    -\Glsfmtfullpl  1104
    -\glsfmtfullpl  1105
    -\GLSfmtlong  1106
    -\Glsfmtlong  1107
    -\glsfmtlong  1108
    -\GLSfmtlongpl  1109
    -\Glsfmtlongpl  1110
    -\glsfmtlongpl  1111
    -\GLSfmtname  1112
    -\Glsfmtname  1113
    -\glsfmtname  1114
    -\GLSfmtplural  1115
    -\Glsfmtplural  1116
    -\glsfmtplural  1117
    -\GLSfmtshort  1118
    -\Glsfmtshort  1119
    -\glsfmtshort  1120
    -\Glsfmtshortpl  1121, 1122
    -\glsfmtshortpl  1123
    -\GLSfmttext  1124
    -\Glsfmttext  1125
    -\glsfmttext  1126
    -\glsforeachwithattribute  1127
    -\glsgetattribute  1128
    -\glsgetcategoryattribute  1129
    -\glsgetwidestname  1130
    -\glsgetwidestsubname  1131
    -\glshasattribute  1132
    -\glshascategoryattribute  1133
    -\glshex  1134
    -\glsifattribute  1135
    -\glsifcategory  1136
    -\glsifcategoryattribute  1137
    - - - -\glsifnotregular  1138
    -\glsifnotregularcategory  1139
    -\glsifregular  1140
    -\glsifregularcategory  1141
    -\glskeylisttok  1142
    -\glslabeltok  1143
    -\glslink options
    -    counter  1144, 1145
    -    format  1146, 1147, 1148, 1149, 1150, 1151
    -    hyper  1152, 1153, 1154
    -    hyper=false  1155
    -    hyperoutside  1156, 1157
    -    noindex  1158, 1159, 1160, 1161, 1162, 1163, 1164
    -    prefix  1165, 1166
    -    textformat  1167, 1168
    -    theHvalue  1169, 1170
    -    thevalue  1171, 1172
    -    wrgloss  1173, 1174, 1175, 1176
    -\glslinkcheckfirsthyperhook  1177
    -\glslinkpresetkeys  1178
    -\glslistchildpostlocation  1179
    -\glslistchildprelocation  1180
    -\glslistdesc  1181
    -\glslistgroupafterheader  1182
    -\glslistgroupheaderitem  1183
    -\glslistgroupskip  1184
    -\glslistitem  1185
    -\glslistprelocation  1186
    -\glslocalreseteach  1187
    -\glslocalunseteach  1188
    -\glslongdefaultfont  1189
    -\glslongemfont  1190
    -\glslongextraDescAlign  1191
    -\glslongextraDescFmt  1192
    -\glslongextraDescNameHeader  1193
    -\glslongextraDescNameTabularFooter  1194
    -\glslongextraDescNameTabularHeader  1195
    -\glslongextraDescSymNameHeader  1196
    -\glslongextraDescSymNameTabularFooter  1197
    -\glslongextraDescSymNameTabularHeader  1198
    -\glslongextraGroupHeading  1199
    -\glslongextraHeaderFmt  1200
    -\glslongextraLocationAlign  1201
    -\glslongextraLocationDescNameHeader  1202
    -\glslongextraLocationDescNameTabularFooter  1203
    -\glslongextraLocationDescNameTabularHeader  1204
    - - - -\glslongextraLocationDescSymNameHeader  1205
    -\glslongextraLocationDescSymNameTabularFooter  1206
    -\glslongextraLocationDescSymNameTabularHeader  1207
    -\glslongextraLocationFmt  1208, 1209
    -\glslongextraLocationSymDescNameHeader  1210
    -\glslongextraLocationSymDescNameTabularFooter  1211
    -\glslongextraLocationSymDescNameTabularHeader  1212
    -\glslongextraLocSetDescWidth  1213
    -\glslongextraNameAlign  1214
    -\glslongextraNameDescHeader  1215
    -\glslongextraNameDescLocationHeader  1216
    -\glslongextraNameDescLocationTabularFooter  1217
    -\glslongextraNameDescLocationTabularHeader  1218
    -\glslongextraNameDescSymHeader  1219
    -\glslongextraNameDescSymLocationHeader  1220
    -\glslongextraNameDescSymLocationTabularFooter  1221
    -\glslongextraNameDescSymLocationTabularHeader  1222
    -\glslongextraNameDescSymTabularFooter  1223
    -\glslongextraNameDescSymTabularHeader  1224
    -\glslongextraNameDescTabularFooter  1225
    -\glslongextraNameDescTabularHeader  1226
    -\glslongextraNameFmt  1227
    -\glslongextraNameSymDescHeader  1228
    -\glslongextraNameSymDescLocationHeader  1229
    -\glslongextraNameSymDescLocationTabularFooter  1230
    -\glslongextraNameSymDescLocationTabularHeader  1231
    -\glslongextraNameSymDescTabularFooter  1232
    -\glslongextraNameSymDescTabularHeader  1233
    -\glslongextraSetDescWidth  1234
    -\glslongextraSetWidest  1235
    -\glslongextraSubDescFmt  1236
    -\glslongextraSubNameFmt  1237
    -\glslongextraSubSymbolFmt  1238
    -\glslongextraSymbolAlign  1239
    -\glslongextraSymbolFmt  1240
    -\glslongextraSymDescNameHeader  1241
    -\glslongextraSymDescNameTabularFooter  1242
    -\glslongextraSymDescNameTabularHeader  1243
    -\glslongextraSymLocSetDescWidth  1244
    -\glslongextraSymSetDescWidth  1245
    -\glslongextraTabularVAlign  1246
    -\glslongextraUpdateWidest  1247
    -\glslongextraUpdateWidestChild  1248
    -\GlsLongExtraUseTabulartrue  1249
    -\glslongfont  1250
    -\glslongfootnotefont  1251
    - - - -\glslonghyphenfont  1252
    -\glslongonlyfont  1253
    -\glslongpltok  1254
    -\glslongtok  1255
    -\glslonguserfont  1256
    -\glsnoidxdisplayloc  1257
    -\glspdffmtfull  1258
    -\glspdffmtfullpl  1259
    -\glsps  1260
    -\glspt  1261
    -\glsrenewcommand  1262
    -\glsseefirstitem  1263
    -\glsseeitemformat  1264
    -\glsseelastoxfordsep  1265
    -\glssetattribute  1266
    -\glssetcategoriesattribute  1267
    -\glssetcategoriesattributes  1268
    -\glssetcategoryattribute  1269
    -\glssetcombinedsepabbrvnbsp  1270
    -\glssetcombinedsepabbrvnone  1271
    -\glssetcombinedsepnarrow  1272
    -\glssetregularcategory  1273
    -\glsshortpltok  1274
    -\glsshorttok  1275
    -\glstopicAssignSubIndent  1276
    -\glstopicAssignWidest  1277
    -\glstopicCols  1278
    -\glstopicColsEnv  1279
    -\glstopicDesc  1280
    -\glstopicGroupHeading  1281
    -\glstopicInit  1282
    -\glstopicItem  1283
    -\glstopicLoc  1284
    -\glstopicMarker  1285
    -\glstopicMidSkip  1286
    -\glstopicParIndent  1287
    -\glstopicPostSkip  1288
    -\glstopicPreSkip  1289
    -\glstopicSubIndent  1290
    -\glstopicSubItem  1291
    -\glstopicSubItemBox  1292
    -\glstopicSubItemParIndent  1293
    -\glstopicSubItemSep  1294
    -\glstopicSubLoc  1295
    -\glstopicSubNameFont  1296
    -\glstopicSubPreLocSep  1297
    - - - -\glstopicTitle  1298
    -\glstopicTitleFont  1299
    -\glstreechilddesc  1300
    -\glstreeChildDescLoc  1301
    -\glstreechildpredesc  1302
    -\glstreechildprelocation  1303
    -\glstreechildsymbol  1304
    -\glstreedefaultnamefmt  1305
    -\glstreedesc  1306
    -\glstreeDescLoc  1307
    -\glstreegroupskip  1308
    -\glstreeheadergroupskip  1309
    -\glstreeNoDescSymbolPreLocation  1310
    -\glstreenonamechilddesc  1311
    -\glstreenonamedesc  1312
    -\glstreenonamesymbol  1313
    -\glstreepredesc  1314
    -\glstreePreHeader  1315
    -\glstreeprelocation  1316
    -\glstreesymbol  1317
    -\glsunsetcategoryattribute  1318
    -\glsupdatewidest  1319
    -\glsuseabbrvfont  1320
    -\glsuselongfont  1321
    -\glsuserdescription  1322
    -\Glsxtr  1323
    -\glsxtr  1324
    -\glsxtrabbreviationfont  1325
    -\glsxtrabbrvfootnote  1326
    -\glsxtrabbrvpluralsuffix  1327, 1328
    -\glsxtractivatenopost  1329
    -\glsxtraddallcrossrefs  1330
    -\glsxtraddlabelprefix  1331
    -\glsxtralias  1332
    -\glsxtrAltTreeIndent  1333
    -\glsxtralttreeInit  1334
    -\glsxtralttreeSubSymbolDescLocation  1335
    -\glsxtralttreeSymbolDescLocation  1336
    -\glsxtrapptocsvfield  1337
    -\GlsXtrAutoAddOnFormat  1338
    -\glsxtrautoindex  1339
    -\glsxtrautoindexassignsort  1340
    -\glsxtrautoindexentry  1341
    -\glsxtrautoindexesc  1342
    -\glsxtrBasicDigitrules  1343
    -\GlsXtrBibTeXEntryAliases  1344
    - - - -\glsxtrbookindexatendgroup  1345
    -\glsxtrbookindexbetween  1346
    -\glsxtrbookindexbookmark  1347
    -\glsxtrbookindexcols  1348
    -\glsxtrbookindexcolspread  1349
    -\glsxtrbookindexfirstmark  1350
    -\glsxtrbookindexfirstmarkfmt  1351
    -\glsxtrbookindexformatheader  1352
    -\glsxtrbookindexlastmark  1353
    -\glsxtrbookindexlastmarkfmt  1354
    -\glsxtrbookindexlocation  1355
    -\glsxtrbookindexmarkentry  1356
    -\glsxtrbookindexmulticolsenv  1357
    -\glsxtrbookindexname  1358
    -\glsxtrbookindexparentchildsep  1359
    -\glsxtrbookindexparentsubchildsep  1360
    -\glsxtrbookindexprelocation  1361
    -\glsxtrbookindexsubatendgroup  1362
    -\glsxtrbookindexsubbetween  1363
    -\glsxtrbookindexsublocation  1364
    -\glsxtrbookindexsubname  1365
    -\glsxtrbookindexsubprelocation  1366
    -\glsxtrbookindexsubsubatendgroup  1367
    -\glsxtrbookindexsubsubbetween  1368
    -\glsxtrchecknohyperfirst  1369
    -\glsxtrclearlabelprefixes  1370
    -\glsxtrcombiningdiacriticIIIrules  1371
    -\glsxtrcombiningdiacriticIIrules  1372
    -\glsxtrcombiningdiacriticIrules  1373
    -\glsxtrcombiningdiacriticIVrules  1374
    -\glsxtrcombiningdiacriticrules  1375
    -\glsxtrcontrolrules  1376
    -\glsxtrcopytoglossary  1377
    -\glsxtrcurrencyrules  1378
    -\glsxtrcurrentmglscsname  1379
    -\GlsXtrDefaultResourceOptions  1380
    -\glsxtrdeffield  1381
    -\glsxtrdetoklocation  1382
    -\glsxtrdigitrules  1383
    -\GlsXtrDiscardUnsetBuffering  1384
    -\glsxtrdisplayendloc  1385
    -\glsxtrdisplayendlochook  1386
    -\glsxtrdisplaylocnameref  1387
    -\glsxtrdisplaysingleloc  1388
    -\glsxtrdisplaystartloc  1389
    -\glsxtrdisplaysupploc  1390
    - - - -\glsxtrdoautoindexname  1391
    -\glsxtrdowrglossaryhook  1392
    -\glsxtredeffield  1393
    -\glsxtremsuffix  1394
    -\GlsXtrEnableEntryCounting  1395
    -\GlsXtrEnableEntryUnitCounting  1396
    -\GlsXtrEnableIndexFormatOverride  1397
    -\GlsXtrEnableInitialTagging  1398
    -\GlsXtrEnableLinkCounting  1399
    -\GlsXtrEnableOnTheFly  1400
    -\GlsXtrEnablePreLocationTag  1401
    -\glsxtrenablerecordcount  1402
    -\glsxtrendfor  1403
    -\glsxtrentryfmt  1404
    -\GlsXtrExpandedFmt  1405
    -\glsxtrfielddolistloop  1406
    -\glsxtrfieldforlistloop  1407
    -\glsxtrfieldformatcsvlist  1408
    -\glsxtrfieldformatlist  1409
    -\glsxtrfieldifinlist  1410
    -\glsxtrfieldlistadd  1411
    -\glsxtrfieldlisteadd  1412
    -\glsxtrfieldlistgadd  1413
    -\glsxtrfieldlistxadd  1414
    -\glsxtrfieldtitlecasecs  1415
    -\glsxtrfieldxifinlist  1416
    -\glsxtrfmt  1417
    -\glsxtrfmt*  1418
    -\GlsXtrFmtDefaultOptions  1419
    -\glsxtrfmtdisplay  1420
    -\glsxtrfmtexternalnameref  1421
    -\GlsXtrFmtField  1422
    -\glsxtrfmtinternalnameref  1423
    -\glsxtrfootnotedescname  1424
    -\glsxtrfootnotedescsort  1425
    -\glsxtrfootnotename  1426
    -\glsxtrforcsvfield  1427
    -\GlsXtrForeignText  1428
    -\GlsXtrForeignTextField  1429
    -\GlsXtrFormatLocationList  1430
    -\GlsXtrForUnsetBufferedList  1431
    -\glsxtrfractionrules  1432
    -\GLSxtrfull  1433
    -\Glsxtrfull  1434
    -\glsxtrfull  1435
    -\Glsxtrfullformat  1436
    - - - -\glsxtrfullformat  1437
    -\GLSxtrfullpl  1438
    -\Glsxtrfullpl  1439
    -\glsxtrfullpl  1440
    -\Glsxtrfullplformat  1441
    -\glsxtrfullplformat  1442
    -\glsxtrfullsep  1443
    -\glsxtrGeneralLatinIIIrules  1444
    -\glsxtrGeneralLatinIIrules  1445
    -\glsxtrGeneralLatinIrules  1446
    -\glsxtrGeneralLatinIVrules  1447
    -\glsxtrGeneralLatinVIIIrules  1448
    -\glsxtrGeneralLatinVIIrules  1449
    -\glsxtrGeneralLatinVIrules  1450
    -\glsxtrGeneralLatinVrules  1451
    -\glsxtrgeneralpuncIIrules  1452
    -\glsxtrgeneralpuncIrules  1453
    -\glsxtrgeneralpuncrules  1454
    -\glsxtrglossentry  1455
    -\glsxtrglossentryother  1456
    -\glsxtrgroupfield  1457
    -\GLSXTRhiername  1458
    -\GLSxtrhiername  1459
    -\GlsXtrhiername  1460
    -\Glsxtrhiername  1461
    -\glsxtrhiername  1462
    -\glsxtrhiernamesep  1463
    -\glsxtrhyphenrules  1464
    -\glsxtrhyphensuffix  1465
    -\glsxtridentifyglslike  1466
    -\glsxtrifcounttrigger  1467
    -\glsxtrifcustomdiscardperiod  1468
    -\GlsXtrIfFieldCmpNum  1469
    -\GlsXtrIfFieldEqNum  1470
    -\GlsXtrIfFieldEqStr  1471
    -\GlsXtrIfFieldEqXpStr  1472
    -\GlsXtrIfFieldNonZero  1473
    -\GlsXtrIfFieldUndef  1474
    -\GlsXtrIfFieldValueInCsvList  1475
    -\glsxtrifhasfield  1476
    -\glsxtrifhasfield*  1477
    -\GlsXtrIfHasNonZeroChildCount  1478
    -\glsxtrifinlabelprefixlist  1479
    -\glsxtrifkeydefined  1480
    -\glsxtriflabelinlist  1481
    -\GlsXtrIfLinkCounterDef  1482
    - - - -\glsxtrifmulti  1483
    -\glsxtrifrecordtrigger  1484
    -\GlsXtrIfUnusedOrUndefined  1485
    -\GlsXtrIfValueInFieldCsvList  1486
    -\glsxtrifwasfirstuse  1487
    -\GlsXtrIfXpFieldEqXpStr  1488
    -\glsxtrinclinkcounter  1489
    -\glsxtrindexaliased  1490
    -\GlsXtrIndexCounterLink  1491
    -\glsxtrindexseealso  1492
    -\glsxtrinitwrgloss  1493
    -\Glsxtrinlinefullformat  1494
    -\glsxtrinlinefullformat  1495
    -\Glsxtrinlinefullplformat  1496
    -\glsxtrinlinefullplformat  1497
    -\glsxtrinsertinsidetrue  1498
    -\glsxtrLatinA  1499
    -\glsxtrLatinAA  1500
    -\glsxtrLatinAELigature  1501
    -\glsxtrLatinE  1502
    -\glsxtrLatinEszettSs  1503
    -\glsxtrLatinEszettSz  1504
    -\glsxtrLatinEth  1505
    -\glsxtrLatinH  1506
    -\glsxtrLatinI  1507
    -\glsxtrLatinInsularG  1508
    -\glsxtrLatinK  1509
    -\glsxtrLatinL  1510
    -\glsxtrLatinLslash  1511
    -\glsxtrLatinM  1512
    -\glsxtrLatinN  1513
    -\glsxtrLatinO  1514
    -\glsxtrLatinOELigature  1515
    -\glsxtrLatinOslash  1516
    -\glsxtrLatinP  1517
    -\glsxtrLatinS  1518
    -\glsxtrLatinSchwa  1519
    -\glsxtrLatinT  1520
    -\glsxtrLatinThorn  1521
    -\glsxtrLatinWynn  1522
    -\glsxtrLatinX  1523
    -\GlsXtrLetField  1524
    -\GlsXtrLetFieldToField  1525
    -\GlsXtrLinkCounterName  1526
    -\GlsXtrLinkCounterValue  1527
    -\GlsXtrLoadResources  1528
    - - - -\glsxtrlocalsetgrouptitle  1529
    -\GlsXtrLocationField  1530
    -\GlsXtrLocationRecordCount  1531
    -\glsxtrlocrangefmt  1532
    -\Glsxtrlong  1533, 1534
    -\glsxtrlong  1535
    -\glsxtrlonghyphen  1536
    -\glsxtrlonghyphenshort  1537
    -\glsxtrlongnoshortdescname  1538
    -\glsxtrlongnoshortname  1539
    -\GLSxtrlongpl  1540
    -\Glsxtrlongpl  1541
    -\glsxtrlongpl  1542
    -\glsxtrlongshortdescname  1543
    -\glsxtrlongshortdescsort  1544
    -\glsxtrlongshortname  1545
    -\glsxtrlongshortuserdescname  1546
    -\glsxtrMathGreekIIrules  1547
    -\glsxtrMathGreekIrules  1548
    -\glsxtrMathItalicGreekIIrules  1549
    -\glsxtrMathItalicGreekIrules  1550
    -\glsxtrMathItalicLowerGreekIIrules  1551
    -\glsxtrMathItalicLowerGreekIrules  1552
    -\glsxtrMathItalicNabla  1553
    -\glsxtrMathItalicPartial  1554
    -\glsxtrMathItalicUpperGreekIIrules  1555
    -\glsxtrMathItalicUpperGreekIrules  1556
    -\glsxtrMathUpGreekIIrules  1557
    -\glsxtrMathUpGreekIrules  1558
    -\GlsXtrMglsOrGls  1559
    -\glsxtrmglsWarnAllSkipped  1560
    -\GLSxtrmultientryadjustedname  1561
    -\GlsXtrmultientryadjustedname  1562
    -\Glsxtrmultientryadjustedname  1563
    -\glsxtrmultientryadjustedname  1564
    -\GLSxtrmultientryadjustednamefmt  1565
    -\GlsXtrmultientryadjustednamefmt  1566
    -\Glsxtrmultientryadjustednamefmt  1567
    -\glsxtrmultientryadjustednamefmt  1568
    -\GLSxtrmultientryadjustednameother  1569
    -\GlsXtrmultientryadjustednameother  1570
    -\Glsxtrmultientryadjustednameother  1571
    -\glsxtrmultientryadjustednameother  1572
    -\glsxtrmultientryadjustednamepostsep  1573
    -\glsxtrmultientryadjustednamepresep  1574
    -\glsxtrmultientryadjustednamesep  1575
    - - - -\glsxtrmultilastotherindex  1576
    -\glsxtrmultilist  1577
    -\glsxtrmultimain  1578
    -\glsxtrmultimainindex  1579
    -\glsxtrmultisupplocation  1580
    -\glsxtrmultitotalelements  1581
    -\glsxtrnameloclink  1582
    -\glsxtrnamereflink  1583
    -\glsxtrnewgls  1584
    -\glsxtrnewGLSlike  1585
    -\glsxtrnewglslike  1586
    -\glsxtrnewnumber  1587
    -\glsxtrnewrgls  1588
    -\glsxtrnewrGLSlike  1589
    -\glsxtrnewrglslike  1590
    -\glsxtrnewsymbol  1591
    -\GlsXtrNoGlsWarningAutoMake  1592
    -\GlsXtrNoGlsWarningBuildInfo  1593
    -\GlsXtrNoGlsWarningCheckFile  1594
    -\GlsXtrNoGlsWarningEmptyMain  1595
    -\GlsXtrNoGlsWarningEmptyNotMain  1596
    -\GlsXtrNoGlsWarningEmptyStart  1597
    -\GlsXtrNoGlsWarningHead  1598
    -\GlsXtrNoGlsWarningMisMatch  1599
    -\GlsXtrNoGlsWarningNoOut  1600
    -\GlsXtrNoGlsWarningTail  1601
    -\glsxtrnonprintablerules  1602
    -\glsxtrnopostpunc  1603
    -\glsxtronlydescname  1604
    -\glsxtronlydescsort  1605
    -\glsxtronlyname  1606
    -\glsxtronlysuffix  1607
    -\glsxtrorglong  1608
    -\glsxtrorgshort  1609
    -\GLSxtrp  1610
    -\Glsxtrp  1611
    -\glsxtrp  1612
    -\glsxtrpageref  1613
    -\glsxtrparen  1614
    -\glsxtrpdfentryfmt  1615
    -\Glsxtrpl  1616
    -\glsxtrpl  1617
    -\glsxtrpostdescription  1618
    -\glsxtrposthyphenlong  1619
    -\glsxtrposthyphenshort  1620
    -\glsxtrpostlink  1621
    - - - -\glsxtrpostlinkAddDescOnFirstUse  1622
    -\glsxtrpostlinkAddSymbolDescOnFirstUse  1623
    -\glsxtrpostlinkAddSymbolOnFirstUse  1624
    -\glsxtrpostlinkendsentence  1625
    -\glsxtrpostlinkhook  1626
    -\glsxtrpostlongdescription  1627
    -\glsxtrpostnamehook  1628
    -\GlsXtrPostNewAbbreviation  1629
    -\glsxtrprelocation  1630
    -\glsxtrprependlabelprefix  1631
    -\GlsXtrProvideBibTeXFields  1632
    -\glsxtrprovidecommand  1633
    -\glsxtrprovidestoragekey  1634
    -\GlsXtrRecordCount  1635
    -\GlsXtrRecordCounter  1636
    -\glsxtrrecordtriggervalue  1637
    -\glsxtrregularfont  1638
    -\glsxtrresourcefile  1639
    -\glsxtrresourceinit  1640
    -\glsxtrrestorepostpunc  1641
    -\glsxtrRevertMarks  1642
    -\glsxtrRevertTocMarks  1643
    -\glsxtrsconlydescname  1644
    -\glsxtrsconlydescsort  1645
    -\glsxtrsconlyname  1646
    -\glsxtrsconlysuffix  1647
    -\glsxtrscsuffix  1648
    -\glsxtrscusersuffix  1649
    -\glsxtrseealsolabels  1650
    -\glsxtrseelist  1651
    -\GlsXtrSetActualChar  1652
    -\glsxtrsetaliasnoindex  1653
    -\GlsXtrSetAltModifier  1654
    -\glsxtrsetcategory  1655
    -\glsxtrsetcategoryforall  1656
    -\GlsXtrSetDefaultGlsOpts  1657
    -\GlsXtrSetEncapChar  1658
    -\GlsXtrSetEscChar  1659
    -\GlsXtrSetField  1660
    -\glsxtrsetfieldifexists  1661
    -\glsxtrsetglossarylabel  1662
    -\glsxtrsetgrouptitle  1663
    -\GlsXtrSetLevelChar  1664
    -\glsxtrsetpopts  1665
    -\GlsXtrSetRecordCountAttribute  1666
    -\glsxtrSetWidest  1667
    - - - -\glsxtrSetWidestFallback  1668
    -\Glsxtrshort  1669, 1670
    -\glsxtrshort  1671
    -\glsxtrshortdescname  1672
    -\glsxtrshorthyphenlong  1673
    -\glsxtrshortlongdescname  1674
    -\glsxtrshortlongname  1675, 1676
    -\glsxtrshortlonguserdescname  1677
    -\glsxtrshortnolongname  1678
    -\GLSxtrshortpl  1679
    -\Glsxtrshortpl  1680
    -\glsxtrshortpl  1681
    -\glsxtrsmsuffix  1682
    -\glsxtrspacerules  1683
    -\GlsXtrStandaloneEntryName  1684
    -\GlsXtrStandaloneEntryOther  1685
    -\GlsXtrStandaloneGlossaryType  1686
    -\GlsXtrStartUnsetBuffering  1687
    -\GlsXtrStopUnsetBuffering  1688
    -\glsxtrSubScriptDigitrules  1689
    -\Glsxtrsubsequentfmt  1690
    -\glsxtrsubsequentfmt  1691
    -\Glsxtrsubsequentplfmt  1692
    -\glsxtrsubsequentplfmt  1693
    -\glsxtrSuperScriptDigitrules  1694
    -\glsxtrtagfont  1695
    -\GlsXtrTheLinkCounter  1696
    -\GlsXtrTotalRecordCount  1697
    -\glsxtrunsrtdo  1698
    -\GlsXtrUseAbbrStyleFmts  1699
    -\GlsXtrUseAbbrStyleSetup  1700
    -\glsxtrusealias  1701
    -\GLSxtrusefield  1702
    -\Glsxtrusefield  1703
    -\glsxtrusefield  1704
    -\glsxtruserfield  1705
    -\glsxtruserparen  1706
    -\glsxtrusersuffix  1707, 1708
    -\glsxtrusesee  1709
    -\glsxtruseseealso  1710
    -\glsxtruseseeformat  1711, 1712
    -\GlsXtrWarnDeprecatedAbbrStyle  1713
    -\GlsXtrWarning  1714
    -\glsxtrword  1715
    -\glsxtrwordsep  1716
    -\glsxtrwrglossmark  1717
    - - - -

    H -hyperref package  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
    -

    I -\ifmglsused  1744
    -inputenc package  1745
    -

    L -link-text  1746, 1747, 1748, 1749, 1750, 1751, 1752, 1753, 1754, 1755, 1756, 1757, 1758, 1759, 1760, 1761, 1762, 1763, 1764, 1765
    -location list  1766, 1767, 1768, 1769, 1770
    -\longnewglossaryentry  1771
    -

    M -makeglossaries  1772, 1773, 1774, 1775, 1776
    -\makeglossaries  1777
    -makeglossaries-lite  1778, 1779
    -makeglossaries-lite  1780, 1781
    -makeidx package  1782
    -makeindex  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
    -makeindex  1808, 1809, 1810, 1811, 1812
    -memoir class  1813, 1814
    -mfirstuc package  1815, 1816, 1817
    -\MGLS  1818
    -\MGls  1819
    -\Mgls  1820
    -\mgls  1821
    -\mglscurrentcategory  1822
    -\mglscurrentlabel  1823
    -\mglscurrentlist  1824
    -\mglscurrentmainlabel  1825
    -\mglscurrentmultilabel  1826
    -\mglscurrentoptions  1827
    -\mglscurrentprefix  1828
    -\mglscurrentsuffix  1829
    -\mglscustompostlinkhook  1830
    -\mglsdefcategoryprefix  1831
    -\mglsdefcategorysuffix  1832
    -\mglselementindex  1833
    -\mglselementposthook  1834
    -\mglselementprehook  1835
    - - - -\mglselementreset  1836
    -\mglselementunset  1837
    -\mglsfield  1838
    -\mglsforelements  1839
    -\mglsforotherelements  1840
    -\Mglsfull  1841
    -\mglsfull  1842
    -\mglshascategoryprefix  1843
    -\mglshascategorysuffix  1844
    -\mglsiflast  1845
    -\mglsiflastelementcapscase  1846
    -\mglsiflastelementskipped  1847
    -\mglsiflastelementwasfirstuse  1848
    -\mglsiflastelementwasplural  1849
    -\mglsiflastmaincapscase  1850
    -\mglsiflastmainskipped  1851
    -\mglsiflastmainwasfirstuse  1852
    -\mglsiflastmainwasplural  1853
    -\mglsisfirstuse  1854
    -\mglslastcategory  1855
    -\mglslastelementlabel  1856
    -\mglslastelementpostlinkhook  1857
    -\mglslastmainlabel  1858
    -\mglslastmainpostlinkhook  1859
    -\mglslastmultilabel  1860
    -\mglslocalreset  1861
    -\mglslocalunset  1862
    -\mglslocalunsetothers  1863
    -\Mglslong  1864
    -\mglslong  1865
    -\MGLSmainpl  1866
    -\MGlsmainpl  1867
    -\Mglsmainpl  1868
    -\mglsmainpl  1869
    -\MGlsname  1870
    -\Mglsname  1871
    -\mglsname  1872
    -\MGLSpl  1873
    -\MGlspl  1874
    -\Mglspl  1875
    -\mglspl  1876
    -\mglsprefix  1877
    -\mglsreset  1878
    -\mglsresetall  1879
    -\mglsseefirstitem  1880
    -\mglsseeitem  1881
    - - - -\mglsSetMain  1882
    -\mglsSetOptions  1883, 1884
    -\Mglsshort  1885
    -\mglsshort  1886
    -\mglssuffix  1887
    -\MGlssymbol  1888
    -\Mglssymbol  1889
    -\mglssymbol  1890
    -\mglsunset  1891
    -\mglsunsetall  1892
    -\mglsunsetothers  1893
    -\mglsusecategoryprefix  1894
    -\mglsusecategorysuffix  1895
    -\MGlsusefield  1896
    -\Mglsusefield  1897
    -\mglsusefield  1898
    -\mglswasfirstuse  1899
    -\MPGLS  1900
    -\MPGls  1901
    -\Mpgls  1902
    -\mpgls  1903
    -\MPGLSmainpl  1904
    -\MPGlsmainpl  1905
    -\Mpglsmainpl  1906
    -\mpglsmainpl  1907
    -\MPGLSpl  1908
    -\MPGlspl  1909
    -\mpglspl  1910
    -\mpglsWarning  1911
    -multicols package  1912
    -\multiglossaryentry  1913
    -\multiglossaryentryglobalfalse  1914
    -\multiglossaryentryglobaltrue  1915
    -\multiglossaryentrysetup  1916
    -

    N -\newabbreviation  1917
    -\newabbreviationstyle  1918
    -\newacronym  1919
    -\newglossaryentry options
    -    access  1920
    -    alias  1921, 1922, 1923, 1924, 1925, 1926, 1927, 1928, 1929
    -    category  1930, 1931, 1932, 1933, 1934, 1935, 1936, 1937
    -    counter  1938
    -    description  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
    - - - -    descriptionplural  1965, 1966, 1967, 1968, 1969, 1970
    -    first  1971, 1972, 1973, 1974, 1975, 1976, 1977, 1978, 1979, 1980, 1981, 1982, 1983, 1984
    -    firstaccess  1985
    -    firstplural  1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995
    -    group  1996, 1997, 1998, 1999, 2000, 2001
    -    location  2002, 2003, 2004, 2005, 2006
    -    loclist  2007, 2008, 2009, 2010
    -    long  2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021
    -    longplural  2022, 2023, 2024, 2025, 2026, 2027
    -    name  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
    -    nameshortaccess  2088, 2089
    -    parent  2090, 2091, 2092, 2093, 2094
    -    plural  2095, 2096, 2097, 2098, 2099, 2100, 2101, 2102, 2103, 2104, 2105, 2106, 2107
    -    prefix  2108
    -    see  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
    -    seealso  2137, 2138, 2139, 2140, 2141, 2142, 2143, 2144, 2145, 2146, 2147, 2148, 2149
    -    short  2150, 2151, 2152, 2153, 2154, 2155, 2156, 2157, 2158, 2159, 2160, 2161, 2162, 2163, 2164, 2165, 2166, 2167, 2168, 2169
    -    shortaccess  2170, 2171, 2172, 2173, 2174
    -    shortplural  2175, 2176, 2177, 2178, 2179, 2180, 2181, 2182, 2183, 2184, 2185, 2186, 2187, 2188, 2189
    -    shortpluralaccess  2190, 2191, 2192, 2193
    -    sort  2194, 2195, 2196, 2197, 2198, 2199, 2200, 2201, 2202, 2203, 2204, 2205, 2206, 2207, 2208, 2209, 2210, 2211, 2212, 2213, 2214, 2215, 2216
    -    symbol  2217, 2218, 2219, 2220, 2221, 2222, 2223, 2224, 2225
    -    symbolaccess  2226
    -    symbolplural  2227, 2228
    -    text  2229, 2230, 2231, 2232, 2233, 2234, 2235, 2236, 2237, 2238, 2239, 2240, 2241, 2242, 2243, 2244, 2245
    -    textaccess  2246
    -    type  2247, 2248, 2249, 2250, 2251
    -    user1  2252, 2253, 2254, 2255, 2256, 2257, 2258, 2259, 2260
    -    user2  2261, 2262
    -number list  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
    -

    P -package options:
    -    abbreviations  2298, 2299, 2300, 2301, 2302
    -    accsupp  2303, 2304, 2305, 2306, 2307, 2308, 2309
    -    acronym  2310, 2311
    -    acronymlists  2312, 2313
    -    acronyms  2314
    -    automake  2315, 2316
    - - - -    autoseeindex  2317, 2318
    -        false  2319, 2320
    -    colorlinks  2321
    -    counter
    -        chapter  2322
    -        equation  2323
    -        section  2324
    -        wrglossary  2325
    -    debug  2326
    -        all  2327, 2328
    -        showtargets  2329, 2330, 2331
    -        showwrgloss  2332, 2333, 2334
    -        true  2335
    -    docdef  2336, 2337, 2338, 2339, 2340
    -        atom  2341, 2342
    -        false  2343
    -        restricted  2344, 2345, 2346, 2347, 2348
    -        true  2349, 2350, 2351, 2352, 2353, 2354
    -    docdefs  2355, 2356, 2357
    -        true  2358
    -    entrycounter  2359, 2360
    -    equations  2361, 2362
    -        true  2363
    -    floats  2364
    -    hyperfirst
    -        false  2365
    -    index  2366, 2367, 2368
    -    indexcounter  2369, 2370, 2371, 2372
    -    indexcrossrefs  2373, 2374, 2375, 2376
    -        false  2377
    -    indexonlyfirst  2378, 2379, 2380, 2381
    -    makeindex  2382
    -    nogroupskip  2383, 2384, 2385, 2386, 2387
    -    nomain  2388
    -    nomissingglstext  2389
    -    nonumberlist  2390, 2391, 2392, 2393, 2394
    -    nopostdot  2395, 2396, 2397, 2398
    -        false  2399, 2400, 2401
    -        true  2402
    -    noredefwarn
    -        false  2403
    -        true  2404
    -    notree  2405
    -    numbers  2406, 2407, 2408
    -    postdot  2409, 2410, 2411
    -    postpunc  2412, 2413, 2414
    - - - -        comma  2415
    -        dot  2416
    -        none  2417
    -    prefix  2418, 2419
    -    record  2420, 2421, 2422, 2423, 2424, 2425, 2426, 2427, 2428, 2429, 2430, 2431, 2432
    -        hybrid  2433, 2434, 2435, 2436, 2437, 2438, 2439
    -        nameref  2440, 2441, 2442, 2443, 2444
    -        off  2445, 2446
    -        only  2447, 2448, 2449, 2450, 2451, 2452, 2453, 2454, 2455, 2456, 2457, 2458, 2459
    -    savenumberlist  2460
    -    section
    -        chapter  2461
    -    seeautonumberlist  2462
    -    seenoindex  2463
    -        ignore  2464, 2465
    -        warn  2466
    -    shortcuts  2467, 2468, 2469
    -        abbr  2470, 2471
    -        abbreviations  2472, 2473, 2474, 2475
    -        ac  2476, 2477, 2478, 2479, 2480, 2481, 2482
    -        acro  2483, 2484
    -        acronyms  2485, 2486
    -        all  2487, 2488
    -        false  2489
    -        none  2490
    -        other  2491, 2492
    -        true  2493
    -    showtargets  2494
    -        annoteleft  2495
    -    sort
    -        none  2496, 2497
    -    stylemods  2498, 2499, 2500, 2501, 2502, 2503
    -        all  2504
    -        default  2505
    -    subentrycounter  2506, 2507
    -    symbols  2508, 2509, 2510
    -    toc
    -        false  2511
    -        true  2512
    -    translate
    -        babel  2513
    -        true  2514
    -    undefaction  2515, 2516
    -        error  2517, 2518, 2519
    -        warn  2520, 2521, 2522, 2523, 2524, 2525, 2526, 2527, 2528
    -    writeglslabelnames  2529
    - - - -    writeglslabels  2530
    -    xindy  2531, 2532
    -page (counter)  2533, 2534, 2535, 2536, 2537, 2538
    -polyglossia package  2539, 2540
    -\pretoglossarypreamble  2541
    -\printabbreviations  2542
    -\printglossary options
    -    label  2543, 2544
    -    nogroupskip  2545
    -    numberedsection  2546
    -    prefix  2547
    -    style  2548
    -    target  2549, 2550
    -    targetnameprefix  2551
    -    title  2552, 2553
    -    toctitle  2554
    -    type  2555
    -\printnoidxglossary options
    -    sort  2556
    -\printunsrtabbreviations  2557
    -\printunsrtacronyms  2558
    -\printunsrtglossaries  2559
    -\printunsrtglossary  2560
    -\printunsrtglossary options
    -    groups  2561, 2562
    -    leveloffset  2563
    -\printunsrtglossary*  2564
    -\printunsrtglossaryentryprocesshook  2565
    -\printunsrtglossaryhandler  2566
    -\printunsrtglossarypredoglossary  2567
    -\printunsrtglossaryskipentry  2568
    -\printunsrtglossaryunit  2569
    -\printunsrtglossaryunitsetup  2570
    -\printunsrtindex  2571
    -\printunsrtnumbers  2572
    -\printunsrtsymbols  2573
    -\provideignoredglossary  2574
    -\providemultiglossaryentry  2575
    -

    R -relsizes package  2576
    -\RestoreAcronyms  2577
    -\rGLS  2578
    -\rGls  2579
    -\rgls  2580
    - - - -\rGLSformat  2581
    -\rGlsformat  2582
    -\rglsformat  2583
    -\rGLSpl  2584
    -\rGlspl  2585
    -\rglspl  2586
    -\rGLSplformat  2587
    -\rGlsplformat  2588
    -\rglsplformat  2589
    -

    S -\seealsoname  2590
    -\setabbreviationstyle  2591
    -slantsc package  2592
    -soul package  2593, 2594
    -style package  2595
    -subentrycounter package  2596
    -

    T -texindy  2597
    -textcase package  2598
    -tracklang package  2599, 2600, 2601, 2602, 2603, 2604, 2605, 2606, 2607, 2608
    -translator package  2609
    -

    U -upgreek package  2610, 2611, 2612, 2613
    -

    W -wrglossary (counter)  2614, 2615, 2616, 2617, 2618
    -\writemultiglossentry  2619
    -

    X -xfor package  2620, 2621, 2622, 2623
    -\xglssetwidest  2624
    -\xglsupdatewidest  2625
    -\xGlsXtrIfValueInFieldCsvList  2626
    -\xGlsXtrSetField  2627
    -xindy  2628, 2629, 2630, 2631, 2632, 2633, 2634, 2635, 2636, 2637, 2638, 2639, 2640, 2641, 2642, 2643, 2644, 2645, 2646, 2647
    -xindy  2648
    -xkeyval package  2649
    - - - -

    -

    1.14.21 was originally intended as the last release of glossaries to incorporate new features, but -a few new minor features slipped in with some bug fixes in v4.21.

    -

    2.1The descriptionplural key is a throwback to the base package’s original acronym mechanism -before the introduction of the long and short keys, where the long form was stored in the description -field and the short form was stored in the symbol field.

    -

    4.1For compatibility with earlier versions, \glsabbrvscfont is defined to \glsxtrscfont, which -is defined to use \textsc. Direct use of \glsxtrscfont is now deprecated. Likewise for similar -commands.

    -

    10.1Version 1.11 only allowed one use of \GlsXtrLoadResources per document.

    -

    10.2v1.08 assumed filename.tex but that’s potentially dangerous if, for example, filename⟩ -happens to be the same as \jobname. The .glstex extension was enforced by version -1.11.

    -

    11.1Pre version 1.28 used \csedef.

    +

    +You can adapt this for other languages by replacing all instances of the language identifier french and the translated text Abr\'eviations as appropriate. You can also use the ldf file to provide rule blocks for a particular language for use with bib2gls’s custom sort rule. See §11.5 for further details.

    +

    +For further information on tracklang, see the tracklang documentation or Localisation with tracklang.tex.
    +

    +This ldf file then needs to be put somewhere on TeX’s path so that it can be found by 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:

    +\GlsXtrNoGlsWarningHead{glossary-label}{file}
    + This produces the following text in English:
    This document is incomplete. The external file associated with the glossary ‘glossary-label’ (which should be called file) hasn’t been created.

    +

    +\GlsXtrNoGlsWarningEmptyStart
    + This produces the following text in English:
    This has probably happened because there are no entries defined in this glossary.

    +

    +\GlsXtrNoGlsWarningEmptyMain
    + This produces the following text in English:
    If you don't want this glossary, add nomain to your package option list when you load glossaries-extra.sty. For example:

    +

    +\GlsXtrNoGlsWarningEmptyNotMain{glossary-label}
    + This produces the following text in English:
    Did you forget to use type=glossary-label when you defined your entries? If you tried to load entries into this glossary with \loadglsentries did you remember to use [glossary-label] as the optional argument? If you did, check that the definitions in the file you loaded all had the type set to \glsdefaulttype

    +

    +\GlsXtrNoGlsWarningCheckFile{file}
    + This produces the following text in English:
    Check the contents of the file file. If it’s empty, that means you haven’t indexed any of your entries in this glossary (using commands like \gls) or \glsadd) so this list can’t be generated. If the file isn’t empty, the document build process hasn’t been completed.

    +

    +\GlsXtrNoGlsWarningMisMatch
    + This produces the following text in English:
    You need to either replace \makenoidxglossaries with \makeglossaries or replace \printglossary (or \printglossaries) with \printnoidxglossary and then rebuild this document.

    +

    +\GlsXtrNoGlsWarningNoOut{file}
    + This produces the following text in English:
    The file file doesn’t exist. This most likely means you haven’t used \makeglossaries or you have used \nofiles. If this is just a draft version of the document, you can suppress this message using the nomissingglstext ackage option.

    +

    +\GlsXtrNoGlsWarningTail
    + This produces the following text in English:
    This message will be removed once the problem has been fixed.

    +

    +\GlsXtrNoGlsWarningBuildInfo
    + This is advice on how to generate the glossary files.

    +

    +\GlsXtrNoGlsWarningAutoMake{glossary-label}
    + This is the message produced when the 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 (glossaries-extra-code.pdf) for further details.

    + + + +

    +
    II. Summaries and Index
    +

    + +

    + +
    +

    Symbols

    + +
    +
    +
    A counter is being described.
    +
    📌
    +
    The syntax and usage of a command, environment or option etc.
    +
    🗑
    +
    A command, environment or option that is now deprecated.
    +
    🛇
    +
    A command, environment or option that should not be used with glossaries-extra.
    +
    +
    An important message.
    +
    🛈
    +
    Prominent information.
    +
    🖹
    +
    LaTeX code to insert into your document.
    +
    🔖
    +
    The definition of an option value.
    +
    🖹🛇
    +
    Problematic code which should be avoided.
    +
    🖺
    +
    How the example code should appear in the PDF.
    +
    🎚
    +
    An option that takes a value.
    +
    〉_
    +
    A command-line application invocation that needs to be entered into a terminal or command prompt. See also Incorporating makeglossaries or makeglossaries-lite or bib2gls into the document build.
    +
    🔘︎
    +
    A boolean option that is initially false.
    +
    🔘
    +
    A boolean option that is initially true.
    +
    🔎
    +
    Text in a transcript or log file or written to STDOUT or STDERR.
    +
    🗋U
    +
    Code that requires a native Unicode engine (XeLaTeX or LuaLaTeX).
    +
    𝍢
    +
    An option that doesn’t take a value.
    +
    +
    A warning.
    + +
    + +
    + +
    +

    Terms

    + +
    +
    American Standard Code for Information Interchange (ASCII)
    +
    A single-byte character encoding. Related blog article: Binary Files, Text Files and File Encodings.
    +
    Category post-description hook
    +
    A post-description hook called \glsxtrpostdesccategory that is associated with a particular category.
    +
    Category post-link hook
    +
    A post-link hook called \glsxtrpostlinkcategory that is associated with a particular category.
    +
    Category post-name hook
    +
    A post-name hook called \glsxtrpostnamecategory that is associated with a particular category.
    +
    Command-line interface (CLI)
    +
    An application that doesn’t have a graphical user interface. That is, an application that doesn’t have any windows, buttons or menus and can be run in a command prompt or terminal.
    +
    Display full form
    +
    The full form of an abbreviation obtained with the first use of \gls or \glspl (or case-changing variants). This may or may not produce the same result as the inline full form the corresponding \glsxtrfull command, depending on the abbreviation style.
    +
    Entry location
    +
    The location of the entry in the document (obtained from the location counter or from the thevalue option). This defaults to the page number on which the entry has been referenced with any of the \gls-like, \glstext-like or \glsadd commands. An entry may have multiple locations that form a list.
    +
    Field
    +
    Entry data is stored in fields. These may have a corresponding key used to set the value, such as name or description, but field values may also be set using commands like \GlsXtrSetField, in which case there doesn’t need to be a corresponding key. Some fields are considered internal fields. If you are using bib2gls, it will only recognise fields in the bib file that have had a key defined in the document or that are special to bib2gls.
    +
    First use
    +
    The first time an entry is used by a command that unsets the first use flag (or the first time since the flag was reset). For multi-entry sets, see first use.
    +
    First use flag
    +
    A conditional that keeps track of whether or not an entry has been referenced by any of the \gls-like commands (which can adjust their behaviour according to whether or not this flag is true). The conditional is true if the entry hasn’t been used by one of these commands (or if the flag has been reset) and false if it has been used (or if the flag has been unset). Note that multi-entries have their own flag that’s distinct from the first use flags of the individual elements.
    +
    First use text
    +
    The link text that is displayed on first use of the \gls-like commands.
    +
    Group (letters, numbers, symbols)
    +
    A logical division within a glossary that is typically a by-product of the indexing application’s sorting algorithm. See also Gallery: Logical Glossary Divisions (type vs group vs parent).
    +
    Graphical user interface (GUI)
    +
    An application that has windows, buttons or menus.
    +
    Glossary
    +
    Technically a glossary is an alphabetical list of words relating to a particular topic. For the purposes of describing the glossaries and glossaries-extra packages, a glossary is either the list produced by commands like \printglossary or \printunsrtglossary (which may or may not be ordered alphabetically) or a glossary is a set of entry labels where the set is identified by the glossary label or type.
    +
    \Gls-like
    +
    Commands like \gls and \glsdisp that change the first use flag. These commands index the entry (if indexing is enabled), create a hyperlink to the entry’s glossary listing (if enabled) and unset the first use flag. These commands end with the post-link hook.
    +
    \Glstext-like
    +
    Commands like \glstext and \glslink that don’t change the first use flag. These commands index the entry (if indexing is enabled) and create a hyperlink to the entry’s glossary listing (if enabled). These commands end with the post-link hook.
    +
    Hierarchical level
    +
    A number that indicates how many ancestors an entry has. An entry with no parent has hierarchical level 0. If an entry has a parent then the hierarchical level for the entry is one more than the hierarchical level of the parent. Most styles will format an entry according to its hierarchical level, giving prominence to level 0 entries, although some may have a maximum supported limit. The “unsrt” family of commands allow the hierarchical level to be locally adjusted by adding an offset (leveloffset) or to have hierarchy ignored (flatten).
    +
    Ignored glossary
    +
    A glossary that has been defined using a command like \newignoredglossary. These glossaries are omitted by iterative commands, such as \printglossaries and \printunsrtglossaries. An ignored glossary can only be displayed with \printunsrtglossary or \printunsrtinnerglossary.
    +
    Ignored location (or record)
    +
    A location that uses glsignore as the encap. With bib2gls, this indicates that the entry needs to be selected but the location isn’t added to the location list. With other methods, this will simply create an invisible location, which can result in unwanted commas if the location list has other items.
    +
    Indexing application
    +
    An application (piece of software) separate from TeX/LaTeX that collates and sorts information that has an associated page reference. Generally the information is an index entry but in this case the information is a glossary entry. There are two main indexing applications that are used with TeX: makeindex and xindy. (There is also a new application called xindex, but this isn’t supported by glossaries or glossaries-extra.) The glossaries-extra package additionally supports bib2gls. These are all CLI applications.
    +
    Indexing (or recording)
    +
    The process of saving the entry location and any associated information that is required in the glossary. In the case of makeindex and xindy, the entry location, encap, entry item and sort value are written to a supplementary file associated with the glossary that is subsequently read by makeindex/xindy. In the case of bib2gls and the “noidx” method, the entry location, encap and label is written to the aux file. With record=nameref, the current title and hyperlink target are also included. With bib2gls, each line of data in the aux is referred to as a “record” and indexing is referred to as “recording”. The record=hybrid option indexes twice: a bib2gls record in the aux file and a makeindex/xindy line in the corresponding file, See §5.8.
    +
    Inline full form
    +
    The full form of an abbreviation obtained with glsxtrfull or glsxtrfullpl (or case-changing variants). This may or may not produce the same result as the full form on first use of the corresponding gls-like command (the display full form), depending on the abbreviation style.
    +
    Inner formatting
    +
    The formatting applied by the innertextformat option, which redefines glsxtrgenentrytextfmt. The inner formatting can only be applied if glsxtrgenentrytextfmt is embedded within the entry’s display style.
    +
    Internal field
    +
    An internal field may refer to a key that shouldn’t be used in the bib file (internal field (bib2gls)), such as the group field, or it may refer to the label used to internally represent the field (which may or may not match the key used to set the field or may not have an associated key), such as useri which corresponds to the user1 key, or it may refer to a field that is only ever used internally that should not be explicitly modified, such as the field used to store the entry’s hierarchical level .
    +
    Internal field (bib2gls)
    +
    A field that is used or assigned by bib2gls that should typically not be used in the bib file.
    +
    Internal field label
    +
    The field label that forms part of the internal control sequence used to store the field value. This may or may not match the key used to assign the value when defining the entry. See the “Key to Field Mappings” table in the glossaries user manual.
    +
    Link text
    +
    The text produced by gls-like and glstext-like commands that have the potential to be a hyperlink.
    +
    Location counter
    +
    The counter used to obtain the entry location.
    +
    Location encap (format)
    +
    A command used to encapsulate an entry location. The control sequence name (without the leading backslash) is identified by the format key. The default encap is glsnumberformat.
    +
    Location list
    +
    A list of entry locations (also called a number list). May be suppressed for all glossaries with the package option nonumberlist or for individual glossaries with nonumberlist. With bib2gls, the list may also be suppressed with save-locations=false.
    +
    Multi-entry first use
    +
    The first time a multi-entry is referenced (or the first time since the multi-entry first use flag was reset). This is not necessary the first use of any of the individual entries that form the set.
    +
    Multi-entry first use flag
    +
    A conditional that keeps track of whether or not a multi-entry has been used. This is distinct from the first use flags of the individual elements.
    +
    Multi-entry subsequent use
    +
    When a multi-entry that has already been marked as used is referenced. This is not necessary the subsequent use of any of the individual entries that form the set.
    +
    Post-description hook
    +
    A hook (glspostdescription) included in some glossary styles that is used after the description is displayed. The glossaries-extra package modifies this command to provide additional hooks, including category post-description hooks. The glossaries-extra-stylemods package modifies the predefined styles provided with glossaries to ensure that they all use glspostdescription to allow the category post-description hooks to be implemented.
    +
    Post-link hook
    +
    A hook (command) that is used after link text to allow code to be automatically added. The base glossaries package provides a general purpose hook glspostlinkhook. The glossaries-extra package modifies this command to provide additional hooks, including category post-link hooks.
    +
    Post-name hook
    +
    A hook (command) that is used after the name is displayed in glossary styles. These hooks are implemented by glossentryname, which needs to be present in the glossary style. The main hook is glsxtrpostnamehook, which implements auto-indexing (see §12), performs a general purpose hook glsextrapostnamehook and a category-specific hook glsxtrpostnamecategory.
    +
    Print “unsrt” glossary commands (and environment)
    +
    The set of commands used for displaying a glossary or partial glossary that have “unsrt” in the name: printunsrtglossary, printunsrtglossaries (which internally uses printunsrtglossary), and printunsrtinnerglossary. These all simply iterate over the list of entries associated with the given glossary, in the order in which they were added to the glossary (hence “unsrt”, which is short for “unsorted”). The way that bib2gls works is that it sorts the entries according to the resource options and adds the entries to the glossary in the required order. These commands may be used with or without bib2gls. If you don’t use bib2gls, you will need to manually ensure that the entries are added in the desired order. The printunsrtglossarywrap environment may also be included in this category, although it only sets up the start and end of the glossary for use with printunsrtinnerglossary.
    +
    Resource file
    +
    The glstex file created by bib2gls and loaded by GlsXtrLoadResources (or glsxtrresourcefile).
    +
    Resource set
    +
    All the settings (resource options) and entries associated with a particular instance of GlsXtrLoadResources (or glsxtrresourcefile).
    +
    Standalone entry
    +
    Normally the link text target is created in the glossary, where the entry’s name and description (and optionally other information, such as the symbol) are shown. It may be that you don’t want a list but need to have the name and description somewhere in the document text. These are standalone entries. Whilst it is possible to simply use glsentryname and glsentrydesc, the glossaries-extra package provides a way inserting the name that includes the hypertarget for the link text and obeys the post-name hook.
    +
    Subsequent use
    +
    Using an entry that unsets the first use flag when it has already been unset.
    +
    Unicode Transformation Format (8-bit) (UTF-8)
    +
    A variable-width encoding that uses 8-bit code units. This means that some characters are represented by more that one byte. XeLaTeX and LuaLaTeX treat the multi-byte sequence as a single token, but the older LaTeX formats have single-byte tokens, which can cause complications, although these have mostly been addressed with the newer kernels introduced over the past few years. Related blog article: Binary Files, Text Files and File Encodings.
    +
    Whatsit
    +
    A command whose execution is delayed or an OS-specific special command. This includes writing to external files (which is what indexing does).
    + +
    - - - - - +
    + +
    +

    Glossary Entry Keys Summary

    +These are options that can be passed to commands that define entries, such as \newglossaryentry or \newabbreviation.

    +

    access={text}🎚

    +

    (requires accsupp)
    +
    +

    +Accessibility text corresponding to the name field. This field will be automatically set by \newabbreviation, if not provided and the nameshortaccess attribute is set. See §9.1.

    +

    alias={xr-label}🎚glossaries-extra
    +

    +Behaves in a similar manner to see={[\seealsoname]xr-label} but also sets up aliasing which makes the link text hyperlink to xr-label instead. §3.2; 33

    +

    category=category-labelinitial: general 🎚glossaries-extra
    +

    +The entry’s category (must be a simple label). §3.2; 33

    +

    counter={counter-name}🎚
    +

    +If set, the value indicates the location counter to use by default when indexing this entry (overrides the counter associated with the glossary or the counter package option).

    +

    description={text}🎚
    +

    +The entry’s description, as displayed in the glossary. If required in the text, use \glsdesc (if indexing and hyperlinks are required) or \glsentrydesc. Glossary styles should use \glossentrydesc and \glspostdescription to incorporate the post-description hook.

    +

    descriptionaccess={text}🎚

    +

    (requires accsupp)
    +
    +

    +Accessibility text corresponding to the description field.

    +

    descriptionplural={text}🎚
    +

    +The plural form of the entry’s description, if applicable. If omitted, this is set to the same value as the description, since descriptions tend not to be a singular entity.

    +

    descriptionpluralaccess={text}🎚

    +

    (requires accsupp)
    +
    +

    +Accessibility text corresponding to the descriptionplural field.

    +

    first={first}🎚
    +

    +The entry’s text, as displayed on first use of \gls-like commands. Note that using an abbreviation style or post-link hooks is a more flexible approach. If omitted, this value is assumed to be the same as the text key.

    +

    firstaccess={text}🎚

    +

    (requires accsupp)
    +
    +

    +Accessibility text corresponding to the first field. This field will be automatically set by \newabbreviation, if not provided and the firstshortaccess attribute is set. See §9.1.

    +

    firstplural={text}🎚
    +

    +The entry’s plural form, as displayed on first use of plural \gls-like commands, such as \glspl. If this key is omitted, then the value will either be the same as the plural field, if the first key wasn’t used, or the value will be taken from the first key with \glspluralsuffix appended.

    +

    firstpluralaccess={text}🎚

    +

    (requires accsupp)
    +
    +

    +Accessibility text corresponding to the firstplural field. This field will be automatically set by \newabbreviation, if not provided and the firstshortaccess attribute is set. See §9.1.

    +

    group={group-label}🎚glossaries-extra
    +

    +The group label that identifies which group the entry belongs to. This key is only available with the record=only and record=nameref options, and is set by bib2gls, if invoked with --group or -g. This is an internal key assigned by bib2gls as a by-product of sorting. Explicit use without reference to the order of entries can result in fragmented groups. The corresponding title can be set with \glsxtrsetgrouptitle, although this is more commonly done implicitly within the glstex file. §3.2; 34

    +

    location={location-list}🎚glossaries-extra
    +

    +The formatted location list used by the “unsrt” family of commands. This key is only available with the record option and is set by bib2gls unless save-locationsfalse is set. §3.2; 35

    +

    long={long-form}🎚
    +

    +A field that is set by \newabbreviation to the entry’s long (unabbreviated) form. It typically shouldn’t be used explicitly with \newglossaryentry as \newabbreviation makes other modifications to ensure that when the entry is referenced with the \gls-like commands, it will obey the appropriate abbreviation style. If you are using bib2gls then this field should be used in the bib file when defining abbreviations.

    +

    longaccess={text}🎚

    +

    (requires accsupp)
    +
    +

    +Accessibility text corresponding to the long field.

    +

    longplural={long-form}🎚
    +

    +As long but the plural form.

    +

    longpluralaccess={text}🎚

    +

    (requires accsupp)
    +
    +

    +Accessibility text corresponding to the longplural field.

    +

    name={text}🎚
    +

    +The entry’s name, as displayed in the glossary. This typically isn’t used outside of the glossary (the text and plural keys are used instead). However, if there is a need to specifically display the entry name, use \glsname (if indexing and hyperlinks are required) or \glsentryname. Glossary styles should use \glossentryname, which uses \glsentryname and incorporates the post-name hooks and related attributes.

    +

    parent=parent-label🎚
    +

    +The label of the entry’s parent (from which the entry’s hierarchical level is obtained).

    +

    plural={text}🎚
    +

    +The entry’s plural form, as displayed on subsequent use of plural \gls-like commands, such as \glspl. This should be the appropriate plural form of the value provided by the text key. If omitted, this value is assumed to be the value of the text key with \glspluralsuffix appended.

    +

    pluralaccess={text}🎚

    +

    (requires accsupp)
    +
    +

    +Accessibility text corresponding to the plural field. This field will be automatically set by \newabbreviation, if not provided and the textshortaccess attribute is set. See §9.1.

    +

    prefix={text}🎚glossaries-prefix v3.14a+
    +

    +The subsequent use singular prefix.

    +

    prefixfirst={text}🎚glossaries-prefix v3.14a+
    +

    +The first use singular prefix.

    +

    prefixfirstplural={text}🎚glossaries-prefix v3.14a+
    +

    +The first use plural prefix.

    +

    prefixplural={text}🎚glossaries-prefix v3.14a+
    +

    +The subsequent use plural prefix.

    +

    see={[tag]xr-list}🎚
    +

    +With the base glossaries package this simply triggers an automatic cross-reference with \glssee. The glossaries-extra package additionally saves the value. Use autoseeindex=false to prevent the automatic cross-reference. The tag defaults to \seename and xr-list should be a comma-separated list of entries that have already been defined.

    +

    +

    +Behaves in a similar manner to see={[\seealsoname]xr-list}. §3.2; 33

    +

    short={short-form}🎚
    +

    +A field that is set by \newabbreviation (and \newacronym) to the entry’s short (abbreviated) form. It typically shouldn’t be used explicitly with \newglossaryentry as \newabbreviation makes other modifications to ensure that when the entry is referenced with the \gls-like commands, it will obey the appropriate abbreviation style. If you are using bib2gls then this field should be used in the bib file when defining abbreviations.

    +

    shortaccess={text}🎚

    +

    (requires accsupp)
    +
    +

    +Accessibility text corresponding to the short field. This field will be automatically set by \newabbreviation, if not provided. See §9.1.

    +

    shortplural={short-form}🎚
    +

    +As short but the plural form. The default is obtained by appending the abbreviation plural suffix, but this behaviour can be altered by category attributes. See §4 for further details.

    +

    shortpluralaccess={text}🎚

    +

    (requires accsupp)
    +
    +

    +Accessibility text corresponding to the shortplural field. This field will be automatically set by \newabbreviation, if not provided. See §9.1.

    +

    sort=valueinitial: entry name 🎚
    +

    +Specifies the value to use for sorting (overrides the default). This key is usually required for xindy if the name key only contains commands (for example, the entry is a symbol), but explicitly using this key in other contexts can break certain sort methods. Don’t use the sort field with bib2gls .

    +

    symbol={symbol}initial: \relax 🎚
    +

    +The entry’s associated symbol (optional), which can be displayed with \glssymbol (if indexing and hyperlinks are required) or with \glsentrysymbol.

    +

    symbolaccess={text}🎚

    +

    (requires accsupp)
    +
    +

    +Accessibility text corresponding to the symbol field.

    +

    symbolplural={symbol plural}🎚
    +

    +The plural form of the symbol, if applicable, which can be displayed with \glssymbolplural (if indexing and hyperlinks are required) or with \glsentrysymbolplural. If omitted, this value is set to the same as the symbol key (since symbols usually don’t have a plural form).

    +

    symbolpluralaccess={text}🎚

    +

    (requires accsupp)
    +
    +

    +Accessibility text corresponding to the symbolplural field.

    +

    text={text}🎚
    +

    +The entry’s text, as displayed on subsequent use of \gls-like commands. If omitted, this value is assumed to be the same as the name key.

    +

    textaccess={text}🎚

    +

    (requires accsupp)
    +
    +

    +Accessibility text corresponding to the text field. This field will be automatically set by \newabbreviation, if not provided and the textshortaccess attribute is set. See §9.1.

    +

    type=glossary-labelinitial: \glsdefaulttype 🎚
    +

    +Assigns the entry to the glossary identified by glossary-label.

    +

    user1={text}🎚
    +

    +A generic field, which can be displayed with \glsuseri (if indexing and hyperlinks are required) or with \glsentryuseri.

    +

    user1access={text}🎚glossaries-accsupp v4.45+
    +

    +Accessibility text corresponding to the user1 field.

    +

    user2={text}🎚
    +

    +A generic field, which can be displayed with \glsuserii (if indexing and hyperlinks are required) or with \glsentryuserii.

    +

    user2access={text}🎚glossaries-accsupp v4.45+
    +

    +Accessibility text corresponding to the user2 field.

    +

    user3={text}🎚
    +

    +A generic field, which can be displayed with \glsuseriii (if indexing and hyperlinks are required) or with \glsentryuseriii.

    +

    user3access={text}🎚glossaries-accsupp v4.45+
    +

    +Accessibility text corresponding to the user3 field.

    +

    user4={text}🎚
    +

    +A generic field, which can be displayed with \glsuseriv (if indexing and hyperlinks are required) or with \glsentryuseriv.

    +

    user4access={text}🎚glossaries-accsupp v4.45+
    +

    +Accessibility text corresponding to the user4 field.

    +

    user5={text}🎚
    +

    +A generic field, which can be displayed with \glsuserv (if indexing and hyperlinks are required) or with \glsentryuserv.

    +

    user5access={text}🎚glossaries-accsupp v4.45+
    +

    +Accessibility text corresponding to the user5 field.

    +

    user6={text}🎚
    +

    +A generic field, which can be displayed with \glsuservi (if indexing and hyperlinks are required) or with \glsentryuservi.

    +

    user6access={text}🎚glossaries-accsupp v4.45+
    +

    +Accessibility text corresponding to the user6 field.

    + +

    + +
    +

    Glossary Entry Fields Summary

    +These are internal fields that don’t have a corresponding key.

    +

    childcount={number}🎚
    +

    +Used with the save-child-count resource option to store the entry’s child count.

    +

    childlist={entry-label-list}🎚
    +

    +Used with the save-child-count resource option to store the entry’s children as an etoolbox internal list.

    +

    indexcounter={target-name}🎚
    +

    +Used with the indexcounter package option and the save-index-counter resource option. The value is set to the hyperlink target of the first wrglossary location or the first instance for a specific location encap.

    +

    loclist={etoolbox list}🎚glossaries v4.04+
    +

    +Used by \printnoidxglossary to provide the locations. The value is an etoolbox list of individual locations which are obtained from the aux file. This field will also be used by the “unsrt” family of commands if location isn’t set.

    +

    recordcount={number}🎚
    +

    +Used with the --record-count switch to store the total number of records for the associated entry.

    +

    recordcount.counter={number}🎚
    +

    +Used with the --record-count switch to store the total number of records with the location counter counter for the associated entry.

    +

    recordcount.counter.location={number}🎚
    +

    +Used with the --record-count-unit switch to store the total number of records with the location counter counter set to location for the associated entry.

    +

    record.counter={location}🎚
    +

    +Used with \GlsXtrRecordCounter to store an etoolbox internal list of locations (without encap) corresponding to the given counter.

    +

    secondarygroup={group-label}🎚
    +

    +Used by bib2gls to store the group label obtained from the secondary sort.

    + +

    + +
    +

    \Gls-Like and \Glstext-Like Options Summary

    +Most (but not all) of these options can be used in the optional argument of all the \gls-like, \glstext-like and \glsadd commands.

    +

    counter=counter-name🎚glossaries
    +

    +The location counter.

    +

    format=cs-name🎚glossaries
    +

    +The control sequence name (without the leading backslash) that should be used to encapsulate the entry location.

    +

    hyper=booleandefault: true; initial: true 🔘glossaries
    +

    +Determines whether or not the link text should have a hyperlink (provided hyperlinks are supported).

    +

    hyperoutside=booleandefault: true; initial: true 🔘glossaries-extra v1.21+
    +

    +Determines whether the hyperlink should be inside or outside of \glstextformat. §5.1.2; 190

    +

    innertextformat=csnameinitial: glsxtrdefaultentrytextfmt 🎚glossaries-extra v1.49+
    +

    +The name of the control sequence to use for the inner formatting. §5.1.2; 191

    +

    local=booleandefault: true; initial: false 🔘︎glossaries v3.04+
    +

    +If true use \glslocalunset to unset the first use flag, otherwise use \glsunset (only applies to \gls-like commands).

    +

    noindex=booleandefault: true; initial: false 🔘︎glossaries-extra
    +

    +If true this option will suppress indexing. If you are using bib2gls, you may want to consider using format=glsignore to prevent a location but ensure that the entry is selected. §5.1.2; 193

    +

    postunset=valuedefault: global; initial: global 🎚glossaries-extra v1.49+
    +

    +Determines whether or not to unset the first use flag after the link text. The value may be one of: global, local or none (only applies to \gls-like commands). §5.1.2; 191

    +

    prefix=link-prefix🎚glossaries-extra v1.31+
    +

    +The prefix to use for the entry’s hyperlink target. §5.1.2; 196

    +

    prereset=valuedefault: local; initial: none 🎚glossaries-extra v1.49+
    +

    +Determines whether or not to reset the entry before the link text. Allowed values: none (no reset), local (localise the reset) and global. §5.1.2; 191

    +

    preunset=valuedefault: local; initial: none 🎚glossaries-extra v1.49+
    +

    +Determines whether or not to unset the entry before the link text. Allowed values: none (no unset), local (localise the unset) and global. §5.1.2; 192

    +

    textformat=csname🎚glossaries-extra v1.30+
    +

    +The name of the control sequence to use instead of \glstextformat to encapsulate the link text. §5.1.2; 190

    +

    theHvalue=the-H-value🎚glossaries-extra v1.19+
    +

    +Set the hyper location to this value instead of obtaining it from \theHcounter. §5.1.2; 196

    +

    thevalue=location🎚glossaries-extra v1.19+
    +

    +Set the location to this value instead of obtaining it from the location counter. §5.1.2; 194

    +

    types={glossary list}🎚glossaries
    +

    +Only available with \glsaddall, the value is the list of glossaries to iterate over.

    +

    wrgloss=positioninitial: before 🎚glossaries-extra v1.14+
    +

    +Determines whether to do the indexing before or after the link text. Allowed values: before and after. §5.1.2; 194

    + +

    + +
    +

    Multi-Entry Set Options Summary

    +

    +

    all=option list🎚
    +

    +Options to pass to the \gls-like command for each element. §7.10; 360

    +

    category=category-label🎚
    +

    +The category to assign to the multi-entry set. §7.9.6; 359

    +

    encapmain=valueinitial: glsnumberformat 🎚
    +

    +The value to pass to the format option for the main entry. §7.9.2; 355

    +

    encapothers=valueinitial: glsnumberformat 🎚
    +

    +The value to pass to the format option for the “other” elements. §7.9.2; 355

    +

    firstprefix=value🎚
    +

    +The prefix to use on first use of the multi-entry. §7.9.4; 357

    +

    firstskipmain=booleandefault: true; initial: false 🔘︎
    +

    +Determines whether or not to skip the main entry on first use. §7.9.5; 358

    +

    firstskipothers=booleandefault: true; initial: false 🔘︎
    +

    +Determines whether or not to skip the “other” elements on first use. §7.9.5; 358

    +

    firstsuffix=value🎚
    +

    +The suffix to use on first use of the multi-entry. §7.9.4; 357

    +

    hyper=booleandefault: true 🔘︎
    +

    +Indicates whether or not to use hyperlinks, if supported, for all elements. This option is for use in the optional argument of \mgls and can be set implicitly with the default behaviour of the * and + modifiers. §7.10; 361

    +

    hyper=valueinitial: individual 🎚
    +

    +Indicates which elements should have hyperlinks, if supported. This option is a multi-entry setting, see §7.9. §7.9.6; 358

    +

    indexmain=valuedefault: true; initial: true 🎚
    +

    +Indicates if the main element should be indexed, should only be indexed on first use or should not indexed. §7.9.1; 355

    +

    indexothers=valuedefault: true; initial: true 🎚
    +

    +Indicates if the “other” elements should be indexed, should only be indexed on first use or should not indexed. §7.9.1; 355

    +

    main=option list🎚
    +

    +Options to pass to the \gls-like command for the main entry. §7.10; 360

    +

    mglsopts=option list🎚
    +

    +The default options to pass to commands like \mgls. §7.9.6; 359

    +

    mpostlink=valuedefault: true; initial: true 🎚
    +

    +Indicates whether or not the multi-entry post-link hook should be enabled and, if so, whether it should only be enabled on first or subsequent use. §7.9.3; 356

    +

    mpostlinkelement=valueinitial: last 🎚
    +

    +Indicates which post-link hook to use if the multi-entry post-link hook has been enabled. §7.9.3; 356

    +

    multiunset=valueinitial: global 🎚
    +

    +Indicates whether or not the multi-entry first use flag should be unset. §7.10; 361

    +

    others=option list🎚
    +

    +Options to pass to the \gls-like command for the “other” elements. §7.10; 360

    +

    postlinks=valueinitial: none 🎚
    +

    +Indicates which post-link hooks should be enabled. §7.9.3; 356

    +

    presetlocal=booleandefault: true; initial: false 🔘︎
    +

    +Indicates whether or not the prereset options should have a local or global effect. §7.10; 361

    +

    resetall=booleandefault: true; initial: false 🔘︎
    +

    +Indicates whether or not to reset all elements’ first use flag before using \gls. §7.10; 361

    +

    resetmain=booleandefault: true; initial: false 🔘︎
    +

    +Indicates whether or not to reset the main entry’s first use flag before using \gls. §7.10; 361

    +

    resetothers=booleandefault: true; initial: false 🔘︎
    +

    +Indicates whether or not to reset all “other” elements’ first use flag before using \gls. §7.10; 361

    +

    setup=option list🎚
    +

    +Multi-entry options that will override any conflicting options already assigned to the multi-entry. §7.10; 360

    +

    textformat=valueinitial: @firstofone 🎚
    +

    +The control sequence name of the command that should encapsulate the entire content. §7.9.6; 359

    +

    unsetall=booleandefault: true; initial: false 🔘︎
    +

    +Indicates whether or not to unset all elements’ first use flag before using \gls. §7.10; 362

    +

    unsetmain=booleandefault: true; initial: false 🔘︎
    +

    +Indicates whether or not to unset the main entry’s first use flag before using \gls. §7.10; 362

    +

    unsetothers=booleandefault: true; initial: false 🔘︎
    +

    +Indicates whether or not to unset all “other” elements’ first use flag before using \gls. §7.10; 362

    +

    usedprefix=value🎚
    +

    +The prefix to use on subsequent use of the multi-entry. §7.9.4; 357

    +

    usedskipmain=booleandefault: true; initial: false 🔘︎
    +

    +Determines whether or not to skip the main entry on subsequent use. §7.9.5; 358

    +

    usedskipothers=booleandefault: true; initial: false 🔘︎
    +

    +Determines whether or not to skip the “other” elements on subsequent use. §7.9.5; 358

    +

    usedsuffix=value🎚
    +

    +The suffix to use on subsequent use of the multi-entry. §7.9.4; 357

    + +

    + +
    +

    Print [Unsrt|noidx] Glossary Options Summary

    +Most (but not all) of these options can be used in the optional argument of all the print glossary commands: \printglossary, \printnoidxglossary, \printunsrtglossary and \printunsrtinnerglossary. Some may be used in the optional argument of the printunsrtglossarywrap environment.

    +

    entrycounter=booleandefault: true; initial: false 🔘︎glossaries v4.08+
    +

    +If true, enable the entry counter.

    +

    flatten=booleandefault: true; initial: false 🔘︎glossaries-extra v1.49+
    +

    +If true, treats all entries as though they have the same hierarchical level (the value of leveloffset). This option is only available for the “unsrt” family of commands and the printunsrtglossarywrap environment. §8.3; 379

    +

    groups=booleandefault: true; initial: true 🔘glossaries-extra v1.44+
    +

    +Enables group formation. This option is only available for the “unsrt” family of commands and the printunsrtglossarywrap environment. Note that no groups will be formed when invoking bib2gls with the default --no-group, regardless of this setting. §8.3; 379

    +

    label=label🎚glossaries-extra v1.39+
    +

    +Adds \label{label} to the start of the glossary (after the title). §8.3; 378

    +

    leveloffset=offsetinitial: 0 🎚glossaries-extra v1.44+
    +

    +Set or increment the hierarchical level offset. If offset starts with ++ then the current offset is incremented by the given amount otherwise the current offset is set to offset. For example, an entry with a normal hierarchical level of 1 will be treated as though it has hierarchical level 1+offset. This option is only available for the “unsrt” family of commands and the printunsrtglossarywrap environment. §8.3; 379

    +

    nogroupskip=booleandefault: true; initial: false 🔘︎
    +

    +Suppress the gap implemented by some glossary styles between groups.

    +

    nonumberlist=booleandefault: true; initial: false 🔘︎
    +

    +Suppress the location list. Note that nonumberlist=false will have no effect with the save-locationsfalse resource option as there won’t be any location lists to display.

    +

    nopostdot=booleandefault: true; initial: false 🔘︎
    +

    +Suppress the post-description punctuation.

    +

    numberedsection=valuedefault: nolabel; initial: false 🎚
    +

    +Indicates whether or not glossary section headers will be numbered and also if they should automatically be labelled. The numberedsection package option will change the default setting to match. §8.3; 378

    +

    +

    +Redefines \glossarypostamble to text. §8.3; 382

    +

    +

    +Redefines \glossarypreamble to text. §8.3; 382

    +

    prefix=prefix🎚glossaries-extra v1.31+
    +

    +Redefines \glolinkprefix to prefix. §8.3; 379

    +

    sort=method🎚
    +

    +Only available with \printnoidxglossary, this indicates how the glossary should be ordered. §8.3; 377

    +

    style=style-name🎚
    +

    +Use the style-name glossary style. §8.3; 378

    +

    subentrycounter=booleandefault: true; initial: false 🔘︎glossaries v4.08+
    +

    +If true, enable the sub-entry counter.

    +

    target=booleandefault: true; initial: true 🔘glossaries-extra v1.12+
    +

    +If true, each entry in the glossary should have a hypertarget created, if supported by the glossary style and if hyperlinks are enabled. §8.3; 382

    +

    +

    +Inserts prefix at the start of the hypertarget names. §8.3; 381

    +

    title=text🎚
    +

    +Sets the glossary title (overriding the default). §8.3; 378

    +

    toctitle=text🎚
    +

    +Sets the glossary toc title (overriding the default). §8.3; 378

    +

    type=glossary-labeldefault: \glsdefaulttype 🎚
    +

    +Identifies the glossary to display.

    + +

    + +
    +

    Abbreviation Styles Summary

    +Abbreviations defined using \newabbreviation will follow the style associated with the entry’s category. If there is no style associated with the entry’s category, the style for the abbreviation category is used (the default is long-short). Note that glossaries-extra redefines \newacronym to use \newabbreviation with category=acronym so any entry defined with \newacronym will use the abbreviation style for the acronym category (the default is short-nolong).

    +

    footnote-descalias: short-footnote-desc
    +

    + 116

    +

    🗑footnote-emalias: short-em-footnote
    +

    +

    +

    🗑footnote-scalias: short-sc-footnote
    +

    +

    +

    🗑footnote-smalias: short-sm-footnote
    +

    +

    +

    footnotealias: short-footnote
    +

    + 115

    +

    🗑long-desc-emalias: long-noshort-em-desc
    +

    +

    +

    🗑long-desc-scalias: long-noshort-sc-desc
    +

    +

    +

    🗑long-desc-smalias: long-noshort-sm-desc
    +

    +

    +

    long-descalias: long-noshort-desc
    +

    + 74

    +

    +

    +An abbreviation style like long-em-noshort-em-desc but sets the regular attribute to false. 131

    +

    +

    +An abbreviation style like long-noshort-desc but formats both the long and short form in an emphasized font (\emph). 80

    +

    +

    +An abbreviation style like long-em-noshort-em but sets the regular attribute to false. 131

    +

    +

    +An abbreviation style like long-noshort but formats both the long and short form in an emphasized font (\emph). 79

    +

    +

    +An abbreviation style like long-short-desc but formats both the long and short form in an emphasized font (\emph). 87

    +

    +

    +An abbreviation style like long-short but formats both the long and short form in an emphasized font (\emph). 86

    +

    🗑long-emalias: long-noshort-em
    +

    +

    +

    +

    +An abbreviation style like long-noshort-desc but checks if the inserted material starts with a hyphen (use with markwords attribute). 107

    +

    +

    +An abbreviation style like long-hyphen-short-hyphen but doesn’t show the short form on first use. 107

    +

    +

    +An abbreviation style like long-hyphen-short-hyphen-desc but places the insert and parenthetical material in the post-link hook. 106

    +

    +

    +An abbreviation style like long-hyphen-short-hyphen but places the insert and parenthetical material in the post-link hook. 104

    +

    +

    +An abbreviation style like long-hyphen-short-hyphen but the description must be supplied. 105

    +

    +

    +An abbreviation style like long-short but checks if the inserted material starts with a hyphen (use with markwords or markshortwords attributes). 103

    +

    +

    +As long-noshort-desc but it will set the regular attribute to false. 131

    +

    +

    +An abbreviation style that only shows the long form on first use and subsequent use. The short form won’t be showed unless you use a command like \glsxtrshort. The description key must be supplied. The full form will only be shown with commands like \glsxtrfull. This style sets the regular attribute to true. 7374

    +

    +

    +An abbreviation style like long-noshort-desc but formats the short form in an emphasized font (\emph). 78

    +

    +

    +An abbreviation style like long-noshort but formats the short form in an emphasized font (\emph). 78

    +

    +

    +As long-noshort but it will set the regular attribute to false. 131

    +

    +

    +An abbreviation style like long-noshort-desc but formats the short form in a small caps font (\textsc). The short form should therefore be in lowercase. 76

    +

    +

    +An abbreviation style like long-noshort but formats the short form in a small caps font (\textsc). The short form should therefore be in lowercase. 75

    +

    +

    +An abbreviation style like long-noshort-desc but formats the short form in a smaller font (\textsmaller). The relsize package is must be loaded. 77

    +

    +

    +An abbreviation style like long-noshort but formats the short form in a smaller font (\textsmaller). The relsize package is must be loaded. 76

    +

    +

    +An abbreviation style that only shows the long form on first use and subsequent use. The short form won’t be showed unless you use a command like \glsxtrshort. The full form will only be shown with commands like \glsxtrfull. This style sets the regular attribute to true. 7475

    +

    +

    +An abbreviation style like long-only-short-only but the description must be supplied. 112

    +

    +

    +An abbreviation style that only shows the long form on first use and only shows the short form on subsequent use. 111

    +

    +

    +An abbreviation style like long-only-short-sc-only but the description must be supplied. 113

    +

    +

    +An abbreviation style like long-only-short-only but uses small caps for the short form. 112

    +

    +

    +An abbreviation style like long-postshort-sc-user but the description must be supplied. 92

    +

    +

    +An abbreviation style like long-postshort-user but formats the short form in a small caps font (\textsc). The short form should therefore be in lowercase. 91

    +

    +

    +An abbreviation style like long-postshort-user but the description must be supplied. 90

    +

    +

    +An abbreviation style like long-short-user but the parenthetical content is placed in the post-link hook. 90

    +

    🗑long-scalias: long-noshort-sc
    +

    +

    +

    +

    +As long-short but the description must be supplied in options. 82

    +

    +

    +An abbreviation style like long-short-desc but formats the short form in an emphasized font (\emph). 86

    +

    +

    +An abbreviation style like long-short but formats the short form in an emphasized font (\emph). 85

    +

    +

    +An abbreviation style like long-short-desc but formats the short form in a small caps font (\textsc). The short form should therefore be in lowercase. 83

    +

    +

    +An abbreviation style like long-short but formats the short form in a small caps font (\textsc). The short form should therefore be in lowercase. 82

    +

    +

    +An abbreviation style like long-short-desc but formats the short form in a smaller font (\textsmaller). The relsize package is must be loaded. 84

    +

    +

    +An abbreviation style like long-short but formats the short form in a smaller font (\textsmaller). The relsize package is must be loaded. 84

    +

    +

    +An abbreviation style like long-short-user but the description must be supplied. 89

    +

    +

    +An abbreviation style like long-short but includes the value of the field identified by \glsxtruserfield (if set) in the parenthetical content. 88

    +

    +

    +An abbreviation style that shows the long form followed by the short form on first use. If the insert argument is used with the \gls-like or \glstext-like commands, it will be placed after the long form on first use. On subsequent use, only the short form is shown (followed by insert, if provided). This style sets the regular attribute to false (which means that the \gls-like commands won’t use the first/firstplural or text/plural values). 81

    +

    🗑long-smalias: long-noshort-sm
    +

    +

    +

    longalias: long-noshort
    +

    + 75

    +

    +

    +An abbreviation style like nolong-short but formats the short form in an emphasized font (\emph). 73

    +

    +

    +As nolong-short but it will set the regular attribute to false. 130

    +

    +

    +An abbreviation style like nolong-short but formats the short form in a small caps font (\textsc). The short form should therefore be in lowercase. 69

    +

    +

    +An abbreviation style like nolong-short but formats the short form in a smaller font (\textsmaller). The relsize package is must be loaded. 71

    +

    +

    +As short-nolong but the inline full form shows the long form followed by the short form in parentheses. 67

    +

    postfootnote-descalias: short-postfootnote-desc
    +

    + 118

    +

    🗑postfootnote-emalias: short-em-postfootnote
    +

    +

    +

    🗑postfootnote-scalias: short-sc-postfootnote
    +

    +

    +

    🗑postfootnote-smalias: short-sm-postfootnote
    +

    +

    +

    postfootnotealias: short-postfootnote
    +

    + 117

    +

    short-descalias: short-nolong-desc
    +

    + 66

    +

    short-em-descalias: short-em-nolong-desc
    +

    + 73

    +

    +

    +An abbreviation style like short-footnote-desc but formats the short form in an emphasized font (\emph). 127

    +

    +

    +An abbreviation style like short-footnote but formats the short form in an emphasized font (\emph). 126

    +

    +

    +An abbreviation style like short-long-desc but formats the short form in an emphasized font (\emph). 97

    +

    +

    +An abbreviation style like short-long-desc but formats both the long and short form in an emphasized font (\emph). 99

    +

    +

    +An abbreviation style like short-long but formats both the long and short form in an emphasized font (\emph). 98

    +

    +

    +An abbreviation style like short-long but formats the short form in an emphasized font (\emph). 97

    +

    +

    +An abbreviation style like short-nolong-desc but formats the short form in an emphasized font (\emph). 7273

    +

    +

    +An abbreviation style like short-nolong but formats the short form in an emphasized font (\emph). 7172

    +

    +

    +An abbreviation style like short-postfootnote-desc but formats the short form in an emphasized font (\emph). 129

    +

    +

    +An abbreviation style like short-postfootnote but formats the short form in an emphasized font (\emph). 128

    +

    short-emalias: short-em-nolong
    +

    + 72

    +

    +

    +As short-footnote but the description must be supplied in options. 115116

    +

    +

    +An abbreviation style that shows the short form with the long form as a footnote on first use. If the insert argument is used with the \gls-like or \glstext-like commands, it will be placed after the short form, before the footnote marker, on first use. On subsequent use, only the short form is shown (followed by insert, if provided). The inline full form shows the short form followed by the long form in parentheses. This style sets the regular attribute to false (which means that the \gls-like commands won’t use the first/firstplural or text/plural values). This style also sets the nohyperfirst attribute to true to avoid nesting the footnote marker link. If you want hyperlinks on first use, use the short-postfootnote style instead. 114115

    +

    +

    +An abbreviation style like short-hyphen-long-hyphen but the description must be supplied. 110

    +

    +

    +An abbreviation style like short-long but checks if the inserted material starts with a hyphen (use with markwords or markshortwords attributes). 108

    +

    +

    +An abbreviation style like short-hyphen-long-hyphen-desc but the insert and parenthetical material are placed in the post-link hook. 110

    +

    +

    +An abbreviation style like short-hyphen-long-hyphen but the insert and parenthetical material are placed in the post-link hook. 109

    +

    +

    +As short-long but the description must be supplied in options. 94

    +

    +

    +An abbreviation style like short-long-user but the description must be supplied. 100

    +

    +

    +An abbreviation style like short-long but includes the value of the field identified by \glsxtruserfield (if set) in the parenthetical content. 100

    +

    +

    +An abbreviation style that shows the short form followed by the long form on first use. If the insert argument is used with the \gls-like or \glstext-like commands, it will be placed after the short form on first use. On subsequent use, only the short form is shown (followed by insert, if provided). This style sets the regular attribute to false (which means that the \gls-like commands won’t use the first/firstplural or text/plural values). 93

    +

    +

    +As short-nolong-desc but it will set the regular attribute to false. 130

    +

    +

    +As short-nolong but the description must be supplied in options. 6666

    +

    +

    +As short-nolong but it will set the regular attribute to false. 130

    +

    +

    +An abbreviation style that only shows the short form on first use and subsequent use. The long form won’t be showed unless you use a command like \glsxtrlong. The full form will only be shown with commands like \glsxtrfull. This style sets the regular attribute to true. 6566

    +

    +

    +As short-postfootnote but the description must be supplied in options. 117118

    +

    +

    +Similar to short-footnote but the footnote is placed in the post-link hook. 116117

    +

    +

    +An abbreviation style like short-postlong-user but the description must be supplied. 102

    +

    +

    +An abbreviation style like short-long but includes the value of the field identified by \glsxtruserfield (if set) in the parenthetical content, which is placed in the post-link hook. 101

    +

    short-sc-descalias: short-sc-nolong-desc
    +

    + 69

    +

    +

    +An abbreviation style like short-footnote-desc but formats the short form in a small caps font (\textsc). The short form should therefore be in lowercase. 119

    +

    +

    +An abbreviation style like short-footnote but formats the short form in a small caps font (\textsc). The short form should therefore be in lowercase. 118

    +

    +

    +An abbreviation style like short-long-desc but formats the short form in a small caps font (\textsc). The short form should therefore be in lowercase. 95

    +

    +

    +An abbreviation style like short-long but formats the short form in a small caps font (\textsc). The short form should therefore be in lowercase. 94

    +

    +

    +An abbreviation style like short-nolong-desc but formats the short form in a small caps font (\textsc). The short form should therefore be in lowercase. 6869

    +

    +

    +An abbreviation style like short-nolong but formats the short form in a small caps font (\textsc). The short form should therefore be in lowercase. 6768

    +

    +

    +An abbreviation style like short-postfootnote-desc but formats the short form in a small caps font (\textsc). The short form should therefore be in lowercase. 121

    +

    +

    +An abbreviation style like short-postfootnote but formats the short form in a small caps font (\textsc). The short form should therefore be in lowercase. 120

    +

    short-scalias: short-sc-nolong
    +

    + 68

    +

    short-sm-descalias: short-sm-nolong-desc
    +

    + 71

    +

    +

    +An abbreviation style like short-footnote-desc but formats the short form in a smaller font (\textsmaller). The relsize package is must be loaded. 123

    +

    +

    +An abbreviation style like short-footnote but formats the short form in a smaller font (\textsmaller). The relsize package is must be loaded. 122

    +

    +

    +An abbreviation style like short-long-desc but formats the short form in a smaller font (\textsmaller). The relsize package is must be loaded. 96

    +

    +

    +An abbreviation style like short-long but formats the short form in a smaller font (\textsmaller). The relsize package is must be loaded. 96

    +

    +

    +An abbreviation style like short-nolong-desc but formats the short form in a smaller font (\textsmaller). The relsize package is must be loaded. 7071

    +

    +

    +An abbreviation style like short-nolong but formats the short form in a smaller font (\textsmaller). The relsize package is must be loaded. 6970

    +

    +

    +An abbreviation style like short-postfootnote-desc but formats the short form in a smaller font (\textsmaller). The relsize package is must be loaded. 125

    +

    +

    +An abbreviation style like short-postfootnote but formats the short form in a smaller font (\textsmaller). The relsize package is must be loaded. 124

    +

    short-smalias: short-sm-nolong
    +

    + 70

    +

    shortalias: short-nolong
    +

    + 66

    + +

    + +
    +

    Glossary Styles Summary

    +The default style may be set with \setglossarystyle or use:
    \usepackage[stylemods=name,style=style-name]{glossaries-extra} 
    where the style is provided by package glossary-name. The default style can be overridden for individual glossaries with the style option. For a summary of all available styles, see Gallery: Predefined Styles.

    +

    +

    +This style displays the glossary in a table for (either longtable or tabular) with two columns: the long form and the short form. §8.7.2.6; 460

    +

    +

    +This style displays the glossary in a table for (either longtable or tabular) with two columns: the short form and the long form. §8.7.2.6; 460

    +

    +

    +As list but starts the description on a new line.

    +

    +

    +Like tree but the width of the widest name must be supplied (using a command like \glssetwidest).

    +

    alttreegroupglossary-tree
    +

    +As alttree but has headers at the start of each group.

    +

    +

    +This style is designed for indexes. Symbols and descriptions are not shown. Since descriptions aren’t shown, there’s no post-description hook. §8.7.1

    +

    +

    +A hierarchical style that supports up to level 2, similar to normal indexes, but symbols and descriptions are shown.

    +

    indexgroupglossary-tree
    +

    +As index but has headers at the start of each group.

    +

    +

    +A compact style with all entries listed in the same paragraph and no groups, locations or symbols.

    +

    +

    +This style uses the description environment and places the entry name in the optional argument of \item. Symbols and sub-entry names are not shown.

    +

    listdottedglossary-list
    +

    +A list-like style that has a dotted leader between the name and description. The location list isn’t shown.

    +

    listgroupglossary-list
    +

    +As list but has headers at the start of each group.

    +

    listhypergroupglossary-list
    +

    +As listgroup but has a row at the start with hyperlinks to each group.

    +

    long-booktabsglossary-longbooktabs v4.21+
    +

    +This style displays the glossary using longtable and horizontal rules from the booktabs package.

    +

    +

    +This style displays the glossary in a table for (either longtable or tabular) with two columns: the description and the name. §8.7.2.1; 449

    +

    +

    +This style displays the glossary in a table for (either longtable or tabular) with three columns: the description, symbol and name. §8.7.2.2; 452

    +

    +

    +This style displays the glossary in a table for (either longtable or tabular) with two columns: the description and the symbol. §8.7.2.5; 457

    +

    +

    +This style displays the glossary in a table for (either longtable or tabular) with three columns: the location list, description and name. §8.7.2.3; 453

    +

    +

    +This style displays the glossary in a table for (either longtable or tabular) with four columns: the location list, description, symbol and name. §8.7.2.4; 455

    +

    +

    +This style displays the glossary in a table for (either longtable or tabular) with four columns: the location list, symbol, description and name. §8.7.2.4; 455

    +

    +

    +This style displays the glossary in a table for (either longtable or tabular) with three columns: the name, description and location list. §8.7.2.3; 452

    +

    +

    +This style displays the glossary in a table for (either longtable or tabular) with four columns: the name, description, symbol and location list. §8.7.2.4; 454

    +

    +

    +This style displays the glossary in a table for (either longtable or tabular) with three columns: the name, description and symbol. §8.7.2.2; 450

    +

    +

    +This style displays the glossary in a table for (either longtable or tabular) with two columns: the name and the description. §8.7.2.1; 449

    +

    +

    +This style displays the glossary in a table for (either longtable or tabular) with four columns: the name, symbol, description and location list. §8.7.2.4; 454

    +

    +

    +This style displays the glossary in a table for (either longtable or tabular) with three columns: the name, symbol and description. §8.7.2.2; 451

    +

    +

    +This style displays the glossary in a table for (either longtable or tabular) with three columns: the symbol, description and name. §8.7.2.2; 451

    +

    +

    +This style displays the glossary in a table for (either longtable or tabular) with two columns: the symbol and the description. §8.7.2.5; 457

    +

    +

    +This style uses the longtable environment (provided by the longtable package). Symbols and sub-entry names are not shown.

    +

    +

    +This style displays the glossary using longtable with ragged right paragraph formatting for the description column.

    +

    +

    +As index but puts the content inside a multicols environment.

    +

    mcolindexgroupglossary-mcols
    +

    +As mcolindex but has headers at the start of each group.

    +

    +

    +As tree but puts the content inside a multicols environment.

    +

    +

    +This style displays the glossary using supertabular.

    +

    +

    +This style displays the glossary using supertabular with ragged right paragraph formatting for the description column.

    +

    +

    +This style is specific to \printunsrttable. §8.7.4; 468

    +

    +

    +This style is designed for hierarchical glossaries where the top-level entry represents a topic. §8.7.3; 461

    +

    +

    +Similar to topic but the sub-entries are placed in a multicols environment. §8.7.3; 461

    +

    +

    +A hierarchical style that supports unlimited levels (although a deep hierarchy may not fit the available line width) with that shows symbols and descriptions.

    +

    treegroupglossary-tree
    +

    +As tree but has headers at the start of each group.

    +

    treehypergroupglossary-tree
    +

    +As treegroup but has a row at the start with hyperlinks to each group.

    +

    treenonameglossary-tree
    +

    +Like tree but the child entries don’t have their name shown.

    + +

    + +
    +

    Command Summary

    + +
    + +
    +

    @

    + +

    +Internal command used within the construction of the glossary code by the “unsrt” family of commands. Should not be used or modified but \printunsrtglossarypredoglossary can be defined to show the definition of this command for debugging purposes. §8.4.3; 399

    +

    \@glsxtr@multientry{options}{multi-label}{main-label}{list}glossaries-extra v1.48+
    +

    +Information in the aux about a multi-label defined in the previous LaTeX run. §7.13; 371

    +

    +

    +Set to the definition of \@starttoc when glossaries-extra loads. §5.3.3; 227

    +

    \@glsxtr@org@markboth{left text}{right text}
    +

    +Set to the definition of \markboth when glossaries-extra loads. §5.3.3; 227

    +

    +

    +Set to the definition of \markright when glossaries-extra loads. §5.3.3; 227

    +

    +

    +Redefines \glsxtrifinmark to do its first argument (true). §5.3.3; 227

    +

    +

    +Redefines \glsxtrifinmark to do its first argument (true). §5.3.3; 227

    + +

    + +
    +

    A

    +
    \AB{options}{entry-label}{inset}modifiers: * + alt-mod
    +

    +A synonym for \cGLS defined by the shortcuts=abbreviations package option. §4.3.2; Table 4.1

    +

    \Ab{options}{entry-label}{inset}modifiers: * + alt-mod
    +

    +A synonym for \cGls defined by the shortcuts=abbreviations package option. §4.3.2; Table 4.1

    +

    \ab{options}{entry-label}{inset}modifiers: * + alt-mod
    +

    +A synonym for \cgls defined by the shortcuts=abbreviations package option. §4.3.2; Table 4.1

    +

    \abbreviationsnameinitial: Abbreviations; glossaries-extra

    +

    (language-sensitive)
    +
    +

    +Expands to the title of the abbreviations glossary. The default is “Abbreviations” or \acronymname if babel has been detected. §2.1; 9

    +

    +

    +Style-sensitive abbreviation suffix. This is the command that’s actually used in the value of the shortplural key when an entry is defined with \newabbreviation (unless suppressed with the noshortplural attribute). This command is redefined by the abbreviation styles to \glsxtrabbrvpluralsuffix or the style’s custom suffix command (such as \glsxtrscsuffix). 171

    +

    \ABP{options}{entry-label}{inset}modifiers: * + alt-mod
    +

    +A synonym for \cGLSpl defined by the shortcuts=abbreviations package option. §4.3.2; Table 4.1

    +

    \Abp{options}{entry-label}{inset}modifiers: * + alt-mod
    +

    +A synonym for \cGlspl defined by the shortcuts=abbreviations package option. §4.3.2; Table 4.1

    +

    \abp{options}{entry-label}{inset}modifiers: * + alt-mod
    +

    +A synonym for \cglspl defined by the shortcuts=abbreviations package option. §4.3.2; Table 4.1

    +

    \AC{options}{entry-label}{inset}modifiers: * + alt-mod
    +

    +A synonym for \cGLS defined by the shortcuts=ac package option. §4.3.2; Table 4.1

    +

    \Ac{options}{entry-label}{inset}modifiers: * + alt-mod
    +

    +A synonym for \cGls or \Gls defined by the shortcuts=ac or shortcuts=acronyms package option, respectively. §4.3.2; Table 4.1

    +

    \ac{options}{entry-label}{inset}modifiers: * + alt-mod
    +

    +A synonym for \cgls or \gls defined by the shortcuts=ac or shortcuts=acronyms package option, respectively. §4.3.2; Table 4.1

    +

    \ACF{options}{entry-label}{inset}modifiers: * + alt-mod
    +

    +A synonym for \GLSxtrfull defined by the shortcuts=ac package option. §4.3.2; Table 4.1

    +

    \Acf{options}{entry-label}{inset}modifiers: * + alt-mod
    +

    +A synonym for \Glsxtrfull or \Acrfull defined by the shortcuts=ac or shortcuts=acronyms package option, respectively. §4.3.2; Table 4.1

    +

    \acf{options}{entry-label}{inset}modifiers: * + alt-mod
    +

    +A synonym for \glsxtrfull or \acrfull defined by the shortcuts=ac or shortcuts=acronyms package option, respectively. §4.3.2; Table 4.1

    +

    \ACFP{options}{entry-label}{inset}modifiers: * + alt-mod
    +

    +A synonym for \GLSxtrfullpl defined by the shortcuts=ac package option. §4.3.2; Table 4.1

    +

    \Acfp{options}{entry-label}{inset}modifiers: * + alt-mod
    +

    +A synonym for \Glsxtrfullpl or \Acrfullpl defined by the shortcuts=ac or shortcuts=acronyms package option, respectively. §4.3.2; Table 4.1

    +

    \acfp{options}{entry-label}{inset}modifiers: * + alt-mod
    +

    +A synonym for \glsxtrfullpl or \acrfullpl defined by the shortcuts=ac or shortcuts=acronyms package option, respectively. §4.3.2; Table 4.1

    +

    \ACL{options}{entry-label}{inset}modifiers: * + alt-mod
    +

    +A synonym for \GLSxtrlong defined by the shortcuts=ac package option. §4.3.2; Table 4.1

    +

    \Acl{options}{entry-label}{inset}modifiers: * + alt-mod
    +

    +A synonym for \Glsxtrlong or \Acrlong defined by the shortcuts=ac or shortcuts=acronyms package option, respectively. §4.3.2; Table 4.1

    +

    \acl{options}{entry-label}{inset}modifiers: * + alt-mod
    +

    +A synonym for \glsxtrlong or \acrlong defined by the shortcuts=ac or shortcuts=acronyms package option, respectively. §4.3.2; Table 4.1

    +

    \ACLP{options}{entry-label}{inset}modifiers: * + alt-mod
    +

    +A synonym for \GLSxtrlongpl defined by the shortcuts=ac package option. §4.3.2; Table 4.1

    +

    \Aclp{options}{entry-label}{inset}modifiers: * + alt-mod
    +

    +A synonym for \Glsxtrlongpl or \Acrlongpl defined by the shortcuts=ac or shortcuts=acronyms package option, respectively. §4.3.2; Table 4.1

    +

    \aclp{options}{entry-label}{inset}modifiers: * + alt-mod
    +

    +A synonym for \glsxtrlongpl or \acrlongpl defined by the shortcuts=ac or shortcuts=acronyms package option, respectively. §4.3.2; Table 4.1

    +

    \ACP{options}{entry-label}{inset}modifiers: * + alt-mod
    +

    +A synonym for \cGLSpl defined by the shortcuts=ac package option. §4.3.2; Table 4.1

    +

    \Acp{options}{entry-label}{inset}modifiers: * + alt-mod
    +

    +A synonym for \cGlspl or \glspl defined by the shortcuts=ac or shortcuts=acronyms package option, respectively. §4.3.2; Table 4.1

    +

    \acp{options}{entry-label}{inset}modifiers: * + alt-mod
    +

    +A synonym for \cglspl or \glspl defined by the shortcuts=ac or shortcuts=acronyms package option, respectively. §4.3.2; Table 4.1

    +

    🛇\Acrfull[options]{entry-label}[insert]modifiers: * + alt-mod
    +

    +As \acrfull but sentence case.

    +

    🛇\acrfull[options]{entry-label}[insert]modifiers: * + alt-mod
    +

    +Displays the full form of an acronym. Only for use with the base glossaries package’s acronym mechanism. This command is not compatible with \newabbreviation.

    +

    🛇\Acrfullpl[options]{entry-label}[insert]modifiers: * + alt-mod
    +

    +As \acrfullpl but sentence case.

    +

    🛇\acrfullpl[options]{entry-label}[insert]modifiers: * + alt-mod
    +

    +Displays the plural full form of an acronym. Only for use with the base glossaries package’s acronym mechanism. This command is not compatible with \newabbreviation.

    +

    🛇\Acrlong[options]{entry-label}[insert]modifiers: * + alt-mod
    +

    +As \acrlong but sentence case.

    +

    🛇\acrlong[options]{entry-label}[insert]modifiers: * + alt-mod
    +

    +Displays the long form of an acronym. Only for use with the base glossaries package’s acronym mechanism. This command is not compatible with \newabbreviation.

    +

    🛇\Acrlongpl[options]{entry-label}[insert]modifiers: * + alt-mod
    +

    +As \acrlong but sentence case.

    +

    🛇\acrlongpl[options]{entry-label}[insert]modifiers: * + alt-mod
    +

    +Displays the plural long form of an acronym. Only for use with the base glossaries package’s acronym mechanism. This command is not compatible with \newabbreviation.

    +

    \acronymfont{text}glossaries v1.0+
    +

    +Used to encapsulate the acronym short form on subsequent use by the base glossaries package. This is redefined by glossaries-extra to use \glsabbrvfont.

    +

    \acronymnameinitial: Acronyms; glossaries

    +

    (language-sensitive)
    +
    +

    +Expands to the title of the acronym glossary.

    +

    +

    +Expands to the label of the default acronym glossary. The acronym or acronyms package option will redefine this to acronym. The abbreviations package option will redefine this to \glsxtrabbrvtype if acronyms/acronym isn’t used. §4.1.4; 44

    +

    🛇\acrpluralsuffix
    +

    +Used for the plural suffixes for the base package’s acronym mechanism. Not used with glossaries-extra’s abbreviations, which use \glsxtrabbrvpluralsuffix, \abbrvpluralsuffix and commands provided for use with particular abbreviation styles. This command should not be used with glossaries-extra.

    +

    🛇\Acrshort[options]{entry-label}[insert]modifiers: * + alt-mod
    +

    +As \acrshort but sentence case.

    +

    🛇\acrshort[options]{entry-label}[insert]modifiers: * + alt-mod
    +

    +Displays the short form of an acronym. Only for use with the base glossaries package’s acronym mechanism. This command is not compatible with \newabbreviation.

    +

    🛇\Acrshortpl[options]{entry-label}[insert]modifiers: * + alt-mod
    +

    +As \acrshort but sentence case.

    +

    🛇\acrshortpl[options]{entry-label}[insert]modifiers: * + alt-mod
    +

    +Displays the plural short form of an acronym. Only for use with the base glossaries package’s acronym mechanism. This command is not compatible with \newabbreviation.

    +

    \ACS{options}{entry-label}{inset}modifiers: * + alt-mod
    +

    +A synonym for \GLSxtrshort defined by the shortcuts=ac package option. §4.3.2; Table 4.1

    +

    \Acs{options}{entry-label}{inset}modifiers: * + alt-mod
    +

    +A synonym for \Glsxtrshort or \Acrshort defined by the shortcuts=ac or shortcuts=acronyms package option, respectively. §4.3.2; Table 4.1

    +

    \acs{options}{entry-label}{inset}modifiers: * + alt-mod
    +

    +A synonym for \glsxtrshort or \acrshort defined by the shortcuts=ac or shortcuts=acronyms package option, respectively. §4.3.2; Table 4.1

    +

    \ACSP{options}{entry-label}{inset}modifiers: * + alt-mod
    +

    +A synonym for \GLSxtrshortpl defined by the shortcuts=ac package option. §4.3.2; Table 4.1

    +

    \Acsp{options}{entry-label}{inset}modifiers: * + alt-mod
    +

    +A synonym for \Glsxtrshortpl or \Acrshortpl defined by the shortcuts=ac or shortcuts=acronyms package option, respectively. §4.3.2; Table 4.1

    +

    \acsp{options}{entry-label}{inset}modifiers: * + alt-mod
    +

    +A synonym for \glsxtrshortpl or \acrshortpl defined by the shortcuts=ac or shortcuts=acronyms package option, respectively. §4.3.2; Table 4.1

    +

    \AF{options}{entry-label}{inset}modifiers: * + alt-mod
    +

    +A synonym for \Glsxtrfull defined by the shortcuts=abbreviations package option. §4.3.2; Table 4.1

    +

    \Af{options}{entry-label}{inset}modifiers: * + alt-mod
    +

    +A synonym for \Glsxtrfull defined by the shortcuts=abbreviations package option. §4.3.2; Table 4.1

    +

    \af{options}{entry-label}{inset}modifiers: * + alt-mod
    +

    +A synonym for \glsxtrfull defined by the shortcuts=abbreviations package option. §4.3.2; Table 4.1

    +

    \AFP{options}{entry-label}{inset}modifiers: * + alt-mod
    +

    +A synonym for \GLSxtrfullpl defined by the shortcuts=abbreviations package option. §4.3.2; Table 4.1

    +

    \Afp{options}{entry-label}{inset}modifiers: * + alt-mod
    +

    +A synonym for \Glsxtrfullpl defined by the shortcuts=abbreviations package option. §4.3.2; Table 4.1

    +

    \afp{options}{entry-label}{inset}modifiers: * + alt-mod
    +

    +A synonym for \glsxtrfullpl defined by the shortcuts=abbreviations package option. §4.3.2; Table 4.1

    +

    \AL{options}{entry-label}{inset}modifiers: * + alt-mod
    +

    +A synonym for \GLSxtrlong defined by the shortcuts=abbreviations package option. §4.3.2; Table 4.1

    +

    \Al{options}{entry-label}{inset}modifiers: * + alt-mod
    +

    +A synonym for \Glsxtrlong defined by the shortcuts=abbreviations package option. §4.3.2; Table 4.1

    +

    \al{options}{entry-label}{inset}modifiers: * + alt-mod
    +

    +A synonym for \glsxtrlong defined by the shortcuts=abbreviations package option. §4.3.2; Table 4.1

    +

    \ALP{options}{entry-label}{inset}modifiers: * + alt-mod
    +

    +A synonym for \GLSxtrlongpl defined by the shortcuts=abbreviations package option. §4.3.2; Table 4.1

    +

    \Alp{options}{entry-label}{inset}modifiers: * + alt-mod
    +

    +A synonym for \Glsxtrlongpl defined by the shortcuts=abbreviations package option. §4.3.2; Table 4.1

    +

    \alp{options}{entry-label}{inset}modifiers: * + alt-mod
    +

    +A synonym for \glsxtrlongpl defined by the shortcuts=abbreviations package option. §4.3.2; Table 4.1

    +

    +

    +Defined with \providecommand, this just does \mathrm{A}. §11.5.8; 573

    +

    \alsonameinitial: see also

    +

    (language-sensitive)
    +
    +

    +Used as a cross-reference tag (provided by language packages, such as babel).

    +

    \andnameinitial: \&
    +

    +Used by \glsseelastsep (provided by glossaries if not already defined).

    +

    \apptoglossarypreamble[type]{text}glossaries-extra v1.12+
    +

    +Appends (locally) text to the preamble for the glossary identified by type. If type is omitted, \glsdefaulttype is assumed. §8.2; 377

    +

    \AS{options}{entry-label}{inset}modifiers: * + alt-mod
    +

    +A synonym for \GLSxtrshort defined by the shortcuts=abbreviations package option. §4.3.2; Table 4.1

    +

    \As{options}{entry-label}{inset}modifiers: * + alt-mod
    +

    +A synonym for \Glsxtrshort defined by the shortcuts=abbreviations package option. §4.3.2; Table 4.1

    +

    \as{options}{entry-label}{inset}modifiers: * + alt-mod
    +

    +A synonym for \glsxtrshort defined by the shortcuts=abbreviations package option. §4.3.2; Table 4.1

    +

    \ASP{options}{entry-label}{inset}modifiers: * + alt-mod
    +

    +A synonym for \GLSxtrshortpl defined by the shortcuts=abbreviations package option. §4.3.2; Table 4.1

    +

    \Asp{options}{entry-label}{inset}modifiers: * + alt-mod
    +

    +A synonym for \Glsxtrshortpl defined by the shortcuts=abbreviations package option. §4.3.2; Table 4.1

    +

    \asp{options}{entry-label}{inset}modifiers: * + alt-mod
    +

    +A synonym for \glsxtrshortpl defined by the shortcuts=abbreviations package option. §4.3.2; Table 4.1

    + +

    + +
    +

    B

    + +

    +Defined with \providecommand, this just does \mathrm{B}. §11.5.8; 573

    +

    \bibgls@input{filename}glossaries-extra v1.49+
    +

    +Indicates that the bib2gls records are in the file identified in the argument filename, which corresponds to the file basename.aux identified in the option bibglsaux=basename.

    +

    \bibglsdualprefixlabel{label-prefix}bib2gls v1.8+
    +

    +Hook written to the glstex file identifying the dual label prefix. §11.5.7; 571

    +

    \bibglsnewdualindexsymbolsecondary{label}{options}{name}{description}bib2gls
    +

    +Defines secondary terms provided with @dualindexsymbol.

    +

    \bibglsprimaryprefixlabel{label-prefix}bib2gls v1.8+
    +

    +Hook written to the glstex file identifying the primary label prefix. §11.5.7; 571

    +

    \bibglssetlastgrouptitle{cs}{specs}bib2gls
    +

    +Sets the last group title.

    +

    \bibglssetlocationrecordcount{entry-label}{counter}{location}{value}bib2gls v1.1+
    +

    +Sets the location record count for the given entry. §11.4.2; 532

    +

    \bibglssetrecordcount{entry-label}{counter}{value}bib2gls v1.1+
    +

    +Sets the counter record count for the given entry. §11.4.2; 532

    +

    \bibglssettotalrecordcount{entry-label}{value}bib2gls v1.1+
    +

    +Sets the total record count for the given entry. §11.4.2; 531

    +

    \bibglstertiaryprefixlabel{label-prefix}bib2gls v1.8+
    +

    +Hook written to the glstex file identifying the tertiary label prefix. §11.5.7; 571

    + +

    + +
    +

    C

    +
    \capitalisefmtwords{text}mfirstuc v2.03+
    +

    +Converts text to title case, where text may contain text-block commands. The starred form only permits a text-block command at the start of the argument. Limitations apply, see the mfirstuc documentation for further details, either:

    texdoc mfirstuc
    or visit ctan.org/pkg/mfirstuc.

    +

    \capitalisewords{text}mfirstuc v1.06+
    +

    +Converts text to title case. Limitations apply, see the mfirstuc documentation for further details, either:

    texdoc mfirstuc
    or visit ctan.org/pkg/mfirstuc.

    +

    \cGLS[options]{entry-label}[insert]modifiers: * + alt-mod
    +

    +Like \GLS but hooks into the entry counting mechanism. §6.1; 311

    +

    \cGls[options]{entry-label}[insert]modifiers: * + alt-mod glossaries v4.14+
    +

    +Like \Gls but hooks into the entry counting mechanism. §6.1; 310

    +

    \cgls[options]{entry-label}[insert]modifiers: * + alt-mod glossaries v4.14+
    +

    +Like \gls but hooks into the entry counting mechanism. §6.1; 309

    +

    \cGLSformat{entry-label}{insert}
    +

    +Format used by \cGLS if the entry was not used more than the given trigger value on the previous run. §6.1; 311

    +

    \cGlsformat{entry-label}{insert}glossaries v4.14+
    +

    +Format used by \cGls if the entry was not used more than the given trigger value on the previous run. §6.1; 310

    +

    \cglsformat{entry-label}{insert}glossaries v4.14+
    +

    +Format used by \cgls if the entry was not used more than the given trigger value on the previous run. §6.1; 310

    +

    \cGLSpl[options]{entry-label}[insert]modifiers: * + alt-mod
    +

    +Like \GLSpl but hooks into the entry counting mechanism. §6.1; 311

    +

    \cGlspl[options]{entry-label}[insert]modifiers: * + alt-mod glossaries v4.14+
    +

    +Like \Glspl but hooks into the entry counting mechanism. §6.1; 310

    +

    \cglspl[options]{entry-label}[insert]modifiers: * + alt-mod glossaries v4.14+
    +

    +Like \glspl but hooks into the entry counting mechanism. §6.1; 310

    +

    \cGLSplformat{entry-label}{insert}
    +

    +Format used by \cGLSpl if the entry was not used more than the given trigger value on the previous run. §6.1; 311

    +

    \cGlsplformat{entry-label}{insert}glossaries v4.14+
    +

    +Format used by \cGlspl if the entry was not used more than the given trigger value on the previous run. §6.1; 311

    +

    \cglsplformat{entry-label}{insert}glossaries v4.14+
    +

    +Format used by \cglspl if the entry was not used more than the given trigger value on the previous run. §6.1; 310

    +

    +

    +Defined with \providecommand, this just does \mathrm{X}. §11.5.8; 573

    +

    \csGlsXtrLetField{entry-label}{field-label}{cs-name}glossaries-extra v1.12+
    +

    +Like \GlsXtrLetField but internally uses (etoolbox’s) \csletcs instead of \cslet. §3.5; 40

    +

    \currentglossaryglossaries v3.0+
    +

    +Defined by the \print…glossary commands to the current glossary label.

    +

    +

    +Expands to the default field definitions for the entry. §4.5.3.1; 165

    + +

    + +
    +

    D

    +
    \defglsentryfmt[type]{display}glossaries
    +

    +Overrides the default display format (\glsentryfmt) for the given glossary. If type is omitted, \glsdefaulttype is assumed. This will make the \gls-like commands do display for any entries that have the type field set to the given type. If you want to support any abbreviation styles, you need to include \glssetabbrvfmt in display. Non-regular abbreviation styles are designed to work with \glsxtrgenabbrvfmt.

    +

    \delimNglossaries
    +

    +Used as a separator between locations.

    +

    \delimRglossaries
    +

    +Used between the start and end of a location range.

    +

    \descriptionnameinitial: Description; glossaries

    +

    (language-sensitive)
    +
    +

    +Expands to the title of the description column for headed tabular-like styles.

    +

    \dGLS[options]{entry-label}[insert]modifiers: * + alt-mod glossaries-extra-bib2gls v1.37+
    +

    +As \dgls but uses \GLS. §11.5.7; 565

    +

    \dGls[options]{entry-label}[insert]modifiers: * + alt-mod glossaries-extra-bib2gls v1.37+
    +

    +As \dgls but uses \Gls. §11.5.7; 565

    +

    \dgls[options]{entry-label}[insert]modifiers: * + alt-mod glossaries-extra-bib2gls v1.37+
    +

    +Does \gls[options]{prefix{entry-label}}[insert] for the first prefix in the prefix list that matches a defined entry. §11.5.7; 564

    +

    \dGlsdisp[options]{entry-label}{text}modifiers: * + alt-mod glossaries-extra-bib2gls v1.49+
    +

    +As \dglsdisp but applies sentence case. §11.5.7; 565

    +

    \dglsdisp[options]{entry-label}{text}modifiers: * + alt-mod glossaries-extra-bib2gls v1.37+
    +

    +As \dgls but uses \glsdisp. §11.5.7; 565

    +

    \dGLSfield[options]{entry-label}{field-label}{text}modifiers: * + alt-mod glossaries-extra-bib2gls v1.49+
    +

    +As \dglsfield but all caps. §11.5.7; 566

    +

    \dGlsfield[options]{entry-label}{field-label}{text}modifiers: * + alt-mod glossaries-extra-bib2gls v1.49+
    +

    +As \dglsfield but applies sentence case. §11.5.7; 566

    +

    \dglsfield[options]{entry-label}{field-label}{text}modifiers: * + alt-mod glossaries-extra-bib2gls v1.49+
    +

    +As \dgls but selects the first matching label that has an entry with the field set. §11.5.7; 566

    +

    +

    +Set by the \dglsfield family of commands to the actual field used. This will either be the requested field or the fallback field. §11.5.7; 567

    +

    +

    +Set by the \dglsfield family of commands to the given field-label. §11.5.7; 567

    +

    +

    +Expands to the fallback field to use for the \dglsfield family of commands. §11.5.7; 567

    +

    \dGlslink[options]{entry-label}{text}modifiers: * + alt-mod glossaries-extra-bib2gls v1.49+
    +

    +As \dglslink but applies sentence case. §11.5.7; 565

    +

    \dglslink[options]{entry-label}{text}modifiers: * + alt-mod glossaries-extra-bib2gls v1.37+
    +

    +As \dgls but uses \glslink. §11.5.7; 565

    +

    \dGLSpl[options]{entry-label}[insert]modifiers: * + alt-mod glossaries-extra-bib2gls v1.37+
    +

    +As \dgls but uses \GLSpl. §11.5.7; 565

    +

    \dGlspl[options]{entry-label}[insert]modifiers: * + alt-mod glossaries-extra-bib2gls v1.37+
    +

    +As \dgls but uses \Glspl. §11.5.7; 565

    +

    \dglspl[options]{entry-label}[insert]modifiers: * + alt-mod glossaries-extra-bib2gls v1.37+
    +

    +As \dgls but uses \glspl. §11.5.7; 564

    +

    +

    +Defined with \providecommand, this just does \mathrm{F}. §11.5.8; 573

    +

    \doifglossarynoexistsordo{glossary-type}{true}{false}glossaries v4.19+
    +

    +If the glossary given by glossary-type doesn’t exist, this does true, otherwise it generates an error and does false. This uses the starred form of \ifglossaryexists to test for existence.

    +

    \DTLformatlist{csv-list}datatool-base v2.28+
    +

    +Formats the comma-separated list csv-list. One-level expansion is performed on csv-list. See the datatool documentation for further details, either:

    texdoc datatool
    or visit ctan.org/pkg/datatool.

    +

    \DTLifinlist{element}{csv-list}{true}{false}datatool-base
    +

    +Does true if element is contained in the comma-separated list csv-list, otherwise does false. One-level expansion is performed on csv-list, but not on element. See the datatool documentation for further details, either:

    texdoc datatool
    or visit ctan.org/pkg/datatool.

    + +

    + +
    +

    E

    +
    \eglssetwidest[level]{name}glossaries-extra-stylemods v1.05+
    +

    +As \glssetwidest but expands text. §8.6.5.4; 434

    +

    \eglsupdatewidest[level]{name}glossaries-extra-stylemods v1.23+
    +

    +As \glsupdatewidest but expands name. §8.6.5.4; 434

    +

    \eGlsXtrSetField{entry-label}{field-label}{value}glossaries-extra v1.12+
    +

    +As \GlsXtrSetField but expands the value. §3.5; 40

    +

    \entrynameinitial: Notation; glossaries

    +

    (language-sensitive)
    +
    +

    +Expands to the title of the name column for headed tabular-like styles.

    +

    +

    +Defined with \providecommand, this just does \mathrm{E}. §11.5.8; 573

    +

    +

    +Defined with \providecommand, this just does \mathrm{H}. §11.5.8; 573

    +

    +

    +Expands to additional fields that need to be set with \newabbreviation. §4.5.3.1; 164

    + +

    + +
    +

    F

    +
    \firstacronymfont{text}glossaries v1.14+
    +

    +Used to encapsulate the acronym short form on first use by the base glossaries package. This is redefined by glossaries-extra to use \glsfirstabbrvfont.

    +

    \forallabbreviationlists{cs}{body}glossaries-extra v1.42+
    +

    +Iterates overall all lists of abbreviations, defines the command cs to the current label and does body. §8; 376

    +

    🛇\forallacronyms{cs}{body}glossaries v4.08+
    +

    +Iterates overall all glossaries that have been declared lists of acronyms, defines the command cs to the current label and does body. Use \forallabbreviationlists with glossaries-extra.

    +

    \forallglossaries[types]{cs}{body}glossaries
    +

    +Iterates overall all the glossary labels given in the types argument, defines the command cs to the current label and does body. If the optional argument is omitted, the list of all non-ignored glossaries is assumed.

    +

    \forallglsentries[types]{cs}{body}glossaries
    +

    +Does \forglsentries for each glossary. The optional argument types is a comma-separated list of glossary labels. If omitted, all non-ignored glossaries is assumed.

    +

    \forglsentries[type]{cs}{body}glossaries
    +

    +Iterates over all entries in the given glossary and, at each iteration, defines the command cs to the current entry label and does body. The optional argument type is the glossary label and defaults to \glsdefaulttype if omitted. This command can’t be used with bib2gls since there are no defined entries until bib2gls has selected them and added them to the glstex file.

    + +

    + +
    +

    G

    +
    \gglssetwidest[level]{name}glossaries-extra-stylemods v1.21+
    +

    +As \glssetwidest but global. §8.6.5.4; 434

    +

    \gglsupdatewidest[level]{name}glossaries-extra-stylemods v1.23+
    +

    +As \glsupdatewidest but global. §8.6.5.4; 434

    +

    \gGlsXtrSetField{entry-label}{field-label}{value}glossaries-extra v1.12+
    +

    +As \GlsXtrSetField but globally assigns the value. §3.5; 40

    + +

    + +
    +

    Glo

    +
    \glolinkprefixinitial: glo:; glossaries
    +

    +Expands to the default prefix for the entry’s hypertarget anchor in the glossary.

    +

    \GlossariesAbbrStyleTooComplexWarningglossaries-extra v1.49+
    +

    +Issues a warning with \GlossariesExtraWarning when a command is used that isn’t supported by a complex abbreviation style.

    +

    \glossariesextrasetup{options}
    +

    +Change allowed options that are defined or modified by the glossaries-extra package. Note that some options can only be passed as package options. §2; 8

    +

    \GlossariesExtraWarning{message}
    +

    +Writes a warning in the transcript with the current line number. The nowarn option redefines this command to do nothing.

    +

    \GlossariesExtraWarningNoLine{message}glossaries-extra
    +

    +Writes a warning in the transcript without a corresponding line number. The nowarn option redefines this command to do nothing.

    +

    \glossaryentrynumbers{location list}glossaries
    +

    +Used within the glossary to encapsulate the location list (redefined by the nonumberlist option).

    +

    \glossaryheaderglossaries
    +

    +Inserted after \begin{theglossary}. This command should be redefined by the glossary style.

    +

    \glossarynameinitial: Glossary

    +

    (language-sensitive)
    +
    +

    +Expands to the default glossary title (provided by glossaries if not already defined).

    +

    \glossarypostambleglossaries
    +

    +Used at the end of the glossary.

    +

    \glossarypreambleglossaries
    +

    +Used at the start of the glossary. This will be locally redefined to the preamble associated with the current glossary, if one has been set.

    +

    \glossarysection[toc-title]{title}glossaries
    +

    +Occurs at the start of a glossary (except with \printunsrtinnerglossary). This will typically be defined to use a sectioning command, such as \section or \chapter. The default definition follows the section and numberedsection options.

    +

    \glossarytitleglossaries
    +

    +Initialised by the \print…glossary set of commands (such as \printglossary) to the current glossary’s title.

    +

    \glossarytoctitleglossaries
    +

    +Initialised by the \print…glossary set of commands (such as \printglossary) to the current glossary’s table of contents title.

    +

    \glossentry{entry label}{location list}glossaries v3.08+
    +

    +Used to format a top-level entry. This command should be redefined by the glossary style.

    +

    \Glossentrydesc{entry-label}glossaries v3.08a+
    +

    +As \glossentrydesc but sentence case.

    +

    \glossentrydesc{entry-label}glossaries v3.08a+
    +

    +Used by glossary styles to display the entry’s description.

    +

    \Glossentryname{entry-label}glossaries v3.08a+
    +

    +As \glossentryname but sentence case.

    +

    \glossentryname{entry-label}glossaries v3.08a+
    +

    +Used by glossary styles to display the entry’s name.

    +

    \glossentrynameother{entry-label}{field-label}glossaries-extra v1.22+
    +

    +Behaves like \glossentryname but uses the given field (identified by its internal label) instead of name. §8.6; 419

    +

    \Glossentrysymbol{entry-label}glossaries v3.08a+
    +

    +As \glossentrysymbol but sentence case.

    +

    \glossentrysymbol{entry-label}glossaries v3.08a+
    +

    +Used by glossary styles to display the entry’s symbol.

    +

    +

    +Used at the start of each glossary to set the current options for the \glsxtrp set of commands (with \glsxtrsetpopts). §5.4; 231

    + +

    + +
    +

    Gls

    +
    \GLS[options]{entry-label}[insert]modifiers: * + alt-mod glossaries
    +

    +As \gls but converts the link text to all caps.

    +

    \Gls[options]{entry-label}[insert]modifiers: * + alt-mod glossaries
    +

    +As \gls but converts the first character of the link text to uppercase (for the start of a sentence) using \makefirstuc.

    +

    \gls[options]{entry-label}[insert]modifiers: * + alt-mod glossaries
    +

    +References the entry identified by entry-label. The text produced depends on whether or not this is the first use and whether or not the regular attribute has been set. The insert argument may be inserted at the end of the link text or may be inserted at a different point (for example, after the long form on first use for some abbreviation styles. For the first optional argument, see \glslink options.

    +

    +

    +Formatting command for the short form used by the abbreviation styles that don’t apply a font change by default. 132

    +

    +

    +Short form font used by the “em” abbreviation styles. 158

    +

    \glsabbrvfont{text}
    +

    +Font formatting command for the short form, initialised by the abbreviation style. 171

    +

    +

    +Short form font used by the “hyphen” abbreviation styles. 148

    +

    +

    +Short form font used by the “only” abbreviation styles. 154

    +

    +

    +Short form font used by the small caps “sc” abbreviation styles. 156

    +

    +

    +Short form font used by the “sc-only” styles, such as long-only-short-sc-only. 154

    +

    +

    +Short form font used by the small caps “sc-user” abbreviation styles. 136

    +

    +

    +Short form font used by the “sm” abbreviation styles. 157

    +

    +

    +Short form font used by the “user” abbreviation styles. 135

    +

    \glsabspace{label}glossaries-extra v1.49+
    +

    +As \glsacspace but includes inner formatting. Unlike \glsacspace, this command is robust.

    +

    \GLSaccessdesc{entry-label}
    +

    +The all caps version of \glsaccessdesc. §9.2; 480

    +

    \Glsaccessdesc{entry-label}
    +

    +The sentence case version of \glsaccessdesc. §9.2; 480

    +

    \glsaccessdesc{entry-label}
    +

    +If accessibility support was enabled when glossaries-extra was loaded (accsupp) this will display the value of the description key with the accessibility support enabled for that key (descriptionaccess). If there is no accessibility support, this just uses \glsentrydesc. §9.2; 480

    +

    \GLSaccessdescplural{entry-label}
    +

    +The all caps version of \glsaccessdescplural. §9.2; 480

    +

    \Glsaccessdescplural{entry-label}
    +

    +The sentence case version of \glsaccessdescplural. §9.2; 480

    +

    \glsaccessdescplural{entry-label}
    +

    +If accessibility support was enabled when glossaries-extra was loaded (accsupp) this will display the value of the descriptionplural key with the accessibility support enabled for that key (descriptionpluralaccess). If there is no accessibility support, this just uses \glsentrydescplural. §9.2; 480

    +

    \GLSaccessfirst{entry-label}
    +

    +The all caps version of \glsaccessfirst. §9.2; 478

    +

    \Glsaccessfirst{entry-label}
    +

    +The sentence case version of \glsaccessfirst. §9.2; 478

    +

    \glsaccessfirst{entry-label}
    +

    +If accessibility support was enabled when glossaries-extra was loaded (accsupp) this will display the value of the first key with the accessibility support enabled for that key (firstaccess). If there is no accessibility support, this just uses \glsentryfirst. §9.2; 478

    +

    \GLSaccessfirstplural{entry-label}
    +

    +The all caps version of \glsaccessfirstplural. §9.2; 479

    +

    \Glsaccessfirstplural{entry-label}
    +

    +The sentence case version of \glsaccessfirstplural. §9.2; 479

    +

    \glsaccessfirstplural{entry-label}
    +

    +If accessibility support was enabled when glossaries-extra was loaded (accsupp) this will display the value of the firstplural key with the accessibility support enabled for that key (firstpluralaccess). If there is no accessibility support, this just uses \glsentryfirstplural. §9.2; 479

    +

    \GLSaccessfmtdesc{insert}{cs}{entry-label}glossaries-extra v1.49+
    +

    +Similar to \GLSaccessdesc but formats the displayed text with \GLSfmtfield. §9.3; 487

    +

    \Glsaccessfmtdesc{insert}{cs}{entry-label}glossaries-extra v1.49+
    +

    +Similar to \Glsaccessdesc but formats the displayed text with \Glsfmtfield. §9.3; 487

    +

    \glsaccessfmtdesc{insert}{cs}{entry-label}glossaries-extra v1.49+
    +

    +Similar to \glsaccessdesc but formats the displayed text with \glsfmtfield. §9.3; 487

    +

    \GLSaccessfmtdescplural{insert}{cs}{entry-label}glossaries-extra v1.49+
    +

    +Similar to \GLSaccessdescplural but formats the displayed text with \GLSfmtfield. §9.3; 488

    +

    \Glsaccessfmtdescplural{insert}{cs}{entry-label}glossaries-extra v1.49+
    +

    +Similar to \Glsaccessdescplural but formats the displayed text with \Glsfmtfield. §9.3; 488

    +

    \glsaccessfmtdescplural{insert}{cs}{entry-label}glossaries-extra v1.49+
    +

    +Similar to \glsaccessdescplural but formats the displayed text with \glsfmtfield. §9.3; 487

    +

    \GLSaccessfmtfirst{insert}{cs}{entry-label}glossaries-extra v1.49+
    +

    +Similar to \GLSaccessfirst but formats the displayed text with \GLSfmtfield. §9.3; 486

    +

    \Glsaccessfmtfirst{insert}{cs}{entry-label}glossaries-extra v1.49+
    +

    +Similar to \Glsaccessfirst but formats the displayed text with \Glsfmtfield. §9.3; 486

    +

    \glsaccessfmtfirst{insert}{cs}{entry-label}glossaries-extra v1.49+
    +

    +Similar to \glsaccessfirst but formats the displayed text with \glsfmtfield. §9.3; 486

    +

    \GLSaccessfmtfirstplural{insert}{cs}{entry-label}glossaries-extra v1.49+
    +

    +Similar to \GLSaccessfirstplural but formats the displayed text with \GLSfmtfield. §9.3; 486

    +

    \Glsaccessfmtfirstplural{insert}{cs}{entry-label}glossaries-extra v1.49+
    +

    +Similar to \Glsaccessfirstplural but formats the displayed text with \Glsfmtfield. §9.3; 486

    +

    \glsaccessfmtfirstplural{insert}{cs}{entry-label}glossaries-extra v1.49+
    +

    +Similar to \glsaccessfirstplural but formats the displayed text with \glsfmtfield. §9.3; 486

    +

    \GLSaccessfmtlong{insert}{cs}{entry-label}glossaries-extra v1.49+
    +

    +Similar to \GLSaccesslong but formats the displayed text with \GLSfmtfield. §9.3; 489

    +

    \Glsaccessfmtlong{insert}{cs}{entry-label}glossaries-extra v1.49+
    +

    +Similar to \Glsaccesslong but formats the displayed text with \Glsfmtfield. §9.3; 489

    +

    \glsaccessfmtlong{insert}{cs}{entry-label}glossaries-extra v1.49+
    +

    +Similar to \glsaccesslong but formats the displayed text with \glsfmtfield. §9.3; 489

    +

    \GLSaccessfmtlongpl{insert}{cs}{entry-label}glossaries-extra v1.49+
    +

    +Similar to \GLSaccesslongpl but formats the displayed text with \GLSfmtfield. §9.3; 489

    +

    \Glsaccessfmtlongpl{insert}{cs}{entry-label}glossaries-extra v1.49+
    +

    +Similar to \Glsaccesslongpl but formats the displayed text with \Glsfmtfield. §9.3; 489

    +

    \glsaccessfmtlongpl{insert}{cs}{entry-label}glossaries-extra v1.49+
    +

    +Similar to \glsaccesslongpl but formats the displayed text with \glsfmtfield. §9.3; 489

    +

    \GLSaccessfmtname{insert}{cs}{entry-label}glossaries-extra v1.49+
    +

    +Similar to \GLSaccessname but formats the displayed text with \GLSfmtfield. §9.3; 485

    +

    \Glsaccessfmtname{insert}{cs}{entry-label}glossaries-extra v1.49+
    +

    +Similar to \Glsaccessname but formats the displayed text with \Glsfmtfield. §9.3; 485

    +

    \glsaccessfmtname{insert}{cs}{entry-label}glossaries-extra v1.49+
    +

    +Similar to \glsaccessname but formats the displayed text with \glsfmtfield. §9.3; 484

    +

    \GLSaccessfmtplural{insert}{cs}{entry-label}glossaries-extra v1.49+
    +

    +Similar to \GLSaccessplural but formats the displayed text with \GLSfmtfield. §9.3; 485

    +

    \Glsaccessfmtplural{insert}{cs}{entry-label}glossaries-extra v1.49+
    +

    +Similar to \Glsaccessplural but formats the displayed text with \Glsfmtfield. §9.3; 485

    +

    \glsaccessfmtplural{insert}{cs}{entry-label}glossaries-extra v1.49+
    +

    +Similar to \glsaccessplural but formats the displayed text with \glsfmtfield. §9.3; 485

    +

    \GLSaccessfmtshort{insert}{cs}{entry-label}glossaries-extra v1.49+
    +

    +Similar to \GLSaccessshort but formats the displayed text with \GLSfmtfield. §9.3; 488

    +

    \Glsaccessfmtshort{insert}{cs}{entry-label}glossaries-extra v1.49+
    +

    +Similar to \Glsaccessshort but formats the displayed text with \Glsfmtfield. §9.3; 488

    +

    \glsaccessfmtshort{insert}{cs}{entry-label}glossaries-extra v1.49+
    +

    +Similar to \glsaccessshort but formats the displayed text with \glsfmtfield. §9.3; 488

    +

    \GLSaccessfmtshortpl{insert}{cs}{entry-label}glossaries-extra v1.49+
    +

    +Similar to \GLSaccessshortpl but formats the displayed text with \GLSfmtfield. §9.3; 488

    +

    \Glsaccessfmtshortpl{insert}{cs}{entry-label}glossaries-extra v1.49+
    +

    +Similar to \Glsaccessshortpl but formats the displayed text with \Glsfmtfield. §9.3; 488

    +

    \glsaccessfmtshortpl{insert}{cs}{entry-label}glossaries-extra v1.49+
    +

    +Similar to \glsaccessshortpl but formats the displayed text with \glsfmtfield. §9.3; 488

    +

    \GLSaccessfmtsymbol{insert}{cs}{entry-label}glossaries-extra v1.49+
    +

    +Similar to \GLSaccesssymbol but formats the displayed text with \GLSfmtfield. §9.3; 487

    +

    \Glsaccessfmtsymbol{insert}{cs}{entry-label}glossaries-extra v1.49+
    +

    +Similar to \Glsaccesssymbol but formats the displayed text with \Glsfmtfield. §9.3; 486

    +

    \glsaccessfmtsymbol{insert}{cs}{entry-label}glossaries-extra v1.49+
    +

    +Similar to \glsaccesssymbol but formats the displayed text with \glsfmtfield. §9.3; 486

    +

    \GLSaccessfmtsymbolplural{insert}{cs}{entry-label}glossaries-extra v1.49+
    +

    +Similar to \GLSaccesssymbolplural but formats the displayed text with \GLSfmtfield. §9.3; 487

    +

    \Glsaccessfmtsymbolplural{insert}{cs}{entry-label}glossaries-extra v1.49+
    +

    +Similar to \Glsaccesssymbolplural but formats the displayed text with \Glsfmtfield. §9.3; 487

    +

    \glsaccessfmtsymbolplural{insert}{cs}{entry-label}glossaries-extra v1.49+
    +

    +Similar to \glsaccesssymbolplural but formats the displayed text with \glsfmtfield. §9.3; 487

    +

    \GLSaccessfmttext{insert}{cs}{entry-label}glossaries-extra v1.49+
    +

    +Similar to \GLSaccesstext but formats the displayed text with \GLSfmtfield. §9.3; 485

    +

    \Glsaccessfmttext{insert}{cs}{entry-label}glossaries-extra v1.49+
    +

    +Similar to \Glsaccesstext but formats the displayed text with \Glsfmtfield. §9.3; 485

    +

    \glsaccessfmttext{insert}{cs}{entry-label}glossaries-extra v1.49+
    +

    +Similar to \glsaccesstext but formats the displayed text with \glsfmtfield. §9.3; 485

    +

    \GLSaccessfmtuseri{insert}{cs}{entry-label}glossaries-extra v1.49+
    +

    +Similar to \GLSaccessuseri but formats the displayed text with \GLSfmtfield. §9.3; 490

    +

    \Glsaccessfmtuseri{insert}{cs}{entry-label}glossaries-extra v1.49+
    +

    +Similar to \Glsaccessuseri but formats the displayed text with \Glsfmtfield. §9.3; 489

    +

    \glsaccessfmtuseri{insert}{cs}{entry-label}glossaries-extra v1.49+
    +

    +Similar to \glsaccessuseri but formats the displayed text with \glsfmtfield. §9.3; 489

    +

    \GLSaccessfmtuserii{insert}{cs}{entry-label}glossaries-extra v1.49+
    +

    +Similar to \GLSaccessuserii but formats the displayed text with \GLSfmtfield. §9.3; 490

    +

    \Glsaccessfmtuserii{insert}{cs}{entry-label}glossaries-extra v1.49+
    +

    +Similar to \Glsaccessuserii but formats the displayed text with \Glsfmtfield. §9.3; 490

    +

    \glsaccessfmtuserii{insert}{cs}{entry-label}glossaries-extra v1.49+
    +

    +Similar to \glsaccessuserii but formats the displayed text with \glsfmtfield. §9.3; 490

    +

    \GLSaccessfmtuseriii{insert}{cs}{entry-label}glossaries-extra v1.49+
    +

    +Similar to \GLSaccessuseriii but formats the displayed text with \GLSfmtfield. §9.3; 490

    +

    \Glsaccessfmtuseriii{insert}{cs}{entry-label}glossaries-extra v1.49+
    +

    +Similar to \Glsaccessuseriii but formats the displayed text with \Glsfmtfield. §9.3; 490

    +

    \glsaccessfmtuseriii{insert}{cs}{entry-label}glossaries-extra v1.49+
    +

    +Similar to \glsaccessuseriii but formats the displayed text with \glsfmtfield. §9.3; 490

    +

    \GLSaccessfmtuseriv{insert}{cs}{entry-label}glossaries-extra v1.49+
    +

    +Similar to \GLSaccessuseriv but formats the displayed text with \GLSfmtfield. §9.3; 491

    +

    \Glsaccessfmtuseriv{insert}{cs}{entry-label}glossaries-extra v1.49+
    +

    +Similar to \Glsaccessuseriv but formats the displayed text with \Glsfmtfield. §9.3; 491

    +

    \glsaccessfmtuseriv{insert}{cs}{entry-label}glossaries-extra v1.49+
    +

    +Similar to \glsaccessuseriv but formats the displayed text with \glsfmtfield. §9.3; 490

    +

    \GLSaccessfmtuserv{insert}{cs}{entry-label}glossaries-extra v1.49+
    +

    +Similar to \GLSaccessuserv but formats the displayed text with \GLSfmtfield. §9.3; 491

    +

    \Glsaccessfmtuserv{insert}{cs}{entry-label}glossaries-extra v1.49+
    +

    +Similar to \Glsaccessuserv but formats the displayed text with \Glsfmtfield. §9.3; 491

    +

    \glsaccessfmtuserv{insert}{cs}{entry-label}glossaries-extra v1.49+
    +

    +Similar to \glsaccessuserv but formats the displayed text with \glsfmtfield. §9.3; 491

    +

    \GLSaccessfmtuservi{insert}{cs}{entry-label}glossaries-extra v1.49+
    +

    +Similar to \GLSaccessuservi but formats the displayed text with \GLSfmtfield. §9.3; 491

    +

    \Glsaccessfmtuservi{insert}{cs}{entry-label}glossaries-extra v1.49+
    +

    +Similar to \Glsaccessuservi but formats the displayed text with \Glsfmtfield. §9.3; 491

    +

    \glsaccessfmtuservi{insert}{cs}{entry-label}glossaries-extra v1.49+
    +

    +Similar to \glsaccessuservi but formats the displayed text with \glsfmtfield. §9.3; 491

    +

    \glsaccessibility[options]{PDF element}{value}{content}glossaries-accsupp v4.45+
    +

    +Applies value as the accessibility attribute PDF element for the given content. This internally uses the accessibility support provided by accsupp.

    +

    \GLSaccesslong{entry-label}
    +

    +The all caps version of \glsaccesslong. §9.2; 481

    +

    \Glsaccesslong{entry-label}
    +

    +The sentence case version of \glsaccesslong. §9.2; 481

    +

    \glsaccesslong{entry-label}
    +

    +If accessibility support was enabled when glossaries-extra was loaded (accsupp) this will display the value of the long key with the accessibility support enabled for that key (longaccess). If there is no accessibility support, this just uses \glsentrylong. §9.2; 481

    +

    \GLSaccesslongpl{entry-label}
    +

    +The all caps version of \glsaccesslongpl. §9.2; 482

    +

    \Glsaccesslongpl{entry-label}
    +

    +The sentence case version of \glsaccesslongpl. §9.2; 482

    +

    \glsaccesslongpl{entry-label}
    +

    +If accessibility support was enabled when glossaries-extra was loaded (accsupp) this will display the value of the longplural key with the accessibility support enabled for that key (longpluralaccess). If there is no accessibility support, this just uses \glsentrylongpl. §9.2; 482

    +

    \GLSaccessname{entry-label}
    +

    +The all caps version of \glsaccessname. §9.2; 477

    +

    \Glsaccessname{entry-label}
    +

    +The sentence case version of \glsaccessname. §9.2; 477

    +

    \glsaccessname{entry-label}
    +

    +If accessibility support was enabled when glossaries-extra was loaded (accsupp) this will display the value of the name key with the accessibility support enabled for that key (access). If there is no accessibility support, this just uses \glsentryname. §9.2; 477

    +

    \GLSaccessplural{entry-label}
    +

    +The all caps version of \glsaccessplural. §9.2; 478

    +

    \Glsaccessplural{entry-label}
    +

    +The sentence case version of \glsaccessplural. §9.2; 478

    +

    \glsaccessplural{entry-label}
    +

    +If accessibility support was enabled when glossaries-extra was loaded (accsupp) this will display the value of the plural key with the accessibility support enabled for that key (pluralaccess). If there is no accessibility support, this just uses \glsentryplural. §9.2; 478

    +

    \GLSaccessshort{entry-label}
    +

    +The all caps version of \glsaccessshort. §9.2; 481

    +

    \Glsaccessshort{entry-label}
    +

    +The sentence case version of \glsaccessshort. §9.2; 481

    +

    \glsaccessshort{entry-label}
    +

    +If accessibility support was enabled when glossaries-extra was loaded (accsupp) this will display the value of the short key with the accessibility support enabled for that key (shortaccess). If there is no accessibility support, this just uses \glsentryshort. §9.2; 480

    +

    \GLSaccessshortpl{entry-label}
    +

    +The all caps version of \glsaccessshortpl. §9.2; 481

    +

    \Glsaccessshortpl{entry-label}
    +

    +The sentence case version of \glsaccessshortpl. §9.2; 481

    +

    \glsaccessshortpl{entry-label}
    +

    +If accessibility support was enabled when glossaries-extra was loaded (accsupp) this will display the value of the shortplural key with the accessibility support enabled for that key (shortpluralaccess). If there is no accessibility support, this just uses \glsentryshortpl. §9.2; 481

    +

    \GLSaccesssymbol{entry-label}
    +

    +The all caps version of \glsaccesssymbol. §9.2; 479

    +

    \Glsaccesssymbol{entry-label}
    +

    +The sentence case version of \glsaccesssymbol. §9.2; 479

    +

    \glsaccesssymbol{entry-label}
    +

    +If accessibility support was enabled when glossaries-extra was loaded (accsupp) this will display the value of the symbol key with the accessibility support enabled for that key (symbolaccess). If there is no accessibility support, this just uses \glsentrysymbol. §9.2; 479

    +

    \GLSaccesssymbolplural{entry-label}
    +

    +The all caps version of \glsaccesssymbolplural. §9.2; 480

    +

    \Glsaccesssymbolplural{entry-label}
    +

    +The sentence case version of \glsaccesssymbolplural. §9.2; 479

    +

    \glsaccesssymbolplural{entry-label}
    +

    +If accessibility support was enabled when glossaries-extra was loaded (accsupp) this will display the value of the symbolplural key with the accessibility support enabled for that key (symbolpluralaccess). If there is no accessibility support, this just uses \glsentrysymbolplural. §9.2; 479

    +

    \GLSaccesstext{entry-label}
    +

    +The all caps version of \glsaccesstext. §9.2; 478

    +

    \Glsaccesstext{entry-label}
    +

    +The sentence case version of \glsaccesstext. §9.2; 478

    +

    \glsaccesstext{entry-label}
    +

    +If accessibility support was enabled when glossaries-extra was loaded (accsupp) this will display the value of the text key with the accessibility support enabled for that key (textaccess). If there is no accessibility support, this just uses \glsentrytext. §9.2; 477

    +

    \GLSaccessuseri{entry-label}glossaries-extra v1.49+
    +

    +The all caps version of \glsaccessuseri. §9.2; 482

    +

    \Glsaccessuseri{entry-label}glossaries-extra v1.49+
    +

    +The sentence case version of \glsaccessuseri. §9.2; 482

    +

    \glsaccessuseri{entry-label}glossaries-extra v1.49+
    +

    +If accessibility support was enabled when glossaries-extra was loaded (accsupp) this will display the value of the user1 key with the accessibility support enabled for that key (user1access). If there is no accessibility support, this just uses \glsentryuseri. §9.2; 482

    +

    \GLSaccessuserii{entry-label}glossaries-extra v1.49+
    +

    +The all caps version of \glsaccessuserii. §9.2; 483

    +

    \Glsaccessuserii{entry-label}glossaries-extra v1.49+
    +

    +The sentence case version of \glsaccessuserii. §9.2; 482

    +

    \glsaccessuserii{entry-label}glossaries-extra v1.49+
    +

    +If accessibility support was enabled when glossaries-extra was loaded (accsupp) this will display the value of the user2 key with the accessibility support enabled for that key (user2access). If there is no accessibility support, this just uses \glsentryuserii. §9.2; 482

    +

    \GLSaccessuseriii{entry-label}glossaries-extra v1.49+
    +

    +The all caps version of \glsaccessuseriii. §9.2; 483

    +

    \Glsaccessuseriii{entry-label}glossaries-extra v1.49+
    +

    +The sentence case version of \glsaccessuseriii. §9.2; 483

    +

    \glsaccessuseriii{entry-label}glossaries-extra v1.49+
    +

    +If accessibility support was enabled when glossaries-extra was loaded (accsupp) this will display the value of the user3 key with the accessibility support enabled for that key (user3access). If there is no accessibility support, this just uses \glsentryuseriii. §9.2; 483

    +

    \GLSaccessuseriv{entry-label}glossaries-extra v1.49+
    +

    +The all caps version of \glsaccessuseriv. §9.2; 483

    +

    \Glsaccessuseriv{entry-label}glossaries-extra v1.49+
    +

    +The sentence case version of \glsaccessuseriv. §9.2; 483

    +

    \glsaccessuseriv{entry-label}glossaries-extra v1.49+
    +

    +If accessibility support was enabled when glossaries-extra was loaded (accsupp) this will display the value of the user4 key with the accessibility support enabled for that key (user4access). If there is no accessibility support, this just uses \glsentryuseriv. §9.2; 483

    +

    \GLSaccessuserv{entry-label}glossaries-extra v1.49+
    +

    +The all caps version of \glsaccessuserv. §9.2; 484

    +

    \Glsaccessuserv{entry-label}glossaries-extra v1.49+
    +

    +The sentence case version of \glsaccessuserv. §9.2; 484

    +

    \glsaccessuserv{entry-label}glossaries-extra v1.49+
    +

    +If accessibility support was enabled when glossaries-extra was loaded (accsupp) this will display the value of the user5 key with the accessibility support enabled for that key (user5access). If there is no accessibility support, this just uses \glsentryuserv. §9.2; 483

    +

    \GLSaccessuservi{entry-label}glossaries-extra v1.49+
    +

    +The all caps version of \glsaccessuservi. §9.2; 484

    +

    \Glsaccessuservi{entry-label}glossaries-extra v1.49+
    +

    +The sentence case version of \glsaccessuservi. §9.2; 484

    +

    \glsaccessuservi{entry-label}glossaries-extra v1.49+
    +

    +If accessibility support was enabled when glossaries-extra was loaded (accsupp) this will display the value of the user6 key with the accessibility support enabled for that key (user6access). If there is no accessibility support, this just uses \glsentryuservi. §9.2; 484

    +

    \glsaccsupp{replacement}{content}glossaries-accsupp
    +

    +Applies replacement as the ActualText for content using \glsaccessibility.

    +

    \glsacspace{label}glossaries v4.16+
    +

    +Uses a non-breakable space if the short form is less than \glsacspacemax otherwise uses \space. This command is provided by glossaries but has a hard-coded maximum of 3em. This command is redefined by glossaries-extra to use \glsacspacemax.

    +

    \glsacspacemax
    +

    +Expands to the maximum value used by \glsacspace. This is a macro not a register. The default is 3em.

    +

    \glsadd[options]{entry-label}glossaries
    +

    +Indexes the entry identified by entry-label.

    +

    \glsaddall[options]glossaries
    +

    +Iterates over all glossaries (or all those listed in the types option) and indexes each entry in the glossary. The optional argument options are passed to \glsadd. This command can’t be used with bib2gls. Use the selection=all resource option instead.

    +

    \glsaddallunindexed[glossary types]glossaries-extra v1.49+
    +

    +Iterates over all glossaries listed in glossary types and indexes each entry (with format=glsignore) that hasn’t already been indexed. This command can’t be used with bib2gls. Use the selection=all resource option instead. §5.8; 259

    +

    \glsaddallunused[glossary types]glossaries v3.08a+
    +

    +Iterates over all glossaries listed in glossary types and indexes each entry (with format=glsignore) that hasn’t been used. This command can’t be used with bib2gls. Use the selection=all resource option instead.

    +

    \glsaddeach[options]{entry label list}glossaries-extra v1.31+
    +

    +Does \glsadd[options]{entry-label} for each label in the supplied comma-separated list. §5.8; 260

    +

    \glsaddkey{key}{default value}{no link cs}{no link ucfirst cs}{link cs}{link ucfirst cs}{link allcaps cs}glossaries v3.12a
    +

    +Defines a new glossary entry key with the given default value and commands that are analogous to \glsentrytext (no link cs), \Glsentrytext (no link ucfirst cs), \glstext (link cs), \Glstext (link ucfirst cs), \GLStext (link allcaps cs). The starred version switches on field expansion for the given key.

    +

    +

    +Hook implemented after setting the options passed to \glsadd. §5.1.1; 188

    +

    +

    +Hook implemented before setting the options passed to \glsadd. §5.1.1; 188

    +

    \glsaddstoragekey{key}{default value}{no link cs}glossaries v4.16
    +

    +Provides a new glossary entry key with a default value and a command for simply accessing the value (without indexing or hyperlinks). The starred version switches on field expansion for the given key.

    +

    +

    +Used to display the top-level entry item in the altlist styles. §8.6.5.3; 429

    +

    +

    +Inserted before the child descriptions for the alttree styles. §8.6.5.4; 431

    +

    +

    +Inserted before the top-level descriptions for the alttree styles. §8.6.5.4; 431

    +

    \glsapptopostlink{category}{code}glossaries-extra v1.49+
    +

    +Appends code to post-link hook associated with the category identified by the label category (or simply defines it, if it doesn’t already exist). §5.5.4; 250

    +

    \glsautoprefixglossaries v1.14+
    +

    +Expands to the prefix for the label used by numberedsection=autolabel and numberedsection=nameref.

    +

    \glsbackslashglossaries v4.11+
    +

    +Expands to a literal backslash.

    +

    \glscapitalisewords{content}glossaries v4.48+
    +

    +Just does \capitalisewords but may be redefined to use \capitalisefmtwords, if required. §5.2.4; 200

    +

    \glscapscase{no change}{sentence}{all caps}glossaries
    +

    +Initialised by the \gls-like and \glstext-like commands, this expands to no change if the calling command doesn’t apply a case-change (such as \gls or \glstext), to sentence if the calling command converts to sentence case (such as \Gls or \Glstext), or to all caps if the calling command converts to all caps (such as \GLS or \GLStext). This command may be used within associated hooks, entry display styles (\defglsentryfmt), and the post-link hook.

    +

    +

    +Expands to \string\$n. §11.5.2; 535

    +

    \glscategory{entry-label}
    +

    +Expands to the entry’s category. §10; 492

    +

    +

    +Expands to the category label of the abbreviation that is in the process of being defined by \newabbreviation. Maybe used in the style hooks (but take care to expand this command, if necessary). §4.5.3.1; 163

    +

    \glscombinedfirstsep{prev label}{next label}glossaries-extra v1.48+
    +

    +Separator used between elements of a multi-entry set where only the next element have been marked as used. §7.4; 343

    +

    \glscombinedfirstsepfirst{prev label}{next label}glossaries-extra v1.48+
    +

    +Separator used between elements of a multi-entry set where neither the previous nor the next element has been marked as used. §7.4; 344

    +

    \glscombinedsep{prev label}{next label}glossaries-extra v1.48+
    +

    +Separator used between elements of a multi-entry set where both elements have been marked as used. §7.4; 343

    +

    \glscombinedsepfirst{prev label}{next label}glossaries-extra v1.48+
    +

    +Separator used between elements of a multi-entry set where only the previous element have been marked as used. §7.4; 344

    +

    \glscurrententrylabelglossaries v3.02+
    +

    +Assigned at the start of each entry item within the glossary. This command may be used by glossary hooks, such as the post-description hook, to reference the current entry.

    +

    +

    +Defined within the “unsrt” family of commands to the current hierarchical level (taking leveloffset into account). §8.4.3; 400

    +

    \glscurrentfieldvalueglossaries v4.23+
    +

    +Conditional commands such as \ifglshasfield set this to the field’s value for use within the true code.

    +

    +

    +May be used within \printunsrtglossaryentryprocesshook to reference the most recent top level entry label (allowing for flatten but not leveloffset). §8.4.3; 400

    +

    +

    +May be used within \printunsrtglossaryentryprocesshook to reference the most recent top level entry label (allowing for flatten and leveloffset). §8.4.3; 400

    +

    \glscustomtextglossaries
    +

    +The custom text provided by \glsdisp or the link text for the \glstext-like commands. This command may be used within associated hooks, entry display styles (\defglsentryfmt), and the post-link hook.

    +

    \glsdefaultshortaccess{long}{short}glossaries-accsupp v4.45+

    +

    (requires accsupp)
    +
    +

    +Used when \newabbreviation automatically assigns shortaccess. This is defined by glossaries-accsupp to just do long but is redefined by glossaries-extra to do long (short).

    +

    \glsdefaulttypeinitial: main; glossaries
    +

    +Expands to the label of the default glossary, which is normally main but if nomain is used, it will be the label of the first glossary to be defined.

    +

    \glsdefpostdesc{category}{definition}glossaries-extra v1.31+
    +

    +Defines post-description hook associated with the category identified by the label category. This simply (re)defines \glsxtrpostdesccategory for the given category to definition. §8.6.2; 422

    +

    \glsdefpostlink{category}{definition}glossaries-extra v1.31+
    +

    +Defines post-link hook associated with the category identified by the label category. This simply (re)defines \glsxtrpostlinkcategory for the given category to definition. §5.5.4; 250

    +

    \glsdefpostname{category}{definition}glossaries-extra v1.31+
    +

    +Defines post-name hook associated with the category identified by the label category. This simply (re)defines \glsxtrpostnamecategory for the given category to definition. §8.6.1; 420

    +

    \GLSdesc[options]{entry-label}[insert]modifiers: * + alt-mod glossaries
    +

    +As \glsdesc but converts the link text to all caps.

    +

    \Glsdesc[options]{entry-label}[insert]modifiers: * + alt-mod glossaries
    +

    +As \glsdesc but converts the link text to sentence case. Use \Glossentrydesc within custom glossary styles instead of this command.

    +

    \glsdesc[options]{entry-label}[insert]modifiers: * + alt-mod glossaries
    +

    +References the entry identified by entry-label. The text produced is obtained from the description value. The insert argument will be inserted at the end of the link text. This command does not alter or depend on the first use flag. For the first optional argument, see \glslink options. Use \glossentrydesc within custom glossary styles instead of this command.

    +

    \glsdescplural[options]{entry-label}[insert]modifiers: * + alt-mod glossaries
    +

    +As \glsdesc but for the descriptionplural field.

    +

    \glsdescriptionaccessdisplay{text}{entry-label}glossaries-accsupp
    +

    +Does text with the descriptionaccess replacement text (if set).

    +

    \glsdescriptionpluralaccessdisplay{text}{entry-label}glossaries-accsupp
    +

    +Does text with the descriptionpluralaccess replacement text (if set).

    +

    +

    +A length register used to set the width of the description column for tabular-like styles.

    +

    \Glsdisp[options]{entry-label}{text}modifiers: * + alt-mod glossaries v4.50+
    +

    +As \glsdisp but sets the link text to \glssentencecase{text}. This is provided to allow a sentence case mapping in the event that \glsdisp occurs at the start of content that has automated case-changing.

    +

    \glsdisp[options]{entry-label}{text}modifiers: * + alt-mod glossaries v1.19+
    +

    +References the entry identified by entry-label with the given text as the link text. This command unsets the first use flag (use \glslink instead, if the first use flag should not be altered). This command is considered a \gls-like command. For the first optional argument, see \glslink options.

    +

    \glsdisplaynumberlist{entry-label}glossaries v3.02+
    +

    +Formats the location list for the given entry. Redefined by glossaries-extra-bib2gls to obtain the location list from the location field. §11.5.8; 571

    +

    \glsdoifexists{entry-label}{code}glossaries
    +

    +Does code if the entry given by entry-label exists. If the entry doesn’t exist, this will either generate an error (undefaction=error) or a warning (undefaction=warn) and, within the document environment, it will insert the unknown marker ??.

    +

    \glsdoifexistsordo{entry-label}{true}{false}glossaries v4.19+
    +

    +Similar to \ifglsentryexists, this does true if the entry given by entry-label exists. If the entry doesn’t it exist, this does false and generates an error (undefaction=error) or a warning (undefaction=warn). The unknown marker ?? will be placed before the false code.

    +

    \glsdoifexistsorwarn{entry-label}{code}glossaries v4.03+
    +

    +Like \glsdoifexists, but always warns (no error) if the entry doesn’t exist, regardless of the undefaction setting, and doesn’t show the unknown marker.

    +

    \glsdoifnoexists{entry-label}{code}glossaries
    +

    +Does code if the entry given by entry-label does not exist. If the entry does exist, this will either generate an error (undefaction=error) or a warning (undefaction=warn).

    +

    \glsenableentrycountglossaries v4.14+
    +

    +Enables entry counting.

    +

    +

    +Enables entry unit counting. §6.1; 313

    +

    +

    +Encapsulates the indexing code (within \glslinkwrcontent). §5.8; 264

    +

    \glsentrycounterlabelglossaries v3.0+
    +

    +Used by \glsentryitem to display the entry counter label.

    +

    \glsentrycurrcount{entry-label}glossaries v4.14+
    +

    +Expands to the current entry count running total or 0 if not available (needs to be enabled with \glsenableentrycount or \glsenableentryunitcount). With unit entry counting, this expands to the total for the current unit.

    +

    \Glsentrydesc{entry-label}glossaries
    +

    +Partially robust command that displays the value of the description field with sentence case applied. As from glossaries v4.50, this command can expand in PDF bookmarks. Outside of PDF bookmarks it will expand to a robust internal command.

    +

    \glsentrydesc{entry-label}glossaries
    +

    +Simply expands to the value of the description field. Does nothing if the entry hasn’t been defined. May be used in expandable contexts provided that the description field doesn’t contain any fragile commands.

    +

    \glsentrydescplural{entry-label}glossaries
    +

    +Simply expands to the value of the descriptionplural field. Does nothing if the entry hasn’t been defined. May be used in expandable contexts provided that the descriptionplural field doesn’t contain any fragile commands.

    +

    \Glsentryfirst{entry-label}glossaries
    +

    +Partially robust command that displays the value of the first field with the first letter converted to uppercase. As from glossaries v4.50, this command can expand in PDF bookmarks. Outside of PDF bookmarks it will expand to a robust internal command.

    +

    \glsentryfirst{entry-label}glossaries
    +

    +Simply expands to the value of the first field. Does nothing if the entry hasn’t been defined. May be used in expandable contexts provided that the first field doesn’t contain any fragile commands.

    +

    \Glsentryfirstplural{entry-label}glossaries
    +

    +Partially robust command that displays the value of the firstplural field with sentence case applied. As from glossaries v4.50, this command can expand in PDF bookmarks. Outside of PDF bookmarks it will expand to a robust internal command.

    +

    \glsentryfirstplural{entry-label}glossaries
    +

    +Simply expands to the value of the firstplural field. Does nothing if the entry hasn’t been defined. May be used in expandable contexts provided that the firstplural field doesn’t contain any fragile commands.

    +

    \glsentryfmtglossaries v3.11a+
    +

    +The default display format used by the \gls-like commands. This checks if the short field has been set for the current entry and, if set, initialises the abbreviation formatting commands (with \glssetabbrvfmt). This command will do \glsgenentryfmt (encapsulated with \glsxtrregularfont) if the entry is considered a regular entry (\glsifregular) or if the entry doesn’t have the short field set. Otherwise it will do \glsxtrgenabbrvfmt encapsulated with \glsxtrabbreviationfont.

    +

    \glsentryindexcount{entry-label}glossaries-extra v1.49+
    +

    +Expands to the number of times the given entry has been indexed. This will expand to 0 if the entry hasn’t been indexed or hasn’t been defined. §5.8; 264

    +

    \glsentryitem{entry-label}glossaries v3.0+
    +

    +Does nothing if entrycounter=false, otherwise increments and displays the associated counter.

    +

    \Glsentrylong{entry-label}glossaries v3.0+
    +

    +Displays the value of the long field with sentence case applied. Does nothing if the entry hasn’t been defined. As from glossaries v4.50, this command can expand in PDF bookmarks. Outside of PDF bookmarks it will expand to a robust internal command.

    +

    \glsentrylong{entry-label}glossaries v3.0+
    +

    +Simply expands to the value of the long field. Does nothing if the entry hasn’t been defined. May be used in expandable contexts provided that the long field doesn’t contain any fragile commands.

    +

    \Glsentrylongpl{entry-label}glossaries v3.0+
    +

    +Displays the value of the longplural field with sentence case applied. Does nothing if the entry hasn’t been defined. As from glossaries v4.50, this command can expand in PDF bookmarks. Outside of PDF bookmarks it will expand to a robust internal command.

    +

    \glsentrylongpl{entry-label}glossaries v3.0+
    +

    +Simply expands to the value of the longplural field. Does nothing if the entry hasn’t been defined. May be used in expandable contexts provided that the longplural field doesn’t contain any fragile commands.

    +

    \Glsentryname{entry-label}glossaries
    +

    +Partially robust command that displays the value of the name field with sentence case applied. As from glossaries v4.50, this command can expand in PDF bookmarks. Outside of PDF bookmarks it will expand to a robust internal command.

    +

    \glsentryname{entry-label}glossaries
    +

    +Simply expands to the value of the name key. Does nothing if the entry hasn’t been defined. May be used in expandable contexts provided that the name key doesn’t contain any fragile commands.

    +

    \glsentrynumberlist{entry-label}glossaries v3.02+
    +

    +Displays the location list for the given entry. Redefined by glossaries-extra-bib2gls to obtain the location list from the location field. §11.5.8; 572

    +

    \glsentryparent{entry-label}glossaries
    +

    +Expands to the value of the parent field. Expands to nothing if the parent field hasn’t been set and expands to \relax if the entry hasn’t been defined.

    +

    \glsentrypdfsymbol{entry-label}glossaries-extra v1.42+
    +

    +Used when \glossentrysymbol occurs in a PDF bookmark. §8.6; 419

    +

    \Glsentryplural{entry-label}glossaries
    +

    +Partially robust command that displays the value of the plural field with sentence case applied. As from glossaries v4.50, this command can expand in PDF bookmarks. Outside of PDF bookmarks it will expand to a robust internal command.

    +

    \glsentryplural{entry-label}glossaries
    +

    +Simply expands to the value of the plural field. Does nothing if the entry hasn’t been defined. May be used in expandable contexts provided that the plural field doesn’t contain any fragile commands.

    +

    \glsentryprevcount{entry-label}glossaries v4.14+
    +

    +Expands to the final entry count total from the previous LaTeX run or if 0 if not available (needs to be enabled with \glsenableentrycount or \glsenableentryunitcount). With unit entry counting, this expands to the total for the current unit.

    +

    \glsentryprevmaxcount{entry-label}glossaries v4.14+
    +

    +Expands to the maximum entry unit count total from the previous LaTeX run or if 0 if not available (needs to be enabled with \glsenableentryunitcount). §6.1; 314

    +

    \glsentryprevtotalcount{entry-label}glossaries v4.14+
    +

    +Expands to the final entry count total from the previous LaTeX run or if 0 if not available (needs to be enabled with \glsenableentryunitcount). §6.1; 314

    +

    \Glsentryshort{entry-label}glossaries v3.0+
    +

    +Displays the value of the short field with sentence case applied. Does nothing if the entry hasn’t been defined. As from glossaries v4.50, this command can expand in PDF bookmarks. Outside of PDF bookmarks it will expand to a robust internal command.

    +

    \glsentryshort{entry-label}glossaries v3.0+
    +

    +Simply expands to the value of the short field. Does nothing if the entry hasn’t been defined. May be used in expandable contexts provided that the short field doesn’t contain any fragile commands.

    +

    \Glsentryshortpl{entry-label}glossaries v3.0+
    +

    +Displays the value of the shortplural field with sentence case applied. Does nothing if the entry hasn’t been defined. As from glossaries v4.50, this command can expand in PDF bookmarks. Outside of PDF bookmarks it will expand to a robust internal command.

    +

    \glsentryshortpl{entry-label}glossaries v3.0+
    +

    +Simply expands to the value of the shortplural field. Does nothing if the entry hasn’t been defined. May be used in expandable contexts provided that the shortplural field doesn’t contain any fragile commands.

    +

    \Glsentrysymbol{entry-label}glossaries
    +

    +Partially robust command that displays the value of the symbol field with sentence case applied. As from glossaries v4.50, this command can expand in PDF bookmarks. Outside of PDF bookmarks it will expand to a robust internal command.

    +

    \glsentrysymbol{entry-label}glossaries
    +

    +Simply expands to the value of the symbol field. Does nothing if the entry hasn’t been defined. May be used in expandable contexts provided that the symbol field doesn’t contain any fragile commands.

    +

    \glsentrysymbolaccess{entry-label}glossaries-accsupp
    +

    +As \glsentrysymbol but for the symbolaccess field.

    +

    \glsentrysymbolplural{entry-label}glossaries
    +

    +Simply expands to the value of the symbolplural field. Does nothing if the entry hasn’t been defined. May be used in expandable contexts provided that the symbolplural field doesn’t contain any fragile commands.

    +

    \Glsentrytext{entry-label}glossaries
    +

    +Partially robust command that displays the value of the text field with sentence case applied. As from glossaries v4.50, this command can expand in PDF bookmarks. Outside of PDF bookmarks it will expand to a robust internal command.

    +

    \glsentrytext{entry-label}glossaries
    +

    +Simply expands to the value of the text field. Does nothing if the entry hasn’t been defined. May be used in expandable contexts provided that the text field doesn’t contain any fragile commands.

    +

    \glsentrytitlecase{entry-label}{field-label}glossaries v4.22+
    +

    +Applies title case to the value supplied in the given field (which is obtained with \glsfieldfetch).

    +

    \glsentrytype{entry-label}glossaries
    +

    +Simply expands to the value of the type key. Does nothing if the entry hasn’t been defined.

    +

    \Glsentryuseri{entry-label}glossaries v2.04+
    +

    +Partially robust command that displays the value of the user1 field with sentence case applied. As from glossaries v4.50, this command can expand in PDF bookmarks. Outside of PDF bookmarks it will expand to a robust internal command.

    +

    \glsentryuseri{entry-label}glossaries v2.04+
    +

    +Simply expands to the value of the user1 field. Does nothing if the entry hasn’t been defined. May be used in expandable contexts provided that the user1 field doesn’t contain any fragile commands.

    +

    \Glsentryuserii{entry-label}glossaries v2.04+
    +

    +Partially robust command that displays the value of the user2 field with sentence case applied. As from glossaries v4.50, this command can expand in PDF bookmarks. Outside of PDF bookmarks it will expand to a robust internal command.

    +

    \glsentryuserii{entry-label}glossaries v2.04+
    +

    +Simply expands to the value of the user2 field. Does nothing if the entry hasn’t been defined. May be used in expandable contexts provided that the user2 field doesn’t contain any fragile commands.

    +

    \Glsentryuseriii{entry-label}glossaries v2.04+
    +

    +Partially robust command that displays the value of the user3 field with sentence case applied. As from glossaries v4.50, this command can expand in PDF bookmarks. Outside of PDF bookmarks it will expand to a robust internal command.

    +

    \glsentryuseriii{entry-label}glossaries v2.04+
    +

    +Simply expands to the value of the user3 field. Does nothing if the entry hasn’t been defined. May be used in expandable contexts provided that the user3 field doesn’t contain any fragile commands.

    +

    \Glsentryuseriv{entry-label}glossaries v2.04+
    +

    +Partially robust command that displays the value of the user4 field with sentence case applied. As from glossaries v4.50, this command can expand in PDF bookmarks. Outside of PDF bookmarks it will expand to a robust internal command.

    +

    \glsentryuseriv{entry-label}glossaries v2.04+
    +

    +Simply expands to the value of the user4 field. Does nothing if the entry hasn’t been defined. May be used in expandable contexts provided that the user4 field doesn’t contain any fragile commands.

    +

    \Glsentryuserv{entry-label}glossaries v2.04+
    +

    +Partially robust command that displays the value of the user5 field with sentence case applied. As from glossaries v4.50, this command can expand in PDF bookmarks. Outside of PDF bookmarks it will expand to a robust internal command.

    +

    \glsentryuserv{entry-label}glossaries v2.04+
    +

    +Simply expands to the value of the user5 field. Does nothing if the entry hasn’t been defined. May be used in expandable contexts provided that the user5 field doesn’t contain any fragile commands.

    +

    \Glsentryuservi{entry-label}glossaries v2.04+
    +

    +Partially robust command that displays the value of the user6 field with sentence case applied. As from glossaries v4.50, this command can expand in PDF bookmarks. Outside of PDF bookmarks it will expand to a robust internal command.

    +

    \glsentryuservi{entry-label}glossaries v2.04+
    +

    +Simply expands to the value of the user6 field. Does nothing if the entry hasn’t been defined. May be used in expandable contexts provided that the user6 field doesn’t contain any fragile commands.

    +

    \glsexclapplyinnerfmtfield{entry-label}{internal-field}glossaries-extra v1.49+
    +

    +Locally adds the field given by its internal field label internal-field to the inner formatting exclusion list for the entry identified by entry-label. This typically means that the field value already contains the inner formatting. §5.5.3; 245

    +

    \glsexpandfieldsglossaries v3.08a+
    +

    +Expand field values when defining entries, except for those that explicitly have expansion disabled with \glssetnoexpandfield.

    +

    \glsextrapostnamehook{entry-label}glossaries-extra v1.25+
    +

    +A general purpose hook that’s performed within \glsxtrpostnamehook. §8.6.1; 421

    +

    \glsfieldaccsupp{replacement}{content}{field}{entry-label}glossaries-accsupp v4.45+
    +

    +If glossaries-extra has been loaded, this command will first check for the existence of the command \glsxtrcategoryfieldaccsupp. If that command doesn’t exist or if glossaries-extra hasn’t been loaded, it then checks for the existence of \glsfieldaccsupp (for example, \glsshortaccsupp). Failing that it will use \glsaccsupp. Whichever command is found first, cs{replacement}{content} is performed.

    +

    \glsfielddef{entry-label}{field}{value}glossaries v4.16+
    +

    +Locally assigns the value to the given field (identified by the internal field label field) for the entry identified by entry-label. Produces an error (or warning with undefaction=warn) if the entry or field doesn’t exist. Note that this doesn’t update any associated fields.

    +

    \glsfieldedef{entry-label}{field}{value}glossaries v4.16+
    +

    +Locally assigns the full expansion of value to the given field (identified by the internal field label field) for the entry identified by entry-label. Produces an error (or warning with undefaction=warn) if the entry or field doesn’t exist. Note that this doesn’t update any associated fields.

    +

    \glsfieldfetch{entry-label}{field-label}{cs}glossaries v4.16+
    +

    +Fetches the value of the given field for the given entry and stores it in the command cs. Triggers an error if the given field (identified by its internal field label) hasn’t been defined. Uses \glsdoifexists.

    +

    \glsfieldgdef{entry-label}{field}{value}glossaries v4.16+
    +

    +As \glsfielddef but does a global assignment.

    +

    \glsfieldxdef{entry-label}{field}{value}glossaries v4.16+
    +

    +As \glsfieldedef but does a global assignment.

    +

    +

    +Finds and sets the widest name for all entries in the given glossaries. §8.6.5.4; 435

    +

    \glsFindWidestAnyNameLocation[glossary labels]{register}glossaries-extra-stylemods v1.05+
    +

    +Like \glsFindWidestAnyName but also also measures the location list. The length of the widest location is stored in register, which should be a length register. §8.6.5.4; 436

    +

    \glsFindWidestAnyNameSymbol[glossary labels]{register}glossaries-extra-stylemods v1.05+
    +

    +Like \glsFindWidestAnyName but also also measures the symbol. The length of the widest symbol is stored in register which should be a length register. §8.6.5.4; 436

    +

    \glsFindWidestAnyNameSymbolLocation[glossary labels]{register1}{register2}glossaries-extra-stylemods v1.05+
    +

    +Like \glsFindWidestAnyNameSymbol but also also measures the location list. The length of the widest symbol is stored in register1 and the length of the widest location is stored in register2, which should both be length registers. §8.6.5.4; 436

    +

    +

    +Finds and sets the widest name for all entries with hierarchical level less than or equal to 2 in the given glossaries. §8.6.5.4; 436

    +

    +

    +A synonym for \glsfindwidesttoplevelname. §8.6.5.4; 435

    +

    \glsfindwidesttoplevelname[glossary labels]glossary-tree v4.22+
    +

    +Finds and sets the widest name for all top-level entries in the given glossaries. If the optional argument is omitted, the list of all non-ignored glossaries is assumed.

    +

    +

    +Finds and sets the widest name for all entries that have been marked as used in the given glossaries. §8.6.5.4; 435

    +

    \glsFindWidestUsedAnyNameLocation[glossary labels]{register}glossaries-extra-stylemods v1.05+
    +

    +Like \glsFindWidestUsedAnyName but also also measures the location list. The length of the widest location is stored in register, which should be a length register. §8.6.5.4; 436

    +

    \glsFindWidestUsedAnyNameSymbol[glossary labels]{register}glossaries-extra-stylemods v1.05+
    +

    +Like \glsFindWidestUsedAnyName but also also measures the symbol. The length of the widest symbol is stored in register which should be a length register. §8.6.5.4; 436

    +

    \glsFindWidestUsedAnyNameSymbolLocation[glossary labels]{register1}{register2}glossaries-extra-stylemods v1.05+
    +

    +Like \glsFindWidestUsedAnyNameSymbol but also also measures the location list. The length of the widest symbol is stored in register1 and the length of the widest location is stored in register2, which should both be length registers. §8.6.5.4; 436

    +

    +

    +Finds and sets the widest name for all entries that have been marked as used with hierarchical level less than or equal to 2 in the given glossaries. §8.6.5.4; 435

    +

    +

    +Finds and sets the widest name for all top-level entries that have been marked as used in the given glossaries. §8.6.5.4; 435

    +

    \GLSfirst[options]{entry-label}[insert]modifiers: * + alt-mod glossaries
    +

    +As \glsfirst but converts the link text to all caps. If you have defined the entry with \newabbreviation use \GLSxtrfull or \GLS[prereset] instead.

    +

    \Glsfirst[options]{entry-label}[insert]modifiers: * + alt-mod glossaries
    +

    +As \glsfirst but converts the first character of the link text to uppercase (for the start of a sentence) using \makefirstuc. If you have defined the entry with \newabbreviation use \Glsxtrfull or \Gls[prereset] instead.

    +

    \glsfirst[options]{entry-label}[insert]modifiers: * + alt-mod glossaries
    +

    +References the entry identified by entry-label. The text produced is obtained from the first value. The insert argument will be inserted at the end of the link text. This command does not alter or depend on the first use flag. If you have defined the entry with \newabbreviation use \glsxtrfull for the full form or \glsxtrlong for the long form or use \gls[prereset], as some abbreviation styles are too complicated to work with \glsfirst. For the first optional argument, see \glslink options.

    +

    +

    +Formatting command for the short form on first use used by the abbreviation styles that don’t apply a font change by default. 132

    +

    +

    +Short form font used by the “em” abbreviation styles on first use. 158

    +

    \glsfirstabbrvfont{text}
    +

    +Font formatting command for the short form on first use, initialised by the abbreviation style. 171

    +

    +

    +Short form font used by the “hyphen” abbreviation styles on first use. 148

    +

    +

    +Short form font used by the “only” abbreviation styles on first use. 154

    +

    +

    +Short form font used by the small caps “sc” abbreviation styles on first use. 157

    +

    +

    +Short form font used by the “sc-only” abbreviation styles on first use. 155

    +

    +

    +Short form font used by the small caps “sc-user” abbreviation styles on first use. 136

    +

    +

    +Short form font used by the “sm” abbreviation styles on first use. 157

    +

    +

    +Short form font used by the “user” abbreviation styles on first use. 136

    +

    \glsfirstaccessdisplay{text}{entry-label}glossaries-accsupp
    +

    +Does text with the firstaccess replacement text (if set).

    +

    +

    +Applies both \glsfirstabbrvfont and \glsxtrgenentrytextfmt to text. §4.5.3.1; 166

    +

    +

    +Applies both \glsfirstlongfont and \glsxtrgenentrytextfmt to text. §4.5.3.1; 168

    +

    +

    +Formatting command for the long form on first use used by the abbreviation styles that don’t apply a font change by default. 133

    +

    +

    +Long form font used by the “em” abbreviation styles on first use. 158

    +

    \glsfirstlongfont{text}
    +

    +Font formatting command for the long form on first use, initialised by the abbreviation style. 172

    +

    +

    +Formatting command for the first use long form used by the footnote abbreviation styles. 145

    +

    +

    +Long form font used by the “hyphen” abbreviation styles on first use. 148

    +

    +

    +Long form font used by the “only” abbreviation styles on first use. 154

    +

    +

    +Long form font used by the “user” abbreviation styles on first use. 136

    +

    \GLSfirstplural[options]{entry-label}[insert]modifiers: * + alt-mod glossaries
    +

    +As \glsfirstplural but converts the link text to all caps. If you have defined the entry with \newabbreviation use \GLSxtrfullpl or \GLSpl[prereset] instead.

    +

    \Glsfirstplural[options]{entry-label}[insert]modifiers: * + alt-mod glossaries
    +

    +As \glsfirstplural but converts the first character of the link text to uppercase (for the start of a sentence) using \makefirstuc. If you have defined the entry with \newabbreviation use \Glsxtrfullpl or \Glspl[prereset] instead.

    +

    \glsfirstplural[options]{entry-label}[insert]modifiers: * + alt-mod glossaries
    +

    +References the entry identified by entry-label. The text produced is obtained from the firstplural value. The insert argument will be inserted at the end of the link text. This command does not alter or depend on the first use flag. If you have defined the entry with \newabbreviation use \glsxtrfullpl for the full form or \glsxtrlongpl for the long form or use \glspl[prereset], as some abbreviation styles are too complicated to work with \glsfirstplural. For the first optional argument, see \glslink options.

    +

    \glsfirstpluralaccessdisplay{text}{entry-label}glossaries-accsupp
    +

    +Does text with the firstpluralaccess replacement text (if set).

    +

    \glsfirstxpabbrvfont{text}{category}glossaries-extra v1.49+
    +

    +If the markshortwords attribute is set for the given category, this encapsulates text with \glsfirstabbrvfont otherwise with \glsfirstinnerfmtabbrvfont. This command has to expand, so protect any content that shouldn’t expand. §4.5.3.1; 167

    +

    \glsfirstxplongfont{category}{text}glossaries-extra v1.49+
    +

    +If the markwords attribute is set for the given category, this encapsulates text with \glsfirstlongfont otherwise with \glsinnerfmtlongfont. This command has to expand, so protect any content that shouldn’t expand. §4.5.3.1; 168

    +

    \GLSfmtfield{insert}{cs}{entry-label}{internal-field}glossaries-extra v1.49+
    +

    +As \glsfmtfield but changes the field value to all caps. §5.5.3; 245

    +

    \Glsfmtfield{insert}{cs}{entry-label}{internal-field}glossaries-extra v1.49+
    +

    +As \glsfmtfield but uses \makefirstuc to change the field value to sentence case. §5.5.3; 245

    +

    \glsfmtfield{insert}{cs}{entry-label}{internal-field}glossaries-extra v1.49+
    +

    +Applies the formatting command cs (which takes one argument) to the entry’s field value identified by the given internal field label, including insert appended. Used by the inner formatting commands. Note that \glsfmtfield should not be robust as it needs to expand if it’s inside a case-changing command. §5.5.3; 245

    +

    \GLSfmtfirst{entry-label}glossaries-extra v1.42+
    +

    +For use within captions or section titles to display the formatted all caps first. §5.3.2; 213

    +

    \Glsfmtfirst{entry-label}
    +

    +For use within captions or section titles to display the formatted sentence case first. §5.3.2; 213

    +

    \glsfmtfirst{entry-label}
    +

    +For use within captions or section titles to display the formatted first. §5.3.2; 213

    +

    \GLSfmtfirstpl{entry-label}glossaries-extra v1.42+
    +

    +For use within captions or section titles to display the formatted all caps firstplural. §5.3.2; 214

    +

    \Glsfmtfirstpl{entry-label}
    +

    +For use within captions or section titles to display the formatted sentence case firstplural. §5.3.2; 214

    +

    \glsfmtfirstpl{entry-label}
    +

    +For use within captions or section titles to display the formatted firstplural. §5.3.2; 213

    +

    \GLSfmtfull{entry-label}glossaries-extra v1.42+
    +

    +Designed for use in section headings or captions, this expands to just \glspdffmtfull{entry-label} in PDF bookmarks (no case-change), otherwise it expands to \GLSxtrtitlefull{entry-label}. §5.3.2; 211

    +

    \Glsfmtfull{entry-label}glossaries-extra v1.02+
    +

    +Designed for use in section headings or captions, this expands to just \glspdffmtfull{entry-label} in PDF bookmarks (no case-change), otherwise it expands to \Glsxtrtitlefull{entry-label}. §5.3.2; 211

    +

    \glsfmtfull{entry-label}glossaries-extra v1.02+
    +

    +Designed for use in section headings or captions, this expands to just \glspdffmtfull{entry-label} in PDF bookmarks, otherwise it expands to \glsxtrtitlefull{entry-label}. §5.3.2; 210

    +

    \GLSfmtfullpl{entry-label}glossaries-extra v1.42+
    +

    +Designed for use in section headings or captions, this expands to just \glspdffmtfullpl{entry-label} in PDF bookmarks (no case-change), otherwise it expands to \GLSxtrtitlefullpl{entry-label}. §5.3.2; 211

    +

    \Glsfmtfullpl{entry-label}glossaries-extra v1.02+
    +

    +Designed for use in section headings or captions, this expands to just \glspdffmtfullpl{entry-label} in PDF bookmarks (no case-change), otherwise it expands to \Glsxtrtitlefullpl{entry-label}. §5.3.2; 211

    +

    \glsfmtfullpl{entry-label}glossaries-extra v1.02+
    +

    +Designed for use in section headings or captions, this expands to just \glspdffmtfullpl{entry-label} in PDF bookmarks, otherwise it expands to \glsxtrtitlefullpl{entry-label}. §5.3.2; 211

    +

    \GLSfmtinsertglossaries-extra v1.49+
    +

    +As \glsfmtinsert but converts to all caps.

    +

    \glsfmtinsertglossaries-extra v1.49+
    +

    +A shortcut that applies \glsxtrgenentrytextfmt to \glsinsert if \glsinsert isn’t empty.

    +

    \GLSfmtlong{entry-label}
    +

    +For use within captions or section titles to display the formatted all caps long form. §5.3.2; 209

    +

    \Glsfmtlong{entry-label}
    +

    +For use within captions or section titles to display the formatted sentence case long form. §5.3.2; 208

    +

    \glsfmtlong{entry-label}
    +

    +For use within captions or section titles to display the formatted long form. §5.3.2; 208

    +

    \GLSfmtlongpl{entry-label}
    +

    +For use within captions or section titles to display the formatted all caps long plural form. §5.3.2; 209

    +

    \Glsfmtlongpl{entry-label}
    +

    +For use within captions or section titles to display the formatted sentence case long plural form. §5.3.2; 209

    +

    \glsfmtlongpl{entry-label}
    +

    +For use within captions or section titles to display the formatted long plural form. §5.3.2; 209

    +

    \GLSfmtname{entry-label}glossaries-extra v1.21+
    +

    +For use within captions or section titles to display the formatted all caps name. §5.3.2; 212

    +

    \Glsfmtname{entry-label}glossaries-extra v1.21+
    +

    +For use within captions or section titles to display the formatted sentence case name. §5.3.2; 212

    +

    \glsfmtname{entry-label}glossaries-extra v1.21+
    +

    +For use within captions or section titles to display the formatted name. §5.3.2; 211

    +

    \GLSfmtplural{entry-label}glossaries-extra v1.42+
    +

    +For use within captions or section titles to display the formatted all caps plural. §5.3.2; 213

    +

    \Glsfmtplural{entry-label}
    +

    +For use within captions or section titles to display the formatted sentence case plural. §5.3.2; 213

    +

    \glsfmtplural{entry-label}
    +

    +For use within captions or section titles to display the formatted plural. §5.3.2; 212

    +

    \GLSfmtshort{entry-label}
    +

    +For use within captions or section titles to display the formatted all caps short form. §5.3.2; 207

    +

    \Glsfmtshort{entry-label}
    +

    +For use within captions or section titles to display the formatted sentence case short form. §5.3.2; 207

    +

    \glsfmtshort{entry-label}
    +

    +For use within captions or section titles to display the formatted short form. §5.3.2; 207

    +

    \GLSfmtshortpl{entry-label}
    +

    +For use within captions or section titles to display the formatted all caps short plural form. §5.3.2; 208

    +

    \Glsfmtshortpl{entry-label}
    +

    +For use within captions or section titles to display the formatted sentence case short plural form. §5.3.2; 208

    +

    \glsfmtshortpl{entry-label}
    +

    +For use within captions or section titles to display the formatted short plural form. §5.3.2; 207

    +

    \GLSfmttext{entry-label}glossaries-extra v1.42+
    +

    +For use within captions or section titles to display the formatted all caps text. §5.3.2; 212

    +

    \Glsfmttext{entry-label}
    +

    +For use within captions or section titles to display the formatted sentence case text. §5.3.2; 212

    +

    \glsfmttext{entry-label}
    +

    +For use within captions or section titles to display the formatted text. §5.3.2; 212

    +

    \glsforeachincategory[glossary-types]{category}{glossary-cs}{label-cs}{body}
    +

    +Iterates over all entry in the given list of glossaries (or all non-ignored glossaries, if the optional argument is omitted) and performs body for those entries that have the category set to category. Within body, the current entry can be referenced with label-cs and the glossary can be referenced with glossary-cs. §10; 493

    +

    \glsforeachwithattribute[glossary-types]{attribute-label}{attribute-value}{glossary-cs}{label-cs}{body}
    +

    +Iterates over all entry in the given list of glossaries (or all non-ignored glossaries, if the optional argument is omitted) and performs body for those entries that have the attribute given by attribute-label set to attribute-value. Within body, the current entry can be referenced with label-cs and the glossary can be referenced with glossary-cs. §10; 493

    +

    +

    +The display format used by \glsentryfmt for regular entries. §5.5.5; 255

    +

    \glsgetattribute{entry-label}{attribute}
    +

    +Expands to the value of the given attribute for the category associated with the entry identified by entry-label. Expands to nothing if the attribute hasn’t been set. §10.2.2; 505

    +

    \glsgetcategoryattribute{category}{attribute}
    +

    +Expands to the value of the given attribute for the given category. Expands to nothing if the attribute hasn’t been set. §10.2.2; 505

    +

    +

    +Expands to the widest top-level name. §8.6.5.4; 434

    +

    +

    +Expands to the widest name for the given hierarchical level or to the widest top-level name, if no widest name set for level. §8.6.5.4; 435

    +

    \glsgroupheading{group-label}glossaries
    +

    +Inserted at the start of each group in a glossary (unless groups=false) to display the group’s heading, if applicable, using the title associated with group-label or, if no title provided, just group-label. This command is defined by glossary styles as appropriate.

    +

    \glsgroupskipglossaries
    +

    +Inserted before each group heading (except the first) in a glossary (unless groups=false). This command is defined by glossary styles as appropriate. Most of the predefined styles define this command to check the nogroupskip option.

    +

    \glshasattribute{entry-label}{attribute}{true}{false}
    +

    +Tests if the given attribute has been set for the category associated with the entry identified by entry-label (using etoolbox’s \ifcsvoid). Does false if the entry hasn’t been defined. §10.2.2; 505

    +

    \glshascategoryattribute{category}{attribute}{true}{false}
    +

    +Tests if the given attribute has been set for the given category (using etoolbox’s \ifcsvoid). §10.2.2; 505

    +

    +

    +Expands to a literal hash #. §11.5.2; 535

    +

    +

    +Expands to \string\uhex. §11.5.2; 535

    +

    \glshyperlink[text]{entry-label}glossaries v1.17+
    +

    +Creates a hyperlink to the given entry with the hyperlink text provided in the optional argument. If omitted, the default is \glsentrytext{entry-label}.

    +

    \glshypernumber{location(s)}glossaries
    +

    +This will encapsulate each location with a hyperlink, if supported. This may be used as a location encap. The argument may be a single location or locations delimited by \delimR or \delimN. This command should not be used outside of location lists as it requires additional information in order to correctly form the hyperlinks.

    +

    \glsifapplyinnerfmtfield{entry-label}{internal-field}{true}{false}glossaries-extra v1.49+
    +

    +Tests if the field given by its internal field label internal-field has been added to the inner formatting exclusion list for the entry identified by entry-label. §5.5.3; 244

    +

    \glsifattribute{entry-label}{attribute}{value}{true}{false}
    +

    +Tests if the category associated with the entry identified by entry-label has the given attribute set to value. Does true if the attribute is value and false otherwise. Does false if there’s no such attribute for the given category or if the entry hasn’t been defined. §10.2.2; 505

    +

    \glsifattributetrue{entry-label}{attribute}{true}{false}glossaries-extra v1.49+
    +

    +Tests if the category associated with the entry given by entry-label has the given attribute set to true. Does true if the attribute is true and false otherwise. Does false if there’s no such attribute for the given category or if the entry hasn’t been defined. §10.2.2; 506

    +

    \glsifcategory{entry-label}{category}{true}{false}
    +

    +Tests if the entry identified by entry-label has the category set to category (uses \ifglsfieldeq for the test). §10; 492

    +

    \glsifcategoryattribute{category}{attribute}{value}{true}{false}
    +

    +Tests if the given category has the given attribute set to value. Does true if the attribute is value and false otherwise. Does false if there’s no such attribute for the given category. §10.2.2; 505

    +

    \glsifcategoryattributehasitem{category}{attribute}{item}{true}{false}glossaries-extra v1.49+
    +

    +Does true if the category has the attribute (whose value is a comma-separated list) contains the given item and false otherwise. Does false if there’s no such attribute for the given category. The item and list are expanded and passed to datatool’s \DTLifinlist to perform the test. §10.2.2; 507

    +

    \glsifcategoryattributetrue{category}{attribute}{true}{false}glossaries-extra v1.49+
    +

    +Tests if the given category has the given attribute set to true. Does true if the attribute is true and false otherwise. Does false if there’s no such attribute for the given category. §10.2.2; 506

    +

    \glsifindexed{entry-label}{true}{false}glossaries-extra v1.49+
    +

    +Tests if the value obtained from \glsentryindexcount is greater than 0. §5.8; 264

    +

    \glsifnotregular{entry-label}{true}{false}glossaries-extra v1.04+
    +

    +Does true if the category for the given entry has the regular attribute explicitly set to false, otherwise does false. §10.2.2; 506

    +

    \glsifnotregularcategory{category}{true}{false}glossaries-extra v1.04+
    +

    +Does true if the given category has the regular attribute explicitly set to false, otherwise does false. §10.2.2; 506

    +

    \glsifplural{true}{false}glossaries
    +

    +Initialised by the \gls-like and \glstext-like commands, this expands to true if the calling command accesses a plural field (such as \glspl or \glsplural) otherwise it expands to false. This command may be used within associated hooks, entry display styles (\defglsentryfmt), and the post-link hook.

    +

    \glsifregular{entry-label}{true}{false}
    +

    +Does true if the category for the given entry has the regular attribute explicitly set to true, otherwise does false. §10.2.2; 506

    +

    \glsifregularcategory{category}{true}{false}
    +

    +Does true if the given category has the regular attribute explicitly set to true, otherwise does false. §10.2.2; 506

    +

    \glsignore{text}glossaries v4.12+
    +

    +Does nothing. When used as a location encap, this signifies to bib2gls that the entry is required but the location shouldn’t be added to the location list. With other indexing methods, this simply creates an invisible location.

    +

    \glsindexingsettingglossaries v4.50+ & glossaries-extra v1.49+
    +

    +Indicates what indexing option has been chosen.

    +

    \glsindexsubgroupitem{previous group level}{level}{parent label}{group label}{group title}glossaries-extra-stylemods v1.49+
    +

    +Used to format sub-group headers for the indexgroup styles.

    +

    +

    +Hook that initialises the prereset, preunset and postunset settings. §5.1.1; 189

    +

    \glsinlinedescformat{description}{symbol}{location list}glossary-inline v3.03+
    +

    +Formats the description, symbol and location list for top-level entries.

    +

    \glsinlinesubdescformat{description}{symbol}{location list}glossary-inline v3.03+
    +

    +Formats the description, symbol and location list for child entries.

    +

    +

    +Robust command that applies both \glsabbrvfont and \glsxtrgenentrytextfmt to text. §4.5.3.1; 167

    +

    +

    +Applies both \glslongfont and \glsxtrgenentrytextfmt to text. §4.5.3.1; 168

    +

    \glsinsertglossaries
    +

    +The final insert argument passed to the \gls-like commands (but not to the \glstext-like commands, where the insert is added to \glscustomtext). This command may be used within associated hooks, entry display styles (\defglsentryfmt), and the post-link hook.

    +

    +

    +A token register that stores the options passed to \newabbreviation. §4.5.3.1; 163

    +

    \glslabelglossaries
    +

    +The current entry label, initialised by the \gls-like and \glstext-like commands. This command may be used within associated hooks, entry display styles (\defglsentryfmt), and the post-link hook.

    +

    +

    +A token register that stores the entry’s label. §4.5.3.1; 163

    +

    \glsletentryfield{cs}{entry-label}{field-label}glossaries v4.07+
    +

    +Fetches the value of the given field (identified by its internal label field-label) for the entry given by entry-label and stores it in the command cs.

    +

    \Glslink[options]{entry-label}{text}modifiers: * + alt-mod glossaries v4.50+
    +

    +As \glslink but sets the link text to \glssentencecase{text}. This is provided to allow a sentence case mapping in the event that \glslink occurs at the start of content that has automated case-changing.

    +

    \glslink[options]{entry-label}{text}modifiers: * + alt-mod glossaries
    +

    +References the entry identified by entry-label with the given text as the link text. This command does not alter or depend on the first use flag (use \glsdisp instead, if the first use flag needs to be unset). This command is considered a \glstext-like command. For the first optional argument, see \glslink options.

    +

    \glslinkcheckfirsthyperhookglossaries v4.08+
    +

    +Hook used at the end of the code in the \gls-like commands that tests if the hyperlink should be switched off on first use.

    +

    \glslinkpostsetkeysglossaries v4.16+
    +

    +Hook implemented after setting the options passed to the \gls-like and \glstext-like commands.

    +

    +

    +Hook implemented before setting the options passed to the \gls-like and \glstext-like commands. §5.1.1; 188

    +

    +

    +Encapsulates the link text and indexing. Just does code by default. §5; 185

    +

    +

    +Used after the child entry location list for the list styles. §8.6.5.3; 429

    +

    +

    +Used before the child entry location list for the list styles. §8.6.5.3; 428

    +

    \glslistdesc{entry-label}glossaries-extra-stylemods v1.31+
    +

    +Used to display the description for the list styles. §8.6.5.3; 429

    +

    \glslistdottedwidthglossary-list
    +

    +A length register used by listdotted.

    +

    \glslistexpandedname{entry-label}glossary-list v4.48+
    +

    +Used by \glslistinit to provide better integration with gettitlestring.

    +

    +

    +Used after group headings in the listgroup styles. §8.6.5.3; 429

    +

    \glslistgroupheaderitem{group-label}{header code}glossaries-extra-stylemods v1.47+
    +

    +Used to display the group headings in the listgroup styles. §8.6.5.3; 429

    +

    +

    +Used for the group skip in the list styles. §8.6.5.3; 430

    +

    \glslistinitglossary-list v4.48+
    +

    +Used to disable problematic commands at the start the list styles to provide better integration with gettitlestring.

    +

    \glslistitem{entry-label}glossaries-extra-stylemods v1.47+
    +

    +Used to display the top-level entry item in the list styles. §8.6.5.3; 429

    +

    +

    +Used before the top-level entry location list for the list styles. §8.6.5.3; 428

    +

    \glslocalreset{entry-label}glossaries
    +

    +Locally resets the entry’s first use flag. That is, this marks the entry as “not used”.

    +

    \glslocalresetall[glossary labels list]glossaries
    +

    +Locally resets the first use flag for all entries in whose labels are listed in the glossary labels list comma-separated list. If the optional argument is omitted, the list of all non-ignored glossaries is assumed.

    +

    \glslocalreseteach{entry-labels}glossaries-extra v1.31+
    +

    +Locally resets each listed entry’s first use flag. §5.10; 281

    +

    \glslocalunset{entry-label}glossaries
    +

    +Locally unsets the entry’s first use flag. That is, this marks the entry as “used”.

    +

    \glslocalunsetall[glossary labels list]glossaries
    +

    +Locally unsets the first use flag for all entries in whose labels are listed in the glossary labels list comma-separated list. If the optional argument is omitted, the list of all non-ignored glossaries is assumed.

    +

    \glslocalunseteach{entry-labels}glossaries-extra v1.31+
    +

    +Locally unsets each listed entry’s first use flag. §5.10; 281

    +

    \glslongaccessdisplay{text}{entry-label}glossaries-accsupp
    +

    +Does text with the longaccess replacement text (if set).

    +

    +

    +Formatting command for the long form used by the abbreviation styles that don’t apply a font change by default. 133

    +

    +

    +Long form font used by the “em” abbreviation styles. 158

    +

    +

    +The horizontal alignment for the description column. §8.7.2; 446

    +

    \glslongextraDescFmt{entry-label}glossary-longextra v1.37+
    +

    +Used by the glossary-longextra styles to display a top-level entry’s description and post-description hook. §8.7.2; 446

    +

    +

    +Sets the header and footer for the long-desc-name style with longtable. §8.7.2.1; 450

    +

    +

    +Displays the footer for the long-desc-name style. §8.7.2.1; 450

    +

    +

    +Displays the header for the long-desc-name style. §8.7.2.1; 450

    +

    +

    +Sets the header and footer for the long-desc-sym style with longtable. §8.7.2.5; 458

    +

    +

    +Sets the header and footer for the long-desc-sym-name style with longtable. §8.7.2.2; 452

    +

    +

    +Displays the footer for the long-desc-sym-name style. §8.7.2.2; 452

    +

    +

    +Displays the header for the long-desc-sym-name style. §8.7.2.2; 452

    +

    +

    +Displays the footer for the long-desc-sym style. §8.7.2.5; 458

    +

    +

    +Displays the header for the long-desc-sym style. §8.7.2.5; 458

    +

    \glslongextraGroupHeading{number columns}{group-label}glossary-longextra v1.37+
    +

    +Formats the top-level group heading. §8.7.2; 448

    +

    +

    +Used to format the column headers. §8.7.2; 445

    +

    +

    +The horizontal alignment for the location list column. §8.7.2; 447

    +

    +

    +Sets the header and footer for the long-loc-desc-name style with longtable. §8.7.2.3; 453

    +

    +

    +Displays the footer for the long-loc-desc-name style. §8.7.2.3; 453

    +

    +

    +Displays the header for the long-loc-desc-name style. §8.7.2.3; 453

    +

    +

    +Sets the header and footer for the long-loc-desc-sym-name style with longtable. §8.7.2.4; 456

    +

    +

    +Displays the footer for the long-loc-desc-sym-name style. §8.7.2.4; 456

    +

    +

    +Displays the header for the long-loc-desc-sym-name style. §8.7.2.4; 455

    +

    \glslongextraLocationFmt{entry-label}{location list}glossary-longextra v1.37+
    +

    +Used by the glossary-longextra styles to display a top-level entry’s location list. §8.7.2; 447

    +

    +

    +Sets the header and footer for the long-loc-sym-desc-name style with longtable. §8.7.2.4; 455

    +

    +

    +Displays the footer for the long-loc-sym-desc-name style. §8.7.2.4; 455

    +

    +

    +Displays the header for the long-loc-sym-desc-name style. §8.7.2.4; 455

    +

    +

    +Computes the value of \glsdescwidth according to the widest name for styles that only show the name, location list and description. §8.7.2.3; 452

    +

    \glslongextraLongFmt{entry-label}glossary-longextra v1.49+
    +

    +The formatting for the long form in the abbr-long-short and abbr-short-long styles. §8.7.2.6; 459

    +

    +

    +The long column header for the abbr-long-short and abbr-short-long styles. §8.7.2.6; 459

    +

    +

    +Sets the header and footer for the abbr-short-long style with longtable. §8.7.2.6; 461

    +

    +

    +Displays the footer for the abbr-short-long style. §8.7.2.6; 461

    +

    +

    +Displays the header for the abbr-short-long style. §8.7.2.6; 461

    +

    +

    +The horizontal alignment for the name column. §8.7.2; 446

    +

    +

    +Sets the header and footer for the long-name-desc style with longtable. §8.7.2.1; 449

    +

    +

    +Sets the header and footer for the long-name-desc-loc style with longtable. §8.7.2.3; 453

    +

    +

    +Displays the footer for the long-name-desc-loc style. §8.7.2.3; 453

    +

    +

    +Displays the header for the long-name-desc-loc style. §8.7.2.3; 453

    +

    +

    +Sets the header and footer for the long-name-desc-sym style with longtable. §8.7.2.2; 451

    +

    +

    +Sets the header and footer for the long-name-desc-sym-loc style with longtable. §8.7.2.4; 454

    +

    +

    +Displays the footer for the long-name-desc-sym-loc style. §8.7.2.4; 454

    +

    +

    +Displays the header for the long-name-desc-sym-loc style. §8.7.2.4; 454

    +

    +

    +Displays the footer for the long-name-desc-sym style. §8.7.2.2; 450

    +

    +

    +Displays the header for the long-name-desc-sym style. §8.7.2.2; 450

    +

    +

    +Displays the footer for the long-name-desc style. §8.7.2.1; 449

    +

    +

    +Displays the header for the long-name-desc style. §8.7.2.1; 449

    +

    \glslongextraNameFmt{entry-label}glossary-longextra v1.37+
    +

    +Used by the glossary-longextra styles to add the hypertarget (if supported) and display a top-level entry’s name. §8.7.2; 446

    +

    +

    +Sets the header and footer for the long-name-sym-desc style with longtable. §8.7.2.2; 451

    +

    +

    +Sets the header and footer for the long-name-sym-desc-loc style with longtable. §8.7.2.4; 455

    +

    +

    +Displays the footer for the long-name-sym-desc-loc style. §8.7.2.4; 455

    +

    +

    +Displays the header for the long-name-sym-desc-loc style. §8.7.2.4; 454

    +

    +

    +Displays the footer for the long-name-sym-desc style. §8.7.2.2; 451

    +

    +

    +Displays the header for the long-name-sym-desc style. §8.7.2.2; 451

    +

    +

    +Computes the value of \glsdescwidth according to the widest name for styles that only show the name and description. §8.7.2.1; 449

    +

    +

    +Identifies widest-name as the widest top-level name. §8.7.2; 447

    +

    +

    +The short column header for the abbr-long-short and abbr-short-long styles. §8.7.2.6; 458

    +

    +

    +Sets the header and footer for the abbr-short-long style with longtable. §8.7.2.6; 460

    +

    +

    +Displays the footer for the abbr-short-long style. §8.7.2.6; 460

    +

    +

    +Displays the header for the abbr-short-long style. §8.7.2.6; 460

    +

    +

    +Sets the value of \glsdescwidth for the abbr-long-short and abbr-short-long styles. §8.7.2.6; 460

    +

    +

    +The formatting, including the target, for the short form in the abbr-long-short and abbr-short-long styles. §8.7.2.6; 459

    +

    \glslongextraSubDescFmt{level}{entry-label}glossary-longextra v1.37+
    +

    +Used by the glossary-longextra styles to display a child entry’s description and post-description hook. §8.7.2; 446

    +

    \glslongextraSubGroupHeading{number columns}{prev group level}{group level}{parent-entry-label}{group-label}glossary-longextra v1.49+
    +

    +Formats the sub-group heading, if supported. §8.7.2; 448

    +

    \glslongextraSubLocationFmt{level}{entry-label}{location list}glossary-longextra v1.37+
    +

    +Used by the glossary-longextra styles to display a child entry’s location list. §8.7.2; 447

    +

    \glslongextraSubLongFmt{level}{entry-label}glossary-longextra v1.49+
    +

    +The formatting for child entry long forms in the abbr-long-short and abbr-short-long styles. §8.7.2.6; 460

    +

    \glslongextraSubNameFmt{level}{entry-label}glossary-longextra v1.37+
    +

    +Used by the glossary-longextra styles to add the hypertarget (if supported) for child-entries. The name isn’t shown by default. §8.7.2; 446

    +

    \glslongextraSubShortTargetFmt{level}{entry-label}glossary-longextra v1.49+
    +

    +The formatting, including the target, for child entry short forms in the abbr-long-short and abbr-short-long styles. §8.7.2.6; 459

    +

    \glslongextraSubSymbolFmt{level}{entry-label}glossary-longextra v1.37+
    +

    +Used by the glossary-longextra styles to display a child entry’s symbol. §8.7.2; 448

    +

    \glslongextraSubSymbolOrName{level}{entry-label}glossary-longextra v1.49+
    +

    +Adds the hypertarget (if supported) and displays the symbol if set or the name otherwise for child entries. §8.7.2.5; 457

    +

    \glslongextraSubSymbolTargetFmt{level}{entry-label}glossary-longextra v1.49+
    +

    +Adds the hypertarget (if supported) and displays the symbol for child entries. §8.7.2.5; 456

    +

    +

    +The horizontal alignment for the symbol column. §8.7.2; 448

    +

    +

    +Used by the glossary-longextra styles to display a top-level entry’s symbol. §8.7.2; 448

    +

    +

    +The horizontal alignment for the symbol column when it’s being used instead of the name. §8.7.2.5; 456

    +

    +

    +Adds the hypertarget (if supported) and displays the symbol if set or the name otherwise for top-level entries. §8.7.2.5; 456

    +

    +

    +Adds the hypertarget (if supported) and displays the symbol for top-level entries. §8.7.2.5; 456

    +

    +

    +Sets the header and footer for the long-sym-desc style with longtable. §8.7.2.5; 457

    +

    +

    +Sets the header and footer for the long-sym-desc-name style with longtable. §8.7.2.2; 452

    +

    +

    +Displays the footer for the long-sym-desc-name style. §8.7.2.2; 451

    +

    +

    +Displays the header for the long-sym-desc-name style. §8.7.2.2; 451

    +

    +

    +Displays the footer for the long-sym-desc style. §8.7.2.5; 457

    +

    +

    +Displays the header for the long-sym-desc style. §8.7.2.5; 457

    +

    +

    +Computes the value of \glsdescwidth according to the widest name for styles that show the name, symbol, location list and description. §8.7.2.4; 454

    +

    +

    +Computes the value of \glsdescwidth according to the widest name for styles that only show the symbol and description. §8.7.2.5; 457

    +

    +

    +Computes the value of \glsdescwidth according to the widest name for styles that only show the name, symbol and description. §8.7.2.2; 450

    +

    +

    +Only for use with the tabular setting, this should expand to the tabular environment’s vertical alignment specifier. §8.7.2; 445

    +

    +

    +If name is wider than the current widest name, it will be set as the new widest name. §8.7.2; 447

    +

    \glslongextraUpdateWidestChild{level}{name}glossary-longextra v1.37+
    +

    +As \glslongextraUpdateWidest but for child entries. Does nothing by default. §8.7.2; 447

    +

    +

    +Sets \ifGlsLongExtraUseTabular to false (if this setting is required, the style must be set after this command). §8.7.2; 445

    +

    +

    +Sets \ifGlsLongExtraUseTabular to true (if this setting is required, the style must be set after this command). §8.7.2; 445

    +

    \glslongfont{text}
    +

    +Font formatting command for the long form, initialised by the abbreviation style. 172

    +

    +

    +Formatting command for the long form used by the footnote abbreviation styles. 145

    +

    +

    +Long form font used by the “hyphen” abbreviation styles. 148

    +

    +

    +Long form font used by the “only” abbreviation styles. 154

    +

    +

    +A token register that stores the long plural form (which may have been modified after being passed to \newabbreviation). §4.5.3.1; 164

    +

    \glslongpluralaccessdisplay{text}{entry-label}glossaries-accsupp
    +

    +Does text with the longpluralaccess replacement text (if set).

    +

    +

    +A token register that stores the long form (which may have been modified after being passed to \newabbreviation). §4.5.3.1; 164

    +

    +

    +Long form font used by the “user” abbreviation styles. 136

    +

    \glslowercase{text}glossaries v4.50+
    +

    +Converts text to lowercase. §5.2.2; 200

    +

    \glsmakefirstuc{text}mfirstuc v1.05+
    +

    +Used by \makefirstuc to perform the actual case-change. As from mfirstuc v2.08+ this just uses \MFUsentencecase.

    +

    \glsmfuaddmap{cs1}{cs2}glossaries v4.50+ & glossaries-extra v1.49+
    +

    +If mfirstuc v2.08+ is installed, this will use \MFUaddmap, otherwise it will use \glsmfuexcl instead. See §5.2.1 for further details. §5.2.1; 199

    +

    \glsmfublocker{cs}glossaries v4.50+ & glossaries-extra v1.49+
    +

    +If mfirstuc v2.08+ is installed, this will use \MFUblocker, otherwise it will use \glsmfuexcl instead. See §5.2.1 for further details. §5.2.1; 199

    +

    \glsmfuexcl{cs}glossaries v4.50+ & glossaries-extra v1.49+
    +

    +If mfirstuc v2.08+ is installed, this will use \MFUexcl, otherwise it will implement something similar. See §5.2.1 for further details. §5.2.1; 198

    +

    \GLSname[options]{entry-label}[insert]modifiers: * + alt-mod glossaries
    +

    +As \glsname but converts the link text to all caps. This command is incompatible with some abbreviation styles.

    +

    \Glsname[options]{entry-label}[insert]modifiers: * + alt-mod glossaries
    +

    +As \glsname but converts the link text to sentence case. Use \Glossentryname within custom glossary styles instead of this command.

    +

    \glsname[options]{entry-label}[insert]modifiers: * + alt-mod glossaries
    +

    +References the entry identified by entry-label. The text produced is obtained from the name value. The insert argument will be inserted at the end of the link text. This command does not alter or depend on the first use flag. For the first optional argument, see \glslink options. Use \glossentryname within custom glossary styles instead of this command.

    +

    \glsnameaccessdisplay{text}{entry-label}glossaries-accsupp
    +

    +Does text with the access replacement text (if set).

    +

    \glsnamefont{text}glossaries
    +

    +Used by \glossentryname to apply a font change to the name, unless (with glossaries-extra) the glossnamefont attribute has been set.

    +

    \glsnextpagesglossaries v3.0+
    +

    +Designed for use with makeindex and xindy, this may be placed in an entry’s description to override nonumberlist.

    +

    \glsnoexpandfieldsglossaries v3.08a+
    +

    +Don’t expand field values when defining entries, except for those that explicitly have expansion enabled with \glssetexpandfield.

    +

    \glsnoidxdisplayloc{prefix}{counter}{format}{location}glossaries v4.04+
    +

    +Used to display a location in the location list. §11.5.6; 556

    +

    \glsnonextpagesglossaries v1.17+
    +

    +Designed for use with makeindex and xindy, this may be placed in an entry’s description to suppress the entry’s location list.

    +

    \glsnumberformat{location(s)}glossaries
    +

    +The default format for entry locations. If hyperlinks are defined, this will use \glshypernumber otherwise it will simply display its argument, which may be a single location, or locations delimited by \delimR or \delimN.

    +

    \glsnumbersgroupnameinitial: Numbers; glossaries

    +

    (language-sensitive)
    +
    +

    +Expands to the title of the numbers group and (if the numbers package option is used) the numbers glossary.

    +

    \glspagelistwidthglossary-long & glossary-super
    +

    +A length register used to set the width of the location list column for tabular-like styles.

    +

    \glsparglossaries
    +

    +Paragraph break (for instances where \par can’t be used directly).

    +

    \glspdffmtfull{entry-label}glossaries-extra v1.42+
    +

    +Shortcut for \glsentrylong{entry-label} (\glsentryshort{entry-label}) for use in PDF bookmarks or other text-only contexts. §5.3.2; 210

    +

    \glspdffmtfullpl{entry-label}glossaries-extra v1.42+
    +

    +Shortcut for \glsentrylongpl{entry-label} (\glsentryshortpl{entry-label}) for use in PDF bookmarks or other text-only contexts. §5.3.2; 210

    +

    \glspercentcharglossaries v4.10+
    +

    +Expands to a literal percent sign.

    +

    \GLSpl[options]{entry-label}[insert]modifiers: * + alt-mod glossaries
    +

    +As \glspl but converts the link text to all caps.

    +

    \Glspl[options]{entry-label}[insert]modifiers: * + alt-mod glossaries
    +

    +As \glspl but converts the first character of the link text to uppercase (for the start of a sentence) using \makefirstuc.

    +

    \glspl[options]{entry-label}[insert]modifiers: * + alt-mod glossaries
    +

    +As \gls but uses the relevant plural form.

    +

    \GLSplural[options]{entry-label}[insert]modifiers: * + alt-mod glossaries
    +

    +As \glsplural but converts the link text to all caps. If you have defined the entry with \newabbreviation use \GLSxtrshortpl or \GLSpl[preunset] instead.

    +

    \Glsplural[options]{entry-label}[insert]modifiers: * + alt-mod glossaries
    +

    +As \glsplural but converts the first character of the link text to uppercase (for the start of a sentence) using \makefirstuc. If you have defined the entry with \newabbreviation use \Glsxtrshortpl or \Glspl[preunset] instead.

    +

    \glsplural[options]{entry-label}[insert]modifiers: * + alt-mod glossaries
    +

    +References the entry identified by entry-label. The text produced is obtained from the plural value. The insert argument will be inserted at the end of the link text. This command does not alter or depend on the first use flag. If you have defined the entry with \newabbreviation use \glsxtrshortpl for the short form or \gls[preunset], as some abbreviation styles are too complicated to work with \glsplural. For the first optional argument, see \glslink options.

    +

    \glspluralaccessdisplay{text}{entry-label}glossaries-accsupp
    +

    +Does text with the pluralaccess replacement text (if set).

    +

    \glspluralsuffix
    +

    +Expands to the letter “s” and is used to form default plurals. This command isn’t language-sensitive as there’s guarantee when it will be expanded. (It may be expanded when the entry is defined or it may be expanded when the entry is used). If you need to suppress this suffix for abbreviations, use the noshortplural attribute. If you need an apostrophe before the “s” for single-letter abbreviations to avoid ambiguity, use the aposplural attribute.

    +

    \glspostdescriptionglossaries
    +

    +A hook that is usually placed after the description in glossary styles. Some of the styles provided with the glossaries package don’t use this hook. The glossaries-extra-stylemods redefines those styles to include the hook. The default definition of this command tests for the nopostdot option, but the postpunc option redefines the command to implement the chosen punctuation.

    +

    \glspostinlineglossary-inline v3.03+
    +

    +Used at the end of the theglossary environment.

    +

    \glspostinlinedescformat{description}{symbol}{location list}glossary-inline v3.03+
    +

    +Formats the top-level entry’s description, symbol and location list.

    +

    \glspostinlinesubdescformat{description}{symbol}{location list}glossary-inline v3.03+
    +

    +Formats the child entry’s description, symbol and location list.

    +

    \glspostlinkhookglossaries v4.16+
    +

    +A post-link hook used after all the \gls-like and \glstext-like commands. This is redefined by glossaries-extra to use \glsxtrpostlinkhook.

    +

    \glsprefixsepinitial: empty; glossaries-prefix v4.45+
    +

    +Separator between the prefix and the term.

    +

    \glsprestandardsort{sort cs}{type}{entry-label}glossaries v3.13a+
    +

    +Hook used with sort=standard to adjust the default sort value (with \makeglossaries or \makenoidxglossaries only).

    +

    \glspretopostlink{category}{code}glossaries-extra v1.49+
    +

    +Prepends code to post-link hook associated with the category identified by the label category (or simply defines it, if it doesn’t already exist). §5.5.4; 250

    +

    \glsps{entry-label}glossaries-extra v1.07+
    +

    +Shortcut for \glsxtrp{short}{entry-label}. §5.4; 231

    +

    \glspt{entry-label}glossaries-extra v1.07+
    +

    +Shortcut for \glsxtrp{text}{entry-label}. §5.4; 231

    +

    \glsrefentry{entry-label}glossaries v3.0+
    +

    +References (using \ref) the entry counter or sub-counter (if entrycounter or subentrycounter options are set) otherwise just does \gls{entry-label}.

    +

    \glsrenewcommand{cs}[n][default]{definition}modifier: * glossaries-extra-bib2gls v1.37+
    +

    +Like \renewcommand but only issues a warning instead of an error if the command hasn’t been defined. §11.5.8; 572

    +

    \glsreset{entry-label}glossaries
    +

    +Globally resets the entry’s first use flag. That is, this marks the entry as “not used”.

    +

    \glsresetall[types]glossaries
    +

    +Globally resets all entries associated with the listed glossaries or all glossaries if types is omitted.

    +

    +

    +Sets \ifglsresetcurrcount to false. §6.1; 308

    +

    +

    +Sets \ifglsresetcurrcount to true. §6.1; 308

    +

    \glsresetentrylistglossaries
    +

    +Inserted into the glossary code to counteract the effect of \glsnonextpages.

    +

    \glssee[tag]{entry-label}{xr-list}glossaries v1.17+
    +

    +Indexes the entry identified by entry-label as a general cross-reference to the entries identified in the comma-separated list xr-list. The optional argument is the textual tag that’s inserted before the cross-reference list and defaults to \seename.

    +

    \glsseefirstitem{entry-label}glossaries-extra v1.47+
    +

    +Used by \glsseelist to format the first entry. §5.13; 300

    +

    \glsseeformat[tag]{xr-list}{location}glossaries v1.17+
    +

    +Used to format the see cross-reference in the location list. This requires a location argument for makeindex even though it isn’t required. The default definition is \emph{tag} \glsseelist{xr-list}.

    +

    \glsseeitem{entry-label}glossaries v1.17+
    +

    +Used by \glsseelist to format each entry.

    +

    \glsseeitemformat{entry-label}glossaries v3.0+
    +

    +Used by \glsseeitem to produce the hyperlink text. §5.13; 300

    +

    +

    +Used by \glsseelist as a separator between penultimate and final entry in the list if there are at least three entries in the list. §5.13; 301

    +

    +

    +Used by \glsseelist as a separator between penultimate and final entry in the list. §5.13; 301

    +

    \glsseelist{csv-list}glossaries v1.17+
    +

    +Iterates over a comma-separated list of entry labels csv-list and formats them. Each label in the list is encapsulated with \glsseeitem (or \mglsseeitem, the label corresponds to a multi-entry). The separators are \glsseelastsep (between the penultimate and last items) and \glsseesep (between all the other items). With glossaries-extra, the first label is encapsulated with \glsseefirstitem (or \mglsseefirstitem) and the final separator for a list consisting of at least three items is given by \glsseelastoxfordsep. §5.13; 299

    +

    \glsseesepinitial: ,␣; glossaries v1.17+
    +

    +Used by \glsseelist as a separator between each entry except the last pair. §5.13; 301

    +

    \glssentencecase{text}glossaries v4.50+ & glossaries-extra v1.49+
    +

    +Used by sentence case commands, such as \Gls, to perform the case change. This is simply defined to use \makefirstuc. §5.2.1; 197

    +

    \glssetabbrvfmt{category}
    +

    +Implements the display definitions code for the abbreviation style associated with the given category. §4.5.2; 159

    +

    \glssetattribute{entry-label}{attribute}{value}
    +

    +Locally sets the given attribute to value for the category associated with the entry identified by entry-label. §10.2.2; 504

    +

    \glssetcategoriesattribute{category list}{attribute}{value}glossaries-extra v1.48+
    +

    +Globally sets the given attribute to value for all the categories in the comma-separated list category list. §10.2.2; 504

    +

    \glssetcategoriesattributes{category list}{attribute list}{value}glossaries-extra v1.48+
    +

    +Globally sets each attribute in the comma separated attribute list to value for each category in the comma-separated list category list. §10.2.2; 504

    +

    \glssetcategoryattribute{category}{attribute}{value}
    +

    +Locally sets the given attribute to value for the given category. §10.2.2; 504

    +

    \glssetcategoryattributes{category}{attribute list}{value}glossaries-extra v1.49+
    +

    +Globally sets each attribute in the comma separated attribute list to value for the given category. §10.2.2; 504

    +

    +

    +Defines the multi-entry separators to use a non-breaking space (~) for abbreviations. §7.4; 345

    +

    +

    +Defines the multi-entry separators to use no separator for abbreviations. §7.4; 345

    +

    \glssetcombinedsepnarrow{width}{narrow-sep}glossaries-extra v1.48+
    +

    +Defines the multi-entry separators to use narrow-sep if the width of associated field values is less than width. §7.4; 346

    +

    \glssetexpandfield{field}glossaries v3.13a+
    +

    +Expand the value of the field identified by its internal field label when defining entries (overrides \glsnoexpandfields).

    +

    \glssetnoexpandfield{field}glossaries v3.13a+
    +

    +Don’t expand the value of the field identified by its internal field label when defining entries (overrides \glsexpandfields).

    +

    \glssetregularcategory{category}
    +

    +Locally sets the regular attribute to true for the given category. §10.2.2; 504

    +

    \glssetwidest[level]{name}glossary-tree
    +

    +Indicates that name is the widest name for the given hierarchical level.

    +

    \glsshortaccessdisplay{text}{entry-label}glossaries-accsupp
    +

    +Does text with the shortaccess replacement text (if set).

    +

    \glsshortaccsupp{replacement}{content}glossaries-accsupp v4.45+
    +

    +Applies replacement as the expansion (E) attribute for content using \glsaccessibility.

    +

    +

    +A token register that stores the short plural form (which may have been modified after being passed to \newabbreviation). §4.5.3.1; 164

    +

    \glsshortpluralaccessdisplay{text}{entry-label}glossaries-accsupp
    +

    +Does text with the shortpluralaccess replacement text (if set).

    +

    +

    +A token register that stores the short form (which may have been modified after being passed to \newabbreviation). §4.5.3.1; 164

    +

    \glsshowtarget{target-name}glossaries v4.32+
    +

    +Formats the target name when debug=showtargets is enabled using either \glsshowtargetinner or \glsshowtargetouter, depending on the current mode.

    +

    \glsshowtargetfontglossaries v4.45+
    +

    +Font declaration used by debugging annotations.

    +

    \glsshowtargetfonttext{text}glossaries v4.50+
    +

    +Text-block command that checks for math mode and switches to the font given by the \glsshowtargetfont declaration.

    +

    \glsshowtargetinner{target-name}glossaries v4.50+
    +

    +Formats the target name for inner and maths mode when debug=showtargets is enabled.

    +

    +

    +Shows the left inner annotation followed by the left marker symbol \glsxtrshowtargetsymbolleft. §2.5; 30

    +

    +

    +Shows the right marker symbol \glsxtrshowtargetsymbolright followed by the right inner annotation. §2.5; 30

    +

    \glsshowtargetouter{target-name}glossaries v4.50+
    +

    +Formats the target name for outer mode when debug=showtargets is enabled. This places a marker (\glsshowtargetsymbol) in the text and target-name in the margin.

    +

    \glsshowtargetsymbolglossaries v4.45+
    +

    +Marker (◁) used in debugging annotations.

    +

    \glssubentryitem{entry-label}glossaries v3.0+
    +

    +Does nothing if subentrycounter=false, otherwise increments and displays the associated counter.

    +

    \glssubgroupheading{previous level}{level}{parent-label}{group-label}glossaries-extra v1.49+
    +

    +Used to format sub-group headings. Only applicable with the “unsrt” family of commands. This command won’t occur in glossaries that use \printglossary or \printnoidxglossary. §8.4.1; 393

    +

    \GLSsymbol[options]{entry-label}[insert]modifiers: * + alt-mod glossaries
    +

    +As \glssymbol but converts the link text to all caps.

    +

    \Glssymbol[options]{entry-label}[insert]modifiers: * + alt-mod glossaries
    +

    +As \glssymbol but converts the link text to sentence case. Use \Glossentrysymbol within custom glossary styles instead of this command.

    +

    \glssymbol[options]{entry-label}[insert]modifiers: * + alt-mod glossaries
    +

    +References the entry identified by entry-label. The text produced is obtained from the symbol value. The insert argument will be inserted at the end of the link text. This command does not alter or depend on the first use flag. For the first optional argument, see \glslink options. Use \glossentrysymbol within custom glossary styles instead of this command.

    +

    \glssymbolaccessdisplay{text}{entry-label}glossaries-accsupp
    +

    +Does text with the symbolaccess replacement text (if set).

    +

    \glssymbolplural[options]{entry-label}[insert]modifiers: * + alt-mod glossaries
    +

    +As \glssymbol but for the symbolplural field.

    +

    \glssymbolpluralaccessdisplay{text}{entry-label}glossaries-accsupp
    +

    +Does text with the symbolpluralaccess replacement text (if set).

    +

    \glssymbolsgroupnameinitial: Symbols; glossaries

    +

    (language-sensitive)
    +
    +

    +Expands to the title of the symbols group and (if the symbols package option is used) the symbols glossary.

    +

    +

    +Header for the description column. §8.7.4; 469

    +

    \glstableiffilter{entry-label}{true}{false}glossary-table v1.49+
    +

    +Internally used by the custom handler in \printunsrttable to perform additional filtering. §8.7.4; 468

    +

    +

    +Header for the name column. §8.7.4; 469

    +

    +

    +Header for the other column. §8.7.4; 470

    +

    +

    +Header for the symbol column. §8.7.4; 469

    +

    \glstarget{entry-label}{text}glossaries v1.18+
    +

    +Used by glossary styles to create a hypertarget (if enabled) for the entry (identified by entry-label). The text is usually \glossentryname{entry-label}, but it can be something else.

    +

    \GLStext[options]{entry-label}[insert]modifiers: * + alt-mod glossaries
    +

    +As \glstext but converts the link text to all caps. If you have defined the entry with \newabbreviation use \GLSxtrshort or \GLS[preunset] instead.

    +

    \Glstext[options]{entry-label}[insert]modifiers: * + alt-mod glossaries
    +

    +As \glstext but converts the first character of the link text to uppercase (for the start of a sentence) using \makefirstuc. If you have defined the entry with \newabbreviation use \Glsxtrshort or \Gls[preunset] instead.

    +

    \glstext[options]{entry-label}[insert]modifiers: * + alt-mod glossaries
    +

    +References the entry identified by entry-label. The text produced is obtained from the text value. The insert argument will be inserted at the end of the link text. This command does not alter or depend on the first use flag. If you have defined the entry with \newabbreviation use \glsxtrshort for the short form or \gls[preunset], as some abbreviation styles are too complicated to work with \glstext. For the first optional argument, see \glslink options.

    +

    \glstextaccessdisplay{text}{entry-label}glossaries-accsupp
    +

    +Does text with the textaccess replacement text (if set).

    +

    \glstextformat{text}glossaries v1.04+
    +

    +The default outer text formatting command used by the \gls-like and \glstext-like commands.

    +

    \glstextup{text}glossaries v3.09a+
    +

    +Counteracts the effect of \textsc.

    +

    \glstildecharglossaries v4.10+
    +

    +Expands to a literal tilde character.

    +

    +

    +Used to set the indentation for sub-levels. §8.7.3; 467

    +

    +

    +Used by \glstopicAssignSubIndent to calculate the width of the widest name for the given level. §8.7.3; 467

    +

    +

    +Expands to the number of columns for topicmcols. §8.7.3; 462

    +

    +

    +Expands to the multicols environment name to use for topicmcols. §8.7.3; 462

    +

    \glstopicDesc{entry-label}glossary-topic v1.40+
    +

    +Used to format the top-level description. §8.7.3; 466

    +

    \glstopicGroupHeading{group-label}glossary-topic v1.40+
    +

    +Used to format the top-level group headings, if required. §8.7.3; 465

    +

    +

    +Initialisation hook. §8.7.3; 465

    +

    \glstopicItem{entry-label}{location list}glossary-topic v1.40+
    +

    +Used to format top-level entries. §8.7.3; 465

    +

    \glstopicLoc{entry-label}{location list}glossary-topic v1.40+
    +

    +Used to format the top-level location list. §8.7.3; 467

    +

    \glstopicMarker{entry-label}glossary-topic v1.40+
    +

    +Hook inserted before a top-level entry. §8.7.3; 466

    +

    +

    +Vertical space inserted before the description for a top-level entry. §8.7.3; 466

    +

    +

    +Length register used for the top-level paragraph indent. §8.7.3; 463

    +

    +

    +Vertical space inserted after the description for a top-level entry. §8.7.3; 466

    +

    +

    +Vertical space inserted before a top-level entry. §8.7.3; 466

    +

    \glstopicSubGroupHeading{prev group level}{group level}{parent entry}{group-label}glossary-topic v1.49+
    +

    +Used to format the sub-group headings, if supported. §8.7.3; 465

    +

    +

    +Length register used for the child indent. §8.7.3; 464

    +

    \glstopicSubItem{level}{entry-label}{location list}glossary-topic v1.40+
    +

    +Used to format child entries. §8.7.3; 467

    +

    \glstopicSubItemBox{level}{text}glossary-topic v1.40+
    +

    +Horizontal box used for child name if a widest name has been provided. §8.7.3; 467

    +

    +

    +Length register used for the child paragraph indent. §8.7.3; 464

    +

    +

    +Horizontal separator used after child names. §8.7.3; 467

    +

    \glstopicSubLoc{entry-label}{location list}glossary-topic v1.41+
    +

    +Formats the child location lists. §8.7.3; 468

    +

    +

    +Font command to apply to the child entry name. §8.7.3; 467

    +

    +

    +Separator before the child location lists. §8.7.3; 468

    +

    \glstopicTitle{entry-label}glossary-topic v1.40+
    +

    +Used to format the name and (if provided) symbol for the top-level entry title. §8.7.3; 466

    +

    +

    +Font command to apply to the top-level entry title. §8.7.3; 466

    +

    +

    +Displays the given child entry’s description with pre and post hooks for the tree styles. §8.6.5.4; 433

    +

    \glstreeChildDescLoc{entry-label}{location list}glossaries-extra-stylemods v1.41+
    +

    +Formats the child description (if set) and location list for the tree styles. §8.6.5.4; 433

    +

    +

    +Space inserted before child descriptions. §8.6.5.4; 431

    +

    +

    +Used before the child entry location list for the tree and index styles. §8.6.5.4; 432

    +

    +

    +Displays the top-level symbol in parentheses, if set, for the tree styles. §8.6.5.4; 433

    +

    +

    +Used as the default name format for the tree and index styles. §8.6.5.4; 430

    +

    \glstreedesc{entry-label}glossaries-extra-stylemods v1.31+
    +

    +Displays the given top-level entry’s description with pre and post hooks for the tree styles. §8.6.5.4; 432

    +

    \glstreeDescLoc{entry-label}{location list}glossaries-extra-stylemods v1.41+
    +

    +Formats the top-level description (if set) and location list for the tree styles. §8.6.5.4; 433

    +

    +

    +Used to format the group title for the treegroup and indexgroup styles. §8.6.5.4; 430

    +

    +

    +After group header skip for the treegroup and indexgroup styles. §8.6.5.4; 431

    +

    +

    +Group skip for the tree and index styles. §8.6.5.4; 430

    +

    \glstreeitemglossary-tree v4.26+
    +

    +Used to indent the top-level entries for the index styles.

    +

    \glstreenamefmt{text}glossary-tree v4.08+
    +

    +Used to format the name for the tree and index styles.

    +

    +

    +Used to format the navigation element for styles like treehypergroup. §8.6.5.4; 430

    +

    +

    +Inserted before the location list when there’s no description or symbol for the tree styles. §8.6.5.4; 433

    +

    +

    +Displays the given child entry’s description and post hook for the treenoname styles. §8.6.5.4; 432

    +

    \glstreenonameChildDescLoc{entry-label}glossaries-extra-stylemods v1.45+
    +

    +Displays the given child entry’s description and location list for the treenoname styles.

    +

    +

    +Displays the given top-level entry’s description with pre and post hooks for the treenoname styles. §8.6.5.4; 432

    +

    \glstreenonameDescLoc{entry-label}glossaries-extra-stylemods v1.45+
    +

    +Displays the given top-level entry’s description and location list for the treenoname styles.

    +

    +

    +Displays the given top-level entry’s symbol in parentheses for the treenoname styles. §8.6.5.4; 432

    +

    +

    +Space inserted before top-level descriptions. §8.6.5.4; 431

    +

    \glstreePreHeader{group-label}{group-title}glossaries-extra-stylemods v1.41+
    +

    +Pre group header hook the treegroup and indexgroup styles. §8.6.5.4; 431

    +

    +

    +Used before the top-level entry location list for the tree and index styles. §8.6.5.4; 432

    +

    \glstreesubgroupitem{previous group level}{level}{parent label}{group label}{group title}glossaries-extra-stylemods v1.49+
    +

    +Used to display the sub-group header in the treegroup styles.

    +

    \glstreesubitemglossary-tree v4.26+
    +

    +Used to indent the level 1 entries for the index styles.

    +

    \glstreeSubPreHeader{previous group level}{level}{parent label}{group label}{group title}glossaries-extra-stylemods v1.49+
    +

    +Pre sub-group header hook the treegroup and indexgroup styles.

    +

    \glstreesubsubitemglossary-tree v4.26+
    +

    +Used to indent the level 2 entries for the index styles.

    +

    +

    +Displays the top-level symbol in parentheses, if set, for the tree styles. §8.6.5.4; 432

    +

    +

    +Used as a special location format that indicates that the record is a trigger record. §11.4; 525

    +

    \glsunexpandedfieldvalue{entry-label}{field-label}glossaries v4.48+
    +

    +For use in expandable contexts where the field value is required but the contents should not be expanded. The field should be identified by its internal field label. Expands to nothing with no error or warning if the entry or field aren’t defined.

    +

    \glsunset{entry-label}glossaries
    +

    +Globally unsets the entry’s first use flag. That is, this marks the entry as “used”.

    +

    \glsunsetall[types]glossaries
    +

    +Globally unsets all entries associated with the listed glossaries or all glossaries if types is omitted.

    +

    \glsunsetcategoryattribute{category}{attribute}glossaries-extra v1.47+
    +

    +Locally unsets the given attribute for the given category. §10.2.2; 504

    +

    \glsupdatewidest[level]{name}glossaries-extra-stylemods v1.23+
    +

    +Similar to \glssetwidest but only if name is wider than the current widest value for the given hierarchical level. §8.6.5.4; 434

    +

    \glsuppercase{text}glossaries v4.50+
    +

    +Converts text to uppercase. §5.2.3; 200

    +

    \glsuseabbrvfont{style-name}{text}glossaries-extra v1.21+
    +

    +Formats text according to the short format for the given abbreviation style. §4.5.2; 159

    +

    \glsuselongfont{style-name}{text}glossaries-extra v1.21+
    +

    +Formats text according to the long format for the given abbreviation style. §4.5.2; 159

    +

    \glsuserdescription{text}{entry-label}glossaries-extra v1.30+
    +

    +Description encapsulator for styles like long-short-user. 137

    +

    \GLSuseri[options]{entry-label}[insert]modifiers: * + alt-mod glossaries v2.04+
    +

    +As \glsuseri but converts the link text to all caps.

    +

    \Glsuseri[options]{entry-label}[insert]modifiers: * + alt-mod glossaries v2.04+
    +

    +As \glsuseri but converts the link text to sentence case.

    +

    \glsuseri[options]{entry-label}[insert]modifiers: * + alt-mod glossaries v2.04+
    +

    +References the entry identified by entry-label. The text produced is obtained from the user1 value. The insert argument will be inserted at the end of the link text. This command does not alter or depend on the first use flag. For the first optional argument, see \glslink options.

    +

    \glsuseriaccessdisplay{text}{entry-label}glossaries-accsupp v4.45+
    +

    +Does text with the user1access replacement text (if set).

    +

    \GLSuserii[options]{entry-label}[insert]modifiers: * + alt-mod glossaries v2.04+
    +

    +As \glsuserii but converts the link text to all caps.

    +

    \Glsuserii[options]{entry-label}[insert]modifiers: * + alt-mod glossaries v2.04+
    +

    +As \glsuserii but converts the link text to sentence case.

    +

    \glsuserii[options]{entry-label}[insert]modifiers: * + alt-mod glossaries v2.04+
    +

    +References the entry identified by entry-label. The text produced is obtained from the user2 value. The insert argument will be inserted at the end of the link text. This command does not alter or depend on the first use flag. For the first optional argument, see \glslink options.

    +

    \glsuseriiaccessdisplay{text}{entry-label}glossaries-accsupp v4.45+
    +

    +Does text with the user2access replacement text (if set).

    +

    \GLSuseriii[options]{entry-label}[insert]modifiers: * + alt-mod glossaries v2.04+
    +

    +As \glsuseriii but converts the link text to all caps.

    +

    \Glsuseriii[options]{entry-label}[insert]modifiers: * + alt-mod glossaries v2.04+
    +

    +As \glsuseriii but converts the link text to sentence case.

    +

    \glsuseriii[options]{entry-label}[insert]modifiers: * + alt-mod glossaries v2.04+
    +

    +References the entry identified by entry-label. The text produced is obtained from the user3 value. The insert argument will be inserted at the end of the link text. This command does not alter or depend on the first use flag. For the first optional argument, see \glslink options.

    +

    \glsuseriiiaccessdisplay{text}{entry-label}glossaries-accsupp v4.45+
    +

    +Does text with the user3access replacement text (if set).

    +

    \GLSuseriv[options]{entry-label}[insert]modifiers: * + alt-mod glossaries v2.04+
    +

    +As \glsuseriv but converts the link text to all caps.

    +

    \Glsuseriv[options]{entry-label}[insert]modifiers: * + alt-mod glossaries v2.04+
    +

    +As \glsuseriv but converts the link text to sentence case.

    +

    \glsuseriv[options]{entry-label}[insert]modifiers: * + alt-mod glossaries v2.04+
    +

    +References the entry identified by entry-label. The text produced is obtained from the user4 value. The insert argument will be inserted at the end of the link text. This command does not alter or depend on the first use flag. For the first optional argument, see \glslink options.

    +

    \glsuserivaccessdisplay{text}{entry-label}glossaries-accsupp v4.45+
    +

    +Does text with the user4access replacement text (if set).

    +

    \GLSuserv[options]{entry-label}[insert]modifiers: * + alt-mod glossaries v2.04+
    +

    +As \glsuserv but converts the link text to all caps.

    +

    \Glsuserv[options]{entry-label}[insert]modifiers: * + alt-mod glossaries v2.04+
    +

    +As \glsuserv but converts the link text to sentence case.

    +

    \glsuserv[options]{entry-label}[insert]modifiers: * + alt-mod glossaries v2.04+
    +

    +References the entry identified by entry-label. The text produced is obtained from the user5 value. The insert argument will be inserted at the end of the link text. This command does not alter or depend on the first use flag. For the first optional argument, see \glslink options.

    +

    \glsuservaccessdisplay{text}{entry-label}glossaries-accsupp v4.45+
    +

    +Does text with the user5access replacement text (if set).

    +

    \GLSuservi[options]{entry-label}[insert]modifiers: * + alt-mod glossaries v2.04+
    +

    +As \glsuservi but converts the link text to all caps.

    +

    \Glsuservi[options]{entry-label}[insert]modifiers: * + alt-mod glossaries v2.04+
    +

    +As \glsuservi but converts the link text to sentence case.

    +

    \glsuservi[options]{entry-label}[insert]modifiers: * + alt-mod glossaries v2.04+
    +

    +References the entry identified by entry-label. The text produced is obtained from the user6 value. The insert argument will be inserted at the end of the link text. This command does not alter or depend on the first use flag. For the first optional argument, see \glslink options.

    +

    \glsuserviaccessdisplay{text}{entry-label}glossaries-accsupp v4.45+
    +

    +Does text with the user6access replacement text (if set).

    +

    \glswriteentry{entry-label}{code}
    +

    +Performs the indexing code unless indexing should be suppressed. §5.8; 264

    +

    \glsxpabbrvfont{text}{category}glossaries-extra v1.49+
    +

    +If the markshortwords attribute is set for the given category, this encapsulates text with \glsabbrvfont otherwise with \glsinnerfmtabbrvfont. This command has to expand, so protect any content that shouldn’t expand. §4.5.3.1; 168

    +

    \glsxplongfont{category}{text}glossaries-extra v1.49+
    +

    +If the markwords attribute is set for the given category, this encapsulates text with \glslongfont otherwise with \glsinnerfmtlongfont. This command has to expand, so protect any content that shouldn’t expand. §4.5.3.1; 168

    + +

    + +
    +

    Glsxtr

    +
    \Glsxtr[gls-options][dfn-options]{entry-label}
    +

    +As \glsxtr but applies sentence case. §13; 579

    +

    \glsxtr[gls-options][dfn-options]{entry-label}
    +

    +If entry-label has already been defined, this just references it, otherwise the entry is defined. This command must be enabled with \GlsXtrEnableOnTheFly. §13; 578

    +

    \glsxtr@counterrecord{entry-label}{counter}{value}glossaries-extra v1.12+
    +

    +An aux file command used with \GlsXtrRecordCounter to append value to the record.counter field. Also implements \glsxtrAddCounterRecordHook. §8.4.3.2; 407

    +

    \glsxtr@record{entry-label}{h-prefix}{counter}{encap}{location}glossaries-extra v1.08+
    +

    +Used in the aux file to provide the record for bib2gls (record=only). Ignored by LaTeX. §11.5.6; 555

    +

    \glsxtr@record@nameref{entry-label}{h-prefix}{counter}{encap}{location}{current title}{current anchor}{the-h-counter}glossaries-extra v1.37+
    +

    +Used in the aux file to provide the nameref record for bib2gls. Ignored by LaTeX. §11.5.6; 555

    +

    \glsxtr@resource{options}{basename}glossaries-extra v1.08+
    +

    +Used in the aux file to provide the resource options for bib2gls for each resource set. Ignored by LaTeX. §11; 511

    +

    +

    +Used by \glsentryfmt to encapsulate non-regular entries the have the short field set. §5.5.2; 240

    +

    \glsxtrabbrvfootnote{entry-label}{text}glossaries-extra v1.07+
    +

    +Command that produces the footnote for the footnote abbreviation styles, such as short-footnote and short-postfootnote. 145

    +

    +

    +The default plural suffix used for abbreviations. §4.1.2; 44

    +

    +

    +Expands to the label of the default abbreviation glossary. The abbreviations package option will redefine this to abbreviations. §4.1.4; 44

    +

    +

    +Initialised accessibility support for the name, text and plural fields (if enabled with accsupp). This command is provided for abbreviation styles where the name and text are just the formatted abbreviation. §4.5.3.1; 169

    +

    +

    +Initialised accessibility support for the first, firstplural, text and plural fields (if enabled with accsupp). This command is provided for abbreviation styles where the first and text are just the formatted abbreviation. §4.5.3.1; 169

    +

    +

    +Initialised accessibility support for the name field (if enabled with accsupp). This command is provided for abbreviation styles where only the name is just the formatted abbreviation. §4.5.3.1; 169

    +

    +

    +Initialised accessibility support for the name, first, firstplural, text and plural fields (if enabled with accsupp). This command is provided for abbreviation styles where the name, first and text are just the formatted abbreviation. §4.5.3.1; 168

    +

    +

    +Initialised accessibility support for the text and plural fields (if enabled with accsupp). This command is provided for abbreviation styles where the text is just the formatted abbreviation. §4.5.3.1; 169

    +

    +

    +Activates \nopostdesc and \glsxtrnopostpunc. §8.5; 415

    +

    +

    +Expands to the anchor required by \glsxtrdisplaylocnameref. §11.5.6; 557

    +

    +

    +Iterates over all defined entries and indexes any cross-references (identified by the see or seealso keys) that haven’t been used. §5.9.3; 279

    +

    \glsxtrAddCounterRecordHook{entry-label}{counter}{value}glossaries-extra v1.49+
    +

    +User-level hook used by \glsxtr@counterrecord. If this command is redefined, it must be done so in the preamble before the aux file is input. §8.4.3.2; 407

    +

    \glsxtraddgroup{entry-label}{code}glossaries-extra v1.49+
    +

    +Used by the “unsrt” family of commands to perform code if the entry identified by entry-label should have support for groups. §8.4.1; 391

    +

    +

    +Appends label-prefix to the list of known labels. §11.5.7; 563

    +

    +

    +Adds token(s) to the list of punctuation characters used by \glsxtrifnextpunc. You may list multiple characters at the same time to add a batch, but don’t add any separators (including spaces). Note that each character must be a single token, which means a single-byte character for pdfLaTeX. Multi-byte characters (UTF-8) will required a native Unicode engine (XeLaTeX or LuaLaTeX). §5.5.4; 249

    +

    +

    +Indexes any cross-references (identified by the see or seealso keys) that haven’t been used. §5.9.3; 279

    +

    \glsxtralias{entry-label}glossaries-extra v1.12+
    +

    +Expands to the value of the alias field for the entry identified by entry-label. If the field isn’t set, this will expand to nothing. If the entry isn’t defined, this will expand to \relax. §5.9.2; 277

    +

    \glsxtraliashook{entry-label}glossaries-extra v1.49+
    +

    +Hook implemented when the alias key is provided when an entry is defined. §3.4; 36

    +

    +

    +Length register for the subsequent paragraph indentation for the alttree-like styles. §8.6.5.4; 437

    +

    +

    +Initialisation code performed by the alttree-like styles. §8.6.5.4; 437

    +

    \glsxtralttreeSubSymbolDescLocation{entry-label}{location list}glossaries-extra-stylemods v1.05+
    +

    +Formats the symbol, description and location for child entries for the alttree-like styles. §8.6.5.4; 437

    +

    \glsxtralttreeSymbolDescLocation{entry-label}{location list}glossaries-extra-stylemods v1.05+
    +

    +Formats the symbol, description and location for top-level entries for the alttree-like styles. §8.6.5.4; 437

    +

    \glsxtrapptocsvfield{entry-label}{field-label}{element}glossaries-extra v1.47+
    +

    +For use with fields that should contain comma-separated lists, this will append a command followed by element to the field value. If the field isn’t defined, this command will behave like \glsxtrdeffield. No existence check is performed. §3.5; 38

    +

    +

    +Locally append options to the default options for the \gls-like and \glstext-like commands. §5.1.1; 187

    +

    +

    +Used to strip common formatting commands from a field value to supply the text-only accessibility content when initialising the default shortaccess and shortpluralaccess values. §9.1; 475

    +

    \glsxtrassignfieldfont{entry-label}glossaries-extra v1.04+
    +

    +Used by the \glstext-like commands to initialise the formatting commands required for the given entry. §5.5.2; 240

    +

    +

    +Initialised by the \gls-like and \glstext-like commands, this contains the definitions of \glslabel, \glstextformat, \glsxtrgenentrytextfmt. §5.5.4; 254

    +

    +

    +Applies the command obtained from the control sequence name supplied in the innertextformat attribute for the category assigned to the entry given by \glslabel. This command isn’t used by default as it should rarely be needed an increases complexity. §5.5.3; 243

    +

    \GlsXtrAutoAddOnFormat[entry-label]{format list}{glsadd options}glossaries-extra v1.37+
    +

    +Identifies formats that should trigger an automatic \glsadd by the \gls-like and \glstext-like commands. §5.8; 260

    +

    +

    +The indexing command used by by the auto-indexing feature. §12; 575

    +

    +

    +Used to assign the sort value for the auto-indexing feature. §12; 575

    +

    \glsxtrautoindexentry{entry-label}glossaries-extra v1.16+
    +

    +Expands to the “actual” part for the auto-indexing feature. §12; 574

    +

    +

    +Escapes the sort value used by the auto-indexing feature. §12; 575

    +

    +

    +Expands to the Basic Latin digit character sort rules. 545

    +

    \glsxtrbibaddress{entry-label}

    +

    +
    +

    +Accesses the address field. §11.5.2; 536

    +

    \glsxtrbibauthor{entry-label}

    +

    +
    +

    +Accesses the author field. §11.5.2; 536

    +

    \glsxtrbibbooktitle{entry-label}

    +

    +
    +

    +Accesses the booktitle field. §11.5.2; 536

    +

    \glsxtrbibchapter{entry-label}

    +

    +
    +

    +Accesses the chapter field. §11.5.2; 536

    +

    \glsxtrbibedition{entry-label}

    +

    +
    +

    +Accesses the edition field. §11.5.2; 536

    +

    \glsxtrbibhowpublished{entry-label}

    +

    +
    +

    +Accesses the howpublished field. §11.5.2; 536

    +

    \glsxtrbibinstitution{entry-label}

    +

    +
    +

    +Accesses the institution field. §11.5.2; 536

    +

    \glsxtrbibjournal{entry-label}

    +

    +
    +

    +Accesses the journal field. §11.5.2; 536

    +

    \glsxtrbibmonth{entry-label}

    +

    +
    +

    +Accesses the month field. §11.5.2; 536

    +

    \glsxtrbibnote{entry-label}

    +

    +
    +

    +Accesses the note field. §11.5.2; 536

    +

    \glsxtrbibnumber{entry-label}

    +

    +
    +

    +Accesses the number field. §11.5.2; 536

    +

    \glsxtrbiborganization{entry-label}

    +

    +
    +

    +Accesses the organization field. §11.5.2; 536

    +

    \glsxtrbibpages{entry-label}

    +

    +
    +

    +Accesses the pages field. §11.5.2; 536

    +

    \glsxtrbibpublisher{entry-label}

    +

    +
    +

    +Accesses the publisher field. §11.5.2; 536

    +

    \glsxtrbibschool{entry-label}

    +

    +
    +

    +Accesses the school field. §11.5.2; 536

    +

    \glsxtrbibseries{entry-label}

    +

    +
    +

    +Accesses the series field. §11.5.2; 536

    +

    +

    +Expands to the BibTeX to bib2gls entry aliases for use in entry-type-aliases. §11.5.2; 535

    +

    \glsxtrbibtitle{entry-label}

    +

    +
    +

    +Accesses the title field. §11.5.2; 536

    +

    \glsxtrbibtype{entry-label}

    +

    +
    +

    +Accesses the bibtextype field. §11.5.2; 536

    +

    \glsxtrbibvolume{entry-label}

    +

    +
    +

    +Accesses the volume field. §11.5.2; 536

    +

    +

    +Used by the bookindex style at the end of a letter group (where the last top-level entry is given by entry-label). §8.7.1; 441

    +

    \glsxtrbookindexbetween{entry1-label}{entry2-label}glossary-bookindex v1.21+
    +

    +Used by the bookindex style between two entries where entry1-label is the last top-level entry and entry2-label is the next entry, which is a top-level entry. §8.7.1; 441

    +

    \glsxtrbookindexbookmark{group-title}{bookmark-name}glossary-bookindex v1.21+
    +

    +Adds a bookmark with \pdfbookmark, if supported. §8.7.1; 442

    +

    +

    +Expands to the number of columns for the bookindex style. §8.7.1; 438

    +

    +

    +If not empty this should expand to the option argument for multicols. §8.7.1; 439

    +

    +

    +Used by the bookindex style to obtain the first mark and, if found, format it with \glsxtrbookindexfirstmarkfmt. §8.7.1; 443

    +

    +

    +Used by the bookindex style to format the first mark. §8.7.1; 444

    +

    +

    +Used by the bookindex style to format a group header. §8.7.1; 443

    +

    \glsxtrbookindexformatsubheader{previous level}{level}{parent-label}{group-label}{title}glossary-bookindex v1.49+
    +

    +Formats the sub-group header.

    +

    +

    +Used by the bookindex style to obtain the last mark and, if found, format it with \glsxtrbookindexlastmarkfmt. §8.7.1; 443

    +

    +

    +Used by the bookindex style to format the last mark. §8.7.1; 444

    +

    \glsxtrbookindexlocation{entry-label}{location list}glossary-bookindex v1.39+
    +

    +Used by the bookindex style to display top-level location lists. §8.7.1; 440

    +

    +

    +Used by the bookindex style to mark an entry in the aux file. §8.7.1; 443

    +

    +

    +Expands to the name of the multicols environment to use. §8.7.1; 439

    +

    \glsxtrbookindexname{entry-label}glossary-bookindex v1.21+
    +

    +Used by the bookindex style to display a top-level entry’s name. §8.7.1; 439

    +

    +

    +Used by the bookindex style to separate a top-level parent and child entry. §8.7.1; 440

    +

    +

    +Used by the bookindex style to separate a sub-level parent and child entry. §8.7.1; 441

    +

    +

    +Used by the bookindex style insert skip after a group header. §8.7.1; 443

    +

    +

    +Used by the bookindex style to display a separator before top-level location lists. §8.7.1; 440

    +

    +

    +Used by the bookindex style at the end of a letter group (where the last level 1 entry is given by entry-label). §8.7.1; 441

    +

    \glsxtrbookindexsubbetween{entry1-label}{entry2-label}glossary-bookindex v1.21+
    +

    +As \glsxtrbookindexbetween but for level 1 entries. §8.7.1; 441

    +

    \glsxtrbookindexsublocation{entry-label}{location list}glossary-bookindex v1.39+
    +

    +Used by the bookindex style to display child location lists. §8.7.1; 440

    +

    +

    +Used by the bookindex style to display a child entry’s name. §8.7.1; 440

    +

    +

    +Used by the bookindex style to display a separator before child location lists. §8.7.1; 440

    +

    +

    +Used by the bookindex style at the end of a letter group (where the last level 2 entry is given by entry-label). §8.7.1; 441

    +

    \glsxtrbookindexsubsubbetween{entry1-label}{entry2-label}glossary-bookindex v1.21+
    +

    +As \glsxtrbookindexbetween but for level 2 entries. §8.7.1; 441

    +

    \glsxtrcatinitial: general
    +

    +Expands to the default category set by commands like \glsxtr. §13; 580

    +

    \glsxtrcategoryfieldaccsupp

    +

    (user defined)
    +
    +

    +Expands to the accessibility support command for the given internal field label and category, which is used by \glsfieldaccsupp.

    +

    +

    +Sets hyper=false if the nohyperfirst attribute is set. §5.1.1; 189

    +

    +

    +Clears the list of known prefixes. §11.5.7; 563

    +

    +

    +Locally clears the buffer, but doesn’t stop buffering. §5.10.1; 285

    +

    +

    +Expands to the third set of combining diacritic sort rules. 543

    +

    +

    +Expands to the second set of combining diacritic sort rules. 543

    +

    +

    +Expands to the first set of combining diacritic sort rules. 542

    +

    +

    +Expands to the fourth set of combining diacritic sort rules. 543

    +

    +

    +Expands to all the combining diacritic sort rules. 542

    +

    +

    +Expands to control character sort rules. 542

    +

    \glsxtrcopytoglossary{entry-label}{glossary-type}modifier: * glossaries-extra v1.12+
    +

    +Copies the entry to the internal glossary list for the given glossary. The starred version performs a global change. The unstarred version can be localised. Only for use with the “unsrt” family of commands. §8; 376

    +

    \glsxtrcounterlocfmt{location}{title}

    +

    (user defined)
    +
    +

    +Used by \glsxtrdisplaylocnameref for format a location where the counter matches counter. §11.5.6; 558

    +

    +

    +Expands to currency character sort rules. 545

    +

    +

    +Placeholder command for use in post-link hooks. This expands to empty if the calling command was one of the \gls-like commands or it was one of the inline full form commands, otherwise it will expand to the name of the key associated with the singular form of the command. §5.5.4; 252

    +

    +

    +Placeholder command for use in multi-entry hooks, this expands to the control sequence name of the calling command. §7.5; 348

    +

    +

    +Default inner formatting. Initialised to just do text. §5.5.3; 243

    +

    +

    +Expands to default resource options. §11; 513

    +

    +

    +The default definition of \glsxtrrevert. Simply does text. 133

    +

    \GLSxtrdefaultsubsequentfmt{entry-label}{insert}glossaries-extra v1.49+
    +

    +The default all caps subsequent format style that only shows the short form and insert (with support for innertextformat). 174

    +

    \Glsxtrdefaultsubsequentfmt{entry-label}{insert}glossaries-extra v1.17+
    +

    +The default sentence case subsequent format style that only shows the short form and insert (with support for innertextformat). 174

    +

    \glsxtrdefaultsubsequentfmt{entry-label}{insert}glossaries-extra v1.17+
    +

    +The default subsequent format style that only shows the short form and insert (with support for innertextformat). 174

    +

    \GLSxtrdefaultsubsequentplfmt{entry-label}{insert}glossaries-extra v1.49+
    +

    +The default all caps subsequent plural format style that only shows the short form and insert (with support for innertextformat). 174

    +

    \Glsxtrdefaultsubsequentplfmt{entry-label}{insert}glossaries-extra v1.17+
    +

    +The default sentence case subsequent plural format style that only shows the short form and insert (with support for innertextformat). 174

    +

    \glsxtrdefaultsubsequentplfmt{entry-label}{insert}glossaries-extra v1.17+
    +

    +The default subsequent plural format style that only shows the short form and insert (with support for innertextformat). 174

    +

    \glsxtrdeffield{entry-label}{field-label}{value}glossaries-extra v1.12+
    +

    +Like \GlsXtrSetField but doesn’t perform any existence checks. §3.5; 38

    +

    \GlsXtrDefineAbbreviationShortcuts
    +

    +Used by shortcuts=abbreviations and shortcuts=all. This command redefines itself to do nothing because it can only be used once.

    +

    \GlsXtrDefineAcronymShortcutsglossaries-extra v1.17+
    +

    +Used by shortcuts=ac and shortcuts=acother. This command redefines itself to do nothing because it can only be used once.

    +

    \GlsXtrDefineOtherShortcuts
    +

    +Used by shortcuts=other and shortcuts=all. This command redefines itself to do nothing because it can only be used once.

    +

    +

    +Just expands to location by default but may be redefined to help protect awkward characters. §11.4; 522

    +

    +

    +Expands to 0–9 digit character sort rules (includes superscript and subscript digits). 545

    +

    \glsxtrdiscardperiod{entry-label}{discarded}{no discard}tokenglossaries-extra
    +

    +If token is a full stop and the entry’s category attributes indicate that a full stop should be discarded (such as discardperiod), then discarded is performed, otherwise no discard is done and the token is processed. The actual test to determine if token is a full stop is performed by \glsxtrifperiod. This command is used in post-link hooks. §5.5.4; 247

    +

    \glsxtrdiscardperiodretainfirstuse{entry-label}{discarded}{no discard}tokenglossaries-extra v1.49+
    +

    +Used to discard a following full stop when the retainfirstuseperiod attribute is set. §5.5.4; 247

    +

    +

    +Discards the pending buffer and restores \glsunset. §5.10.1; 285

    +

    \glsxtrdisplayendloc{format}{location}glossaries-extra v1.12+
    +

    +Used to display an end location from an explicit range. §8.6.3; 424

    +

    +

    +Hook used by \glsxtrdisplayendloc. §8.6.3; 425

    +

    \glsxtrdisplaylocnameref{prefix}{counter}{format}{location}{title}{href}{hcounter}{file}glossaries-extra-bib2gls v1.37+
    +

    +Used to display records created with record=nameref. §11.5.6; 556

    +

    \glsxtrdisplaysingleloc{format}{location}glossaries-extra v1.12+
    +

    +Used to display a single location. §8.6.3; 424

    +

    \glsxtrdisplaystartloc{format}{location}glossaries-extra v1.12+
    +

    +Used to display a start location from an explicit range. §8.6.3; 424

    +

    \glsxtrdisplaysupploc{prefix}{counter}{format}{src}{location}modifier: * glossaries-extra-bib2gls v1.36+
    +

    +Like \glsnoidxdisplayloc but used for supplementary locations. §11.5.5; 555

    +

    \glsxtrdoautoindexname{entry-label}{attribute}
    +

    +Used to automatically index (using \glsxtrautoindex) the entry’s name, if the given attribute is set for the entry’s category. §12; 574

    +

    \glsxtrdopostpunc{code}tokenglossaries-extra v1.49+
    +

    +If token is a recognised punctuation character (see \glsxtrifnextpunc) this does the punctuation character and then code, otherwise if does code followed by token. §5.5.4; 248

    +

    \glsxtrdowrglossaryhook{entry-label}glossaries-extra v1.49+
    +

    +Hook used whenever an entry is indexed. Does nothing by default. §5.8; 263

    +

    \GlsXtrDualBackLink{text}{entry-label}glossaries-extra-bib2gls v1.30+
    +

    +Adds a hyperlink to the given entry’s dual (whose label is stored in the field given by \GlsXtrDualField) with the given hyperlink text. §11.5.7; 561

    +

    +

    +Expands to the internal field label used by \GlsXtrDualBackLink. §11.5.7; 562

    +

    \glsxtredeffield{entry-label}{field-label}{value}glossaries-extra v1.12+
    +

    +Like \glsxtrdeffield but (protected) expands value. §3.5; 38

    +

    +

    +The definition of \glsxtrrevert used by the emphasized (“em”) abbreviation styles. Uses \textup. 158

    +

    +

    +The plural suffix used by the emphasized (“em”) abbreviation styles. 158

    +

    \GlsXtrEnableEntryCounting{category-list}{trigger-value}
    +

    +Enables entry counting for the given list of categories with the given trigger value (which must be an integer). §6.1; 308

    +

    \GlsXtrEnableEntryUnitCounting{category-list}{trigger-value}{counter}
    +

    +Enables unit entry counting for the given list of categories with the given trigger value (which must be an integer) and the associated counter. §6.1; 313

    +

    +

    +Allows the format key to override the attribute value. §12; 576

    +

    \GlsXtrEnableInitialTagging{categories}{cs}modifier: *
    +

    +Robustly defines the command cs to accept a single argument, which is a letter (or letters) that needs to be tagged. The unstarred version triggers an error if cs is already defined. The unstarred version will redefine cs if it already exists. §4.4; 56

    +

    \GlsXtrEnableLinkCounting[parent counter]{categories}glossaries-extra v1.26+

    +

    (preamble only)
    +
    +

    +Enables link counting for the given categories. §6.2; 317

    +

    +

    +Enables on the fly commands, such as \glsxtr. §13; 578

    +

    \GlsXtrEnablePreLocationTag{page tag}{pages tag}glossaries-extra v1.04+
    +

    +Enables the location list tag. §8.6.3; 423

    +

    +

    +Redefines the \gls-like commands (except \glsdisp) to use the analogous record count commands (\rgls etc). §11.4; 527

    +

    +

    +When used within \glsxtrforcsvfield signifies that the loop should break at the end of the current iteration. §5.13; 301

    +

    \Glsxtrentryfmt{entry-label}{text}glossaries-extra v1.49+
    +

    +As \glsxtrentryfmt but converts text to sentence case. §5.12.2; 298

    +

    \glsxtrentryfmt{entry-label}{text}glossaries-extra v1.12+
    +

    +Does \csname{text} where the control sequence name csname is obtained from the field given by \GlsXtrFmtField. If hyperref has been loaded and this command will expand to \glsxtrpdfentryfmt{entry-label}{text} in a PDF bookmark. §5.12.2; 296

    +

    +

    +Expands to the name field of the given entry’s parent or does nothing if the entry doesn’t have the parent field set or isn’t defined. §5.11; 291

    +

    \glsxtrequationlocfmt{location}{title}glossaries-extra-bib2gls v1.42+
    +

    +Used by \glsxtrdisplaylocnameref to format a location where the counter is equation. §11.5.6; 558

    +

    \GlsXtrExpandedFmt{cs}{content}glossaries-extra v1.30+
    +

    +Fully-expands content and passes it to cs, which must be a command that takes a single argument. §5.5; 236

    +

    \glsxtrfielddolistloop{entry-label}{field}glossaries-extra v1.12+
    +

    +Iterates over the given field’s value using etoolbox’s \dolistcsloop. §5.14; 304

    +

    \glsxtrfieldforlistloop{entry-label}{field}{handler-cs}glossaries-extra v1.12+
    +

    +Iterates over the given field’s value using etoolbox’s \forlistcsloop. §5.14; 304

    +

    \glsxtrfieldformatcsvlist{entry-label}{field-label}glossaries-extra v1.42+
    +

    +Formats the comma-separated list stored in the given field (identified by its internal label) for the entry identified by entry-label using datatool-base’s \DTLformatlist. This command uses \glsxtrifhasfield so the complete list can be obtained with \glscurrentfieldvalue. This adds implicit grouping. There is no starred version. §5.13; 302

    +

    \glsxtrfieldformatlist{entry-label}{field-label}glossaries-extra v1.42+
    +

    +Formats the value of the given field, which should be an etoolbox internal list, using the same list handler macro as datatool’s \DTLformatlist. §5.14; 304

    +

    \glsxtrfieldifinlist{entry-label}{field}{item}{true}{false}glossaries-extra v1.12+
    +

    +Uses etoolbox’s \ifinlistcs to determine if item is in the list stored in the given field. §5.14; 304

    +

    \glsxtrfieldlistadd{entry-label}{field}{value}glossaries-extra v1.12+
    +

    +Appends value to the given field using etoolbox’s \listcsadd. §3.5; 39

    +

    \glsxtrfieldlisteadd{entry-label}{field}{value}glossaries-extra v1.12+
    +

    +Appends value to the given field using etoolbox’s \listcseadd. §3.5; 39

    +

    \glsxtrfieldlistgadd{entry-label}{field}{value}glossaries-extra v1.12+
    +

    +Appends value to the given field using etoolbox’s \listcsgadd. §3.5; 39

    +

    \glsxtrfieldlistxadd{entry-label}{field}{value}glossaries-extra v1.12+
    +

    +Appends value to the given field using etoolbox’s \listcsxadd. §3.5; 39

    +

    \glsxtrfieldtitlecase{entry-label}{field-label}
    +

    +As \glsxtrusefield but converts the field value to title case. §5.11; 291

    +

    +

    +Converts content to title case (expanding the first token once). Uses \glscapitalisewords, if defined, otherwise uses \capitalisewords. §5.11; 291

    +

    \glsxtrfieldxifinlist{entry-label}{field}{item}{true}{false}glossaries-extra v1.12+
    +

    +Uses etoolbox’s \xifinlistcs to determine if item is in the list stored in the given field. §5.14; 305

    +

    \glsxtrfirstscfont{text}glossaries-extra v1.04+
    +

    +Maintained for backwards-compatibility used to typeset text in small capitals (\textsc) for the “sc” abbreviation styles on first use.

    +

    \glsxtrfirstsmfont{text}glossaries-extra v1.04+
    +

    +Maintained for backwards-compatibility used to typeset text in a smaller font (\textsmaller) for the “sm” abbreviation styles on first use.

    +

    \Glsxtrfmt[options]{entry-label}{text}glossaries-extra v1.49+
    +

    +As \glsxtrfmt but applies a sentence case change to text. §5.12.2; 298

    +

    \glsxtrfmt[options]{entry-label}{text}glossaries-extra v1.12+
    +

    +Behaves like \glslink[options]{entry-label}{\csname{text}insert} where the control sequence name csname is obtained from the field given by \GlsXtrFmtField. The actual format of the link text is governed by \glsxtrfmtdisplay. §5.12.2; 295

    +

    \Glsxtrfmt*[options]{entry-label}{text}[insert]glossaries-extra v1.49+
    +

    +As \glsxtrfmt* but applies a sentence case change to text. §5.12.2; 298

    +

    \glsxtrfmt*[options]{entry-label}{text}[insert]glossaries-extra v1.23+
    +

    +As the unstarred version \glsxtrfmt but accepts the final insert option.

    +

    +

    +Expands to the default options for \glsxtrfmt. §5.1.1; 188

    +

    \glsxtrfmtdisplay{csname}{text}{insert}glossaries-extra v1.23+
    +

    +Formats the link text used in \glsxtrfmt. §5.12.2; 296

    +

    \glsxtrfmtexternalnameref{target}{format}{title}{file}glossaries-extra-bib2gls v1.37+
    +

    +Used by \glsxtrnamereflink to create an external location hyperlink. §11.5.6; 559

    +

    \GlsXtrFmtFieldinitial: useri; glossaries-extra v1.12+
    +

    +Expands to the name of the used by \glsxtrfmt. §5.12.2; 295

    +

    \glsxtrfmtinternalnameref{target}{format}{file}glossaries-extra-bib2gls v1.37+
    +

    +Used by \glsxtrnamereflink to create an internal location hyperlink. §11.5.6; 559

    +

    +

    +Expands to the name value for styles like short-footnote-desc. 144

    +

    +

    +Expands to the sort value for styles like short-footnote-desc. 145

    +

    \glsxtrfootnotelongformat{entry-label}{fmt-cs}glossaries-extra v1.49+
    +

    +Used in the footnote text to format the singular long form. 145

    +

    \glsxtrfootnotelongplformat{entry-label}{fmt-cs}glossaries-extra v1.49+
    +

    +Used in the footnote text to format the plural long form. 146

    +

    +

    +Expands to the name value for styles like short-footnote. 144

    +

    \glsxtrforcsvfield{entry-label}{field-label}{handler cs}modifier: * glossaries-extra v1.24+
    +

    +Iterates over the comma-separated list stored in the given field (identified by its internal label) for the entry identified by entry-label and performs handler cs{element} for each element of the list. This command uses \glsxtrifhasfield so the complete list can be obtained with \glscurrentfieldvalue. The unstarred version adds implicit grouping. The starred version doesn’t. §5.13; 301

    +

    \GlsXtrForeignText{entry-label}{text}glossaries-extra v1.32+
    +

    +If the entry given by entry-label has the field identified by \GlsXtrForeignTextField then text will be encapsulated according to the language tag stored in that field (using tracklang’s interface). §5.12.1; 293

    +

    +

    +Expands to the internal field label used by \GlsXtrForeignText. §5.12.1; 293

    +

    \GlsXtrFormatLocationList{location list}
    +

    +Used by \glossaryentrynumbers to encapsulate the entire location list in the glossary. §8.6.3; 423

    +

    +

    +Iterates over the labels stored in the current buffer. §5.10.1; 285

    +

    +

    +Expands to the number forms fraction character sort rules. 546

    +

    \GLSxtrfull[options]{entry-label}[insert]modifiers: * + alt-mod
    +

    +As \glsxtrfull but converts the link text to all caps. §4.3; 54

    +

    \Glsxtrfull[options]{entry-label}[insert]modifiers: * + alt-mod
    +

    +As \glsxtrfull but converts the first character of the link text to uppercase (for the start of a sentence) using \makefirstuc. §4.3; 53

    +

    \glsxtrfull[options]{entry-label}[insert]modifiers: * + alt-mod
    +

    +References the entry identified by entry-label. The text produced is obtained from the short and long values, formatted according to the abbreviation style associated with the entry’s category. The insert argument will be inserted at the end of the link text. This command does not alter or depend on the first use flag. The format produced by this command may not match the format produced by the first use of \gls{entry-label}, depending on the abbreviation style. For the first optional argument, see \glslink options. §4.3; 53

    +

    \GLSxtrfullformat{entry-label}{insert}glossaries-extra v1.49+
    +

    +The all caps singular display full form (defined by the abbreviation style). 173

    +

    \Glsxtrfullformat{entry-label}{insert}glossaries-extra v1.49+
    +

    +The sentence case singular display full form (defined by the abbreviation style). 172

    +

    \glsxtrfullformat{entry-label}{insert}glossaries-extra v1.49+
    +

    +The singular display full form (defined by the abbreviation style). 172

    +

    \GLSxtrfullpl[options]{entry-label}[insert]modifiers: * + alt-mod
    +

    +As \glsxtrfullpl but converts the link text to all caps. §4.3; 54

    +

    \Glsxtrfullpl[options]{entry-label}[insert]modifiers: * + alt-mod
    +

    +As \glsxtrfullpl but converts the first character of the link text to uppercase (for the start of a sentence) using \makefirstuc. §4.3; 54

    +

    \glsxtrfullpl[options]{entry-label}[insert]modifiers: * + alt-mod
    +

    +References the entry identified by entry-label. The text produced is obtained from the shortplural and longplural values, formatted according to the abbreviation style associated with the entry’s category. The insert argument will be inserted at the end of the link text. This command does not alter or depend on the first use flag. The format produced by this command may not match the format produced by the first use of \glspl{entry-label}, depending on the abbreviation style. For the first optional argument, see \glslink options. §4.3; 54

    +

    \GLSxtrfullplformat{entry-label}{insert}glossaries-extra v1.49+
    +

    +The all caps plural display full form (defined by the abbreviation style). 173

    +

    \Glsxtrfullplformat{entry-label}{insert}glossaries-extra v1.49+
    +

    +The sentence case plural display full form (defined by the abbreviation style). 172

    +

    \glsxtrfullplformat{entry-label}{insert}glossaries-extra v1.49+
    +

    +The plural display full form (defined by the abbreviation style). 172

    +

    \glsxtrfullsaveinsert{entry-label}{insert}glossaries-extra v1.49+
    +

    +Implemented at the start of all the inline full form commands like \glsxtrfull to save the \glsinsert placeholder. By default, this just does \glsxtrsaveinsert. §4.3; 54

    +

    \glsxtrfullsep{entry-label}
    +

    +Separator used by the parenthetical inline full form and also for some display full forms. 132

    +

    +

    +The display format used by \glsentryfmt for entries that have the short field set and have the regular attribute set to false. §5.5.5; 255

    +

    +

    +Redefined by the \gls-like and \glstext-like hooks to set up the inner formatting. Initialised to \glsxtrdefaultentrytextfmt. §5.5.3; 243

    +

    +

    +A shortcut that expands to the ignorable rules, combining diacritic rules, hyphen rules, general punctuation rules, digit rules, and fraction rules. 546

    +

    +

    +Expands to the A–G subset of General Latin I sort rules. 548

    +

    +

    +Expands to the A–M subset of General Latin I sort rules. 548

    +

    +

    +Expands to the H–M subset of General Latin I sort rules. 548

    +

    +

    +Expands to the third set of General Latin sort rules. 547

    +

    +

    +Expands to the second set of General Latin sort rules. 547

    +

    +

    +Expands to the first set of General Latin sort rules. 546

    +

    +

    +Expands to the fourth set of General Latin sort rules. 547

    +

    +

    +Expands to the N–S subset of General Latin I sort rules. 548

    +

    +

    +Expands to the N–Z subset of General Latin I sort rules. 548

    +

    +

    +Expands to the T–Z subset of General Latin I sort rules. 548

    +

    +

    +Expands to the eighth set of General Latin sort rules. 547

    +

    +

    +Expands to the seventh set of General Latin sort rules. 547

    +

    +

    +Expands to the sixth set of General Latin sort rules. 547

    +

    +

    +Expands to the fifth set of General Latin sort rules. 547

    +

    +

    +Punctuation accent subset of \glsxtrgeneralpuncIrules. 544

    +

    +

    +Punctuation bracket subset of \glsxtrgeneralpuncIrules. 544

    +

    +

    +Expands to the second set of general punctuation (including currency) sort rules. 545

    +

    +

    +Expands to the first set of general punctuation (including currency) sort rules. 544

    +

    +

    +Punctuation mark subset of \glsxtrgeneralpuncIrules. 544

    +

    +

    +Punctuation quote subset of \glsxtrgeneralpuncIrules. 544

    +

    +

    +Expands to all sets of general punctuation sort rules. 543

    +

    +

    +Punctuation sign subset of \glsxtrgeneralpuncIrules. 545

    +

    \glsxtrgetgrouptitle{group-label}{cs}glossaries-extra v1.14+
    +

    +Obtains the title corresponding to the group identified by group-label and stores the result in the control sequence cs. §8.6.4; 426

    +

    \glsxtrgroupfieldinitial: group; glossaries-extra v1.21+
    +

    +Expands to the internal field label used to store the group label (requires record). §8.4.1; 389

    +

    \glsxtrglossentry{entry-label}glossaries-extra v1.21+
    +

    +Used for standalone entries to display the name with \glossentryname, with appropriate hooks. §8.5; 414

    +

    \glsxtrglossentryother{header}{entry-label}{field-label}glossaries-extra v1.22+
    +

    +Like \glsxtrglossentry but uses the given field instead of name. §8.5; 415

    +

    \GLSxtrheadfirst{entry-label}glossaries-extra v1.49+
    +

    +Used to display the all caps entry’s first field in the page header. §5.3.3; 226

    +

    \Glsxtrheadfirst{entry-label}
    +

    +Used to display the sentence case entry’s first field in the page header (converts to all caps if headuc attribute is true). §5.3.3; 225

    +

    \glsxtrheadfirst{entry-label}
    +

    +Used to display the entry’s first field in the page header (converts to all caps if headuc attribute is true). §5.3.3; 225

    +

    \GLSxtrheadfirstplural{entry-label}glossaries-extra v1.49+
    +

    +Used to display the all caps entry’s firstplural field in the page header. §5.3.3; 226

    +

    \Glsxtrheadfirstplural{entry-label}
    +

    +Used to display the sentence case entry’s firstplural field in the page header (converts to all caps if headuc attribute is true). §5.3.3; 226

    +

    \glsxtrheadfirstplural{entry-label}
    +

    +Used to display the entry’s firstplural field in the page header (converts to all caps if headuc attribute is true). §5.3.3; 226

    +

    \GLSxtrheadfull{entry-label}glossaries-extra v1.49+
    +

    +Used to display the entry’s all caps full form in the page header. §5.3.3; 222

    +

    \Glsxtrheadfull{entry-label}glossaries-extra v1.02+
    +

    +Used to display the entry’s sentence case full form in the page header (converts to all caps if headuc attribute is true). §5.3.3; 222

    +

    \glsxtrheadfull{entry-label}glossaries-extra v1.02+
    +

    +Used to display the entry’s full form in the page header (converts to all caps if headuc attribute is true). §5.3.3; 221

    +

    \GLSxtrheadfullpl{entry-label}glossaries-extra v1.49+
    +

    +Used to display the entry’s all caps full plural form in the page header. §5.3.3; 223

    +

    \Glsxtrheadfullpl{entry-label}glossaries-extra v1.02+
    +

    +Used to display the entry’s sentence case full plural form in the page header (converts to all caps if headuc attribute is true). §5.3.3; 222

    +

    \glsxtrheadfullpl{entry-label}glossaries-extra v1.02+
    +

    +Used to display the entry’s full plural form in the page header (converts to all caps if headuc attribute is true). §5.3.3; 222

    +

    \GLSxtrheadlong{entry-label}glossaries-extra v1.49+
    +

    +The behaviour of \GLSfmtlong when it occurs in a page header. §5.3.3; 220

    +

    \Glsxtrheadlong{entry-label}glossaries-extra v1.02+
    +

    +The behaviour of \Glsfmtlong when it occurs in a page header. §5.3.3; 220

    +

    \glsxtrheadlong{entry-label}glossaries-extra v1.02+
    +

    +The behaviour of \glsfmtlong when it occurs in a page header. §5.3.3; 220

    +

    \GLSxtrheadlongpl{entry-label}glossaries-extra v1.49+
    +

    +The behaviour of \GLSfmtlongpl when it occurs in a page header. §5.3.3; 221

    +

    \Glsxtrheadlongpl{entry-label}glossaries-extra v1.02+
    +

    +The behaviour of \Glsfmtlongpl when it occurs in a page header. §5.3.3; 221

    +

    \glsxtrheadlongpl{entry-label}glossaries-extra v1.02+
    +

    +The behaviour of \glsfmtlongpl when it occurs in a page header. §5.3.3; 221

    +

    \GLSxtrheadname{entry-label}glossaries-extra v1.49+
    +

    +Used to display the all caps entry’s name field in the page header. §5.3.3; 223

    +

    \Glsxtrheadname{entry-label}glossaries-extra v1.21+
    +

    +Used to display the sentence case entry’s name in the page header (converts to all caps if headuc attribute is true). §5.3.3; 223

    +

    \glsxtrheadname{entry-label}glossaries-extra v1.21+
    +

    +Used to display the entry’s name in the page header (converts to all caps if headuc attribute is true). §5.3.3; 223

    +

    \GLSxtrheadplural{entry-label}glossaries-extra v1.49+
    +

    +Used to display the all caps entry’s plural field in the page header. §5.3.3; 225

    +

    \Glsxtrheadplural{entry-label}
    +

    +Used to display the sentence case entry’s plural field in the page header (converts to all caps if headuc attribute is true). §5.3.3; 225

    +

    \glsxtrheadplural{entry-label}
    +

    +Used to display the entry’s plural field in the page header (converts to all caps if headuc attribute is true). §5.3.3; 224

    +

    \GLSxtrheadshort{entry-label}glossaries-extra v1.49+
    +

    +The behaviour of \GLSfmtshort when it occurs in a page header. §5.3.3; 218

    +

    \Glsxtrheadshort{entry-label}
    +

    +The behaviour of \Glsfmtshort when it occurs in a page header. §5.3.3; 218

    +

    \glsxtrheadshort{entry-label}
    +

    +The behaviour of \glsfmtshort when it occurs in a page header. §5.3.3; 217

    +

    \GLSxtrheadshortpl{entry-label}glossaries-extra v1.49+
    +

    +The behaviour of \GLSfmtshortpl when it occurs in a page header. §5.3.3; 220

    +

    \Glsxtrheadshortpl{entry-label}
    +

    +The behaviour of \Glsfmtshortpl when it occurs in a page header. §5.3.3; 219

    +

    \glsxtrheadshortpl{entry-label}glossaries-extra v1.49+
    +

    +The behaviour of \glsfmtshortpl when it occurs in a page header. §5.3.3; 219

    +

    \GLSxtrheadtext{entry-label}glossaries-extra v1.49+
    +

    +Used to display the all caps entry’s text field in the page header. §5.3.3; 224

    +

    \Glsxtrheadtext{entry-label}
    +

    +Used to display the sentence case entry’s text field in the page header (converts to all caps if headuc attribute is true). §5.3.3; 224

    +

    \glsxtrheadtext{entry-label}
    +

    +Used to display the entry’s text field in the page header (converts to all caps if headuc attribute is true). §5.3.3; 224

    +

    \GLSXTRhiername{entry-label}glossaries-extra v1.37+
    +

    +Displays the entry’s hierarchical name where each name is converted to uppercase. §5.11; 293

    +

    \GLSxtrhiername{entry-label}glossaries-extra v1.37+
    +

    +Displays the entry’s hierarchical name where the first name is converted to uppercase. §5.11; 293

    +

    \GlsXtrhiername{entry-label}glossaries-extra v1.37+
    +

    +Displays the entry’s hierarchical name where each element name has its first character converted to uppercase. §5.11; 292

    +

    \Glsxtrhiername{entry-label}glossaries-extra v1.37+
    +

    +Displays the entry’s hierarchical name using sentence case. §5.11; 292

    +

    \glsxtrhiername{entry-label}glossaries-extra v1.37+
    +

    +Displays the entry’s hierarchical name. §5.11; 292

    +

    +

    +Separator used by commands like \glsxtrhiername. §5.11; 292

    +

    +

    +Expands to hyphen character sort rules. 543

    +

    +

    +The plural suffix used by the “hyphen” abbreviation styles (such as short-hyphen-long-hyphen). 148

    +

    \glsxtridentifyglslike{label-prefix}{cs}glossaries-extra v1.37+
    +

    +Used to inform bib2gls to include the given command when it searches for dependencies. §5.7; 258

    +

    \glsxtrifallcaps{all caps}{not all caps}glossaries-extra v1.49+
    +

    +Shortcut for \glscapscase{not all caps}{not all caps}{all caps}. §5.5.4; 253

    +

    \glsxtrifcounttrigger{entry-label}{true}{false}
    +

    +Does true if the entry’s total use count at the end of the previous run exceeds the trigger value assigned to the entry’s category, otherwise does false. §6.1; 311

    +

    \glsxtrifcustomdiscardperiod{true}{false}initial: false; glossaries-extra v1.23+
    +

    +User hook to trigger a check for a following full stop. This should do true if there should be a check for a following full stop otherwise should do false. §5.5.4; 248

    +

    \glsxtrifemptyglossary{glossary-type}{true}{false}
    +

    +Does true if the glossary identified by glossary-type is empty, otherwise does false. If the glossary doesn’t exist, this does true and will either generate an error (undefaction=error) or a warning (undefaction=warn). This command considers ignored glossaries as existing.

    +

    \GlsXtrIfFieldCmpNum{field-label}{entry-label}{op}{number}{true}{false}modifier: * glossaries-extra v1.31+
    +

    +Compares the (numeric) value of the field identified by its internal label field-label for the entry identified by entry-label with number where op is the comparison operator (=, < or >). The unstarred version adds implicit grouping. The starred version doesn’t. §5.15; 305

    +

    \GlsXtrIfFieldEqNum{field-label}{entry-label}{number}{true}{false}modifier: * glossaries-extra v1.31+
    +

    +A shortcut that uses \GlsXtrIfFieldCmpNum with op set to =. The unstarred version adds implicit grouping. The starred version doesn’t. §5.15; 306

    +

    \GlsXtrIfFieldEqStr{field-label}{entry-label}{value}{true}{false}modifier: * glossaries-extra v1.21+
    +

    +Tests if the entry given by entry-label has the field identified by its internal label field-label set to value. This internally uses \glsxtrifhasfield and compares \glscurrentfieldvalue to value using etoolbox’s \ifdefstring. The unstarred version adds implicit grouping. The starred version doesn’t. §5.15; 306

    +

    \GlsXtrIfFieldEqXpStr{field-label}{entry-label}{value}{true}{false}modifier: * glossaries-extra v1.31+
    +

    +Like \GlsXtrIfFieldEqStr but first (protected) expands value. §5.15; 306

    +

    \GlsXtrIfFieldNonZero{field-label}{entry-label}{true}{false}modifier: * glossaries-extra v1.31+
    +

    +A shortcut that uses \GlsXtrIfFieldCmpNum to test if the (numeric) value of the field identified by its internal label field-label for the entry identified by entry-label is non-zero. An empty or undefined field is treated as 0. The unstarred version adds implicit grouping. The starred version doesn’t. The value can be referenced within true (where it will be 0) or within false using \glscurrentfieldvalue. §5.15; 306

    +

    \GlsXtrIfFieldUndef{field-label}{entry-label}{true}{false}glossaries-extra v1.23+
    +

    +Expandable command that tests if the given field (identified by its internal label) is undefined for the entry given by entry-label. Internally uses etoolbox’s \ifcsundef command. Unlike \glsxtrifhasfield there is no grouping or starred version. §5.15; 305

    +

    \GlsXtrIfFieldValueInCsvList{entry-label}{field-label}{csv-list}{true}{false}modifier: * glossaries-extra v1.42+
    +

    +Tests if the value stored in the given field (identified by its internal label) for the entry identified by entry-label is contained in the comma-separated list csv-list using \DTLifinlist (provided by datatool-base, which is automatically loaded by the glossaries package). One level expansion is performed on csv-list. This command uses \glsxtrifhasfield so the field value can be obtained with \glscurrentfieldvalue. The unstarred version adds implicit grouping. The starred version doesn’t. §5.13; 303

    +

    \glsxtrifhasfield{field-label}{entry-label}{true}{false}modifier: * glossaries-extra v1.19+
    +

    +Tests if the field identified by its internal label field-label for the entry given by entry-label is defined and is not empty. This is like \ifglshasfield but doesn’t produce a warning if the entry or field doesn’t exist. This sets \glscurrentfieldvalue to the field value and does true if its defined and not empty, otherwise it does false. The unstarred version adds implicit grouping to make nesting easier. The starred version doesn’t (to make assignments easier). §5.15; 305

    +

    \GlsXtrIfHasNonZeroChildCount{entry-label}{true}{false}modifier: * glossaries-extra-bib2gls v1.47+
    +

    +Tests if the value in the childcount field is non-zero (using \GlsXtrIfFieldNonZero). This requires the save-child-count resource option. §11.5.4; 554

    +

    \glsxtrifheaduc{entry-label}{true}{false}glossaries-extra v1.49+
    +

    +If the category associated with the entry given by entry-label has the headuc attribute set to true this does true otherwise it does false. §5.3.3; 216

    +

    \glsxtrifhyphenstart{text}{true}{false}glossaries-extra v1.17+
    +

    +If text starts with a hyphen this does true otherwise it does false. §4.5.2; 160

    +

    \glsxtrifindexing{true}{false}
    +

    +Tests whether or not the noindex has been set. Does false if noindex=true otherwise does true. §5.8; 265

    +

    \GlsXtrIfInGlossary{entry-label}{glossary-type}{true}{false}glossaries-extra v1.49+
    +

    +Does true if the entry given by entry-label is in the internal list of the glossary identified by glossary-type, otherwise it does false. If the glossary doesn’t exist, this does false and will either generate an error (undefaction=error) or a warning (undefaction=warn). This command considers ignored glossaries as existing.

    +

    \glsxtrifinlabelprefixlist{label-prefix}{true}{false}glossaries-extra-bib2gls v1.37+
    +

    +Does true if label-prefix has been identified as a label prefix. §11.5.7; 563

    +

    \glsxtrifinmark{true}{false}glossaries-extra v1.07+
    +

    +Does true if within \markright, \markboth or \@starttoc otherwise does false. §5.3.3; 214

    +

    \glsxtrifintoc{true}{false}glossaries-extra v1.49+
    +

    +Normally just expands to false but \@starttoc is redefined to temporarily set this macro to expand to true instead. Will always expand to false if \glsxtrRevertTocMarks or \glsxtrRevertMarks are used to revert \@starttoc to its former definition. §5.3.3; 214

    +

    \glsxtrifkeydefined{key}{true}{false}glossaries-extra v1.12+
    +

    +Tests if the given key has been defined as a glossary entry key. Does true if the key has been defined, otherwise does false. §3.2; 35

    +

    \glsxtriflabelinlist{label}{label-list}{true}{false}glossaries-extra v1.21+
    +

    +Does true if the given label is in the given comma-separated list of labels, otherwise does false. The label and list are fully expanded. §8.4.3; 402

    +

    \GlsXtrIfLinkCounterDef{entry-label}{true}{false}glossaries-extra v1.26+
    +

    +Expands to true if the link counter associated with the given entry has been defined, otherwise expands to false. §6.2; 318

    +

    \glsxtrifmulti{multi-label}{true}{false}glossaries-extra v1.48+
    +

    +Does true if a multi-entry has been defined with the label multi-label otherwise does false. §7.13; 370

    +

    \glsxtrifnextpunc{true}{false}glossaries-extra
    +

    +Performs true if this command is followed by a recognised punctuation character otherwise does false. The list of recognised punctuation marks is initialised to .,:;?! (full stop, comma, colon, semicolon, question mark, and exclamation mark). Additional punctuation characters can be added with \glsxtraddpunctuationmark. §5.5.4; 248

    +

    \glsxtrifperiod{true}{false}tokenglossaries-extra
    +

    +Does true if token is a full stop, otherwise does false. §5.5.4; 248

    +

    \glsxtrifrecordtrigger{entry-label}{true}{false}glossaries-extra v1.21+
    +

    +Does true if the entry’s total record count (obtained with \glsxtrrecordtriggervalue) exceeds the value supplied by the recordcount attribute, otherwise does false. §11.4; 524

    +

    \GlsXtrIfUnusedOrUndefined{entry-label}{true}{false}glossaries-extra v1.34+
    +

    +Does true if the entry hasn’t been defined or hasn’t been marked as used, otherwise does true. Note that this command will generate an error or warning (according to undefaction) if the entry hasn’t been defined, but will still do true. §5.10; 283

    +

    \GlsXtrIfValueInFieldCsvList{entry-label}{field-label}{value}{true}{false}modifier: * glossaries-extra v1.47+
    +

    +Tests if the given value (value) is contained in the comma-separated list stored in the given field (identified by its internal label) for the entry identified by entry-label using \DTLifinlist (provided by datatool-base, which is automatically loaded by the glossaries package). No expansion is performed on value. This command uses \glsxtrifhasfield so the complete list can be obtained with \glscurrentfieldvalue. The unstarred version adds implicit grouping. The starred version doesn’t. §5.13; 303

    +

    \glsxtrifwasfirstuse{true}{false}
    +

    +Initialised by the \gls-like and \glstext-like commands, this expands to true if the calling command was considered the first use, otherwise it expands to false. This command may be used within the post-link hook (where it’s too late to test the first use flag with \ifglsused). §5.10; 282

    +

    \glsxtrifwasglslike{true}{false}glossaries-extra v1.49+
    +

    +Initialised by the \gls-like and \glstext-like commands, this expands to true if the calling command was a \gls-like command, otherwise it expands to false. This command may be used within the post-link hook. §5.5.4; 252

    +

    \glsxtrifwasglslikeandfirstuse{true}{false}glossaries-extra v1.49+
    +

    +A shortcut that nests \glsxtrifwasglslike and \glsxtrifwasfirstuse. This does true if the calling command was both a \gls-like command and was considered the first use. §5.5.4; 252

    +

    \glsxtrifwassubsequentorshort{true}{false}glossaries-extra v1.49+
    +

    +Expands to true if the calling command was a \gls-like command and was the subsequent use or if \glsxtrcurrentfield was set to short. §5.5.4; 253

    +

    \glsxtrifwassubsequentuse{true}{false}glossaries-extra v1.49+
    +

    +A shortcut that nests \glsxtrifwasglslike and \glsxtrifwasfirstuse. This does true if the calling command was a \gls-like command but was not considered the first use. §5.5.4; 252

    +

    \GlsXtrIfXpFieldEqXpStr{field-label}{entry-label}{value}{true}{false}modifier: * glossaries-extra v1.31+
    +

    +Like \GlsXtrIfFieldEqStr but first (protected) expands both the field value and the supplied value. §5.15; 306

    +

    +

    +A shortcut that expands to the control rules, space rules and non-printable rules. 546

    +

    +

    +Increments the link counter with \stepcounter. §6.2; 317

    +

    +

    +Index the current entry’s alias. May only be used within the definition of \glsxtrsetaliasnoindex. §5.9.3; 278

    +

    \GlsXtrIndexCounterLink{text}{entry-label}glossaries-extra-bib2gls v1.29+
    +

    +Creates a hyperlink (if supported) to the target obtained from indexcounter, if the field has been defined with the given hyperlink text (otherwise just does text). §11.5.8; 573

    +

    \glsxtrindexseealso{entry-label}{xr-list}glossaries-extra v1.16+
    +

    +Indexes the entry identified by entry-label as a “see also” cross-reference to the entries identified in the comma-separated list xr-list. The cross-reference list is prefixed with \seealsoname. §5.9.3; 278

    +

    +

    +Hook that initialises the hyperoutside setting. §5.1.1; 189

    +

    +

    +Hook that initialises the wrgloss setting. §5.1.1; 189

    +

    \glsxtrinitwrglossbeforefalseglossaries-extra v1.14+
    +

    +Corresponds to wrgloss=after.

    +

    \glsxtrinitwrglossbeforetrueglossaries-extra v1.14+
    +

    +Corresponds to wrgloss=before.

    +

    \GLSxtrinlinefullformat{entry-label}{insert}glossaries-extra v1.49+
    +

    +Used by \GLSxtrfull to display the all caps inline full form form (defined by the abbreviation style). 175

    +

    \Glsxtrinlinefullformat{entry-label}{insert}
    +

    +Used by \Glsxtrfull to display the sentence case inline full form form (defined by the abbreviation style). 175

    +

    \glsxtrinlinefullformat{entry-label}{insert}
    +

    +Used by \glsxtrfull to display the inline full form form (defined by the abbreviation style). 175

    +

    \GLSxtrinlinefullplformat{entry-label}{insert}glossaries-extra v1.49+
    +

    +Used by \GLSxtrfullpl to display the plural all caps inline full form form (defined by the abbreviation style). 175

    +

    \Glsxtrinlinefullplformat{entry-label}{insert}
    +

    +Used by \Glsxtrfullpl to display the plural sentence case inline full form form (defined by the abbreviation style). 175

    +

    \glsxtrinlinefullplformat{entry-label}{insert}
    +

    +Used by \glsxtrfullpl to display the plural inline full form form (defined by the abbreviation style). 175

    +

    +

    +Sets the \ifglsxtrinsertinside conditional to false. 132

    +

    +

    +Sets the \ifglsxtrinsertinside to true. 131

    +

    \GlsXtrInternalLocationHyperlink{counter}{prefix}{location}glossaries-extra v1.29+
    +

    +Used by \glsxtrlocationhyperlink to create an internal hyperlink to the given location (advanced command, see documented code for use).

    +

    +

    +(Sort rule) expands to the variations of Latin A (includes 0x00AA and 0x2090). 548

    +

    +

    +(Sort rule) expands to the variations of Latin å. 551

    +

    +

    +(Sort rule) expands to the variations of Latin ae-ligature. 550

    +

    +

    +(Sort rule) expands to the variations of Latin E (includes 0x2091). 548

    +

    +

    +(Sort rule) expands to rule for ßand ſs. 550

    +

    +

    +(Sort rule) expands to rule for ßand ſz. 550

    +

    +

    +(Sort rule) expands to the variations of Latin eth. 550

    +

    +

    +(Sort rule) expands to the variations of Latin H (includes 0x2095). 549

    +

    +

    +(Sort rule) expands to the variations of Latin I (includes 0x2071). 549

    +

    +

    +(Sort rule) expands to the variations of Latin insular G and g, G. 551

    +

    +

    +(Sort rule) expands to the variations of Latin K (includes 0x2096). 549

    +

    \glsxtrLatinLglossaries-extra-bib2gls v1.27+
    +

    +(Sort rule) expands to the variations of Latin L (includes 0x2097).

    +

    +

    +(Sort rule) expands to the variations of Latin ł. 551

    +

    +

    +(Sort rule) expands to the variations of Latin M (includes 0x2098). 549

    +

    +

    +(Sort rule) expands to the variations of Latin N (includes 0x2099). 549

    +

    +

    +(Sort rule) expands to the variations of Latin O (includes 0x00BA and 0x2092). 549

    +

    +

    +(Sort rule) expands to the variations of Latin oe-ligature. 550

    +

    +

    +(Sort rule) expands to the variations of Latin ø. 550

    +

    +

    +(Sort rule) expands to the variations of Latin P (includes 0x209A). 549

    +

    +

    +(Sort rule) expands to the variations of Latin S (includes 0x209B). 549

    +

    +

    +(Sort rule) expands to the variations of Latin schwa. 551

    +

    +

    +(Sort rule) expands to the variations of Latin T (includes 0x209C). 549

    +

    +

    +(Sort rule) expands to the variations of Latin thorn. 550

    +

    +

    +(Sort rule) expands to the variations of Latin wynn. 551

    +

    +

    +(Sort rule) expands to the variations of Latin X (includes 0x2093). 550

    +

    \GlsXtrLetField{entry-label}{field-label}{cs}glossaries-extra v1.12+
    +

    +Like \GlsXtrSetField but internally uses (etoolbox’s) \cslet instead of \csdef. §3.5; 40

    +

    \GlsXtrLetFieldToField{entry1-label}{field1-label}{entry2-label}{field2-label}glossaries-extra v1.12+
    +

    +Assigns the field identified by its internal label field1-label for the entry identified by entry1-label to the value of the field identified by field2-label for the entry identified by entry2-label. §3.5; 40

    +

    \GlsXtrLinkCounterName{entry-label}glossaries-extra v1.26+
    +

    +Expands to the name of the link counter associated with the given entry (no check for existence). §6.2; 318

    +

    \GlsXtrLinkCounterValue{entry-label}glossaries-extra v1.26+
    +

    +Expands to the internal link count register associated with the given register or 0 if it hasn’t been defined. §6.2; 318

    +

    +

    +A shortcut that uses \glsxtrresourcefile[options]{basename}, where the basename is obtained from \jobname and \glsxtrresourcecount. §11; 510

    +

    \glsxtrlocalsetgrouptitle{group-label}{group-title}glossaries-extra v1.24+
    +

    +Locally assigns the given title group-title to the group identified by group-label. §8.6.4; 426

    +

    +

    +Defined by \glsxtrdisplaylocnameref to expand to the anchor constructed from counter and hcounter, which corresponds to the record counter. §11.5.6; 557

    +

    \GlsXtrLocationFieldinitial: location; glossaries-extra v1.37+
    +

    +Expands to the internal field label used to obtain the formatted location list for the “unsrt” family of commands. §8.4.2; 398

    +

    \glsxtrlocationhyperlink{counter}{prefix}{location}glossaries-extra v1.14+
    +

    +Used to create a hyperlink to either an external or an internal location, depending on whether or not \glsxtrsupplocationurl is defined and not empty (advanced command, see documented code for use).

    +

    \GlsXtrLocationRecordCount{entry-label}{counter}{location}glossaries-extra v1.21+
    +

    +Expands to the entry’s record count for the given counter and location (stored in the recordcount.counter.location field) or to 0 if not set. §11.4; 523

    +

    +

    +Expands to the range format (set by \glsxtrdisplaystartloc). §8.6.3; 424

    +

    \GLSxtrlong[options]{entry-label}[insert]modifiers: * + alt-mod
    +

    +As \glsxtrlong but converts the link text to all caps. §4.3; 53

    +

    \Glsxtrlong[options]{entry-label}[insert]modifiers: * + alt-mod
    +

    +As \glsxtrlong but converts the first character of the link text to uppercase (for the start of a sentence) using \makefirstuc. §4.3; 53

    +

    \glsxtrlong[options]{entry-label}[insert]modifiers: * + alt-mod
    +

    +References the entry identified by entry-label. The text produced is obtained from the long value, formatted according to the abbreviation style associated with the entry’s category. The insert argument will be inserted at the end of the link text. This command does not alter or depend on the first use flag. For the first optional argument, see \glslink options. §4.3; 52

    +

    \GLSxtrlongformat{entry-label}{insert}{fmt-cs}glossaries-extra v1.49+
    +

    +As \glsxtrlongformat but sentence case. 176

    +

    \Glsxtrlongformat{entry-label}{insert}{fmt-cs}glossaries-extra v1.49+
    +

    +As \glsxtrlongformat but sentence case. 176

    +

    \glsxtrlongformat{entry-label}{insert}{fmt-cs}glossaries-extra v1.49+
    +

    +Encapsulates the long field for the given entry with fmt-cs. The insert argument is the insertion material supplied in the final optional argument of the \gls-like or \glstext-like commands. The \ifglsxtrinsertinside, inner formatting, and accessibility settings are supported. 175

    +

    \GLSxtrlongformatgrp{entry-label}{insert}{fmt-cs}glossaries-extra v1.49+
    +

    +As \glsxtrlongformatgrp but all caps. 177

    +

    \Glsxtrlongformatgrp{entry-label}{insert}{fmt-cs}glossaries-extra v1.49+
    +

    +As \glsxtrlongformatgrp but sentence case. 176

    +

    \glsxtrlongformatgrp{entry-label}{insert}{fmt-cs}glossaries-extra v1.49+
    +

    +As \glsxtrlongformat but adds grouping around insert (with the inner formatting inside the group). 176

    +

    \glsxtrlonghyphen{entry-label}{long}{insert}glossaries-extra v1.17+
    +

    +Formats the long form according to the long-hyphen-postshort-hyphen style. 150

    +

    \GLSxtrlonghyphennoshort{entry-label}{long}{insert}glossaries-extra v1.49+
    +

    +As \glsxtrlonghyphennoshort but converts insert to all caps The long argument should be supplied as all caps. 150

    +

    \glsxtrlonghyphennoshort{entry-label}{long}{insert}glossaries-extra v1.17+
    +

    +Formats the long form according to the long-hyphen-noshort-desc-noreg style. 149

    +

    +

    +Expands to the sort value for the long-hyphen-noshort-desc-noreg styles. 149

    +

    +

    +Expands to the sort value for the long-hyphen-noshort-noreg styles. 149

    +

    \GLSxtrlonghyphenshort{entry-label}{long}{short}{insert}glossaries-extra v1.49+
    +

    +As \glsxtrlonghyphenshort but converts insert to all caps. The long and short arguments should be supplied as all caps. 149

    +

    \glsxtrlonghyphenshort{entry-label}{long}{short}{insert}glossaries-extra v1.17+
    +

    +Formats the long and short form according to the long-hyphen-short-hyphen style. 149

    +

    +

    +Expands to the sort value for the long-hyphen-short-hyphen styles. 148

    +

    +

    +Expands to the name value for styles like long-noshort-desc. 147

    +

    +

    +Expands to the name value for styles like long-noshort. 147

    +

    \GLSxtrlongpl[options]{entry-label}[insert]modifiers: * + alt-mod
    +

    +As \glsxtrlongpl but converts the link text to all caps. §4.3; 53

    +

    \Glsxtrlongpl[options]{entry-label}[insert]modifiers: * + alt-mod
    +

    +As \glsxtrlongpl but converts the first character of the link text to uppercase (for the start of a sentence) using \makefirstuc. §4.3; 53

    +

    \glsxtrlongpl[options]{entry-label}[insert]modifiers: * + alt-mod
    +

    +References the entry identified by entry-label. The text produced is obtained from the longplural value, formatted according to the abbreviation style associated with the entry’s category. The insert argument will be inserted at the end of the link text. This command does not alter or depend on the first use flag. For the first optional argument, see \glslink options. §4.3; 53

    +

    \GLSxtrlongplformat{entry-label}{insert}{fmt-cs}glossaries-extra v1.49+
    +

    +As \glsxtrlongplformat but all caps. 176

    +

    \Glsxtrlongplformat{entry-label}{insert}{fmt-cs}glossaries-extra v1.49+
    +

    +As \glsxtrlongplformat but sentence case. 176

    +

    \glsxtrlongplformat{entry-label}{insert}{fmt-cs}glossaries-extra v1.49+
    +

    +As \glsxtrlongformat but for the longplural field. 176

    +

    \GLSxtrlongplformatgrp{entry-label}{insert}{fmt-cs}glossaries-extra v1.49+
    +

    +As \glsxtrlongplformatgrp but all caps. 177

    +

    \Glsxtrlongplformatgrp{entry-label}{insert}{fmt-cs}glossaries-extra v1.49+
    +

    +As \glsxtrlongplformatgrp but sentence case. 177

    +

    \glsxtrlongplformatgrp{entry-label}{insert}{fmt-cs}glossaries-extra v1.49+
    +

    +As \glsxtrlongplformat but adds grouping around insert (with the inner formatting inside the group). 177

    +

    +

    +Expands to the name value for long-short-desc styles. 134

    +

    +

    +Expands to the sort value for long-short-desc styles. 133

    +

    \GLSxtrlongshortformat{entry-label}{insert}{long-fmt-cs}{short-fmt-cs}glossaries-extra v1.49+
    +

    +As \glsxtrlongshortformat but all caps. 179

    +

    \Glsxtrlongshortformat{entry-label}{insert}{long-fmt-cs}{short-fmt-cs}glossaries-extra v1.49+
    +

    +As \glsxtrlongshortformat but sentence case. 179

    +

    \glsxtrlongshortformat{entry-label}{insert}{long-fmt-cs}{short-fmt-cs}glossaries-extra v1.49+
    +

    +Formats the long form with \glsxtrlongformat and the short form in parentheses with \glsxtrshortformat. 179

    +

    +

    +Expands to the name value for long-short styles. 133

    +

    \GLSxtrlongshortplformat{entry-label}{insert}{long-fmt-cs}{short-fmt-cs}glossaries-extra v1.49+
    +

    +As \glsxtrlongshortplformat but all caps. 180

    +

    \Glsxtrlongshortplformat{entry-label}{insert}{long-fmt-cs}{short-fmt-cs}glossaries-extra v1.49+
    +

    +As \glsxtrlongshortplformat but sentence case. 179

    +

    \glsxtrlongshortplformat{entry-label}{insert}{long-fmt-cs}{short-fmt-cs}glossaries-extra v1.49+
    +

    +As \glsxtrlongshortformat but for the plurals. 179

    +

    +

    +Expands to the value for the name key for styles like long-postshort-sc-user-desc. 138

    +

    +

    +Expands to the value for the name key for styles like long-postshort-sc-user. 138

    +

    +

    +Expands to the value for the name key for styles like long-short-user-desc. 138

    +

    +

    +Hook that’s performed at the start of \markright, \markboth and \@starttoc to redefine commands that need to change when they occur within page headers or contents. This must be counteracted with \glsxtrrestoremarkhook afterwards. §5.3.3; 227

    +

    +

    +Expands to the second set of math Greek sort rules. 551

    +

    +

    +Expands to the first set of math Greek sort rules. 551

    +

    +

    +(Sort rule) expands to the variations of math italic Greek alpha. 553

    +

    +

    +(Sort rule) expands to the variations of math italic Greek beta. 553

    +

    +

    +(Sort rule) expands to the variations of math italic Greek chi. 553

    +

    +

    +(Sort rule) expands to the variations of math italic Greek delta. 553

    +

    +

    +(Sort rule) expands to the variations of math italic Greek digamma. 553

    +

    +

    +(Sort rule) expands to the variations of math italic Greek epsilon. 553

    +

    +

    +(Sort rule) expands to the variations of math italic Greek eta. 553

    +

    +

    +(Sort rule) expands to the variations of math italic Greek gamma. 553

    +

    +

    +Expands to the second set of math italic Greek sort rules. 552

    +

    +

    +Expands to the first set of math italic Greek sort rules. 552

    +

    +

    +(Sort rule) expands to the variations of math italic Greek iota. 553

    +

    +

    +(Sort rule) expands to the variations of math italic Greek kappa. 553

    +

    +

    +(Sort rule) expands to the variations of math italic Greek lambda. 553

    +

    +

    +Expands to the second set of math italic lowercase Greek sort rules. 553

    +

    +

    +Expands to the first set of math italic lowercase Greek sort rules. 552

    +

    +

    +(Sort rule) expands to the variations of math italic Greek mu. 553

    +

    +

    +(Sort rule) expands to the Unicode codepoint for nabla. 553

    +

    +

    +(Sort rule) expands to the variations of math italic Greek nu. 553

    +

    +

    +(Sort rule) expands to the variations of math italic Greek omega. 553

    +

    +

    +(Sort rule) expands to the variations of math italic Greek omicron. 553

    +

    +

    +(Sort rule) expands to the Unicode codepoint for math italic partial differential. 553

    +

    +

    +(Sort rule) expands to the variations of math italic Greek phi. 553

    +

    +

    +(Sort rule) expands to the variations of math italic Greek pi. 553

    +

    +

    +(Sort rule) expands to the variations of math italic Greek psi. 553

    +

    +

    +(Sort rule) expands to the variations of math italic Greek rho. 553

    +

    +

    +(Sort rule) expands to the variations of math italic Greek sigma. 553

    +

    +

    +(Sort rule) expands to the variations of math italic Greek tau. 553

    +

    +

    +(Sort rule) expands to the variations of math italic Greek theta. 553

    +

    +

    +Expands to the second set of math italic uppercase Greek sort rules. 552

    +

    +

    +Expands to the first set of math italic uppercase Greek sort rules. 552

    +

    +

    +(Sort rule) expands to the variations of math italic Greek upsilon. 553

    +

    +

    +(Sort rule) expands to the variations of math italic Greek xi. 553

    +

    +

    +(Sort rule) expands to the variations of math italic Greek zeta. 553

    +

    +

    +Expands to the second set of math upright Greek sort rules. 552

    +

    +

    +Expands to the first set of math upright Greek sort rules. 552

    +

    +

    +Used on the first instance of \glsxtrresourcefile, this will add \MFUsave to the begin document hook and then disable itself. This is provided to help bib2gls pick up any of mfirstuc’s exclusions, blockers and mappings to assist with its sentence case function. §11; 512

    +

    \GlsXtrMglsOrGls{mgls cs}{gls cs}modifier[options]{label}[insert]glossaries-extra v1.48+
    +

    +If label matches a defined multi-entry, this will do mgls cls otherwise it will do gls cs. The modifier (* or + or the token identified with \GlsXtrSetAltModifier) may be omitted. §7; 325

    +

    \glsxtrmglsWarnAllSkipped{message}{insert}{fmt-cs}glossaries-extra v1.48+
    +

    +Issues the given warning message with \GlossariesExtraWarning and does fmt-cs{insert} (this warning is used if all elements of a multi-entry set are skipped). §7.9.5; 358

    +

    \GLSxtrmultientryadjustedname{sublist1}{name}{sublist2}{multi-label}glossaries-extra-bib2gls v1.48+
    +

    +As \glsxtrmultientryadjustedname but all caps. §7.14; 372

    +

    \GlsXtrmultientryadjustedname{sublist1}{name}{sublist2}{multi-label}glossaries-extra-bib2gls v1.48+
    +

    +As \glsxtrmultientryadjustedname but title case. §7.14; 372

    +

    \Glsxtrmultientryadjustedname{sublist1}{name}{sublist2}{multi-label}glossaries-extra-bib2gls v1.48+
    +

    +As \glsxtrmultientryadjustedname but sentence case. §7.14; 372

    +

    \glsxtrmultientryadjustedname{sublist1}{name}{sublist2}{multi-label}glossaries-extra-bib2gls v1.48+
    +

    +Used by compound-adjust-name. §7.14; 372

    +

    +

    +Used by \GLSxtrmultientryadjustedname to encapsulate the main entry name. §7.14; 373

    +

    +

    +Used by \GlsXtrmultientryadjustedname to encapsulate the main entry name. §7.14; 373

    +

    +

    +Used by \Glsxtrmultientryadjustedname to encapsulate the main entry name if the first sublist is empty. §7.14; 373

    +

    +

    +Used by \glsxtrmultientryadjustedname to encapsulate the main entry name. §7.14; 373

    +

    +

    +Used by \GLSxtrmultientryadjustedname to encapsulate the other (not main) entries. §7.14; 374

    +

    +

    +Used by \GlsXtrmultientryadjustedname to encapsulate the other (not main) entries. §7.14; 374

    +

    +

    +Used by \Glsxtrmultientryadjustedname to encapsulate the other (not main) entries. §7.14; 374

    +

    +

    +Used by \glsxtrmultientryadjustedname to encapsulate the other (not main) entries. §7.14; 374

    +

    \glsxtrmultientryadjustednamepostsep{pre-label}{post-label}glossaries-extra-bib2gls v1.48+
    +

    +Separator used by \glsxtrmultientryadjustedname between the main element and the first element of the second sublist. §7.14; 373

    +

    \glsxtrmultientryadjustednamepresep{pre-label}{post-label}glossaries-extra-bib2gls v1.48+
    +

    +Separator used by \glsxtrmultientryadjustedname between the last element of the first sublist and the main element. §7.14; 373

    +

    \glsxtrmultientryadjustednamesep{pre-label}{post-label}glossaries-extra-bib2gls v1.48+
    +

    +Separator used by \glsxtrmultientryadjustedname. §7.14; 373

    +

    +

    +Expands to the index of the final non-main element in the given multi-entry or nothing if multi-label hasn’t been defined. §7.13; 371

    +

    \glsxtrmultilist{multi-label}glossaries-extra v1.48+
    +

    +Expands to the list of element labels for the multi-entry identified by multi-label or nothing if not defined. §7.13; 370

    +

    \glsxtrmultimain{multi-label}glossaries-extra v1.48+
    +

    +Expands to the main label for the multi-entry identified by multi-label or nothing if not defined. §7.13; 370

    +

    \glsxtrmultimainindex{multi-label}glossaries-extra v1.48+
    +

    +Expands to the index of the main element in the given multi-entry or nothing if multi-label hasn’t been defined. §7.13; 371

    +

    \glsxtrmultisupplocation{src}{location}{format}modifier: * glossaries-extra-bib2gls v1.36+
    +

    +Used by \glsxtrdisplaysupploc to format the location. §11.5.5; 555

    +

    +

    +Expands to the total number of elements in the given multi-entry or nothing if multi-label hasn’t been defined. §7.13; 371

    +

    \glsxtrnameloclink{prefix}{counter}{format}{location}{text}{file}glossaries-extra-bib2gls v1.37+
    +

    +Create an external location hyperlink using the prefix and counter. §11.5.6; 560

    +

    \glsxtrnamereflink{format}{title}{target}{file}glossaries-extra-bib2gls v1.37+
    +

    +Used by \glsxtrdisplaylocnameref to create a location hyperlink.

    +

    \glsxtrnewabbrevpresetkeyhook{options}{label}{short}
    +

    +Hook provided to adjust initialisation within \newabbreviation. §4.1.5; 45

    +

    \glsxtrnewgls[default-options]{prefix}{cs}glossaries-extra v1.21+
    +

    +Defines the command cs[options]{entry-label} to behave like \gls[default-options,options]{prefixentry-label}. §5.7; 257

    +

    \glsxtrnewglsdisp[default-options]{prefix}{cs}glossaries-extra v1.49+
    +

    +Defines the command cs[options]{label}{text} to behave like \glsdisp[default-options,options]{prefixlabel}{text}. §5.7; 258

    +

    \glsxtrnewGLSlike[default-options]{prefix}{\GLS-like cs}{\GLSpl-like cs}glossaries-extra v1.21+
    +

    +Like \glsxtrnewgls but provides all caps commands. §5.7; 257

    +

    \glsxtrnewglslike[default-options]{prefix}{\gls-like cs}{\glspl-like cs}{\Gls-like cs}{\Glspl-like cs}glossaries-extra v1.21+
    +

    +Like \glsxtrnewgls but provides plural and sentence case commands as well. §5.7; 257

    +

    \glsxtrnewglslink[default-options]{prefix}{cs}glossaries-extra v1.49+
    +

    +Defines the command cs[options]{label}{text} to behave like \glslink[default-options,options]{prefixlabel}{text}. §5.7; 258

    +

    \glsxtrnewnumber[key=value list]{entry-label}{num}

    +

    (requires \usepackage[numbers]{glossaries-extra})
    +
    +

    +Defines a new glossary entry with the given label, type set to numbers, the category set to number, the name set to num and the sort set to entry-label. The optional argument is a comma-separated list of glossary entry keys, which can be used to override the defaults. §2.1; 11

    +

    \glsxtrnewrgls[default-options]{prefix}{cs}glossaries-extra v1.21+
    +

    +Like \glsxtrnewgls but uses \rgls. §5.7; 258

    +

    \glsxtrnewrGLSlike[default-options]{prefix}{\rGLS-like cs}{\rGLSpl-like cs}glossaries-extra v1.21+
    +

    +Like \glsxtrnewrgls but provides all caps commands. §5.7; 259

    +

    \glsxtrnewrglslike[default-options]{prefix}{\rgls-like cs}{\rglspl-like cs}{\rGls-like cs}{\rGlspl-like cs}glossaries-extra v1.21+
    +

    +Like \glsxtrnewrgls but provides plural and sentence case commands as well. §5.7; 258

    +

    \glsxtrnewsymbol[key=value list]{entry-label}{sym}

    +

    (requires \usepackage[symbols]{glossaries-extra})
    +
    +

    +Defines a new glossary entry with the given label, type set to symbols, the category set to symbol, the name set to sym and the sort set to entry-label. The optional argument is a comma-separated list of glossary entry keys, which can be used to override the defaults. §2.1; 10

    +

    \glsxtrNoGlossaryWarning{glossary-type}
    +

    +Issues a warning with \GlossariesExtraWarning indicating that the given glossary is missing.

    +

    \GlsXtrNoGlsWarningAutoMake{glossary-label}
    +

    +Advisory message when automake has been used. §15; 596

    +

    +

    +Build advice. §15; 595

    +

    +

    +Advisory message to check the file contents. §15; 595

    +

    +

    +Produces the boilerplate text if the probably empty glossary is the main one. §15; 594

    +

    \GlsXtrNoGlsWarningEmptyNotMain{glossary-label}
    +

    +Produces the boilerplate text if the probably empty glossary is not the main one. §15; 594

    +

    +

    +Produces the boilerplate text if a glossary is probably empty. §15; 594

    +

    \GlsXtrNoGlsWarningHead{glossary-label}{file}
    +

    +Produces the header boilerplate text if a glossary file is missing. §15; 594

    +

    +

    +Advisory message on mis-matching \makenoidxglossaries. §15; 595

    +

    +

    +Advisory if no output file was created. §15; 595

    +

    +

    +Final paragraph of missing glossary boilerplate text. §15; 595

    +

    +

    +Makes the group titling mechanism used with the “unsrt” family of commands use the same method as for \printnoidxglossary (ASCII only). This command can’t be used with \makeglossaries or with record. §8.4; 385

    +

    +

    +Expands to non-printable character sort rules. 542

    +

    +

    +When placed at the end of the description, this switches off the post-description punctuation (inserted automatically via options such as postdot) but doesn’t suppress the post-description hook. Does nothing outside of the glossary. §8.6.2; 422

    +

    +

    +Expands to the name value for styles like long-only-short-only-desc. 155

    +

    +

    +Expands to the name value for styles like long-only-short-only-desc. 155

    +

    +

    +Expands to the name value for styles like long-only-short-only. 155

    +

    +

    +The plural suffix used by the “only” abbreviation styles (such as long-only-short-only). 154

    +

    +

    +Expands to the original option list as it was supplied to \newabbreviation. §4.5.3.1; 163

    +

    +

    +Expands to the original short form as it was supplied to \newabbreviation. §4.5.3.1; 164

    +

    +

    +Expands to the original long form as it was supplied to \newabbreviation. §4.5.3.1; 164

    +

    \GLSxtrp{field}{entry-label}glossaries-extra v1.07+
    +

    +As \glsxtrp but converts to uppercase (but not in the PDF bookmark). §5.4; 232

    +

    \Glsxtrp{field}{entry-label}glossaries-extra v1.07+
    +

    +As \glsxtrp but converts the first letter to uppercase (but not in the PDF bookmark). §5.4; 232

    +

    \glsxtrp{field}{entry-label}glossaries-extra v1.07+
    +

    +For use in headings and captions (instead of the \gls-like or \glstext-like commands). This command is designed to expand to the field value if used in a PDF bookmark and can also expand to a more appropriate command if it ends up in the page header. Note that there’s no option argument. Options should be set beforehand using \glsxtrsetpopts, which is done automatically in the glossary with \glossxtrsetpopts. §5.4; 231

    +

    \glsxtrpageref{entry-label}glossaries-extra v1.11+
    +

    +As \glsrefentry but uses \pageref instead of \ref. As with \glsrefentry, this will use \gls instead if the corresponding entry counter is disabled. §8.1; 377

    +

    \glsxtrparen{text}glossaries-extra v1.17+
    +

    +Used to encapsulate text in parentheses. 132

    +

    \Glsxtrpdfentryfmt{entry-label}{text}glossaries-extra v1.49+
    +

    +Does \MFUsentencecase{text}. §5.12.2; 299

    +

    \glsxtrpdfentryfmt{entry-label}{text}glossaries-extra v1.42+
    +

    +Just does text. §5.12.2; 296

    +

    \Glsxtrpl[gls-options][dfn-options]{entry-label}
    +

    +As \glsxtrpl but applies sentence case. §13; 579

    +

    \glsxtrpl[gls-options][dfn-options]{entry-label}
    +

    +As \glsxtr but shows the plural form. §13; 579

    +

    \glsxtrpostabbrvfootnote{entry-label}{fmt-code}glossaries-extra v1.49+
    +

    +Command used in the post-link hook for styles like short-postfootnote. §4.5.2; 160

    +

    +

    +The default post-description hook for the abbreviation category. §8.6.2; 422

    +

    +

    +The default post-description hook for the acronym category. §8.6.2; 422

    +

    +

    +The post-description hook associated with the category identified by the label category. §8.6.2; 421

    +

    +

    +The default post-description hook for the general category. §8.6.2; 422

    +

    \glsxtrpostdescindexinitial: empty

    +

    (requires \usepackage[index]{glossaries-extra})
    +
    +

    +The default post-description hook for the index category. §2.1; 12

    +

    \glsxtrpostdescnumberinitial: empty

    +

    (requires \usepackage[numbers]{glossaries-extra})
    +
    +

    +The default post-description hook for the number category. §2.1; 11

    +

    +

    +An additional hook used within \glspostdescription that implements the category post-description hook. §8.6.2; 421

    +

    \glsxtrpostdescsymbolinitial: empty

    +

    (requires \usepackage[symbols]{glossaries-extra})
    +
    +

    +The default post-description hook for the symbol category. §2.1; 10

    +

    \glsxtrpostdescterminitial: empty
    +

    +The default post-description hook for the term category (which isn’t used by glossaries-extra). §8.6.2; 422

    +

    \glsxtrpostfootnotelongformat{entry-label}{fmt-cs}glossaries-extra v1.49+
    +

    +Used in the footnote text to format the long form for styles like short-postfootnote. 146

    +

    \GLSxtrposthyphenlong{entry-label}{insert}glossaries-extra v1.49+
    +

    +As \glsxtrposthyphenlong but all caps. 153

    +

    \glsxtrposthyphenlong{entry-label}{insert}glossaries-extra v1.17+
    +

    +Used within the post-link hook to format the long form according to the short-hyphen-postlong-hyphen style on first use. 153

    +

    \GLSxtrposthyphenlongpl{entry-label}{insert}glossaries-extra v1.49+
    +

    +As \glsxtrposthyphenlongpl but all caps. 154

    +

    \glsxtrposthyphenlongpl{entry-label}{insert}glossaries-extra v1.49+
    +

    +As \glsxtrposthyphenlong but shows the plural. 153

    +

    \GLSxtrposthyphenshort{entry-label}{insert}glossaries-extra v1.49+
    +

    +As \glsxtrposthyphenshort but all caps. 151

    +

    \glsxtrposthyphenshort{entry-label}{insert}glossaries-extra v1.17+
    +

    +Used within the post-link hook to format the short form according to the long-hyphen-postshort-hyphen style on first use. 151

    +

    \GLSxtrposthyphenshortpl{entry-label}{insert}glossaries-extra v1.49+
    +

    +As \glsxtrposthyphenshortpl but all caps. 151

    +

    \glsxtrposthyphenshortpl{entry-label}{insert}glossaries-extra v1.49+
    +

    +As \glsxtrposthyphenshort but plural. 151

    +

    \GLSxtrposthyphensubsequent{entry-label}{insert}glossaries-extra v1.49+
    +

    +As \glsxtrposthyphensubsequent but all caps. 152

    +

    \glsxtrposthyphensubsequent{entry-label}{insert}glossaries-extra v1.17+
    +

    +Used within the post-link hook to format the insert according to the long-hyphen-postshort-hyphen style on subsequent use. 152

    +

    +

    +A post-link hook that does \glsxtrpostlinkcategory if that command has been defined, where the category label is obtained from the entry that has just been referenced with a \gls-like or \glstext-like command (using \glslabel). Does nothing if \glsxtrpostlinkcategory isn’t defined. §5.5.4; 250

    +

    +

    +May be used within a post-link hook to display the description in parentheses on first use. §5.5.4; 251

    +

    +

    +May be used within a post-link hook to display the symbol and description in parentheses on first use. §5.5.4; 251

    +

    +

    +May be used within a post-link hook to display the symbol in parentheses on first use. §5.5.4; 251

    +

    \glsxtrpostlinkcategory
    +

    +The post-link hook associated with the category identified by the label category.

    +

    +

    +A post-link hook that’s used if a full stop is discarded in order to adjust the space factor (to denote the end of a sentence). If the category post-link hook exists, and will be applied and the full stop will be restored. §5.5.4; 248

    +

    +

    +A post-link hook that checks if a following full stop needs to be discarded, in which case it does \glsxtrpostlinkendsentence, otherwise it does \glsxtrpostlink. §5.5.4; 246

    +

    +

    +Used by \glsxtrpostlinkAddSymbolDescOnFirstUse to separate the symbol and description, if both are set. §5.5.4; 251

    +

    \glsxtrpostlocalreset{entry-label}
    +

    +Hook performed by \glslocalreset. This hook is modified by \glsenableentrycount and \glsenableentryunitcount. §5.10; 280

    +

    \glsxtrpostlocalunset{entry-label}
    +

    +Hook performed by \glslocalunset. This hook is modified by \glsenableentrycount and \glsenableentryunitcount. §5.10; 280

    +

    +

    +Hook added to the end of the description field by the unstarred version of \longnewglossaryentry. §3.1; 32

    +

    +

    +The post-name hook associated with the category identified by the label category. §8.6.1; 420

    +

    \glsxtrpostnamehook{entry-label}
    +

    +A hook that’s performed within \glossentryname and \glossentrynameother after the entry name is displayed. This hook implements auto-indexing (see §12), then the general hook \glsextrapostnamehook and finally the \glsxtrpostnamecategory hook. §8.6.1; 420

    +

    +

    +A hook that’s performed after the entry has been defined. §4.5.3.1; 165

    +

    \glsxtrpostreset{entry-label}
    +

    +Hook performed by \glsreset. This hook is modified by \glsenableentrycount and \glsenableentryunitcount. §5.10; 280

    +

    \glsxtrpostunset{entry-label}
    +

    +Hook performed by \glsunset. This hook is modified by \glsenableentrycount and \glsenableentryunitcount. §5.10; 280

    +

    \glsxtrpostuserlongformat{entry-label}{fmt-cs}glossaries-extra v1.49+
    +

    +Formats the long form in parentheses (with \glsxtruserparen) in styles like short-postlong-user. 144

    +

    \glsxtrpostusershortformat{entry-label}{fmt-cs}glossaries-extra v1.49+
    +

    +Formats the short form in parentheses (with \glsxtruserparen) in styles like long-postshort-user. 142

    +

    +

    +Sets the \ifGlsXtrPrefixLabelFallbackLast conditional to false. §11.5.7; 564

    +

    +

    +Sets the \ifGlsXtrPrefixLabelFallbackLast conditional to true. §11.5.7; 564

    +

    +

    +Hook performed by \setglossarystyle to initialise default definitions of style commands. §8.6; 418

    +

    +

    +Used before the location list in the predefined styles provided by glossaries-extra or modified by glossaries-extra-stylemods. §8.6.5; 427

    +

    +

    +Prepends label-prefix to the list of known labels. §11.5.7; 563

    +

    +

    +Locally prepend options to the default options for the \gls-like and \glstext-like commands. §5.1.1; 187

    +

    \glsxtrprovideaccsuppcmd{category}{field}glossaries-extra v1.42+

    +

    (requires accsupp)
    +
    +

    +Defines \glsxtrcategoryfieldaccsupp to \glsshortaccsupp, if not already defined.

    +

    +

    +Provides the standard BibTeX fields as glossary entry keys (using \glsaddstoragekey). §11.5.2; 536

    +

    \glsxtrprovidecommand{cs}[n][default]{definition}modifier: * glossaries-extra-bib2gls v1.27+
    +

    +Just uses \providecommand within the LaTeX document but is treated as \renewcommand by bib2gls’s interpreter. §11.5.8; 572

    +

    \glsxtrprovidestoragekey{key}{default value}{no link cs}modifier: * glossaries-extra v1.12+
    +

    +Like \glsaddstoragekey but does nothing if the key has already been defined. §3.2; 35

    +

    +

    +Defined by \glsxtrdisplaylocnameref to expand to the href argument. This corresponds to the value of \@currentHref when the record was created. §11.5.6; 557

    +

    \GlsXtrRecordCount{entry-label}{counter}glossaries-extra v1.21+
    +

    +Expands to the entry’s record count for the given counter (stored in the recordcount.counter field) or to 0 if not set. §11.4; 523

    +

    \GlsXtrRecordCounter{counter-name}glossaries-extra v1.12+

    +

    (preamble only)
    +
    +

    +Activates recording for the given counter. §8.4.3.2; 407

    +

    +

    +Expands to the trigger value used by \glsxtrifrecordtrigger. §11.4; 524

    +

    \GlsXtrRecordWarning{glossary-type}glossaries-extra v1.31+
    +

    +Incorrect use of \printglossary with non-hybrid record.

    +

    +

    +Used by \glsentryfmt to encapsulate regular entries. Also used by \glsxtrassignfieldfont for regular entries. §5.5.2; 240

    +

    +

    +If local unset for repeat entries has been enabled with \GlsXtrUnsetBufferEnableRepeatLocal, this will locally reset all entries that are in the buffer that hadn’t been marked as used before the function was enabled. §5.10.1; 285

    +

    +

    +A count register that is incremented on each use of \GlsXtrLoadResources to provide a unique basename for each resource set. §11; 511

    +

    \glsxtrresourcefile[options]{basename}glossaries-extra v1.11+
    +

    +For use with bib2gls, this both sets up the options for the resource set (which bib2gls can detect from the aux file) and inputs the file basename.glstex file created by bib2gls. §11; 510

    +

    +

    +May be defined to temporarily change command definitions before information is written to the aux file by the protected write used by \glsxtrresourcefile. §11; 512

    +

    +

    +Counteracts \glsxtrmarkhook. §5.3.3; 227

    +

    +

    +Used in the description to counteract the use of \glsxtrnopostpunc. Does nothing outside of the glossary. §8.6.2; 423

    +

    +

    +Style-sensitive abbreviation command designed to counteract any font change applied by the style. 171

    +

    +

    +Restores \markright, \markboth and \@starttoc to their previous definitions. §5.3; 201

    +

    +

    +Restores \@starttoc to its previous definition. §5.3; 201

    +

    \glsxtrsaveinsert{entry-label}{insert}glossaries-extra v1.49+
    +

    +Implemented at the start of all the \glstext-like commands (except the inline full form commands like \glsxtrfull) to save the \glsinsert placeholder. By default, this sets \glsinsert to empty. §5.5.4; 253

    +

    \glsxtrscfont{text}
    +

    +Maintained for backwards-compatibility used to typeset text in small capitals (\textsc) for the “sc” abbreviation styles.

    +

    +

    +Expands to the name value for styles like long-only-short-sc-only-desc. 156

    +

    +

    +Expands to the sort value for styles like long-only-short-sc-only-desc. 156

    +

    +

    +Expands to the name value for styles like long-only-short-sc-only. 156

    +

    +

    +The definition of \glsxtrrevert used by styles like long-only-short-sc-only. Uses \glsxtrscrevert. 155

    +

    +

    +The plural suffix used by the “sc-only” abbreviation styles (such as long-only-short-sc-only). 155

    +

    +

    +The definition of \glsxtrrevert used by the small caps (“sc”) abbreviation styles. Uses \glstextup. 157

    +

    +

    +The plural suffix used by the small caps (“sc”) abbreviation styles. This switches off the small caps font to prevent the suffix from also appearing in small caps. 157

    +

    +

    +The definition of \glsxtrrevert used by styles like long-postshort-sc-user. Uses \glsxtrscrevert. 136

    +

    +

    +The plural suffix used by styles like long-postshort-sc-user. 137

    +

    \glsxtrseealsolabels{entry-label}glossaries-extra v1.16+
    +

    +Expands to the value of the seealso field for the entry identified by entry-label. If the field isn’t set, this will expand to nothing. If the entry isn’t defined, this will expand to \relax. §5.9.2; 277

    +

    \glsxtrseelist{csv-list}glossaries-extra v1.16+
    +

    +Fully expands csv-list and passes it to \glsseelist. §5.13; 299

    +

    \glsxtrseelists{entry-label}glossaries-extra v1.49+
    +

    +If the entry given by entry-label has the see, seealso or alias fields set, this will display the cross reference according to \glsxtruseseeformat (for see and alias) or \glsxtruseseealsoformat (for seealso). If any of these fields are set, the list is encapsulated with \glsxtrseelistsencap. §5.9.2; 276

    +

    +

    +Used by \glsxtrseelists to as separator between sub-lists. §5.9.2; 277

    +

    +

    +Used by \glsxtrseelists to encapsulate the lists. §5.9.2; 276

    +

    +

    +Hook used by \glsxtrdisplaylocnameref to override the default definition of \glsxtractualanchor. §11.5.6; 557

    +

    \GlsXtrSetActualChar{character}

    +

    (preamble only)
    +
    +

    +Sets the “actual character” for the auto-indexing feature. §12; 577

    +

    +

    +Hook used to switch off indexing for aliases. §5.9.3; 278

    +

    \GlsXtrSetAltModifier{token}{options}
    +

    +Sets token as a modifier for the \gls-like and \glstext-like commands that will automatically implement the given options. §5; 184

    +

    \glsxtrsetbibglsaux{basename}glossaries-extra v1.49+

    +

    (requires bib2gls v3.0+)
    +
    +

    +As the bibglsaux option. §2.4; 26

    +

    \glsxtrsetcategory{entry-labels}{category-label}
    +

    +Globally sets the category field to the fully expanded category-label for each entry listed in entry-labels. §10; 492

    +

    \glsxtrsetcategoryforall{glossary-labels}{category-label}
    +

    +Globally sets the category field to the fully expanded category-label for each entry belonging to the glossaries listed in glossary-labels. §10; 492

    +

    \glsxtrsetcomplexstyle{entry-label}{n}glossaries-extra v1.49+
    +

    +Indicates that the entry given by entry-label uses a complex abbreviation style. The second argument n should be numeric, which indicates why it doesn’t work with the variations of \glsfirst: 1 (all caps doesn’t work), 2 (all caps and insert doesn’t work), 3 (insert doesn’t work). §4.5.3.1; 166

    +

    +

    +Locally set the default options for the \gls-like and \glstext-like commands. §5.1.1; 187

    +

    +

    +Sets the default format to encap (without the leading backslash). §5.1.1; 188

    +

    \GlsXtrSetEncapChar{character}

    +

    (preamble only)
    +
    +

    +Sets the “encap character” for the auto-indexing feature. §12; 577

    +

    \GlsXtrSetEscChar{character}

    +

    (preamble only)
    +
    +

    +Sets the “escape character” for the auto-indexing feature. §12; 577

    +

    \GlsXtrSetField{entry-label}{field-label}{value}glossaries-extra v1.12+
    +

    +Assigns value to the field identified by its internal label field-label for the entry identified by entry-label. An error (or warning with undefaction=warn) occurs if the entry hasn’t been defined. §3.5; 39

    +

    \glsxtrsetfieldifexists{entry-label}{field-label}{code}glossaries-extra v1.12+
    +

    +Used by commands like \GlsXtrSetField to check if the entry exists before assigning a value to the field. The code part is the assignment code, which is only done if the required condition is met. This can be redefined if the condition needs to be altered. §3.5; 39

    +

    \glsxtrsetgrouptitle{group-label}{group-title}glossaries-extra v1.14+
    +

    +Globally assigns the given title group-title to the group identified by group-label. §8.6.4; 426

    +

    +

    +Sets the label to add (using \label{label}) after the glossary section heading. §8.3; 378

    +

    \GlsXtrSetLevelChar{character}

    +

    (preamble only)
    +
    +

    +Sets the “level character” for the auto-indexing feature. §12; 577

    +

    \glsxtrsetlongfirstuse{entry-label}glossaries v1.49+
    +

    +Implemented by the \glsxtrlong set of commands to assign \glsxtrifwasfirstuse. §4.3; 52

    +

    +

    +Overrides the options that should be implemented by the plus (+) modifier for \gls-like and \glstext-like commands. §5; 184

    +

    \glsxtrsetpopts{options}glossaries-extra v1.07+
    +

    +Sets the options that \glsxtrp (and case-change variants) pass to the relevant \glstext-like command. §5.4; 231

    +

    \glsxtrsetpunctuationmarks{token list}
    +

    +Sets the punctuation list used by \glsxtrifnextpunc. The token list must be a non-delimited list of single tokens that represent each punctuation character. Note that the element of the list must be a single token, which means a single-byte character for pdfLaTeX (for example, ASCII). Multi-byte characters (UTF-8) will required a native Unicode engine (XeLaTeX or LuaLaTeX). §5.5.4; 249

    +

    \GlsXtrSetRecordCountAttribute{category-list}{value}glossaries-extra v1.21+
    +

    +Sets the recordcount attribute to value for each of the listed categories. §11.4; 524

    +

    +

    +Overrides the options that should be implemented by the star (*) modifier for \gls-like and \glstext-like commands. §5; 184

    +

    +

    +Hook used by \glsxtrfull (and case-changing and plural variations). §4.3; 54

    +

    \glsxtrSetWidest{type}{level}glossaries-extra-bib2gls v1.37+
    +

    +Written to the glstex by the set-widest option. §11.5.3; 553

    +

    \glsxtrSetWidestFallback{type}{level}glossaries-extra-bib2gls v1.37+
    +

    +Written to the glstex by the set-widest option if bib2gls can’t determine the widest name. §11.5.3; 554

    +

    \GLSxtrshort[options]{entry-label}[insert]modifiers: * + alt-mod
    +

    +As \glsxtrshort but converts the link text to all caps. §4.3; 52

    +

    \Glsxtrshort[options]{entry-label}[insert]modifiers: * + alt-mod
    +

    +As \glsxtrshort but converts the first character of the link text to uppercase (for the start of a sentence) using \makefirstuc. §4.3; 51

    +

    \glsxtrshort[options]{entry-label}[insert]modifiers: * + alt-mod
    +

    +References the entry identified by entry-label. The text produced is obtained from the short value, formatted according to the abbreviation style associated with the entry’s category. The insert argument will be inserted at the end of the link text. This command does not alter or depend on the first use flag. For the first optional argument, see \glslink options. §4.3; 51

    +

    +

    +Expands to the name value for styles like short-nolong-desc. 147

    +

    \GLSxtrshortformat{entry-label}{insert}{fmt-cs}glossaries-extra v1.49+
    +

    +As \glsxtrshortformat but all caps. 177

    +

    \Glsxtrshortformat{entry-label}{insert}{fmt-cs}glossaries-extra v1.49+
    +

    +As \glsxtrshortformat but sentence case. 177

    +

    \glsxtrshortformat{entry-label}{insert}{fmt-cs}glossaries-extra v1.49+
    +

    +Encapsulates the short field for the given entry with fmt-cs. The insert argument is the insertion material supplied in the final optional argument of the \gls-like or \glstext-like commands. The \ifglsxtrinsertinside, inner formatting, and accessibility settings are supported. 177

    +

    \GLSxtrshortformatgrp{entry-label}{insert}{fmt-cs}glossaries-extra v1.49+
    +

    +As \glsxtrshortformatgrp but all caps. 178

    +

    \Glsxtrshortformatgrp{entry-label}{insert}{fmt-cs}glossaries-extra v1.49+
    +

    +As \glsxtrshortformatgrp but sentence case. 178

    +

    \glsxtrshortformatgrp{entry-label}{insert}{fmt-cs}glossaries-extra v1.49+
    +

    +As \glsxtrshortformat but adds grouping around insert (with the inner formatting inside the group). 178

    +

    \glsxtrshorthyphen{short}{entry-label}{insert}glossaries-extra v1.17+
    +

    +Formats the short form according to the short-hyphen-postlong-hyphen style. 152

    +

    \GLSxtrshorthyphenlong{entry-label}{short}{long}{insert}glossaries-extra v1.49+
    +

    +As \glsxtrshorthyphenlong but insert is converted to all caps. 152

    +

    \glsxtrshorthyphenlong{entry-label}{short}{long}{insert}glossaries-extra v1.17+
    +

    +Formats the short and long form according to the short-hyphen-long-hyphen style. 152

    +

    +

    +Expands to the sort value for the short-hyphen-long-hyphen styles. 148

    +

    +

    +Expands to the name value for short-long-desc styles. 134

    +

    +

    +Expands to the sort value for short-long-desc styles. 134

    +

    \GLSxtrshortlongformat{entry-label}{insert}{long-fmt-cs}{short-fmt-cs}glossaries-extra v1.49+
    +

    +As \glsxtrshortlongformat but all caps. 180

    +

    \Glsxtrshortlongformat{entry-label}{insert}{long-fmt-cs}{short-fmt-cs}glossaries-extra v1.49+
    +

    +As \glsxtrshortlongformat but sentence case. 180

    +

    \glsxtrshortlongformat{entry-label}{insert}{long-fmt-cs}{short-fmt-cs}glossaries-extra v1.49+
    +

    +Formats the short form with \glsxtrshortformat and the long form in parentheses with \glsxtrlongformat. 180

    +

    +

    +Expands to the name value for short-long styles. 134

    +

    \GLSxtrshortlongplformat{entry-label}{insert}{long-fmt-cs}{short-fmt-cs}glossaries-extra v1.49+
    +

    +As \glsxtrshortlongplformat but all caps. 181

    +

    \Glsxtrshortlongplformat{entry-label}{insert}{long-fmt-cs}{short-fmt-cs}glossaries-extra v1.49+
    +

    +As \glsxtrshortlongplformat but sentence case. 180

    +

    \glsxtrshortlongplformat{entry-label}{insert}{long-fmt-cs}{short-fmt-cs}glossaries-extra v1.49+
    +

    +As \glsxtrshortlongformat but for the plurals. 180

    +

    +

    +Expands to the value for the name key for styles like short-long-user-desc. 139

    +

    +

    +Expands to the name value for short-nolong styles. 146

    +

    \GLSxtrshortpl[options]{entry-label}[insert]modifiers: * + alt-mod
    +

    +As \glsxtrshort but converts the link text to all caps. §4.3; 52

    +

    \Glsxtrshortpl[options]{entry-label}[insert]modifiers: * + alt-mod
    +

    +As \glsxtrshortpl but converts the first character of the link text to uppercase (for the start of a sentence) using \makefirstuc. §4.3; 52

    +

    \glsxtrshortpl[options]{entry-label}[insert]modifiers: * + alt-mod
    +

    +References the entry identified by entry-label. The text produced is obtained from the shortplural value, formatted according to the abbreviation style associated with the entry’s category. The insert argument will be inserted at the end of the link text. This command does not alter or depend on the first use flag. For the first optional argument, see \glslink options. §4.3; 52

    +

    \GLSxtrshortplformat{entry-label}{insert}{fmt-cs}glossaries-extra v1.49+
    +

    +As \glsxtrshortplformat but all caps. 178

    +

    \Glsxtrshortplformat{entry-label}{insert}{fmt-cs}glossaries-extra v1.49+
    +

    +As \glsxtrshortplformat but sentence case. 178

    +

    \glsxtrshortplformat{entry-label}{insert}{fmt-cs}glossaries-extra v1.49+
    +

    +As \glsxtrshortformat but for the shortplural field. 178

    +

    \GLSxtrshortplformatgrp{entry-label}{insert}{fmt-cs}glossaries-extra v1.49+
    +

    +As \glsxtrshortplformatgrp but all caps. 179

    +

    \Glsxtrshortplformatgrp{entry-label}{insert}{fmt-cs}glossaries-extra v1.49+
    +

    +As \glsxtrshortplformatgrp but sentence case. 178

    +

    \glsxtrshortplformatgrp{entry-label}{insert}{fmt-cs}glossaries-extra v1.49+
    +

    +As \glsxtrshortplformat but adds grouping around insert (with the inner formatting inside the group). 178

    +

    \glsxtrshowtargetinner{target-name}glossaries-extra v1.48+
    +

    +Used in inner mode for debugging, this defaults to \glsshowtargetinner but is changed by the showtargets options. §2.5; 30

    +

    \glsxtrshowtargetouter{target-name}glossaries-extra v1.48+
    +

    +Used in outer mode for debugging, this defaults to \glsshowtargetouter but is changed by the showtargets options. §2.5; 30

    +

    +

    +The left marker debugging symbol (◁). §2.5; 30

    +

    +

    +The right marker debugging symbol (▷). §2.5; 30

    +

    \glsxtrsmfont{text}
    +

    +Maintained for backwards-compatibility used to typeset text in a smaller font (\textsmaller) for the “sm” abbreviation styles.

    +

    +

    +The definition of \glsxtrrevert used by the smaller (“sm”) abbreviation styles. Uses \textlarger. 158

    +

    +

    +The plural suffix used by the smaller (“sm”) abbreviation styles (such as short-sm-long). 158

    +

    +

    +Expands to space character sort rules. 542

    +

    +

    +Used by \glsxtrglossentry for the header and toc. §8.5; 417

    +

    \GlsXtrStandaloneEntryHeadOther{entry-label}{field-label}glossaries-extra v1.49+
    +

    +Used by \glsxtrglossentryother for the header and toc. §8.5; 418

    +

    +

    +Used to display the standalone entry name and create the associated hypertarget, if supported. §8.5; 415

    +

    \GlsXtrStandaloneEntryOther{entry-label}{field-label}glossaries-extra v1.37+
    +

    +As \GlsXtrStandaloneEntryName but where the text is obtained from the given field instead of name. §8.5; 415

    +

    +

    +Used by \glsxtrglossentry for the PDF bookmark. §8.5; 417

    +

    \GlsXtrStandaloneEntryPdfOther{entry-label}{field-label}glossaries-extra v1.49+
    +

    +Used by \glsxtrglossentryother for the PDF bookmark. §8.5; 417

    +

    +

    +Expands to the glossary type for standalone entries. §8.5; 414

    +

    +

    +Used to display standalone entries that have the parent field set. §8.5; 414

    +

    \glsxtrstarflywarn
    +

    +Issues a warning with \GlossariesExtraWarning indicating that the experimental starred version of \GlsXtrEnableOnTheFly has been used.

    +

    +

    +Enables unset buffering. The starred version doesn’t check for duplicates. §5.10.1; 284

    +

    +

    +Stops buffering. The starred version performs a global unset. §5.10.1; 285

    +

    +

    +Expands to the 0–9 subscript digit character sort rules. 545

    +

    \GLSxtrsubsequentfmt{entry-label}{insert}glossaries-extra v1.49+
    +

    +Used by \glsxtrgenabbrvfmt to display the all caps subsequent singular form (defined by the abbreviation style). 173

    +

    \Glsxtrsubsequentfmt{entry-label}{insert}glossaries-extra v1.17+
    +

    +Used by \glsxtrgenabbrvfmt to display the sentence case subsequent singular form (defined by the abbreviation style). 173

    +

    \glsxtrsubsequentfmt{entry-label}{insert}glossaries-extra v1.17+
    +

    +Used by \glsxtrgenabbrvfmt to display the subsequent singular form (defined by the abbreviation style). 173

    +

    \GLSxtrsubsequentplfmt{entry-label}{insert}glossaries-extra v1.49+
    +

    +Used by \glsxtrgenabbrvfmt to display the all caps subsequent plural form (defined by the abbreviation style). 173

    +

    \Glsxtrsubsequentplfmt{entry-label}{insert}glossaries-extra v1.17+
    +

    +Used by \glsxtrgenabbrvfmt to display the sentence case subsequent plural form (defined by the abbreviation style). 173

    +

    \glsxtrsubsequentplfmt{entry-label}{insert}glossaries-extra v1.17+
    +

    +Used by \glsxtrgenabbrvfmt to display the subsequent plural form (defined by the abbreviation style). 173

    +

    +

    +Expands to the 0–9 superscript digit character sort rules. 545

    +

    +

    +Used to hyperlink to a location in an external document if the externallocation attribute has been set. This will define \glsxtrsupplocationurl to the location provided by the attribute or to empty if the attribute isn’t set. §5.1.2; 195

    +

    \glsxtrsupplocationurlglossaries-extra v1.14+
    +

    +Defined by \glsxtrsupphypernumber to the external location or empty if not provided.

    +

    \glsxtrtagfont{text}
    +

    +Used by the tagging command defined with \GlsXtrEnableInitialTagging. §4.4; 58

    +

    \glsxtrtaggedlist{singular tag}{plural tag}{label prefix}{csv-list}glossaries-extra v1.49+
    +

    +Similar to \glsseelist, this will start the list with singular tag if the list only contains one element and plural tag if the list contains more than one element. Each element is prefixed with label prefix. The tag is separated from the start of the list with \glsxtrtaggedlistsep. The actual list separators as as for \glsseelist. The csv-list is expanded before being iterated over. Does nothing if csv-list is empty. §5.13; 300

    +

    \glsxtrtaggedlistsepinitial: \space; glossaries-extra v1.49+
    +

    +Separator used by \glsxtrtaggedlist between the tag and the list. §5.13; 300

    +

    \GlsXtrTheLinkCounter{entry-label}glossaries-extra v1.26+
    +

    +Expands to the value of the link counter associated with the given entry or 0 if it hasn’t been defined. §6.2; 318

    +

    \glsxtrtitlednamereflink{format}{location}{title}{file}glossaries-extra-bib2gls v1.49+
    +

    +Used by \glsxtrdisplaylocnameref to display locations that have a title and are not associated with the page counter and don’t have an associated \glsxtrcounterlocfmt command. The anchor is obtained from \glsxtrrecentanchor. §11.5.6; 559

    +

    \GLSxtrtitlefirst{entry-label}glossaries-extra v1.42+
    +

    +Used to display the all caps entry’s first field in the section title and table of contents. §5.3.3; 226

    +

    \Glsxtrtitlefirst{entry-label}
    +

    +Used to display the sentence case entry’s first field in the section title and table of contents. §5.3.3; 225

    +

    \glsxtrtitlefirst{entry-label}
    +

    +Used to display the entry’s first field in the section title and table of contents. §5.3.3; 225

    +

    \GLSxtrtitlefirstplural{entry-label}glossaries-extra v1.42+
    +

    +Used to display the all caps entry’s firstplural field in the section title and table of contents. §5.3.3; 226

    +

    \Glsxtrtitlefirstplural{entry-label}
    +

    +Used to display the sentence case entry’s firstplural field in the section title and table of contents. §5.3.3; 226

    +

    \glsxtrtitlefirstplural{entry-label}
    +

    +Used to display the entry’s firstplural field in the section title and table of contents. §5.3.3; 226

    +

    \GLSxtrtitlefull{entry-label}glossaries-extra v1.42+
    +

    +Used to display the entry’s all caps full form in the section title and table of contents. §5.3.3; 222

    +

    \Glsxtrtitlefull{entry-label}glossaries-extra v1.02+
    +

    +Used to display the entry’s sentence case full form in the section title and table of contents. §5.3.3; 222

    +

    \glsxtrtitlefull{entry-label}glossaries-extra v1.02+
    +

    +Used to display the entry’s full form in the section title and table of contents. §5.3.3; 221

    +

    \GLSxtrtitlefullpl{entry-label}glossaries-extra v1.42+
    +

    +Used to display the entry’s all caps full plural form in the section title and table of contents. §5.3.3; 223

    +

    \Glsxtrtitlefullpl{entry-label}glossaries-extra v1.02+
    +

    +Used to display the entry’s sentence case full plural form in the section title and table of contents. §5.3.3; 222

    +

    \glsxtrtitlefullpl{entry-label}glossaries-extra v1.02+
    +

    +Used to display the entry’s full plural form in the section title and table of contents. §5.3.3; 222

    +

    \GLSxtrtitlelong{entry-label}glossaries-extra v1.42+
    +

    +The normal behaviour of \GLSfmtlong. §5.3.3; 220

    +

    \Glsxtrtitlelong{entry-label}glossaries-extra v1.02+
    +

    +The normal behaviour of \Glsfmtlong. §5.3.3; 220

    +

    \glsxtrtitlelong{entry-label}glossaries-extra v1.02+
    +

    +The normal behaviour of \glsfmtlong. §5.3.3; 220

    +

    \GLSxtrtitlelongpl{entry-label}glossaries-extra v1.42+
    +

    +The normal behaviour of \GLSfmtlongpl. §5.3.3; 221

    +

    \Glsxtrtitlelongpl{entry-label}glossaries-extra v1.02+
    +

    +The normal behaviour of \Glsfmtlongpl. §5.3.3; 221

    +

    \glsxtrtitlelongpl{entry-label}glossaries-extra v1.02+
    +

    +The normal behaviour of \glsfmtlongpl. §5.3.3; 221

    +

    \GLSxtrtitlename{entry-label}glossaries-extra v1.42+
    +

    +Used to display the all caps entry’s name in the section title and table of contents. §5.3.3; 223

    +

    \Glsxtrtitlename{entry-label}glossaries-extra v1.21+
    +

    +Used to display the sentence case entry’s name in the section title and table of contents. §5.3.3; 223

    +

    \glsxtrtitlename{entry-label}glossaries-extra v1.21+
    +

    +Used to display the entry’s name in the section title and table of contents. §5.3.3; 223

    +

    +

    +Expands to the options that commands like \glsfmtshort should use in the title or caption within the document text. §5.3.2; 206

    +

    \glsxtrtitleorpdforheading{title}{PDF bookmarks}{heading}glossaries-extra v1.21+
    +

    +Does the applicable argument depending on whether the command occurs within a title/caption or PDF bookmark or heading. §5.3.3; 215

    +

    \GLSxtrtitleplural{entry-label}glossaries-extra v1.42+
    +

    +Used to display the all caps entry’s plural field in the section title and table of contents. §5.3.3; 225

    +

    \Glsxtrtitleplural{entry-label}
    +

    +Used to display the sentence case entry’s plural field in the section title and table of contents. §5.3.3; 225

    +

    \glsxtrtitleplural{entry-label}
    +

    +Used to display the entry’s plural field in the section title and table of contents. §5.3.3; 224

    +

    \GLSxtrtitleshort{entry-label}glossaries-extra v1.42+
    +

    +The normal behaviour of \GLSfmtshort. §5.3.3; 218

    +

    \Glsxtrtitleshort{entry-label}
    +

    +The normal behaviour of \Glsfmtshort. §5.3.3; 217

    +

    \glsxtrtitleshort{entry-label}
    +

    +The normal behaviour of \glsfmtshort. §5.3.3; 217

    +

    \GLSxtrtitleshortpl{entry-label}glossaries-extra v1.42+
    +

    +The normal behaviour of \GLSfmtshortpl. §5.3.3; 220

    +

    \Glsxtrtitleshortpl{entry-label}
    +

    +The normal behaviour of \Glsfmtshortpl. §5.3.3; 219

    +

    \glsxtrtitleshortpl{entry-label}glossaries-extra v1.03+
    +

    +The normal behaviour of \glsfmtshortpl. §5.3.3; 219

    +

    \GLSxtrtitletext{entry-label}glossaries-extra v1.42+
    +

    +Used to display the all caps entry’s text field in the section title and table of contents. §5.3.3; 224

    +

    \Glsxtrtitletext{entry-label}
    +

    +Used to display the sentence case entry’s text field in the section title and table of contents. §5.3.3; 224

    +

    \glsxtrtitletext{entry-label}
    +

    +Used to display the entry’s text field in the section title and table of contents. §5.3.3; 224

    +

    \GlsXtrTotalRecordCount{entry-label}glossaries-extra v1.21+
    +

    +Expands to the entry’s total record count (stored in the recordcount field) or to 0 if not set. §11.4; 523

    +

    \glsxtrtreechildpredescinitial: \glstreechildpredesc; glossaries-extra-stylemods v1.46+
    +

    +Inserted before the child descriptions for the tree styles.

    +

    \glsxtrtreepredescinitial: \glstreepredesc; glossaries-extra-stylemods v1.46+
    +

    +Inserted before the top-level descriptions for the tree styles.

    +

    \glsxtrundefaction{message}{additional help}glossaries-extra v1.08+
    +

    +Will either produce an error or a warning, depending on the undefaction setting. In the document environment this will also generate the unknown marker (??). §2.4; 16

    +

    +

    +Expands to the unknown marker (??). §2.4; 15

    +

    \GlsXtrUnknownDialectWarning{locale}{root language}glossaries-extra v1.32+
    +

    +Issues a warning with \GlossariesExtraWarning indicating that a valid dialect label can’t be determined for the given locale and root language. §5.12.1; 294

    +

    +

    +Disables GlsXtrUnsetBufferEnableRepeatLocal. §5.10.1; 286

    +

    +

    +Allows repeat entries within the buffering code to be locally unset before the link text. §5.10.1; 285

    +

    \glsxtrunsrtdo{entry-label}glossaries-extra v1.12+
    +

    +Used by the “unsrt” family of commands, this displays the glossary entry according to the current glossary style (taking the hierarchical level into account, which may have been adjusted by leveloffset or flatten). §8.4.3; 402

    +

    \glsxtrunusedformat{location}
    +

    +The format used by \glsxtraddallcrossrefs. §5.9.3; 279

    +

    +

    +(Sort rule) expands to the variations of math Greek upright alpha. 553

    +

    +

    +(Sort rule) expands to the variations of math Greek upright beta. 553

    +

    +

    +(Sort rule) expands to the variations of math Greek upright chi. 553

    +

    +

    +(Sort rule) expands to the variations of math Greek upright delta. 553

    +

    +

    +(Sort rule) expands to the variations of math Greek upright digamma. 553

    +

    +

    +(Sort rule) expands to the variations of math Greek upright epsilon. 553

    +

    +

    +(Sort rule) expands to the variations of math Greek upright eta. 553

    +

    +

    +(Sort rule) expands to the variations of math Greek upright gamma. 553

    +

    +

    +(Sort rule) expands to the variations of math Greek upright iota. 553

    +

    +

    +(Sort rule) expands to the variations of math Greek upright kappa. 553

    +

    +

    +(Sort rule) expands to the variations of math Greek upright lambda. 553

    +

    +

    +(Sort rule) expands to the variations of math Greek upright mu. 553

    +

    +

    +(Sort rule) expands to the variations of math Greek upright nu. 553

    +

    +

    +(Sort rule) expands to the variations of math Greek upright omega. 553

    +

    +

    +(Sort rule) expands to the variations of math Greek upright omicron. 553

    +

    +

    +(Sort rule) expands to the variations of math Greek upright phi. 553

    +

    +

    +(Sort rule) expands to the variations of math Greek upright pi. 553

    +

    +

    +(Sort rule) expands to the variations of math Greek upright psi. 553

    +

    +

    +(Sort rule) expands to the variations of math Greek upright rho. 553

    +

    +

    +(Sort rule) expands to the variations of math Greek upright sigma. 553

    +

    +

    +(Sort rule) expands to the variations of math Greek upright tau. 553

    +

    +

    +(Sort rule) expands to the variations of math Greek upright theta. 553

    +

    +

    +(Sort rule) expands to the variations of math Greek upright upsilon. 553

    +

    +

    +(Sort rule) expands to the variations of math Greek upright xi. 553

    +

    +

    +(Sort rule) expands to the variations of math Greek upright zeta. 553

    +

    \GlsXtrUseAbbrStyleFmts{style-name}
    +

    +Implements the display definitions code for the given abbreviation style. §4.5.2; 160

    +

    \GlsXtrUseAbbrStyleSetup{style-name}
    +

    +Implements the setup code for the given abbreviation style. §4.5.2; 159

    +

    \glsxtrusealias{entry-label}glossaries-extra v1.42+
    +

    +If the entry given by entry-label has the alias field set, this will display the cross reference according to \glsxtruseseeformat. §5.9.2; 277

    +

    \GLSxtrusefield{entry-label}{field-label}glossaries-extra v1.37+
    +

    +As \glsxtrusefield but converts the field value to all caps. §5.11; 291

    +

    \Glsxtrusefield{entry-label}{field-label}glossaries-extra v1.12+
    +

    +As \glsxtrusefield but uses sentence case. §5.11; 291

    +

    \glsxtrusefield{entry-label}{field-label}glossaries-extra v1.12+
    +

    +Expands to the value of the given field (identified by its internal label field-label) for the entry given by entry-label. Expands to \relax if the entry or field are undefined. §5.11; 291

    +

    +

    +Expands to the internal label of the field used to store additional information for the “user” abbreviation styles, such as long-short-user. 135

    +

    +

    +Used to format the value of the field given by \glsxtruserfield within \glsxtruserparen and \GLSxtruserparen. 135

    +

    \GLSxtruserlongformat{entry-label}{fmt-cs}glossaries-extra v1.49+
    +

    +As \glsxtruserlongformat but all caps. 143

    +

    \glsxtruserlongformat{entry-label}{fmt-cs}glossaries-extra v1.49+
    +

    +Formats the singular long form in parentheses (with \glsxtruserparen) in styles like short-long-user. 143

    +

    \GLSxtruserlongplformat{entry-label}{fmt-cs}glossaries-extra v1.49+
    +

    +As \glsxtruserlongplformat but all caps. 144

    +

    \glsxtruserlongplformat{entry-label}{fmt-cs}glossaries-extra v1.49+
    +

    +Formats the plural long form in parentheses (with \glsxtruserparen) in styles like short-long-user. 143

    +

    \GLSxtruserlongshortformat{entry-label}{insert}{long-fmt-cs}{short-fmt-cs}glossaries-extra v1.49+
    +

    +As \glsxtruserlongshortformat but all caps. 139

    +

    \Glsxtruserlongshortformat{entry-label}{insert}{long-fmt-cs}{short-fmt-cs}glossaries-extra v1.49+
    +

    +As \glsxtruserlongshortformat but sentence case. 139

    +

    \glsxtruserlongshortformat{entry-label}{insert}{long-fmt-cs}{short-fmt-cs}glossaries-extra v1.49+
    +

    +Used by styles like long-short-user to format the long and short form. 139

    +

    \GLSxtruserlongshortplformat{entry-label}{insert}{long-fmt-cs}{short-fmt-cs}glossaries-extra v1.49+
    +

    +As \glsxtruserlongshortplformat but all caps. 140

    +

    \Glsxtruserlongshortplformat{entry-label}{insert}{long-fmt-cs}{short-fmt-cs}glossaries-extra v1.49+
    +

    +As \glsxtruserlongshortplformat but sentence case. 140

    +

    \glsxtruserlongshortplformat{entry-label}{insert}{long-fmt-cs}{short-fmt-cs}glossaries-extra v1.49+
    +

    +Used by styles like long-short-user to format the plural long and plural short form. 140

    +

    \GLSxtruserparen{text}{entry-label}glossaries-extra v1.49+
    +

    +As \glsxtruserparen but the value of the field given by \glsxtruserfield is converted to all caps. The text argument should already be in all caps. 138

    +

    \glsxtruserparen{text}{entry-label}glossaries-extra v1.04+
    +

    +Used by the “user” abbreviation styles, such as long-short-user, to insert the space separator (\glsxtrfullsep) followed by the parenthetical material (\glsxtrparen) consisting of text and, if set, the value of the field given by \glsxtruserfield, separated by \glsxtruserparensep. 137

    +

    +

    +The separator used in the parenthetical content of \glsxtruserparen and \GLSxtruserparen. 135

    +

    \GLSxtrusershortformat{entry-label}{fmt-cs}glossaries-extra v1.49+
    +

    +As \glsxtrusershortformat but all caps. 142

    +

    \glsxtrusershortformat{entry-label}{fmt-cs}glossaries-extra v1.49+
    +

    +Formats the singular short form in parentheses (with \glsxtruserparen) in styles like long-short-user. 141

    +

    \GLSxtrusershortlongformat{entry-label}{insert}{long-fmt-cs}{short-fmt-cs}glossaries-extra v1.49+
    +

    +As \glsxtrusershortlongformat but all caps. 141

    +

    \Glsxtrusershortlongformat{entry-label}{insert}{long-fmt-cs}{short-fmt-cs}glossaries-extra v1.49+
    +

    +As \glsxtrusershortlongformat but sentence case. 141

    +

    \glsxtrusershortlongformat{entry-label}{insert}{long-fmt-cs}{short-fmt-cs}glossaries-extra v1.49+
    +

    +Used by styles like short-long-user to format the short and long form. 140

    +

    \GLSxtrusershortlongplformat{entry-label}{insert}{long-fmt-cs}{short-fmt-cs}glossaries-extra v1.49+
    +

    +As \glsxtrusershortlongplformat but all caps. 141

    +

    \Glsxtrusershortlongplformat{entry-label}{insert}{long-fmt-cs}{short-fmt-cs}glossaries-extra v1.49+
    +

    +As \glsxtrusershortlongplformat but sentence case. 141

    +

    \glsxtrusershortlongplformat{entry-label}{insert}{long-fmt-cs}{short-fmt-cs}glossaries-extra v1.49+
    +

    +Used by styles like short-long-user to format the plural short and plural long form. 141

    +

    \GLSxtrusershortplformat{entry-label}{fmt-cs}glossaries-extra v1.49+
    +

    +As \glsxtrusershortplformat but all caps. 142

    +

    \glsxtrusershortplformat{entry-label}{fmt-cs}glossaries-extra v1.49+
    +

    +Formats the plural short form in parentheses (with \glsxtruserparen) in styles like long-short-user. 142

    +

    +

    +The plural suffix used by styles like short-long-user. 136

    +

    \glsxtrusesee{entry-label}glossaries-extra v1.06+
    +

    +If the entry given by entry-label has the see field set, this will display the cross reference according to \glsxtruseseeformat. §5.9.2; 277

    +

    \glsxtruseseealso{entry-label}glossaries-extra v1.16+
    +

    +If the entry given by entry-label has the seealso field set, this will display the cross reference according to \glsxtruseseealsoformat. §5.9.2; 277

    +

    +

    +Formats the comma-separated list of entry labels as a “see also” cross-reference. §5.9.2; 278

    +

    \glsxtruseseeformat{tag}{xr-list}glossaries-extra v1.06+
    +

    +Format used by \glsxtrusesee. This internally uses \glsseeformat.

    +

    \GlsXtrWarnDeprecatedAbbrStyle{old-name}{new-name}glossaries-extra v1.04+
    +

    +Issues a warning with \GlossariesExtraWarning indicating that a deprecated abbreviation style has been used. §4.5.2; 160

    +

    \GlsXtrWarning{options}{entry}
    +

    +Issues a warning with \GlossariesExtraWarning indicating that the given options list has been ignored by the given entry because it has already been defined. §13; 579

    +

    \glsxtrword{word}glossaries-extra v1.17+
    +

    +Used to mark each word by the markwords and markshortwords attributes. §10.2.1.1; 496

    +

    +

    +Used to mark word separator space by the markwords and markshortwords attributes. §10.2.1.1; 496

    +

    \glsxtrwordsephyphenglossaries-extra v1.49+
    +

    +Used to mark compound word separator hyphen by the markwords and markshortwords attributes.

    +

    \glsxtrwrglossaryhook{entry-label}
    +

    +Hook implemented everytime an entry is indexed.

    +

    \glsxtrwrglossarylocfmt{location}{title}glossaries-extra-bib2gls v1.49+
    +

    +Used by \glsxtrdisplaylocnameref to format a location where the counter is wrglossary. §11.5.6; 559

    +

    +

    +Used to mark where the wrglossary counter is incrememented with debug=showwrgloss. §2.5; 29

    +

    +

    +Marker (·) used to mark write operations with debug=showwrgloss. §2.5; 29

    + +

    + +
    +

    H

    +
    \hyperbf{location(s)}glossaries
    +

    +If hyperlinks are supported this does \textbf{\glshypernumber{location(s)}} otherwise it just does \textbf{location(s)}.

    + +

    + +
    +

    I

    +
    \ifglossaryexists{glossary-type}{true}{false}modifier: * glossaries
    +

    +If the glossary given by glossary-type exists, this does true, otherwise it does false. The unstarred form treats ignored glossaries as non-existent. The starred form (v4.46+) will do true if glossary-type matches an ignored glossary.

    +

    \ifglsentryexists{entry-label}{true}{false}glossaries
    +

    +Does true if the entry given by entry-label exists, otherwise does false.

    +

    \ifglsfieldcseq{entry-label}{field-label}{cs-name}{true}{false}glossaries v4.16+
    +

    +Tests if the value of the given field is equal to the replacement text of the command given by the control sequence name cs-name using etoolbox’s \ifcsstrequal. Triggers an error if the given field (identified by its internal field label) hasn’t been defined. Uses \glsdoifexists.

    +

    \ifglsfielddefeq{entry-label}{field-label}{cs}{true}{false}glossaries v4.16+
    +

    +Tests if the value of the given field is equal to the replacement text of the given command cs using etoolbox’s \ifdefstrequal. Triggers an error if the given field (identified by its internal field label) hasn’t been defined. Uses \glsdoifexists.

    +

    \ifglsfieldeq{entry-label}{field-label}{string}{true}{false}glossaries v4.16+
    +

    +Tests if the value of the given field is equal to the given string using etoolbox’s \ifcsstring. Triggers an error if the given field (identified by its internal field label) hasn’t been defined. Uses \glsdoifexists.

    +

    \ifglsfieldvoid{field-label}{entry-label}{true}{false}glossaries v4.50+
    +

    +An expandable test to determine if the entry is undefined or the field is undefined or empty. The field-label must be the field’s internal label.

    +

    \ifglshaschildren{entry-label}{true}{false}glossaries v3.02+
    +

    +Does true if the given entry has child entries otherwise does false. Note that this has to iterate over the set of defined entries for the entry’s glossary to find one that has the entry identified in its parent field. A more efficient approach can be achieved with bib2gls and the save-child-count resource option.

    +

    \ifglshasdesc{entry-label}{true}{false}glossaries v3.08a+
    +

    +Does true if the entry’s description field is set otherwise does false.

    +

    \ifglshasdescsuppressed{entry-label}{true}{false}glossaries v3.08a+
    +

    +Does true if the entry’s description field is just \nopostdesc otherwise does false.

    +

    \ifglshasfield{field}{entry-label}{true}{false}glossaries v4.03+
    +

    +If the field identified by either its key or its internal field label field for the entry identified by entry-label is set and non-empty, this sets \glscurrentfieldvalue to the field value and does true otherwise it does false.

    +

    \ifglshaslong{entry-label}{true}{false}glossaries v3.11a+
    +

    +Does true if the entry’s long field is set otherwise does false.

    +

    \ifglshasparent{entry-label}{true}{false}glossaries v3.02+
    +

    +Does true if the entry’s parent field is set otherwise does false.

    +

    \ifglshasshort{entry-label}{true}{false}glossaries v3.11a+
    +

    +Does true if the entry’s short field is set otherwise does false.

    +

    \ifglshassymbol{entry-label}{true}{false}glossaries v3.08a+
    +

    +Does true if the entry’s symbol field is set otherwise does false.

    +

    \ifglsindexonlyfirst true\else false\fiinitial: \iffalse; glossaries v3.02+
    +

    +A conditional that corresponds to the indexonlyfirst option. §5.8; 265

    +

    \ifGlsLongExtraUseTabular true\else false\fiinitial: \iffalse; glossary-longextra v1.37+
    +

    +Conditional that determines whether or not to use tabular instead of longtable. If this conditional is changed, it must be changed before the style is set. §8.7.2; 445

    +

    \ifglsnogroupskip true\else false\fiinitial: \iffalse; glossaries v3.03+
    +

    +Conditional set by the nogroupskip option.

    +

    \ifglsresetcurrcount true\else false\fiinitial: \iffalse; glossaries-extra v1.49+
    +

    +Conditional that determines whether or not to reset the entry counter to 0 when the first use flag is reset. §6.1; 308

    +

    \ifglsused{entry-label}{true}{false}glossaries
    +

    +Does true if the entry has been marked as used, does false if the entry is marked as unused, and does neither if the entry hasn’t been defined (but will generate an error or warning according to undefaction).

    +

    \ifglsxtrinitwrglossbefore true\else false\fiinitial: \iftrue; glossaries-extra v1.14+
    +

    +A conditional that indicates whether or not wrgloss=before is set. §5.1.2; 194

    +

    \ifglsxtrinsertinside true\else false\fiinitial: \iffalse; glossaries-extra v1.02
    +

    +A conditional used by the predefined abbreviation styles to determine whether the insert part should go inside or outside of the style’s font formatting commands. 131

    +

    \ifGlsXtrPrefixLabelFallbackLast true\else false\fiinitial: \iftrue; glossaries-extra-bib2gls v1.49+
    +

    +Conditional that determines whether or not to use the last label prefix as the default. §11.5.7; 563

    +

    \ifglsxtrprintglossflatten true\else false\fiinitial: \iffalse; glossaries-extra v1.49+
    +

    +Conditional set by the flatten option. §8.4.3; 402

    +

    \ifmglsused{multi-label}{true}{false}glossaries-extra v1.48+
    +

    +Does true if the given multi-entry has been marked as used, otherwise does false. §7.7; 352

    +

    \ifmultiglossaryentryglobal true\else false\fiinitial: \iffalse; glossaries-extra v1.48+
    +

    +If true, subsequent multi-entry definitions will be global. §7; 325

    +

    \IfTeXParserLib{TeX parser lib code}{LaTeX code}glossaries-extra-bib2gls v1.49+
    +

    +Defined by glossaries-extra-bib2gls to LaTeX code but defined by bib2gls’s interpreter to expand to TeX parser lib code. §11.5.8; 572

    +

    \indexnameinitial: Index

    +

    (language-sensitive)
    +
    +

    +Expands to the index title.

    +

    +

    +Defined with \providecommand, this just does \mathrm{I}. §11.5.8; 573

    + +

    + +
    +

    K

    + +

    +Defined with \providecommand, this just does \mathrm{K}. §11.5.8; 573

    + +

    + +
    +

    L

    +
    \letabbreviationstyle{new style}{existing style}glossaries-extra v1.04+
    +

    +Defines a synonym for an existing abbreviation style. §4.5.3; 161

    +

    \loadglsentries[type]{filename}glossaries
    +

    +Locally assigns \glsdefaulttype to type and inputs filename. If the optional argument is omitted, the default glossary is assumed. Note that if any entries with filename have the type key set (including implicitly in commands like \newabbreviation), then this will override the type given in the optional argument.

    +

    \longnewglossaryentry{entry-label}{key=value list}{description}glossaries v3.11a
    +

    +Defines a new glossary entry with the given label. The second argument is a comma-separated list of glossary entry keys. The third argument is the description, which may include paragraph breaks. §3.1; 32

    +

    \longnewglossaryentry*{entry-label}{key=value list}{description}glossaries-extra v1.12+
    +

    +Like the unstarred \longnewglossaryentry but doesn’t add the \glsxtrpostlongdescription hook. §3.1; 32

    + +

    + +
    +

    M

    + +

    +Counteracts \RestoreAcronyms. Not recommended. §4.6; 182

    +

    \makefirstuc{text}mfirstuc
    +

    +Robust command that converts the first character of text to uppercase unless text starts with a command, in which case it will attempt to apply the case change to the first character of the first argument following the command, if the command is followed by a group. As from mfirstuc v2.08, this command internally uses \MFUsentencecase to perform the actual case-change. See the mfirstuc documentation for further details, either:

    texdoc mfirstuc
    or visit ctan.org/pkg/mfirstuc.

    +

    +

    +Opens the associated glossary files that need to be processed by makeindex or xindy. The optional argument is only available with glossaries-extra and is used for a hybrid approach. All glossaries (or each glossary identified in types) should be displayed with \printglossary. If the optional argument is present, any glossaries not identified in types should be displayed with \printnoidxglossary. §8; 375

    +

    \makenoidxglossariesglossaries v4.04+
    +

    +Sets up all non-ignored glossaries so that they can be displayed with \printnoidxglossary.

    +

    \mfirstucMakeUppercase{text}mfirstuc
    +

    +This command was used by \makefirstuc to convert its argument to all caps and was redefined by glossaries to use \MakeTextUppercase, but with mfirstuc v2.08+ and glossaries v4.50+ this command is instead defined to use the LaTeX3 all caps command, which is expandable. This command is no longer used by \makefirstuc (which instead uses \MFUsentencecase) or by glossaries v4.50+ (which now uses \glsuppercase for all caps commands such as \GLS).

    +

    \MFUaddmap{cs1}{cs2}mfirstuc v2.08+
    +

    +Identifies a mapping from the command cs1 to command cs2 for \makefirstuc and also identifies cs2 as a blocker. Mappings and blockers aren’t supported by \MFUsentencecase, so both cs1 and cs2 are identified as exclusions for \MFUsentencecase.

    +

    \MFUblocker{cs}mfirstuc v2.08+
    +

    +Locally identifies cs as a blocker command for \makefirstuc and an exclusion for \MFUsentencecase (which doesn’t support blockers).

    +

    \MFUexcl{cs}mfirstuc v2.08+
    +

    +Locally identifies cs as an exclusion command, which will be recognised by both \makefirstuc and \MFUsentencecase.

    +

    \MFUsavemfirstuc v2.08+
    +

    +Saves the list of exclusions, blockers and mappings to the aux file (if required by some external tool, such as bib2gls). This command sets itself to \relax so it doesn’t repeat the action if used multiple times, and counteracts any use of \MFUsaveatend.

    +

    \MFUsaveatendmfirstuc v2.08+
    +

    +Saves the list of exclusions, blockers and mappings to the aux file (if required by some external tool, such as bib2gls) at the end of the document. This command sets itself to \relax so it doesn’t repeat the action if used multiple times, but it can be overridden by \MFUsave.

    +

    \MFUsentencecase{text}mfirstuc v2.08+
    +

    +Fully expands text and converts the first letter to uppercase. Unlike \makefirstuc, this command is expandable, but only recognises commands identified as exclusions. See the mfirstuc documentation for further details. This command is provided by glossaries-extra v1.49+ if an old version of mfirstuc is detected.

    +

    \MGLS[options]{multi-label}[insert]modifiers: * + alt-mod glossaries-extra v1.48+
    +

    +As \mgls but uses \GLS for each element. §7.11.1; 364

    +

    \MGls[options]{multi-label}[insert]modifiers: * + alt-mod glossaries-extra v1.48+
    +

    +As \mgls but uses \Gls for all elements. §7.11.1; 363

    +

    \Mgls[options]{multi-label}[insert]modifiers: * + alt-mod glossaries-extra v1.48+
    +

    +As \mgls but uses \Gls for the first element. §7.11.1; 363

    +

    \mgls[options]{multi-label}[insert]modifiers: * + alt-mod glossaries-extra v1.48+
    +

    +References a multi-entry identified by the given multi-label. §7; 323

    +

    \mglsAddOptions{multi-label}{new-options}glossaries-extra v1.48+
    +

    +Locally appends to the options associated with the given multi-entry. §7; 325

    +

    +

    +Placeholder command for use in multi-entry hooks, this expands to the multi-entry category current in effect. §7.5; 348

    +

    +

    +Placeholder command for use in multi-entry hooks, this expands to the current element label. §7.5; 348

    +

    +

    +Placeholder command for use in multi-entry hooks, this expands to the complete comma-separated list of elements. §7.5; 347

    +

    +

    +Placeholder command for use in multi-entry hooks, this expands to the label of the main element. §7.5; 347

    +

    +

    +Placeholder command for use in multi-entry hooks, this expands to the multi-entry label. §7.5; 347

    +

    +

    +Placeholder command for use in multi-entry hooks, this expands to the options used when the multi-entry was defined. §7.5; 347

    +

    +

    +Placeholder command for use in multi-entry hooks, this expands to the current prefix. §7.5; 348

    +

    +

    +Placeholder command for use in multi-entry hooks, this expands to the current suffix. §7.5; 348

    +

    +

    +Hook used with the mpostlinkelement=custom option. §7.6; 349

    +

    \mglsdefcategoryprefix{category-label}{definition}glossaries-extra v1.48+
    +

    +Defines the prefix for the given multi-entry category. §7.3; 341

    +

    \mglsdefcategorysuffix{category-label}{definition}glossaries-extra v1.48+
    +

    +Defines the suffix for the given multi-entry category. §7.3; 341

    +

    +

    +A count register used in multi-entry hooks, this is set to the element index. §7.5; 348

    +

    +

    +Hook performed after each (non-skipped) element in a multi-entry set. §7.5; 347

    +

    +

    +Hook performed before each (non-skipped) element in a multi-entry set. §7.5; 347

    +

    \mglselementreset{entry-label}glossaries-extra v1.48+
    +

    +Used by options such as resetall to reset an element’s first use flag (taking the presetlocal option into account). §7.10; 362

    +

    \mglselementunset{entry-label}glossaries-extra v1.48+
    +

    +Used by options such as unsetall to unset an element’s first use flag (taking the presetlocal option into account). §7.10; 362

    +

    \mglsfieldinitial: useri; glossaries-extra v1.48+
    +

    +Expands to the internal field label required by \mglsusefield. §7.11.3; 366

    +

    \mglsforelements{multi-label}{cs}{body}glossaries-extra v1.48+
    +

    +Iterates over the list of element labels for the multi-entry identified by multi-label. §7.13; 370

    +

    \mglsforotherelements{multi-label}{cs}{body}glossaries-extra v1.48+
    +

    +As \mglsforelements but skips the main entry label. §7.13; 371

    +

    \Mglsfull[options]{multi-label}[insert]modifiers: * + alt-mod glossaries-extra v1.48+
    +

    +As \mglsfull but sentence case. §7.11.2; 365

    +

    \mglsfull[options]{multi-label}[insert]modifiers: * + alt-mod glossaries-extra v1.48+
    +

    +As \mgls but uses \glsxtrfull for any elements that have the short field set and \glsfirst otherwise. §7.11.2; 364

    +

    \mglshascategoryprefix{category-label}{true}{false}glossaries-extra v1.48+
    +

    +Does true if the given multi-entry category has a prefix set otherwise does false. §7.3; 342

    +

    \mglshascategorysuffix{category-label}{true}{false}glossaries-extra v1.48+
    +

    +Does true if the given multi-entry category has a suffix set otherwise does false. §7.3; 342

    +

    \mglsiflast{true}{false}glossaries-extra v1.48+
    +

    +For use in multi-entry hooks, this expands to true if this is the last iteration otherwise expands to false. §7.5; 349

    +

    \mglsiflastelementcapscase{no-change}{firstuc}{all caps}glossaries-extra v1.48+
    +

    +For use in multi-entry suffix and post-link hooks, this expands to the no-change if the last element had no case-change applied, to firstuc if the last element had sentence case applied or to all caps if the last element had all caps applied. §7.6.1; 351

    +

    \mglsiflastelementskipped{true}{false}glossaries-extra v1.48+
    +

    +For use in multi-entry suffix and post-link hooks, this expands to the true if the last element was skipped, otherwise to false. §7.6.1; 350

    +

    \mglsiflastelementwasfirstuse{true}{false}glossaries-extra v1.48+
    +

    +For use in multi-entry suffix and post-link hooks, this expands to the true if the last element was used for the first time, otherwise to false. §7.6.1; 350

    +

    \mglsiflastelementwasplural{true}{false}glossaries-extra v1.48+
    +

    +For use in multi-entry suffix and post-link hooks, this expands to the true if the last element had the plural form displayed, otherwise to false. §7.6.1; 351

    +

    \mglsiflastmaincapscase{no-change}{firstuc}{all caps}glossaries-extra v1.48+
    +

    +For use in multi-entry suffix and post-link hooks, this expands to the no-change if the main element from the multi-entry just referenced had no case-change applied, to firstuc if the last element had sentence case applied or to all caps if the last element had all caps applied. §7.6.2; 352

    +

    \mglsiflastmainskipped{true}{false}glossaries-extra v1.48+
    +

    +For use in multi-entry suffix and post-link hooks, this expands to the true if the main element from the multi-entry just referenced was skipped, otherwise to false. §7.6.2; 351

    +

    \mglsiflastmainwasfirstuse{true}{false}glossaries-extra v1.48+
    +

    +For use in multi-entry suffix and post-link hooks, this expands to the true if the main element from the multi-entry just referenced was used for the first time, otherwise to false. §7.6.2; 351

    +

    \mglsiflastmainwasplural{true}{false}glossaries-extra v1.48+
    +

    +For use in multi-entry suffix and post-link hooks, this expands to the true if the main element from the multi-entry just referenced had the plural form shown, otherwise to false. §7.6.2; 352

    +

    \mglsisfirstuse{true}{false}glossaries-extra v1.48+
    +

    +For use in multi-entry hooks, this expands to true if this is the first use otherwise expands to false. §7.5; 348

    +

    +

    +For use in multi-entry suffix and post-link hooks, this expands to the multi-entry category or nothing, if no category assigned. §7.6; 350

    +

    +

    +For use in multi-entry suffix and post-link hooks, this expands to the label of the last non-skipped element. §7.6.1; 350

    +

    +

    +Hook used with the mpostlinkelement=last option. §7.6; 349

    +

    +

    +For use in multi-entry suffix and post-link hooks, this expands to the label of the main element that was just referenced. §7.6.2; 351

    +

    +

    +Hook used with the mpostlinkelement=main option. §7.6; 349

    +

    +

    +For use in multi-entry suffix and post-link hooks, this expands to the multi-entry label. §7.6; 350

    +

    \mglslocalreset{multi-label}glossaries-extra v1.48+
    +

    +Locally resets the first use flag for the given multi-entry. §7.7; 353

    +

    \mglslocalunset{multi-label}glossaries-extra v1.48+
    +

    +Locally unsets the first use flag for the given multi-entry. §7.7; 353

    +

    \mglslocalunsetothers{multi-label}glossaries-extra v1.48+
    +

    +Locally unsets the first use flag for the other (not main) elements of the given multi-entry. §7.10; 362

    +

    \Mglslong[options]{multi-label}[insert]modifiers: * + alt-mod glossaries-extra v1.48+
    +

    +As \mglslong but sentence case. §7.11.2; 365

    +

    \mglslong[options]{multi-label}[insert]modifiers: * + alt-mod glossaries-extra v1.48+
    +

    +As \mgls but uses \glsxtrlong for any elements that have the long field set and \glstext otherwise. §7.11.2; 364

    +

    \MGLSmainpl[options]{multi-label}[insert]modifiers: * + alt-mod glossaries-extra v1.48+
    +

    +As \mgls but uses \GLSpl for the main element and \GLS for the others. §7.11.1; 364

    +

    \MGlsmainpl[options]{multi-label}[insert]modifiers: * + alt-mod glossaries-extra v1.48+
    +

    +As \mgls but uses \Glspl for the main entry and \Gls for the others. §7.11.1; 364

    +

    \Mglsmainpl[options]{multi-label}[insert]modifiers: * + alt-mod glossaries-extra v1.48+
    +

    +As \mgls uses sentence case for the first element and the plural form for the main element. §7.11.1; 363

    +

    \mglsmainpl[options]{multi-label}[insert]modifiers: * + alt-mod glossaries-extra v1.48+
    +

    +As \mgls but uses the plural form for the main element. §7.11.1; 363

    +

    \MGlsname[options]{multi-label}[insert]modifiers: * + alt-mod glossaries-extra v1.48+
    +

    +As \mgls but uses \Glsname. §7.11.3; 365

    +

    \Mglsname[options]{multi-label}[insert]modifiers: * + alt-mod glossaries-extra v1.48+
    +

    +As \mgls but uses \Glsname for the first entry and \glsname for the remaining entries. §7.11.3; 365

    +

    \mglsname[options]{multi-label}[insert]modifiers: * + alt-mod glossaries-extra v1.48+
    +

    +As \mgls but uses \glsname. §7.11.3; 365

    +

    \MGLSpl[options]{multi-label}[insert]modifiers: * + alt-mod glossaries-extra v1.48+
    +

    +As \mgls but uses \GLSpl for each element. §7.11.1; 364

    +

    \MGlspl[options]{multi-label}[insert]modifiers: * + alt-mod glossaries-extra v1.48+
    +

    +As \mgls but uses \Glspl for each element. §7.11.1; 364

    +

    \Mglspl[options]{multi-label}[insert]modifiers: * + alt-mod glossaries-extra v1.48+
    +

    +As \mgls but uses \Glspl for the first element and \glspl for the remaining elements. §7.11.1; 363

    +

    \mglspl[options]{multi-label}[insert]modifiers: * + alt-mod glossaries-extra v1.48+
    +

    +As \mgls but uses the plural form for each element. §7.11.1; 363

    +

    +

    +Code used to typeset the multi-entry prefix. §7.3; 340

    +

    \mglsreset{multi-label}glossaries-extra v1.48+
    +

    +Globally resets the first use flag for the given multi-entry. §7.7; 352

    +

    +

    +Resets the first use flag for all multi-entries. §7.7; 353

    +

    \mglsseefirstitem{multi-label}glossaries-extra v1.48+
    +

    +Formatting command used by cross-reference lists for the first item if the item is a multi-entry. §7.12; 369

    +

    \mglsseeitem{multi-label}glossaries-extra v1.48+
    +

    +Formatting command used by cross-reference lists for subsequent items if the item is a multi-entry. §7.12; 369

    +

    \mglsSetMain{multi-label}{new-main-label}glossaries-extra v1.48+
    +

    +Locally changes the main element for the given multi-entry.

    +

    \mglsSetOptions{multi-label}{new-options}glossaries-extra v1.48+
    +

    +Locally sets the options associated with the given multi-entry. §7; 325

    +

    \Mglsshort[options]{multi-label}[insert]modifiers: * + alt-mod glossaries-extra v1.48+
    +

    +As \mglsshort but sentence case. §7.11.2; 365

    +

    \mglsshort[options]{multi-label}[insert]modifiers: * + alt-mod glossaries-extra v1.48+
    +

    +As \mgls but uses \glsxtrshort for any elements that have the short field set and \glstext otherwise. §7.11.2; 364

    +

    +

    +Code used to typeset the multi-entry suffix. §7.3; 341

    +

    \MGlssymbol[options]{multi-label}[insert]modifiers: * + alt-mod glossaries-extra v1.48+
    +

    +As \mgls but uses \glssymbol if the symbol field is set and \Gls otherwise. §7.11.3; 365

    +

    \Mglssymbol[options]{multi-label}[insert]modifiers: * + alt-mod glossaries-extra v1.48+
    +

    +As \mgls but uses \glssymbol if the symbol field is set, otherwise it uses \Gls for the first element and \gls for the remaining elements. §7.11.3; 366

    +

    \mglssymbol[options]{multi-label}[insert]modifiers: * + alt-mod glossaries-extra v1.48+
    +

    +As \mgls but uses \glssymbol if the symbol field is set and \gls otherwise. §7.11.3; 365

    +

    \mglsunset{multi-label}glossaries-extra v1.48+
    +

    +Globally unsets the first use flag for the given multi-entry. §7.7; 352

    +

    +

    +Unsets the first use flag for all multi-entries. §7.7; 353

    +

    \mglsunsetothers{multi-label}glossaries-extra v1.48+
    +

    +Globally unsets the first use flag for the other (not main) elements of the given multi-entry. §7.10; 362

    +

    \mglsusecategoryprefix{category-label}glossaries-extra v1.48+
    +

    +Expands to the prefix assigned to the given multi-entry category or does nothing if no prefix assigned. §7.3; 342

    +

    \mglsusecategorysuffix{category-label}glossaries-extra v1.48+
    +

    +Expands to the suffix assigned to the given multi-entry category or does nothing if no suffix assigned. §7.3; 342

    +

    \MGlsusefield[options]{multi-label}[insert]modifiers: * + alt-mod glossaries-extra v1.48+
    +

    +As \mglsusefield but sentence case for each element. §7.11.3; 366

    +

    \Mglsusefield[options]{multi-label}[insert]modifiers: * + alt-mod glossaries-extra v1.48+
    +

    +As \mglsusefield but sentence case for the first element. §7.11.3; 366

    +

    \mglsusefield[options]{multi-label}[insert]modifiers: * + alt-mod glossaries-extra v1.48+
    +

    +As \mgls but uses \glsdisp if the field identified by \mglsfield exists with the link text obtained from the field value. §7.11.3; 366

    +

    \mglswasfirstuse{true}{false}glossaries-extra v1.48+
    +

    +For use in multi-entry suffix and post-link hooks, this expands to the true if this was the first use of the multi-entry, otherwise to false. §7.6; 350

    +

    \MPGLS[options]{multi-label}[insert]modifiers: * + alt-mod glossaries-extra v1.48+
    +

    +As \mpgls but all caps for the all elements. §7.11.4; 369

    +

    \MPGls[options]{multi-label}[insert]modifiers: * + alt-mod glossaries-extra v1.48+
    +

    +As \mpgls but sentence case for all elements. §7.11.4; 368

    +

    \Mpgls[options]{multi-label}[insert]modifiers: * + alt-mod glossaries-extra v1.48+
    +

    +As \mpgls but sentence case for the first element. §7.11.4; 368

    +

    \mpgls[options]{multi-label}[insert]modifiers: * + alt-mod glossaries-extra v1.48+
    +

    +As \mgls but uses \pgls for the first element. §7.11.4; 367

    +

    \MPGLSmainpl[options]{multi-label}[insert]modifiers: * + alt-mod glossaries-extra v1.48+
    +

    +As \mpglsmainpl but all caps for the all elements. §7.11.4; 369

    +

    \MPGlsmainpl[options]{multi-label}[insert]modifiers: * + alt-mod glossaries-extra v1.48+
    +

    +As \mpglsmainpl but sentence case for all elements. §7.11.4; 368

    +

    \Mpglsmainpl[options]{multi-label}[insert]modifiers: * + alt-mod glossaries-extra v1.48+
    +

    +As \mpglspl but sentence case for the first element. §7.11.4; 368

    +

    \mpglsmainpl[options]{multi-label}[insert]modifiers: * + alt-mod glossaries-extra v1.48+
    +

    +As \mgls but uses \pglspl for the first element if its the main element otherwise \pgls and, for the remaining elements, uses \glspl if the element is the main entry or \gls otherwise. §7.11.4; 368

    +

    \MPGLSpl[options]{multi-label}[insert]modifiers: * + alt-mod glossaries-extra v1.48+
    +

    +As \mpglspl but all caps for the all elements. §7.11.4; 369

    +

    \MPGlspl[options]{multi-label}[insert]modifiers: * + alt-mod glossaries-extra v1.48+
    +

    +As \mpglspl but sentence case for all elements. §7.11.4; 368

    +

    \mpglspl[options]{multi-label}[insert]modifiers: * + alt-mod glossaries-extra v1.48+
    +

    +As \mgls but uses \pglspl for the first element and \glspl for the remaining elements. §7.11.4; 368

    +

    +

    +Issues a warning with \GlossariesExtraWarning indicating that glossaries-prefix is required for \mpgls family of commands. §7.11.4; 367

    +

    +

    +Defined with \providecommand, this just does \mathrm{M}. §11.5.8; 573

    +

    \multiglossaryentry[options]{multi-label}[main-label]{entry-label-list}glossaries-extra v1.48+
    +

    +Defines a multi-entry set with the label multi-label, consisting of the entries whose labels are listed in entry-label-list, where the main entry (which must be present in entry-label-list) is identified by main-label (or the final element in entry-label-list, if main-label is omitted). §7; 323

    +

    +

    +Sets \ifmultiglossaryentryglobal to false. §7; 325

    +

    +

    +Sets \ifmultiglossaryentryglobal to true. §7; 324

    +

    +

    +Specifies a general set of options to apply to all multi-entries. §7.9; 354

    + +

    + +
    +

    N

    +
    \newabbr[options]{entry-label}{short}{long}
    +

    +A synonym for \newabbreviation defined by the shortcuts=abbreviations or shortcuts=ac package option. §4.3.2; Table 4.1

    +

    \newabbreviation[options]{entry-label}{short}{long}
    +

    +Defines a new entry that represents an abbreviation. This internally uses \newglossaryentry and any provided options (glossary entry keys) will be appended. The category is set to abbreviation by default, but may be overridden in options. The appropriate style should be set before the abbreviation is defined with \setabbreviationstyle. §4.1; 41

    +

    +

    +Hook provided within \newabbreviation just before the entry is defined. §4.1.5; 45

    +

    \newabbreviationstyle{style-name}{setup}{display definitions}
    +

    +Defines an abbreviation style, which can be set with \setabbreviationstyle. §4.5.3; 161

    +

    \newacronym[options]{entry-label}{short}{long}glossaries
    +

    +This command is provided by the base glossaries package but is redefined by glossaries-extra to use \newabbreviation with the category key set to acronym. The appropriate style should be set before the abbreviation is defined with \setabbreviationstyle[acronym]{style}. You can override the category in options but remember to change the optional argument of \setabbreviationstyle to match.

    +

    🛇\newacronymstyle{name}{format def}{display defs}glossaries v4.02+
    +

    +Defines an acronym style for use with the base glossaries package’s acronym mechanism. These styles are not compatible with glossaries-extra. Use \newabbreviationstyle instead.

    +

    \newdglsfield[default-options]{field}{cs}glossaries-extra-bib2gls v1.49+
    +

    +Defines the command cs[options]{entry-label} to behave like \dglsfield[default-options,options]{entry-label}{field}. §11.5.7; 566

    +

    \newdglsfieldlike[default-options]{field}{cs}{Cs}{CS}glossaries-extra-bib2gls v1.49+
    +

    +Similar to \newdglsfield but also defines sentence case (Cs) and all caps (CS) commands with mappings. §11.5.7; 566

    +

    \newentry{entry-label}{options}
    +

    +A synonym for \newglossaryentry defined by the shortcuts=other package option. §2.4; 18

    +

    \newglossary[log-ext]{glossary-label}{in-ext}{out-ext}{title}[counter]glossaries
    +

    +Defines a glossary identified by glossary-label (which can be referenced by the type key when defining an entry). The title will be used when displaying the glossary (using commands like \printglossary), but this title can be overridden by the title option. The optional counter indicates which counter should be used by default for the location when indexing any entries that have been assigned to this glossary. (This can be overridden by the counter option.) The other arguments are file extensions for use with makeindex or xindy. These arguments aren’t relevant for other indexing options (in which case, you may prefer to use \newglossary*).

    +

    \newglossary*{glossary-label}{title}[counter]glossaries v4.08+
    +

    +A shortcut that supplies file extensions based on the glossary label:

    \newglossary[glossary-label-glg]{glossary-label}{glossary-label-gls}{glossary-label-glo}{title}[counter]

    +

    \newglossaryentry{entry-label}{key=value list}glossaries
    +

    +Defines a new glossary entry with the given label. The second argument is a comma-separated list of glossary entry keys.

    +

    \newignoredglossary{glossary-label}glossaries v4.08+
    +

    +Defines a glossary that should be ignored by iterative commands, such as \printglossaries. This glossary has no associated indexing files and has hyperlinks disabled. You can use an ignored glossary for common terms or abbreviations that don’t need to be included in any listing (but you may want these terms defined as entries to allow automated formatting with the \gls-like commands). An ignored glossary can’t be displayed with \printglossary but may be displayed with the “unsrt” family of commands, such as \printunsrtglossary.

    +

    \newignoredglossary*{glossary-label}glossaries-extra v1.11+
    +

    +This is like the unstarred \newignoredglossary but doesn’t disable hyperlinks. You will need to ensure that the hypertargets are defined. For example, with \printunsrtglossary or through standalone entrys. §8; 375

    +

    \newnum[key=value list]{entry-label}{num}
    +

    +A synonym for \glsxtrnewnumber defined by the shortcuts=other package option (provided the numbers option is also used). §2.4; 19

    +

    \newsym[key=value list]{entry-label}{sym}
    +

    +A synonym for \glsxtrnewsymbol defined by the shortcuts=other package option (provided the symbols option is also used). §2.4; 18

    +

    \newterm[key=value list]{entry-label}glossaries v4.02+

    +

    (requires index package option)
    +
    +

    +Defines a new glossary entry with the given label, type set to index, the name set to entry-label and the description set to \nopostdesc. The optional argument is a comma-separated list of glossary entry keys, which can be used to override the defaults. §2.1; 12

    +

    \nopostdescglossaries v1.17+
    +

    +When placed at the end of the description, this switches off the post-description hook (including the post-description punctuation). Does nothing outside of the glossary.

    +

    +

    +Defined with \providecommand, this just does \mathrm{N}. §11.5.8; 573

    + +

    + +
    +

    O

    + +

    +Defined with \providecommand, this just does \mathrm{O}. §11.5.8; 573

    +

    +

    +Defined with \providecommand, this just does \mathrm{O}. §11.5.8; 573

    + +

    + +
    +

    P

    +
    \pagelistnameinitial: Page List; glossaries

    +

    (language-sensitive)
    +
    +

    +Expands to the title of the location list column for headed tabular-like styles.

    +

    \PGLS[options]{entry-label}[insert]modifiers: * + alt-mod glossaries-prefix
    +

    +As \pgls but all caps.

    +

    \Pgls[options]{entry-label}[insert]modifiers: * + alt-mod glossaries-prefix
    +

    +As \pgls but sentence case.

    +

    \pgls[options]{entry-label}[insert]modifiers: * + alt-mod glossaries-prefix
    +

    +Similar to \gls but inserts the appropriate prefix, if provided.

    +

    \PGLSfmtlong[options]{entry-label}[insert]modifiers: * + alt-mod glossaries-extra v1.49+

    +

    +
    +

    +As \pglsfmtlong but all caps. §5.3.2; 209

    +

    \Pglsfmtlong[options]{entry-label}[insert]modifiers: * + alt-mod glossaries-extra v1.49+

    +

    +
    +

    +As \pglsfmtlong but sentence case. §5.3.2; 209

    +

    \pglsfmtlong[options]{entry-label}[insert]modifiers: * + alt-mod glossaries-extra v1.49+
    +

    +As \glsfmtlong but inserts the prefixfirst field and separator in front if set. §5.3.2; 209

    +

    \PGLSfmtlongpl[options]{entry-label}[insert]modifiers: * + alt-mod glossaries-extra v1.49+

    +

    +
    +

    +As \pglsfmtlongpl but all caps. §5.3.2; 210

    +

    \Pglsfmtlongpl[options]{entry-label}[insert]modifiers: * + alt-mod glossaries-extra v1.49+

    +

    +
    +

    +As \pglsfmtlongpl but sentence case. §5.3.2; 210

    +

    \pglsfmtlongpl[options]{entry-label}[insert]modifiers: * + alt-mod glossaries-extra v1.49+

    +

    +
    +

    +As \glsfmtlongpl but inserts the prefixfirstplural field and separator in front if set. §5.3.2; 210

    +

    \PGLSfmtshort[options]{entry-label}[insert]modifiers: * + alt-mod glossaries-extra v1.49+

    +

    +
    +

    +As \pglsfmtshort but all caps. §5.3.2; 207

    +

    \Pglsfmtshort[options]{entry-label}[insert]modifiers: * + alt-mod glossaries-extra v1.49+

    +

    +
    +

    +As \pglsfmtshort but sentence case. §5.3.2; 207

    +

    \pglsfmtshort[options]{entry-label}[insert]modifiers: * + alt-mod glossaries-extra v1.49+

    +

    +
    +

    +As \glsfmtshort but inserts the prefix field and separator in front if set. §5.3.2; 207

    +

    \PGLSfmtshortpl[options]{entry-label}[insert]modifiers: * + alt-mod glossaries-extra v1.49+

    +

    +
    +

    +As \pglsfmtshortpl but all caps. §5.3.2; 208

    +

    \Pglsfmtshortpl[options]{entry-label}[insert]modifiers: * + alt-mod glossaries-extra v1.49+

    +

    +
    +

    +As \pglsfmtshortpl but sentence case. §5.3.2; 208

    +

    \pglsfmtshortpl[options]{entry-label}[insert]modifiers: * + alt-mod glossaries-extra v1.49+

    +

    +
    +

    +As \glsfmtshortpl but inserts the prefixplural field and separator in front if set. §5.3.2; 208

    +

    \PGLSpl[options]{entry-label}[insert]modifiers: * + alt-mod glossaries-prefix
    +

    +As \pgls but all caps.

    +

    \Pglspl[options]{entry-label}[insert]modifiers: * + alt-mod glossaries-prefix
    +

    +As \pgls but sentence case.

    +

    \pglspl[options]{entry-label}[insert]modifiers: * + alt-mod glossaries-prefix
    +

    +Similar to \glspl but inserts the appropriate prefix, if provided.

    +

    \PGLSxtrlong[options]{entry-label}[insert]modifiers: * + alt-mod glossaries-extra v1.49+

    +

    +
    +

    +As \pglsxtrlong but all caps. §4.3.1; 56

    +

    \Pglsxtrlong[options]{entry-label}[insert]modifiers: * + alt-mod glossaries-extra v1.49+

    +

    +
    +

    +As \pglsxtrlong but sentence case. §4.3.1; 56

    +

    \pglsxtrlong[options]{entry-label}[insert]modifiers: * + alt-mod glossaries-extra v1.49+

    +

    +
    +

    +As \glsxtrlong but inserts the prefixfirst field and separator in front if set. §4.3.1; 55

    +

    \PGLSxtrlongpl[options]{entry-label}[insert]modifiers: * + alt-mod glossaries-extra v1.49+

    +

    +
    +

    +As \pglsxtrlongpl but all caps. §4.3.1; 56

    +

    \Pglsxtrlongpl[options]{entry-label}[insert]modifiers: * + alt-mod glossaries-extra v1.49+

    +

    +
    +

    +As \pglsxtrlongpl but sentence case. §4.3.1; 56

    +

    \pglsxtrlongpl[options]{entry-label}[insert]modifiers: * + alt-mod glossaries-extra v1.49+

    +

    +
    +

    +As \glsxtrlongpl but inserts the prefixfirstplural field and separator in front if set. §4.3.1; 56

    +

    \PGLSxtrshort[options]{entry-label}[insert]modifiers: * + alt-mod glossaries-extra v1.49+

    +

    +
    +

    +As \pglsxtrshort but all caps. §4.3.1; 55

    +

    \Pglsxtrshort[options]{entry-label}[insert]modifiers: * + alt-mod glossaries-extra v1.49+

    +

    +
    +

    +As \pglsxtrshort but sentence case. §4.3.1; 55

    +

    \pglsxtrshort[options]{entry-label}[insert]modifiers: * + alt-mod glossaries-extra v1.49+

    +

    +
    +

    +As \glsxtrshort but inserts the prefix field and separator in front if set. §4.3.1; 55

    +

    \PGLSxtrshortpl[options]{entry-label}[insert]modifiers: * + alt-mod glossaries-extra v1.49+

    +

    +
    +

    +As \pglsxtrshortpl but all caps. §4.3.1; 55

    +

    \Pglsxtrshortpl[options]{entry-label}[insert]modifiers: * + alt-mod glossaries-extra v1.49+

    +

    +
    +

    +As \pglsxtrshortpl but sentence case. §4.3.1; 55

    +

    \pglsxtrshortpl[options]{entry-label}[insert]modifiers: * + alt-mod glossaries-extra v1.49+

    +

    +
    +

    +As \glsxtrshortpl but inserts the prefixplural field and separator in front if set. §4.3.1; 55

    +

    \Pglsxtrtitlelong{entry-label}glossaries-extra v1.49+

    +

    +
    +

    +The normal behaviour of \Pglsfmtlong. §5.3.3; 219

    +

    \Pglsxtrtitlelongpl{entry-label}glossaries-extra v1.49+

    +

    +
    +

    +The normal behaviour of \Pglsfmtlongpl. §5.3.3; 219

    +

    \Pglsxtrtitleshort{entry-label}glossaries-extra v1.49+

    +

    +
    +

    +The normal behaviour of \Pglsfmtshort. §5.3.3; 219

    +

    \Pglsxtrtitleshortpl{entry-label}glossaries-extra v1.49+

    +

    +
    +

    +The normal behaviour of \Pglsfmtshortpl. §5.3.3; 219

    +

    \pretoglossarypreamble[type]{text}glossaries-extra v1.12+
    +

    +Prepends (locally) text to the preamble for the glossary identified by type. If type is omitted, \glsdefaulttype is assumed. §8.2; 377

    +

    \printabbreviations[options]

    +

    (requires \usepackage[abbreviations]{glossaries-extra})
    +
    +

    +Shortcut for \printglossary[type=\glsxtrabbrvtype]. §2.1; 9

    +

    \printacronyms[options]glossaries

    +

    (requires the acronyms package option)
    +
    +

    +Shortcut for \printglossary[type=\acronymtype].

    +

    \printglossariesglossaries
    +

    +Iterates over all non-ignored glossaries and does \printglossary[type=type] for each glossary.

    +

    \printglossary[options]glossaries
    +

    +Displays the glossary by inputting a file created by makeindex or xindy. Must be used with \makeglossaries and either makeindex or xindy.

    +

    \printindex[options] v4.02+

    +

    (requires the index package option)
    +
    +

    +Shortcut provided by the index package option that simply does \printglossary[type=index].

    +

    \printnoidxglossariesglossaries v4.04+
    +

    +Iterates over all non-ignored glossaries and does \printnoidxglossary[type=type] for each glossary.

    +

    \printnoidxglossary[options]glossaries v4.04+
    +

    +Displays the glossary by obtaining the indexing information from the aux file and using TeX to sort and collate. Must be used with \makenoidxglossaries or with the glossaries not identified in the optional argument of \makeglossaries when using the hybrid method. This method can be very slow and has limitations.

    +

    \printnumbers[options]glossaries v4.02+

    +

    (requires the numbers package option)
    +
    +

    +Shortcut for \printglossary[type=numbers].

    +

    \printsymbols[options]glossaries v4.02+

    +

    (requires the symbols package option)
    +
    +

    +Shortcut for \printglossary[type=symbols].

    +

    \printunsrtabbreviations[options]glossaries-extra-bib2gls v1.40+

    +

    (requires \usepackage[abbreviations,record]{glossaries-extra})
    +
    +

    +Shortcut for \printunsrtglossary[type=\glsxtrabbrvtype]. §11.5.1; 534

    +

    \printunsrtacronyms[options]glossaries-extra-bib2gls v1.40+

    +

    (requires \usepackage[acronyms,record]{glossaries-extra})
    +
    +

    +Shortcut for \printunsrtglossary[type=\acronymtype]. §11.5.1; 534

    +

    +

    +Iterates over all non-ignored glossaries and does \printunsrtglossary[type=type] for each glossary. §8.4; 383

    +

    +

    +Displays the glossary by iterating over all entries associated with the given glossary (in the order in which they were added to the glossary). Group headers will only be inserted if the group key has been defined and has been set (typically with the record option and bib2gls). Location lists will only be shown if the location or loclist fields have been set (typically by bib2gls). §8.4; 382

    +

    \printunsrtglossary*[options]{init-code}glossaries-extra v1.12+
    +

    +Does {init-code\printunsrtglossary[options]} which localises init-code. §8.4; 383

    +

    +

    +Hook used within the “unsrt” family of commands while the glossary is being constructed. §8.4.3; 401

    +

    +

    +Used within the “unsrt” family of commands to process the current entry. §8.4.3; 402

    +

    +

    +Hook performed by the “unsrt” family of commands just before the glossary body is displayed. §8.4.3; 401

    +

    +

    +May be used within \printunsrtglossaryentryprocesshook to skip the current entry. §8.4.3; 401

    +

    \printunsrtglossaryunit[options]{counter-name}glossaries-extra v1.12+
    +

    +Provided for use with \GlsXtrRecordCounter to display a glossary with \printunsrtglossary* that filters entries that don’t have a match for the current counter-name value. §8.4.3.2; 408

    +

    +

    +The vertical space at the end of the glossary appended by \printunsrtglossaryunit. §8.4.3.2; 409

    +

    +

    +Sets up the filtering used by \printunsrtglossaryunit. §8.4.3.2; 409

    +

    \printunsrtindex[options]glossaries-extra-bib2gls v1.40+

    +

    (requires \usepackage[index,record]{glossaries-extra})
    +
    +

    +Shortcut provided by the index package option combined with glossaries-extra-bib2gls that simply does \printunsrtglossary[type=index]. §11.5.1; 535

    +

    \printunsrtinnerglossary[options]{pre-code}{post-code}glossaries-extra v1.44+
    +

    +Similar to \printunsrtglossary but doesn’t contain the code that starts and ends the glossary (such as beginning and ending the theglossary environment), so this command needs to be either placed inside printunsrtglossarywrap or in the \printunsrtglossary entry handler \printunsrtglossaryhandler. §8.4.3.1; 403

    +

    \printunsrtnumbers[options]glossaries-extra-bib2gls v1.40+

    +

    (requires \usepackage[numbers,record]{glossaries-extra})
    +
    +

    +Shortcut provided by the numbers package option combined with glossaries-extra-bib2gls that simply does \printunsrtglossary[type=numbers]. §11.5.1; 534

    +

    \printunsrtsymbols[options]glossaries-extra-bib2gls v1.40+

    +

    (requires \usepackage[symbols,record]{glossaries-extra})
    +
    +

    +Shortcut for \printunsrtglossary[type=symbols]. §11.5.1; 534

    +

    \printunsrttable[options]glossary-table v1.49+
    +

    +Internally uses \printunsrtglossary with the table style. §8.7.4; 468

    +

    \provideignoredglossary{glossary-label}modifier: * glossaries-extra v1.12+
    +

    +As \newignoredglossary but does nothing if the glossary has already been defined. §8; 376

    +

    \providemultiglossaryentry[options]{multi-label}[main-label]{entry-label-list}glossaries-extra v1.48+
    +

    +As \multiglossaryentry but does nothing if a multi-entry set has already been defined with the given label. §7; 324

    +

    +

    +Should be placed at the start of a glossaries-extra ldf file. §15; 593

    + +

    + +
    +

    R

    +
    \renewabbreviationstyle{style-name}{setup}{display definitions}glossaries-extra v1.04+
    +

    +Redefines an abbreviation style. §4.5.3; 161

    +

    \RequireGlossariesExtraLang{tag}
    +

    +Indicates that a glossaries-extra ldf file should be input, if it hasn’t already been input.

    +

    +

    +Restores \newacronym to the base glossaries mechanism. Not recommended. §4.6; 181

    +

    \rGLS[options]{entry-label}[insert]modifiers: * + alt-mod glossaries-extra v1.21+
    +

    +Like \GLS but hooks into the entry’s record count. §11.4; 526

    +

    \rGls[options]{entry-label}[insert]modifiers: * + alt-mod glossaries-extra v1.21+
    +

    +Like \Gls but hooks into the entry’s record count. §11.4; 526

    +

    \rgls[options]{entry-label}[insert]modifiers: * + alt-mod glossaries-extra v1.21+
    +

    +Like \gls but hooks into the entry’s record count. §11.4; 525

    +

    \rGLSformat{entry-label}{insert}glossaries-extra v1.21+
    +

    +Format used by \rGLS if the entry’s record count is more than the given trigger value. §11.4; 526

    +

    \rGlsformat{entry-label}{insert}glossaries-extra v1.21+
    +

    +Format used by \rGls if the entry’s record count is more than the given trigger value. §11.4; 526

    +

    \rglsformat{entry-label}{insert}glossaries-extra v1.21+
    +

    +Format used by \rgls if the entry’s record count is more than the given trigger value. §11.4; 525

    +

    \rGLSpl[options]{entry-label}[insert]modifiers: * + alt-mod glossaries-extra v1.21+
    +

    +Like \GLSpl but hooks into the entry’s record count. §11.4; 526

    +

    \rGlspl[options]{entry-label}[insert]modifiers: * + alt-mod glossaries-extra v1.21+
    +

    +Like \Glspl but hooks into the entry’s record count. §11.4; 526

    +

    \rglspl[options]{entry-label}[insert]modifiers: * + alt-mod glossaries-extra v1.21+
    +

    +Like \glspl but hooks into the entry’s record count. §11.4; 525

    +

    \rGLSplformat{entry-label}{insert}glossaries-extra v1.21+
    +

    +Format used by \rGLSpl if the entry’s record count is more than the given trigger value. §11.4; 526

    +

    \rGlsplformat{entry-label}{insert}glossaries-extra v1.21+
    +

    +Format used by \rGlspl if the entry’s record count is more than the given trigger value. §11.4; 526

    +

    \rglsplformat{entry-label}{insert}glossaries-extra v1.21+
    +

    +Format used by \rglspl if the entry’s record count is more than the given trigger value. §11.4; 525

    +

    +

    +Defined with \providecommand, this just does \mathrm{P}. §11.5.8; 573

    + +

    + +
    +

    S

    +
    \seealsonameinitial: see also; glossaries-extra v1.16+

    +

    (language-sensitive)
    +
    +

    +Used as a cross-reference tag. The default value is \alsoname, if that command has been defined, or “see also”.

    +

    \seenameinitial: see

    +

    (language-sensitive)
    +
    +

    +Used as a cross-reference tag (provided by glossaries if not already defined).

    +

    \setabbreviationstyle[category]{style-name}
    +

    +Sets the current abbreviation style to style-name for the category identified by category. If the optional argument is omitted, abbreviation is assumed. §4.5; 59

    +

    🛇\setacronymstyle{acronym-style-name}glossaries v4.02+
    +

    +Sets the style for the base glossaries package’s acronym mechanism. These styles are not compatible with glossaries-extra, which redefines \newacronym to use \newabbreviation. Use:

    \setabbreviationstyle[acronym]{abbreviation-style-name} 
    with the closest matching abbreviation style instead.

    +

    \setentrycounter[prefix]{counter}glossaries
    +

    +Used to set the location counter and prefix required for \glshypernumber.

    +

    \setglossarypreamble[type]{text}glossaries v3.07+
    +

    +Globally sets the preamble for the glossary identified by type to text. If type is omitted, \glsdefaulttype is assumed.

    +

    \setglossarystyle{style-name}glossaries v3.08a+
    +

    +Set the current glossary style to style-name. Redefined by glossaries-extra to include \glsxtrpreglossarystyle.

    +

    \setupglossaries{options}glossaries v3.11a+
    +

    +Change allowed options that are defined by the base glossaries package. Note that some options can only be passed as package options. To change options defined or modified by the glossaries-extra package, use \glossariesextrasetup. §2; 9

    +

    \setupglsadd{options}glossaries-extra v1.49+
    +

    +Set the default options for \glsadd. §5.1.1; 190

    +

    \setupglslink{options}glossaries-extra v1.49+
    +

    +Set the default \glslink options. §5.1.1; 190

    +

    \subglossentry{level}{entry label}{location list}glossaries v3.08+
    +

    +Used to format a child entry. This command should be redefined by the glossary style.

    +

    \symbolnameinitial: Symbol; glossaries

    +

    (language-sensitive)
    +
    +

    +Expands to the title of the symbol column for headed tabular-like styles.

    + +

    + +
    +

    T

    + +

    +Defined with \providecommand, this just does \mathrm{T}. §11.5.8; 573

    +

    \theglossaryentryglossaries v3.0+
    +

    +The value of the glossaryentry counter.

    + +

    + +
    +

    U

    +
    \uhex
    +

    +Recognised by bib2gls within some resource options as identifying the Unicode character given by hex. Since \u is defined by the LaTeX kernel, you need to protect it from expansion while the options are written to the aux file (\string\uhex).

    +

    +

    +Defined with \providecommand and only if upgreek has been loaded, this just does \mathrm{A}. §11.5.8; 573

    +

    +

    +Defined with \providecommand and only if upgreek has been loaded, this just does \mathrm{B}. §11.5.8; 573

    +

    +

    +Defined with \providecommand and only if upgreek has been loaded, this just does \mathrm{X}. §11.5.8; 573

    +

    +

    +Defined with \providecommand and only if upgreek has been loaded, this just does \mathrm{E}. §11.5.8; 573

    +

    +

    +Defined with \providecommand and only if upgreek has been loaded, this just does \mathrm{H}. §11.5.8; 573

    +

    +

    +Defined with \providecommand and only if upgreek has been loaded, this just does \mathrm{I}. §11.5.8; 573

    +

    +

    +Defined with \providecommand and only if upgreek has been loaded, this just does \mathrm{K}. §11.5.8; 573

    +

    +

    +Defined with \providecommand and only if upgreek has been loaded, this just does \mathrm{M}. §11.5.8; 573

    +

    +

    +Defined with \providecommand and only if upgreek has been loaded, this just does \mathrm{N}. §11.5.8; 573

    +

    +

    +Defined with \providecommand and only if upgreek has been loaded, this just does \mathrm{O}. §11.5.8; 573

    +

    +

    +Defined with \providecommand and only if upgreek has been loaded, this just does \mathrm{o}. §11.5.8; 573

    +

    +

    +Defined with \providecommand and only if upgreek has been loaded, this just does \mathrm{P}. §11.5.8; 573

    +

    +

    +Defined with \providecommand and only if upgreek has been loaded, this just does \mathrm{T}. §11.5.8; 573

    +

    +

    +Defined with \providecommand and only if upgreek has been loaded, this just does \mathrm{Z}. §11.5.8; 573

    + +

    + +
    +

    W

    +
    \writemultiglossentry{options}{multi-label}{main-label}{list}glossaries-extra v1.48+
    +

    +Writes multi-entry information to the aux file. §7.13; 371

    + +

    + +
    +

    X

    +
    \xcapitalisefmtwords{text}mfirstuc v2.03+
    +

    +Passes the argument to \capitalisefmtwords but with the first token in text expanded. The starred version uses the starred version of \capitalisefmtwords.

    +

    \xglssetwidest[level]{name}glossaries-extra-stylemods v1.05+
    +

    +As \eglssetwidest but global. §8.6.5.4; 434

    +

    \xglsupdatewidest[level]{name}glossaries-extra-stylemods v1.23+
    +

    +As \eglsupdatewidest but global. §8.6.5.4; 434

    +

    \xGlsXtrIfValueInFieldCsvList{entry-label}{field-label}{value}{true}{false}modifier: * glossaries-extra v1.47+
    +

    +As \GlsXtrIfValueInFieldCsvList but fully expands value. §5.13; 304

    +

    \xGlsXtrSetField{entry-label}{field-label}{value}glossaries-extra v1.12+
    +

    +As \GlsXtrSetField but expands the value and uses a global assignment. §3.5; 40

    +

    +

    +Expands to the footnote code required for styles like short-postfootnote. §4.5.2; 160

    +

    +

    +Used within the post-link hook for the short-hyphen-postlong-hyphen style on first use. This expands the placeholder commands and uses either \glsxtrposthyphenlong or \GLSxtrposthyphenlong. 152

    +

    +

    +Used within the post-link hook for the long-hyphen-postshort-hyphen style on first use. This expands the placeholder commands and uses either \glsxtrposthyphenshort or \GLSxtrposthyphenshort. 150

    +

    +

    +Used within the post-link hook for the long-hyphen-postshort-hyphen style on subsequent use. This expands the placeholder commands and uses either \glsxtrposthyphensubsequent or \GLSxtrposthyphensubsequent. 151

    + +

    + +
    +

    Z

    + +

    +Defined with \providecommand, this just does \mathrm{Z}. §11.5.8; 573

    + +

    + +
    +

    Environment Summary

    + +

    +Sets up the start and end of the glossary (including beginning and ending the theglossary environment). Use \printunsrtinnerglossary within the body for each block of entries. §8.4.3.1; 404

    +

    \begin{theglossary}glossaries
    +

    +Redefined by glossary styles to set up the way the glossary is displayed. For example, to start and end the description environment for the list styles.

    + +

    + +
    +

    Package Option Summary

    +
    \usepackage[options]{glossaries-extra-stylemods}

    +

    (or \usepackage[stylemods=options]{glossaries-extra})
    +
    +

    +Modifies the glossary styles supplied with the base glossaries package to make them more flexible and to integrate support for features provided by glossaries-extra or bib2gls.

    +

    all𝍢
    +

    +Load all predefined styles.

    +

    name𝍢
    +

    +Load package glossary-name.

    +

    \usepackage[options]{glossaries-extra}
    +

    +Extension package that loads glossaries, provides additional commands, and modifies some of the base glossaries commands to integrate them with the new commands or to make them more flexible. §2; 8

    +

    +

    +Provides a new glossary with the label abbreviations and title given by \abbreviationsname, redefines \glsxtrabbrvtype to abbreviations, redefines \acronymtype to \glsxtrabbrvtype (unless the acronym or acronyms option has been used), and provides \printabbreviations. §2.1; 9

    +

    +

    +Loads glossaries-accsupp. §2.3; 14

    +

    autoseeindex=booleandefault: true; initial: true 🔘
    +

    +Indicates whether or not to enable automatic indexing of see and seealso fields. §2.4; 21

    +

    autoseeindex=false
    +

    +Disables automatic indexing of see and seealso fields. 22

    +

    autoseeindex=true
    +

    +Enables automatic indexing of see and seealso fields. 22

    +

    bibglsaux=basenameinitial: empty 🎚glossaries-extra v1.49+

    +

    (requires bib2gls v3.0+)
    +
    +

    +If set, an additional aux file called basename.aux will be created in which to store the bib2gls records. This file will be skipped by LaTeX when the main aux file is input but will be read by bib2gls. §2.4; 26

    +

    debug=valuedefault: true; initial: false 🎚
    +

    +Provides debugging information. Some options are also available with just the base glossaries package. §2.5; 28

    +

    debug=allglossaries-extra v1.21+
    +

    +Implements all debugging options. 29

    +

    debug=falseglossaries v4.24+
    +

    +Disable debugging actions. 28

    +

    +

    +Implements debug=true and also shows accessibility information in the document. 28

    +

    +

    +Implements debug=true and also shows target markers in the document. 29

    +

    +

    +Implements debug=true and also shows a marker in the document whenever the entry is indexed and (if used with indexcounter) will mark where the wrglossary counter is incremented. 29

    +

    debug=trueglossaries v4.24+
    +

    +Writes wrglossary(type)(indexing info) to the log file if there is an attempt to index an entry before the associated indexing file has been opened (makeindex and xindy only). With glossaries-extra, this setting will also display the label of any undefined entries that are referenced in the document. 28

    +

    docdef=valuedefault: true; initial: false 🎚
    +

    +Determines whether or not \newglossaryentry is permitted in the document environment. §2.4; 16

    +

    docdef=atom
    +

    +As restricted but creates the glsdefs file for atom’s autocomplete support. 17

    +

    docdef=false
    +

    +Don’t allow \newglossaryentry in the document environment. 16

    +

    docdef=restricted
    +

    +Allow \newglossaryentry in the document environment, but only before any glossaries. 17

    +

    docdef=true
    +

    +Allow \newglossaryentry in the document environment if the base glossaries package would allow it. 16

    +

    equations=booleandefault: true; initial: false 🔘︎
    +

    +Automatically switch the location counter to equation when inside a numbered equation environment. §2.4; 26

    +

    floats=booleandefault: true; initial: false 🔘︎
    +

    +Automatically switch the location counter to the corresponding counter when inside a floating environment. §2.4; 27

    +

    +

    +Defines the index counter wrglossary and implements counter=wrglossary. §2.4; 27

    +

    indexcrossrefs=booleandefault: true; initial: varies 🔘︎
    +

    +Indicates whether or not to enable automatic indexing of cross-referenced entries. §2.4; 20

    +

    indexcrossrefs=false
    +

    +Disables automatic indexing of cross-referenced entries. 21

    +

    indexcrossrefs=true
    +

    +Enables automatic indexing of cross-referenced entries. 21

    +

    nomissingglstext=booleandefault: true; initial: false 🔘︎
    +

    +Determines whether or not to display warning text if the external glossary file hasn’t been generated due to an incomplete build. §2.1; 9

    +

    +

    +A shortcut for nopostdot=false. §2.2; 12

    +

    postpunc=value🎚glossaries-extra v1.21+
    +

    +An alternative to postdot, this can be used to insert a different punctuation character after the description. §2.2; 12

    +

    postpunc=comma
    +

    +Inserts a comma after the description. 13

    +

    postpunc=dot
    +

    +Equivalent to postdot or nopostdot=false. 13

    +

    postpunc=none
    +

    +Switches off automatic post-description punctuation insertion. 13

    +

    postpunc=punctuation
    +

    +Inserts punctuation after the description.

    +

    +

    +Loads glossaries-prefix. §2.3; 14

    +

    record=valuedefault: only; initial: off 🎚
    +

    +Indicates whether or not bib2gls is being used (in which case entry indexing is performed by adding bib2gls records in the aux file). §2.4; 23

    +

    record=alsoindexalias: hybrid🗑
    +

    + 25

    +

    record=hybrid
    +

    +Performs a mixture of bib2gls records in the aux file (to select entries from a bib file) and makeindex/xindy indexing in their associated files. The actual sorting and collation is performed by the indexing application, so sort=none and save-locations=false should be used in \GlsXtrLoadResources (because it’s redundant to make bib2gls sort and collate as well). This setting should be used with \makeglossaries before \GlsXtrLoadResources and glossaries should be displayed with \printglossary (or \printglossaries). There’s little point in using this setting unless you have a custom xindy module that you can’t convert to an equivalent set of bib2gls options. 2525

    +

    record=nameref
    +

    +Entry indexing is performed by adding bib2gls nameref records in the aux file. Glossaries should be displayed with the “unsrt” family of commands. 24

    +

    record=off
    +

    +Entry indexing is performed as per the base glossaries package, using either \makeglossaries or \makenoidxglossaries. 23

    +

    record=only
    +

    +Entry indexing is performed by adding bib2gls records in the aux file. Glossaries should be displayed with the “unsrt” family of commands. 24

    +

    shortcuts={value}initial: none 🎚
    +

    +Defines various shortcut commands (boolean only with just the base glossaries package). §2.4; 17

    +

    shortcuts=abbralias: abbreviations
    +

    + 18

    +

    shortcuts=abbreviations
    +

    +Implements the abbreviation shortcuts. 1818

    +

    shortcuts=abother
    +

    +Implements shortcuts=abbreviations and shortcuts=other. 19

    +

    shortcuts=ac
    +

    +Implements the acronym shortcuts that are compatible with \newabbreviation. 18

    +

    shortcuts=acother
    +

    +Implements shortcuts=ac and shortcuts=other. 19

    +

    shortcuts=acroalias: acronyms
    +

    + 19

    +

    shortcuts=acronyms
    +

    +Implements the acronym shortcuts. Don’t use this option unless you have reverted \newacronym back to the base glossaries package’s acronym mechanism. 1919

    +

    shortcuts=all
    +

    +Implements shortcuts=ac, shortcuts=abbreviations, shortcuts=other. 19, 1920

    +

    shortcuts=falsealias: all
    +

    + 20

    +

    shortcuts=none
    +

    +Don’t define any shortcut commands.

    +

    shortcuts=other
    +

    +Implements the shortcuts \newentry, \newsym and \newnum. 18

    +

    shortcuts=truealias: all
    +

    + 19

    +

    +

    +Implements debug=showtargets. §2.5; 29

    +

    showtargets=annoteleft
    +

    +Markers are placed on either side of the link/target with the annotation on the left in all modes. 31

    +

    showtargets=annoteright
    +

    +Markers are placed on either side of the link/target with the annotation on the right in all modes. 31

    +

    showtargets=innerleft
    +

    +A marker and annotation are placed to the left of the link/target in all modes. 31

    +

    showtargets=innerright
    +

    +A marker and annotation are placed to the left of the link/target in all modes. 31

    +

    showtargets=left
    +

    +A marker is placed to the left of the link/target and a marginal note is used in outer mode. 30

    +

    showtargets=right
    +

    +A marker is placed to the right of the link/target and a marginal note is used in outer mode. 30

    +

    stylemods=valuedefault: default 🎚
    +

    +Loads glossaries-extra-stylemods with the given options. If stylemods=default then no options are passed to glossaries-extra-stylemods. §2.2; 13

    +

    stylemods=all
    +

    +Load glossaries-extra-stylemods with all predefined styles. 13

    +

    stylemods=default
    +

    +Load glossaries-extra-stylemods with no options (patches any predefined styles that have been loaded). 13

    +

    stylemods=list
    +

    +Load glossaries-extra-stylemods with all the listed styles. 14

    +

    undefaction=valueinitial: error 🎚
    +

    +Indicates whether to trigger an error or warning if an unknown entry label is referenced. §2.4; 15

    +

    undefaction=error
    +

    +Trigger an error if an unknown entry label is referenced. 15

    +

    undefaction=warn
    +

    +Trigger a warning if an unknown entry label is referenced. 15

    +

    \usepackage[options]{glossaries}

    +

    (automatically loaded with \usepackage{glossaries-extra})
    +
    +

    +Base package. When loaded implicitly with glossaries-extra, any relevant options will be passed to the base glossaries package.

    +

    acronym=booleandefault: true; initial: false 🔘︎
    +

    +If true, provides a new glossary with the label acronym and title given by \acronymname, redefines \acronymtype to acronym, and provides \printacronyms. §2.1; 11

    +

    🛇acronymlists={label-list}🎚
    +

    +Identifies the glossaries that contain acronyms (defined with the base glossaries packages acronym mechanism).

    +

    +

    +Provides a new glossary with the label acronym, redefines \acronymtype to acronym, and provides \printacronyms. §2.1; 11

    +

    automake=valuedefault: true; initial: false 🎚
    +

    +Indicates whether or not to attempt to use TeX’s shell escape to run an indexing application.

    +

    counter=counter-nameinitial: page 🎚
    +

    +Sets the default location counter.

    +

    debug=valueinitial: false 🎚glossaries v4.24+

    +

    (modified by glossaries-extra’s debug option)
    +
    +

    +Adds markers to the document for debugging purposes.

    +

    entrycounter𝍢
    +

    +Enables the entry counter for top-level entries.

    +

    hyperfirst=booleandefault: true; initial: true 🔘
    +

    +Indicates whether or not to use hyperlinks on first use (if hyperlinks are supported).

    +

    +

    +Provides a new glossary with the label index and the title \indexname, and provides \printindex and \newterm. §2.1; 11

    +

    indexonlyfirst=booleandefault: true; initial: false 🔘︎
    +

    +Indicates whether or not to only index the first use.

    +

    makeindex𝍢
    +

    +Indicates that the indexing should be performed by makeindex (default).

    +

    mfirstucinitial: unexpanded 𝍢glossaries v4.50+
    +

    +Implements the expanded and unexpanded options provided by mfirstuc.

    +

    nogroupskip=booleandefault: true; initial: false 🔘︎
    +

    +If true, suppress the gap between letter groups in the glossaries by default.

    +

    nolist𝍢
    +

    +Don’t load glossary-list, which is normally loaded automatically. Note that if glossaries is loaded before glossaries-extra, then this option should be passed directly to glossaries not glossaries-extra otherwise it will be too late to implement.

    +

    nolong𝍢
    +

    +Don’t load glossary-long, which is normally loaded automatically. Note that if glossaries is loaded before glossaries-extra, then this option should be passed directly to glossaries not glossaries-extra otherwise it will be too late to implement.

    +

    nomain𝍢
    +

    +Prevents the definition of the main glossary. You will need to define another glossary to use instead. For example, with the acronyms package option.

    +

    nonumberlist𝍢
    +

    +Set no location lists as the default for all glossaries. May be overridden for individual glossaries with nonumberlist=true.

    +

    nopostdot=booleandefault: true; initial: true 🔘
    +

    +If true, suppresses the automatic insertion of a full stop after each entry’s description in the glossary (for styles that support this). The default is nopostdot=true for glossaries-extra and nopostdot=false for just glossaries. §2.2; 12

    +

    noredefwarn𝍢
    +

    +Suppresses a warning if theglossary or \printglossary have already been defined (which indicates that the document class or another package also provides a mechanism for creating a glossary that could potentially conflict with glossaries). This option is automatically implemented with glossaries-extra.

    +

    nostyles𝍢
    +

    +Don’t load the default set of predefined styles. Note that if glossaries is loaded before glossaries-extra, then this option should be passed directly to glossaries not glossaries-extra otherwise it will be too late to implement.

    +

    nosuper𝍢
    +

    +Don’t load glossary-super, which is normally loaded automatically. Note that if glossaries is loaded before glossaries-extra, then this option should be passed directly to glossaries not glossaries-extra otherwise it will be too late to implement.

    +

    notranslate𝍢
    +

    +Equivalent to translate=false.

    +

    notree𝍢
    +

    +Don’t load glossary-tree, which is normally loaded automatically. Note that if glossaries is loaded before glossaries-extra, then this option should be passed directly to glossaries not glossaries-extra otherwise it will be too late to implement.

    +

    nowarn𝍢
    +

    +Suppresses warnings.

    +

    numberedsection=valuedefault: nolabel; initial: false 🎚
    +

    +Indicates whether or not glossary section headers will be numbered and also if they should automatically be labelled.

    +

    +

    +Provides a new glossary with the label numbers and the title \glsnumbersgroupname, and provides \printnumbers. With glossaries-extra, this additionally defines \glsxtrnewnumber. §2.1; 11

    +

    sanitizesort=booleandefault: true; initial: varies 🔘︎
    +

    +Indicates whether the default sort value should be sanitized (only applicable with sort=standard).

    +

    savenumberlist=booleandefault: true; initial: false 🔘︎
    +

    +If true, patches the location list encapsulator to save the location list. With bib2gls, use the save-locations resource option.

    +

    section=valuedefault: section 🎚
    +

    +Indicates which section heading command to use for the glossary. The value may be one of the standard sectioning command’s control sequence name (without the leading backslash), such as chapter or section.

    +

    seenoindex=valueinitial: error 🎚
    +

    +Indicates what to do if the see key is used before the associated indexing files have been opened by \makeglossaries.

    +

    seenoindex=error
    +

    +Triggers an error if the see key is used before \makeglossaries.

    +

    seenoindex=ignore
    +

    +Does nothing if the see key is used before \makeglossaries.

    +

    seenoindex=warn
    +

    +Triggers a warning if the see key is used before \makeglossaries.

    +

    sort=valueinitial: standard 🎚
    +

    +Indicates how the sort key should automatically be assigned if not explicitly provided (for \makeglossaries and \makenoidxglossaries only).

    +

    sort=clearglossaries v4.50+
    +

    +Sets the sort key to an empty value. Use this option if no indexing is required for a slightly faster build.

    +

    sort=def
    +

    +Use the (zero-padded) order of definition as the default for the sort key.

    +

    sort=noneglossaries v4.30+
    +

    +Don’t process the sort key. Use this option if no indexing is required for a slightly faster build.

    +

    sort=standard
    +

    +Use the value of the name key as the default for the sort key and implement the \glsprestandardsort hook.

    +

    sort=use
    +

    +Use the (zero-padded) order of use as the default for the sort key.

    +

    style=style-name🎚
    +

    +Sets the default glossary style to style-name.

    +

    subentrycounter𝍢
    +

    +Enables the entry counter for level 1 entries.

    +

    +

    +Provides a new glossary with the label symbols and the title \glssymbolsgroupname, and provides \printsymbols. With glossaries-extra, this additionally defines \glsxtrnewsymbol. §2.1; 10

    +

    toc=booleandefault: true; initial: true 🔘
    +

    +If true, each glossary will be automatically added to the table of contents. The default is toc=false with glossaries and toc=true with glossaries-extra.

    +

    translate=valueinitial: babel 🎚
    +

    +Indicates how multilingual support should be provided, if applicable.

    +

    translate=babel
    +

    +Uses babel’s language hooks to implement multilingual support (default for glossaries-extra if babel has been detected).

    +

    translate=false
    +

    +Don’t implement multilingual support (default if no language package has been detected).

    +

    translate=true
    +

    +Uses translator’s language hooks to implement multilingual support (default for glossaries if a language package has been detected).

    +

    writeglslabelnames𝍢
    +

    +Creates a file called \jobname.glslabels that contains all defined entry labels and names (for the benefit of autocompletion tools).

    +

    writeglslabels𝍢
    +

    +Creates a file called \jobname.glslabels that contains all defined entry labels (for the benefit of autocompletion tools).

    +

    xindy={options}🎚
    +

    +Indicates that the indexing should be performed by xindy.

    +

    + +

    + +
    +

    Index

    + + +
    + +
    +

    Symbols

    +
    ?? (unknown entry marker)15, 28, 37, 38, 511, 512, 703883
    +
    . (full stop or period) +
    +
    ~ (non-breaking space) +
    +
    \$535698
    +
    * (modifier) +
    +
    \&
    +
    #535728
    +
    + (modifier) +
    + +
    + +
    +

    @

    +
    \@currentHref24, 25, 555, 557859
    +
    \@currentlabel2425
    +
    \@currentlabelname555
    +
    \@endfortrue301
    +
    \@firstofone240, 296560
    +
    \@firstoftwo52214
    +
    \@for301371
    +
    \@gobble409424
    + + + + + + + +
    \@secondoftwo214
    +
    \@starttoc201, 204, 214, 227, 418, 652, 821, 837861
    + +
    + +
    +

    A

    + + + +
    abbreviation styles628
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    accsupp package689
    + + + + + + + + + + + + + + + + + + + + + + + +
    acronym (base) style
    +
    dua-descTable 4.2
    + +
    footnote-descTable 4.2
    +
    footnote-sc-descTable 4.2
    +
    footnote-scTable 4.2
    +
    footnote-sm-descTable 4.2
    +
    footnote-smTable 4.2
    +
    footnoteTable 4.2
    +
    long-sc-short-descTable 4.2
    +
    long-sc-shortTable 4.2
    +
    long-short-descTable 4.2
    +
    long-short229
    +
    long-sm-short-descTable 4.2
    +
    long-sm-shortTable 4.2
    +
    long-sp-short-descTable 4.2
    +
    long-sp-shortTable 4.2
    +
    sc-short-long-descTable 4.2
    +
    sc-short-longTable 4.2
    +
    short-long-descTable 4.2
    +
    short-longTable 4.2
    +
    sm-short-long-descTable 4.2
    +
    sm-short-longTable 4.2
    + + + + + + + + + + + + + + +
    \actualchar576
    + + + + + + + + + +
    align environment26
    +
    all caps200, 253, 698, 846, 847, 905906
    + + + +
    \Alph262263
    +
    \alph262
    + +
    \alpha541, 551553
    + +
    alt-mod (modifier) +
    +
    amsmath package27
    + +
    \appto164475
    + +
    \arabic262263
    +
    arara511
    +
    array package446
    + + + +
    ASCII385, 521, 599, 849866
    + + + + +
    + +
    +

    B

    +
    babel package3, 4, 9, 17, 492, 592, 653, 662950
    +
    \backmatter188
    +
    beamer class286
    + +
    \beta541, 551553
    +
    bib2gls508573
    +
    -g +
    +
    --group24, 26, 34, 273, 390, 395, 397, 426, 442, 448, 465, 519, 537607
    + +
    --log-file25
    +
    --merge-nameref-on560
    +
    --no-group624
    +
    --record-count-rule522
    +
    --record-count-unit522, 528, 532615
    +
    --record-count264, 522, 528, 614615
    +
    -t +
    + + + + + + + + + +
    booktabs package470647
    + +
    + +
    +

    C

    + + +
    \caption27
    + +
    categories
    + + + + + + +
    term422
    +
    category attributes247, 608, 610796
    + + + + + + + + + + +
    encapinnerfmt243
    +
    encapnocase
    +
    encapnocaseinnerfmt243
    + + + + + + + + + + + + +
    innertextformat243784
    + + + + + + + + + + + + +
    recordcount524526, 822867
    + + + + + + + + +
    unitcount313
    + +
    category post-description hook1012, 421, 422, 428, 599, 603853
    +
    category post-link hook235, 237, 245248, 250, 251, 423, 563, 599, 603855
    +
    category post-name hook563599
    + + + + + + + + + + + + +
    \chapter431675
    +
    chapter counter313, 529, 530, 533555
    +
    \char385
    + +
    CLI599601
    +
    convertgls2bib272508
    +
    --index-conversion272
    +
    --preamble-only
    +
    \csdef38, 39829
    + +
    \cslet40, 667829
    +
    \csletcs40667
    + +
    \CurrentTrackedDialect593
    +
    \CurrentTrackedLanguage593
    + + +
    + +
    +

    D

    +
    datatool-base package302, 303, 671, 801, 819822
    +
    datatool package304, 507, 671, 730801
    + + + +
    \Delta552
    +
    description environment646940
    + + + + + + + + + + + + + + + + + + +
    \digamma551553
    +
    display full form50, 63, 81, 88, 93, 100, 103, 104, 106, 109111, 132, 170, 172, 173, 175, 599, 601, 806807
    +
    document environment16, 17, 37, 512, 578, 942943
    + +
    \dolistcsloop304800
    + + + +
    + +
    +

    E

    + + + +
    \emph156, 158, 629631, 634, 635, 637638
    +
    \encapchar576
    +
    entry location599, 601602
    + + +
    equation counter26, 27, 555, 556, 558, 800943
    +
    equation environment2627
    + +
    etoolbox package3840, 304, 305, 318, 407, 505, 513, 614, 615, 667, 728, 800802, 819, 829, 894895
    + + + + + + + + + + + + + + +
    example-glossaries-symbolsnames.bib
    + + + +
    \expandafter166254
    +
    \expandonce133134
    + + +
    + +
    +

    F

    +
    fancyhdr package444
    +
    \fbox242243
    +
    field32, 3740, 186, 210, 231, 291, 301303, 305, 399, 599, 602, 607, 609, 704714, 733, 801, 805, 811, 812, 814816, 818820, 822, 830, 877, 878, 881, 882888
    +
    figure counter
    +
    figure environment27
    +
    file formats
    +
    acr6
    +
    aux17, 26, 371, 407, 508, 513, 601, 614, 927942
    +
    bib17, 33, 34, 508, 581602
    +
    glg-abr9
    +
    glg
    +
    glo-abr9
    +
    glo
    +
    gls-abr9
    +
    gls17
    +
    glsdefs16, 1737
    +
    glslabels950
    +
    glstex34, 508, 511603
    +
    ist
    +
    ldf592593
    +
    log942
    +
    tex33, 508581
    +
    toc215
    +
    xdy
    +
    first use600
    +
    first use flag600736
    +
    first use text600
    + +
    fontenc package61
    +
    \footnote64254
    + + + + +
    \foreignlanguage293
    + +
    \forlistcsloop304801
    +
    \frontmatter187
    +
    full stop (.)2, 12, 13, 247, 248, 429, 495, 497, 544, 796, 818, 822, 855, 856948
    + +
    + +
    +

    G

    +
    gettitlestring package215735
    +
    \GetTitleStringDisableCommands215
    +
    \GetTitleStringSetup215
    + + + +
    group (letters, numbers, symbols)24, 34, 35, 273, 379, 385, 386, 388394, 396, 398, 399, 425, 426, 431, 441, 443, 448, 465, 600, 607, 615, 624, 625, 646, 647, 649, 651, 728, 731, 735, 738, 745, 752, 762, 764, 770, 772, 782, 789, 790, 811, 830, 865, 928947
    +
    GUI600
    + +
    + +
    +

    Glo

    + +
    glossaries-accsupp package14, 15, 29, 416, 419, 475477, 590, 611613, 688, 695, 700702, 710, 713, 718, 720, 736, 749, 751, 754, 760, 761, 763, 765, 775778941
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    false
    see all
    +
    + + +
    true
    see all
    +
    + + + + + + + + + + + + + + +
    glossaries-prefix package14, 54, 55, 207210, 218, 367, 590, 608, 609, 755, 915, 920925944
    + + + + + + + + + + + + + + + + + + +
    nopostdot§2.2; 24, 12, 13, 428, 754, 943948,
    see also postdot & postpunc
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    toc24950
    + + + + + + + + + + + + +
    glossary-hypernav package
    +
    glossary-inline package428, 646, 732, 754755
    +
    glossary-list package645647, 734, 735947
    +
    glossary-long package649, 702, 752947
    +
    glossary-longbooktabs package444, 468647
    + +
    glossary-longragged package649
    +
    glossary-mcols package649650
    +
    glossary-super package650, 702, 752948
    +
    glossary-superragged package650
    + + +
    glossary-tree package431, 433, 435, 443, 461, 463, 645, 646, 650, 651, 715, 760, 769773948
    +
    glossary600
    +
    glossary entry fields614
    + + + + + + + + + +
    glossary entry keys33605
    + + + + + + + + + + + + + + + + + + +
    name34, 36, 44, 133135, 138, 139, 144, 146, 147, 155, 156, 163, 168170, 204, 223, 224, 228, 237, 292, 369, 372, 389, 415, 419, 446, 448, 475, 477, 485, 553, 563, 574, 575, 579, 586, 589, 590, 599, 605, 608, 610, 611, 677, 690, 707, 724, 725, 751, 780, 781, 800, 811, 814, 837, 847, 871, 874, 919949
    + + + + + + + +
    see2022, 24, 33, 36, 263, 265267, 274, 276, 277, 279, 291, 299, 325, 369, 441, 516, 581, 605, 609, 757, 781, 782, 863, 892, 941949
    + + + + + + + + + + +
    text3537, 61, 163, 168170, 204, 224, 228, 255, 346, 369, 478, 485, 567, 606, 608, 611, 635, 639, 640, 693, 710, 726, 765, 780, 781, 816882
    + + + + + + + + + + + + + + +
    glossary, ignored +
    +
    glossary, mini +
    +
    glossary styles645
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    glossaryentry counter935
    + + + + + + + + + + + + + + + + + + +
    + +
    +

    Gls

    + + + +
    \gls-like600
    +
    \gls-like and \glstext-like options186196616
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    \glstext-like600
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    +

    Glsxtr

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    +

    H

    +
    \hfil427
    +
    hierarchical level261, 379, 384, 386, 388, 392, 393, 398, 400, 402, 406, 435, 438, 444, 468, 472, 530, 553, 600, 608, 625, 700, 715, 716, 727, 760, 774883
    +
    \hl241
    +
    \hsize429
    + +
    \hyperlink317
    +
    \hyperref573
    +
    hyperref package25, 27, 36, 63, 194, 196, 197, 201, 205, 216, 230, 239, 256, 291, 292, 296, 313, 413, 417, 510, 522, 529, 555, 556, 576, 586, 591800
    +
    \hypertarget
    + +
    + +
    +

    I

    +
    \ifcsstring895
    +
    \ifcsundef305819
    +
    \ifcsvoid305, 505, 567728
    +
    \ifdefempty305
    +
    \ifdefstring819
    + + + + + + + + + + + + + + + + + + + + + + + +
    \ifinlistcs305801
    + + + +
    \IfTrackedLanguageFileExists538
    +
    \ifundef305
    +
    ignored glossary256, 259, 375, 376, 382, 383, 405, 435, 493, 525, 601, 673, 715, 726, 727, 736, 818, 820, 894, 900, 918, 926927
    +
    ignored location (or record)261, 513, 522, 524601
    +
    \index261, 501, 502, 574576578
    +
    indexing application195, 261, 262, 311, 425, 600, 601, 944946
    +
    indexing (or recording)2228, 33, 37, 184, 185, 189, 190, 193196, 206, 233, 259, 261, 263267, 269, 270, 274, 275, 278, 279, 290, 302, 307, 375, 376, 382, 406408, 437, 508, 513, 514, 522, 524, 529, 530, 554, 555, 557, 558, 560, 564, 570, 601, 605, 608, 610615, 617, 618, 620, 696, 704, 731, 734, 779, 797, 798, 918, 927, 941944, 947, 949950
    + +
    \indexspace430
    +
    inline full form50, 51, 53, 54, 63, 65, 67, 73, 74, 81, 88, 93, 100, 101, 103, 105107, 109, 111, 114, 132, 170, 175, 252, 282, 599, 601, 636, 639, 793, 807, 825, 826861
    +
    inner formatting132, 135, 137, 138, 160, 163, 174, 176178, 235, 239, 241, 243245, 484, 601, 616, 679, 713, 721, 729, 794, 808, 832, 835, 868, 869872
    +
    \input508
    +
    inputenc package578
    +
    internal field35, 37, 264, 303, 600602
    +
    internal field (bib2gls)34, 602607
    +
    internal field label3840, 135, 231, 244, 245, 291, 293, 295, 301303, 305, 366, 398, 415, 419, 470, 566, 602, 677, 713, 714, 721, 729, 733, 760, 773, 792, 798, 801, 804, 805, 811, 818820, 822, 830, 831, 865, 888, 894, 895904
    + +
    \item429, 501646
    + +
    + +
    +

    J

    +
    \jobname17, 510, 511830
    + +
    + +
    +

    K

    + + +
    + +
    +

    L

    +
    \label27, 378, 624866
    +
    \leavevmode32
    +
    \let227243
    + +
    \letcs475
    +
    \levelchar576
    +
    \linewidth449457
    +
    link text63, 64, 105, 116, 151, 183, 185, 186, 189192, 194, 196, 197, 230, 233, 234, 237, 241, 244, 253, 254, 259, 264, 279, 281284, 286, 289, 296, 317, 366, 495, 499, 585, 600, 602, 603605, 616618, 677, 700703, 717, 720, 733, 734, 750, 751, 753, 754, 763, 765, 774778, 803, 805807, 831, 832, 834, 867, 868, 871, 883913
    +
    \listcsadd39801
    +
    \listcseadd39801
    +
    \listcsgadd39802
    +
    \listcsxadd39802
    + +
    location counter2427, 194, 261, 262, 264, 377, 513, 523, 524, 555557, 599, 602, 605, 615, 616, 618, 831, 859, 918, 933, 943947
    +
    location encap (format)188, 195, 355, 513, 555, 601, 602, 614, 616, 729, 731, 752884
    +
    location, ignored/invisible +
    +
    location list20, 24, 27, 33, 35, 37, 194, 195, 201, 259, 261263, 265267, 275, 276, 278, 327, 383, 386, 398, 399, 410, 423, 424, 427429, 432, 436, 437, 440, 441, 447450, 453455, 457, 458, 460, 461, 467, 469, 508, 512514, 516, 525, 529, 533, 556, 570, 572, 586, 587, 589, 601, 602, 607, 625, 646648, 675, 703, 707, 715, 716, 729, 731, 732, 734, 735, 739, 740, 745, 747, 752, 755, 757, 767772, 789791, 799, 805, 831, 858, 920, 928, 947948
    + + +
    longtable environment399, 445, 449458, 460, 461, 468, 469, 472, 645, 647649, 737744, 747896
    +
    longtable package649
    +
    lowercase136, 157, 200, 262, 552, 553, 750839
    + +
    + +
    +

    M

    +
    \mainmatter187188
    + + + +
    makeglossaries-lite
    +
    makeglossaries6, 256, 312313
    +
    makeglossariesgui
    +
    makeindex6, 17, 20, 23, 25, 28, 195, 196, 261, 574, 601, 900, 926, 944947
    +
    \MakeLowercase
    + +
    \MakeTextLowercase200
    +
    \MakeTextUppercase203, 227900
    +
    \MakeUppercase149, 150, 152227
    +
    \markboth201, 204, 214, 227, 418, 652, 821, 837861
    +
    \markright201, 204, 214, 227, 418, 652, 821, 837861
    +
    \mbox241, 242, 284, 288289
    +
    memoir class5
    +
    mfirstuc package196200, 203, 228, 234, 243, 291, 299, 500, 512, 664, 665, 750, 842, 899901, 937947
    + + + + + + + + + + +
    \mgls§7; 183, 323327, 330, 332334, 337339, 347349, 352355, 359361, 363, 372, 620, 621, 901, 902, 905, 908915
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    mini-glossary290, 406, 410, 411, 458, 532533
    + + + + + + + + + + + + + +
    multi-entry first use356359, 600, 602, 619621
    +
    multi-entry first use flag361363, 602621
    +
    multi-entry set options619
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    multi-entry subsequent use356358, 602, 621623
    +
    multicol package461
    +
    multicols environment439, 462, 649, 650, 766, 788790
    +
    multicols* environment439
    + + + + + +
    + +
    +

    N

    +
    \nameref215
    +
    nameref package215
    + + + + +
    \newacronym3, 5, 7, 10, 19, 4244, 59, 60, 181, 493, 496498, 609, 628, 917, 930, 933945
    + +
    \newcommand250258
    + + + + + + + + + + + +
    \NoCaseChange203216
    +
    non-breaking space (~)329, 345759
    + + +
    \null6
    +
    number list +
    + +
    + +
    +

    O

    + + + +
    + +
    +

    P

    +
    page counter25, 27, 261, 264, 313, 317, 523, 529, 530, 555, 559877
    + +
    \pageref377851
    +
    \pagestyle206
    +
    \par752
    +
    \parindent465
    +
    \part261
    +
    part counter261
    +
    \pdfbookmark442788
    +
    period (.) +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    polyglossia package592
    +
    post-description hook12, 33, 269, 305, 402, 422, 439, 446, 459, 466, 468, 599, 603, 605, 646, 700, 701, 737, 745, 849, 852, 853919
    +
    post-link hook51, 54, 63, 90, 101, 104107, 109111, 116, 117, 142, 144, 150153, 160, 165, 166, 183, 185, 230, 231, 234236, 238, 239, 245247, 251254, 279, 281283, 296, 330, 334, 349, 356, 357, 495, 525, 528, 599, 600, 603, 606, 621, 630, 633, 639, 641, 698, 700, 701, 731733, 755, 793, 796, 823, 852856, 938939
    +
    post-name hook402, 414, 419421, 446, 459, 501, 599, 603, 604, 608, 701856
    +
    \preto165
    + +
    print “unsrt” glossary commands (and environment)24, 34, 35, 134, 145, 148, 149, 156, 196, 376, 377, 379, 382, 386, 389, 397, 423, 425, 448, 534, 601, 603, 607, 614, 624, 625, 652, 700, 762, 782, 793, 831, 849, 883, 918, 928944
    +
    print [unsrt|noidx] glossary options377624
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    \protect289
    +
    \providecommand554, 572, 573, 662, 663, 667, 671, 672, 858, 898, 915, 919, 932, 934937939
    + + + + +
    + +
    +

    Q

    +
    \quotechar576
    + +
    + +
    +

    R

    +
    \ref377, 756851
    +
    \refstepcounter25, 27, 317556
    +
    \relax277, 291, 329, 505, 566, 707, 782, 863888
    +
    relsize package63, 157, 632, 634, 636, 643644
    + +
    \renewcommand250, 422, 572, 573, 756858
    + +
    resource file572603
    +
    resource options2426, 372, 419, 535, 536, 554, 561, 563, 603, 625, 696, 780, 794935
    +
    alias-loc267, 278279
    +
    alias278
    +
    category528
    +
    combine-dual-locations570571
    +
    compound-adjust-name372843
    +
    description-case-change500
    +
    dual-backlink563
    +
    dual-field561562
    +
    dual-prefix568
    +
    dual-type561
    +
    entry-type-aliases535787
    +
    field-aliases536
    +
    flatten379
    +
    group-level391, 396465
    +
    group519
    +
    ignore-fields
    +
    interpret-fields419
    +
    label-prefix568
    +
    loc-counters529
    +
    loc-prefix424428
    +
    loc-suffix424
    +
    name-case-change501
    +
    post-description-dot2, 1213
    +
    prune-xr275
    +
    replicate-fields419
    +
    save-child-count468, 472, 554, 614, 820895
    +
    save-index-counter27, 573614
    +
    save-locations25, 35, 440, 461, 513, 602, 607, 625, 944948
    +
    secondary379, 390391
    +
    see278441
    +
    seealso278441
    +
    selection22, 33, 260, 266, 267, 274, 278, 279, 514, 524, 560696
    +
    set-widest435, 447, 463, 553867
    +
    sort-field34
    +
    sort-label-list299
    +
    sort-replace535
    +
    sort-rule521, 536538
    +
    sort25, 378, 514, 536944
    +
    src17, 514554
    +
    supplemental-locations195, 555560
    +
    symbol-sort-fallback410
    +
    trigger-type525530
    +
    type518
    +
    resource set554, 603, 780860
    + + + + + + + + + + + + + + +
    \Roman262
    +
    \roman262
    + +
    + +
    +

    S

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    sample files
    +
    \section675
    +
    section counter313, 523, 555, 557558
    + + +
    sentence case253, 500, 677, 698, 717, 720, 753, 754, 765, 806, 807, 831, 834, 867, 871, 899, 901, 905906
    + + + + + + + + +
    small caps63, 88, 112, 113, 136, 157, 200, 633, 678, 679, 718862
    +
    \so242243
    +
    soul package236, 241, 242284
    +
    standalone entry603918
    +
    \stepcounter317824
    +
    \string512, 521, 535, 539, 541, 575, 698, 728935
    + +
    subsequent use604
    +
    supertabular environment650
    +
    supertabular package
    + + +
    + +
    +

    T

    +
    \tabcolsep449, 452, 454457
    +
    table counter
    +
    table environment27
    +
    \tableofcontents203215
    +
    tabular environment383, 399, 402, 428, 444, 445, 472, 645, 647649, 668, 672, 702, 748, 752, 896, 920934
    + +
    texindy574
    +
    \texorpdfstring205, 216418
    +
    \textbf430560
    +
    textcase package203
    +
    \textlarger158873
    +
    \textsc61, 136, 156, 157, 632634, 636, 641, 642, 765, 802861
    +
    \textsmaller63, 156, 157, 230, 632, 634, 636, 643, 644, 802873
    +
    \textsubscript475
    +
    \textsuperscript475
    +
    \textup158798
    +
    \thecounter196, 313, 318, 407, 408, 522, 529556
    + + +
    \theHcounter196, 313, 409, 522, 529, 557618
    +
    theindex environment576
    +
    \thepage522524
    +
    title case200, 291, 372374, 500, 665, 710, 802843
    +
    titlestring package
    +
    tracklang package293, 294, 514, 538, 540, 593, 594805
    +
    translator package3950
    + +
    + +
    +

    U

    +
    \u512, 521, 535, 728935,
    see also \glshex
    +
    +
    \ul236
    +
    \underline58
    +
    \unskip20, 32279
    + +
    \upalpha551553
    + +
    \upbeta
    + + + +
    upgreek package551, 552, 573, 935937
    + + + + + + +
    \uppercase228
    +
    uppercase136, 138, 146, 157, 197, 200, 201, 262, 291293, 300, 311, 388, 389, 500, 552, 553, 677, 705, 717, 720, 753, 754, 765, 774, 806, 807, 816, 831, 834, 841, 867, 871, 899901, +
    + + + +
    UTF-8184, 197, 198, 249, 427, 438, 521, 578, 604, 782866
    + +
    + +
    +

    W

    +
    whatsit185, 194, 264, 290604
    + + + +
    + +
    +

    X

    + +
    xfor package301371
    + + + + +
    \xifinlistcs305802
    +
    xindex601
    +
    xindy6, 17, 20, 23, 25, 28, 195, 196, 261, 574, 601, 610, 900, 926, 944950
    + + + + + +
    + +
    +

    Z

    + + +
    + + + diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual.pdf b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual.pdf index fd0a2ca8dc..3c80a18688 100644 Binary files a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual.pdf and b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual.tex index 44d5314dad..925ff20f05 100644 --- a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual.tex +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual.tex @@ -1,1839 +1,27356 @@ -\documentclass[report,inlinetitle,noprint]{nlctdoc} - -\makeatletter -\@ifpackageloaded{tex4ht} -{ - \DeclareUnicodeCharacter{00FE}{\HCode{&\#x00FE;}} - \DeclareUnicodeCharacter{00D0}{\HCode{&\#x00D0;}} - \DeclareUnicodeCharacter{01F7}{\HCode{&\#x01F7;}} - \DeclareUnicodeCharacter{A77D}{\HCode{&\#xA77D;}} - \DeclareUnicodeCharacter{017F}{\HCode{&\#x017F;}} - \DeclareUnicodeCharacter{018F}{\HCode{&\#x018F;}} +% This document takes a *long* time to compile from scratch. See +% notes below. +% +% arara: lualatex if missing("glstex") +% arara: bib2gls: { group: on, packages: [ mfirstuc-english ] } if missing("glstex") +% arara: lualatex: { shell: yes } +% arara: bib2gls: { group: on, packages: [ mfirstuc-english ] } +% arara: lualatex +% arara: lualatex if found("log", "Rerun to get") +% +% This manual creates example documents on the fly in the +% directory created by the following line: +\directlua{os.execute("mkdir -p glossaries-extra-manual-examples")} +% If the above doesn't work, you'll have to create the directory +% manually. + +% If the shell escape is enabled the example documents will be +% automatically built with arara. If you already have the example .tex and +% .pdf files in the above directory, the shell escape isn't +% required. You'll need to run pdfcrop on the example pdf files if +% you don't have the *-crop.pdf files. If you only have the .tex +% files in the examples directory, then you need to run arara on +% each .tex file (which will call pdfcrop where applicable). +% +% This document requires glossaries-extra v1.49, bib2gls v3.0 +% and nlctuserguide.sty. Some of the example documents require +% glossaries v4.50 and mfirstuc v2.08. If they haven't already +% been uploaded to CTAN, they will be shortly. + +\documentclass[titlepage=false,oneside, + fontsize=12pt,captions=tableheading]{scrbook} + +%\usepackage[autooneside=false]{scrlayer-scrpage} + +\usepackage{relsize} +\usepackage{mfirstuc-english} +\usepackage[ + deephierarchy, + numberedsection, + abbreviations, + %debug=showwrgloss,novref, + %showtargets=annoteleft + ]{nlctuserguide} + +\hypersetup{pdfauthor={Nicola Talbot}, + pdftitle={glossaries-extra manual}, + bookmarksdepth=5} + +\renewcommand*{\thispackagename}{glossaries-extra} +\renewcommand{\cmdnotefmt}[1]{} +\renewcommand*{\summarynotefmt}[1]{{\small(#1)}} + +\appto\terminaldesc{. See also +\qt{\dickimawhref{latex/buildglossaries}{Incorporating +makeglossaries or makeglossaries-lite or bib2gls into the document +build}}} + +\newfontfamily\noto{Noto Serif} +\newcommand{\textnoto}[1]{{\noto #1}} + +\providecommand{\eth}{\char"00F0} +\providecommand{\Eth}{\char"00D0} +\providecommand{\thorn}{\char"00FE} +\providecommand{\Thorn}{\char"00DE} +\providecommand{\wynn}{\char"01BF} +\providecommand{\Wynn}{\char"01F7} +\newcommand{\insularg}{\textnoto{\char"1D79}} +\newcommand{\InsularG}{\textnoto{\char"A77D}} +\providecommand{\longs}{\char"017F} +\providecommand{\Schwa}{\char"018F} +\providecommand{\schwa}{\char"0259} + +\newcommand{\attr}{\idxc{categoryattribute}{attribute}} +\newcommand{\attrs}{\idxc{categoryattribute}{attributes}} +\newcommand{\location}{\idxc{entrylocation}{location}} +\newcommand{\locations}{\idxc{entrylocation}{locations}} +\newcommand{\encap}[2][]{{\let\csfmt\csfmtcolourfont\gls[#1]{#2}}} +\newcommand{\indexed}{\idxc{indexing}{indexed}} +\newcommand{\recorded}{\idxc{indexing}{recorded}} +\newcommand{\record}{\idxc{indexing}{record}} +\newcommand{\records}{\idxc{indexing}{records}} +\newcommand{\atentry}[1]{\texorpdfstring{\code{@#1}}{@#1}} +\newcommand{\thecounter}[1]{\glslink{thecounter}{\csfmt{the\-#1}}} +\newcommand{\theHcounter}[1]{\glslink{theHcounter}{\csfmt{the\-H\-#1}}} +\newcommand{\thecountername}{\glslink{thecounter}{\csfmt{the\-\meta{counter-name}}}} +\newcommand{\theHcountername}{\glslink{theHcounter}{\csfmt{the\-\meta{counter-name}}}} +\newcommand{\recordcounterfield}[1]{% + \glslink{opt.glosfield.recordcount.counter}{\csoptfmt{record\-count\dfullstop#1}}} +\newcommand{\recordcounterlocationfield}[2]{% + \glslink{opt.glosfield.recordcount.counter.location}{\csoptfmt{record\-count\dfullstop#1\dfullstop#2}}} + +\MFUhyphentrue +\setabbreviationstyle[termacronym]{short-sm-desc} + +\glsxtrnewgls{opt.printgloss.}{\printglossopt} +\newcommand{\printglossoptval}[2]{\optval{printgloss.#1}{#2}} +\newcommand{\printglossoptvalm}[2]{\optval{printgloss.#1}{\marg{#2}}} + +\glsxtrnewgls{opt.printunsrttab.}{\glstableopt} +\newcommand{\glstableoptval}[2]{\optval{printunsrttab.#1}{#2}} +\newcommand{\glstableoptvalm}[2]{\optval{printunsrttab.#1}{\marg{#2}}} +\glsxtrnewgls{optval.printunsrttab.block-style.}{\glstableblockstyle} +\newcommand{\glstableblockstyledef}[1]{\optionvaldef{printunsrttab.block-style}{#1}} + +\glsxtrnewgls{opt.glsopt.}{\glsopt} +\newcommand{\glsoptval}[2]{\optval{glsopt.#1}{#2}} +\glsxtrnewgls{opt.mglsopt.}{\mglsopt} +\newcommand{\mglsoptval}[2]{\optval{mglsopt.#1}{#2}} +\newcommand{\mglsoptvalm}[2]{\optvalm{mglsopt.#1}{#2}} +\glsxtrnewgls{opt.gloskey.}{\gloskey} +\newcommand{\gloskeyval}[2]{\optval{gloskey.#1}{\marg{#2}}} +\glsxtrnewgls{opt.glosfield.}{\glosfield} +\newcommand{\glosfielddisp}[3][]{\glsdisp[#1]{opt.glosfield.#2}{\csoptfmt{#3}}} +\glsxtrnewgls{opt.cat.}{\cat} +\glsxtrnewgls{opt.catattr.}{\catattr} +\glsxtrnewgls{opt.resource.}{\resourceopt} +\newcommand{\resourceoptval}[2]{\optval{resource.#1}{#2}} +\newcommand{\resourceoptvalm}[2]{\optval{resource.#1}{\marg{#2}}} + +\glsxtrnewgls{opt.glostyle.}{\glostyle} +\glsxtrnewgls{opt.abbrstyle.}{\abbrstyle} +\glsxtrnewgls{opt.acrstyle.}{\acrstyle} + +\newcommand*{\abbrstyledef}[1]{\optiondef{abbrstyle.#1}} + +\defsemanticcmd[style1]{\fieldfmt}{\texttt}{} +\defsemanticcmd[style2]{\entryfmt}{\texttt}{} +\newcommand*{\atentryfmt}[1]{\entryfmt{@#1}} + +\defsemanticcmd{\acrstylefmt}{\textsf}{} +\defsemanticcmd[style3]{\abbrstylefmt}{\textsf}{} +\defsemanticcmd{\glostylefmt}{\textsf}{} +\defsemanticcmd[style4]{\catattrfmt}{\textsf}{} + +\newcommand*{\catfmt}{\csoptfmt} + +\newcommand{\hierarchical}{\glslink{hierarchicallevel}{hierarchical}} + +\renewcommand{\nlctuserguidecustomentryaliases}{% + glossarystyle=index, + abbreviationstyle=index, + acronymstyle=index, } -{ - \usepackage{fontspec} - \setmainfont{FreeSerif} -} -\makeatother - -\usepackage{alltt} -\usepackage[normalem]{ulem} -\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 - -\makeatletter -\@nlctdoc@if@usingtexht - { - \newcommand{\headingsty}[1]{#1} - \newcommand{\headingcs}[1]{#1} - \newcommand{\headingapp}[1]{#1} - } - { - \newcommand{\headingsty}[1]{\styfmt{#1}} - \newcommand{\headingcs}[1]{\cs{#1}} - \newcommand{\headingapp}[1]{\appfmt{#1}} - } -\makeatother - -\GlsXtrEnableEntryUnitCounting{general}{0}{page} - -\renewcommand*{\glsxtrifcounttrigger}[3]{#3} -\renewcommand*{\glslinkcheckfirsthyperhook}{% - \ifnum\glsentrycurrcount\glslabel>0 - \setkeys{glslink}{hyper=false}% - \fi +\appto{\nlctexampledisablecmds}{% + \letcs{\opt}{@firstofone}% + \letcs{\cat}{@firstofone}% + \letcs{\catattr}{@firstofone}% + \letcs{\resourceopt}{@firstofone}% + \letcs{\abbrstyle}{@firstofone}% + \letcs{\glostyle}{@firstofone}% + \letcs{\glsopt}{@firstofone}% + \letcs{\mglsopt}{@firstofone}% + \letcs{\gloskey}{@firstofone}% + \letcs{\glosfield}{@firstofone}% + \letcs{\printglossopt}{@firstofone}% + \let\resourceoptval\keyeqvalue + \let\resourceoptvalm\keyeqvaluem + \let\optval\keyeqvalue + \let\opteqvalref\keyeqvalue + \let\gloskeyval\keyeqvaluem + \let\glsoptval\keyeqvaluem + \let\mglsoptval\keyeqvaluem + \let\printglossoptval\keyeqvalue + \let\printglossoptvalm\keyeqvaluem } -\newcommand*{\XeLaTeX}{\hologo{XeLaTeX}} -\newcommand*{\LuaLaTeX}{\hologo{LuaLaTeX}} -\newcommand*{\pdfLaTeX}{\hologo{pdfLaTeX}} +\newcommand{\genabbrvstyleexamplecode}[6]{% +\gls{setabbreviationstyle}\allowbreak\marg{\abbrstyle{#2}} -\IndexPrologue{\chapter*{\indexname} - \addcontentsline{toc}{chapter}{\indexname}% - \markboth{\indexname}{\indexname}} +#6\gls{newabbreviation}#4\marg{ex}\marg{#3}\marg{long form} -\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.} +\cbeg{document} +First: \gls{gls}\marg{ex}[-insert]. Next: \gls{gls}\marg{ex}[-insert]. +Full: \gls{glsxtrfull}\marg{ex}[-insert]. +First plural: \gls{glspl}\oarg{prereset}\marg{ex}[-insert].\newline +\gls{printunsrtglossaries}\newline +\cend{document} } -\newglossaryentry{makeindex}{% - name={\appfmt{makeindex}},% - sort={makeindex},% - description={An indexing application.}, +\newcommand{\genabbrvstyleexampleresult}[6]{% +\createexample*[fontsize={20},title={The \optfmt{#2} abbreviation style}, + description={Example document demonstrating the #2 abbreviation style}, + label={ex:abbrvstyle#2},#1] +{% + #5\cmd{usepackage}\oarg{T1}\marg{fontenc}^^J% + \cmd{usepackage}\oarg{colorlinks}\marg{hyperref}^^J% + \cmd{usepackage}\marg{glossaries-extra}^^J% + #6\gls{setabbreviationstyle}\marg{#2}^^J% + \gls{newabbreviation}#4\marg{ex}\marg{#3}\marg{long form} } - -\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}\index{makeglossaries-lite=\appfmt{makeglossaries-lite}|htextbf}},% -sort={makeglossaries-lite},% -text={\appfmt{makeglossaries-lite}\iapp{makeglossaries-lite}},% -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. This script is distributed in the source code -on CTAN with the file name -\texttt{makeglossaries-lite.lua} but TeX Live on Unix-like systems -creates a symbolic link -called \texttt{makeglossaries-lite} (without the \texttt{.lua} -extension) to the actual \texttt{makeglossaries-lite.lua} script, and -\TeX\ distributions on Windows convert the script to an executable -\texttt{makeglossaries-lite.exe}.} +{% +First: \gls{gls}\marg{ex}[-insert]. Next: \gls{gls}\marg{ex}[-insert].^^J% +Full: \gls{glsxtrfull}\marg{ex}[-insert]. +First plural: \gls{glspl}\oarg{prereset}\marg{ex}[-insert].^^J% +\gls{printunsrtglossaries} } - -\newglossaryentry{bib2gls}{% -name={\appfmt{bib2gls}},% -sort={bib2gls},% -description={A command line Java application that selects -entries from a .bib file and converts them to glossary -definitions (like \appfmt{bibtex} but also performs hierarchical -sorting and collation, thus omitting the need for \gls{xindy} or -\gls{makeindex}). 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.} +\newcommand{\genabbrvstyleexampleside}[6]{% +\begin{coderesult} +\genabbrvstyleexamplecode{#1}{#2}{#3}{#4}{#5}{#6}% +\tcblower +\genabbrvstyleexampleresult{#1}{#2}{#3}{#4}{#5}{#6}% +\end{coderesult}% } -\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.} +\newcommand{\genabbrvstyleexamplestack}[6]{% +\begin{codebox} +\genabbrvstyleexamplecode{#1}{#2}{#3}{#4}{#5}{#6}% +\end{codebox} +\begin{resultbox} +\genabbrvstyleexampleresult{fontsize={11},#1}{#2}{#3}{#4}{#5}{#6}% +\end{resultbox}% } -\newglossaryentry{locationlist}{% -name={location list},% -description={A list of \glspl{entrylocation}. -See \gls{numberlist}.}% +\newcommand*{\abbrvstyleexampleucfn}[2][]{% + \genabbrvstyleexampleside{#1}{#2}{SHRT FM}{}{}{}% } -\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.} +\newcommand*{\abbrvstyleexampleucdescfn}[2][]{% + \genabbrvstyleexampleside{#1}{#2}{SHRT FM}% + {\oarg{\gloskeyval{description}{sample description}}\newline}% + {}{}% } -\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}.}% +\newcommand*{\abbrvstyleexamplelcfn}[2][]{% + \genabbrvstyleexampleside{#1}{#2}{shrt fm}{}{}{}% } -\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}.)}% +\newcommand*{\abbrvstyleexamplelcdescfn}[2][]{% + \genabbrvstyleexampleside{#1}{#2}{shrt fm}% + {\oarg{\gloskeyval{description}{sample description}}\newline}% + {}{}% } -\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}.}% +\newcommand*{\abbrvstyleexamplesmfn}[2][]{% + \genabbrvstyleexampleside{#1}{#2}{SHRT FM}{}% + {^^J\cmd{usepackage}\marg{relsize}}{}% } -\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*{\abbrstylenolink}[1]{% - \textsf{#1}\index{abbreviation styles:>#1={\protect\sffamily#1}|main}} - -\newcommand*{\abbrstyle}[1]{% - \hyperlink{abbrstyle.#1}{\textsf{#1}}% - \index{abbreviation styles:>#1={\protect\sffamily#1}|main}% +\newcommand*{\abbrvstyleexamplesmdescfn}[2][]{% + \genabbrvstyleexampleside{#1}{#2}{SHRT FM}% + {\oarg{\gloskeyval{description}{sample description}}\newline}% + {^^J\cmd{usepackage}\marg{relsize}}{}% } -\makeatletter -\newcommand{\htarget}[2]{\Hy@raisedlink{\hypertarget{#1}{}}#2} -\makeatother - -\newcommand*{\abbrstyledef}[1]{% - \htarget{abbrstyle.#1}{\textsf{#1}}% - \index{abbreviation styles:>#1={\protect\sffamily#1}|main}% +\newcommand*{\abbrvstyleexampleuc}[2][]{% + \genabbrvstyleexamplestack{#1}{#2}{SHRT FM}{}{}{}% } -\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*{\catattrnolink}[1]{% - \textsf{#1}\index{category attributes:>#1={\protect\sffamily#1}|main}} - -\newcommand*{\catattr}[1]{% - \hyperlink{catattr.#1}{\textsf{#1}}% - \index{category attributes:>#1={\protect\sffamily#1}|main}% +\newcommand*{\abbrvstyleexamplelc}[2][]{% + \genabbrvstyleexamplestack{#1}{#2}{shrt fm}{}{}{}% } -\newcommand*{\catattrdef}[1]{% - \htarget{catattr.#1}{\textsf{#1}}% - \index{category attributes:>#1={\protect\sffamily#1}|main}% +\newcommand*{\abbrvstyleexamplesm}[2][]{% + \genabbrvstyleexamplestack{#1}{#2}{SHRT FM}{}% + {^^J\cmd{usepackage}\marg{relsize}}{}% } -\newcommand*{\postlinkcat}{% - \cs{glsxtrpostlink}\meta{category}% - \index{glsxtrpostlinkcategory=\cs{glsxtrpostlink}\meta{category}|hyperpage}% +\newcommand*{\abbrvstyleexampleucdesc}[2][]{% + \genabbrvstyleexamplestack{#1}{#2}{SHRT FM}% + {\oarg{\gloskeyval{description}{sample description}}\newline}% + {}{}% } -\renewcommand*{\pkgopt}[2][]{% - \hyperlink{styopt.#2}{\pkgoptfmt{#2}}% - \ifstrempty{#1}{}{\pkgoptfmt{=#1}}% - \ipkgopt[#1]{#2}% +\newcommand*{\abbrvstyleexamplelcdesc}[2][]{% + \genabbrvstyleexamplestack{#1}{#2}{shrt fm}% + {\oarg{\gloskeyval{description}{sample description}}\newline}% + {}{}% } -\newcommand*{\pkgoptdef}[1]{% - \htarget{styopt.#1}{\pkgoptfmt{#1}}% - \ipkgopt{#1}% +\newcommand*{\abbrvstyleexamplesmdesc}[2][]{% + \genabbrvstyleexamplestack{#1}{#2}{SHRT FM}% + {\oarg{\gloskeyval{description}{sample description}}\newline}% + {^^J\cmd{usepackage}\marg{relsize}}{}% } -\setlength\marginparwidth{70pt} - -\begin{document} -\DeleteShortVerb{\|} -\MakeShortVerb{"} - - \title{glossaries-extra.sty v1.48: - an extension to the glossaries package} - \author{Nicola L.C. Talbot\\[10pt] -Dickimaw Books\\ -\url{http://www.dickimaw-books.com/}} - - \date{2021-11-22} - \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. - -The file \nolinkurl{example-glossaries-xr.tex} contains dummy -entries with cross-references that may be used for creating -minimal working examples for testing the \styfmt{glossaries-extra} -package. (The base \styfmt{glossaries} package provides additional files, -but this one needs \styfmt{glossaries-extra}.) There are equivalent -\texttt{.bib} files for use with \gls{bib2gls}. - -\textbf{The \styfmt{glossaries-extra} package uses a different set -of defaults to the base \styfmt{glossaries} package.} See the -Introduction for more details. -\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 \styfmt{glossaries-extra} and \gls{bib2gls}: An Introductory -Guide. (\href{http://mirrors.ctan.org/support/bib2gls/bib2gls-begin.pdf}{\texttt{bib2gls-begin.pdf}}). - -\item -\href{https://www.dickimaw-books.com/latex/buildglossaries/}{Incorporating -makeglossaries or makeglossaries-lite or bib2gls into the document -build}. - -\item The -\href{http://www.dickimaw-books.com/software/bib2gls}{\appfmt{bib2gls}} -application. - -\item The base \href{https://ctan.org/pkg/glossaries}{\styfmt{glossaries}} package. -\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} or just \pkgopt{postdot} 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. - -\item The default style used by \ics{newacronym} is -\abbrstyle{short-nolong}. (That is, the long form is not shown on -\gls{firstuse}.) - -\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 Basic defaults: -\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 Language defaults: -\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 Combined with \cls{memoir} -\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. - -\item Abbreviations are defined with \cs{newabbreviation}: -\begin{verbatim} -\usepackage{glossaries-extra} -\newabbreviation{svm}{SVM}{support vector machine} -\begin{document} -First use: \gls{svm}. Explicit full form: \glsxtrfull{svm}. -\end{document} -\end{verbatim} -This is the closest to: -\begin{verbatim} -\usepackage{glossaries} -\newacronym{svm}{SVM}{support vector machine} -\begin{document} -First use: \gls{svm}. Explicit full form: \acrfull{svm}. -\end{document} -\end{verbatim} -If you want to continue using \cs{newacronym} then you will need to -change the style for the \category{acronym} category: -\begin{verbatim} -\usepackage{glossaries-extra} -\setabbreviationstyle[acronym]{long-short} -\newacronym{svm}{SVM}{support vector machine} -\begin{document} -First use: \gls{svm}. Explicit full form: \glsxtrfull{svm}. -\end{document} -\end{verbatim} -\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,postdot]{glossaries-extra} - -\makeglossaries - -\setabbreviationstyle[acronym]{long-short} - -\newacronym{laser}{laser}{light amplification by stimulated -emission of radiation} - -\begin{document} - -\gls{laser} - -\printglossaries - -\end{document} -\end{verbatim} -(Note the need to set the acronym style using -\cs{setabbreviationstyle} before \cs{newacronym}. -See \sectionref{sec:abbreviations} for further details.) - -\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[{\pkgoptdef{debug}}] The \styfmt{glossaries} package -has a \pkgoptfmt{debug} option that allows the values -\pkgoptfmt{false}, \pkgoptfmt{true} and \pkgoptfmt{showtargets}. -The \pkgopt[showtargets]{debug} option was introduced to -\styfmt{glossaries} v4.32, so if you want to use this option -with \styfmt{glossaries-extra} you must make sure that -your version of \styfmt{glossaries} supports it. - -The \styfmt{glossaries-extra} package extends this option -to provide the additional values \pkgopt[showwrgloss]{debug} -and \pkgopt[all]{debug}. - -The \pkgopt[showwrgloss]{debug} option implements -\pkgopt[true]{debug} and uses -\begin{definition}[\DescribeMacro\glsxtrwrglossmark] -\cs{glsxtrwrglossmark} -\end{definition} -to show a mark \ensuremath{\cdot} just before the write operation -performed by the indexing commands. If you use -\pkgopt[hybrid]{record} there will be a mark for the -write operation to the \texttt{.aux} file for \gls{bib2gls} -and a mark for the write operation to the associated glossary -file for \gls{makeindex} or \gls{xindy}. - -The \pkgopt[all]{debug} option implements both \pkgopt[showtargets]{debug} -and \pkgopt[showwrgloss]{debug}. - -\item[{\pkgoptdef{showtargets}}] This implements -\pkgopt[showtargets]{debug} and can also adjust the way the targets -are shown. By default, any links that occur in \TeX's \qt{outer} -mode are placed in the margin according to \ics{glsshowtargetouter} -(provided by the base \styfmt{glossaries} package). This can lead to -the \qt{too many floats} error if there are multiple instances of -commands like \cs{gls} in a single line. This option provides a way -of changing this to an in-line annotation. Available values: -\begin{description} -\item[\optfmt{left}] A marker is placed to the left of the -link/target and a marginal note is used in outer mode; -\item[\optfmt{right}] A marker is placed to the right of the -link/target and a marginal note is used in outer mode; -\item[\optfmt{innerleft}] A marker and annotation are placed to the left of the -link/target in all modes; -\item[\optfmt{innerright}] A marker and annotation are placed to the -right of the link/target in all modes; -\item[\optfmt{annoteleft}] Markers are placed on either side of the -link/target and the annotation is on the left; -\item[\optfmt{annoteright}] Markers are placed on either side of the -link/target and the annotation is on the right. -\end{description} - -\item[{\pkgoptdef{postdot}}] (New to version 1.12.) -This option is just a shortcut for \pkgopt[false]{nopostdot}. - -\item[{\pkgoptdef{postpunc}}] (New to version 1.21.) -This option sets the post-description punctuation to the given -value. For example: \pkgoptfmt{postpunc={;}} does -\begin{verbatim} -\renewcommand{\glspostdescription}{;} -\end{verbatim} -The value may also be one of the following keywords: -\begin{description} -\item[\texttt{comma}:] \pkgopt[comma]{postpunc} is -equivalent to -\begin{verbatim} -\renewcommand{\glspostdescription}{,} -\end{verbatim} - -\item[\texttt{dot}:] \pkgopt[dot]{postpunc} is -equivalent to -\begin{verbatim} -\renewcommand{\glspostdescription}{.\spacefactor\sfcode`\. } -\end{verbatim} - -\item[\texttt{none}:] \pkgopt[none]{postpunc} is -equivalent to -\begin{verbatim} -\renewcommand{\glspostdescription}{} -\end{verbatim} -\end{description} -The default definition is -\begin{verbatim} -\newcommand*{\glspostdescription}{% - \ifglsnopostdot\else.\spacefactor\sfcode`\. \fi -} -\end{verbatim} -where the conditional is determined by the \pkgopt{nopostdot} -package option. The \pkgopt{postpunc} option removes the conditional -from the definition of \cs{glspostdescription}. The package options -\pkgopt{nopostdot} and \pkgopt{postdot} will restore the original definition of -\cs{glspostdescription}. - -The \sty{glossaries-extra-stylemods} package adjusts -the predefined styles that had a hard-coded \cs{space} -before the \gls{numberlist} so that they use \cs{glsxtrprelocation} -instead (which is defined to \cs{space}). You can therefore -redefine this command in combination with \pkgopt{postpunc} -to alter the separator before the \gls{numberlist}. -For example, to have a comma followed by \cs{hfil}: -\begin{verbatim} -\usepackage[postpunc=comma,stylemods]{glossaries-extra} -\renewcommand{\glsxtrprelocation}{\hfil} -\end{verbatim} -Be careful with doing this as it will look odd if the \gls{numberlist} is -missing. (With \gls{bib2gls} you can instead redefine -\cs{glsxtrprelocation} to do nothing and set the -location prefixes with \texttt{loc-prefix} which will only -apply if the entry has a \gls{numberlist}.) - -\item[{\pkgoptdef{prefix}}] Load the \sty{glossaries-prefix} -package (if not already loaded). - -\item[{\pkgoptdef{accsupp}}] Load the \sty{glossaries-accsupp} -package (if not already loaded). - -\begin{important} -The \sty{glossaries-accsupp} package is still experimental and so -accessibility features are liable to change. -\end{important} - -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 (and can't be set with \ics{glossariesextrasetup}) since the \sty{glossaries-accsupp} -package must be loaded before \styfmt{glossaries-extra} if it's -required. - -\item[{\pkgoptdef{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. There are two special keyword values: -\pkgopt[default]{stylemods} (equivalent to omitting the value) -and \pkgopt[all]{stylemods}, which loads all the -predefined styles. - -\item[{\pkgoptdef{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} - -Note that \ics{ifglsused} will display ?? in the document text with -\pkgopt[warn]{undefaction} if the entry hasn't been defined, as the -underlying boolean variable doesn't exist and so is neither true nor -false. (There will also be a warning in the transcript.) See -\sectionref{sec:glsunset} for further details. - -\item[{\pkgoptdef{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} -or \gloskey{seealso} keys in any entries (unless -\pkgopt[false]{autoseeindex}). To force it off, even if you use the -\gloskey{see} or \gloskey{seealso} 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[{\pkgoptdef{autoseeindex}}]\label{opt:autoseeindex} (New to -v1.16.) This is a boolean option. If true (default), this makes -the \gloskey{see} and \gloskey{seealso} keys automatically index the -cross-reference when an entry is defined. If false, the value -of those keys will still be stored in their corresponding fields -(and can be accessed using commands like \cs{glsxtrusesee} and -\cs{glsxtruseseealso}) but cross-reference won't be automatically -indexed. - -Note that the \pkgopt[only]{record} option automatically implements -\pkgopt[false]{autoseeindex}. - -For example, if an entry is defined as -\begin{verbatim} -\newglossaryentry{foo}{name={foo},description={},see={bar,baz}} -\end{verbatim} -then with \texttt{autoseeindex=true}, this is equivalent to -\begin{verbatim} -\newglossaryentry{foo}{name={foo},description={}} -\glssee{foo}{bar,baz} -\glossariesextrasetup{indexcrossrefs=true} -\GlsXtrSetField{foo}{see}{bar,baz} -\end{verbatim} -but with \texttt{autoseeindex=false}, this is equivalent to -\begin{verbatim} -\newglossaryentry{foo}{name={foo},description={}} -\GlsXtrSetField{foo}{see}{bar,baz} -\end{verbatim} -Note that \pkgopt{indexcrossrefs} isn't automatically implemented -by the presence of the \gloskey{see} key when \pkgopt{autoseeindex} -is false. - -It's therefore possible to remove the cross-references from the -location lists and set their position within the glossary style. - -Another method of preventing the automatic indexing is to -define the entries before the external indexing files have been -opened with \cs{makeglossaries}. Since the appropriate file isn't -open, the information can't be written to it. This will need -the package option \pkgoptfmt{seenoindex=ignore} (provided by -\styfmt{glossaries}) to prevent an error occurring. - -\item[{\pkgoptdef{record}}]\label{opt:record}(New to v1.08.) This is -a \meta{key}=\meta{value} option provided for the benefit of -\gls{bib2gls} (see \sectionref{sec:bib2gls}). If you want to use -\gls{bib2gls}, the recommended setting is \pkgopt[nameref]{record} -if you have hyperlinks and \pkgopt[only]{record} if you don't have hyperlinks. - -The option may only be set in the preamble and can't be used after -\cs{GlsXtrLoadResources}. If the value is missing -\pkgopt[only]{record} is assumed. Permitted values: -\begin{description} -\item[\pkgoptfmt{off}] This is the default setting. The indexing -is performed as normal using either \cs{makeglossaries} -or \cs{makenoidxglossaries}. This setting implements \pkgopt[error]{undefaction}. - -\item[\pkgoptfmt{only}] The indexing (recording) is performed by -\gls{bib2gls} (see \sectionref{sec:bib2gls}). Neither -\cs{makeglossaries} nor \cs{makenoidxglossaries} is permitted. -This setting implements \pkgopt[warn]{undefaction} and automatically -loads the supplementary \sty{glossaries-extra-bib2gls} package. -(There should be no need to explicitly load \sty{glossaries-extra-bib2gls}.) - -The glossaries should be displayed using \cs{printunsrtglossary} -(or \cs{printunsrtglossaries}). - -The document build process is (assuming the file is called -\texttt{myDoc.tex}): -\begin{verbatim} -pdflatex myDoc -bib2gls myDoc -pdflatex myDoc -\end{verbatim} -If you want letter groups you will need the \verb|--group| -or \verb|-g| switch when invoking \gls{bib2gls}: -\begin{verbatim} -pdflatex myDoc -bib2gls -g myDoc -pdflatex myDoc -\end{verbatim} - -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. - -The \pkgopt[only]{record} option will automatically set -the \styfmt{glossaries} package's \pkgopt[none]{sort} option -if available. (That option value was only introduced to -\styfmt{glossaries} v4.30.) - -\item[\pkgoptfmt{nameref}] (New to v1.37 and requires \gls{bib2gls} -v1.8+.) This option is like \pkgopt[only]{record} but additionally -records the current label information given by \cs{@currentlabel} -and \cs{@currentHref}, and provides a more reliable way of saving -the \cs{theH}\meta{counter} for the given location. This option -requires \sty{hyperref} otherwise it will fall back on the usual -location records. Remember that \cs{@currentHref} is always globally -updated whenever \cs{refstepcounter} is used, but \cs{@currentlabel} -isn't. This can cause some undesired side-effects with some settings. Remember also that the \pkgopt{indexcounter} option -increments the associated counter every time an entry is indexed, -which affects this option. See \sectionref{sec:recordnameref} for -further details. - -This option is best used with \pkgopt[chapter]{counter} or -\pkgopt[section]{counter} if you want the title included in the -location list. If the indexing counter is the default -\ctr{page}, only the location number is shown. Similarly for -\pkgopt[equation]{counter} (or \pkgopt[true]{equations}). - -\item[\pkgoptfmt{alsoindex}] Deprecated synonym of \pkgoptfmt{hybrid}. - -\item[\pkgoptfmt{hybrid}] This is a hybrid setting -that uses \gls{bib2gls} to fetch entry information from -\texttt{.bib} files, but uses \gls{makeindex} or \gls{xindy} -to create the glossary files (which are input with \ics{printglossary}). -Note that this requires a slower and more complicated build process -(see below). - -This hybrid approach is provided for the rare instances -where an existing \gls{xindy} rule or module is too complicated to convert to -a \gls{bib2gls} rule but the entries need to be fetched from a -\filetype{bib} file. There's no benefit in using this option with \gls{makeindex}. - -\begin{important} -Since it's redundant to make \gls{bib2gls} also sort, use \texttt{sort=none} in -\cs{GlsXtrLoadResources} for a faster build. -\end{important} - -This option must be used with \ics{makeglossaries} but not with -its optional argument. This option should not be used with -\cs{makenoidxglossaries}. You may need to change the transcript -file used by \gls{bib2gls} to avoid a clash with the transcript file -used by \gls{makeindex} or \gls{xindy}. (This can be done with -\gls{bib2gls}['s] \verb|--log-file| or \verb|-t| option.) - -Each glossary should be displayed using \cs{printglossary} (or -\cs{printglossaries} for all of them). This option is expected to be -used with \gls{bib2gls}'s \texttt{sort=none} setting and so -\sty{glossaries-extra-bib2gls} is not automatically loaded. - -The document build process is (assuming the file is called -\texttt{myDoc.tex}): -\begin{verbatim} -pdflatex myDoc -bib2gls myDoc -pdflatex myDoc -makeglossaries myDoc -pdflatex myDoc -\end{verbatim} -Note that, in this case, it's redundant to call \gls{bib2gls} with the -\verb|--group| or \verb|-g| switch as \gls{makeindex}/\gls{xindy} -will insert the group heading information into the corresponding -glossary file. (If you want \gls{bib2gls} to form the letter groups -then this hybrid method is inappropriate.) -\end{description} - -With the recording on (\pkgopt[only]{record}, -\pkgopt[nameref]{record} or \pkgopt[hybrid]{record}), 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. +\newcommand*{\abbrvstyleexamplelcuser}[2][]{% + \genabbrvstyleexamplestack{#1}{#2}{shrt fm}% + {\oarg{\gloskeyval{user1}{extra info}}}% + {}{}% +} -The hybrid method additionally performs the standard indexing action -that's required for \gls{makeindex} or \gls{xindy} to work. +\newcommand*{\abbrvstyleexampleucuser}[2][]{% + \genabbrvstyleexamplestack{#1}{#2}{SHRT FM}% + {\oarg{\gloskeyval{user1}{extra info}}}% + {}{}% +} -\item[{\pkgoptdef{equations}}] (New to v1.37.) This option will -cause the default location counter to automatically switch -to \ctr{equation} when inside a numbered equation environment, such -as \env{equation} or \env{align}. The counter can be explicitly -overridden with \gloskey[glslink]{counter} in the optional -arguments of commands like \cs{glslink} or \cs{gls} as usual. +\newcommand*{\abbrvstyleexamplelcuserdesc}[2][]{% + \genabbrvstyleexamplestack{#1}{#2}{shrt fm}% + {\oarg{\gloskeyval{description}{sample description},\newline + \gloskeyval{user1}{extra info}}}{}{}% +} -\item[{\pkgoptdef{floats}}] (New to v1.37.) This option will -cause the default location counter to automatically switch -to the corresponding counter when inside a floating environment, -such as \env{figure} or \env{table}. The counter can be explicitly -overridden with \gloskey[glslink]{counter} in the optional -arguments of commands like \cs{glslink} or \cs{gls} as usual. -Remember that within floats it's the \cs{caption} command that actually uses -\cs{refstepcounter}, so indexing before the caption will result in -the wrong reference. The commands for use in captions and sections, -such as \cs{glsfmttext} and \cs{glsfmtshort}, don't index. (See -\sectionref{sec:headtitle}). You may -want to consider using \cs{glsadd} after the caption (not before). For example: -\begin{verbatim} -\begin{figure}[htbp] - \centering - \includegraphics{example-image} - \caption{Sample \glsfmttext{foobar} figure} - \glsadd{foobar} -\end{figure} -\end{verbatim} - -\item[{\pkgoptdef{indexcounter}}] (New to v1.29.) This option (which -doesn't take a value) is primarily intended for use with -\gls{bib2gls} (v1.4+) and \sty{hyperref}. It can be used with -\gls{makeindex} or \gls{xindy} but it will interfere with the -\gls{numberlist} collation, so you won't have ranges and you'll have -duplicate page numbers present (but each page number will link to -the relevant part of the page where the indexing occurred). This -option automatically implements \pkgopt[wrglossary]{counter}. +\newcommand*{\abbrvstyleexampleucuserdesc}[2][]{% + \genabbrvstyleexamplestack{#1}{#2}{SHRT FM}% + {\oarg{\gloskeyval{description}{sample description},\newline + \gloskeyval{user1}{extra info}}}{}{}% +} -\begin{important} -This option works by incrementing \ctr{wrglossary} and -adding \ics{label}. This can cause a problem if the indexing -occurs in an \env{equation} environment as \sty{amsmath} -forbids multiple occurrences of \cs{label} (resulting in the -\qt{Multiple \cs{label}'s} error). It's best to change the counter -to \ctr{page} or \ctr{equation} when in maths mode with this option. -For example: -\begin{verbatim} -\renewcommand{\glslinkpresetkeys}{% - \ifmmode \setkeys{glslink}{counter=equation}\fi} -\renewcommand{\glsaddpresetkeys}{% - \ifmmode \setkeys{glossadd}{counter=equation}\fi} -\end{verbatim} -\end{important} +\newcommand*{\abbrvstyleexampleuchyp}[2][]{% + \genabbrvstyleexamplestack{#1}{#2}{SHRT FM}% + {}% + {}{\gls{glssetcategoryattributes}\marg{\cat{abbreviation}}\marg{\catattr{markwords},\catattr{markshortwords}}\marg{true}\newline}% +} -By default (with \sty{hyperref}), the page numbers in -\glspl{numberlist} link back to the top of the relevant page -(provided the format uses \cs{glshypernumber}). The -\pkgopt{indexcounter} option is designed to link back to the place -within the page where the indexing occurred. It does this by -creating a new counter (called \ctr{wrglossary}) that's incremented -with \cs{refstepcounter} every time an entry is indexed (but not via -cross-referencing commands, such as \cs{glssee}). A \cs{label} is -placed immediately after the increment command allowing the -back-referenced to be obtained with \cs{pageref}. The location, as -seen by the indexing application, is the value of the -\ctr{wrglossary} counter but this value is substituted with the page -reference when \gls{numberlist} is typeset. Since the counter is -used by all entries and is incremented every time any indexing -occurs, neither \gls{makeindex} nor \gls{xindy} can correctly -collate the lists. For example, if the first term to be referenced -is indexed three times on page~5 without any intervening terms then -the actual locations obtained from \ctr{wrglossary} will be 1, 2 and -3, which \gls{xindy} and \gls{makeindex} will try to form into the -range 1--3, but they should actually all simply appear as page~5, -whereas it can actually end up with 5--5. Conversely, a range may -not be formed where it would naturally occur if just the \ctr{page} -counter was used. - -Since \gls{bib2gls} is designed specifically to work with -\styfmt{glossaries-extra}, \gls{bib2gls} (v1.4+) will check for -\ctr{wrglossary} locations. If the default -\texttt{--merge-wrglossary-records} is on, then any records for the -same page for a given entry will be merged. In the above example -with three references on page~5, only a single record for page~5 for -that entry will be added to the \gls{numberlist} and it will link -back to the first instance on that page. Whereas if you use the -\texttt{--no-merge-wrglossary-records} switch, the \gls{numberlist} -will contain three instance of page~5, with each linking to the -corresponding place on that page. In both cases, consecutive pages -can form ranges, but it may look strange in the second case. - -See the \gls{bib2gls} documentation for the -\texttt{save-index-counter} resource option for more details. - -\item[{\pkgoptdef{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 the following 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. - - Remember that if \cs{newglossaryentry} wouldn't be allowed - in the \env{document} environment with the - base \styfmt{glossaries} package, then it still won't - be allowed with \pkgopt[true]{docdefs}. - If your glossaries occur at the end of the document, consider using - \pkgopt[restricted]{docdef} instead. - - \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). - - \item {\pkgopt[atom]{docdef}}: (new to version 1.34) - This option behaves like \pkgopt[restricted]{docdef} but creates the - \texttt{.glsdefs} file for - \href{https://atom.io/packages/autocomplete-glossaries}{atom's - autocomplete support}. This file isn't input by - \styfmt{glossaries-extra} and so associated problems with the use of - this file are avoided, but it allows the autocomplete support to - find the labels in the file. As with \pkgopt[restricted]{docdef}, - entries may be defined in the preamble or anywhere in the document, - but they may only be referenced after they have been defined. - Entries must be defined before the associated glossary is displayed. - - If you need a list of all entry labels for the use of an editor or - helper script you may also want to consider the package options - \pkgopt{writeglslabels} and \pkgopt{writeglslabelnames} provided by - the base \sty{glossaries} package. Note that with these options - and \pkgopt[atom]{docdef}, only the entry labels visible to \LaTeX\ can - be saved. So if you are using \gls{bib2gls} you will only get the - labels of the entries that are selected by \gls{bib2gls}. - - \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[{\pkgoptdef{nomissingglstext}}] This is a boolean option. -If true, this will suppress the warning written to the transcript -and 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. +\newcommand*{\abbrvstyleexampleuchypdesc}[2][]{% + \genabbrvstyleexamplestack{#1}{#2}{SHRT FM}% + {\oarg{\gloskeyval{description}{sample description}}\newline}% + {}% + {% + \gls{glssetcategoryattributes}\marg{\cat{abbreviation}}\marg{\catattr{markwords},\catattr{markshortwords}}\marg{true}\newline + }% +} -\item[{\pkgoptdef{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. (The file extensions are \filetype{glg-abr}, -\filetype{gls-abr} and \filetype{glo-abr}.) -In addition, this option 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} -If \sty{glossaries-extra-bib2gls} is also loaded then this option -will additionally provide: -\begin{definition}[\DescribeMacro\printunsrtabbreviations] -\cs{printunsrtabbreviations}\oarg{options} -\end{definition} -which uses \ics{printunsrtglossary}. +\newcommand{\summaryentryglossarystyle}[1]{% + {% + \renewcommand*{\glostylefmt}[1]{\texttt{##1}}% + \genericsummaryentryoption{#1}% + }% +} -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.) +\newcommand{\summaryentryabbreviationstyle}[1]{% + {% + \renewcommand*{\abbrstylefmt}[1]{\texttt{##1}}% + \genericsummaryentryoption{#1}% + }% +} -\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} +\renewcommand{\nlctuserguideletterrules}{% + \glsxtrGeneralLatinAtoGrules + \stringaccsupp + \gcmdmetameta{gls\-xtr}{category}{}{field}{acc\-supp} + {% + \note{user defined} + \desc{expands to the accessibility support command for the given + \idx{internalfieldlabel} and category, which is used by \gls{glsfieldaccsupp}} + } + % \glsfieldaccsupp + \gcmd{gls\-field\-acc\-supp} + { + \providedby{\sty{glossaries-accsupp} v4.45+} + \syntax{\margm{replacement}\margm{content}\margm{field}\margm{entry-label}} + \desc{if \sty{glossaries-extra} has been loaded, this command + will first check for the existence of the command + \gls{glsxtrcategoryfieldaccsupp}. If that command doesn't + exist or if \sty{glossaries-extra} hasn't been loaded, it then + checks for the existence of \csmetafmt{gls}{field}{accsupp} (for + example, \gls{glsshortaccsupp}). + Failing that it will use \gls{glsaccsupp}. Whichever command is + found first, \code{\meta{cs}\margm{replacement}\margm{content}} + is performed.} + } + % \glsaccsupp + \gcmd{gls\-acc\-supp} + { + \providedby{\sty{glossaries-accsupp}} + \syntax{\margm{replacement}\margm{content}} + \desc{applies \meta{replacement} as the ActualText for + \meta{content} using \gls{glsaccessibility}} + } + % \glsshortaccsupp + \gcmd{gls\-short\-acc\-supp} + { + \providedby{\sty{glossaries-accsupp} v4.45+} + \syntax{\margm{replacement}\margm{content}} + \desc{applies \meta{replacement} as the expansion (E) attribute for + \meta{content} using \gls{glsaccessibility}} + } + % \glsaccessibility + \gcmd{gls\-ac\-ces\-si\-bil\-ity} + { + \providedby{\sty{glossaries-accsupp} v4.45+} + \syntax{\oargm{options}\margm{PDF element}\margm{value}\margm{content}} + \desc{applies \meta{value} as the accessibility attribute + \meta{PDF element} for the given \meta{content}. This + internally uses the accessibility support provided by \sty{accsupp}} + } + % + % ABBREVIATION STYLES + \gidxpl{abbrvstyle}% + {% + \common + \field{text}{abbreviation style}% + \desc{abbreviations defined using \gls{newabbreviation} will + follow the style associated with the entry's category. If there + is no style associated with the entry's category, the style for + the \cat{abbreviation} category is used (the default is + \abbrstyle{long-short}). Note that + \sty{glossaries-extra} redefines \gls{newacronym} to use + \gls{newabbreviation} with \code{\gloskey{category}\dequals\cat{acronym}} + so any entry defined with \gls{newacronym} will use the + abbreviation style for the \cat{acronym} category (the + default is \abbrstyle{short-nolong})} + } + % long-short + \gabbrsty{long\dhyphen short}% + {% + \desc{an \idx{abbrvstyle} that shows the long form followed by the + short form on \idx{firstuse}. If the \meta{insert} argument is + used with the \idx{glslike} or \idx{glstextlike} commands, it will + be placed after the long form on \idx{firstuse}. On + \idx{subsequentuse}, only the short form is shown (followed by + \meta{insert}, if provided). This style sets the + \catattr{regular} attribute to \code{false} (which means that + the \idx{glslike} commands won't use the + \gloskey{first}\slash\gloskey{firstplural} or + \gloskey{text}\slash\gloskey{plural} values)} + } + % long-short-desc + \gabbrsty{long\dhyphen short\dhyphen desc}% + {% + \desc{as \abbrstyle{long-short} but the \gloskey{description} + must be supplied in \meta{options}} + } + % short-long + \gabbrsty{short\dhyphen long}% + {% + \desc{an \idx{abbrvstyle} that shows the short form followed by the + long form on \idx{firstuse}. If the \meta{insert} argument is + used with the \idx{glslike} or \idx{glstextlike} commands, it will + be placed after the short form on \idx{firstuse}. On + \idx{subsequentuse}, only the short form is shown (followed by + \meta{insert}, if provided). This style sets the + \catattr{regular} attribute to \code{false} (which means that + the \idx{glslike} commands won't use the + \gloskey{first}\slash\gloskey{firstplural} or + \gloskey{text}\slash\gloskey{plural} values)} + } + % short-long-desc + \gabbrsty{short\dhyphen long\dhyphen desc}% + {% + \desc{as \abbrstyle{short-long} but the \gloskey{description} + must be supplied in \meta{options}} + } + % short-nolong + \gabbrsty{short\dhyphen nolong}% + {% + \desc{an \idx{abbrvstyle} that only shows the short form on + \idx{firstuse} and \idx{subsequentuse}. The long form won't be + showed unless you use a command like \gls{glsxtrlong}. The full + form will only be shown with commands like \gls{glsxtrfull}. + This style sets the \catattr{regular} attribute to \code{true}} + } + % short + \gabbrstyalias{short}{short-nolong} + % short-nolong-desc + \gabbrsty{short\dhyphen nolong\dhyphen desc}% + {% + \desc{as \abbrstyle{short-nolong} but the \gloskey{description} + must be supplied in \meta{options}} + } + % short-desc + \gabbrstyalias{short\dhyphen desc}{short-nolong-desc} + % short-nolong-noreg + \gabbrsty{short\dhyphen nolong\dhyphen noreg}% + {% + \desc{as \abbrstyle{short-nolong} but it will set the + \catattr{regular} attribute to \code{false}} + } + % short-nolong-desc-noreg + \gabbrsty{short\dhyphen nolong\dhyphen desc\dhyphen noreg}% + {% + \desc{as \abbrstyle{short-nolong-desc} but it will set the + \catattr{regular} attribute to \code{false}} + } + % short-sc-nolong + \gabbrsty{short\dhyphen sc\dhyphen nolong}% + {% + \desc{an \idx{abbrvstyle} like \abbrstyle{short-nolong} but + formats the short form in a small caps font (\gls{textsc}). + The short form should therefore be in lowercase} + } + % short-sc + \gabbrstyalias{short\dhyphen sc}{short-sc-nolong} + % short-sc-nolong-desc + \gabbrsty{short\dhyphen sc\dhyphen nolong\dhyphen desc}% + {% + \desc{an \idx{abbrvstyle} like \abbrstyle{short-nolong-desc} but + formats the short form in a small caps font (\gls{textsc}). + The short form should therefore be in lowercase} + } + % short-sc-desc + \gabbrstyalias{short\dhyphen sc\dhyphen desc}{short-sc-nolong-desc} + % nolong-short + \gabbrsty{nolong\dhyphen short}% + {% + \desc{as \abbrstyle{short-nolong} but the \idx{inlinefullform} + shows the long form followed by the short form in parentheses} + } + % nolong-short-noreg + \gabbrsty{nolong\dhyphen short\dhyphen noreg}% + {% + \desc{as \abbrstyle{nolong-short} but it will set the + \catattr{regular} attribute to \code{false}} + } + % nolong-short-sc + \gabbrsty{nolong\dhyphen short\dhyphen sc}% + {% + \desc{an \idx{abbrvstyle} like \abbrstyle{nolong-short} but + formats the short form in a small caps font (\gls{textsc}). + The short form should therefore be in lowercase} + } + % long-noshort + \gabbrsty{long\dhyphen noshort}% + {% + \desc{an \idx{abbrvstyle} that only shows the long form on + \idx{firstuse} and \idx{subsequentuse}. The short form won't be + showed unless you use a command like \gls{glsxtrshort}. The full + form will only be shown with commands like \gls{glsxtrfull}. + This style sets the \catattr{regular} attribute to \code{true}} + } + % long + \gabbrstyalias{long}{long-noshort} + % long-noshort-desc + \gabbrsty{long\dhyphen noshort\dhyphen desc}% + {% + \desc{an \idx{abbrvstyle} that only shows the long form on + \idx{firstuse} and \idx{subsequentuse}. The short form won't be + showed unless you use a command like \gls{glsxtrshort}. The + \gloskey{description} key must be supplied. The full + form will only be shown with commands like \gls{glsxtrfull}. + This style sets the \catattr{regular} attribute to \code{true}} + } + % long-desc + \gabbrstyalias{long-desc}{long-noshort-desc} + % long-noshort-desc-noreg + \gabbrsty{long\dhyphen noshort\dhyphen desc\dhyphen noreg}% + {% + \desc{as \abbrstyle{long-noshort-desc} but it will set the + \catattr{regular} attribute to \code{false}} + } + % long-noshort-noreg + \gabbrsty{long\dhyphen noshort\dhyphen noreg}% + {% + \desc{as \abbrstyle{long-noshort} but it will set the + \catattr{regular} attribute to \code{false}} + } + % long-noshort-sc + \gabbrsty{long\dhyphen noshort\dhyphen sc}% + {% + \desc{an \idx{abbrvstyle} like \abbrstyle{long-noshort} but + formats the short form in a small caps font (\gls{textsc}). + The short form should therefore be in lowercase} + } + % long-noshort-sc-desc + \gabbrsty{long\dhyphen noshort\dhyphen sc\dhyphen desc}% + {% + \desc{an \idx{abbrvstyle} like \abbrstyle{long-noshort-desc} but + formats the short form in a small caps font (\gls{textsc}). + The short form should therefore be in lowercase} + } + % long-short-sc + \gabbrsty{long\dhyphen short\dhyphen sc}% + {% + \desc{an \idx{abbrvstyle} like \abbrstyle{long-short} but + formats the short form in a small caps font (\gls{textsc}). + The short form should therefore be in lowercase} + } + % long-short-sc-desc + \gabbrsty{long\dhyphen short\dhyphen sc\dhyphen desc}% + {% + \desc{an \idx{abbrvstyle} like \abbrstyle{long-short-desc} but + formats the short form in a small caps font (\gls{textsc}). + The short form should therefore be in lowercase} + } + % short-sc-long + \gabbrsty{short\dhyphen sc\dhyphen long}% + {% + \desc{an \idx{abbrvstyle} like \abbrstyle{short-long} but + formats the short form in a small caps font (\gls{textsc}). + The short form should therefore be in lowercase} + } + % short-sc-long-desc + \gabbrsty{short\dhyphen sc\dhyphen long\dhyphen desc}% + {% + \desc{an \idx{abbrvstyle} like \abbrstyle{short-long-desc} but + formats the short form in a small caps font (\gls{textsc}). + The short form should therefore be in lowercase} + } + % long-short-sm + \gabbrsty{long\dhyphen short\dhyphen sm}% + {% + \desc{an \idx{abbrvstyle} like \abbrstyle{long-short} but + formats the short form in a smaller font (\gls{textsmaller}). + The \sty{relsize} package is must be loaded} + } + % long-short-sm-desc + \gabbrsty{long\dhyphen short\dhyphen sm\dhyphen desc}% + {% + \desc{an \idx{abbrvstyle} like \abbrstyle{long-short-desc} but + formats the short form in a smaller font (\gls{textsmaller}). + The \sty{relsize} package is must be loaded} + } + % long-short-em + \gabbrsty{long\dhyphen short\dhyphen em}% + {% + \desc{an \idx{abbrvstyle} like \abbrstyle{long-short} but + formats the short form in an emphasized font (\gls{emph})} + } + % long-short-em-desc + \gabbrsty{long\dhyphen short\dhyphen em\dhyphen desc}% + {% + \desc{an \idx{abbrvstyle} like \abbrstyle{long-short-desc} but + formats the short form in an emphasized font (\gls{emph})} + } + % long-em-short-em + \gabbrsty{long\dhyphen em\dhyphen short\dhyphen em}% + {% + \desc{an \idx{abbrvstyle} like \abbrstyle{long-short} but + formats both the long and short form in an emphasized font (\gls{emph})} + } + % long-em-short-em-desc + \gabbrsty{long\dhyphen em\dhyphen short\dhyphen em\dhyphen desc}% + {% + \desc{an \idx{abbrvstyle} like \abbrstyle{long-short-desc} but + formats both the long and short form in an emphasized font (\gls{emph})} + } + % short-sm-long + \gabbrsty{short\dhyphen sm\dhyphen long}% + {% + \desc{an \idx{abbrvstyle} like \abbrstyle{short-long} but + formats the short form in a smaller font (\gls{textsmaller}). + The \sty{relsize} package is must be loaded} + } + % short-sm-long-desc + \gabbrsty{short\dhyphen sm\dhyphen long\dhyphen desc}% + {% + \desc{an \idx{abbrvstyle} like \abbrstyle{short-long-desc} but + formats the short form in a smaller font (\gls{textsmaller}). + The \sty{relsize} package is must be loaded} + } + % short-sm-nolong + \gabbrsty{short\dhyphen sm\dhyphen nolong}% + {% + \desc{an \idx{abbrvstyle} like \abbrstyle{short-nolong} but + formats the short form in a smaller font (\gls{textsmaller}). + The \sty{relsize} package is must be loaded} + } + % short-sm + \gabbrstyalias{short\dhyphen sm}{short-sm-nolong} + % short-sm-nolong-desc + \gabbrsty{short\dhyphen sm\dhyphen nolong\dhyphen desc}% + {% + \desc{an \idx{abbrvstyle} like \abbrstyle{short-nolong-desc} but + formats the short form in a smaller font (\gls{textsmaller}). + The \sty{relsize} package is must be loaded} + } + % short-sm-desc + \gabbrstyalias{short\dhyphen sm\dhyphen desc}{short-sm-nolong-desc} + % nolong-short-sm + \gabbrsty{nolong\dhyphen short\dhyphen sm}% + {% + \desc{an \idx{abbrvstyle} like \abbrstyle{nolong-short} but + formats the short form in a smaller font (\gls{textsmaller}). + The \sty{relsize} package is must be loaded} + } + % long-noshort-sm + \gabbrsty{long\dhyphen noshort\dhyphen sm}% + {% + \desc{an \idx{abbrvstyle} like \abbrstyle{long-noshort} but + formats the short form in a smaller font (\gls{textsmaller}). + The \sty{relsize} package is must be loaded} + } + % long-noshort-sm-desc + \gabbrsty{long\dhyphen noshort\dhyphen sm\dhyphen desc}% + {% + \desc{an \idx{abbrvstyle} like \abbrstyle{long-noshort-desc} but + formats the short form in a smaller font (\gls{textsmaller}). + The \sty{relsize} package is must be loaded} + } + % short-em-long + \gabbrsty{short\dhyphen em\dhyphen long}% + {% + \desc{an \idx{abbrvstyle} like \abbrstyle{short-long} but + formats the short form in an emphasized font (\gls{emph})} + } + % short-em-long-desc + \gabbrsty{short\dhyphen em\dhyphen long\dhyphen desc}% + {% + \desc{an \idx{abbrvstyle} like \abbrstyle{short-long-desc} but + formats the short form in an emphasized font (\gls{emph})} + } + % short-em-long-em + \gabbrsty{short\dhyphen em\dhyphen long\dhyphen em}% + {% + \desc{an \idx{abbrvstyle} like \abbrstyle{short-long} but + formats both the long and short form in an emphasized font (\gls{emph})} + } + % short-em-long-em-desc + \gabbrsty{short\dhyphen em\dhyphen long\dhyphen em\dhyphen desc}% + {% + \desc{an \idx{abbrvstyle} like \abbrstyle{short-long-desc} but + formats both the long and short form in an emphasized font (\gls{emph})} + } + % short-em-nolong + \gabbrsty{short\dhyphen em\dhyphen nolong}% + {% + \desc{an \idx{abbrvstyle} like \abbrstyle{short-nolong} but + formats the short form in an emphasized font (\gls{emph})} + } + % short-em + \gabbrstyalias{short\dhyphen em}{short-em-nolong} + % short-em-nolong-desc + \gabbrsty{short\dhyphen em\dhyphen nolong\dhyphen desc}% + {% + \desc{an \idx{abbrvstyle} like \abbrstyle{short-nolong-desc} but + formats the short form in an emphasized font (\gls{emph})} + } + % short-em-desc + \gabbrstyalias{short\dhyphen em\dhyphen desc}{short-em-nolong-desc} + % nolong-short-em + \gabbrsty{nolong\dhyphen short\dhyphen em}% + {% + \desc{an \idx{abbrvstyle} like \abbrstyle{nolong-short} but + formats the short form in an emphasized font (\gls{emph})} + } + % long-noshort-em + \gabbrsty{long\dhyphen noshort\dhyphen em}% + {% + \desc{an \idx{abbrvstyle} like \abbrstyle{long-noshort} but + formats the short form in an emphasized font (\gls{emph})} + } + % long-noshort-em-desc + \gabbrsty{long\dhyphen noshort\dhyphen em\dhyphen desc}% + {% + \desc{an \idx{abbrvstyle} like \abbrstyle{long-noshort-desc} but + formats the short form in an emphasized font (\gls{emph})} + } + % long-em-noshort-em + \gabbrsty{long\dhyphen em\dhyphen noshort\dhyphen em}% + {% + \desc{an \idx{abbrvstyle} like \abbrstyle{long-noshort} but + formats both the long and short form in an emphasized font (\gls{emph})} + } + % long-em-noshort-em-desc + \gabbrsty{long\dhyphen em\dhyphen noshort\dhyphen em\dhyphen desc}% + {% + \desc{an \idx{abbrvstyle} like \abbrstyle{long-noshort-desc} but + formats both the long and short form in an emphasized font (\gls{emph})} + } + % long-em-noshort-em-noreg + \gabbrsty{long\dhyphen em\dhyphen noshort\dhyphen em\dhyphen noreg}% + {% + \desc{an \idx{abbrvstyle} like \abbrstyle{long-em-noshort-em} but + sets the \catattr{regular} attribute to \code{false}} + } + % long-em-noshort-em-desc-noreg + \gabbrsty{long\dhyphen em\dhyphen noshort\dhyphen em\dhyphen desc\dhyphen noreg}% + {% + \desc{an \idx{abbrvstyle} like \abbrstyle{long-em-noshort-em-desc} but + sets the \catattr{regular} attribute to \code{false}} + } + % short-footnote + \gabbrsty{short\dhyphen footnote}% + {% + \desc{an \idx{abbrvstyle} that shows the short form with the + long form as a footnote on \idx{firstuse}. If the \meta{insert} argument is + used with the \idx{glslike} or \idx{glstextlike} commands, it will + be placed after the short form, before the footnote marker, on \idx{firstuse}. On + \idx{subsequentuse}, only the short form is shown (followed by + \meta{insert}, if provided). The \idx{inlinefullform} shows the + short form followed by the long form in parentheses. This style sets the + \catattr{regular} attribute to \code{false} (which means that + the \idx{glslike} commands won't use the + \gloskey{first}\slash\gloskey{firstplural} or + \gloskey{text}\slash\gloskey{plural} values). This style also + sets the \catattr{nohyperfirst} attribute to \code{true} to + avoid nesting the footnote marker link. If you want hyperlinks + on \idx{firstuse}, use the \abbrstyle{short-postfootnote} style + instead} + } + % footnote + \gabbrstyalias{footnote}{short-footnote} + % short-footnote-desc + \gabbrsty{short\dhyphen footnote\dhyphen desc}% + {% + \desc{as \abbrstyle{short-footnote} but the \gloskey{description} + must be supplied in \meta{options}} + } + % footnote-desc + \gabbrstyalias{footnote\dhyphen desc}{short-footnote-desc} + % short-postfootnote + \gabbrsty{short\dhyphen postfootnote}% + {% + \desc{similar to \abbrstyle{short-footnote} but the footnote is + placed in the \idx{postlinkhook}} + } + % postfootnote + \gabbrstyalias{postfootnote}{short-postfootnote} + % short-postfootnote-desc + \gabbrsty{short\dhyphen postfootnote\dhyphen desc}% + {% + \desc{as \abbrstyle{short-postfootnote} but the \gloskey{description} + must be supplied in \meta{options}} + } + % postfootnote-desc + \gabbrstyalias{postfootnote\dhyphen desc}{short-postfootnote-desc} + % short-sc-footnote + \gabbrsty{short\dhyphen sc\dhyphen footnote}% + {% + \desc{an \idx{abbrvstyle} like \abbrstyle{short-footnote} but + formats the short form in a small caps font (\gls{textsc}). + The short form should therefore be in lowercase} + } + % short-sc-footnote-desc + \gabbrsty{short\dhyphen sc\dhyphen footnote\dhyphen desc}% + {% + \desc{an \idx{abbrvstyle} like \abbrstyle{short-footnote-desc} but + formats the short form in a small caps font (\gls{textsc}). + The short form should therefore be in lowercase} + } + % short-sc-postfootnote + \gabbrsty{short\dhyphen sc\dhyphen postfootnote}% + {% + \desc{an \idx{abbrvstyle} like \abbrstyle{short-postfootnote} but + formats the short form in a small caps font (\gls{textsc}). + The short form should therefore be in lowercase} + } + % short-sc-postfootnote-desc + \gabbrsty{short\dhyphen sc\dhyphen postfootnote\dhyphen desc}% + {% + \desc{an \idx{abbrvstyle} like \abbrstyle{short-postfootnote-desc} but + formats the short form in a small caps font (\gls{textsc}). + The short form should therefore be in lowercase} + } + % short-sm-footnote + \gabbrsty{short\dhyphen sm\dhyphen footnote}% + {% + \desc{an \idx{abbrvstyle} like \abbrstyle{short-footnote} but + formats the short form in a smaller font (\gls{textsmaller}). + The \sty{relsize} package is must be loaded} + } + % short-sm-footnote-desc + \gabbrsty{short\dhyphen sm\dhyphen footnote\dhyphen desc}% + {% + \desc{an \idx{abbrvstyle} like \abbrstyle{short-footnote-desc} but + formats the short form in a smaller font (\gls{textsmaller}). + The \sty{relsize} package is must be loaded} + } + % short-sm-postfootnote + \gabbrsty{short\dhyphen sm\dhyphen postfootnote}% + {% + \desc{an \idx{abbrvstyle} like \abbrstyle{short-postfootnote} but + formats the short form in a smaller font (\gls{textsmaller}). + The \sty{relsize} package is must be loaded} + } + % short-sm-postfootnote-desc + \gabbrsty{short\dhyphen sm\dhyphen postfootnote\dhyphen desc}% + {% + \desc{an \idx{abbrvstyle} like \abbrstyle{short-postfootnote-desc} but + formats the short form in a smaller font (\gls{textsmaller}). + The \sty{relsize} package is must be loaded} + } + % short-em-footnote + \gabbrsty{short\dhyphen em\dhyphen footnote}% + {% + \desc{an \idx{abbrvstyle} like \abbrstyle{short-footnote} but + formats the short form in an emphasized font (\gls{emph})} + } + % short-em-footnote-desc + \gabbrsty{short\dhyphen em\dhyphen footnote\dhyphen desc}% + {% + \desc{an \idx{abbrvstyle} like \abbrstyle{short-footnote-desc} but + formats the short form in an emphasized font (\gls{emph})} + } + % short-em-postfootnote + \gabbrsty{short\dhyphen em\dhyphen postfootnote}% + {% + \desc{an \idx{abbrvstyle} like \abbrstyle{short-postfootnote} but + formats the short form in an emphasized font (\gls{emph})} + } + % short-em-postfootnote-desc + \gabbrsty{short\dhyphen em\dhyphen postfootnote\dhyphen desc}% + {% + \desc{an \idx{abbrvstyle} like \abbrstyle{short-postfootnote-desc} but + formats the short form in an emphasized font (\gls{emph})} + } + % long-short-user + \gabbrsty{long\dhyphen short\dhyphen user}% + {% + \desc{an \idx{abbrvstyle} like \abbrstyle{long-short} but + includes the value of the field identified by + \gls{glsxtruserfield} (if set) in the parenthetical content} + } + % long-postshort-user + \gabbrsty{long\dhyphen postshort\dhyphen user}% + {% + \desc{an \idx{abbrvstyle} like \abbrstyle{long-short-user} but + the parenthetical content is placed in the \idx{postlinkhook}} + } + % long-short-user-desc + \gabbrsty{long\dhyphen short\dhyphen user\dhyphen desc}% + {% + \desc{an \idx{abbrvstyle} like \abbrstyle{long-short-user} but + the description must be supplied} + } + % long-postshort-user-desc + \gabbrsty{long\dhyphen postshort\dhyphen user\dhyphen desc}% + {% + \desc{an \idx{abbrvstyle} like \abbrstyle{long-postshort-user} but + the description must be supplied} + } + % long-postshort-sc-user + \gabbrsty{long\dhyphen postshort\dhyphen sc\dhyphen user}% + {% + \desc{an \idx{abbrvstyle} like \abbrstyle{long-postshort-user} but + formats the short form in a small caps font (\gls{textsc}). + The short form should therefore be in lowercase} + } + % long-postshort-sc-user-desc + \gabbrsty{long\dhyphen postshort\dhyphen sc\dhyphen user\dhyphen desc}% + {% + \desc{an \idx{abbrvstyle} like \abbrstyle{long-postshort-sc-user} but + the description must be supplied} + } + % short-postlong-user + \gabbrsty{short\dhyphen postlong\dhyphen user}% + {% + \desc{an \idx{abbrvstyle} like \abbrstyle{short-long} but + includes the value of the field identified by + \gls{glsxtruserfield} (if set) in the parenthetical content, + which is placed in the \idx{postlinkhook}} + } + % short-postlong-user-desc + \gabbrsty{short\dhyphen postlong\dhyphen user\dhyphen desc}% + {% + \desc{an \idx{abbrvstyle} like \abbrstyle{short-postlong-user} but + the description must be supplied} + } + % short-long-user + \gabbrsty{short\dhyphen long\dhyphen user}% + {% + \desc{an \idx{abbrvstyle} like \abbrstyle{short-long} but + includes the value of the field identified by + \gls{glsxtruserfield} (if set) in the parenthetical content} + } + % short-long-user-desc + \gabbrsty{short\dhyphen long\dhyphen user\dhyphen desc}% + {% + \desc{an \idx{abbrvstyle} like \abbrstyle{short-long-user} but + the description must be supplied} + } + % long-hyphen-short-hyphen + \gabbrsty{long\dhyphen hyphen\dhyphen short\dhyphen hyphen}% + {% + \desc{an \idx{abbrvstyle} like \abbrstyle{long-short} but + checks if the inserted material starts with a hyphen (use with + \catattr{markwords} or \catattr{markshortwords} attributes)} + } + % long-hyphen-postshort-hyphen + \gabbrsty{long\dhyphen hyphen\dhyphen postshort\dhyphen hyphen}% + {% + \desc{an \idx{abbrvstyle} like \abbrstyle{long-hyphen-short-hyphen} but + places the insert and parenthetical material in the \idx{postlinkhook}} + } + % long-hyphen-short-hyphen-desc + \gabbrsty{long\dhyphen hyphen\dhyphen short\dhyphen hyphen\dhyphen desc}% + {% + \desc{an \idx{abbrvstyle} like \abbrstyle{long-hyphen-short-hyphen} but + the description must be supplied} + } + % long-hyphen-postshort-hyphen-desc + \gabbrsty{long\dhyphen hyphen\dhyphen postshort\dhyphen hyphen\dhyphen desc}% + {% + \desc{an \idx{abbrvstyle} like \abbrstyle{long-hyphen-short-hyphen-desc} but + places the insert and parenthetical material in the \idx{postlinkhook}} + } + % long-hyphen-noshort-desc-noreg + \gabbrsty{long\dhyphen hyphen\dhyphen noshort\dhyphen desc\dhyphen noreg}% + {% + \desc{an \idx{abbrvstyle} like \abbrstyle{long-noshort-desc} but + checks if the inserted material starts with a hyphen (use with + \catattr{markwords} attribute)} + } + % long-hyphen-noshort-noreg + \gabbrsty{long\dhyphen hyphen\dhyphen noshort\dhyphen noreg}% + {% + \desc{an \idx{abbrvstyle} like \abbrstyle{long-hyphen-short-hyphen} but + doesn't show the short form on \idx{firstuse}} + } + % short-hyphen-long-hyphen + \gabbrsty{short\dhyphen hyphen\dhyphen long\dhyphen hyphen}% + {% + \desc{an \idx{abbrvstyle} like \abbrstyle{short-long} but + checks if the inserted material starts with a hyphen (use with + \catattr{markwords} or \catattr{markshortwords} attributes)} + } + % short-hyphen-long-hyphen-desc + \gabbrsty{short\dhyphen hyphen\dhyphen long\dhyphen hyphen\dhyphen desc}% + {% + \desc{an \idx{abbrvstyle} like \abbrstyle{short-hyphen-long-hyphen} but + the description must be supplied} + } + % short-hyphen-postlong-hyphen + \gabbrsty{short\dhyphen hyphen\dhyphen postlong\dhyphen hyphen}% + {% + \desc{an \idx{abbrvstyle} like \abbrstyle{short-hyphen-long-hyphen} but + the insert and parenthetical material are placed in the \idx{postlinkhook}} + } + % short-hyphen-postlong-hyphen-desc + \gabbrsty{short\dhyphen hyphen\dhyphen postlong\dhyphen hyphen\dhyphen desc}% + {% + \desc{an \idx{abbrvstyle} like \abbrstyle{short-hyphen-long-hyphen-desc} but + the insert and parenthetical material are placed in the \idx{postlinkhook}} + } + % long-only-short-only + \gabbrsty{long\dhyphen only\dhyphen short\dhyphen only} + { + \desc{an \idx{abbrvstyle} that only shows the long form on + \idx{firstuse} and only shows the short form on \idx{subsequentuse}} + } + % long-only-short-only-desc + \gabbrsty{long\dhyphen only\dhyphen short\dhyphen only\dhyphen desc} + { + \desc{an \idx{abbrvstyle} like \abbrstyle{long-only-short-only} + but the description must be supplied} + } + % long-only-short-sc-only + \gabbrsty{long\dhyphen only\dhyphen short\dhyphen sc\dhyphen only} + { + \desc{an \idx{abbrvstyle} like \abbrstyle{long-only-short-only} + but uses \idx{smallcaps} for the short form} + } + % long-only-short-sc-only-desc + \gabbrsty{long\dhyphen only\dhyphen short\dhyphen sc\dhyphen only\dhyphen desc} + { + \desc{an \idx{abbrvstyle} like \abbrstyle{long-only-short-sc-only} + but the description must be supplied} + } + % long-sc + \gdepabbrsty{long\dhyphen sc}{long-noshort-sc} + % long-desc-sc + \gdepabbrsty{long\dhyphen desc\dhyphen sc}{long-noshort-sc-desc} + % footnote-sc + \gdepabbrsty{footnote\dhyphen sc}{short-sc-footnote} + % postfootnote-sc + \gdepabbrsty{postfootnote\dhyphen sc}{short-sc-postfootnote} + % long-sm + \gdepabbrsty{long\dhyphen sm}{long-noshort-sm} + % long-desc-sm + \gdepabbrsty{long\dhyphen desc\dhyphen sm}{long-noshort-sm-desc} + % footnote-sm + \gdepabbrsty{footnote\dhyphen sm}{short-sm-footnote} + % postfootnote-sm + \gdepabbrsty{postfootnote\dhyphen sm}{short-sm-postfootnote} + % long-em + \gdepabbrsty{long\dhyphen em}{long-noshort-em} + % long-desc-em + \gdepabbrsty{long\dhyphen desc\dhyphen em}{long-noshort-em-desc} + % footnote-em + \gdepabbrsty{footnote\dhyphen em}{short-em-footnote} + % postfootnote-em + \gdepabbrsty{postfootnote\dhyphen em}{short-em-postfootnote} + % base acronym styles + \gidx{acronymstyle}{\name{acronym (base) style}% + \field{text}{acronym style} + } + \gacrsty{long\dhyphen short}{} + \gacrsty{long\dhyphen sc\dhyphen short}{} + \gacrsty{long\dhyphen sm\dhyphen short}{} + \gacrsty{long\dhyphen sp\dhyphen short}{} + \gacrsty{short\dhyphen long}{} + \gacrsty{sc\dhyphen short\dhyphen long}{} + \gacrsty{sm\dhyphen short\dhyphen long}{} + \gacrsty{long\dhyphen short\dhyphen desc}{} + \gacrsty{long\dhyphen sc\dhyphen short\dhyphen desc}{} + \gacrsty{long\dhyphen sm\dhyphen short\dhyphen desc}{} + \gacrsty{long\dhyphen sp\dhyphen short\dhyphen desc}{} + \gacrsty{short\dhyphen long\dhyphen desc}{} + \gacrsty{sc\dhyphen short\dhyphen long\dhyphen desc}{} + \gacrsty{sm\dhyphen short\dhyphen long\dhyphen desc}{} + \gacrsty{dua}{} + \gacrsty{dua\dhyphen desc}{} + \gacrsty{footnote}{} + \gacrsty{footnote\dhyphen sc}{} + \gacrsty{footnote\dhyphen sm}{} + \gacrsty{footnote\dhyphen desc}{} + \gacrsty{footnote\dhyphen sc\dhyphen desc}{} + \gacrsty{footnote\dhyphen sm\dhyphen desc}{} + % GLOSSARY STYLES: + % \setglossarystyle + \gcmd{set\-glossary\-style}% + {% + \providedby{\sty{glossaries} v3.08a+}% + \syntax{\margm{style-name}} + \desc{set the current \idx{glossarystyle} to \meta{style-name}. + Redefined by \sty{glossaries-extra} to include \gls{glsxtrpreglossarystyle}} + } + % \glsxtrpreglossarystyle + \gcmd{gls\-xtr\-pre\-glossary\-style} + { + \providedby{\sty{glossaries-extra} v1.49+}% + \desc{hook performed by \gls{setglossarystyle} to initialise + default definitions of style commands} + } + \gidxpl{glossarystyle}% + {% + \common + \field{text}{glossary style}% + \desc{the default style may be set with \gls{setglossarystyle} +or use: +\begin{compactcodebox} +\csfmt{usepackage}[\optval{stylemods}{\meta{name}},\optval{style}{\meta{style-name}}]\marg{glossaries-extra} +\end{compactcodebox} +where the style is provided by package \styfmt{glossary-\meta{name}}. +The default style can be overridden for individual \idxpl{glossary} +with the \printglossopt{style} option. For a summary of all +available styles, see \gallerypage{glossaries-styles}{Gallery: +Predefined Styles}} + } + % glossary style: inline + \gglosty{inline}% + {% + \providedby{\sty{glossary-inline}}% + \desc{a compact style with all entries listed in the + same paragraph and no \idxpl{group}, locations or symbols} + } + % glossary style: list + \gglosty{list}% + {% + \providedby{\sty{glossary-list}}% + \desc{this style uses the \env{description} environment + and places the entry name in the optional argument of + \gls{item}. Symbols and sub-entry names are not shown} + } + % glossary style: listgroup + \gglosty{list\-group}% + {% + \providedby{\sty{glossary-list}}% + \desc{as \glostyle{list} but has headers at the start of each + \idx{group}} + } + % glossary style: listhypergroup + \gglosty{list\-hyper\-group}% + {% + \providedby{\sty{glossary-list}}% + \desc{as \glostyle{listgroup} but has a row at the start with + hyperlinks to each \idx{group}} + } + % glossary style: altlist + \gglosty{alt\-list}% + {% + \providedby{\sty{glossary-list}}% + \desc{as \glostyle{list} but starts the description on a new line} + } + % glossary style: listdotted + \gglosty{list\-dotted}% + {% + \providedby{\sty{glossary-list}}% + \desc{a \glostyle{list}-like style that has a dotted leader +between the name and description. The \idx{locationlist} isn't shown} + } + % glossary style: long + \gglosty{long}% + {% + \providedby{\sty{glossary-long}}% + \desc{this style uses the \env{longtable} environment + (provided by the \sty{longtable} package). Symbols and + sub-entry names are not shown} + } + % glossary style: long-name-desc + \gglosty{long\dhyphen name\dhyphen desc}% + {% + \providedby{\sty{glossary-longextra} v1.37+}% + \desc{this style displays the \idx{glossary} in a table for + (either \env{longtable} or \env{tabular}) with two columns: the + name and the description} + } + % glossary style: long-desc-name + \gglosty{long\dhyphen desc\dhyphen name}% + {% + \providedby{\sty{glossary-longextra} v1.37+}% + \desc{this style displays the \idx{glossary} in a table for + (either \env{longtable} or \env{tabular}) with two columns: the + description and the name} + } + % glossary style: long-name-desc-loc + \gglosty{long\dhyphen name\dhyphen desc\dhyphen loc}% + {% + \providedby{\sty{glossary-longextra} v1.37+}% + \desc{this style displays the \idx{glossary} in a table for + (either \env{longtable} or \env{tabular}) with three columns: the + name, description and \idx{locationlist}} + } + % glossary style: long-loc-desc-name + \gglosty{long\dhyphen loc\dhyphen desc\dhyphen name}% + {% + \providedby{\sty{glossary-longextra} v1.37+}% + \desc{this style displays the \idx{glossary} in a table for + (either \env{longtable} or \env{tabular}) with three columns: the + \idx{locationlist}, description and name} + } + % glossary style: long-name-desc-sym + \gglosty{long\dhyphen name\dhyphen desc\dhyphen sym}% + {% + \providedby{\sty{glossary-longextra} v1.37+}% + \desc{this style displays the \idx{glossary} in a table for + (either \env{longtable} or \env{tabular}) with three columns: the + name, description and symbol} + } + % glossary style: long-name-desc-sym-loc + \gglosty{long\dhyphen name\dhyphen desc\dhyphen sym\dhyphen loc}% + {% + \providedby{\sty{glossary-longextra} v1.37+}% + \desc{this style displays the \idx{glossary} in a table for + (either \env{longtable} or \env{tabular}) with four columns: the + name, description, symbol and \idx{locationlist}} + } + % glossary style: long-name-sym-desc + \gglosty{long\dhyphen name\dhyphen sym\dhyphen desc}% + {% + \providedby{\sty{glossary-longextra} v1.37+}% + \desc{this style displays the \idx{glossary} in a table for + (either \env{longtable} or \env{tabular}) with three columns: the + name, symbol and description} + } + % glossary style: long-name-sym-desc-loc + \gglosty{long\dhyphen name\dhyphen sym\dhyphen desc\dhyphen loc}% + {% + \providedby{\sty{glossary-longextra} v1.37+}% + \desc{this style displays the \idx{glossary} in a table for + (either \env{longtable} or \env{tabular}) with four columns: the + name, symbol, description and \idx{locationlist}} + } + % glossary style: long-sym-desc-name + \gglosty{long\dhyphen sym\dhyphen desc\dhyphen name}% + {% + \providedby{\sty{glossary-longextra} v1.37+}% + \desc{this style displays the \idx{glossary} in a table for + (either \env{longtable} or \env{tabular}) with three columns: the + symbol, description and name} + } + % glossary style: long-loc-sym-desc-name + \gglosty{long\dhyphen loc\dhyphen sym\dhyphen desc\dhyphen name}% + {% + \providedby{\sty{glossary-longextra} v1.37+}% + \desc{this style displays the \idx{glossary} in a table for + (either \env{longtable} or \env{tabular}) with four columns: the + \idx{locationlist}, symbol, description and name} + } + % glossary style: long-desc-sym-name + \gglosty{long\dhyphen desc\dhyphen sym\dhyphen name}% + {% + \providedby{\sty{glossary-longextra} v1.37+}% + \desc{this style displays the \idx{glossary} in a table for + (either \env{longtable} or \env{tabular}) with three columns: the + description, symbol and name} + } + % glossary style: long-loc-desc-sym-name + \gglosty{long\dhyphen loc\dhyphen desc\dhyphen sym\dhyphen name}% + {% + \providedby{\sty{glossary-longextra} v1.37+}% + \desc{this style displays the \idx{glossary} in a table for + (either \env{longtable} or \env{tabular}) with four columns: the + \idx{locationlist}, description, symbol and name} + } + % glossary style: long-sym-desc + \gglosty{long\dhyphen sym\dhyphen desc}% + {% + \providedby{\sty{glossary-longextra} v1.49+}% + \desc{this style displays the \idx{glossary} in a table for + (either \env{longtable} or \env{tabular}) with two columns: the + symbol and the description} + } + % glossary style: long-desc-sym + \gglosty{long\dhyphen desc\dhyphen sym}% + {% + \providedby{\sty{glossary-longextra} v1.49+}% + \desc{this style displays the \idx{glossary} in a table for + (either \env{longtable} or \env{tabular}) with two columns: the + description and the symbol} + } + % glossary style: abbr-short-long + \gglosty{abbr\dhyphen short\dhyphen long}% + {% + \providedby{\sty{glossary-longextra} v1.49+}% + \desc{this style displays the \idx{glossary} in a table for + (either \env{longtable} or \env{tabular}) with two columns: the + short form and the long form} + } + % glossary style: abbr-long-short + \gglosty{abbr\dhyphen long\dhyphen short}% + {% + \providedby{\sty{glossary-longextra} v1.49+}% + \desc{this style displays the \idx{glossary} in a table for + (either \env{longtable} or \env{tabular}) with two columns: the + long form and the short form} + } + % glossary style: long-booktabs + \gglosty{long\dhyphen booktabs} + {% + \providedby{\sty{glossary-longbooktabs} v4.21+}% + \desc{this style displays the \idx{glossary} using + \env{longtable} and horizontal rules from the \sty{booktabs} package} + } + % glossary style: longragged + \gglosty{longragged} + {% + \providedby{\sty{glossary-longragged}}% + \desc{this style displays the \idx{glossary} using + \env{longtable} with ragged right paragraph formatting for the + description column} + } + % glossary style: super + \gglosty{super} + {% + \providedby{\sty{glossary-super}}% + \desc{this style displays the \idx{glossary} using + \env{supertabular}} + } + % glossary style: superragged + \gglosty{superragged} + {% + \providedby{\sty{glossary-superragged}}% + \desc{this style displays the \idx{glossary} using + \env{supertabular} with ragged right paragraph formatting for the + description column} + } + % glossary style: topic + \gglosty{topic} + { + \providedby{\sty{glossary-topic}}% + \desc{this style is designed for hierarchical glossaries where + the top-level entry represents a topic} + } + % glossary style: topicmcols + \gglosty{topicmcols} + { + \providedby{\sty{glossary-topic}}% + \desc{similar to \glostyle{topic} but the sub-entries are placed + in a \env{multicols} environment} + } + % glossary style: table + \gglosty{table} + { + \providedby{\sty{glossary-table}}% + \desc{this style is specific to \gls{printunsrttable}} + } + % glossary style: bookindex + \gglosty{bookindex}% + {% + \providedby{\sty{glossary-bookindex}}% + \desc{this style is designed for indexes. Symbols and + descriptions are not shown. Since descriptions aren't shown, + there's no \gls{postdeschook}} + } + % glossary style: index + \gglosty{index}% + { + \providedby{\sty{glossary-tree}}% + \desc{a hierarchical style that supports up to level~2, similar to normal indexes, but + symbols and descriptions are shown} + } + % glossary style: tree + \gglosty{tree}% + { + \providedby{\sty{glossary-tree}}% + \desc{a hierarchical style that supports unlimited levels + (although a deep hierarchy may not fit the available line width) + with that shows symbols and descriptions} + } + % glossary style: treegroup + \gglosty{tree\-group}% + { + \providedby{\sty{glossary-tree}}% + \desc{as \glostyle{tree} but has headers at the start of each + \idx{group}} + } + % glossary style: treehypergroup + \gglosty{tree\-hyper\-group}% + {% + \providedby{\sty{glossary-tree}}% + \desc{as \glostyle{treegroup} but has a row at the start with + hyperlinks to each \idx{group}} + } + % glossary style: indexgroup + \gglosty{index\-group}% + { + \providedby{\sty{glossary-tree}}% + \desc{as \glostyle{index} but has headers at the start of each + \idx{group}} + } + % glossary style: alttree + \gglosty{alt\-tree}% + { + \providedby{\sty{glossary-tree}}% + \desc{like \glostyle{tree} but the width of the widest name must + be supplied (using a command like \gls{glssetwidest})} + } + % glossary style: alttreegroup + \gglosty{alt\-tree\-group}% + { + \providedby{\sty{glossary-tree}}% + \desc{as \glostyle{alttree} but has headers at the start of each + \idx{group}} + } + % glossary style: treenoname + \gglosty{tree\-no\-name}% + { + \providedby{\sty{glossary-tree}}% + \desc{like \glostyle{tree} but the child entries don't have their + name shown} + } + % glossary style: mcolindex + \gglosty{mcol\-index}% + { + \providedby{\sty{glossary-mcols}}% + \desc{as \glostyle{index} but puts the content inside a + \env{multicols} environment} + } + % glossary style: mcolindexgroup + \gglosty{mcol\-index\-group}% + { + \providedby{\sty{glossary-mcols}}% + \desc{as \glostyle{mcolindex} but has headers at the start of each + \idx{group}} + } + % glossary style: mcoltree + \gglosty{mcol\-tree}% + { + \providedby{\sty{glossary-mcols}}% + \desc{as \glostyle{tree} but puts the content inside a + \env{multicols} environment} + } + % PACKAGE OPTIONS + % package option prefix + \gstyopt{prefix} + {% + \inpackage{glossaries-extra} + \desc{loads \sty{glossaries-prefix}} + } + % package option accsupp + \gstyopt{accsupp} + {% + \inpackage{glossaries-extra} + \desc{loads \sty{glossaries-accsupp}} + } + % package option style + \gstyopt{style}% + {% + \inpackage{glossaries}% + \syntax{\meta{style-name}} + \desc{sets the default \idx{glossarystyle} to \meta{style-name}}% + } + % package option nostyles + \gstyopt{nostyles}% + {% + \inpackage{glossaries}% + \desc{don't load the default set of predefined styles. Note that + if \sty{glossaries} is loaded before \sty{glossaries-extra}, + then this option should be passed directly to \sty{glossaries} + not \sty{glossaries-extra} otherwise it will be too late to + implement}% + } + % package option nolist + \gstyopt{nolist}% + {% + \inpackage{glossaries}% + \desc{don't load \sty{glossary-list}, which is normally loaded + automatically. Note that if \sty{glossaries} is loaded before + \sty{glossaries-extra}, + then this option should be passed directly to \sty{glossaries} + not \sty{glossaries-extra} otherwise it will be too late to + implement}% + } + % package option nolong + \gstyopt{nolong}% + {% + \inpackage{glossaries}% + \desc{don't load \sty{glossary-long}, which is normally loaded + automatically. Note that if \sty{glossaries} is loaded before + \sty{glossaries-extra}, + then this option should be passed directly to \sty{glossaries} + not \sty{glossaries-extra} otherwise it will be too late to + implement}% + } + % package option nosuper + \gstyopt{nosuper}% + {% + \inpackage{glossaries}% + \desc{don't load \sty{glossary-super}, which is normally loaded + automatically. Note that if \sty{glossaries} is loaded before + \sty{glossaries-extra}, + then this option should be passed directly to \sty{glossaries} + not \sty{glossaries-extra} otherwise it will be too late to + implement}% + } + % package option notree + \gstyopt{notree}% + {% + \inpackage{glossaries}% + \desc{don't load \sty{glossary-tree}, which is normally loaded + automatically. Note that if \sty{glossaries} is loaded before + \sty{glossaries-extra}, + then this option should be passed directly to \sty{glossaries} + not \sty{glossaries-extra} otherwise it will be too late to + implement}% + } + % package option stylemods + \gstyopt{stylemods} + {% + \inpackage{glossaries-extra} + \syntax{\meta{value}} + \defval{default} + \desc{loads \sty{glossaries-extra-stylemods} with the given + options. If \opteqvalref{stylemods}{default} then no options are + passed to \sty{glossaries-extra-stylemods}} + } + % package option stylemods values + % stylemods=default + \goptval{stylemods}{default}{\desc{load + \sty{glossaries-extra-stylemods} with no options (patches any + predefined styles that have been loaded)}% + } + % stylemods=all + \goptval{stylemods}{all}% + {% + \desc{load \sty{glossaries-extra-stylemods} with all predefined styles}% + } + % stylemods= + \goptmetaval{stylemods}{list}% + {% + \desc{load \sty{glossaries-extra-stylemods} with all the listed styles}% + } + \gstyopt{all}% + {% + \inpackage{glossaries-extra-stylemods}% + \desc{load all predefined styles}% + } + \gstyopt{name}% + {% + \name{{}\meta{name}}% + \inpackage{glossaries-extra-stylemods}% + \desc{load package \styfmt{glossary-\meta{name}}}% + } + % package option section + \gstyopt{section} + { + \inpackage{glossaries}% + \syntax{\meta{value}} + \defval{section} + \desc{indicates which section heading command to use for the + \idx{glossary}. The value may be one of the standard sectioning + command's control sequence name (without the leading backslash), + such as \code{chapter} or \code{section}} + } + % package option sort + \gstyopt{sort}% + {% + \inpackage{glossaries}% + \syntax{\meta{value}} + \initval{standard} + \desc{indicates how the \gloskey{sort} key should automatically + be assigned if not explicitly provided (for \gls{makeglossaries} + and \gls{makenoidxglossaries} only)} + } + \goptval{sort}{none}% + {% + \providedby{\sty{glossaries} v4.30+} + \desc{don't process the \gloskey{sort} key. Use this option + if no \idx{indexing} is required for a slightly faster build}% + } + \goptval{sort}{clear}% + {% + \providedby{\sty{glossaries} v4.50+} + \desc{sets the \gloskey{sort} key to an empty value. Use this option if no + \idx{indexing} is required for a slightly faster build}% + }% + \goptval{sort}{standard}% + {% + \desc{use the value of the \gloskey{name} key as the default for the + \gloskey{sort} key and implement the \gls{glsprestandardsort} hook}% + } + \goptval{sort}{def}% + {% + \desc{use the (zero-padded) order of definition as the default for the + \gloskey{sort} key}% + } + \goptval{sort}{use}% + {% + \desc{use the (zero-padded) order of use as the default for the + \gloskey{sort} key}% + } + % package option sanitizesort + \gstyopt{sanitize\-sort}% + {% + \inpackage{glossaries}% + \syntax{\meta{boolean}} + \initvalvaries + \defval{true} + \desc{indicates whether the default sort value should be sanitized + (only applicable with \opteqvalref{sort}{standard})} + } + % package option debug (base) + \glsbibwriteentry{packageoption}{opt.base.debug}% + {% + \providedby{\sty{glossaries} v4.24+}% + \field{name}{{}\styoptfmt{debug}}% + \initval{false}% + \syntax{\meta{value}} + \inpackage{glossaries} + \note{modified by \sty{glossaries-extra}['s] \opt{debug} option} + \desc{adds markers to the document for debugging purposes} + } + % package option debug + \gstyopt{debug}% + {% + \syntax{\meta{value}} + \defval{true}% + \initval{false}% + \inpackage{glossaries-extra} + \desc{provides debugging information. Some options are also + available with just the base \sty{glossaries} package} + } + % package option debug values + \goptval{debug}{true}% + {% + \providedby{\sty{glossaries} v4.24+}% + \desc{writes \code{wrglossary(\meta{type})(\meta{\idx{indexing} info})} + to the \ext+{log} file if there is an attempt to index an entry + before the associated \idx{indexing} file has been opened (\app{makeindex} + and \app{xindy} only). With \sty{glossaries-extra}, this setting will + also display the label of any undefined entries that are + referenced in the document} + } + \goptval{debug}{false}% + {% + \providedby{\sty{glossaries} v4.24+}% + \desc{disable debugging actions} + } + \goptval{debug}{showtargets}% + {% + \providedby{\sty{glossaries} v4.24+}% + \desc{implements \optval{debug}{true} and also shows target + markers in the document}% + \field{seealso}{opt.showtargets} + } + \goptval{debug}{showaccsupp}% + {% + \providedby{\sty{glossaries} v4.45+}% + \desc{implements \optval{debug}{true} and also shows accessibility information + in the document} + } + \goptval{debug}{showwrgloss}% + {% + \providedby{\sty{glossaries-extra} v1.21+}% + \desc{implements \optval{debug}{true} and also shows a marker + in the document whenever the entry is \indexed\ and (if used + with \opt{indexcounter}) will mark where the \ctr{wrglossary} + counter is incremented} + } + \goptval{debug}{all}% + {% + \providedby{\sty{glossaries-extra} v1.21+}% + \desc{implements all debugging options} + } + % package option showtargets + \gstyopt{show\-targets}% + {% + \inpackage{glossaries-extra} + \providedby{\sty{glossaries-extra} v1.48+}% + \syntax{\meta{value}} + \desc{implements \opteqvalref{debug}{showtargets}} + } + \goptval{showtargets}{left}% + {% + \desc{a marker is placed to the left of the link/target and + a marginal note is used in outer mode} + } + \goptval{showtargets}{right}% + {% + \desc{a marker is placed to the right of the link/target and + a marginal note is used in outer mode} + } + \goptval{showtargets}{innerleft}% + {% + \desc{a marker and annotation are placed to the left of the + link/target in all modes} + } + \goptval{showtargets}{innerright}% + {% + \desc{a marker and annotation are placed to the left of the + link/target in all modes} + } + \goptval{showtargets}{annoteleft}% + {% + \desc{markers are placed on either side of the + link/target with the annotation on the left in all modes} + } + \goptval{showtargets}{annoteright}% + {% + \desc{markers are placed on either side of the + link/target with the annotation on the right in all modes} + } + % package option undefaction + \gstyopt{undef\-action}% + {% + \syntax{\meta{value}} + \initval{error} + \inpackage{glossaries-extra} + \desc{indicates whether to trigger an error or warning if an + unknown entry label is referenced} + } + \goptval{undefaction}{error}% + {% + \desc{trigger an error if an unknown entry label is referenced} + } + \goptval{undefaction}{warn}% + {% + \desc{trigger a warning if an unknown entry label is referenced} + } + % package option makeindex + \gstyopt{makeindex} + { + \inpackage{glossaries} + \desc{indicates that the \idx{indexing} should be performed by + \app+{makeindex} (default)} + } + % package option xindy + \gstyopt{xindy} + { + \syntax{\margm{options}} + \inpackage{glossaries} + \desc{indicates that the \idx{indexing} should be performed by \app+{xindy}} + } + % package option hyperfirst + \gstyopt{hyper\-first}% + {% + \syntax{\meta{boolean}} + \initval{true} + \defval{true} + \inpackage{glossaries} + \desc{indicates whether or not to use hyperlinks on + \idx{firstuse} (if hyperlinks are supported)} + } + % package option indexonlyfirst + \gstyopt{index\-only\-first}% + {% + \syntax{\meta{boolean}} + \initval{false} + \defval{true} + \inpackage{glossaries} + \desc{indicates whether or not to only \idxc{indexing}{index} + the \idx{firstuse}} + } + % package option indexcrossrefs + \gstyopt{index\-cross\-refs}% + {% + \syntax{\meta{boolean}} + \initvalvaries + \defval{true} + \inpackage{glossaries-extra} + \desc{indicates whether or not to enable automatic \idx{indexing} of +cross-referenced entries} + } + \goptval{indexcrossrefs}{true}% + {% + \desc{enables automatic \idx{indexing} of cross-referenced entries} + } + \goptval{indexcrossrefs}{false}% + {% + \desc{disables automatic \idx{indexing} of cross-referenced entries} + } + % package option autoseeindex + \gstyopt{auto\-see\-index}% + {% + \syntax{\meta{boolean}} + \initval{true} + \defval{true} + \inpackage{glossaries-extra} + \desc{indicates whether or not to enable automatic \idx{indexing} of + \gloskey{see} and \gloskey{seealso} fields} + } + \goptval{autoseeindex}{true}% + {% + \desc{enables automatic \idx{indexing} of \gloskey{see} and \gloskey{seealso} fields} + } + \goptval{autoseeindex}{false}% + {% + \desc{disables automatic \idx{indexing} of \gloskey{see} and \gloskey{seealso} fields} + } + % package option seenoindex + \gstyopt{see\-no\-index}% + {% + \syntax{\meta{value}} + \initval{error} + \inpackage{glossaries} + \desc{indicates what to do if the \gloskey{see} key is used + before the associated \idx{indexing} files have been opened by + \gls{makeglossaries}} + } + \goptval{seenoindex}{error}% + {% + \desc{triggers an error if the \gloskey{see} key is used before + \gls{makeglossaries}} + } + \goptval{seenoindex}{warn}% + {% + \desc{triggers a warning if the \gloskey{see} key is used before + \gls{makeglossaries}} + } + \goptval{seenoindex}{ignore}% + {% + \desc{does nothing if the \gloskey{see} key is used before + \gls{makeglossaries}} + } + % package option record + \gstyopt{record}% + {% + \common + \syntax{\meta{value}} + \initval{off} + \defval{only} + \inpackage{glossaries-extra} + \desc{indicates whether or not \app{bib2gls} is being used (in + which case entry \idx{indexing} is performed by adding \app{bib2gls} + \records\ in the \ext{aux} file)} + } + % package option record=off + \goptval{record}{off}% + {% + \desc{entry \idx{indexing} is performed as per the base \sty{glossaries} package, using + either \gls{makeglossaries} or \gls{makenoidxglossaries}} + } + % package option record=only + \goptval{record}{only}% + {% + \desc{entry \idx{indexing} is performed by adding \app{bib2gls} + \records\ in the \ext{aux} file. Glossaries should be displayed with the \idx{unsrtfam}} + } + % package option record=nameref + \goptval{record}{name\-ref}% + {% + \desc{entry \idx{indexing} is performed by adding \app{bib2gls} + nameref \records\ in the \ext{aux} file. Glossaries should be displayed with the \idx{unsrtfam}} + } + % package option record=hybrid + \goptval{record}{hybrid}% + {% + \desc{performs a mixture of \app{bib2gls} \records\ in the + \ext{aux} file (to select entries from a \ext{bib} file) + and \app+{makeindex}\slash\app+{xindy} + \idx{indexing} in their associated files. The actual sorting and + collation is performed by the \idx{indexingapp}, so + \resourceoptval{sort}{none} and + \resourceoptval{save-locations}{false} + should be used in \gls{GlsXtrLoadResources} (because it's + redundant to make \app{bib2gls} sort and collate as well). + This setting should be used with + \gls{makeglossaries} before \gls{GlsXtrLoadResources} and + \idxpl{glossary} should be displayed with \gls{printglossary} (or + \gls{printglossaries}). There's little point in using this + setting unless you have a custom \app{xindy} module that you can't + convert to an equivalent set of \app{bib2gls} options} + } + % package option record=alsoindex + \goptval{record}{also\-index}% + {% + \deprecated + \field{alias}{optval.record.hybrid} + } + % package option bibglsaux + \gstyopt{bib\-gls\-aux}% + {% + \inpackage{glossaries-extra} + \providedby{\sty{glossaries-extra} v1.49+} + \note{requires \app{bib2gls} v3.0+} + \initvalempty + \syntax{\meta{basename}} + \desc{if set, an additional \ext+{aux} file called + \metafilefmt{}{basename}{.aux} will be created in which to + store the \app{bib2gls} records. This file will be skipped by + \LaTeX\ when the main \ext{aux} file is input but will be read + by \app{bib2gls}} + } + % package option numberedsection + \gstyopt{numbered\-section} + { + \syntax{\meta{value}} + \initval{false} + \defval{nolabel} + \inpackage{glossaries} + \desc{indicates whether or not \idx{glossary} section headers will be numbered + and also if they should automatically be labelled} + } + % package option savenumberlist + \gstyopt{save\-number\-list} + { + \syntax{\meta{boolean}} + \initval{false} + \defval{true} + \inpackage{glossaries} + \desc{if true, patches the \idx{locationlist} encapsulator to + save the \idx{locationlist}. With \app{bib2gls}, use the + \resourceopt{save-locations} resource option} + } + % package option equations + \gstyopt{equations} + { + \syntax{\meta{boolean}} + \initval{false} + \defval{true} + \inpackage{glossaries-extra} + \desc{automatically switch the \idx{locationcounter} to + \ctr{equation} when inside a numbered equation environment} + } + % package option floats + \gstyopt{floats} + { + \syntax{\meta{boolean}} + \initval{false} + \defval{true} + \inpackage{glossaries-extra} + \desc{automatically switch the \idx{locationcounter} to + the corresponding counter when inside a floating environment} + } + % package option indexcounter + \gstyopt{index\-counter} + { + \inpackage{glossaries-extra} + \desc{defines the index counter \ctr{wrglossary} and implements + \optval{counter}{wrglossary}} + } + % counter wrglossary + \gctr{wr\-glossary} + { + \providedby{\sty{glossaries-extra}} + \desc{a counter that is incremented every time an entry is \indexed} + } + % package option counter + \gstyopt{counter}% + {% + \inpackage{glossaries}% + \syntax{\meta{counter-name}} + \initval{page} + \desc{sets the default \idx{locationcounter}}% + } + % package option nonumberlist + \gstyopt{no\-number\-list}% + { + \inpackage{glossaries} + \desc{set no \glspl{locationlist} as the default for all + \idxpl{glossary}. May be overridden for individual \idxpl{glossary} with + \printglossoptval{nonumberlist}{true}} + } + % package option entrycounter + \gstyopt{entry\-counter}% + { + \inpackage{glossaries} + \desc{enables the entry counter for top-level entries} + } + % package option subentrycounter + \gstyopt{sub\-entry\-counter}% + { + \inpackage{glossaries} + \desc{enables the entry counter for level~1 entries} + } + % package option writeglslabels + \gstyopt{write\-gls\-labels}% + { + \inpackage{glossaries} + \desc{creates a file called \csfmt{jobname}\filefmt{.}\ext+{glslabels} + that contains all defined entry labels (for the benefit of + autocompletion tools)} + } + % package option writeglslabelnames + \gstyopt{write\-gls\-label\-names}% + { + \inpackage{glossaries} + \desc{creates a file called \csfmt{jobname}\filefmt{.}\ext+{glslabels} + that contains all defined entry labels and names (for the benefit of + autocompletion tools)} + } + % package option nomain + \gstyopt{nomain}% + {% + \inpackage{glossaries}% + \desc{prevents the definition of the \code{main} \idx{glossary}. You + will need to define another \idx{glossary} to use instead. For + example, with the \opt{acronyms} package option}% + } + % package option acronymlists + \gstyopt{acronym\-lists}% + { + \inpackage{glossaries} + \syntax{\margm{label-list}} + \banned + \desc{identifies the \idxpl{glossary} that contain acronyms + (defined with the base \sty{glossaries} packages acronym mechanism)} + } + % package option shortcuts + \gstyopt{shortcuts}% + { + \inpackage{glossaries-extra} + \syntax{\margm{value}} + \initval{none} + \desc{defines various shortcut commands (boolean only with just + the base \sty{glossaries} package)} + } + % package option shortcuts=none + \goptval{shortcuts}{none}% + {% + \desc{don't define any shortcut commands} + } + % package option shortcuts=all + \goptval{shortcuts}{all}% + {% + \desc{implements \optval{shortcuts}{ac}, + \optval{shortcuts}{abbreviations}, \optval{shortcuts}{other}} + } + % package option shortcuts=acother + \goptval{shortcuts}{acother}% + {% + \desc{implements \optval{shortcuts}{ac} and \optval{shortcuts}{other}} + } + % package option shortcuts=abother + \goptval{shortcuts}{abother}% + {% + \desc{implements \optval{shortcuts}{abbreviations} and \optval{shortcuts}{other}} + } + % package option shortcuts=true + \goptval{shortcuts}{true}% + {% + \field{alias}{optval.shortcuts.all} + } + % package option shortcuts=false + \goptval{shortcuts}{false}% + {% + \field{alias}{optval.shortcuts.all} + } + % package option shortcuts=ac + \goptval{shortcuts}{ac}% + {% + \desc{implements the acronym shortcuts that are compatible with + \gls{newabbreviation}} + } + % package option shortcuts=abbreviations + \goptval{shortcuts}{abbreviations}% + {% + \desc{implements the abbreviation shortcuts} + } + % package option shortcuts=abbr + \goptval{shortcuts}{abbr}% + {% + \field{alias}{optval.shortcuts.abbreviations} + } + % package option shortcuts=other + \goptval{shortcuts}{other}% + {% + \desc{implements the shortcuts \gls{newentry}, \gls{newsym} and + \gls{newnum}} + } + % package option shortcuts=acronyms + \goptval{shortcuts}{acronyms}% + {% + \desc{implements the acronym shortcuts. Don't use this option +unless you have reverted \gls{newacronym} back to the base +\sty{glossaries} package's acronym mechanism} + } + % package option shortcuts=acro + \goptval{shortcuts}{acro}% + {% + \field{alias}{optval.shortcuts.acronyms} + } + % package option acronyms + \gstyopt{acronyms}% + { + \inpackage{glossaries} + \desc{provides a new \idx{glossary} with the label \code{acronym}, + redefines \gls{acronymtype} to \code{acronym}, and provides + \gls{printacronyms}} + } + % package option acronym + \gstyopt{acronym}% + { + \syntax{\meta{boolean}} + \initval{false} + \defval{true} + \inpackage{glossaries} + \desc{if true, provides a new \idx{glossary} with the label + \code{acronym} and title given by \gls{acronymname}, + redefines \gls{acronymtype} to \code{acronym}, and provides + \gls{printacronyms}} + } + % package option abbreviations + \gstyopt{abbreviations}% + { + \inpackage{glossaries-extra} + \desc{provides a new \idx{glossary} with the label + \code{abbreviations} and title given by \gls{abbreviationsname}, + redefines \gls{glsxtrabbrvtype} to \code{abbreviations}, + redefines \gls{acronymtype} to \gls{glsxtrabbrvtype} (unless + the \opt{acronym} or \opt{acronyms} option has been used), and provides + \gls{printabbreviations}} + } + % package option symbols + \gstyopt{symbols}% + { + \inpackage{glossaries} + \desc{provides a new \idx{glossary} with the label \code{symbols} and + the title \gls{glssymbolsgroupname}, and provides + \gls{printsymbols}. With \sty{glossaries-extra}, this additionally + defines \gls{glsxtrnewsymbol}} + } + % package option numbers + \gstyopt{numbers}% + { + \inpackage{glossaries} + \desc{provides a new \idx{glossary} with the label \code{numbers} and + the title \gls{glsnumbersgroupname}, and provides \gls{printnumbers}. + With \sty{glossaries-extra}, this additionally + defines \gls{glsxtrnewnumber}} + } + % package option index + \gstyopt{index}% + { + \inpackage{glossaries} + \desc{provides a new \idx{glossary} with the label \code{index} and + the title \gls{indexname}, and provides \gls{printindex} and + \gls{newterm}} + } + % package option nomissingglstext + \gstyopt{no\-missing\-gls\-text}% + {% + \inpackage{glossaries-extra} + \syntax{\meta{boolean}} + \initval{false} + \defval{true} + \desc{determines whether or not to display warning text if the + external \idx{glossary} file hasn't been generated due to an + incomplete build} + } + % package option nopostdot + \gstyopt{nopostdot}% + {% + \inpackage{glossaries} + \syntax{\meta{boolean}} + \initval{true} + \defval{true} + \desc{if true, suppresses the automatic insertion of a + \idx{fullstop} after each entry's description in the \idx{glossary} + (for styles that support this). The default is + \optval{nopostdot}{true} for \sty{glossaries-extra} and + \optval{nopostdot}{false} for just \sty{glossaries}} + \field{seealso}{opt.postdot,opt.postpunc} + } + % package option postdot + \gstyopt{postdot}% + {% + \inpackage{glossaries-extra} + \providedby{\sty{glossaries-extra} v1.12+}% + \desc{a shortcut for \optval{nopostdot}{false}} + \field{seealso}{opt.nopostdot,opt.postpunc} + } + % package option postpunc + \gstyopt{postpunc}% + {% + \inpackage{glossaries-extra} + \providedby{\sty{glossaries-extra} v1.21+}% + \syntax{\meta{value}} + \desc{an alternative to \opt{postdot}, this can be used to + insert a different punctuation character after the description} + } + % package option postpunc values + \goptval{postpunc}{dot}% + {% + \desc{equivalent to \opt{postdot} or \optval{nopostdot}{false}} + } + \goptval{postpunc}{comma}% + {% + \desc{inserts a comma after the description} + } + \goptval{postpunc}{none}% + {% + \desc{switches off automatic post-description punctuation insertion} + } + \goptval{postpunc}{other}% + {% + \name{{}\meta{punctuation}} + \desc{inserts \meta{punctuation} after the description} + } + % package option nowarn + \gstyopt{no\-warn}% + {% + \inpackage{glossaries} + \desc{suppresses warnings} + } + % package option noredefwarn + \gstyopt{noredefwarn}% + {% + \inpackage{glossaries} + \desc{suppresses a warning if \env{theglossary} or + \gls{printglossary} have already been defined (which indicates + that the document class or another package also provides a mechanism + for creating a \idx{glossary} that could potentially conflict with + \sty{glossaries}). This option is automatically implemented with + \sty{glossaries-extra}} + } + % package option translate + \gstyopt{translate}% + {% + \inpackage{glossaries} + \syntax{\meta{value}} + \initval{babel} + \desc{indicates how multilingual support should be provided, if + applicable} + } + % package option translate values + \goptval{translate}{babel}% + {% + \desc{uses \sty{babel}['s] language hooks to implement + multilingual support (default for \sty{glossaries-extra} if + \sty{babel} has been detected)} + } + \goptval{translate}{true}% + {% + \desc{uses \sty{translator}['s] language hooks to implement + multilingual support (default for \sty{glossaries} if a + language package has been detected)} + } + \goptval{translate}{false}% + {% + \desc{don't implement multilingual support (default if no + language package has been detected)} + } + % package option notranslate + \gstyopt{notranslate}% + {% + \inpackage{glossaries} + \desc{equivalent to \optval{translate}{false}} + } + % package option nogroupskip + \gstyopt{nogroupskip}% + {% + \inpackage{glossaries} + \syntax{\meta{boolean}} + \initval{false} + \defval{true} + \desc{if true, suppress the gap between letter \idxpl{group} in the + \idxpl{glossary} by default} + } + % package option toc + \gstyopt{toc}% + {% + \inpackage{glossaries} + \syntax{\meta{boolean}} + \initval{true} + \defval{true} + \desc{if true, each \idx{glossary} will be automatically added to the + table of contents. The default is \optval{toc}{false} with + \sty{glossaries} and \optval{toc}{true} with \sty{glossaries-extra}} + } + % package option docdef + \gstyopt{docdef}% + {% + \inpackage{glossaries-extra} + \syntax{\meta{value}} + \initval{false} + \defval{true} + \desc{determines whether or not \gls{newglossaryentry} is + permitted in the \env{document} environment} + } + \goptval{docdef}{false}% + {% + \desc{don't allow \gls{newglossaryentry} in the \env{document} + environment} + } + \goptval{docdef}{true}% + {% + \desc{allow \gls{newglossaryentry} in the \env{document} + environment if the base \sty{glossaries} package would allow it} + } + \goptval{docdef}{restricted}% + {% + \desc{allow \gls{newglossaryentry} in the \env{document} + environment, but only before any \idxpl{glossary}} + } + \goptval{docdef}{atom}% + {% + \desc{as \optfmt{restricted} but creates the \ext{glsdefs} file + for atom's autocomplete support} + } + % package option automake + \gstyopt{auto\-make}% + {% + \inpackage{glossaries} + \syntax{\meta{value}} + \initval{false} + \defval{true} + \desc{indicates whether or not to attempt to use \TeX's shell + escape to run an \idx{indexingapp}} + } + % package option mfirstuc + \gstyopt{mfirstuc} + { + \inpackage{glossaries} + \providedby{\sty{glossaries} v4.50+} + \initval{unexpanded} + \desc{implements the \optfmt{expanded} and \optfmt{unexpanded} + options provided by \sty{mfirstuc}} + } + % COMMANDS + % COMMANDS: OPTIONS + % \setupglossaries + \gcmd{set\-up\-glos\-saries}% + {% + \providedby{\sty{glossaries} v3.11a+} + \syntax{\margm{options}} + \desc{change allowed options that are defined by the base + \sty{glossaries} package. Note that some options can only be + passed as package options. To change options defined or modified + by the \sty{glossaries-extra} package, use + \gls{glossariesextrasetup}} + } + % \glossariesextrasetup + \gcmd{glos\-saries\-extra\-setup}% + {% + %\providedby{\sty{glossaries-extra} v1.0+} + \syntax{\margm{options}} + \desc{change allowed options that are defined or modified by the + \sty{glossaries-extra} package. Note that some options can only be + passed as package options} + } + % \glsindexingsetting + \gcmd{gls\-index\-ing\-setting} + { + \providedby{\sty{glossaries} v4.50+ \& \sty{glossaries-extra} v1.49+} + \desc{indicates what \idx{indexing} option has been chosen} + } + % \glsxtrsetbibglsaux + \gcmd{gls\-xtr\-set\-bib\-gls\-aux} + { + \providedby{\sty{glossaries-extra} v1.49+} + \note{requires \app{bib2gls} v3.0+} + \syntax{\margm{basename}} + \desc{as the \opt{bibglsaux} option} + } + % COMMANDS: DEBUGGING + % \glsshowtargetinner + \gcmd{gls\-show\-target\-inner}% + {% + \providedby{\sty{glossaries} v4.50+} + \syntax{\margm{target-name}} + \desc{formats the target name for inner and maths mode when + \opteqvalref{debug}{showtargets} is enabled} + } + % \glsshowtargetouter + \gcmd{gls\-show\-target\-outer}% + {% + \providedby{\sty{glossaries} v4.50+} + \syntax{\margm{target-name}} + \desc{formats the target name for outer mode when + \opteqvalref{debug}{showtargets} is enabled. This places a + marker (\gls{glsshowtargetsymbol}) in the text and + \meta{target-name} in the margin} + } + % \glsshowtarget + \gcmd{gls\-show\-target}% + {% + \providedby{\sty{glossaries} v4.32+} + \syntax{\margm{target-name}} + \desc{formats the target name when + \opteqvalref{debug}{showtargets} is enabled using either + \gls{glsshowtargetinner} or \gls{glsshowtargetouter}, depending + on the current mode} + } + % \glsshowtargetfont + \gcmd{gls\-show\-target\-font}% + {% + \providedby{\sty{glossaries} v4.45+} + \desc{font declaration used by debugging annotations} + } + % \glsshowtargetfonttext + \gcmd{gls\-show\-target\-font\-text}% + {% + \providedby{\sty{glossaries} v4.50+} + \syntax{\margm{text}} + \desc{text-block command that checks for math mode and switches + to the font given by the \gls{glsshowtargetfont} declaration} + } + % \glsshowtargetsymbol + \gcmd{gls\-show\-target\-symbol}% + {% + \providedby{\sty{glossaries} v4.45+} + \desc{marker (\glsshowtargetsymbol) used in debugging annotations} + } + % \glsxtrwrglossmark + \gcmd{gls\-xtr\-wr\-gloss\-mark}% + {% + \providedby{\sty{glossaries-extra} v1.21+} + \desc{marker (\glsxtrwrglossmark) used to mark write operations + with \opteqvalref{debug}{showwrgloss}} + } + % \glsxtrwrglosscountermark + \gcmd{gls\-xtr\-wr\-gloss\-counter\-mark}% + {% + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{number}} + \desc{used to mark where the \ctr{wrglossary} counter is + incrememented with \opteqvalref{debug}{showwrgloss}} + } + % \glsxtrshowtargetouter + \gcmd{gls\-xtr\-show\-target\-outer}% + {% + \syntax{\margm{target-name}} + \providedby{\sty{glossaries-extra} v1.48+} + \desc{used in outer mode for debugging, this defaults to + \gls{glsshowtargetouter} but is changed by the + \opt{showtargets} options} + } + % \glsxtrshowtargetinner + \gcmd{gls\-xtr\-show\-target\-inner}% + {% + \syntax{\margm{target-name}} + \providedby{\sty{glossaries-extra} v1.48+} + \desc{used in inner mode for debugging, this defaults to + \gls{glsshowtargetinner} but is changed by the + \opt{showtargets} options} + } + % \glsshowtargetinnersymleft + \gcmd{gls\-show\-target\-inner\-sym\-left}% + {% + \syntax{\marg{name}} + \providedby{\sty{glossaries-extra} v1.48+} + \desc{shows the left inner annotation followed by the left + marker symbol \gls{glsxtrshowtargetsymbolleft}} + } + % \glsshowtargetinnersymright + \gcmd{gls\-show\-target\-inner\-sym\-right}% + {% + \syntax{\marg{name}} + \providedby{\sty{glossaries-extra} v1.48+} + \desc{shows the right marker symbol + \gls{glsxtrshowtargetsymbolright} followed by the right inner annotation} + } + % \glsxtrshowtargetsymbolleft + \gcmd{gls\-xtr\-show\-target\-symbol\-left}% + {% + \providedby{\sty{glossaries-extra} v1.48+} + \desc{the left marker debugging symbol~(\glsxtrshowtargetsymbolleft)} + } + % \glsxtrshowtargetsymbolright + \gcmd{gls\-xtr\-show\-target\-symbol\-right}% + {% + \providedby{\sty{glossaries-extra} v1.48+} + \desc{the right marker debugging symbol~(\glsxtrshowtargetsymbolright)} + } + % COMMANDS: INDEXING INITIALISATION + % \glsprestandardsort + \gcmd{gls\-pre\-standard\-sort} + { + \providedby{\sty{glossaries} v3.13a+} + \syntax{\margm{sort cs}\margm{type}\margm{entry-label}} + \desc{hook used with \opteqvalref{sort}{standard} to adjust the + default sort value (with \gls{makeglossaries} or + \gls{makenoidxglossaries} only)} + } + % \makeglossaries + \gcmd{make\-glossaries}% + {% + \providedby{\sty{glossaries}} + \syntax{\oargm{types}} + \desc{opens the associated \idx{glossary} files that need to be + processed by \app+{makeindex} or \app+{xindy}. The optional + argument is only available with \sty{glossaries-extra} and is + used for a hybrid approach. All \idxpl{glossary} (or each \idx{glossary} + identified in \meta{types}) should be displayed with + \gls{printglossary}. If the optional argument is present, any + \idxpl{glossary} not identified in \meta{types} should be displayed with + \gls{printnoidxglossary}} + } + % \makenoidxglossaries + \gcmd{make\-noidx\-glossaries}% + {% + \providedby{\sty{glossaries} v4.04+} + \desc{sets up all non-\idxpl{ignoredglossary} so that they can be displayed + with \gls{printnoidxglossary}} + } + % COMMANDS: GLOSSARIES + % \glsdefaulttype + \gcmd{gls\-default\-type}% + {% + \providedby{\sty{glossaries}} + \initval{main}% + \desc{expands to the label of the default \idx{glossary}, which is + normally \code{main} but if \opt{nomain} is used, it will be the + label of the first \idx{glossary} to be defined} + }% + % \acronymtype + \gcmd{acronym\-type}% + {% + \providedby{\sty{glossaries}} + \initvalcs{glsdefaulttype}% + \desc{expands to the label of the default acronym \idx{glossary}. The + \opt{acronym} or \opt{acronyms} package option will redefine + this to \code{acronym}. The \opt{abbreviations} package option + will redefine this to \gls{glsxtrabbrvtype} if + \opt{acronyms}\slash\opt{acronym} isn't used} + }% + % \glsxtrabbrvtype + \gcmd{gls\-xtr\-abbrv\-type}% + {% + \initvalcs{glsdefaulttype}% + \providedby{\sty{glossaries-extra}} + \desc{expands to the label of the default abbreviation \idx{glossary}. The + \opt{abbreviations} package option will redefine + this to \code{abbreviations}} + }% + % \newglossary + \gcmd{new\-glos\-sary}% + {% + \providedby{\sty{glossaries}} + \syntax{\oargm{log-ext}\margm{glossary-label}\margm{in-ext}\margm{out-ext}\margm{title}\oargm{counter}} + \desc{defines a \idx{glossary} identified by \meta{glossary-label} (which can + be referenced by the \gloskey{type} key when defining an entry). + The \meta{title} will be used when displaying the \idx{glossary} + (using commands like \gls{printglossary}), but this title can be + overridden by the \printglossopt{title} option. The optional + \meta{counter} indicates which \idxc{locationcounter}{counter} should be used by default + for the \location\ when \idx{indexing} any entries that have been assigned to this + \idx{glossary}. (This can be overridden by the \glsopt{counter} + option.) The other arguments are file extensions for use with + \app{makeindex} or \app{xindy}. These arguments aren't relevant + for other \idx{indexing} options (in which case, you may prefer to use + \gls{newglossary*})} + } + % \newglossary* + \gcmd{new\-glos\-sary*}% + {% + \providedby{\sty{glossaries} v4.08+} + \syntax{\margm{glossary-label}\margm{title}\oargm{counter}} + \desc{a shortcut that supplies file extensions based on the + \idx{glossary} label:\begin{compactcodebox}% +\gls{newglossary}\oarg{\meta{glossary-label}-glg}\margm{glossary-label}\marg{\meta{glossary-label}-gls}\margm{\meta{glossary-label}-glo}\margm{title}\oargm{counter}% +\end{compactcodebox}\glsxtrnopostpunc +} + } + % \newignoredglossary + \gcmd{new\-ignored\-glos\-sary}% + {% + \providedby{\sty{glossaries} v4.08+} + \syntax{\margm{glossary-label}} + \desc{defines a \idx{glossary} that should be ignored by iterative + commands, such as \gls{printglossaries}. This \idx{glossary} has no + associated \idx{indexing} files and has hyperlinks disabled. You can + use an \idx{ignoredglossary} for common terms or abbreviations that don't need to be + included in any listing (but you may want these terms defined + as entries to allow automated formatting with the \idx{glslike} + commands). An \idx{ignoredglossary} can't be displayed with + \gls{printglossary} but may be displayed with the \idx{unsrtfam}, such as + \gls{printunsrtglossary}} + } + % \newignoredglossary* + \gcmd{new\-ignored\-glos\-sary*}% + {% + \providedby{\sty{glossaries-extra} v1.11+} + \syntax{\margm{glossary-label}} + \desc{this is like the unstarred \gls{newignoredglossary} but + doesn't disable hyperlinks. You will need to ensure that the + hypertargets are defined. For example, with + \gls{printunsrtglossary} or through \idxpl{standaloneentry}} + } + % \provideignoredglossary + \gcmds{provide\-ignored\-glos\-sary} + { + \providedby{\sty{glossaries-extra} v1.12+} + \syntax{\margm{glossary-label}} + \desc{as \gls{newignoredglossary} but does nothing if the + \idx{glossary} has already been defined} + } + % \ifglossaryexists + \gcmds{if\-glos\-sary\-exists} + { + \providedby{\sty{glossaries}} + \syntax{\margm{glossary-type}\margm{true}\margm{false}} + \desc{if the \idx{glossary} given by \meta{glossary-type} exists, + this does \meta{true}, otherwise it does \meta{false}. The + unstarred form treats \idxpl{ignoredglossary} as non-existent. The + starred form (v4.46+) will do \meta{true} if \meta{glossary-type} matches + an ignored glossary} + \field{seealso}{doifglossarynoexistsordo,glsxtrifemptyglossary} + } + % \doifglossarynoexistsordo + \gcmd{do\-if\-glos\-sary\-no\-exists\-or\-do} + { + \providedby{\sty{glossaries} v4.19+} + \syntax{\margm{glossary-type}\margm{true}\margm{false}} + \desc{if the \idx{glossary} given by \meta{glossary-type} doesn't + exist, this does \meta{true}, otherwise it generates an error + and does \meta{false}. This uses the starred form of + \gls{ifglossaryexists} to test for existence} + \field{seealso}{ifglossaryexists,glsxtrifemptyglossary} + } + % \glsxtrifemptyglossary + \gcmd{gls\-xtr\-if\-empty\-glos\-sary} + { + %\providedby{\sty{glossaries-extra} v0.4+} + \syntax{\margm{glossary-type}\margm{true}\margm{false}} + \desc{does \meta{true} if the glossary identified by + \meta{glossary-type} is empty, otherwise does \meta{false}. + If the \idx{glossary} doesn't exist, this does \meta{true} and + will either generate an error (\opteqvalref{undefaction}{error}) + or a warning (\opteqvalref{undefaction}{warn}). This command + considers \idxpl{ignoredglossary} as existing} + \field{seealso}{ifglossaryexists,GlsXtrIfInGlossary} + } + % \GlsXtrIfInGlossary + \gcmd{Gls\-Xtr\-If\-In\-Glossary} + { + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{entry-label}\margm{glossary-type}\margm{true}\margm{false}} + \desc{does \meta{true} if the entry given by \meta{entry-label} + is in the internal list of the \idx{glossary} identified by + \meta{glossary-type}, otherwise it does \meta{false}. If the + \idx{glossary} doesn't exist, this does \meta{false} and + will either generate an error (\opteqvalref{undefaction}{error}) + or a warning (\opteqvalref{undefaction}{warn}). This command + considers \idxpl{ignoredglossary} as existing} + \field{seealso}{ifglossaryexists,glsxtrifemptyglossary} + } + % \glsxtrcopytoglossary + \gcmds{gls\-xtr\-copy\-to\-glos\-sary} + { + \providedby{\sty{glossaries-extra} v1.12+} + \syntax{\margm{entry-label}\margm{glossary-type}} + \desc{copies the entry to the internal \idx{glossary} list for + the given \idx{glossary}. The starred version performs a global + change. The unstarred version can be localised. Only for use with + the \idx{unsrtfam}} + } + % \glsxtrgroupfield + \gcmd{gls\-xtr\-group\-field} + { + \providedby{\sty{glossaries-extra} v1.21+} + \initval{group} + \desc{expands to the \idx{internalfieldlabel} used to store the + group label (requires \opt{record})} + } + % \glsautoprefix + \gcmd{gls\-auto\-prefix} + { + \providedby{\sty{glossaries} v1.14+} + \desc{expands to the prefix for the label used by + \optval{numberedsection}{autolabel} and \optval{numberedsection}{nameref}} + } + % \glsxtrsetglossarylabel + \gcmd{gls\-xtr\-set\-glos\-sary\-label} + { + \providedby{\sty{glossaries-extra} v1.39+} + \syntax{\margm{label}} + \desc{sets the label to add (using + \code{\gls{label}\margm{label}}) after the \idx{glossary} section + heading} + } + % COMMANDS: GLOSSARY STYLES + % \ifglsnogroupskip + \gcond{if\-gls\-no\-group\-skip} + { + \providedby{\sty{glossaries} v3.03+} + \initvalcs{iffalse} + \desc{conditional set by the \opt{nogroupskip} option} + } + % \glossentryname + \gcmd{gloss\-entry\-name} + {% + \providedby{\sty{glossaries} v3.08a+} + \syntax{\margm{entry-label}} + \desc{used by \idx{glossary} styles to display the entry's name} + } + % \Glossentryname + \gcmd{Gloss\-entry\-name} + {% + \providedby{\sty{glossaries} v3.08a+} + \syntax{\margm{entry-label}} + \desc{as \gls{glossentryname} but \idx{sentencecase}} + } + % \glossentrynameother + \gcmd{gloss\-entry\-name\-other} + {% + \providedby{\sty{glossaries-extra} v1.22+} + \syntax{\margm{entry-label}\margm{field-label}} + \desc{behaves like \gls{glossentryname} but uses the given field + (identified by its \idxc{internalfieldlabel}{internal label}) + instead of \gloskey{name}} + } + % \glossentrysymbol + \gcmd{gloss\-entry\-symbol} + {% + \providedby{\sty{glossaries} v3.08a+} + \syntax{\margm{entry-label}} + \desc{used by \idx{glossary} styles to display the entry's symbol} + } + % \Glossentrysymbol + \gcmd{Gloss\-entry\-symbol} + {% + \providedby{\sty{glossaries} v3.08a+} + \syntax{\margm{entry-label}} + \desc{as \gls{glossentrysymbol} but \idx{sentencecase}} + } + % \glsentrypdfsymbol + \gcmd{gls\-entry\-pdf\-symbol} + {% + \providedby{\sty{glossaries-extra} v1.42+} + \syntax{\margm{entry-label}} + \desc{used when \gls{glossentrysymbol} occurs in a PDF bookmark} + } + % \glossentrydesc + \gcmd{gloss\-entry\-desc} + {% + \providedby{\sty{glossaries} v3.08a+} + \syntax{\margm{entry-label}} + \desc{used by \idx{glossary} styles to display the entry's + description} + } + % \Glossentrydesc + \gcmd{Gloss\-entry\-desc} + {% + \providedby{\sty{glossaries} v3.08a+} + \syntax{\margm{entry-label}} + \desc{as \gls{glossentrydesc} but \idx{sentencecase}} + } + % \GlsXtrFormatLocationList + \gcmd{Gls\-Xtr\-Format\-Location\-List} + { + %\providedby{\sty{glossaries-extra} v0.5.2+} + \syntax{\margm{location list}} + \desc{used by \gls{glossaryentrynumbers} to encapsulate the entire + \idx{locationlist} in the + \idx{glossary}} + } + % \glossaryentrynumbers + \gcmd{glos\-sary\-entry\-numbers} + { + \providedby{\sty{glossaries}} + \syntax{\margm{location list}} + \desc{used within the \idx{glossary} to encapsulate the + \idx{locationlist} (redefined by the \opt{nonumberlist} option)} + } + % \GlsXtrEnablePreLocationTag + \gcmd{Gls\-Xtr\-Enable\-Pre\-Location\-Tag} + { + \providedby{\sty{glossaries-extra} v1.04+} + \syntax{\margm{page tag}\margm{pages tag}} + \desc{enables the \idx{locationlist} tag} + } + % \glsnoidxdisplayloc + \gcmd{gls\-no\-idx\-display\-loc} + { + \providedby{\sty{glossaries} v4.04+} + \syntax{\margm{prefix}\margm{counter}\margm{format}\margm{location}} + \desc{used to display a location in the location list} + } + % \glsxtrdisplaysingleloc + \gcmd{gls\-xtr\-display\-single\-loc} + { + \providedby{\sty{glossaries-extra} v1.12+} + \syntax{\margm{format}\margm{location}} + \desc{used to display a single location} + } + % \glsxtrdisplaystartloc + \gcmd{gls\-xtr\-display\-start\-loc} + { + \providedby{\sty{glossaries-extra} v1.12+} + \syntax{\margm{format}\margm{location}} + \desc{used to display a start location from an explicit range} + } + % \glsxtrdisplayendloc + \gcmd{gls\-xtr\-display\-end\-loc} + { + \providedby{\sty{glossaries-extra} v1.12+} + \syntax{\margm{format}\margm{location}} + \desc{used to display an end location from an explicit range} + } + % \glsxtrlocrangefmt + \gcmd{gls\-xtr\-loc\-range\-fmt} + { + \providedby{\sty{glossaries-extra} v1.12+} + \desc{expands to the range format (set by \gls{glsxtrdisplaystartloc})} + } + % \glsxtrdisplayendlochook + \gcmd{gls\-xtr\-display\-end\-loc\-hook} + { + \providedby{\sty{glossaries-extra} v1.12+} + \desc{hook used by \gls{glsxtrdisplayendloc}} + } + % theglossary environment + \genv{the\-glossary}% + {% + \providedby{\sty{glossaries}} + \desc{redefined by \idxpl{glossarystyle} to set up the way the + \idx{glossary} is displayed. For example, to start and end the + \env{description} environment for the \glostyle{list} styles} + } + % \glsnumberformat + \gcmd{gls\-number\-format}% + {% + \providedby{\sty{glossaries}} + \syntax{\margm{location(s)}} + \desc{the default \idxc{locationencap}{format} for \idxpl{entrylocation}. If + hyperlinks are defined, this will use \gls{glshypernumber} + otherwise it will simply display its argument, which may be a + single \location, or locations delimited by \gls{delimR} or + \gls{delimN}} + } + % \delimR + \gcmd{delimR}% + {% + \providedby{\sty{glossaries}} + \desc{used between the start and end of a \location\ range} + } + % \delimN + \gcmd{delimN}% + {% + \providedby{\sty{glossaries}} + \desc{used as a separator between \locations} + } + % \glshypernumber + \gcmd{gls\-hyper\-number}% + {% + \providedby{\sty{glossaries}} + \syntax{\margm{location(s)}} + \desc{this will encapsulate each location with a hyperlink, if + supported. This may be used as a \idx{locationencap}. + The argument may be a single location or locations + delimited by \gls{delimR} or \gls{delimN}. This command should + not be used outside of \idxpl{locationlist} as it + requires additional information in order to correctly form the + hyperlinks} + } + % \hyperbf + \gcmd{hyper\-bf} + { + \providedby{\sty{glossaries}} + \syntax{\margm{location(s)}} + \desc{if hyperlinks are supported this does + \code{\cmd{textbf}\marg{\gls{glshypernumber}\margm{location(s)}}} otherwise it just + does \code{\cmd{textbf}\margm{location(s)}}} + } + % \glstarget + \gcmd{gls\-target}% + {% + \providedby{\sty{glossaries} v1.18+} + \syntax{\margm{entry-label}\margm{text}} + \desc{used by \idxpl{glossarystyle} to create a hypertarget (if enabled) for + the entry (identified by \meta{entry-label}). The \meta{text} is usually + \gls{glossentryname}\margm{entry-label}, but it can be something + else} + } + % \setentrycounter + \gcmd{set\-entry\-counter} + { + \providedby{\sty{glossaries}} + \syntax{\oargm{prefix}\margm{counter}} + \desc{used to set the \idx{locationcounter} and prefix required + for \gls{glshypernumber}} + } + % \glsentryitem + \gcmd{gls\-entry\-item} + { + \providedby{\sty{glossaries} v3.0+} + \syntax{\margm{entry-label}} + \desc{does nothing if \optval{entrycounter}{false}, + otherwise increments and displays the associated counter} + } + % \glssubentryitem + \gcmd{gls\-sub\-entry\-item} + { + \providedby{\sty{glossaries} v3.0+} + \syntax{\margm{entry-label}} + \desc{does nothing if \optval{subentrycounter}{false}, + otherwise increments and displays the associated counter} + } + % \glsentrycounterlabel + \gcmd{gls\-entry\-counter\-label} + { + \providedby{\sty{glossaries} v3.0+} + \desc{used by \gls{glsentryitem} to display the entry counter label} + } + % \theglossaryentry + \gcmd{the\-glossary\-entry} + { + \providedby{\sty{glossaries} v3.0+} + \desc{the value of the \ctr{glossaryentry} counter} + } + % counter glossaryentry + \gctr{glossary\-entry} + { + \providedby{\sty{glossaries} v3.0+} + \desc{the counter associated with the \opt{entrycounter} package option} + } + % \glsnamefont + \gcmd{gls\-name\-font} + { + \providedby{\sty{glossaries}} + \syntax{\margm{text}} + \desc{used by \gls{glossentryname} to apply a font change to the + \gloskey{name}, unless (with \sty{glossaries-extra}) the + \catattr{glossnamefont} attribute has been set} + } + % \glsxtrpostname + \gcmdmeta{gls\-xtr\-post\-name}{cat\-e\-gory}{}{% + \providedby{\sty{glossaries-extra} v1.04+}% + \desc{the \gls{postnamehook} associated with the category + identified by the label \meta{category}} + } + % \glsxtrpostnamehook + \gcmd{gls\-xtr\-post\-name\-hook}{% + %\providedby{\sty{glossaries-extra} v0.5.3+}% + \syntax{\margm{entry-label}} + \desc{a hook that's performed within \gls{glossentryname} + and \gls{glossentrynameother} after the entry name is + displayed. This hook implements auto-indexing (see + \sectionref{sec:autoindex}), then the general hook + \gls{glsextrapostnamehook} and finally the + \gls{glsxtrpostnamecategory} hook} + } + % \glsextrapostnamehook + \gcmd{gls\-extra\-post\-name\-hook}{% + \providedby{\sty{glossaries-extra} v1.25+}% + \syntax{\margm{entry-label}} + \desc{a general purpose hook that's performed within \gls{glsxtrpostnamehook}} + } + % \glsdefpostname + \gcmd{gls\-def\-post\-name}{% + \providedby{\sty{glossaries-extra} v1.31+}% + \syntax{\margm{category}\margm{definition}} + \desc{defines \idx{postnamehook} associated with the category + identified by the label \meta{category}. This simply (re)defines + \gls{glsxtrpostnamecategory} for the given \meta{category} to + \meta{definition}} + } + % \glspostdescription + \gcmd{gls\-post\-de\-scrip\-tion}% + {% + \providedby{\sty{glossaries}} + \desc{a hook that is usually placed after the description in + \idxpl{glossarystyle}. Some of the styles provided with the + \sty{glossaries} package don't use this hook. The + \sty{glossaries-extra-stylemods} redefines those styles to + include the hook. The default definition of this command + tests for the \opt{nopostdot} option, but the \opt{postpunc} + option redefines the command to implement the chosen punctuation} + } + % \glsxtrpostdescription + \gcmd{gls\-xtr\-post\-de\-scrip\-tion} + { + %\providedby{\sty{glossaries-extra} v1.0+} + \desc{an additional hook used within \gls{glspostdescription} + that implements the \idx{catpostdeschook}} + } + % \glsxtrpostdesc + \gcmdmeta{gls\-xtr\-post\-desc}{cat\-e\-gory}{}{% + \providedby{\sty{glossaries-extra}} + \desc{the \gls{postdeschook} associated with the category + identified by the label \meta{category}} + } + % \glsdefpostdesc + \gcmd{gls\-def\-post\-desc}{% + \providedby{\sty{glossaries-extra} v1.31+} + \syntax{\margm{category}\margm{definition}} + \desc{defines \idx{postdeschook} associated with the category + identified by the label \meta{category}. This simply (re)defines + \gls{glsxtrpostdesccategory} for the given \meta{category} to + \meta{definition}} + } + % \glsxtrpostdescgeneral + \gcmd{gls\-xtr\-post\-desc\-general}% + {% + \initvalempty + %\providedby{\sty{glossaries-extra} v1.0+} + \desc{the default post-description hook for the \cat{general} category} + } + % \glsxtrpostdescsymbol + \gcmd{gls\-xtr\-post\-desc\-symbol}% + {% + \initvalempty + %\providedby{\sty{glossaries-extra} v1.0+} + \note{requires \code{\csfmt{usepackage}\oarg{\opt{symbols}}\marg{glossaries-extra}}} + \desc{the default \gls{postdeschook} for the \cat{symbol} category} + } + % \glsxtrpostdescnumber + \gcmd{gls\-xtr\-post\-desc\-number}% + {% + \initvalempty + %\providedby{\sty{glossaries-extra} v1.0+} + \note{requires \code{\csfmt{usepackage}\oarg{\opt{numbers}}\marg{glossaries-extra}}} + \desc{the default post-description hook for the \cat{number} category} + } + % \glsxtrpostdescindex + \gcmd{gls\-xtr\-post\-desc\-index}% + {% + \initvalempty + %\providedby{\sty{glossaries-extra} v1.0+} + \note{requires \code{\csfmt{usepackage}\oarg{\opt{index}}\marg{glossaries-extra}}} + \desc{the default post-description hook for the \cat{index} category} + } + % \glsxtrpostdescterm + \gcmd{gls\-xtr\-post\-desc\-term}% + {% + \initvalempty + %\providedby{\sty{glossaries-extra} v1.0+} + \desc{the default post-description hook for the \catfmt{term} category + (which isn't used by \sty{glossaries-extra})} + } + % \glsxtrpostdescacronym + \gcmd{gls\-xtr\-post\-desc\-acronym}% + {% + \initvalempty + %\providedby{\sty{glossaries-extra} v1.0+} + \desc{the default post-description hook for the \cat{acronym} category} + } + % \glsxtrpostdescabbreviation + \gcmd{gls\-xtr\-post\-desc\-ab\-bre\-vi\-a\-tion}% + {% + \initvalempty + %\providedby{\sty{glossaries-extra} v1.0+} + \desc{the default post-description hook for the \cat{abbreviation} category} + } + % \glsxtrrestorepostpunc + \gcmd{glsxtrrestorepostpunc} + { + \providedby{\sty{glossaries-extra} v1.23+} + \desc{used in the \gloskey{description} to counteract the use of + \gls{glsxtrnopostpunc}. Does nothing outside of the \idx{glossary}} + } + % \glsxtrnopostpunc + \gcmd{gls\-xtr\-no\-post\-punc} + {% + \providedby{\sty{glossaries-extra} v1.22+} + \desc{when placed at the end of the \gloskey{description}, this + switches off the post-description punctuation (inserted + automatically via options such as \opt{postdot}) but doesn't + suppress the \idx{postdeschook}. Does nothing outside of the + \idx{glossary}} + \field{seealso}{nopostdesc} + } + % \nopostdesc + \gcmd{no\-post\-desc} + {% + \providedby{\sty{glossaries} v1.17+} + \desc{when placed at the end of the \gloskey{description}, this + switches off the \idx{postdeschook} (including the + post-description punctuation). Does nothing outside of the + \idx{glossary}} + \field{seealso}{glsxtrnopostpunc} + } + % \glscurrententrylabel + \gcmd{gls\-current\-entry\-label} + { + \providedby{\sty{glossaries} v3.02+} + \desc{assigned at the start of each entry item within the + glossary. This command may be used by glossary hooks, such + as the \idx{postdeschook}, to reference the current entry} + } + % COMMANDS: longextra + % \glslongextraNameFmt + \gcmd{gls\-long\-extra\-Name\-Fmt} + { + \providedby{\sty{glossary-longextra} v1.37+} + \syntax{\margm{entry-label}} + \desc{used by the \sty{glossary-longextra} styles to add the + hypertarget (if supported) and display a top-level entry's name} + } + % \glslongextraSubNameFmt + \gcmd{gls\-long\-extra\-Sub\-Name\-Fmt} + { + \providedby{\sty{glossary-longextra} v1.37+} + \syntax{\margm{level}\margm{entry-label}} + \desc{used by the \sty{glossary-longextra} styles to add the + hypertarget (if supported) for child-entries. The name isn't + shown by default} + } + % \glslongextraDescFmt + \gcmd{gls\-long\-extra\-Desc\-Fmt} + { + \providedby{\sty{glossary-longextra} v1.37+} + \syntax{\margm{entry-label}} + \desc{used by the \sty{glossary-longextra} styles to display a + top-level entry's description and \idx{postdeschook}} + } + % \glslongextraSubDescFmt + \gcmd{gls\-long\-extra\-Sub\-Desc\-Fmt} + { + \providedby{\sty{glossary-longextra} v1.37+} + \syntax{\margm{level}\margm{entry-label}} + \desc{used by the \sty{glossary-longextra} styles to display a + child entry's description and \idx{postdeschook}} + } + % \glslongextraSymbolFmt + \gcmd{gls\-long\-extra\-Symbol\-Fmt} + { + \providedby{\sty{glossary-longextra} v1.37+} + \syntax{\margm{entry-label}} + \desc{used by the \sty{glossary-longextra} styles to display a + top-level entry's symbol} + } + % \glslongextraSubSymbolFmt + \gcmd{gls\-long\-extra\-Sub\-Symbol\-Fmt} + { + \providedby{\sty{glossary-longextra} v1.37+} + \syntax{\margm{level}\margm{entry-label}} + \desc{used by the \sty{glossary-longextra} styles to display a + child entry's symbol} + } + % \glslongextraSymbolTargetFmt + \gcmd{gls\-long\-extra\-Symbol\-Target\-Fmt} + { + \providedby{\sty{glossary-longextra} v1.49+} + \syntax{\margm{entry-label}} + \desc{adds the hypertarget (if supported) and displays the + symbol for top-level entries} + } + % \glslongextraSubSymbolTargetFmt + \gcmd{gls\-long\-extra\-Sub\-Symbol\-Target\-Fmt} + { + \providedby{\sty{glossary-longextra} v1.49+} + \syntax{\margm{level}\margm{entry-label}} + \desc{adds the hypertarget (if supported) and displays the + symbol for child entries} + } + % \glslongextraSymbolOrName + \gcmd{gls\-long\-extra\-Symbol\-Or\-Name} + { + \providedby{\sty{glossary-longextra} v1.49+} + \syntax{\margm{entry-label}} + \desc{adds the hypertarget (if supported) and displays the + symbol if set or the name otherwise for top-level entries} + } + % \glslongextraSubSymbolOrName + \gcmd{gls\-long\-extra\-Sub\-Symbol\-Or\-Name} + { + \providedby{\sty{glossary-longextra} v1.49+} + \syntax{\margm{level}\margm{entry-label}} + \desc{adds the hypertarget (if supported) and displays the + symbol if set or the name otherwise for child entries} + } + % \glslongextraLocationFmt + \gcmd{gls\-long\-extra\-Location\-Fmt} + { + \providedby{\sty{glossary-longextra} v1.37+} + \syntax{\margm{entry-label}\margm{location list}} + \desc{used by the \sty{glossary-longextra} styles to display a + top-level entry's \idx{locationlist}} + } + % \glslongextraSubLocationFmt + \gcmd{gls\-long\-extra\-Sub\-Location\-Fmt} + { + \providedby{\sty{glossary-longextra} v1.37+} + \syntax{\margm{level}\margm{entry-label}\margm{location list}} + \desc{used by the \sty{glossary-longextra} styles to display a + child entry's \idx{locationlist}} + } + % \glslongextraHeaderFmt + \gcmd{gls\-long\-extra\-Header\-Fmt} + { + \providedby{\sty{glossary-longextra} v1.37+} + \syntax{\margm{text}} + \desc{used to format the column headers} + } + % \ifGlsLongExtraUseTabular + \gcond{if\-Gls\-Long\-Extra\-Use\-Tabular} + { + \providedby{\sty{glossary-longextra} v1.37+} + \initvalcs{iffalse} + \desc{conditional that determines whether or not to use + \env{tabular} instead of \env{longtable}. If this conditional is + changed, it must be changed before the style is set} + } + % \GlsLongExtraUseTabulartrue + \gcmd{Gls\-Long\-Extra\-Use\-Tabular\-true} + { + \providedby{\sty{glossary-longextra} v1.37+} + \desc{sets \gls{ifGlsLongExtraUseTabular} to true (if this + setting is required, the style must be set after this command)} + } + % \GlsLongExtraUseTabularfalse + \gcmd{Gls\-Long\-Extra\-Use\-Tabular\-false} + { + \providedby{\sty{glossary-longextra} v1.37+} + \desc{sets \gls{ifGlsLongExtraUseTabular} to false (if this + setting is required, the style must be set after this command)} + } + % \glslongextraTabularVAlign + \gcmd{gls\-long\-extra\-Tabular\-V\-Align} + { + \providedby{\sty{glossary-longextra} v1.37+} + \initval{c} + \desc{only for use with the \env{tabular} setting, this should + expand to the \env{tabular} environment's vertical alignment + specifier} + } + % \glslongextraNameAlign + \gcmd{gls\-long\-extra\-Name\-Align} + { + \providedby{\sty{glossary-longextra} v1.37+} + \initval{l} + \desc{the horizontal alignment for the name column} + } + % \glslongextraSymbolAlign + \gcmd{gls\-long\-extra\-Symbol\-Align} + { + \providedby{\sty{glossary-longextra} v1.37+} + \initval{c} + \desc{the horizontal alignment for the symbol column} + } + % \glslongextraSymbolNameAlign + \gcmd{gls\-long\-extra\-Symbol\-Name\-Align} + { + \providedby{\sty{glossary-longextra} v1.49+} + \initval{l} + \desc{the horizontal alignment for the symbol column when it's + being used instead of the name} + } + % \glslongextraDescAlign + \gcmd{gls\-long\-extra\-Desc\-Align} + { + \providedby{\sty{glossary-longextra} v1.37+} + \desc{the horizontal alignment for the description column} + } + % \glslongextraLocationAlign + \gcmd{gls\-long\-extra\-Location\-Align} + { + \providedby{\sty{glossary-longextra} v1.37+} + \desc{the horizontal alignment for the \idx{locationlist} column} + } + % \glslongextraGroupHeading + \gcmd{gls\-long\-extra\-Group\-Head\-ing} + { + \providedby{\sty{glossary-longextra} v1.37+} + \syntax{\margm{number columns}\margm{group-label}} + \desc{formats the top-level \idx{group} heading} + } + % \glslongextraSubGroupHeading + \gcmd{gls\-long\-extra\-Sub\-Group\-Head\-ing} + { + \providedby{\sty{glossary-longextra} v1.49+} + \syntax{\margm{number columns}\margm{prev group + level}\margm{group level}\margm{parent-entry-label}\margm{group-label}} + \desc{formats the sub-\idx{group} heading, if supported} + } + % \glslongextraNameDescHeader + \gcmd{gls\-long\-extra\-Name\-Desc\-Header} + { + \providedby{\sty{glossary-longextra} v1.37+} + \desc{sets the header and footer for the \glostyle{long-name-desc} + style with \env{longtable}} + } + % \glslongextraNameDescTabularHeader + \gcmd{gls\-long\-extra\-Name\-Desc\-Tabular\-Header} + { + \providedby{\sty{glossary-longextra} v1.37+} + \desc{displays the header for the \glostyle{long-name-desc} style} + } + % \glslongextraNameDescTabularFooter + \gcmd{gls\-long\-extra\-Name\-Desc\-Tabular\-Footer} + { + \providedby{\sty{glossary-longextra} v1.37+} + \desc{displays the footer for the \glostyle{long-name-desc} style} + } + % \glslongextraNameDescLocationHeader + \gcmd{gls\-long\-extra\-Name\-Desc\-Location\-Header} + { + \providedby{\sty{glossary-longextra} v1.37+} + \desc{sets the header and footer for the \glostyle{long-name-desc-loc} + style with \env{longtable}} + } + % \glslongextraNameDescLocationTabularHeader + \gcmd{gls\-long\-extra\-Name\-Desc\-Location\-Tabular\-Header} + { + \providedby{\sty{glossary-longextra} v1.37+} + \desc{displays the header for the \glostyle{long-name-desc-loc} style} + } + % \glslongextraNameDescLocationTabularFooter + \gcmd{gls\-long\-extra\-Name\-Desc\-Location\-Tabular\-Footer} + { + \providedby{\sty{glossary-longextra} v1.37+} + \desc{displays the footer for the \glostyle{long-name-desc-loc} style} + } + % \glslongextraDescNameHeader + \gcmd{gls\-long\-extra\-Desc\-Name\-Header} + { + \providedby{\sty{glossary-longextra} v1.37+} + \desc{sets the header and footer for the \glostyle{long-desc-name} + style with \env{longtable}} + } + % \glslongextraDescNameTabularHeader + \gcmd{gls\-long\-extra\-Desc\-Name\-Tabular\-Header} + { + \providedby{\sty{glossary-longextra} v1.37+} + \desc{displays the header for the \glostyle{long-desc-name} style} + } + % \glslongextraDescNameTabularFooter + \gcmd{gls\-long\-extra\-Desc\-Name\-Tabular\-Footer} + { + \providedby{\sty{glossary-longextra} v1.37+} + \desc{displays the footer for the \glostyle{long-desc-name} style} + } + % \glslongextraLocationDescNameHeader + \gcmd{gls\-long\-extra\-Location\-Desc\-Name\-Header} + { + \providedby{\sty{glossary-longextra} v1.37+} + \desc{sets the header and footer for the \glostyle{long-loc-desc-name} + style with \env{longtable}} + } + % \glslongextraLocationDescNameTabularHeader + \gcmd{gls\-long\-extra\-Location\-Desc\-Name\-Tabular\-Header} + { + \providedby{\sty{glossary-longextra} v1.37+} + \desc{displays the header for the \glostyle{long-loc-desc-name} style} + } + % \glslongextraLocationDescNameTabularFooter + \gcmd{gls\-long\-extra\-Location\-Desc\-Name\-Tabular\-Footer} + { + \providedby{\sty{glossary-longextra} v1.37+} + \desc{displays the footer for the \glostyle{long-loc-desc-name} style} + } + % \glslongextraNameDescSymHeader + \gcmd{gls\-long\-extra\-Name\-Desc\-Sym\-Header} + { + \providedby{\sty{glossary-longextra} v1.37+} + \desc{sets the header and footer for the \glostyle{long-name-desc-sym} + style with \env{longtable}} + } + % \glslongextraNameDescSymTabularHeader + \gcmd{gls\-long\-extra\-Name\-Desc\-Sym\-Tabular\-Header} + { + \providedby{\sty{glossary-longextra} v1.37+} + \desc{displays the header for the \glostyle{long-name-desc-sym} style} + } + % \glslongextraNameDescSymTabularFooter + \gcmd{gls\-long\-extra\-Name\-Desc\-Sym\-Tabular\-Footer} + { + \providedby{\sty{glossary-longextra} v1.37+} + \desc{displays the footer for the \glostyle{long-name-desc-sym} style} + } + % \glslongextraNameDescSymLocationHeader + \gcmd{gls\-long\-extra\-Name\-Desc\-Sym\-Location\-Header} + { + \providedby{\sty{glossary-longextra} v1.37+} + \desc{sets the header and footer for the \glostyle{long-name-desc-sym-loc} + style with \env{longtable}} + } + % \glslongextraNameDescSymLocationTabularHeader + \gcmd{gls\-long\-extra\-Name\-Desc\-Sym\-Location\-Tabular\-Header} + { + \providedby{\sty{glossary-longextra} v1.37+} + \desc{displays the header for the \glostyle{long-name-desc-sym-loc} style} + } + % \glslongextraNameDescSymLocationTabularFooter + \gcmd{gls\-long\-extra\-Name\-Desc\-Sym\-Location\-Tabular\-Footer} + { + \providedby{\sty{glossary-longextra} v1.37+} + \desc{displays the footer for the \glostyle{long-name-desc-sym-loc} style} + } + % \glslongextraNameSymDescHeader + \gcmd{gls\-long\-extra\-Name\-Sym\-Desc\-Header} + { + \providedby{\sty{glossary-longextra} v1.37+} + \desc{sets the header and footer for the \glostyle{long-name-sym-desc} + style with \env{longtable}} + } + % \glslongextraNameSymDescTabularHeader + \gcmd{gls\-long\-extra\-Name\-Sym\-Desc\-Tabular\-Header} + { + \providedby{\sty{glossary-longextra} v1.37+} + \desc{displays the header for the \glostyle{long-name-sym-desc} style} + } + % \glslongextraNameSymDescTabularFooter + \gcmd{gls\-long\-extra\-Name\-Sym\-Desc\-Tabular\-Footer} + { + \providedby{\sty{glossary-longextra} v1.37+} + \desc{displays the footer for the \glostyle{long-name-sym-desc} style} + } + % \glslongextraNameSymDescLocationHeader + \gcmd{gls\-long\-extra\-Name\-Sym\-Desc\-Location\-Header} + { + \providedby{\sty{glossary-longextra} v1.37+} + \desc{sets the header and footer for the \glostyle{long-name-sym-desc-loc} + style with \env{longtable}} + } + % \glslongextraNameSymDescLocationTabularHeader + \gcmd{gls\-long\-extra\-Name\-Sym\-Desc\-Location\-Tabular\-Header} + { + \providedby{\sty{glossary-longextra} v1.37+} + \desc{displays the header for the \glostyle{long-name-sym-desc-loc} style} + } + % \glslongextraNameSymDescLocationTabularFooter + \gcmd{gls\-long\-extra\-Name\-Sym\-Desc\-Location\-Tabular\-Footer} + { + \providedby{\sty{glossary-longextra} v1.37+} + \desc{displays the footer for the \glostyle{long-name-sym-desc-loc} style} + } + % \glslongextraSymDescNameHeader + \gcmd{gls\-long\-extra\-Sym\-Desc\-Name\-Header} + { + \providedby{\sty{glossary-longextra} v1.37+} + \desc{sets the header and footer for the \glostyle{long-sym-desc-name} + style with \env{longtable}} + } + % \glslongextraSymDescNameTabularHeader + \gcmd{gls\-long\-extra\-Sym\-Desc\-Name\-Tabular\-Header} + { + \providedby{\sty{glossary-longextra} v1.37+} + \desc{displays the header for the \glostyle{long-sym-desc-name} style} + } + % \glslongextraSymDescNameTabularFooter + \gcmd{gls\-long\-extra\-Sym\-Desc\-Name\-Tabular\-Footer} + { + \providedby{\sty{glossary-longextra} v1.37+} + \desc{displays the footer for the \glostyle{long-sym-desc-name} style} + } + % \glslongextraLocationSymDescNameHeader + \gcmd{gls\-long\-extra\-Location\-Sym\-Desc\-Name\-Header} + { + \providedby{\sty{glossary-longextra} v1.37+} + \desc{sets the header and footer for the \glostyle{long-loc-sym-desc-name} + style with \env{longtable}} + } + % \glslongextraLocationSymDescNameTabularHeader + \gcmd{gls\-long\-extra\-Location\-Sym\-Desc\-Name\-Tabular\-Header} + { + \providedby{\sty{glossary-longextra} v1.37+} + \desc{displays the header for the \glostyle{long-loc-sym-desc-name} style} + } + % \glslongextraLocationSymDescNameTabularFooter + \gcmd{gls\-long\-extra\-Location\-Sym\-Desc\-Name\-Tabular\-Footer} + { + \providedby{\sty{glossary-longextra} v1.37+} + \desc{displays the footer for the \glostyle{long-loc-sym-desc-name} style} + } + % \glslongextraDescSymNameHeader + \gcmd{gls\-long\-extra\-Desc\-Sym\-Name\-Header} + { + \providedby{\sty{glossary-longextra} v1.37+} + \desc{sets the header and footer for the \glostyle{long-desc-sym-name} + style with \env{longtable}} + } + % \glslongextraDescSymNameTabularHeader + \gcmd{gls\-long\-extra\-Desc\-Sym\-Name\-Tabular\-Header} + { + \providedby{\sty{glossary-longextra} v1.37+} + \desc{displays the header for the \glostyle{long-desc-sym-name} style} + } + % \glslongextraDescSymNameTabularFooter + \gcmd{gls\-long\-extra\-Desc\-Sym\-Name\-Tabular\-Footer} + { + \providedby{\sty{glossary-longextra} v1.37+} + \desc{displays the footer for the \glostyle{long-desc-sym-name} style} + } + % \glslongextraLocationDescSymNameHeader + \gcmd{gls\-long\-extra\-Location\-Desc\-Sym\-Name\-Header} + { + \providedby{\sty{glossary-longextra} v1.37+} + \desc{sets the header and footer for the \glostyle{long-loc-desc-sym-name} + style with \env{longtable}} + } + % \glslongextraLocationDescSymNameTabularHeader + \gcmd{gls\-long\-extra\-Location\-Desc\-Sym\-Name\-Tabular\-Header} + { + \providedby{\sty{glossary-longextra} v1.37+} + \desc{displays the header for the \glostyle{long-loc-desc-sym-name} style} + } + % \glslongextraLocationDescSymNameTabularFooter + \gcmd{gls\-long\-extra\-Location\-Desc\-Sym\-Name\-Tabular\-Footer} + { + \providedby{\sty{glossary-longextra} v1.37+} + \desc{displays the footer for the \glostyle{long-loc-desc-sym-name} style} + } + % \glslongextraDescSymHeader + \gcmd{gls\-long\-extra\-Desc\-Sym\-Header} + { + \providedby{\sty{glossary-longextra} v1.49+} + \desc{sets the header and footer for the \glostyle{long-desc-sym} + style with \env{longtable}} + } + % \glslongextraDescSymTabularHeader + \gcmd{gls\-long\-extra\-Desc\-Sym\-Tabular\-Header} + { + \providedby{\sty{glossary-longextra} v1.49+} + \desc{displays the header for the \glostyle{long-desc-sym} style} + } + % \glslongextraDescSymTabularFooter + \gcmd{gls\-long\-extra\-Desc\-Sym\-Tabular\-Footer} + { + \providedby{\sty{glossary-longextra} v1.49+} + \desc{displays the footer for the \glostyle{long-desc-sym} style} + } + % \glslongextraSymDescHeader + \gcmd{gls\-long\-extra\-Sym\-Desc\-Header} + { + \providedby{\sty{glossary-longextra} v1.49+} + \desc{sets the header and footer for the \glostyle{long-sym-desc} + style with \env{longtable}} + } + % \glslongextraSymDescTabularHeader + \gcmd{gls\-long\-extra\-Sym\-Desc\-Tabular\-Header} + { + \providedby{\sty{glossary-longextra} v1.49+} + \desc{displays the header for the \glostyle{long-sym-desc} style} + } + % \glslongextraSymDescTabularFooter + \gcmd{gls\-long\-extra\-Sym\-Desc\-Tabular\-Footer} + { + \providedby{\sty{glossary-longextra} v1.49+} + \desc{displays the footer for the \glostyle{long-sym-desc} style} + } + % \glslongextraShortLongTabularHeader + \gcmd{gls\-long\-extra\-Short\-Long\-Tabular\-Header} + { + \providedby{\sty{glossary-longextra} v1.49+} + \desc{displays the header for the \glostyle{abbr-short-long} style} + } + % \glslongextraShortLongTabularFooter + \gcmd{gls\-long\-extra\-Short\-Long\-Tabular\-Footer} + { + \providedby{\sty{glossary-longextra} v1.49+} + \desc{displays the footer for the \glostyle{abbr-short-long} style} + } + % \glslongextraShortLongHeader + \gcmd{gls\-long\-extra\-Short\-Long\-Header} + { + \providedby{\sty{glossary-longextra} v1.49+} + \desc{sets the header and footer for the \glostyle{abbr-short-long} + style with \env{longtable}} + } + % \glslongextraLongShortTabularHeader + \gcmd{gls\-long\-extra\-Long\-Short\-Tabular\-Header} + { + \providedby{\sty{glossary-longextra} v1.49+} + \desc{displays the header for the \glostyle{abbr-short-long} style} + } + % \glslongextraLongShortTabularFooter + \gcmd{gls\-long\-extra\-Long\-Short\-Tabular\-Footer} + { + \providedby{\sty{glossary-longextra} v1.49+} + \desc{displays the footer for the \glostyle{abbr-short-long} style} + } + % \glslongextraLongShortHeader + \gcmd{gls\-long\-extra\-Long\-Short\-Header} + { + \providedby{\sty{glossary-longextra} v1.49+} + \desc{sets the header and footer for the \glostyle{abbr-short-long} + style with \env{longtable}} + } + % \glslongextraShortNoNameSetDescWidth + \gcmd{gls\-long\-extra\-Short\-No\-Name\-Set\-Desc\-Width} + { + \providedby{\sty{glossary-longextra} v1.49+} + \desc{sets the value of \gls{glsdescwidth} for the + \glostyle{abbr-long-short} and \glostyle{abbr-short-long} + styles} + } + % \glslongextraShortHeader + \gcmd{gls\-long\-extra\-Short\-Head\-er} + { + \providedby{\sty{glossary-longextra} v1.49+} + \initvalcs{entryname} + \desc{the short column header for the + \glostyle{abbr-long-short} and \glostyle{abbr-short-long} + styles} + } + % \glslongextraLongHeader + \gcmd{gls\-long\-extra\-Long\-Head\-er} + { + \providedby{\sty{glossary-longextra} v1.49+} + \initvalcs{descriptionname} + \desc{the long column header for the + \glostyle{abbr-long-short} and \glostyle{abbr-short-long} + styles} + } + % \glslongextraShortTargetFmt + \gcmd{gls\-long\-extra\-Short\-Target\-Fmt} + { + \providedby{\sty{glossary-longextra} v1.49+} + \syntax{\margm{entry-label}} + \desc{the formatting, including the target, for the short form in the + \glostyle{abbr-long-short} and \glostyle{abbr-short-long} + styles} + } + % \glslongextraLongFmt + \gcmd{gls\-long\-extra\-Long\-Fmt} + { + \providedby{\sty{glossary-longextra} v1.49+} + \syntax{\margm{entry-label}} + \desc{the formatting for the long form in the + \glostyle{abbr-long-short} and \glostyle{abbr-short-long} + styles} + } + % \glslongextraSubShortTargetFmt + \gcmd{gls\-long\-extra\-Sub\-Short\-Target\-Fmt} + { + \providedby{\sty{glossary-longextra} v1.49+} + \syntax{\margm{level}\margm{entry-label}} + \desc{the formatting, including the target, for child entry short forms in the + \glostyle{abbr-long-short} and \glostyle{abbr-short-long} + styles} + } + % \glslongextraSubLongFmt + \gcmd{gls\-long\-extra\-Sub\-Long\-Fmt} + { + \providedby{\sty{glossary-longextra} v1.49+} + \syntax{\margm{level}\margm{entry-label}} + \desc{the formatting for child entry long forms in the + \glostyle{abbr-long-short} and \glostyle{abbr-short-long} + styles} + } + % \glslongextraSetWidest + \gcmd{gls\-long\-extra\-Set\-Widest} + { + \providedby{\sty{glossary-longextra} v1.37+} + \syntax{\margm{widest-name}} + \desc{identifies \meta{widest-name} as the widest top-level name} + } + % \glslongextraUpdateWidest + \gcmd{gls\-long\-extra\-Update\-Widest} + { + \providedby{\sty{glossary-longextra} v1.37+} + \syntax{\margm{name}} + \desc{if \meta{name} is wider than the current widest name, it + will be set as the new widest name} + } + % \glslongextraUpdateWidestChild + \gcmd{gls\-long\-extra\-Update\-Widest\-Child} + { + \providedby{\sty{glossary-longextra} v1.37+} + \syntax{\margm{level}\margm{name}} + \desc{as \gls{glslongextraUpdateWidest} but for child entries. + Does nothing by default} + } + % \glslongextraSetDescWidth + \gcmd{gls\-long\-extra\-Set\-Desc\-Width} + { + \providedby{\sty{glossary-longextra} v1.37+} + \desc{computes the value of \gls{glsdescwidth} according to the + widest name for styles that only show the name and description} + } + % \glslongextraSymSetDescWidth + \gcmd{gls\-long\-extra\-Sym\-Set\-Desc\-Width} + { + \providedby{\sty{glossary-longextra} v1.37+} + \desc{computes the value of \gls{glsdescwidth} according to the + widest name for styles that only show the name, symbol and description} + } + % \glslongextraSymNoNameSetDescWidth + \gcmd{gls\-long\-extra\-Sym\-No\-Name\-Set\-Desc\-Width} + { + \providedby{\sty{glossary-longextra} v1.49+} + \desc{computes the value of \gls{glsdescwidth} according to the + widest name for styles that only show the symbol and description} + } + % \glslongextraLocSetDescWidth + \gcmd{gls\-long\-extra\-Loc\-Set\-Desc\-Width} + { + \providedby{\sty{glossary-longextra} v1.37+} + \desc{computes the value of \gls{glsdescwidth} according to the + widest name for styles that only show the name, \idx{locationlist} and description} + } + % \glslongextraSymLocSetDescWidth + \gcmd{gls\-long\-extra\-Sym\-Loc\-Set\-Desc\-Width} + { + \providedby{\sty{glossary-longextra} v1.37+} + \desc{computes the value of \gls{glsdescwidth} according to the + widest name for styles that show the name, symbol, \idx{locationlist} and description} + } + % COMMANDS: bookindex + % \glsxtrbookindexname + \gcmd{gls\-xtr\-book\-index\-name} + { + \providedby{\sty{glossary-bookindex} v1.21+} + \syntax{\margm{entry-label}} + \desc{used by the \glostyle{bookindex} style to display a + top-level entry's name} + } + % \glsxtrbookindexsubname + \gcmd{gls\-xtr\-book\-index\-sub\-name} + { + \providedby{\sty{glossary-bookindex} v1.21+} + \syntax{\margm{entry-label}} + \desc{used by the \glostyle{bookindex} style to display a + child entry's name} + } + % \glsxtrbookindexpregroupskip + \gcmd{gls\-xtr\-book\-index\-pre\-group\-skip} + { + \providedby{\sty{glossary-bookindex} v1.49+} + \syntax{\margm{skip}} + \desc{used by the \glostyle{bookindex} style insert \meta{skip} + after a \idx{group} header} + } + % \glsxtrbookindexcols + \gcmd{gls\-xtr\-book\-index\-cols} + { + \providedby{\sty{glossary-bookindex} v1.21+} + \initval{2} + \desc{expands to the number of columns for the \glostyle{bookindex} style} + } + % \glsxtrbookindexformatsubheader + \gcmd{gls\-xtr\-book\-index\-format\-sub\-header} + { + \providedby{\sty{glossary-bookindex} v1.49+} + \syntax{\margm{previous level}\margm{level}\margm{parent-label}\margm{group-label}\margm{title}} + \desc{formats the sub-group header} + } + % \glsxtrbookindexcolspread + \gcmd{gls\-xtr\-book\-index\-col\-spread} + { + \providedby{\sty{glossary-bookindex} v1.12+} + \desc{if not empty this should expand to the option argument for + \env{multicols}} + } + % \glsxtrbookindexmulticolsenv + \gcmd{gls\-xtr\-book\-index\-multi\-cols\-env} + { + \providedby{\sty{glossary-bookindex} v1.25+} + \desc{expands to the name of the \env{multicols} environment to use} + } + % \glsxtrbookindexprelocation + \gcmd{gls\-xtr\-book\-index\-pre\-lo\-ca\-tion} + { + \providedby{\sty{glossary-bookindex} v1.21+} + \syntax{\margm{entry-label}} + \desc{used by the \glostyle{bookindex} style to display + a separator before top-level \idxpl{locationlist}} + } + % \glsxtrbookindexsubprelocation + \gcmd{gls\-xtr\-book\-index\-sub\-pre\-lo\-ca\-tion} + { + \providedby{\sty{glossary-bookindex} v1.21+} + \syntax{\margm{entry-label}} + \desc{used by the \glostyle{bookindex} style to display + a separator before child \idxpl{locationlist}} + } + % \glsxtrbookindexlocation + \gcmd{gls\-xtr\-book\-index\-lo\-ca\-tion} + { + \providedby{\sty{glossary-bookindex} v1.39+} + \syntax{\margm{entry-label}\margm{location list}} + \desc{used by the \glostyle{bookindex} style to display + top-level \idxpl{locationlist}} + } + % \glsxtrbookindexsublocation + \gcmd{gls\-xtr\-book\-index\-sub\-lo\-ca\-tion} + { + \providedby{\sty{glossary-bookindex} v1.39+} + \syntax{\margm{entry-label}\margm{location list}} + \desc{used by the \glostyle{bookindex} style to display + child \idxpl{locationlist}} + } + % \glsxtrbookindexparentchildsep + \gcmd{gls\-xtr\-book\-index\-parent\-child\-sep} + { + \providedby{\sty{glossary-bookindex} v1.21+} + \desc{used by the \glostyle{bookindex} style to separate + a top-level parent and child entry} + } + % \glsxtrbookindexparentsubchildsep + \gcmd{gls\-xtr\-book\-index\-parent\-sub\-child\-sep} + { + \providedby{\sty{glossary-bookindex} v1.21+} + \desc{used by the \glostyle{bookindex} style to separate + a sub-level parent and child entry} + } + % \glsxtrbookindexbetween + \gcmd{gls\-xtr\-book\-index\-between} + { + \providedby{\sty{glossary-bookindex} v1.21+} + \syntax{\margm{entry1-label}\margm{entry2-label}} + \desc{used by the \glostyle{bookindex} style between two + entries where \meta{entry1-label} is the last top-level entry + and \meta{entry2-label} is the next entry, which is a top-level + entry} + } + % \glsxtrbookindexsubbetween + \gcmd{gls\-xtr\-book\-index\-sub\-between} + { + \providedby{\sty{glossary-bookindex} v1.21+} + \syntax{\margm{entry1-label}\margm{entry2-label}} + \desc{as \gls{glsxtrbookindexbetween} but for level~1 entries} + } + % \glsxtrbookindexsubsubbetween + \gcmd{gls\-xtr\-book\-index\-sub\-sub\-between} + { + \providedby{\sty{glossary-bookindex} v1.21+} + \syntax{\margm{entry1-label}\margm{entry2-label}} + \desc{as \gls{glsxtrbookindexbetween} but for level~2 entries} + } + % \glsxtrbookindexatendgroup + \gcmd{gls\-xtr\-book\-index\-at\-end\-group} + { + \providedby{\sty{glossary-bookindex} v1.21+} + \syntax{\margm{entry-label}} + \desc{used by the \glostyle{bookindex} style at the end of a + letter group (where the last top-level entry is given by \meta{entry-label})} + } + % \glsxtrbookindexsubatendgroup + \gcmd{gls\-xtr\-book\-index\-sub\-at\-end\-group} + { + \providedby{\sty{glossary-bookindex} v1.21+} + \syntax{\margm{entry-label}} + \desc{used by the \glostyle{bookindex} style at the end of a + letter group (where the last level~1 entry is given by \meta{entry-label})} + } + % \glsxtrbookindexsubsubatendgroup + \gcmd{gls\-xtr\-book\-index\-sub\-sub\-at\-end\-group} + { + \providedby{\sty{glossary-bookindex} v1.21+} + \syntax{\margm{entry-label}} + \desc{used by the \glostyle{bookindex} style at the end of a + letter group (where the last level~2 entry is given by \meta{entry-label})} + } + % \glsxtrbookindexbookmark + \gcmd{gls\-xtr\-book\-index\-bookmark} + { + \providedby{\sty{glossary-bookindex} v1.21+} + \syntax{\margm{group-title}\margm{bookmark-name}} + \desc{adds a bookmark with \gls{pdfbookmark}, if supported} + } + % \glsxtrbookindexformatheader + \gcmd{gls\-xtr\-book\-index\-format\-header} + { + \providedby{\sty{glossary-bookindex} v1.21+} + \syntax{\margm{group-title}} + \desc{used by the \glostyle{bookindex} style to format a \idx{group} header} + } + % \glsxtrbookindexmarkentry + \gcmd{gls\-xtr\-book\-index\-mark\-entry} + { + \providedby{\sty{glossary-bookindex} v1.21+} + \syntax{\margm{entry-label}} + \desc{used by the \glostyle{bookindex} style to mark an entry in + the \ext{aux} file} + } + % \glsxtrbookindexfirstmarkfmt + \gcmd{gls\-xtr\-book\-index\-first\-mark\-fmt} + { + \providedby{\sty{glossary-bookindex} v1.21+} + \syntax{\margm{entry-label}} + \desc{used by the \glostyle{bookindex} style to format the first mark} + } + % \glsxtrbookindexfirstmark + \gcmd{gls\-xtr\-book\-index\-first\-mark} + { + \providedby{\sty{glossary-bookindex} v1.21+} + \syntax{\margm{entry-label}} + \desc{used by the \glostyle{bookindex} style to obtain the first mark + and, if found, format it with \gls{glsxtrbookindexfirstmarkfmt}} + } + % \glsxtrbookindexlastmarkfmt + \gcmd{gls\-xtr\-book\-index\-last\-mark\-fmt} + { + \providedby{\sty{glossary-bookindex} v1.21+} + \syntax{\margm{entry-label}} + \desc{used by the \glostyle{bookindex} style to format the last mark} + } + % \glsxtrbookindexlastmark + \gcmd{gls\-xtr\-book\-index\-last\-mark} + { + \providedby{\sty{glossary-bookindex} v1.21+} + \syntax{\margm{entry-label}} + \desc{used by the \glostyle{bookindex} style to obtain the last mark + and, if found, format it with \gls{glsxtrbookindexlastmarkfmt}} + } + % COMMANDS: topic + % \glstopicGroupHeading + \gcmd{gls\-topic\-Group\-Heading} + { + \providedby{\sty{glossary-topic} v1.40+} + \syntax{\margm{group-label}} + \desc{used to format the top-level group headings, if required} + } + % \glstopicSubGroupHeading + \gcmd{gls\-topic\-Sub\-Group\-Heading} + { + \providedby{\sty{glossary-topic} v1.49+} + \syntax{\margm{prev group level}\margm{group level}\margm{parent entry}\margm{group-label}} + \desc{used to format the sub-group headings, if supported} + } + % \glstopicItem + \gcmd{gls\-topic\-Item} + { + \providedby{\sty{glossary-topic} v1.40+} + \syntax{\margm{entry-label}\margm{location list}} + \desc{used to format top-level entries} + } + % \glstopicSubItem + \gcmd{gls\-topic\-Sub\-Item} + { + \providedby{\sty{glossary-topic} v1.40+} + \syntax{\margm{level}\margm{entry-label}\margm{location list}} + \desc{used to format child entries} + } + % \glstopicSubItemSep + \gcmd{gls\-topic\-Sub\-Item\-Sep} + { + \providedby{\sty{glossary-topic} v1.40+} + \desc{horizontal separator used after child names} + } + % \glstopicSubItemBox + \gcmd{gls\-topic\-Sub\-Item\-Box} + { + \providedby{\sty{glossary-topic} v1.40+} + \syntax{\margm{level}\margm{text}} + \desc{horizontal box used for child name if a widest name has + been provided} + } + % \glstopicSubNameFont + \gcmd{gls\-topic\-Sub\-Name\-Font} + { + \providedby{\sty{glossary-topic} v1.40+} + \syntax{\margm{text}} + \desc{font command to apply to the child entry name} + } + % \glstopicSubPreLocSep + \gcmd{gls\-topic\-Sub\-Pre\-Loc\-Sep} + { + \providedby{\sty{glossary-topic} v1.41+} + \desc{separator before the child \idxpl{locationlist}} + } + % \glstopicSubLoc + \gcmd{gls\-topic\-Sub\-Loc} + { + \providedby{\sty{glossary-topic} v1.41+} + \syntax{\margm{entry-label}\margm{location list}} + \desc{formats the child \idxpl{locationlist}} + } + % \glstopicPreSkip + \gcmd{gls\-topic\-Pre\-Skip} + { + \providedby{\sty{glossary-topic} v1.40+} + \desc{vertical space inserted before a top-level entry} + } + % \glstopicMidSkip + \gcmd{gls\-topic\-Mid\-Skip} + { + \providedby{\sty{glossary-topic} v1.40+} + \desc{vertical space inserted before the description for a top-level entry} + } + % \glstopicPostSkip + \gcmd{gls\-topic\-Post\-Skip} + { + \providedby{\sty{glossary-topic} v1.40+} + \desc{vertical space inserted after the description for a top-level entry} + } + % \glstopicMarker + \gcmd{gls\-topic\-Marker} + { + \providedby{\sty{glossary-topic} v1.40+} + \syntax{\margm{entry-label}} + \desc{hook inserted before a top-level entry} + } + % \glstopicTitleFont + \gcmd{gls\-topic\-Title\-Font} + { + \providedby{\sty{glossary-topic} v1.40+} + \syntax{\margm{text}} + \desc{font command to apply to the top-level entry title} + } + % \glstopicTitle + \gcmd{gls\-topic\-Title} + { + \providedby{\sty{glossary-topic} v1.40+} + \syntax{\margm{entry-label}} + \desc{used to format the name and (if provided) symbol for the top-level entry title} + } + % \glstopicDesc + \gcmd{gls\-topic\-Desc} + { + \providedby{\sty{glossary-topic} v1.40+} + \syntax{\margm{entry-label}} + \desc{used to format the top-level description} + } + % \glstopicLoc + \gcmd{gls\-topic\-Loc} + { + \providedby{\sty{glossary-topic} v1.40+} + \syntax{\margm{entry-label}\margm{location list}} + \desc{used to format the top-level \idx{locationlist}} + } + % \glstopicParIndent + \gcmd{gls\-topic\-Par\-Indent} + { + \providedby{\sty{glossary-topic} v1.40+} + \desc{length register used for the top-level paragraph indent} + } + % \glstopicSubIndent + \gcmd{gls\-topic\-Sub\-Indent} + { + \providedby{\sty{glossary-topic} v1.40+} + \desc{length register used for the child indent} + } + % \glstopicSubItemParIndent + \gcmd{gls\-topic\-Sub\-Item\-Par\-Indent} + { + \providedby{\sty{glossary-topic} v1.46+} + \desc{length register used for the child paragraph indent} + } + % \glstopicInit + \gcmd{gls\-topic\-Init} + { + \providedby{\sty{glossary-topic} v1.40+} + \desc{initialisation hook} + } + % \glstopicAssignSubIndent + \gcmd{gls\-topic\-Assign\-Sub\-Indent} + { + \providedby{\sty{glossary-topic} v1.40+} + \syntax{\margm{level}} + \desc{used to set the indentation for sub-levels} + } + % \glstopicAssignWidest + \gcmd{gls\-topic\-Assign\-Widest} + { + \providedby{\sty{glossary-topic} v1.40+} + \syntax{\margm{level}} + \desc{used by \gls{glstopicAssignSubIndent} to calculate the + width of the widest name for the given level} + } + % \glstopicCols + \gcmd{gls\-topic\-Cols} + { + \providedby{\sty{glossary-topic} v1.40+} + \desc{expands to the number of columns for \glostyle{topicmcols}} + } + % \glstopicColsEnv + \gcmd{gls\-topic\-Cols\-Env} + { + \providedby{\sty{glossary-topic} v1.40+} + \desc{expands to the \env{multicols} environment name to use + for \glostyle{topicmcols}} + } + % COMMANDS: table + % \printunsrttable + \gcmd{print\-unsrt\-table} + { + \providedby{\sty{glossary-table} v1.49+} + \syntax{\oargm{options}} + \desc{internally uses \gls{printunsrtglossary} with the + \glostyle{table} style} + } + % \glstablenameheader + \gcmd{gls\-table\-name\-header} + { + \providedby{\sty{glossary-table} v1.49+} + \desc{header for the name column} + } + % \glstabledescheader + \gcmd{gls\-table\-desc\-header} + { + \providedby{\sty{glossary-table} v1.49+} + \desc{header for the description column} + } + % \glstablesymbolheader + \gcmd{gls\-table\-symbol\-header} + { + \providedby{\sty{glossary-table} v1.49+} + \desc{header for the symbol column} + } + % \glstableotherheader + \gcmd{gls\-table\-other\-header} + { + \providedby{\sty{glossary-table} v1.49+} + \desc{header for the other column} + } + \gprintunsrttableopt{blocks}% + {% + \syntax{\meta{n}} + \initval{2} + \desc{number of blocks per row} + } + \gprintunsrttableopt{header}% + {% + \syntax{\meta{boolean}} + \initval{true} + \defval{true} + \desc{include header row} + } + \gprintunsrttableopt{rules}% + {% + \syntax{\meta{boolean}} + \initval{true} + \defval{true} + \desc{include horizontal rules} + } + \gprintunsrttableopt{blocksep}% + {% + \syntax{\meta{alignment spec}} + \initval{|} + \desc{between block table alignment specifier} + } + \gprintunsrttableopt{par}% + {% + \syntax{\meta{value}} + \initval{false} + \desc{indicates whether or not to use a paragraph column +specifier} + } + \gprintunsrttableopt{block-style}% + {% + \syntax{\meta{value}} + \initval{name-desc} + \desc{indicates the block style} + } + \gprintunsrttableopt{other}% + {% + \syntax{\meta{field-label}} + \initvalempty + \desc{indicates the other field to use} + } + \gprintunsrttableopt{init}% + {% + \syntax{\margm{code}} + \initvalempty + \desc{initialisation code} + } + \gtableblockstyle{name\dhyphen desc}{}% name-desc + \gtableblockstyle{name}{} + \gtableblockstyle{name\dhyphen symbol}{}% name-symbol + \gtableblockstyle{desc\dhyphen name}{}% desc-name + \gtableblockstyle{symbol\dhyphen name}{}% symbol-name + \gtableblockstyle{name\dhyphen symbol\dhyphen desc}{}% name-symbol-desc + \gtableblockstyle{name\dhyphen desc\dhyphen symbol}{}% name-desc-symbol + \gtableblockstyle{name\dhyphen other}{}% name-other + \gtableblockstyle{symbol\dhyphen other}{}% symbol-other + \gtableblockstyle{other\dhyphen name}{}% other-name + \gtableblockstyle{other\dhyphen symbol}{}% other-symbol + % \glstableiffilter + \gcmd{gls\-table\-if\-filter} + { + \providedby{\sty{glossary-table} v1.49+} + \syntax{\margm{entry-label}\margm{true}\margm{false}} + \desc{internally used by the custom handler in \gls{printunsrttable} + to perform additional filtering} + } + % COMMANDS: long + % \glsdescwidth + \gcmd{gls\-desc\-width} + { + \providedby{\sty{glossary-long} \& \sty{glossary-super}} + \desc{a length register used to set the width of the description + column for \env{tabular}-like styles} + } + % \glspagelistwidth + \gcmd{gls\-page\-list\-width} + { + \providedby{\sty{glossary-long} \& \sty{glossary-super}} + \desc{a length register used to set the width of the + \idx{locationlist} column for \env{tabular}-like styles} + } + % COMMANDS: tree + % \glstreepredesc + \gcmd{gls\-tree\-pre\-desc} + { + \providedby{\sty{glossary-tree} v4.26+} + \desc{space inserted before top-level descriptions} + } + % \glstreechildpredesc + \gcmd{gls\-tree\-child\-pre\-desc} + { + \providedby{\sty{glossary-tree} v4.26+} + \desc{space inserted before child descriptions} + } + % \glstreenamefmt + \gcmd{gls\-tree\-name\-fmt} + { + \providedby{\sty{glossary-tree} v4.08+} + \syntax{\margm{text}} + \desc{used to format the name for the \glostyle{tree} and + \glostyle{index} styles} + } + % \glstreegroupheaderfmt + \gcmd{gls\-tree\-group\-header\-fmt} + { + \providedby{\sty{glossary-tree} v4.22+} + \syntax{\margm{text}} + \desc{used to format the \idx{group} title for the \glostyle{treegroup} and + \glostyle{indexgroup} styles} + } + % \glstreenavigationfmt + \gcmd{gls\-tree\-navigation\-fmt} + { + \providedby{\sty{glossary-tree} v4.22+} + \syntax{\margm{text}} + \desc{used to format the navigation element for styles like \glostyle{treehypergroup}} + } + % \glstreeitem + \gcmd{gls\-tree\-item} + { + \providedby{\sty{glossary-tree} v4.26+} + \desc{used to indent the top-level entries for the \glostyle{index} styles} + } + % \glstreesubitem + \gcmd{gls\-tree\-sub\-item} + { + \providedby{\sty{glossary-tree} v4.26+} + \desc{used to indent the level~1 entries for the \glostyle{index} styles} + } + % \glstreesubsubitem + \gcmd{gls\-tree\-sub\-sub\-item} + { + \providedby{\sty{glossary-tree} v4.26+} + \desc{used to indent the level~2 entries for the \glostyle{index} styles} + } + % COMMANDS: list style + % \glslistdottedwidth + \gcmd{glslistdottedwidth} + { + \providedby{\sty{glossary-list}} + \desc{a length register used by \glostyle{listdotted}} + } + % \glslistinit + \gcmd{gls\-list\-init} + {% + \providedby{\sty{glossary-list} v4.48+} + \desc{used to disable problematic commands at the start the + \glostyle{list} styles to provide better integration with + \sty{gettitlestring}} + } + % \glslistexpandedname + \gcmd{gls\-list\-expanded\-name} + {% + \providedby{\sty{glossary-list} v4.48+} + \syntax{\margm{entry-label}} + \desc{used by \gls{glslistinit} to provide better integration with + \sty{gettitlestring}} + } + % COMMANDS: inline style + % \glsinlinedescformat + \gcmd{gls\-in\-line\-desc\-format} + { + \providedby{\sty{glossary-inline} v3.03+} + \syntax{\margm{description}\margm{symbol}\margm{location list}} + \desc{formats the description, symbol and \idx{locationlist} for + top-level entries} + } + % \glsinlinesubdescformat + \gcmd{gls\-in\-line\-sub\-desc\-format} + { + \providedby{\sty{glossary-inline} v3.03+} + \syntax{\margm{description}\margm{symbol}\margm{location list}} + \desc{formats the description, symbol and \idx{locationlist} for + child entries} + } + % \glspostinline + \gcmd{gls\-post\-in\-line} + {% + \providedby{\sty{glossary-inline} v3.03+} + \desc{used at the end of the \env{theglossary} environment} + } + % \glspostinlinedescformat + \gcmd{gls\-post\-in\-line\-desc\-format} + {% + \providedby{\sty{glossary-inline} v3.03+} + \syntax{\margm{description}\margm{symbol}\margm{location list}} + \desc{formats the top-level entry's description, symbol and \idx{locationlist}} + } + % \glspostinlinesubdescformat + \gcmd{gls\-post\-in\-line\-sub\-desc\-format} + {% + \providedby{\sty{glossary-inline} v3.03+} + \syntax{\margm{description}\margm{symbol}\margm{location list}} + \desc{formats the child entry's description, symbol and \idx{locationlist}} + } + % COMMANDS: STYLE MODIFICATIONS + % \glsxtrprelocation + \gcmd{gls\-xtr\-pre\-location} + {% + \providedby{\sty{glossaries-extra-stylemods} v1.21+} + \initvalcs{space} + \desc{used before the \idx{locationlist} in the predefined + styles provided by \sty{glossaries-extra} or modified by + \sty{glossaries-extra-stylemods}} + } + % \glslistprelocation + \gcmd{gls\-list\-pre\-location} + {% + \providedby{\sty{glossaries-extra-stylemods} v1.21+} + \initvalcs{glsxtrprelocation} + \desc{used before the top-level entry \idx{locationlist} + for the \glostyle{list} styles} + } + % \glslistchildprelocation + \gcmd{gls\-list\-child\-pre\-location} + {% + \providedby{\sty{glossaries-extra-stylemods} v1.21+} + \initvalcs{glslistprelocation} + \desc{used before the child entry \idx{locationlist} + for the \glostyle{list} styles} + } + % \glslistchildpostlocation + \gcmd{gls\-list\-child\-post\-location} + {% + \providedby{\sty{glossaries-extra-stylemods} v1.21+} + \initval{.} + \desc{used after the child entry \idx{locationlist} + for the \glostyle{list} styles} + } + % \glslistdesc + \gcmd{gls\-list\-desc} + {% + \providedby{\sty{glossaries-extra-stylemods} v1.31+} + \syntax{\margm{entry-label}} + \desc{used to display the description for the \glostyle{list} styles} + } + % \glslistgroupskip + \gcmd{gls\-list\-group\-skip} + {% + \providedby{\sty{glossaries-extra-stylemods} v1.31+} + \desc{used for the group skip in the \glostyle{list} styles} + } + % \glslistitem + \gcmd{gls\-list\-item} + {% + \providedby{\sty{glossaries-extra-stylemods} v1.47+} + \syntax{\margm{entry-label}} + \desc{used to display the top-level entry item in the \glostyle{list} styles} + } + % \glsaltlistitem + \gcmd{gls\-alt\-list\-item} + {% + \providedby{\sty{glossaries-extra-stylemods} v1.47+} + \syntax{\margm{entry-label}} + \desc{used to display the top-level entry item in the \glostyle{altlist} styles} + } + % \glslistgroupheaderitem + \gcmd{gls\-list\-group\-header\-item} + {% + \providedby{\sty{glossaries-extra-stylemods} v1.47+} + \syntax{\margm{group-label}\margm{header code}} + \desc{used to display the \idx{group} headings in the \glostyle{listgroup} styles} + } + % \glslistgroupafterheader + \gcmd{gls\-list\-group\-after\-header} + {% + \providedby{\sty{glossaries-extra-stylemods} v1.47+} + \desc{used after \idx{group} headings in the \glostyle{listgroup} styles} + } + % \glstreedefaultnamefmt + \gcmd{gls\-tree\-default\-name\-fmt} + {% + \providedby{\sty{glossaries-extra-stylemods} v1.31+} + \syntax{\margm{text}} + \desc{used as the default name format for the \glostyle{tree} + and \glostyle{index} styles} + } + % \glstreePreHeader + \gcmd{gls\-tree\-Pre\-Header} + {% + \providedby{\sty{glossaries-extra-stylemods} v1.41+} + \syntax{\margm{group-label}\margm{group-title}} + \desc{pre \idx{group} header hook the \glostyle{treegroup} + and \glostyle{indexgroup} styles} + } + % \glstreeSubPreHeader + \gcmd{gls\-tree\-Sub\-Pre\-Header} + {% + \providedby{\sty{glossaries-extra-stylemods} v1.49+} + \syntax{\margm{previous group level}\margm{level}\margm{parent label}\margm{group label}\margm{group title}} + \desc{pre sub-\idx{group} header hook the \glostyle{treegroup} + and \glostyle{indexgroup} styles} + } + % \glstreeprelocation + \gcmd{gls\-tree\-pre\-location} + {% + \providedby{\sty{glossaries-extra-stylemods} v1.21+} + \initvalcs{glsxtrprelocation} + \desc{used before the top-level entry \idx{locationlist} + for the \glostyle{tree} and \glostyle{index} styles} + } + % \glstreechildprelocation + \gcmd{gls\-tree\-child\-pre\-location} + {% + \providedby{\sty{glossaries-extra-stylemods} v1.21+} + \initvalcs{glstreeprelocation} + \desc{used before the child entry \idx{locationlist} + for the \glostyle{tree} and \glostyle{index} styles} + } + % \glstreegroupskip + \gcmd{gls\-tree\-group\-skip} + {% + \providedby{\sty{glossaries-extra-stylemods} v1.41+} + \desc{group skip for the \glostyle{tree} and \glostyle{index} styles} + } + % \glstreegroupheaderskip + \gcmd{gls\-tree\-group\-header\-skip} + {% + \providedby{\sty{glossaries-extra-stylemods} v1.42+} + \desc{after group header skip for the \glostyle{treegroup} and + \glostyle{indexgroup} styles} + } + % \glsindexsubgroupitem + \gcmd{gls\-index\-sub\-group\-item} + {% + \providedby{\sty{glossaries-extra-stylemods} v1.49+} + \syntax{\margm{previous group level}\margm{level}\margm{parent +label}\margm{group label}\margm{group title}} + \desc{used to format sub-\idx{group} headers for the + \glostyle{indexgroup} styles} + } + % \glsxtrtreepredesc + \gcmd{gls\-xtr\-tree\-pre\-desc} + {% + \providedby{\sty{glossaries-extra-stylemods} v1.46+} + \initvalcs{glstreepredesc} + \desc{inserted before the top-level descriptions for the \glostyle{tree} styles} + } + % \glsxtrtreechildpredesc + \gcmd{gls\-xtr\-tree\-child\-pre\-desc} + {% + \providedby{\sty{glossaries-extra-stylemods} v1.46+} + \initvalcs{glstreechildpredesc} + \desc{inserted before the child descriptions for the \glostyle{tree} styles} + } + % \glstreedesc + \gcmd{gls\-tree\-desc} + {% + \providedby{\sty{glossaries-extra-stylemods} v1.31+} + \syntax{\margm{entry-label}} + \desc{displays the given top-level entry's description with pre and post hooks for the \glostyle{tree} styles} + } + % \glstreechilddesc + \gcmd{gls\-tree\-child\-desc} + {% + \providedby{\sty{glossaries-extra-stylemods} v1.31+} + \syntax{\margm{entry-label}} + \desc{displays the given child entry's description with pre and post hooks for the \glostyle{tree} styles} + } + % \glstreeDescLoc + \gcmd{gls\-tree\-Desc\-Loc} + {% + \providedby{\sty{glossaries-extra-stylemods} v1.41+} + \syntax{\margm{entry-label}\margm{location list}} + \desc{formats the top-level description (if set) and \idx{locationlist} for the \glostyle{tree} styles} + } + % \glstreeChildDescLoc + \gcmd{gls\-tree\-Child\-Desc\-Loc} + {% + \providedby{\sty{glossaries-extra-stylemods} v1.41+} + \syntax{\margm{entry-label}\margm{location list}} + \desc{formats the child description (if set) and \idx{locationlist} for the \glostyle{tree} styles} + } + % \glstreeNoDescSymbolPreLocation + \gcmd{gls\-tree\-No\-Desc\-Symbol\-Pre\-Location} + {% + \providedby{\sty{glossaries-extra-stylemods} v1.42+} + \desc{inserted before the \idx{locationlist} when there's no + description or symbol for the \glostyle{tree} styles} + } + % \glstreesymbol + \gcmd{gls\-tree\-symbol} + {% + \providedby{\sty{glossaries-extra-stylemods} v1.31+} + \syntax{\margm{entry-label}} + \desc{displays the top-level symbol in parentheses, if set, for the \glostyle{tree} styles} + } + % \glstreechildsymbol + \gcmd{gls\-tree\-child\-symbol} + {% + \providedby{\sty{glossaries-extra-stylemods} v1.31+} + \syntax{\margm{entry-label}} + \desc{displays the top-level symbol in parentheses, if set, for the \glostyle{tree} styles} + } + % \glstreesubgroupitem + \gcmd{gls\-tree\-sub\-group\-item} + {% + \providedby{\sty{glossaries-extra-stylemods} v1.49+} + \syntax{\marg{previous group level}\marg{level}\marg{parent label}\marg{group label}\marg{group title}} + \desc{used to display the sub-group header in the \glostyle{treegroup} styles} + } + % \glstreenonamedesc + \gcmd{gls\-tree\-no\-name\-desc} + {% + \providedby{\sty{glossaries-extra-stylemods} v1.31+} + \syntax{\margm{entry-label}} + \desc{displays the given top-level entry's description with pre + and post hooks for the \glostyle{treenoname} styles} + } + % \glstreenonamesymbol + \gcmd{gls\-tree\-no\-name\-symbol} + {% + \providedby{\sty{glossaries-extra-stylemods} v1.31+} + \syntax{\margm{entry-label}} + \desc{displays the given top-level entry's symbol in parentheses for + the \glostyle{treenoname} styles} + } + % \glstreenonameDescLoc + \gcmd{gls\-tree\-no\-name\-Desc\-Loc} + {% + \providedby{\sty{glossaries-extra-stylemods} v1.45+} + \syntax{\margm{entry-label}} + \desc{displays the given top-level entry's description and + \idx{locationlist} for the \glostyle{treenoname} styles} + } + % \glstreenonamechilddesc + \gcmd{gls\-tree\-no\-name\-child\-desc} + {% + \providedby{\sty{glossaries-extra-stylemods} v1.31+} + \syntax{\margm{entry-label}} + \desc{displays the given child entry's description and + post hook for the \glostyle{treenoname} styles} + } + % \glstreenonameChildDescLoc + \gcmd{gls\-tree\-no\-name\-Child\-Desc\-Loc} + {% + \providedby{\sty{glossaries-extra-stylemods} v1.45+} + \syntax{\margm{entry-label}} + \desc{displays the given child entry's description and + \idx{locationlist} for the \glostyle{treenoname} styles} + } + % \glsalttreepredesc + \gcmd{gls\-alt\-tree\-pre\-desc} + {% + \providedby{\sty{glossaries-extra-stylemods} v1.46+} + \desc{inserted before the top-level descriptions for the \glostyle{alttree} styles} + } + % \glsalttreechildpredesc + \gcmd{gls\-alt\-tree\-child\-pre\-desc} + {% + \providedby{\sty{glossaries-extra-stylemods} v1.46+} + \desc{inserted before the child descriptions for the \glostyle{alttree} styles} + } + % \glssetwidest + \gcmd{gls\-set\-widest} + { + \providedby{\sty{glossary-tree}} + \syntax{\oargm{level}\margm{name}} + \desc{indicates that \meta{name} is the widest name for the + given \idx{hierarchicallevel}} + } + % \gglssetwidest + \gcmd{ggls\-set\-widest} + { + \providedby{\sty{glossaries-extra-stylemods} v1.21+} + \syntax{\oargm{level}\margm{name}} + \desc{as \gls{glssetwidest} but global} + } + % \eglssetwidest + \gcmd{egls\-set\-widest} + { + \providedby{\sty{glossaries-extra-stylemods} v1.05+} + \syntax{\oargm{level}\margm{name}} + \desc{as \gls{glssetwidest} but expands \meta{text}} + } + % \xglssetwidest + \gcmd{xgls\-set\-widest} + { + \providedby{\sty{glossaries-extra-stylemods} v1.05+} + \syntax{\oargm{level}\margm{name}} + \desc{as \gls{eglssetwidest} but global} + } + % \glsupdatewidest + \gcmd{gls\-update\-widest} + { + \providedby{\sty{glossaries-extra-stylemods} v1.23+} + \syntax{\oargm{level}\margm{name}} + \desc{similar to \gls{glssetwidest} but only if \meta{name} is + wider than the current widest value for the given + \idx{hierarchicallevel}} + } + % \gglsupdatewidest + \gcmd{ggls\-update\-widest} + { + \providedby{\sty{glossaries-extra-stylemods} v1.23+} + \syntax{\oargm{level}\margm{name}} + \desc{as \gls{glsupdatewidest} but global} + } + % \eglsupdatewidest + \gcmd{egls\-update\-widest} + { + \providedby{\sty{glossaries-extra-stylemods} v1.23+} + \syntax{\oargm{level}\margm{name}} + \desc{as \gls{glsupdatewidest} but expands \meta{name}} + } + % \xglsupdatewidest + \gcmd{xgls\-update\-widest} + { + \providedby{\sty{glossaries-extra-stylemods} v1.23+} + \syntax{\oargm{level}\margm{name}} + \desc{as \gls{eglsupdatewidest} but global} + } + % \glsgetwidestname + \gcmd{gls\-get\-widest\-name} + { + \providedby{\sty{glossaries-extra-stylemods} v1.05+} + \desc{expands to the widest top-level name} + } + % \glsgetwidestsubname + \gcmd{gls\-get\-widest\-sub\-name} + { + \providedby{\sty{glossaries-extra-stylemods} v1.05+} + \syntax{\margm{level}} + \desc{expands to the widest name for the given + \idx{hierarchicallevel} or to the widest top-level name, if no + widest name set for \meta{level}} + } + % \glsfindwidesttoplevelname + \gcmd{gls\-find\-widest\-top\-level\-name} + { + \providedby{\sty{glossary-tree} v4.22+} + \syntax{\oargm{glossary labels}} + \desc{finds and sets the widest name for all top-level entries + in the given \idxpl{glossary}. If the optional argument is + omitted, the list of all non-\idxpl{ignoredglossary} is assumed} + } + % \glsFindWidestTopLevelName + \gcmd{gls\-Find\-Widest\-Top\-Level\-Name} + { + \providedby{\sty{glossaries-extra-stylemods}}% v1.0+ + \desc{a synonym for \gls{glsfindwidesttoplevelname}} + } + % \glsFindWidestUsedTopLevelName + \gcmd{gls\-Find\-Widest\-Used\-Top\-Level\-Name} + { + \providedby{\sty{glossaries-extra-stylemods} v1.05+} + \syntax{\oargm{glossary labels}} + \desc{finds and sets the widest name for all top-level entries + that have been marked as \idxc{firstuseflag}{used} in the given \idxpl{glossary}} + } + % \glsFindWidestUsedAnyName + \gcmd{gls\-Find\-Widest\-Used\-Any\-Name} + { + \providedby{\sty{glossaries-extra-stylemods} v1.05+} + \syntax{\oargm{glossary labels}} + \desc{finds and sets the widest name for all entries + that have been marked as \idxc{firstuseflag}{used} in the given \idxpl{glossary}} + } + % \glsFindWidestAnyName + \gcmd{gls\-Find\-Widest\-Any\-Name} + { + \providedby{\sty{glossaries-extra-stylemods} v1.05+} + \syntax{\oargm{glossary labels}} + \desc{finds and sets the widest name for all entries + in the given \idxpl{glossary}} + } + % \glsFindWidestUsedLevelTwo + \gcmd{gls\-Find\-Widest\-Used\-Level\-Two} + { + \providedby{\sty{glossaries-extra-stylemods} v1.05+} + \syntax{\oargm{glossary labels}} + \desc{finds and sets the widest name for all entries + that have been marked as \idxc{firstuseflag}{used} with + \idx{hierarchicallevel} less than or equal to 2 in the given \idxpl{glossary}} + } + % \glsFindWidestLevelTwo + \gcmd{gls\-Find\-Widest\-Level\-Two} + { + \providedby{\sty{glossaries-extra-stylemods} v1.05+} + \syntax{\oargm{glossary labels}} + \desc{finds and sets the widest name for all entries with + \idx{hierarchicallevel} less than or equal to 2 in the given \idxpl{glossary}} + } + % \glsFindWidestUsedAnyNameSymbol + \gcmd{gls\-Find\-Widest\-Used\-Any\-Name\-Symbol} + { + \providedby{\sty{glossaries-extra-stylemods} v1.05+} + \syntax{\oargm{glossary labels}\margm{register}} + \desc{like \gls{glsFindWidestUsedAnyName} but also also measures the + symbol. The length of the widest symbol is stored in + \meta{register} which should be a length register} + } + % \glsFindWidestAnyNameSymbol + \gcmd{gls\-Find\-Widest\-Any\-Name\-Symbol} + { + \providedby{\sty{glossaries-extra-stylemods} v1.05+} + \syntax{\oargm{glossary labels}\margm{register}} + \desc{like \gls{glsFindWidestAnyName} but also also measures the + symbol. The length of the widest symbol is stored in + \meta{register} which should be a length register} + } + % \glsFindWidestUsedAnyNameSymbolLocation + \gcmd{gls\-Find\-Widest\-Used\-Any\-Name\-Symbol\-Location} + { + \providedby{\sty{glossaries-extra-stylemods} v1.05+} + \syntax{\oargm{glossary labels}\margm{register1}\margm{register2}} + \desc{like \gls{glsFindWidestUsedAnyNameSymbol} but also also measures the + \idx{locationlist}. The length of the widest symbol is stored in + \meta{register1} and the length of the widest location is + stored in \meta{register2}, which should both be length registers} + } + % \glsFindWidestAnyNameSymbolLocation + \gcmd{gls\-Find\-Widest\-Any\-Name\-Symbol\-Location} + { + \providedby{\sty{glossaries-extra-stylemods} v1.05+} + \syntax{\oargm{glossary labels}\margm{register1}\margm{register2}} + \desc{like \gls{glsFindWidestAnyNameSymbol} but also also measures the + \idx{locationlist}. The length of the widest symbol is stored in + \meta{register1} and the length of the widest location is + stored in \meta{register2}, which should both be length registers} + } + % \glsFindWidestUsedAnyNameLocation + \gcmd{gls\-Find\-Widest\-Used\-Any\-Name\-Location} + { + \providedby{\sty{glossaries-extra-stylemods} v1.05+} + \syntax{\oargm{glossary labels}\margm{register}} + \desc{like \gls{glsFindWidestUsedAnyName} but also also measures the + \idx{locationlist}. The length of the widest location is + stored in \meta{register}, which should be a length register} + } + % \glsFindWidestAnyNameLocation + \gcmd{gls\-Find\-Widest\-Any\-Name\-Location} + { + \providedby{\sty{glossaries-extra-stylemods} v1.05+} + \syntax{\oargm{glossary labels}\margm{register}} + \desc{like \gls{glsFindWidestAnyName} but also also measures the + \idx{locationlist}. The length of the widest location is + stored in \meta{register}, which should be a length register} + } + % \glsxtralttreeSymbolDescLocation + \gcmd{gls\-xtr\-alt\-tree\-Symbol\-Desc\-Location} + { + \providedby{\sty{glossaries-extra-stylemods} v1.05+} + \syntax{\margm{entry-label}\margm{location list}} + \desc{formats the symbol, description and location for top-level entries + for the \glostyle{alttree}-like styles} + } + % \glsxtralttreeSubSymbolDescLocation + \gcmd{gls\-xtr\-alt\-tree\-Sub\-Symbol\-Desc\-Location} + { + \providedby{\sty{glossaries-extra-stylemods} v1.05+} + \syntax{\margm{entry-label}\margm{location list}} + \desc{formats the symbol, description and location for child entries + for the \glostyle{alttree}-like styles} + } + % \glsxtralttreeInit + \gcmd{gls\-xtr\-alt\-tree\-Init} + { + \providedby{\sty{glossaries-extra-stylemods} v1.05+} + \desc{initialisation code performed by the \glostyle{alttree}-like styles} + } + % \glsxtrAltTreeIndent + \gcmd{gls\-xtr\-Alt\-Tree\-Indent} + { + \providedby{\sty{glossaries-extra-stylemods} v1.05+} + \desc{length register for the subsequent paragraph indentation for + the \glostyle{alttree}-like styles} + } + % COMMANDS: DISPLAYING GLOSSARIES + % \glossarysection + \gcmd{glossary\-section} + { + \providedby{\sty{glossaries}} + \syntax{\oargm{toc-title}\margm{title}} + \desc{occurs at the start of a \idx{glossary} (except with + \gls{printunsrtinnerglossary}). This will typically be defined + to use a sectioning command, such as \gls{section} or + \gls{chapter}. The default definition follows the \opt{section} + and \opt{numberedsection} options} + } + % \glossarytitle + \gcmd{glossary\-title} + { + \providedby{\sty{glossaries}} + \desc{initialised by the \csfmt{print\ldots glossary} set of + commands (such as \gls{printglossary}) to the current + \idx{glossary}['s] title} + } + % \glossarytoctitle + \gcmd{glossary\-toc\-title} + { + \providedby{\sty{glossaries}} + \desc{initialised by the \csfmt{print\ldots glossary} set of + commands (such as \gls{printglossary}) to the current + \idx{glossary}['s] table of contents title} + } + % \glossaryheader + \gcmd{glossary\-header} + { + \providedby{\sty{glossaries}} + \desc{inserted after \code{\cbeg{\env{theglossary}}}. This + command should be redefined by the \idx{glossarystyle}} + } + % \glossentry + \gcmd{gloss\-entry} + { + \providedby{\sty{glossaries} v3.08+} + \syntax{\margm{entry label}\margm{location list}} + \desc{used to format a top-level entry. This + command should be redefined by the \idx{glossarystyle}} + } + % \subglossentry + \gcmd{sub\-gloss\-entry} + { + \providedby{\sty{glossaries} v3.08+} + \syntax{\margm{level}\margm{entry label}\margm{location list}} + \desc{used to format a child entry. This + command should be redefined by the \idx{glossarystyle}} + } + % \glsresetentrylist + \gcmd{gls\-reset\-entry\-list} + { + \providedby{\sty{glossaries}} + \desc{inserted into the \idx{glossary} code to counteract the + effect of \gls{glsnonextpages}} + } + % \glsnonextpages + \gcmd{gls\-no\-next\-pages} + { + \providedby{\sty{glossaries} v1.17+} + \desc{designed for use with \app{makeindex} and \app{xindy}, + this may be placed in an entry's description to suppress the + entry's \idx{locationlist}} + } + % \glsnextpages + \gcmd{gls\-next\-pages} + { + \providedby{\sty{glossaries} v3.0+} + \desc{designed for use with \app{makeindex} and \app{xindy}, + this may be placed in an entry's description to override + \opt{nonumberlist}} + } + % \glsgroupskip + \gcmd{gls\-group\-skip} + { + \providedby{\sty{glossaries}} + \desc{inserted before each \idx{group} heading (except the + first) in a \idx{glossary} (unless \printglossoptval{groups}{false}). + This command is defined by \idxpl{glossarystyle} as appropriate. + Most of the predefined styles define this command to check the + \opt{nogroupskip} option} + } + % \glsgroupheading + \gcmd{gls\-group\-head\-ing}% + {% + \providedby{\sty{glossaries}} + \syntax{\margm{group-label}} + \desc{inserted at the start of each \idx{group} in a \idx{glossary} + (unless \printglossoptval{groups}{false}) to display the + \idx{group}['s] heading, if applicable, using the title + associated with \meta{group-label} or, if no title provided, + just \meta{group-label}. + This command is defined by \idxpl{glossarystyle} as appropriate} + } + % \glssubgroupheading + \gcmd{gls\-sub\-group\-head\-ing}% + {% + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{previous level}\margm{level}\margm{parent-label}\margm{group-label}} + \desc{used to format sub-\idx{group} headings. Only applicable + with the \idx{unsrtfam}. This command won't occur in + \idxpl{glossary} that use \gls{printglossary} or + \gls{printnoidxglossary}} + } + % \glossarypostamble + \gcmd{glossary\-postamble}% + {% + \providedby{\sty{glossaries}} + \desc{used at the end of the \idx{glossary}} + } + % \glossarypreamble + \gcmd{glossary\-preamble}% + {% + \providedby{\sty{glossaries}} + \desc{used at the start of the \idx{glossary}. This will be + locally redefined to the preamble associated with + the current glossary, if one has been set} + \field{seealso}{setglossarypreamble} + } + % \setglossarypreamble + \gcmd{set\-glossary\-preamble}% + {% + \providedby{\sty{glossaries} v3.07+} + \syntax{\oargm{type}\margm{text}} + \desc{globally sets the preamble for the glossary identified by + \meta{type} to \meta{text}. If \meta{type} is omitted, + \gls{glsdefaulttype} is assumed} + } + % \apptoglossarypreamble + \gcmd{app\-to\-glossary\-preamble}% + {% + \providedby{\sty{glossaries-extra} v1.12+} + \syntax{\oargm{type}\margm{text}} + \desc{appends (locally) \meta{text} to the preamble for the glossary identified by + \meta{type}. If \meta{type} is omitted, + \gls{glsdefaulttype} is assumed} + } + % \pretoglossarypreamble + \gcmd{pre\-to\-glossary\-preamble}% + {% + \providedby{\sty{glossaries-extra} v1.12+} + \syntax{\oargm{type}\margm{text}} + \desc{prepends (locally) \meta{text} to the preamble for the glossary identified by + \meta{type}. If \meta{type} is omitted, + \gls{glsdefaulttype} is assumed} + } + % \printglossaries + \gcmd{print\-glossaries}% + {% + \providedby{\sty{glossaries}} + \desc{iterates over all non-\idxpl{ignoredglossary} and does + \code{\gls{printglossary}\oarg{\printglossoptval{type}{\meta{type}}}} + for each \idx{glossary}} + } + % \printnoidxglossaries + \gcmd{print\-noidx\-glossaries}% + {% + \providedby{\sty{glossaries} v4.04+} + \desc{iterates over all non-\idxpl{ignoredglossary} and does + \code{\gls{printnoidxglossary}\oarg{\printglossoptval{type}{\meta{type}}}} + for each \idx{glossary}} + } + % \printunsrtglossaries + \gcmd{print\-unsrt\-glossaries}% + {% + \providedby{\sty{glossaries-extra} v1.08+} + \desc{iterates over all non-\idxpl{ignoredglossary} and does + \code{\gls{printunsrtglossary}\oarg{\printglossoptval{type}{\meta{type}}}} + for each \idx{glossary}} + } + % \printglossary + \gcmd{print\-glossary}% + {% + \providedby{\sty{glossaries}} + \syntax{\oargm{options}} + \desc{displays the \idx{glossary} by inputting a file created by + \app+{makeindex} or \app+{xindy}. Must be used with + \gls{makeglossaries} and either \app{makeindex} or \app{xindy}} + }% + % \printacronyms + \gcmd{print\-acronyms}% + {% + \providedby{\sty{glossaries}} + \syntax{\oargm{options}} + \note{requires the \opt{acronyms} package option} + \desc{shortcut for + \code{\gls{printglossary}\oarg{\printglossoptval{type}{\gls{acronymtype}}}}} + }% + % \printunsrtacronyms + \gcmd{print\-unsrt\-acronyms}% + {% + \providedby{\sty{glossaries-extra-bib2gls} v1.40+} + \syntax{\oargm{options}} + \note{requires \code{\csfmt{usepackage}\oarg{\opt{acronyms},\opt{record}}\marg{glossaries-extra}}} + \desc{shortcut for + \code{\gls{printunsrtglossary}\oarg{\printglossoptval{type}{\gls{acronymtype}}}}} + }% + % \printabbreviations + \gcmd{print\-ab\-bre\-vi\-a\-tions}% + {% + %\providedby{\sty{glossaries-extra} v1.0+} + \syntax{\oargm{options}} + \note{requires \code{\csfmt{usepackage}\oarg{\opt{abbreviations}}\marg{glossaries-extra}}} + \desc{shortcut for + \code{\gls{printglossary}\oarg{\printglossoptval{type}{\gls{glsxtrabbrvtype}}}}} + }% + % \printunsrtabbreviations + \gcmd{print\-unsrt\-ab\-bre\-vi\-a\-tions}% + {% + \providedby{\sty{glossaries-extra-bib2gls} v1.40+} + \syntax{\oargm{options}} + \note{requires \code{\csfmt{usepackage}\oarg{\opt{abbreviations},\opt{record}}\marg{glossaries-extra}}} + \desc{shortcut for + \code{\gls{printunsrtglossary}\oarg{\printglossoptval{type}{\gls{glsxtrabbrvtype}}}}} + }% + % \printsymbols + \gcmd{print\-symbols}% + {% + \providedby{\sty{glossaries} v4.02+} + \syntax{\oargm{options}} + \note{requires the \opt{symbols} package option} + \desc{shortcut for + \code{\gls{printglossary}\oarg{\printglossoptval{type}{symbols}}}} + }% + % \printunsrtsymbols + \gcmd{print\-unsrt\-symbols}% + {% + \providedby{\sty{glossaries-extra-bib2gls} v1.40+} + \syntax{\oargm{options}} + \note{requires \code{\csfmt{usepackage}\oarg{\opt{symbols},\opt{record}}\marg{glossaries-extra}}} + \desc{shortcut for + \code{\gls{printunsrtglossary}\oarg{\printglossoptval{type}{symbols}}}} + }% + % \printnumbers + \gcmd{print\-numbers}% + {% + \providedby{\sty{glossaries} v4.02+} + \syntax{\oargm{options}} + \note{requires the \opt{numbers} package option} + \desc{shortcut for + \code{\gls{printglossary}\oarg{\printglossoptval{type}{numbers}}}} + }% + % \printunsrtnumbers + \gcmd{print\-unsrt\-numbers}% + {% + \providedby{\sty{glossaries-extra-bib2gls} v1.40+} + \syntax{\oargm{options}} + \note{requires \code{\csfmt{usepackage}\oarg{\opt{numbers},\opt{record}}\marg{glossaries-extra}}} + \desc{shortcut provided by the \opt{numbers} package option combined + with \sty{glossaries-extra-bib2gls} that simply does + \code{\gls{printunsrtglossary}\oarg{\printglossoptval{type}{numbers}}}} + }% + % \printindex + \gcmd{print\-index}% + {% + \syntax{\oargm{options} v4.02+} + \note{requires the \opt{index} package option} + \desc{shortcut provided by the \opt{index} package option that simply does + \code{\gls{printglossary}\oarg{\printglossoptval{type}{index}}}} + }% + % \printunsrtindex + \gcmd{print\-unsrt\-index}% + {% + \providedby{\sty{glossaries-extra-bib2gls} v1.40+} + \syntax{\oargm{options}} + \note{requires \code{\csfmt{usepackage}\oarg{\opt{index},\opt{record}}\marg{glossaries-extra}}} + \desc{shortcut provided by the \opt{index} package option combined + with \sty{glossaries-extra-bib2gls} that simply does + \code{\gls{printunsrtglossary}\oarg{\printglossoptval{type}{index}}}} + }% + % \printnoidxglossary + \gcmd{print\-noidx\-glossary}% + {% + \providedby{\sty{glossaries} v4.04+} + \syntax{\oargm{options}} + \desc{displays the \idx{glossary} by obtaining the \idx{indexing} information from + the \ext+{aux} file and using \TeX\ to sort and collate. Must be used with + \gls{makenoidxglossaries} or with the \idxpl{glossary} not identified + in the optional argument of \gls{makeglossaries} when using the + hybrid method. This method can be very slow and has limitations} + }% + % \printunsrtglossary + \gcmd{print\-unsrt\-glossary}% + {% + \providedby{\sty{glossaries-extra} v1.08+} + \syntax{\oargm{options}} + \desc{displays the \idx{glossary} by iterating over all entries + associated with the given \idx{glossary} (in the order in which they + were added to the \idx{glossary}). \Idx{group} headers will only be + inserted if the \gloskey{group} key has been defined and has + been set (typically with the \opt{record} option and + \app{bib2gls}). \Idxpl{locationlist} will only be shown if the + \gloskey{location} or \glosfield{loclist} fields have been set + (typically by \app{bib2gls})} + }% + % \printunsrtglossary* + \gcmd{print\-unsrt\-glossary*}% + {% + \providedby{\sty{glossaries-extra} v1.12+} + \syntax{\oargm{options}\margm{init-code}} + \desc{does \code{\marg{\meta{init-code}\gls{printunsrtglossary}\oargm{options}}} + which localises \meta{init-code}} + } + % \printunsrtglossaryunit + \gcmd{print\-unsrt\-glossary\-unit} + { + \providedby{\sty{glossaries-extra} v1.12+} + \syntax{\oargm{options}\margm{counter-name}} + \desc{provided for use with \gls{GlsXtrRecordCounter} to display + a glossary with \gls{printunsrtglossary*} that filters entries that + don't have a match for the current \meta{counter-name} value} + } + % \printunsrtglossaryunitsetup + \gcmd{print\-unsrt\-glossary\-unit\-set\-up} + { + \providedby{\sty{glossaries-extra} v1.12+} + \syntax{\margm{counter-name}} + \desc{sets up the filtering used by \gls{printunsrtglossaryunit}} + } + % \printunsrtglossaryunitpostskip + \gcmd{print\-unsrt\-glossary\-unit\-post\-skip} + { + \providedby{\sty{glossaries-extra} v1.49+} + \desc{the vertical space at the end of the \idx{glossary} appended + by \gls{printunsrtglossaryunit}} + } + % \printunsrtinnerglossary + \gcmd{print\-unsrt\-inner\-glossary}% + {% + \providedby{\sty{glossaries-extra} v1.44+} + \syntax{\oargm{options}\margm{pre-code}\margm{post-code}} + \desc{similar to \gls{printunsrtglossary} but doesn't contain + the code that starts and ends the \idx{glossary} (such as + beginning and ending the \env{theglossary} environment), so + this command needs to be + either placed inside \env{printunsrtglossarywrap} or in the + \gls{printunsrtglossary} entry handler \gls{printunsrtglossaryhandler}} + }% + % \glsxtrnoidxgroups + \gcmd{gls\-xtr\-no\-idx\-groups} + { + \providedby{\sty{glossaries-extra} v1.49+} + \desc{makes the group titling mechanism used with the + \idx{unsrtfam} use the same method as for + \gls{printnoidxglossary} (\idx{ascii} only). This command can't + be used with \gls{makeglossaries} or with \opt{record}} + } + % \printunsrtglossaryentryprocesshook + \gcmd{print\-unsrt\-glossary\-entry\-process\-hook} + { + \providedby{\sty{glossaries-extra} v1.21+} + \syntax{\margm{entry-label}} + \desc{hook used within the \idx{unsrtfam} while the + \idx{glossary} is being constructed} + } + % \printunsrtglossaryskipentry + \gcmd{print\-unsrt\-glossary\-skip\-entry} + { + \providedby{\sty{glossaries-extra} v1.21+} + \desc{may be used within + \gls{printunsrtglossaryentryprocesshook} to skip the current entry} + } + % \glscurrenttoplevelentry + \gcmd{gls\-current\-top\-level\-entry} + { + \providedby{\sty{glossaries-extra} v1.49+} + \desc{may be used within + \gls{printunsrtglossaryentryprocesshook} to reference the most +recent top level entry label (allowing for \printglossopt{flatten} and \printglossopt{leveloffset})} + } + % \glscurrentrootentry + \gcmd{gls\-current\-root\-entry} + { + \providedby{\sty{glossaries-extra} v1.49+} + \desc{may be used within + \gls{printunsrtglossaryentryprocesshook} to reference the most +recent top level entry label (allowing for \printglossopt{flatten} +but not \printglossopt{leveloffset})} + } + % \currentglossary + \gcmd{current\-glossary} + { + \providedby{\sty{glossaries} v3.0+} + \desc{defined by the \csfmt{print\ldots glossary} commands to + the current \idx{glossary} label} + } + % \printunsrtglossarypredoglossary + \gcmd{print\-unsrt\-glossary\-pre\-do\-glossary} + { + \providedby{\sty{glossaries-extra} v1.21+} + \desc{hook performed by the \idx{unsrtfam} just before the + \idx{glossary} body is displayed} + } + % \@glsxtr@doglossary + \gcmd{@gls\-xtr\-@do\-glossary} + { + \providedby{\sty{glossaries-extra} v1.08+} + \desc{internal command used within the construction of the + \idx{glossary} code by the \idx{unsrtfam}. Should not be used + or modified but \gls{printunsrtglossarypredoglossary} can be + defined to show the definition of this command for debugging + purposes} + } + % \printunsrtglossaryhandler + \gcmd{print\-unsrt\-glossary\-handler} + { + \providedby{\sty{glossaries-extra} v1.16+} + \syntax{\margm{entry-label}} + \desc{used within the \idx{unsrtfam} to process the current entry} + } + % \glsxtrunsrtdo + \gcmd{gls\-xtr\-unsrt\-do}% + {% + \syntax{\margm{entry-label}} + \providedby{\sty{glossaries-extra} v1.12+} + \desc{used by the \idx{unsrtfam}, + this displays the \idx{glossary} entry according to the current + \idx{glossarystyle} (taking the \idx{hierarchicallevel} into account, + which may have been adjusted by \printglossopt{leveloffset} or + \printglossopt{flatten})} + } + % \GlsXtrLocationField + \gcmd{Gls\-Xtr\-Location\-Field} + { + \providedby{\sty{glossaries-extra} v1.37+} + \initval{location} + \desc{expands to the \idx{internalfieldlabel} used to obtain the + formatted \idx{locationlist} for the \idx{unsrtfam}} + } + % \glsxtriflabelinlist + \gcmd{gls\-xtr\-if\-label\-in\-list} + { + \providedby{\sty{glossaries-extra} v1.21+} + \syntax{\margm{label}\margm{label-list}\margm{true}\margm{false}} + \desc{does \meta{true} if the given label is in the given comma-separated + list of labels, otherwise does \meta{false}. The label and list are fully + expanded} + } + % prinunsrtglossarywrap environment + \genv{print\-unsrt\-glossary\-wrap}% + {% + \providedby{\sty{glossaries-extra} v1.44+} + \syntax{\oargm{options}} + \desc{sets up the start and end of the \idx{glossary} (including + beginning and ending the \env{theglossary} environment). Use + \gls{printunsrtinnerglossary} within the body for each block of + entries} + }% + % print*glossary options + \gidx{printglossopt}{\name{print [unsrt|noidx] glossary options}% + \field{text}{print glossary option}% + \desc{most (but not all) of these options can be used in the optional argument + of all the print \idx{glossary} commands: \gls{printglossary}, \gls{printnoidxglossary}, + \gls{printunsrtglossary} and \gls{printunsrtinnerglossary}. + Some may be used in the optional argument of + the \env{printunsrtglossarywrap} environment} + } + % printgloss type + \gprintglossopt{type}{% + \syntax{\meta{\idx{glossary}-label}} + \defval{\gls{glsdefaulttype}}% + \desc{identifies the \idx{glossary} to display}} + % printgloss sort + \gprintglossopt{sort}{% + \syntax{\meta{method}} + \desc{only available with \gls{printnoidxglossary}, this + indicates how the \idx{glossary} should be ordered}} + % printgloss title + \gprintglossopt{title}{% + \syntax{\meta{text}} + \desc{sets the glossary title (overriding the default)}} + % printgloss toctitle + \gprintglossopt{toc\-title}{% + \syntax{\meta{text}} + \desc{sets the glossary toc title (overriding the default)}} + % printgloss target + \gprintglossopt{target}{% + \providedby{\sty{glossaries-extra} v1.12+} + \syntax{\meta{boolean}} + \initval{true}% + \defval{true}% + \desc{if true, each entry in the \idx{glossary} should have a + hypertarget created, if supported by the \idx{glossarystyle} and if + hyperlinks are enabled} + } + % printgloss targetnameprefix + \gprintglossopt{target\-name\-prefix}{% + \providedby{\sty{glossaries-extra} v1.20+} + \syntax{\meta{prefix}} + \desc{inserts \meta{prefix} at the start of the hypertarget names}} + % printgloss prefix + \gprintglossopt{prefix}{% + \providedby{\sty{glossaries-extra} v1.31+} + \syntax{\meta{prefix}} + \desc{redefines \gls{glolinkprefix} to \meta{prefix}}} + % printgloss label + \gprintglossopt{label}{% + \providedby{\sty{glossaries-extra} v1.39+} + \syntax{\meta{label}} + \desc{adds \code{\gls{label}\margm{label}} to the start of the + \idx{glossary} (after the title)}} + % printgloss preamble + \gprintglossopt{preamble}{% + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\meta{text}} + \desc{redefines \gls{glossarypreamble} to \meta{text}} + } + % printgloss postamble + \gprintglossopt{postamble}{% + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\meta{text}} + \desc{redefines \gls{glossarypostamble} to \meta{text}} + } + % printgloss nonumberlist + \gprintglossopt{no\-number\-list}{% + \syntax{\meta{boolean}} + \initval{false}% + \defval{true}% + \desc{suppress the \gls{locationlist}. Note that + \printglossoptval{nonumberlist}{false} + will have no effect with the \resourceopt{save-locations}{false} + \idx{resourceopt} as there won't be any \glspl{locationlist} to + display} + } + % printgloss nogroupskip + \gprintglossopt{no\-group\-skip}{% + \syntax{\meta{boolean}} + \initval{false}% + \defval{true}% + \desc{suppress the gap implemented by some \idxpl{glossarystyle} + between \idxpl{group}} + } + % printgloss numberedsection + \gprintglossopt{numbered\-section}{% + \syntax{\meta{value}} + \initval{false}% + \defval{nolabel}% + \desc{indicates whether or not \idx{glossary} section headers will be numbered + and also if they should automatically be labelled. + The \opt{numberedsection} package option will change the default + setting to match} + } + % printgloss style + \gprintglossopt{style}{% + \syntax{\meta{style-name}} + \desc{use the \meta{style-name} \idx{glossarystyle}} + } + % printgloss leveloffset + \gprintglossopt{level\-offset}{% + \providedby{\sty{glossaries-extra} v1.44+} + \syntax{\meta{offset}} + \initval{0}% + \desc{set or increment the \gls{hierarchicallevel} offset. If + \meta{offset} starts with \code{++} then the current offset is + incremented by the given amount otherwise the current offset is + set to \meta{offset}. For example, an entry with a normal + \gls{hierarchicallevel} of 1 will be treated as though it has + \gls{hierarchicallevel} $1+\meta{offset}$. This option is only available for the + \idx{unsrtfam} and the \env{printunsrtglossarywrap} + environment}% + } + % printgloss groups + \gprintglossopt{groups}{% + \providedby{\sty{glossaries-extra} v1.44+} + \syntax{\meta{boolean}} + \initval{true}% + \defval{true}% + \desc{enables \idx{group} formation. This option is only available for the + \idx{unsrtfam} and the \env{printunsrtglossarywrap} + environment. Note that no \idxpl{group} will be formed when + invoking \app{bib2gls} with the default \switch{no-group}, regardless of + this setting} + } + % printgloss flatten + \gprintglossopt{flatten}{% + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\meta{boolean}} + \initval{false}% + \defval{true}% + \desc{if true, treats all entries as though they have the same + hierarchical level (the value of \printglossopt{leveloffset}). + This option is only available for the + \idx{unsrtfam} and the \env{printunsrtglossarywrap} + environment} + } + % printgloss nopostdot + \gprintglossopt{no\-post\-dot}{% + \syntax{\meta{boolean}} + \initval{false}% + \defval{true}% + \desc{suppress the post-description punctuation} + } + % printgloss entrycounter + \gprintglossopt{entry\-counter}{% + \providedby{\sty{glossaries} v4.08+} + \syntax{\meta{boolean}} + \initval{false}% + \defval{true}% + \desc{if true, enable the entry counter} + } + % printgloss subentrycounter + \gprintglossopt{sub\-entry\-counter}{% + \providedby{\sty{glossaries} v4.08+} + \syntax{\meta{boolean}} + \initval{false}% + \defval{true}% + \desc{if true, enable the sub-entry counter} + } + % \ifglsxtrprintglossflatten + \gcond{if\-gls\-xtr\-print\-gloss\-flatten} + { + \providedby{\sty{glossaries-extra} v1.49+} + \initvalcs{iffalse} + \desc{conditional set by the \printglossopt{flatten} option} + } + % \glsxtraddgroup + \gcmd{gls\-xtr\-add\-group} + { + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{entry-label}\margm{code}} + \desc{used by the \idx{unsrtfam} to perform \meta{code} if the + entry identified by \meta{entry-label} should have support for + \idxpl{group}} + } + % \glscurrententrylevel + \gcmd{gls\-current\-entry\-level} + { + \providedby{\sty{glossaries-extra} v1.44+} + \desc{defined within the \idx{unsrtfam} to the current + \idx{hierarchicallevel} (taking \printglossopt{leveloffset} into + account)} + } + % \glsxtrsetgrouptitle + \gcmd{gls\-xtr\-set\-group\-title} + { + \providedby{\sty{glossaries-extra} v1.14+} + \syntax{\margm{group-label}\margm{group-title}} + \desc{globally assigns the given title \meta{group-title} to the + \idx{group} identified by \meta{group-label}} + } + % \glsxtrlocalsetgrouptitle + \gcmd{gls\-xtr\-local\-set\-group\-title} + { + \providedby{\sty{glossaries-extra} v1.24+} + \syntax{\margm{group-label}\margm{group-title}} + \desc{locally assigns the given title \meta{group-title} to the + \idx{group} identified by \meta{group-label}} + } + % \glsxtrgetgrouptitle + \gcmd{gls\-xtr\-get\-group\-title} + { + \providedby{\sty{glossaries-extra} v1.14+} + \syntax{\margm{group-label}\margm{cs}} + \desc{obtains the title corresponding to the \idx{group} + identified by \meta{group-label} and stores the result in the + control sequence \meta{cs}} + } + % \glsxtrdetoklocation + \gcmd{gls\-xtr\-de\-tok\-location} + { + \providedby{\sty{glossaries-extra} v1.21+} + \syntax{\margm{location}} + \desc{just expands to \meta{location} by default but may be + redefined to help protect awkward characters} + } + % \glsdisplaynumberlist + \gcmd{gls\-display\-number\-list} + { + \providedby{\sty{glossaries} v3.02+} + \syntax{\margm{entry-label}} + \desc{formats the \idx{locationlist} for the given entry. + Redefined by \sty{glossaries-extra-bib2gls} to obtain the + \idx{locationlist} from the \gloskey{location} field} + } + % \glsentrynumberlist + \gcmd{gls\-entry\-number\-list} + { + \providedby{\sty{glossaries} v3.02+} + \syntax{\margm{entry-label}} + \desc{displays the \idx{locationlist} for the given entry. + Redefined by \sty{glossaries-extra-bib2gls} to obtain the + \idx{locationlist} from the \gloskey{location} field} + } + % COMMANDS: STANDALONE + % \glsxtrglossentry + \gcmd{gls\-xtr\-gloss\-entry} + { + \providedby{\sty{glossaries-extra} v1.21+} + \syntax{\margm{entry-label}} + \desc{used for standalone entries to display the name with + \gls{glossentryname}, with appropriate hooks} + } + % \GlsXtrStandaloneGlossaryType + \gcmd{Gls\-Xtr\-Stand\-alone\-Glossary\-Type} + { + \providedby{\sty{glossaries-extra} v1.21+} + \desc{expands to the \idx{glossary} type for standalone entries} + } + % \GlsXtrStandaloneSubEntryItem + \gcmd{Gls\-Xtr\-Stand\-alone\-Sub\-Entry\-Item} + { + \providedby{\sty{glossaries-extra} v1.21+} + \syntax{\margm{entry-label}} + \desc{used to display standalone entries that have the + \gloskey{parent} field set} + } + % \GlsXtrStandaloneEntryName + \gcmd{Gls\-Xtr\-Stand\-alone\-Entry\-Name} + { + \providedby{\sty{glossaries-extra} v1.37+} + \syntax{\margm{entry-label}} + \desc{used to display the standalone entry name and create the + associated hypertarget, if supported} + } + % \GlsXtrStandaloneEntryPdfName + \gcmd{Gls\-Xtr\-Stand\-alone\-Entry\-Pdf\-Name} + { + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{entry-label}} + \desc{used by \gls{glsxtrglossentry} for the PDF bookmark} + } + % \GlsXtrStandaloneEntryHeadName + \gcmd{Gls\-Xtr\-Stand\-alone\-Entry\-Head\-Name} + { + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{entry-label}} + \desc{used by \gls{glsxtrglossentry} for the header and toc} + } + % \GlsXtrStandaloneEntryOther + \gcmd{Gls\-Xtr\-Stand\-alone\-Entry\-Other} + { + \providedby{\sty{glossaries-extra} v1.37+} + \syntax{\margm{entry-label}\margm{field-label}} + \desc{as \gls{GlsXtrStandaloneEntryName} but where the text is + obtained from the given field instead of \gloskey{name}} + } + % \GlsXtrStandaloneEntryPdfOther + \gcmd{Gls\-Xtr\-Stand\-alone\-Entry\-Pdf\-Other} + { + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{entry-label}\margm{field-label}} + \desc{used by \gls{glsxtrglossentryother} for the PDF bookmark} + } + % \GlsXtrStandaloneEntryHeadOther + \gcmd{Gls\-Xtr\-Stand\-alone\-Entry\-Head\-Other} + { + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{entry-label}\margm{field-label}} + \desc{used by \gls{glsxtrglossentryother} for the header and toc} + } + % \glsxtractivatenopost + \gcmd{gls\-xtr\-activate\-no\-post} + { + \providedby{\sty{glossaries-extra} v1.22+} + \desc{activates \gls{nopostdesc} and \gls{glsxtrnopostpunc}} + } + % \glsxtrglossentryother + \gcmd{gls\-xtr\-gloss\-entry\-other} + { + \providedby{\sty{glossaries-extra} v1.22+} + \syntax{\margm{header}\margm{entry-label}\margm{field-label}} + \desc{like \gls{glsxtrglossentry} but uses the given field + instead of \gloskey{name}} + } + % COMMANDS: DEFINING ENTRIES + % \glsnoexpandfields + \gcmd{gls\-no\-expand\-fields} + { + \providedby{\sty{glossaries} v3.08a+} + \desc{don't expand field values when defining entries, except + for those that explicitly have expansion enabled with + \gls{glssetexpandfield}} + } + % \glsexpandfields + \gcmd{gls\-expand\-fields} + { + \providedby{\sty{glossaries} v3.08a+} + \desc{expand field values when defining entries, except + for those that explicitly have expansion disabled with + \gls{glssetnoexpandfield}} + } + % \glssetnoexpandfield + \gcmd{gls\-set\-no\-expand\-field} + { + \providedby{\sty{glossaries} v3.13a+} + \syntax{\margm{field}} + \desc{don't expand the value of the field identified by its + \idx{internalfieldlabel} when defining entries (overrides \gls{glsexpandfields})} + } + % \glssetexpandfield + \gcmd{gls\-set\-expand\-field} + { + \providedby{\sty{glossaries} v3.13a+} + \syntax{\margm{field}} + \desc{expand the value of the field identified by its + \idx{internalfieldlabel} when defining entries (overrides \gls{glsnoexpandfields})} + } + % \ifglsentryexists + \gcmd{if\-gls\-entry\-exists} + { + \providedby{\sty{glossaries}} + \syntax{\margm{entry-label}\margm{true}\margm{false}} + \desc{does \meta{true} if the entry given by \meta{entry-label} + exists, otherwise does \meta{false}} + \field{seealso}{glsdoifexistsordo,glsdoifexists,glsdoifnoexists} + } + % \glsdoifexistsordo + \gcmd{gls\-do\-if\-exists\-or\-do} + { + \providedby{\sty{glossaries} v4.19+} + \syntax{\margm{entry-label}\margm{true}\margm{false}} + \desc{similar to \gls{ifglsentryexists}, this does \meta{true} if the entry + given by \meta{entry-label} + exists. If the entry doesn't it exist, this does \meta{false} + and generates an error (\opteqvalref{undefaction}{error}) or a warning + (\opteqvalref{undefaction}{warn}). The unknown marker + \idx{unknowntag} will be placed before the \meta{false} code} + \field{seealso}{ifglsentryexists,glsdoifexists,glsdoifnoexists} + } + % \glsdoifexists + \gcmd{gls\-do\-if\-exists} + { + \providedby{\sty{glossaries}} + \syntax{\margm{entry-label}\margm{code}} + \desc{does \meta{code} if the entry given by \meta{entry-label} + exists. If the entry doesn't exist, this will either generate + an error (\opteqvalref{undefaction}{error}) or a warning + (\opteqvalref{undefaction}{warn}) and, within the document + environment, it will insert the unknown marker \idx{unknowntag}} + \field{seealso}{ifglsentryexists,glsdoifexistsordo,glsdoifnoexists} + } + % \glsdoifexistsorwarn + \gcmd{gls\-do\-if\-exists\-or\-warn} + { + \providedby{\sty{glossaries} v4.03+} + \syntax{\margm{entry-label}\margm{code}} + \desc{like \gls{glsdoifexists}, but always warns (no error) if + the entry doesn't exist, regardless of the \opt{undefaction} + setting, and doesn't show the unknown marker} + } + % \glsdoifnoexists + \gcmd{gls\-do\-if\-no\-exists} + { + \providedby{\sty{glossaries}} + \syntax{\margm{entry-label}\margm{code}} + \desc{does \meta{code} if the entry given by \meta{entry-label} + does not exist. If the entry does exist, this will either generate + an error (\opteqvalref{undefaction}{error}) or a warning + (\opteqvalref{undefaction}{warn})} + \field{seealso}{ifglsentryexists,glsdoifexistsordo,glsdoifexists} + } + % \loadglsentries + \gcmd{load\-gls\-entries} + { + \providedby{\sty{glossaries}}% + \syntax{\oargm{type}\margm{filename}} + \desc{locally assigns \gls{glsdefaulttype} to \meta{type} and + inputs \meta{filename}. If the optional argument is omitted, + the default glossary is assumed. Note that if any entries with + \meta{filename} have the \gloskey{type} key set (including + implicitly in commands like \gls{newabbreviation}), then this will + override the type given in the optional argument} + } + % \newglossaryentry + \gcmd{new\-glossary\-entry}% + {% + \providedby{\sty{glossaries}}% + \syntax{\margm{entry-label}\margm{key=value list}} + \desc{defines a new \idx{glossary} entry with the given label. The + second argument is a comma-separated list of \idxpl{gloskey}} + } + % \longnewglossaryentry + \gcmd{long\-new\-glossary\-entry}% + {% + \providedby{\sty{glossaries} v3.11a}% + \syntax{\margm{entry-label}\margm{key=value list}\margm{description}} + \desc{defines a new \idx{glossary} entry with the given label. The + second argument is a comma-separated list of \idxpl{gloskey}. + The third argument is the description, which may include + paragraph breaks} + } + % \longnewglossaryentry* + \gcmd{long\-new\-glossary\-entry*}% + {% + \providedby{\sty{glossaries-extra} v1.12+} + \syntax{\margm{entry-label}\margm{key=value list}\margm{description}} + \desc{like the unstarred \gls{longnewglossaryentry} but doesn't + add the \gls{glsxtrpostlongdescription} hook} + }% + % \glsxtrpostlongdescription + \gcmd{gls\-xtr\-post\-long\-descrip\-tion}% + {% + \providedby{\sty{glossaries-extra} v1.12+} + \desc{hook added to the end of the \gloskey{description} field + by the unstarred version of \gls{longnewglossaryentry}} + }% + % \newterm + \gcmd{new\-term}% + {% + \providedby{\sty{glossaries} v4.02+} + \syntax{\oargm{key=value list}\margm{entry-label}} + \note{requires \opt{index} package option} + \desc{defines a new \idx{glossary} entry with the given label, + \gloskey{type} set to \code{index}, the \gloskey{name} + set to \meta{entry-label} and the \gloskey{description} + set to \gls{nopostdesc}. The + optional argument is a comma-separated list of \idxpl{gloskey}, + which can be used to override the defaults} + } + % \glsxtrnewsymbol + \gcmd{gls\-xtr\-new\-symbol}% + {% + %\providedby{\sty{glossaries-extra} v1.0+} + \syntax{\oargm{key=value list}\margm{entry-label}\margm{sym}} + \note{requires \code{\csfmt{usepackage}\oarg{\opt{symbols}}\marg{glossaries-extra}}} + \desc{defines a new \idx{glossary} entry with the given label, + \gloskey{type} set to \code{symbols}, the \gloskey{category} set + to \code{symbol}, the \gloskey{name} set to \meta{sym} and the \gloskey{sort} + set to \meta{entry-label}. The optional argument is a comma-separated list of \idxpl{gloskey}, + which can be used to override the defaults} + } + % \glsxtrnewnumber + \gcmd{gls\-xtr\-new\-number}% + {% + %\providedby{\sty{glossaries-extra} v1.0+} + \syntax{\oargm{key=value list}\margm{entry-label}\margm{num}} + \note{requires \code{\csfmt{usepackage}\oarg{\opt{numbers}}\marg{glossaries-extra}}} + \desc{defines a new \idx{glossary} entry with the given label, + \gloskey{type} set to \code{numbers}, the \gloskey{category} set + to \code{number}, the \gloskey{name} set to \meta{num} and the \gloskey{sort} + set to \meta{entry-label}. The optional argument is a comma-separated list of \idxpl{gloskey}, + which can be used to override the defaults} + } + % \newentry + \gcmd{new\-entry}% + {% + %\providedby{\sty{glossaries-extra} v1.0+} + \syntax{\margm{entry-label}\margm{options}} + \desc{a synonym for \gls{newglossaryentry} defined by the + \opteqvalref{shortcuts}{other} package option} + } + % \newsym + \gcmd{new\-sym}% + {% + %\providedby{\sty{glossaries-extra} v1.0+} + \syntax{\oargm{key=value list}\margm{entry-label}\margm{sym}} + \desc{a synonym for \gls{glsxtrnewsymbol} defined by the + \opteqvalref{shortcuts}{other} package option (provided + the \opt{symbols} option is also used)} + } + % \newnum + \gcmd{new\-num}% + {% + %\providedby{\sty{glossaries-extra} v1.0+} + \syntax{\oargm{key=value list}\margm{entry-label}\margm{num}} + \desc{a synonym for \gls{glsxtrnewnumber} defined by the + \opteqvalref{shortcuts}{other} package option (provided + the \opt{numbers} option is also used)} + } + % \newabbr + \gcmd{new\-abbr}% + {% + %\providedby{\sty{glossaries-extra} v1.0+} + \syntax{\oargm{options}\margm{entry-label}\margm{short}\margm{long}} + \desc{a synonym for \gls{newabbreviation} defined by the + \opteqvalref{shortcuts}{abbreviations} or + \opteqvalref{shortcuts}{ac} package option} + } + % \glsaddkey + \gcmd{gls\-add\-key} + { + \providedby{\sty{glossaries} v3.12a} + \syntax{\margm{key}\margm{default value}\margm{no link cs}\margm{no link ucfirst + cs}\margm{link cs}\margm{link ucfirst cs}\margm{link allcaps cs}} + \desc{defines a new \idx{gloskey} with the given default value + and commands that are analogous to \gls{glsentrytext} (\meta{no + link cs}), \gls{Glsentrytext} (\meta{no link ucfirst cs}), + \gls{glstext} (\meta{link cs}), \gls{Glstext} (\meta{link ucfirst cs}), + \gls{GLStext} (\meta{link allcaps cs}). The starred version switches on field + expansion for the given key} + \field{seealso}{glsaddstoragekey,glsxtrprovidestoragekey} + } + % \glsaddstoragekey + \gcmd{gls\-add\-storage\-key} + {% + \providedby{\sty{glossaries} v4.16} + \syntax{\margm{key}\margm{default value}\margm{no link cs}} + \desc{provides a new \idx{gloskey} with a default value and a + command for simply accessing the value (without indexing + or hyperlinks). The starred version switches on field + expansion for the given key} + \field{seealso}{glsaddkey,glsxtrprovidestoragekey} + } + % \glsxtrprovidestoragekey + \gcmds{gls\-xtr\-provide\-storage\-key} + {% + \providedby{\sty{glossaries-extra} v1.12+} + \syntax{\margm{key}\margm{default value}\margm{no link cs}} + \desc{like \gls{glsaddstoragekey} but does nothing if the key + has already been defined} + } + % \glsxtrifkeydefined + \gcmd{gls\-xtr\-if\-key\-defined} + {% + \providedby{\sty{glossaries-extra} v1.12+} + \syntax{\margm{key}\margm{true}\margm{false}} + \desc{tests if the given \meta{key} has been defined as a + \idx{gloskey}. Does \meta{true} if the key has been defined, + otherwise does false} + } + % \newglossaryentry (glossentry) keys + \gidxpl{gloskey}{% + \common + \field{text}{glossary entry key} + \desc{these are options that can be passed to commands that + define entries, such as \gls{newglossaryentry} or + \gls{newabbreviation}} + } + % glossentry name + \ggloskey{name}% + {% + \syntax{\margm{text}} + \desc{the entry's name, as displayed in the \idx{glossary}. This + typically isn't used outside of the \idx{glossary} (the \gloskey{text} and + \gloskey{plural} keys are used instead). However, if there is a + need to specifically display the entry name, + use \gls{glsname} (if \idx{indexing} and hyperlinks + are required) or \gls{glsentryname}. Glossary styles should use + \gls{glossentryname}, which uses \gls{glsentryname} and + incorporates the \idxpl{postnamehook} and related \attrs} + } + % glossentry description + \ggloskey{description}% + {% + \syntax{\margm{text}} + \desc{the entry's description, as displayed in the \idx{glossary}. If + required in the text, use \gls{glsdesc} (if \idx{indexing} and hyperlinks + are required) or \gls{glsentrydesc}. Glossary styles should use + \gls{glossentrydesc} and \gls{glspostdescription} to + incorporate the \idx{postdeschook}} + } + % glossentry descriptionplural + \ggloskey{description\-plural}% + {% + \syntax{\margm{text}} + \desc{the plural form of the entry's description, if applicable. + If omitted, this is set to the same value as the + \gloskey{description}, since descriptions tend not to be a singular + entity} + } + % glossentry type + \ggloskey{type}% + {% + \syntax{\meta{\idx{glossary}-label}} + \initvalcs{glsdefaulttype}% + \desc{assigns the entry to the \idx{glossary} identified by + \meta{\idx{glossary}-label}} + } + % glossentry parent + \ggloskey{parent}% + {% + \syntax{\meta{parent-label}} + \desc{the label of the entry's parent (from which the entry's + \idx{hierarchicallevel} is obtained)} + } + % glossentry category + \ggloskey{category}% + {% + \syntax{\meta{category-label}}% + \initval{general}% + \providedby{\sty{glossaries-extra}} + \desc{the entry's \idx{category} (must be a simple label)} + } + % glossentry sort + \ggloskey{sort}% + {% + \syntax{\meta{value}} + \initval{\meta{entry name}} + \desc{specifies the value to use for sorting (overrides the + default). This key is usually required for \app+{xindy} if the + \gloskey{name} key only contains commands (for example, the + entry is a symbol), but explicitly using this key in other + contexts can break certain sort methods. + \gallerypage{bib2gls-sorting}{Don't use the \gloskey{sort} field + with \app{bib2gls}}} + } + % glossentry text + \ggloskey{text}% + {% + \syntax{\margm{text}} + \desc{the entry's text, as displayed on \idx{subsequentuse} of + \idx{glslike} commands. If omitted, this value is assumed to be + the same as the \gloskey{name} key} + } + % glossentry plural + \ggloskey{plural}% + {% + \syntax{\margm{text}} + \desc{the entry's plural form, as displayed on \idx{subsequentuse} of + plural \idx{glslike} commands, such as \gls{glspl}. This should + be the appropriate plural form of the value provided by the + \gloskey{text} key. If omitted, this value is assumed to be the + value of the \gloskey{text} key with \gls{glspluralsuffix} + appended} + } + % glossentry symbol + \ggloskey{symbol}% + {% + \initvalcs{relax} + \syntax{\margm{symbol}} + \desc{the entry's associated symbol (optional), which can be + displayed with \gls{glssymbol} (if \idx{indexing} and hyperlinks are + required) or with \gls{glsentrysymbol}} + } + % glossentry symbolplural + \ggloskey{symbol\-plural}% + {% + \syntax{\margm{symbol plural}} + \desc{The plural form of the \gloskey{symbol}, if applicable, + which can be displayed with \gls{glssymbolplural} (if \idx{indexing} + and hyperlinks are required) or with \gls{glsentrysymbolplural}. + If omitted, this value is set to the same as the + \gloskey{symbol} key (since symbols usually don't have a plural + form)} + } + % glossentry first + \ggloskey{first}% + {% + \syntax{\margm{first}} + \desc{the entry's text, as displayed on \idx{firstuse} of + \idx{glslike} commands. Note that using an \idx{abbrvstyle} + or \glspl{postlinkhook} is a more flexible approach. If omitted, + this value is assumed to be the same as the \gloskey{text} key} + } + % glossentry firstplural + \ggloskey{first\-plural}% + {% + \syntax{\margm{text}} + \desc{the entry's plural form, as displayed on \idx{firstuse} of + plural \idx{glslike} commands, such as \gls{glspl}. If this key + is omitted, then the value will either be the same as the + \gloskey{plural} field, if the \gloskey{first} key wasn't used, or + the value will be taken from the \gloskey{first} key with + \gls{glspluralsuffix} appended} + } + % glossentry short + \ggloskey{short}% + {% + \syntax{\margm{short-form}} + \desc{a \idx{field} that is set by \gls{newabbreviation} + (and \gls{newacronym}) to the entry's short (abbreviated) form. It + typically shouldn't be used explicitly with + \gls{newglossaryentry} as \gls{newabbreviation} + makes other modifications to ensure that when the entry is + referenced with the \idx{glslike} commands, it will obey the + appropriate \idx{abbrvstyle}. If you are using \app{bib2gls} + then this field should be used in the \ext{bib} file when + defining abbreviations} + } + % glossentry shortplural + \ggloskey{short\-plural}% + {% + \syntax{\margm{short-form}} + \desc{as \gloskey{short} but the plural form. The default is + obtained by appending the abbreviation plural suffix, but this + behaviour can be altered by \idxpl{categoryattribute}. See + \sectionref{sec:abbreviations} for further details} + } + % glossentry long + \ggloskey{long}% + {% + \syntax{\margm{long-form}} + \desc{a \idx{field} that is set by \gls{newabbreviation} to + the entry's long (unabbreviated) form. It + typically shouldn't be used explicitly with + \gls{newglossaryentry} as \gls{newabbreviation} + makes other modifications to ensure that when the entry is + referenced with the \idx{glslike} commands, it will obey the + appropriate \idx{abbrvstyle}. If you are using \app{bib2gls} + then this field should be used in the \ext{bib} file when + defining abbreviations} + } + % glossentry longplural + \ggloskey{long\-plural}% + {% + \syntax{\margm{long-form}} + \desc{as \gloskey{long} but the plural form} + } + % glossentry user1 + \ggloskey{user1}% + {% + \syntax{\margm{text}} + \desc{a generic field, which can be + displayed with \gls{glsuseri} (if \idx{indexing} and hyperlinks are + required) or with \gls{glsentryuseri}} + } + % glossentry user2 + \ggloskey{user2}% + {% + \syntax{\margm{text}} + \desc{a generic field, which can be + displayed with \gls{glsuserii} (if \idx{indexing} and hyperlinks are + required) or with \gls{glsentryuserii}} + } + % glossentry user3 + \ggloskey{user3}% + {% + \syntax{\margm{text}} + \desc{a generic field, which can be + displayed with \gls{glsuseriii} (if \idx{indexing} and hyperlinks are + required) or with \gls{glsentryuseriii}} + } + % glossentry user4 + \ggloskey{user4}% + {% + \syntax{\margm{text}} + \desc{a generic field, which can be + displayed with \gls{glsuseriv} (if \idx{indexing} and hyperlinks are + required) or with \gls{glsentryuseriv}} + } + % glossentry user5 + \ggloskey{user5}% + {% + \syntax{\margm{text}} + \desc{a generic field, which can be + displayed with \gls{glsuserv} (if \idx{indexing} and hyperlinks are + required) or with \gls{glsentryuserv}} + } + % glossentry user6 + \ggloskey{user6}% + {% + \syntax{\margm{text}} + \desc{a generic field, which can be + displayed with \gls{glsuservi} (if \idx{indexing} and hyperlinks are + required) or with \gls{glsentryuservi}} + } + % glossentry counter + \ggloskey{counter}% + {% + \syntax{\margm{counter-name}} + \desc{if set, the value indicates the \idx{locationcounter} to use + by default when \idx{indexing} this entry (overrides the + counter associated with the \idx{glossary} or the \opt{counter} + package option)} + } + % glossentry see + \ggloskey{see}% + {% + \syntax{\marg{\oargm{tag}\meta{xr-list}}} + \desc{with the base \sty{glossaries} package this simply + triggers an automatic cross-reference with \gls{glssee}. The + \sty{glossaries-extra} package additionally saves the value. + Use \opteqvalref{autoseeindex}{false} to prevent the automatic + cross-reference. The \meta{tag} defaults to \gls{seename} and + \meta{xr-list} should be a comma-separated list of entries that + have already been defined} + } + % glossentry seealso + \ggloskey{see\-also}% + {% + \providedby{\sty{glossaries-extra}} + \syntax{\margm{xr-list}} + \desc{behaves in a similar manner to + \gloskeyval{see}{\oarg{\gls{seealsoname}}\meta{xr-list}}} + } + % glossentry alias + \ggloskey{alias}% + {% + \providedby{\sty{glossaries-extra}} + \syntax{\margm{xr-label}} + \desc{behaves in a similar manner to + \gloskeyval{see}{\oarg{\gls{seealsoname}}\meta{xr-label}} but also + sets up aliasing which makes the \idx{linktext} hyperlink to + \meta{xr-label} instead} + } + % glossentry group + \ggloskey{group}% + {% + \providedby{\sty{glossaries-extra}} + \syntax{\margm{group-label}} + \desc{the \idx{group} label that identifies which \idx{group} the + entry belongs to. This key is only available with the + \opteqvalref{record}{only} and \opteqvalref{record}{nameref} options, + and is set by \app{bib2gls}, if invoked with \switch{group} or \switch{g}. + This is an \idxc{bib2glsinternalfield}{internal key} assigned by + \app{bib2gls} as a by-product of sorting. + Explicit use without reference to the order of entries can result in + fragmented groups. The corresponding title can be set with + \gls{glsxtrsetgrouptitle}, although this is more commonly done + implicitly within the \ext{glstex} file} + } + % glossentry location + \ggloskey{location}% + {% + \providedby{\sty{glossaries-extra}} + \syntax{\margm{location-list}} + \desc{the formatted \idx{locationlist} used by the \idx{unsrtfam}. This key + is only available with the \opt{record} option and is set by \app{bib2gls} + unless \resourceopt{save-locations}{false} is set} + } + % ACCESSIBILITY KEYS + % glossentry access + \ggloskey{access}% + {% + \note{requires \opt{accsupp}} + \syntax{\margm{text}} + \desc{accessibility text corresponding to the \gloskey{name} field. + This field will be automatically set by + \gls{newabbreviation}, if not provided and the + \catattr{nameshortaccess} attribute is set. See \sectionref{sec:accessabbr}} + } + % glossentry textaccess + \ggloskey{text\-access}% + {% + \note{requires \opt{accsupp}} + \syntax{\margm{text}} + \desc{accessibility text corresponding to the \gloskey{text} field. + This field will be automatically set by + \gls{newabbreviation}, if not provided and the + \catattr{textshortaccess} attribute is set. See \sectionref{sec:accessabbr}} + } + % glossentry pluralaccess + \ggloskey{plural\-access}% + {% + \note{requires \opt{accsupp}} + \syntax{\margm{text}} + \desc{accessibility text corresponding to the \gloskey{plural} field. + This field will be automatically set by + \gls{newabbreviation}, if not provided and the + \catattr{textshortaccess} attribute is set. See \sectionref{sec:accessabbr}} + } + % glossentry firstaccess + \ggloskey{first\-access}% + {% + \note{requires \opt{accsupp}} + \syntax{\margm{text}} + \desc{accessibility text corresponding to the \gloskey{first} field. + This field will be automatically set by + \gls{newabbreviation}, if not provided and the + \catattr{firstshortaccess} attribute is set. See \sectionref{sec:accessabbr}} + } + % glossentry firstpluralaccess + \ggloskey{first\-plural\-access}% + {% + \note{requires \opt{accsupp}} + \syntax{\margm{text}} + \desc{accessibility text corresponding to the \gloskey{firstplural} field. + This field will be automatically set by + \gls{newabbreviation}, if not provided and the + \catattr{firstshortaccess} attribute is set. See \sectionref{sec:accessabbr}} + } + % glossentry shortaccess + \ggloskey{short\-access}% + {% + \note{requires \opt{accsupp}} + \syntax{\margm{text}} + \desc{accessibility text corresponding to the \gloskey{short} + field. This field will be automatically set by + \gls{newabbreviation}, if not provided. See \sectionref{sec:accessabbr}} + } + % glossentry shortpluralaccess + \ggloskey{short\-plural\-access}% + {% + \note{requires \opt{accsupp}} + \syntax{\margm{text}} + \desc{accessibility text corresponding to the \gloskey{shortplural} field. This field will be automatically set by + \gls{newabbreviation}, if not provided. See \sectionref{sec:accessabbr}} + } + % glossentry longaccess + \ggloskey{long\-access}% + {% + \note{requires \opt{accsupp}} + \syntax{\margm{text}} + \desc{accessibility text corresponding to the \gloskey{long} field} + } + % glossentry longpluralaccess + \ggloskey{long\-plural\-access}% + {% + \note{requires \opt{accsupp}} + \syntax{\margm{text}} + \desc{accessibility text corresponding to the \gloskey{longplural} field} + } + % glossentry descriptionaccess + \ggloskey{description\-access}% + {% + \note{requires \opt{accsupp}} + \syntax{\margm{text}} + \desc{accessibility text corresponding to the \gloskey{description} field} + } + % glossentry descriptionpluralaccess + \ggloskey{description\-plural\-access}% + {% + \note{requires \opt{accsupp}} + \syntax{\margm{text}} + \desc{accessibility text corresponding to the \gloskey{descriptionplural} field} + } + % glossentry symbolaccess + \ggloskey{symbol\-access}% + {% + \note{requires \opt{accsupp}} + \syntax{\margm{text}} + \desc{accessibility text corresponding to the \gloskey{symbol} field} + } + % glossentry symbolpluralaccess + \ggloskey{symbol\-plural\-access}% + {% + \note{requires \opt{accsupp}} + \syntax{\margm{text}} + \desc{accessibility text corresponding to the \gloskey{symbolplural} field} + } + % glossentry user1access + \ggloskey{user1\-access}% + {% + \providedby{\sty{glossaries-accsupp} v4.45+} + \syntax{\margm{text}} + \desc{accessibility text corresponding to the \gloskey{user1} field} + } + % glossentry user2access + \ggloskey{user2\-access}% + {% + \providedby{\sty{glossaries-accsupp} v4.45+} + \syntax{\margm{text}} + \desc{accessibility text corresponding to the \gloskey{user2} field} + } + % glossentry user3access + \ggloskey{user3\-access}% + {% + \providedby{\sty{glossaries-accsupp} v4.45+} + \syntax{\margm{text}} + \desc{accessibility text corresponding to the \gloskey{user3} field} + } + % glossentry user4access + \ggloskey{user4\-access}% + {% + \providedby{\sty{glossaries-accsupp} v4.45+} + \syntax{\margm{text}} + \desc{accessibility text corresponding to the \gloskey{user4} field} + } + % glossentry user5access + \ggloskey{user5\-access}% + {% + \providedby{\sty{glossaries-accsupp} v4.45+} + \syntax{\margm{text}} + \desc{accessibility text corresponding to the \gloskey{user5} field} + } + % glossentry user6access + \ggloskey{user6\-access}% + {% + \providedby{\sty{glossaries-accsupp} v4.45+} + \syntax{\margm{text}} + \desc{accessibility text corresponding to the \gloskey{user6} field} + } + % PREFIX KEYS + % glossentry prefix + \ggloskey{prefix}% + {% + \providedby{\sty{glossaries-prefix} v3.14a+} + \syntax{\margm{text}} + \desc{the \idx{subsequentuse} singular prefix} + } + % glossentry prefixplural + \ggloskey{prefix\-plural}% + {% + \providedby{\sty{glossaries-prefix} v3.14a+} + \syntax{\margm{text}} + \desc{the \idx{subsequentuse} plural prefix} + } + % glossentry prefixfirst + \ggloskey{prefix\-first}% + {% + \providedby{\sty{glossaries-prefix} v3.14a+} + \syntax{\margm{text}} + \desc{the \idx{firstuse} singular prefix} + } + % glossentry prefixfirstplural + \ggloskey{prefix\-first\-plural}% + {% + \providedby{\sty{glossaries-prefix} v3.14a+} + \syntax{\margm{text}} + \desc{the \idx{firstuse} plural prefix} + } + % COMMANDS: FIELDS + \gidxpl{glosfield}{% + \common + \field{text}{glossary entry field} + \desc{these are internal fields that don't have a corresponding + \idxc{gloskey}{key}} + } + % field loclist + \gglosfield{loc\-list}% + {% + \providedby{\sty{glossaries} v4.04+} + \syntax{\margm{\sty{etoolbox} list}} + \desc{used by \gls{printnoidxglossary} to provide the locations. + The value is an \sty{etoolbox} list of individual locations + which are obtained from the \ext+{aux} file. This field will also + be used by the \idx{unsrtfam} if \gloskey{location} isn't set} + } + % field indexcounter + \gglosfield{index\-counter}% + {% + \syntax{\margm{target-name}} + \desc{used with the \opt{indexcounter} package option and the + \resourceopt{save-index-counter} resource option. The value is + set to the hyperlink target of the first \ctr{wrglossary} \location\ + or the first instance for a specific \idx{locationencap}} + } + % field childcount + \gglosfield{child\-count}% + {% + \syntax{\margm{number}} + \desc{used with the \resourceopt{save-child-count} resource + option to store the entry's child count} + } + % field childlist + \gglosfield{child\-list}% + {% + \syntax{\margm{entry-label-list}} + \desc{used with the \resourceopt{save-child-count} resource + option to store the entry's children as an \sty{etoolbox} + internal list} + } + % field recordcount + \gglosfield{record\-count}% + {% + \syntax{\margm{number}} + \desc{used with the \switch{record-count} switch to store the + total number of \records\ for the associated entry} + } + % field record. + \gglosfield{record.counter}% + {% + \name{\csoptfmt{record\dfullstop\meta{counter}}} + \syntax{\margm{location}} + \desc{used with \gls{GlsXtrRecordCounter} to store an + \sty{etoolbox} internal list of locations (without encap) corresponding to the + given counter} + } + % field recordcount. + \gglosfield{record\-count.counter}% + {% + \name{\csoptfmt{record\-count\dfullstop\meta{counter}}} + \syntax{\margm{number}} + \desc{used with the \switch{record-count} switch to store the + total number of \records\ with the \idx{locationcounter} \meta{counter} + for the associated entry} + } + % field recordcount.. + \gglosfield{record\-count.counter.location}% + {% + \name{\csoptfmt{record\-count\dfullstop\meta{counter}\dfullstop\meta{location}}} + \syntax{\margm{number}} + \desc{used with the \switch{record-count-unit} switch to store the + total number of \records\ with the \idx{locationcounter} + \meta{counter} set to \meta{location} for the associated entry} + } + % field secondarygroup + \gglosfield{sec\-ondary\-group} + { + \syntax{\margm{group-label}} + \desc{used by \app{bib2gls} to store the \idx{group} label + obtained from the secondary sort} + } + % \glscategory + \gcmd{gls\-category} + { + %\providedby{\sty{glossaries-extra} v1.0+} + \syntax{\margm{entry-label}} + \desc{expands to the entry's category} + } + % \glsfieldxdef + \gcmd{gls\-field\-xdef} + { + \providedby{\sty{glossaries} v4.16+} + \syntax{\margm{entry-label}\margm{field}\margm{value}} + \desc{as \gls{glsfieldedef} but does a global assignment} + } + % \glsfieldedef + \gcmd{gls\-field\-edef} + { + \providedby{\sty{glossaries} v4.16+} + \syntax{\margm{entry-label}\margm{field}\margm{value}} + \desc{locally assigns the full expansion of \meta{value} to the given \idx{field} + (identified by the \idx{internalfieldlabel} \meta{field}) for the entry identified by + \meta{entry-label}. Produces an error (or warning with + \opteqvalref{undefaction}{warn}) if the entry or field doesn't + exist. Note that this doesn't update any associated fields} + } + % \glsfieldgdef + \gcmd{gls\-field\-gdef} + { + \providedby{\sty{glossaries} v4.16+} + \syntax{\margm{entry-label}\margm{field}\margm{value}} + \desc{as \gls{glsfielddef} but does a global assignment} + } + % \glsfielddef + \gcmd{gls\-field\-def} + { + \providedby{\sty{glossaries} v4.16+} + \syntax{\margm{entry-label}\margm{field}\margm{value}} + \desc{locally assigns the \meta{value} to the given \idx{field} + (identified by the \idx{internalfieldlabel} \meta{field}) for the entry identified by + \meta{entry-label}. Produces an error (or warning with + \opteqvalref{undefaction}{warn}) if the entry or field doesn't + exist. Note that this doesn't update any associated fields} + } + % \glsxtrdeffield + \gcmd{gls\-xtr\-def\-field} + { + \providedby{\sty{glossaries-extra} v1.12+} + \syntax{\margm{entry-label}\margm{field-label}\margm{value}} + \desc{like \gls{GlsXtrSetField} but doesn't perform any + existence checks} + } + % \glsxtredeffield + \gcmd{gls\-xtr\-edef\-field} + { + \providedby{\sty{glossaries-extra} v1.12+} + \syntax{\margm{entry-label}\margm{field-label}\margm{value}} + \desc{like \gls{glsxtrdeffield} but (protected) expands + \meta{value}} + } + % \glsxtrapptocsvfield + \gcmd{gls\-xtr\-app\-to\-csv\-field} + { + \providedby{\sty{glossaries-extra} v1.47+} + \syntax{\margm{entry-label}\margm{field-label}\margm{element}} + \desc{For use with fields that should contain comma-separated + lists, this will append a command followed by \meta{element} to + the field value. If the field isn't defined, this command will + behave like \gls{glsxtrdeffield}. No existence check is performed} + } + % \glsxtrsetfieldifexists + \gcmd{gls\-xtr\-set\-field\-if\-exists} + {% + \providedby{\sty{glossaries-extra} v1.12+} + \syntax{\margm{entry-label}\margm{field-label}\margm{code}} + \desc{used by commands like \gls{GlsXtrSetField} to check if + the entry exists before assigning a value to the field. The + \meta{code} part is the assignment code, which is only done if + the required condition is met. This can be redefined if the + condition needs to be altered} + } + % \glsxtrfieldlistadd + \gcmd{gls\-xtr\-field\-list\-add} + { + \providedby{\sty{glossaries-extra} v1.12+} + \syntax{\margm{entry-label}\margm{field}\margm{value}} + \desc{appends \meta{value} to the given field using + \sty{etoolbox}['s] \gls{listcsadd}} + } + % \glsxtrfieldlistgadd + \gcmd{gls\-xtr\-field\-list\-gadd} + { + \providedby{\sty{glossaries-extra} v1.12+} + \syntax{\margm{entry-label}\margm{field}\margm{value}} + \desc{appends \meta{value} to the given field using + \sty{etoolbox}['s] \gls{listcsgadd}} + } + % \glsxtrfieldlisteadd + \gcmd{gls\-xtr\-field\-list\-eadd} + { + \providedby{\sty{glossaries-extra} v1.12+} + \syntax{\margm{entry-label}\margm{field}\margm{value}} + \desc{appends \meta{value} to the given field using + \sty{etoolbox}['s] \gls{listcseadd}} + } + % \glsxtrfieldlistxadd + \gcmd{gls\-xtr\-field\-list\-xadd} + { + \providedby{\sty{glossaries-extra} v1.12+} + \syntax{\margm{entry-label}\margm{field}\margm{value}} + \desc{appends \meta{value} to the given field using + \sty{etoolbox}['s] \gls{listcsxadd}} + } + % \glsxtrfieldformatlist + \gcmd{gls\-xtr\-field\-format\-list} + { + \providedby{\sty{glossaries-extra} v1.42+} + \syntax{\margm{entry-label}\margm{field-label}} + \desc{formats the value of the given field, which should be + an \sty{etoolbox} internal list, using the same list handler + macro as \sty{datatool}['s] \gls{DTLformatlist}} + } + % \glsxtrfielddolistloop + \gcmd{gls\-xtr\-field\-do\-list\-loop} + { + \providedby{\sty{glossaries-extra} v1.12+} + \syntax{\margm{entry-label}\margm{field}} + \desc{iterates over the given field's value using + \sty{etoolbox}['s] \gls{dolistcsloop}} + } + % \glsxtrfieldforlistloop + \gcmd{gls\-xtr\-field\-for\-list\-loop} + { + \providedby{\sty{glossaries-extra} v1.12+} + \syntax{\margm{entry-label}\margm{field}\margm{handler-cs}} + \desc{iterates over the given field's value using + \sty{etoolbox}['s] \gls{forlistcsloop}} + } + % \glsxtrfieldifinlist + \gcmd{gls\-xtr\-field\-if\-in\-list} + { + \providedby{\sty{glossaries-extra} v1.12+} + \syntax{\margm{entry-label}\margm{field}\margm{item}\margm{true}\margm{false}} + \desc{uses \sty{etoolbox}['s] \gls{ifinlistcs} to determine if + \meta{item} is in the list stored in the given field} + } + % \glsxtrfieldxifinlist + \gcmd{gls\-xtr\-field\-x\-if\-in\-list} + { + \providedby{\sty{glossaries-extra} v1.12+} + \syntax{\margm{entry-label}\margm{field}\margm{item}\margm{true}\margm{false}} + \desc{uses \sty{etoolbox}['s] \gls{xifinlistcs} to determine if + \meta{item} is in the list stored in the given field} + } + % \GlsXtrSetField + \gcmd{Gls\-Xtr\-Set\-Field}% + {% + \providedby{\sty{glossaries-extra} v1.12+} + \syntax{\margm{entry-label}\margm{field-label}\margm{value}} + \desc{assigns \meta{value} to the field identified by its + \idxc{internalfieldlabel}{internal label} \meta{field-label} + for the entry identified by \meta{entry-label}. An error (or + warning with \opteqvalref{undefaction}{warn}) occurs + if the entry hasn't been defined} + } + % \gGlsXtrSetField + \gcmd{gGls\-Xtr\-Set\-Field}% + {% + \providedby{\sty{glossaries-extra} v1.12+} + \syntax{\margm{entry-label}\margm{field-label}\margm{value}} + \desc{as \gls{GlsXtrSetField} but globally assigns the value} + } + % \eGlsXtrSetField + \gcmd{eGls\-Xtr\-Set\-Field}% + {% + \providedby{\sty{glossaries-extra} v1.12+} + \syntax{\margm{entry-label}\margm{field-label}\margm{value}} + \desc{as \gls{GlsXtrSetField} but expands the value} + } + % \xGlsXtrSetField + \gcmd{xGls\-Xtr\-Set\-Field}% + {% + \providedby{\sty{glossaries-extra} v1.12+} + \syntax{\margm{entry-label}\margm{field-label}\margm{value}} + \desc{as \gls{GlsXtrSetField} but expands the value and uses a + global assignment} + } + % \GlsXtrLetField + \gcmd{Gls\-Xtr\-Let\-Field}% + {% + \providedby{\sty{glossaries-extra} v1.12+} + \syntax{\margm{entry-label}\margm{field-label}\margm{cs}} + \desc{like \gls{GlsXtrSetField} but internally uses + (\sty{etoolbox}['s]) \gls{cslet} instead of \gls{csdef}} + } + % \csGlsXtrLetField + \gcmd{cs\-Gls\-Xtr\-Let\-Field}% + {% + \providedby{\sty{glossaries-extra} v1.12+} + \syntax{\margm{entry-label}\margm{field-label}\margm{cs-name}} + \desc{like \gls{GlsXtrLetField} but internally uses + (\sty{etoolbox}['s]) \gls{csletcs} instead of \gls{cslet}} + } + % \GlsXtrLetFieldToField + \gcmd{Gls\-Xtr\-Let\-Field\-To\-Field}% + {% + \providedby{\sty{glossaries-extra} v1.12+} + \syntax{\margm{entry1-label}\margm{field1-label}\margm{entry2-label}\margm{field2-label}} + \desc{assigns the \idx{field} identified by its + \idxc{internalfieldlabel}{internal label} \meta{field1-label} + for the entry identified by \meta{entry1-label} to the + value of the \idx{field} identified by \meta{field2-label} for the + entry identified by \meta{entry2-label}} + } + % \GlsXtrIfFieldUndef + \gcmd{Gls\-Xtr\-If\-Field\-Undef} + { + \providedby{\sty{glossaries-extra} v1.23+} + \syntax{\margm{field-label}\margm{entry-label}\margm{true}\margm{false}} + \desc{expandable command that tests if the given \idx{field} (identified by its + \idxc{internalfieldlabel}{internal label}) is undefined for the + entry given by \meta{entry-label}. Internally uses \sty{etoolbox}['s] + \gls{ifcsundef} command. Unlike \gls{glsxtrifhasfield} there is no + grouping or starred version} + \field{seealso}{ifglsfieldvoid} + } + % \glsxtrifhasfield + \gcmds{gls\-xtr\-if\-has\-field} + { + \providedby{\sty{glossaries-extra} v1.19+} + \syntax{\margm{field-label}\margm{entry-label}\margm{true}\margm{false}} + \desc{tests if the \idx{field} identified by its + \idxc{internalfieldlabel}{internal label} \meta{field-label} for the entry + given by \meta{entry-label} is defined and is not empty. This is like + \gls{ifglshasfield} but doesn't produce a warning if the entry or field + doesn't exist. This sets \gls{glscurrentfieldvalue} to the field value and + does \meta{true} if its defined and not empty, otherwise it does + \meta{false}. The unstarred version adds implicit grouping to + make nesting easier. The starred version doesn't (to make + assignments easier)} + } + % \ifglsfieldeq + \gcmd{if\-gls\-field\-eq} + { + \providedby{\sty{glossaries} v4.16+} + \syntax{\margm{entry-label}\margm{field-label}\margm{string}\margm{true}\margm{false}} + \desc{tests if the value of the given field is equal to the + given string using \sty{etoolbox}['s] \gls{ifcsstring}. + Triggers an error if the given field (identified by its + \idx{internalfieldlabel}) hasn't been defined. Uses + \gls{glsdoifexists}} + } + % \ifglsfielddefeq + \gcmd{if\-gls\-field\-def\-eq} + { + \providedby{\sty{glossaries} v4.16+} + \syntax{\margm{entry-label}\margm{field-label}\margm{cs}\margm{true}\margm{false}} + \desc{tests if the value of the given field is equal to the + replacement text of the given command \meta{cs} using \sty{etoolbox}['s] + \csfmt{ifdefstrequal}. + Triggers an error if the given field (identified by its + \idx{internalfieldlabel}) hasn't been defined. Uses + \gls{glsdoifexists}} + } + % \ifglsfieldcseq + \gcmd{if\-gls\-field\-cs\-eq} + { + \providedby{\sty{glossaries} v4.16+} + \syntax{\margm{entry-label}\margm{field-label}\margm{cs-name}\margm{true}\margm{false}} + \desc{tests if the value of the given field is equal to the + replacement text of the command given by the control sequence + name \meta{cs-name} using \sty{etoolbox}['s] \csfmt{ifcsstrequal}. + Triggers an error if the given field (identified by its + \idx{internalfieldlabel}) hasn't been defined. Uses + \gls{glsdoifexists}} + } + % \glsfieldfetch + \gcmd{gls\-field\-fetch} + { + \providedby{\sty{glossaries} v4.16+} + \syntax{\margm{entry-label}\margm{field-label}\margm{cs}} + \desc{fetches the value of the given field for the given entry and stores it in + the command \meta{cs}. Triggers an error if the given field (identified by its + \idx{internalfieldlabel}) hasn't been defined. Uses + \gls{glsdoifexists}} + } + % \glsunexpandedfieldvalue + \gcmd{gls\-un\-expanded\-field\-value} + { + \providedby{\sty{glossaries} v4.48+} + \syntax{\margm{entry-label}\margm{field-label}} + \desc{for use in expandable contexts where the field value is + required but the contents should not be expanded. The field + should be identified by its \idx{internalfieldlabel}. Expands + to nothing with no error or warning if the entry or field aren't defined} + } + % \GlsXtrIfFieldCmpNum + \gcmds{Gls\-Xtr\-If\-Field\-Cmp\-Num} + { + \providedby{\sty{glossaries-extra} v1.31+} + \syntax{\margm{field-label}\margm{entry-label}\margm{op}\margm{number}\margm{true}\margm{false}} + \desc{compares the (numeric) value of the \idx{field} identified by its + \idxc{internalfieldlabel}{internal label} + \meta{field-label} for the entry identified by + \meta{entry-label} with \meta{number} where \meta{op} is + the comparison operator (\code{=}, \code{<} or \code{>}). The + unstarred version adds implicit grouping. The starred version + doesn't} + } + % \GlsXtrIfFieldEqNum + \gcmds{Gls\-Xtr\-If\-Field\-Eq\-Num} + { + \providedby{\sty{glossaries-extra} v1.31+} + \syntax{\margm{field-label}\margm{entry-label}\margm{number}\margm{true}\margm{false}} + \desc{a shortcut that uses \gls{GlsXtrIfFieldCmpNum} with + \meta{op} set to \code{=}. The + unstarred version adds implicit grouping. The starred version + doesn't} + } + % \GlsXtrIfFieldNonZero + \gcmds{Gls\-Xtr\-If\-Field\-Non\-Zero} + { + \providedby{\sty{glossaries-extra} v1.31+} + \syntax{\margm{field-label}\margm{entry-label}\margm{true}\margm{false}} + \desc{a shortcut that uses \gls{GlsXtrIfFieldCmpNum} to test if + the (numeric) value of the \idx{field} identified by its + \idxc{internalfieldlabel}{internal label} + \meta{field-label} for the entry identified by + \meta{entry-label} is non-zero. An empty or undefined field is + treated as 0. The unstarred version adds implicit grouping. The starred version + doesn't. The value can be referenced within \meta{true} (where + it will be 0) or within \meta{false} using \gls{glscurrentfieldvalue}} + } + % \GlsXtrIfFieldEqStr + \gcmds{Gls\-Xtr\-If\-Field\-Eq\-Str} + { + \providedby{\sty{glossaries-extra} v1.21+} + \syntax{\margm{field-label}\margm{entry-label}\margm{value}\margm{true}\margm{false}} + \desc{tests if the entry given by \meta{entry-label} has the + \idx{field} identified by its \idxc{internalfieldlabel}{internal label} + \meta{field-label} set to \meta{value}. This internally uses + \gls{glsxtrifhasfield} and compares \gls{glscurrentfieldvalue} + to \meta{value} using \sty{etoolbox}['s] \gls{ifdefstring}. The + unstarred version adds implicit grouping. The starred version + doesn't} + } + % \GlsXtrIfFieldEqXpStr + \gcmds{Gls\-Xtr\-If\-Field\-Eq\-Xp\-Str} + { + \providedby{\sty{glossaries-extra} v1.31+} + \syntax{\margm{field-label}\margm{entry-label}\margm{value}\margm{true}\margm{false}} + \desc{like \gls{GlsXtrIfFieldEqStr} but first (protected) expands + \meta{value}} + } + % \GlsXtrIfXpFieldEqXpStr + \gcmds{Gls\-Xtr\-If\-Xp\-Field\-Eq\-Xp\-Str} + { + \providedby{\sty{glossaries-extra} v1.31+} + \syntax{\margm{field-label}\margm{entry-label}\margm{value}\margm{true}\margm{false}} + \desc{like \gls{GlsXtrIfFieldEqStr} but first (protected) expands + both the field value and the supplied \meta{value}} + } + % \glsxtrforcsvfield + \gcmds{gls\-xtr\-for\-csv\-field} + { + \providedby{\sty{glossaries-extra} v1.24+} + \syntax{\margm{entry-label}\margm{field-label}\margm{handler cs}} + \desc{iterates over the comma-separated list stored in the given \idx{field} + (identified by its \idxc{internalfieldlabel}{internal label}) + for the entry identified by \meta{entry-label} and performs + \code{\meta{handler cs}\margm{element}} for each element of the + list. This command uses \gls{glsxtrifhasfield} so the complete + list can be obtained with \gls{glscurrentfieldvalue}. The + unstarred version adds implicit grouping. The starred version + doesn't} + } + % \glsxtrendfor + \gcmd{glsxtrendfor} + { + \providedby{\sty{glossaries-extra} v1.24+} + \desc{when used within \gls{glsxtrforcsvfield} signifies that + the loop should break at the end of the current iteration} + } + % \glsxtrfieldformatcsvlist + \gcmd{gls\-xtr\-field\-format\-csv\-list} + { + \providedby{\sty{glossaries-extra} v1.42+} + \syntax{\margm{entry-label}\margm{field-label}} + \desc{formats the comma-separated list stored in the given \idx{field} + (identified by its \idxc{internalfieldlabel}{internal label}) + for the entry identified by \meta{entry-label} using \sty{datatool-base}['s] + \gls{DTLformatlist}. + This command uses \gls{glsxtrifhasfield} so the complete + list can be obtained with \gls{glscurrentfieldvalue}. + This adds implicit grouping. There is no starred version} + } + % \GlsXtrIfFieldValueInCsvList + \gcmds{Gls\-Xtr\-If\-Field\-Value\-In\-Csv\-List} + { + \providedby{\sty{glossaries-extra} v1.42+} + \syntax{\margm{entry-label}\margm{field-label}\margm{csv-list}\margm{true}\margm{false}} + \desc{tests if the value stored in the given \idx{field} + (identified by its \idxc{internalfieldlabel}{internal label}) + for the entry identified by \meta{entry-label} is contained in + the comma-separated list \meta{csv-list} using + \gls{DTLifinlist} (provided by \sty{datatool-base}, which is + automatically loaded by the \sty{glossaries} package). + One level expansion is performed on \meta{csv-list}. + This command uses \gls{glsxtrifhasfield} so the field value + can be obtained with \gls{glscurrentfieldvalue}. + The unstarred version adds implicit grouping. The starred version doesn't} + } + % \GlsXtrIfValueInFieldCsvList + \gcmds{Gls\-Xtr\-If\-Value\-In\-Field\-Csv\-List} + { + \providedby{\sty{glossaries-extra} v1.47+} + \syntax{\margm{entry-label}\margm{field-label}\margm{value}\margm{true}\margm{false}} + \desc{tests if the given value (\meta{value}) is contained in + the comma-separated list stored in the given \idx{field} + (identified by its \idxc{internalfieldlabel}{internal label}) + for the entry identified by \meta{entry-label} using + \gls{DTLifinlist} (provided by \sty{datatool-base}, which is + automatically loaded by the \sty{glossaries} package). + No expansion is performed on \meta{value}. + This command uses \gls{glsxtrifhasfield} so the complete + list can be obtained with \gls{glscurrentfieldvalue}. + The unstarred version adds implicit grouping. The starred version doesn't} + } + % \xGlsXtrIfValueInFieldCsvList + \gcmds{xGls\-Xtr\-If\-Value\-In\-Field\-Csv\-List} + { + \providedby{\sty{glossaries-extra} v1.47+} + \syntax{\margm{entry-label}\margm{field-label}\margm{value}\margm{true}\margm{false}} + \desc{as \gls{GlsXtrIfValueInFieldCsvList} but fully expands + \meta{value}} + } + % \glsxtrusefield + \gcmd{gls\-xtr\-use\-field} + { + \providedby{\sty{glossaries-extra} v1.12+} + \syntax{\margm{entry-label}\margm{field-label}} + \desc{expands to the value of the given \idx{field} + (identified by its \idxc{internalfieldlabel}{internal label} + \meta{field-label}) for the entry given by + \meta{entry-label}. Expands to \gls{relax} if the entry or field are undefined} + } + % \Glsxtrusefield + \gcmd{Gls\-xtr\-use\-field} + { + \providedby{\sty{glossaries-extra} v1.12+} + \syntax{\margm{entry-label}\margm{field-label}} + \desc{as \gls{glsxtrusefield} but uses \idx{sentencecase}} + } + % \GLSxtrusefield + \gcmd{GLS\-xtr\-use\-field} + { + \providedby{\sty{glossaries-extra} v1.37+} + \syntax{\margm{entry-label}\margm{field-label}} + \desc{as \gls{glsxtrusefield} but converts the field value + to \idx{allcaps}} + } + % \glsxtrfieldtitlecase + \gcmd{gls\-xtr\-field\-title\-case} + { + %\providedby{\sty{glossaries-extra} v0.5.2+} + \syntax{\margm{entry-label}\margm{field-label}} + \desc{as \gls{glsxtrusefield} but converts the field value + to \idx{titlecase}} + } + % \glsxtrfieldtitlecasecs + \gcmd{gls\-xtr\-field\-title\-case\-cs} + { + \providedby{\sty{glossaries-extra} v1.07+} + \syntax{\margm{content}} + \desc{converts \meta{content} to \idx{titlecase} (expanding the + first token once). Uses \gls{glscapitalisewords}, if defined, + otherwise uses \gls{capitalisewords}} + } + % \glscapitalisewords + \gcmd{gls\-capitalise\-words} + { + \providedby{\sty{glossaries} v4.48+} + \syntax{\margm{content}} + \desc{just does \gls{capitalisewords} but may be redefined to + use \gls{capitalisefmtwords}, if required} + } + % \glsentrytitlecase + \gcmd{gls\-entry\-title\-case} + { + \providedby{\sty{glossaries} v4.22+} + \syntax{\margm{entry-label}\margm{field-label}} + \desc{applies \idx{titlecase} to the value supplied in the given + field (which is obtained with \gls{glsfieldfetch})} + } + % \glsletentryfield + \gcmd{gls\-let\-entry\-field} + { + \providedby{\sty{glossaries} v4.07+} + \syntax{\margm{cs}\margm{entry-label}\margm{field-label}} + \desc{fetches the value of the given \idx{field} + (identified by its \idxc{internalfieldlabel}{internal label} + \meta{field-label}) for the entry given by + \meta{entry-label} and stores it in the command \meta{cs}} + } + % \glsxtrentryparentname + \gcmd{gls\-xtr\-entry\-parent\-name} + { + \providedby{\sty{glossaries-extra} v1.39+} + \syntax{\margm{entry-name}} + \desc{expands to the \gloskey{name} field of the given entry's + parent or does nothing if the entry doesn't have the + \gloskey{parent} field set or isn't defined} + } + % COMMANDS: FORMATTING HOOKS + % \glsexclapplyinnerfmtfield + \gcmd{gls\-excl\-apply\-inner\-fmt\-field} + { + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{entry-label}\margm{internal-field}} + \desc{locally adds the field given by its \idx{internalfieldlabel} + \meta{internal-field} to the \idx{innerformatting} exclusion list + for the entry identified by \meta{entry-label}. This typically + means that the field value already contains the \idx{innerformatting}} + } + % \glsifapplyinnerfmtfield + \gcmd{gls\-if\-apply\-inner\-fmt\-field} + { + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{entry-label}\margm{internal-field}\margm{true}\margm{false}} + \desc{tests if the field given by its \idx{internalfieldlabel} + \meta{internal-field} has been added to the \idx{innerformatting} + exclusion list for the entry identified by \meta{entry-label}} + \field{seealso}{glsexclapplyinnerfmtfield} + } + % \glsxtrattrentrytextfmt + \gcmd{gls\-xtr\-attr\-entry\-text\-fmt} + { + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{text}} + \desc{applies the command obtained from the control sequence + name supplied in the \catattr{innertextformat} attribute for + the category assigned to the entry given by \gls{glslabel}. This command isn't + used by default as it should rarely be needed an increases + complexity} + } + % \glsxtrgenentrytextfmt + \gcmd{gls\-xtr\-gen\-entry\-text\-fmt} + { + \providedby{\sty{glossaries-extra} v1.49+} + \desc{redefined by the \idx{glslike} and \idx{glstextlike} hooks + to set up the \idx{innerformatting}. + Initialised to \gls{glsxtrdefaultentrytextfmt}} + } + % \glsxtrdefaultentrytextfmt + \gcmd{gls\-xtr\-default\-entry\-text\-fmt} + { + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{text}} + \desc{default \idx{innerformatting}. Initialised to just do \meta{text}} + } + % \glsfmtfield + \gcmd{gls\-fmt\-field} + { + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{insert}\margm{cs}\margm{entry-label}\margm{internal-field}} + \desc{applies the formatting command \meta{cs} (which takes one + argument) to the entry's field value identified by the given + \idx{internalfieldlabel}, including \meta{insert} appended. Used + by the \idx{innerformatting} commands. + Note that \gls{glsfmtfield} should not be robust as it needs to + expand if it's inside a case-changing command} + } + % \Glsfmtfield + \gcmd{Gls\-fmt\-field} + { + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{insert}\margm{cs}\margm{entry-label}\margm{internal-field}} + \desc{as \gls{glsfmtfield} but uses \gls{makefirstuc} to change + the field value to \idx{sentencecase}} + } + % \GLSfmtfield + \gcmd{GLS\-fmt\-field} + { + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{insert}\margm{cs}\margm{entry-label}\margm{internal-field}} + \desc{as \gls{glsfmtfield} but changes the field value to \idx{allcaps}} + } + % \glsfmtinsert + \gcmd{gls\-fmt\-insert} + { + \providedby{\sty{glossaries-extra} v1.49+} + \desc{a shortcut that applies \gls{glsxtrgenentrytextfmt} to + \gls{glsinsert} if \gls{glsinsert} isn't empty} + } + % \GLSfmtinsert + \gcmd{GLS\-fmt\-insert} + { + \providedby{\sty{glossaries-extra} v1.49+} + \desc{as \gls{glsfmtinsert} but converts to \idx{allcaps}} + } + % \glsxtrsaveinsert + \gcmd{gls\-xtr\-save\-insert} + { + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{entry-label}\margm{insert}} + \desc{implemented at the start of all the \idx{glstextlike} + commands (except the \idx{inlinefullform} commands like \gls{glsxtrfull}) + to save the \gls{glsinsert} placeholder. By default, this sets + \gls{glsinsert} to empty} + } + % \glsxtrfullsaveinsert + \gcmd{gls\-xtr\-full\-save\-insert} + { + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{entry-label}\margm{insert}} + \desc{implemented at the start of all the \idx{inlinefullform} commands + like \gls{glsxtrfull} to save the \gls{glsinsert} placeholder. + By default, this just does \gls{glsxtrsaveinsert}} + } + % \glsxtrsetlongfirstuse + \gcmd{gls\-xtr\-set\-long\-first\-use} + { + \providedby{\sty{glossaries} v1.49+} + \syntax{\margm{entry-label}} + \desc{implemented by the \gls{glsxtrlong} set of commands to + assign \gls{glsxtrifwasfirstuse}} + } + % \glsxtrsetupfulldefs + \gcmd{gls\-xtr\-set\-up\-full\-defs} + { + %\providedby{\sty{glossaries-extra} v1.0+} + \desc{hook used by \gls{glsxtrfull} (and case-changing and + plural variations)} + } + % COMMANDS: REFERENCING ENTRIES + % \gls + \gcmdspa{gls}{% + \common + \providedby{\sty{glossaries}} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{references the entry identified by \meta{entry-label}. The text + produced depends on whether or not this is the \idx{firstuse} + and whether or not the \catattr{regular} attribute has been set. + The \meta{insert} argument may be inserted at the end of the + \idx{linktext} or may be inserted at a different point (for + example, after the long form on \idx{firstuse} for some abbreviation + styles. For the first optional argument, see \idxpl{glsopt}} + } + % \Gls + \gcmdspa{Gls}{% + \common + \providedby{\sty{glossaries}} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{as \gls{gls} but converts the first character of the + \idx{linktext} to \idx{uppercase}\glsadd{idx.sentencecase} (for + the start of a sentence) using \gls{makefirstuc}} + } + % \GLS + \gcmdspa{GLS}{% + \common + \providedby{\sty{glossaries}} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{as \gls{gls} but converts the \idx{linktext} to \idx{allcaps}} + } + % \glspl + \gcmdspa{glspl}{% + \common + \providedby{\sty{glossaries}} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{as \gls{gls} but uses the relevant plural form} + } + % \Glspl + \gcmdspa{Glspl}{% + \common + \providedby{\sty{glossaries}} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{as \gls{glspl} but converts the first character of the + \idx{linktext} to \idx{uppercase}\glsadd{idx.sentencecase} (for + the start of a sentence) using \gls{makefirstuc}} + } + % \GLSpl + \gcmdspa{GLSpl}{% + \common + \providedby{\sty{glossaries}} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{as \gls{glspl} but converts the \idx{linktext} to \idx{allcaps}} + } + % \glsdisp + \gcmdspa{gls\-disp}{% + \providedby{\sty{glossaries} v1.19+} + \syntax{\oargm{options}\margm{entry-label}\margm{text}} + \desc{references the entry identified by \meta{entry-label} with the + given \meta{text} as the \idx{linktext}. This command unsets the + \idx{firstuseflag} (use \gls{glslink} instead, if the + \idx{firstuseflag} should not be altered). + This command is considered a \idx{glslike} command. + For the first optional argument, see \idxpl{glsopt}} + } + % \Glsdisp + \gcmdspa{Gls\-disp}{% + \providedby{\sty{glossaries} v4.50+} + \syntax{\oargm{options}\margm{entry-label}\margm{text}} + \desc{as \gls{glsdisp} but sets the \idx{linktext} to + \code{\gls{glssentencecase}\margm{text}}. This is provided to + allow a \idx{sentencecase} mapping in the event that \gls{glsdisp} + occurs at the start of content that has automated case-changing} + } + % \glslink + \gcmdspa{gls\-link}{% + \providedby{\sty{glossaries}} + \syntax{\oargm{options}\margm{entry-label}\margm{text}} + \desc{references the entry identified by \meta{entry-label} with the + given \meta{text} as the \idx{linktext}. This command does not + alter or depend on the \idx{firstuseflag} (use \gls{glsdisp} instead, if the + \idx{firstuseflag} needs to be unset). + This command is considered a \idx{glstextlike} command. + For the first optional argument, see \idxpl{glsopt}} + } + % \Glslink + \gcmdspa{Gls\-link}{% + \providedby{\sty{glossaries} v4.50+} + \syntax{\oargm{options}\margm{entry-label}\margm{text}} + \desc{as \gls{glslink} but sets the \idx{linktext} to + \code{\gls{glssentencecase}\margm{text}}. This is provided to + allow a \idx{sentencecase} mapping in the event that \gls{glslink} + occurs at the start of content that has automated case-changing} + } + % \glstext + \gcmdspa{gls\-text}{% + \providedby{\sty{glossaries}} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{references the entry identified by \meta{entry-label}. The text + produced is obtained from the \gloskey{text} value. + The \meta{insert} argument will be inserted at the end of the + \idx{linktext}. This command does not alter or depend on the + \idx{firstuseflag}. If you have defined the entry with + \gls{newabbreviation} use \gls{glsxtrshort} for the short form or + \code{\gls{gls}\oarg{\glsopt{preunset}}}, as some + abbreviation styles are too complicated to work with \gls{glstext}. + For the first optional argument, see \idxpl{glsopt}} + } + % \Glstext + \gcmdspa{Gls\-text}{% + \providedby{\sty{glossaries}} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{as \gls{glstext} but converts the first character of the + \idx{linktext} to \idx{uppercase}\glsadd{idx.sentencecase} (for + the start of a sentence) using \gls{makefirstuc}. + If you have defined the entry with + \gls{newabbreviation} use \gls{Glsxtrshort} or + \code{\gls{Gls}\oarg{\glsopt{preunset}}} instead} + } + % \GLStext + \gcmdspa{GLS\-text}{% + \providedby{\sty{glossaries}} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{as \gls{glstext} but converts the \idx{linktext} to \idx{allcaps}. + If you have defined the entry with + \gls{newabbreviation} use \gls{GLSxtrshort} or + \code{\gls{GLS}\oarg{\glsopt{preunset}}} instead} + } + % \glsplural + \gcmdspa{gls\-plural}{% + \providedby{\sty{glossaries}} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{references the entry identified by \meta{entry-label}. The text + produced is obtained from the \gloskey{plural} value. + The \meta{insert} argument will be inserted at the end of the + \idx{linktext}. This command does not alter or depend on the + \idx{firstuseflag}. If you have defined the entry with + \gls{newabbreviation} use \gls{glsxtrshortpl} for the short form or + \code{\gls{gls}\oarg{\glsopt{preunset}}}, as some + abbreviation styles are too complicated to work with \gls{glsplural}. + For the first optional argument, see \idxpl{glsopt}} + } + % \Glsplural + \gcmdspa{Gls\-plural}{% + \providedby{\sty{glossaries}} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{as \gls{glsplural} but converts the first character of the + \idx{linktext} to \idx{uppercase}\glsadd{idx.sentencecase} (for + the start of a sentence) using \gls{makefirstuc}. + If you have defined the entry with + \gls{newabbreviation} use \gls{Glsxtrshortpl} or + \code{\gls{Glspl}\oarg{\glsopt{preunset}}} instead} + } + % \GLSplural + \gcmdspa{GLS\-plural}{% + \providedby{\sty{glossaries}} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{as \gls{glsplural} but converts the \idx{linktext} to \idx{allcaps}. + If you have defined the entry with + \gls{newabbreviation} use \gls{GLSxtrshortpl} or + \code{\gls{GLSpl}\oarg{\glsopt{preunset}}} instead} + } + % \glsfirst + \gcmdspa{gls\-first}{% + \providedby{\sty{glossaries}} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{references the entry identified by \meta{entry-label}. The text + produced is obtained from the \gloskey{first} value. + The \meta{insert} argument will be inserted at the end of the + \idx{linktext}. This command does not alter or depend on the + \idx{firstuseflag}. If you have defined the entry with + \gls{newabbreviation} use \gls{glsxtrfull} + for the full form or \gls{glsxtrlong} for the long form or use + \code{\gls{gls}\oarg{\glsopt{prereset}}}, as some + abbreviation styles are too complicated to work with \gls{glsfirst}. + For the first optional argument, see \idxpl{glsopt}} + } + % \Glsfirst + \gcmdspa{Gls\-first}{% + \providedby{\sty{glossaries}} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{as \gls{glsfirst} but converts the first character of the + \idx{linktext} to \idx{uppercase}\glsadd{idx.sentencecase} (for + the start of a sentence) using \gls{makefirstuc}. + If you have defined the entry with + \gls{newabbreviation} use \gls{Glsxtrfull} or + \code{\gls{Gls}\oarg{\glsopt{prereset}}} instead} + } + % \GLSfirst + \gcmdspa{GLS\-first}{% + \providedby{\sty{glossaries}} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{as \gls{glsfirst} but converts the \idx{linktext} to \idx{allcaps}. + If you have defined the entry with + \gls{newabbreviation} use \gls{GLSxtrfull} or + \code{\gls{GLS}\oarg{\glsopt{prereset}}} instead} + } + % \glsfirstplural + \gcmdspa{gls\-first\-plural}{% + \providedby{\sty{glossaries}} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{references the entry identified by \meta{entry-label}. The text + produced is obtained from the \gloskey{firstplural} value. + The \meta{insert} argument will be inserted at the end of the + \idx{linktext}. This command does not alter or depend on the + \idx{firstuseflag}. If you have defined the entry with + \gls{newabbreviation} use \gls{glsxtrfullpl} + for the full form or \gls{glsxtrlongpl} for the long form or use + \code{\gls{glspl}\oarg{\glsopt{prereset}}}, as some + abbreviation styles are too complicated to work with \gls{glsfirstplural}. + For the first optional argument, see \idxpl{glsopt}} + } + % \Glsfirstplural + \gcmdspa{Gls\-first\-plural}{% + \providedby{\sty{glossaries}} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{as \gls{glsfirstplural} but converts the first character of the + \idx{linktext} to \idx{uppercase}\glsadd{idx.sentencecase} (for + the start of a sentence) using \gls{makefirstuc}. + If you have defined the entry with + \gls{newabbreviation} use \gls{Glsxtrfullpl} or + \code{\gls{Glspl}\oarg{\glsopt{prereset}}} instead} + } + % \GLSfirstplural + \gcmdspa{GLS\-first\-plural}{% + \providedby{\sty{glossaries}} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{as \gls{glsfirstplural} but converts the \idx{linktext} to \idx{allcaps}. + If you have defined the entry with + \gls{newabbreviation} use \gls{GLSxtrfullpl} or + \code{\gls{GLSpl}\oarg{\glsopt{prereset}}} instead} + } + % \glsxtrshort + \gcmdspa{gls\-xtr\-short}{% + %\providedby{\sty{glossaries-extra} v1.0+} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{references the entry identified by \meta{entry-label}. The text + produced is obtained from the \gloskey{short} value, formatted + according to the \idx{abbrvstyle} associated with the entry's \idx{category}. + The \meta{insert} argument will be inserted at the end of the + \idx{linktext}. This command does not alter or depend on the + \idx{firstuseflag}. For the first optional argument, see \idxpl{glsopt}} + } + % \Glsxtrshort + \gcmdspa{Gls\-xtr\-short}{% + %\providedby{\sty{glossaries-extra} v1.0+} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{as \gls{glsxtrshort} but converts the first character of the + \idx{linktext} to \idx{uppercase}\glsadd{idx.sentencecase} (for + the start of a sentence) using \gls{makefirstuc}} + } + % \GLSxtrshort + \gcmdspa{GLS\-xtr\-short}{% + %\providedby{\sty{glossaries-extra} v1.0+} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{as \gls{glsxtrshort} but converts the \idx{linktext} to \idx{allcaps}} + } + % \glsxtrshortpl + \gcmdspa{gls\-xtr\-shortpl}{% + %\providedby{\sty{glossaries-extra} v1.0+} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{references the entry identified by \meta{entry-label}. The text + produced is obtained from the \gloskey{shortplural} value, formatted + according to the \idx{abbrvstyle} associated with the entry's \idx{category}. + The \meta{insert} argument will be inserted at the end of the + \idx{linktext}. This command does not alter or depend on the + \idx{firstuseflag}. For the first optional argument, see \idxpl{glsopt}} + } + % \Glsxtrshortpl + \gcmdspa{Gls\-xtr\-shortpl}{% + %\providedby{\sty{glossaries-extra} v1.0+} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{as \gls{glsxtrshortpl} but converts the first character of the + \idx{linktext} to \idx{uppercase}\glsadd{idx.sentencecase} (for + the start of a sentence) using \gls{makefirstuc}} + } + % \GLSxtrshortpl + \gcmdspa{GLS\-xtr\-shortpl}{% + %\providedby{\sty{glossaries-extra} v1.0+} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{as \gls{glsxtrshort} but converts the \idx{linktext} to \idx{allcaps}} + } + % \glsxtrlong + \gcmdspa{gls\-xtr\-long}{% + %\providedby{\sty{glossaries-extra} v1.0+} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{references the entry identified by \meta{entry-label}. The text + produced is obtained from the \gloskey{long} value, formatted + according to the \idx{abbrvstyle} associated with the entry's \idx{category}. + The \meta{insert} argument will be inserted at the end of the + \idx{linktext}. This command does not alter or depend on the + \idx{firstuseflag}. For the first optional argument, see \idxpl{glsopt}} + } + % \Glsxtrlong + \gcmdspa{Gls\-xtr\-long}{% + %\providedby{\sty{glossaries-extra} v1.0+} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{as \gls{glsxtrlong} but converts the first character of the + \idx{linktext} to \idx{uppercase}\glsadd{idx.sentencecase} (for + the start of a sentence) using \gls{makefirstuc}} + } + % \GLSxtrlong + \gcmdspa{GLS\-xtr\-long}{% + %\providedby{\sty{glossaries-extra} v1.0+} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{as \gls{glsxtrlong} but converts the \idx{linktext} to \idx{allcaps}} + } + % \glsxtrlongpl + \gcmdspa{gls\-xtr\-long\-pl}{% + %\providedby{\sty{glossaries-extra} v1.0+} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{references the entry identified by \meta{entry-label}. The text + produced is obtained from the \gloskey{longplural} value, formatted + according to the \idx{abbrvstyle} associated with the entry's \idx{category}. + The \meta{insert} argument will be inserted at the end of the + \idx{linktext}. This command does not alter or depend on the + \idx{firstuseflag}. For the first optional argument, see \idxpl{glsopt}} + } + % \Glsxtrlongpl + \gcmdspa{Gls\-xtr\-long\-pl}{% + %\providedby{\sty{glossaries-extra} v1.0+} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{as \gls{glsxtrlongpl} but converts the first character of the + \idx{linktext} to \idx{uppercase}\glsadd{idx.sentencecase} (for + the start of a sentence) using \gls{makefirstuc}} + } + % \GLSxtrlongpl + \gcmdspa{GLS\-xtr\-long\-pl}{% + %\providedby{\sty{glossaries-extra} v1.0+} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{as \gls{glsxtrlongpl} but converts the \idx{linktext} to \idx{allcaps}} + } + % \glsxtrfull + \gcmdspa{gls\-xtr\-full}{% + %\providedby{\sty{glossaries-extra} v1.0+} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{references the entry identified by \meta{entry-label}. The text + produced is obtained from the \gloskey{short} and \gloskey{long} values, formatted + according to the \idx{abbrvstyle} associated with the entry's \idx{category}. + The \meta{insert} argument will be inserted at the end of the + \idx{linktext}. This command does not alter or depend on the + \idx{firstuseflag}. The format produced by this command may not + match the format produced by the \idx{firstuse} of + \code{\gls{gls}\margm{entry-label}}, depending on the abbreviation + style. For the first optional argument, see \idxpl{glsopt}} + } + % \Glsxtrfull + \gcmdspa{Gls\-xtr\-full}{% + %\providedby{\sty{glossaries-extra} v1.0+} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{as \gls{glsxtrfull} but converts the first character of the + \idx{linktext} to \idx{uppercase}\glsadd{idx.sentencecase} (for + the start of a sentence) using \gls{makefirstuc}} + } + % \GLSxtrfull + \gcmdspa{GLS\-xtr\-full}{% + %\providedby{\sty{glossaries-extra} v1.0+} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{as \gls{glsxtrfull} but converts the \idx{linktext} to \idx{allcaps}} + } + % \glsxtrfullpl + \gcmdspa{gls\-xtr\-fullpl}{% + %\providedby{\sty{glossaries-extra} v1.0+} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{references the entry identified by \meta{entry-label}. The text + produced is obtained from the \gloskey{shortplural} and + \gloskey{longplural} values, formatted + according to the \idx{abbrvstyle} associated with the entry's \idx{category}. + The \meta{insert} argument will be inserted at the end of the + \idx{linktext}. This command does not alter or depend on the + \idx{firstuseflag}. The format produced by this command may not + match the format produced by the \idx{firstuse} of + \code{\gls{glspl}\margm{entry-label}}, depending on the abbreviation + style. For the first optional argument, see \idxpl{glsopt}} + } + % \Glsxtrfullpl + \gcmdspa{Gls\-xtr\-fullpl}{% + %\providedby{\sty{glossaries-extra} v1.0+} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{as \gls{glsxtrfullpl} but converts the first character of the + \idx{linktext} to \idx{uppercase}\glsadd{idx.sentencecase} (for + the start of a sentence) using \gls{makefirstuc}} + } + % \GLSxtrfullpl + \gcmdspa{GLS\-xtr\-fullpl}{% + %\providedby{\sty{glossaries-extra} v1.0+} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{as \gls{glsxtrfullpl} but converts the \idx{linktext} to \idx{allcaps}} + } + % \glsname + \gcmdspa{gls\-name}{% + \providedby{\sty{glossaries}} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{references the entry identified by \meta{entry-label}. The text + produced is obtained from the \gloskey{name} value. + The \meta{insert} argument will be inserted at the end of the + \idx{linktext}. This command does not alter or depend on the + \idx{firstuseflag}. For the first optional argument, see \idxpl{glsopt}. + Use \gls{glossentryname} within custom glossary styles + instead of this command} + } + % \Glsname + \gcmdspa{Gls\-name}{% + \providedby{\sty{glossaries}} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{as \gls{glsname} but converts the \idx{linktext} to + \idx{sentencecase}. Use \gls{Glossentryname} within custom glossary styles + instead of this command} + } + % \GLSname + \gcmdspa{GLS\-name}{% + \providedby{\sty{glossaries}} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{as \gls{glsname} but converts the \idx{linktext} to + \idx{allcaps}. This command is incompatible with some + abbreviation styles} + } + % \glsdesc + \gcmdspa{gls\-desc}{% + \providedby{\sty{glossaries}} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{references the entry identified by \meta{entry-label}. The text + produced is obtained from the \gloskey{description} value. + The \meta{insert} argument will be inserted at the end of the + \idx{linktext}. This command does not alter or depend on the + \idx{firstuseflag}. For the first optional argument, see + \idxpl{glsopt}. Use \gls{glossentrydesc} within custom glossary styles + instead of this command} + } + % \Glsdesc + \gcmdspa{Gls\-desc}{% + \providedby{\sty{glossaries}} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{as \gls{glsdesc} but converts the + \idx{linktext} to \idx{sentencecase}. Use + \gls{Glossentrydesc} within custom glossary styles + instead of this command} + } + % \GLSdesc + \gcmdspa{GLS\-desc}{% + \providedby{\sty{glossaries}} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{as \gls{glsdesc} but converts the \idx{linktext} to + \idx{allcaps}} + } + % \glsdescplural + \gcmdspa{gls\-desc\-plural}{% + \providedby{\sty{glossaries}} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{as \gls{glsdesc} but for the \gloskey{descriptionplural} field} + } + % \glssymbol + \gcmdspa{gls\-symbol}{% + \providedby{\sty{glossaries}} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{references the entry identified by \meta{entry-label}. The text + produced is obtained from the \gloskey{symbol} value. + The \meta{insert} argument will be inserted at the end of the + \idx{linktext}. This command does not alter or depend on the + \idx{firstuseflag}. For the first optional argument, see + \idxpl{glsopt}. Use \gls{glossentrysymbol} within custom glossary styles + instead of this command} + } + % \Glssymbol + \gcmdspa{Gls\-symbol}{% + \providedby{\sty{glossaries}} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{as \gls{glssymbol} but converts the + \idx{linktext} to \idx{sentencecase}. Use + \gls{Glossentrysymbol} within custom glossary styles + instead of this command} + } + % \GLSsymbol + \gcmdspa{GLS\-symbol}{% + \providedby{\sty{glossaries}} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{as \gls{glssymbol} but converts the \idx{linktext} to + \idx{allcaps}} + } + % \glssymbolplural + \gcmdspa{gls\-symbol\-plural}{% + \providedby{\sty{glossaries}} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{as \gls{glssymbol} but for the \gloskey{symbolplural} field} + } + % \glsuseri + \gcmdspa{gls\-useri}{% + \providedby{\sty{glossaries} v2.04+} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{references the entry identified by \meta{entry-label}. The text + produced is obtained from the \gloskey{user1} value. + The \meta{insert} argument will be inserted at the end of the + \idx{linktext}. This command does not alter or depend on the + \idx{firstuseflag}. For the first optional argument, see + \idxpl{glsopt}} + } + % \Glsuseri + \gcmdspa{Gls\-useri}{% + \providedby{\sty{glossaries} v2.04+} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{as \gls{glsuseri} but converts the + \idx{linktext} to \idx{sentencecase}} + } + % \GLSuseri + \gcmdspa{GLS\-useri}{% + \providedby{\sty{glossaries} v2.04+} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{as \gls{glsuseri} but converts the \idx{linktext} to + \idx{allcaps}} + } + % \glsuserii + \gcmdspa{gls\-userii}{% + \providedby{\sty{glossaries} v2.04+} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{references the entry identified by \meta{entry-label}. The text + produced is obtained from the \gloskey{user2} value. + The \meta{insert} argument will be inserted at the end of the + \idx{linktext}. This command does not alter or depend on the + \idx{firstuseflag}. For the first optional argument, see + \idxpl{glsopt}} + } + % \Glsuserii + \gcmdspa{Gls\-userii}{% + \providedby{\sty{glossaries} v2.04+} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{as \gls{glsuserii} but converts the + \idx{linktext} to \idx{sentencecase}} + } + % \GLSuserii + \gcmdspa{GLS\-userii}{% + \providedby{\sty{glossaries} v2.04+} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{as \gls{glsuserii} but converts the \idx{linktext} to + \idx{allcaps}} + } + % \glsuseriii + \gcmdspa{gls\-useriii}{% + \providedby{\sty{glossaries} v2.04+} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{references the entry identified by \meta{entry-label}. The text + produced is obtained from the \gloskey{user3} value. + The \meta{insert} argument will be inserted at the end of the + \idx{linktext}. This command does not alter or depend on the + \idx{firstuseflag}. For the first optional argument, see + \idxpl{glsopt}} + } + % \Glsuseriii + \gcmdspa{Gls\-useriii}{% + \providedby{\sty{glossaries} v2.04+} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{as \gls{glsuseriii} but converts the + \idx{linktext} to \idx{sentencecase}} + } + % \GLSuseriii + \gcmdspa{GLS\-useriii}{% + \providedby{\sty{glossaries} v2.04+} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{as \gls{glsuseriii} but converts the \idx{linktext} to + \idx{allcaps}} + } + % \glsuseriv + \gcmdspa{gls\-useriv}{% + \providedby{\sty{glossaries} v2.04+} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{references the entry identified by \meta{entry-label}. The text + produced is obtained from the \gloskey{user4} value. + The \meta{insert} argument will be inserted at the end of the + \idx{linktext}. This command does not alter or depend on the + \idx{firstuseflag}. For the first optional argument, see + \idxpl{glsopt}} + } + % \Glsuseriv + \gcmdspa{Gls\-useriv}{% + \providedby{\sty{glossaries} v2.04+} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{as \gls{glsuseriv} but converts the + \idx{linktext} to \idx{sentencecase}} + } + % \GLSuseriv + \gcmdspa{GLS\-useriv}{% + \providedby{\sty{glossaries} v2.04+} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{as \gls{glsuseriv} but converts the \idx{linktext} to + \idx{allcaps}} + } + % \glsuserv + \gcmdspa{gls\-userv}{% + \providedby{\sty{glossaries} v2.04+} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{references the entry identified by \meta{entry-label}. The text + produced is obtained from the \gloskey{user5} value. + The \meta{insert} argument will be inserted at the end of the + \idx{linktext}. This command does not alter or depend on the + \idx{firstuseflag}. For the first optional argument, see + \idxpl{glsopt}} + } + % \Glsuserv + \gcmdspa{Gls\-userv}{% + \providedby{\sty{glossaries} v2.04+} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{as \gls{glsuserv} but converts the + \idx{linktext} to \idx{sentencecase}} + } + % \GLSuserv + \gcmdspa{GLS\-userv}{% + \providedby{\sty{glossaries} v2.04+} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{as \gls{glsuserv} but converts the \idx{linktext} to + \idx{allcaps}} + } + % \glsuservi + \gcmdspa{gls\-uservi}{% + \providedby{\sty{glossaries} v2.04+} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{references the entry identified by \meta{entry-label}. The text + produced is obtained from the \gloskey{user6} value. + The \meta{insert} argument will be inserted at the end of the + \idx{linktext}. This command does not alter or depend on the + \idx{firstuseflag}. For the first optional argument, see + \idxpl{glsopt}} + } + % \Glsuservi + \gcmdspa{Gls\-uservi}{% + \providedby{\sty{glossaries} v2.04+} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{as \gls{glsuservi} but converts the + \idx{linktext} to \idx{sentencecase}} + } + % \GLSuservi + \gcmdspa{GLS\-uservi}{% + \providedby{\sty{glossaries} v2.04+} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{as \gls{glsuservi} but converts the \idx{linktext} to + \idx{allcaps}} + } + % \glshyperlink + \gcmd{gls\-hyper\-link} + { + \providedby{\sty{glossaries} v1.17+} + \syntax{\oargm{text}\margm{entry-label}} + \desc{creates a hyperlink to the given entry with the hyperlink + text provided in the optional argument. If omitted, the default is + \code{\gls{glsentrytext}\margm{entry-label}}} + } + % \acrshort + \gcmdspa{acr\-short}{% + \banned + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{displays the short form of an acronym. Only for use with + the base \sty{glossaries} package's acronym mechanism. This + command is not compatible with \gls{newabbreviation}} + } + % \acrshortpl + \gcmdspa{acr\-shortpl}{% + \banned + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{displays the plural short form of an acronym. Only for use with + the base \sty{glossaries} package's acronym mechanism. This + command is not compatible with \gls{newabbreviation}} + } + % \Acrshort + \gcmdspa{Acr\-short}{% + \banned + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{as \gls{acrshort} but \idx{sentencecase}} + } + % \Acrshortpl + \gcmdspa{Acr\-shortpl}{% + \banned + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{as \gls{acrshort} but \idx{sentencecase}} + } + % \acrlong + \gcmdspa{acr\-long}{% + \banned + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{displays the long form of an acronym. Only for use with + the base \sty{glossaries} package's acronym mechanism. This + command is not compatible with \gls{newabbreviation}} + } + % \acrlongpl + \gcmdspa{acr\-longpl}{% + \banned + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{displays the plural long form of an acronym. Only for use with + the base \sty{glossaries} package's acronym mechanism. This + command is not compatible with \gls{newabbreviation}} + } + % \Acrlong + \gcmdspa{Acr\-long}{% + \banned + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{as \gls{acrlong} but \idx{sentencecase}} + } + % \Acrlongpl + \gcmdspa{Acr\-longpl}{% + \banned + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{as \gls{acrlong} but \idx{sentencecase}} + } + % \acrfull + \gcmdspa{acr\-full}{% + \banned + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{displays the full form of an acronym. Only for use with + the base \sty{glossaries} package's acronym mechanism. This + command is not compatible with \gls{newabbreviation}} + } + % \acrfullpl + \gcmdspa{acr\-fullpl}{% + \banned + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{displays the plural full form of an acronym. Only for use with + the base \sty{glossaries} package's acronym mechanism. This + command is not compatible with \gls{newabbreviation}} + } + % \Acrfull + \gcmdspa{Acr\-full}{% + \banned + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{as \gls{acrfull} but \idx{sentencecase}} + } + % \Acrfullpl + \gcmdspa{Acr\-full\-pl}{% + \banned + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{as \gls{acrfullpl} but \idx{sentencecase}} + } + % \ac + \gcmdspa{ac}% + {% + \syntax{\margm{options}\margm{entry-label}\margm{inset}} + \desc{a synonym for \gls{cgls} or \gls{gls} defined by the + \opteqvalref{shortcuts}{ac} or \opteqvalref{shortcuts}{acronyms} package + option, respectively} + } + % \Ac + \gcmdspa{Ac}% + {% + \syntax{\margm{options}\margm{entry-label}\margm{inset}} + \desc{a synonym for \gls{cGls} or \gls{Gls} defined by the + \opteqvalref{shortcuts}{ac} or \opteqvalref{shortcuts}{acronyms} package + option, respectively} + } + % \AC + \gcmdspa{AC}% + {% + \syntax{\margm{options}\margm{entry-label}\margm{inset}} + \desc{a synonym for \gls{cGLS} defined by the + \opteqvalref{shortcuts}{ac} package option} + } + % \acp + \gcmdspa{acp}% + {% + \syntax{\margm{options}\margm{entry-label}\margm{inset}} + \desc{a synonym for \gls{cglspl} or \gls{glspl} defined by the + \opteqvalref{shortcuts}{ac} or \opteqvalref{shortcuts}{acronyms} package + option, respectively} + } + % \Acp + \gcmdspa{Acp}% + {% + \syntax{\margm{options}\margm{entry-label}\margm{inset}} + \desc{a synonym for \gls{cGlspl} or \gls{glspl} defined by the + \opteqvalref{shortcuts}{ac} or \opteqvalref{shortcuts}{acronyms} package + option, respectively} + } + % \ACP + \gcmdspa{ACP}% + {% + \syntax{\margm{options}\margm{entry-label}\margm{inset}} + \desc{a synonym for \gls{cGLSpl} defined by the + \opteqvalref{shortcuts}{ac} package option} + } + % \acs + \gcmdspa{acs}% + {% + \syntax{\margm{options}\margm{entry-label}\margm{inset}} + \desc{a synonym for \gls{glsxtrshort} or \gls{acrshort} defined by the + \opteqvalref{shortcuts}{ac} or \opteqvalref{shortcuts}{acronyms} package + option, respectively} + } + % \Acs + \gcmdspa{Acs}% + {% + \syntax{\margm{options}\margm{entry-label}\margm{inset}} + \desc{a synonym for \gls{Glsxtrshort} or \gls{Acrshort} defined by the + \opteqvalref{shortcuts}{ac} or \opteqvalref{shortcuts}{acronyms} package + option, respectively} + } + \gcmdspa{ACS}% + {% + \syntax{\margm{options}\margm{entry-label}\margm{inset}} + \desc{a synonym for \gls{GLSxtrshort} defined by the + \opteqvalref{shortcuts}{ac} package option} + } + % \acsp + \gcmdspa{acsp}% + {% + \syntax{\margm{options}\margm{entry-label}\margm{inset}} + \desc{a synonym for \gls{glsxtrshortpl} or \gls{acrshortpl} defined by the + \opteqvalref{shortcuts}{ac} or \opteqvalref{shortcuts}{acronyms} package + option, respectively} + } + % \Acsp + \gcmdspa{Acsp}% + {% + \syntax{\margm{options}\margm{entry-label}\margm{inset}} + \desc{a synonym for \gls{Glsxtrshortpl} or \gls{Acrshortpl} defined by the + \opteqvalref{shortcuts}{ac} or \opteqvalref{shortcuts}{acronyms} package + option, respectively} + } + % \ACSP + \gcmdspa{ACSP}% + {% + \syntax{\margm{options}\margm{entry-label}\margm{inset}} + \desc{a synonym for \gls{GLSxtrshortpl} defined by the + \opteqvalref{shortcuts}{ac} package option} + } + % \acl + \gcmdspa{acl}% + {% + \syntax{\margm{options}\margm{entry-label}\margm{inset}} + \desc{a synonym for \gls{glsxtrlong} or \gls{acrlong} defined by the + \opteqvalref{shortcuts}{ac} or \opteqvalref{shortcuts}{acronyms} package + option, respectively} + } + % \aclp + \gcmdspa{aclp}% + {% + \syntax{\margm{options}\margm{entry-label}\margm{inset}} + \desc{a synonym for \gls{glsxtrlongpl} or \gls{acrlongpl} defined by the + \opteqvalref{shortcuts}{ac} or \opteqvalref{shortcuts}{acronyms} package + option, respectively} + } + % \Acl + \gcmdspa{Acl}% + {% + \syntax{\margm{options}\margm{entry-label}\margm{inset}} + \desc{a synonym for \gls{Glsxtrlong} or \gls{Acrlong} defined by the + \opteqvalref{shortcuts}{ac} or \opteqvalref{shortcuts}{acronyms} package + option, respectively} + } + % \ACL + \gcmdspa{ACL}% + {% + \syntax{\margm{options}\margm{entry-label}\margm{inset}} + \desc{a synonym for \gls{GLSxtrlong} defined by the + \opteqvalref{shortcuts}{ac} package option} + } + % \Aclp + \gcmdspa{Aclp}% + {% + \syntax{\margm{options}\margm{entry-label}\margm{inset}} + \desc{a synonym for \gls{Glsxtrlongpl} or \gls{Acrlongpl} defined by the + \opteqvalref{shortcuts}{ac} or \opteqvalref{shortcuts}{acronyms} package + option, respectively} + } + % \ACLP + \gcmdspa{ACLP}% + {% + \syntax{\margm{options}\margm{entry-label}\margm{inset}} + \desc{a synonym for \gls{GLSxtrlongpl} defined by the + \opteqvalref{shortcuts}{ac} package option} + } + % \acf + \gcmdspa{acf}% + {% + \syntax{\margm{options}\margm{entry-label}\margm{inset}} + \desc{a synonym for \gls{glsxtrfull} or \gls{acrfull} defined by the + \opteqvalref{shortcuts}{ac} or \opteqvalref{shortcuts}{acronyms} package + option, respectively} + } + % \acfp + \gcmdspa{acfp}% + {% + \syntax{\margm{options}\margm{entry-label}\margm{inset}} + \desc{a synonym for \gls{glsxtrfullpl} or \gls{acrfullpl} defined by the + \opteqvalref{shortcuts}{ac} or \opteqvalref{shortcuts}{acronyms} package + option, respectively} + } + % \Acf + \gcmdspa{Acf}% + {% + \syntax{\margm{options}\margm{entry-label}\margm{inset}} + \desc{a synonym for \gls{Glsxtrfull} or \gls{Acrfull} defined by the + \opteqvalref{shortcuts}{ac} or \opteqvalref{shortcuts}{acronyms} package + option, respectively} + } + % \ACF + \gcmdspa{ACF}% + {% + \syntax{\margm{options}\margm{entry-label}\margm{inset}} + \desc{a synonym for \gls{GLSxtrfull} defined by the + \opteqvalref{shortcuts}{ac} package option} + } + % \Acfp + \gcmdspa{Acfp}% + {% + \syntax{\margm{options}\margm{entry-label}\margm{inset}} + \desc{a synonym for \gls{Glsxtrfullpl} or \gls{Acrfullpl} defined by the + \opteqvalref{shortcuts}{ac} or \opteqvalref{shortcuts}{acronyms} package + option, respectively} + } + % \ACFP + \gcmdspa{ACFP}% + {% + \syntax{\margm{options}\margm{entry-label}\margm{inset}} + \desc{a synonym for \gls{GLSxtrfullpl} defined by the + \opteqvalref{shortcuts}{ac} package option} + } + % \ab + \gcmdspa{ab}% + {% + \syntax{\margm{options}\margm{entry-label}\margm{inset}} + \desc{a synonym for \gls{cgls} defined by the + \opteqvalref{shortcuts}{abbreviations} package option} + } + % \Ab + \gcmdspa{Ab}% + {% + \syntax{\margm{options}\margm{entry-label}\margm{inset}} + \desc{a synonym for \gls{cGls} defined by the + \opteqvalref{shortcuts}{abbreviations} package option} + } + % \AB + \gcmdspa{AB}% + {% + \syntax{\margm{options}\margm{entry-label}\margm{inset}} + \desc{a synonym for \gls{cGLS} defined by the + \opteqvalref{shortcuts}{abbreviations} package option} + } + % \abp + \gcmdspa{abp}% + {% + \syntax{\margm{options}\margm{entry-label}\margm{inset}} + \desc{a synonym for \gls{cglspl} defined by the + \opteqvalref{shortcuts}{abbreviations} package option} + } + % \Abp + \gcmdspa{Abp}% + {% + \syntax{\margm{options}\margm{entry-label}\margm{inset}} + \desc{a synonym for \gls{cGlspl} defined by the + \opteqvalref{shortcuts}{abbreviations} package option} + } + % \ABP + \gcmdspa{ABP}% + {% + \syntax{\margm{options}\margm{entry-label}\margm{inset}} + \desc{a synonym for \gls{cGLSpl} defined by the + \opteqvalref{shortcuts}{abbreviations} package option} + } + % \as + \gcmdspa{as}% + {% + \syntax{\margm{options}\margm{entry-label}\margm{inset}} + \desc{a synonym for \gls{glsxtrshort} defined by the + \opteqvalref{shortcuts}{abbreviations} package option} + } + % \As + \gcmdspa{As}% + {% + \syntax{\margm{options}\margm{entry-label}\margm{inset}} + \desc{a synonym for \gls{Glsxtrshort} defined by the + \opteqvalref{shortcuts}{abbreviations} package option} + } + % \AS + \gcmdspa{AS}% + {% + \syntax{\margm{options}\margm{entry-label}\margm{inset}} + \desc{a synonym for \gls{GLSxtrshort} defined by the + \opteqvalref{shortcuts}{abbreviations} package option} + } + % \asp + \gcmdspa{asp}% + {% + \syntax{\margm{options}\margm{entry-label}\margm{inset}} + \desc{a synonym for \gls{glsxtrshortpl} defined by the + \opteqvalref{shortcuts}{abbreviations} package option} + } + % \Asp + \gcmdspa{Asp}% + {% + \syntax{\margm{options}\margm{entry-label}\margm{inset}} + \desc{a synonym for \gls{Glsxtrshortpl} defined by the + \opteqvalref{shortcuts}{abbreviations} package option} + } + % \ASP + \gcmdspa{ASP}% + {% + \syntax{\margm{options}\margm{entry-label}\margm{inset}} + \desc{a synonym for \gls{GLSxtrshortpl} defined by the + \opteqvalref{shortcuts}{abbreviations} package option} + } + % \al + \gcmdspa{al}% + {% + \syntax{\margm{options}\margm{entry-label}\margm{inset}} + \desc{a synonym for \gls{glsxtrlong} defined by the + \opteqvalref{shortcuts}{abbreviations} package option} + } + % \Al + \gcmdspa{Al}% + {% + \syntax{\margm{options}\margm{entry-label}\margm{inset}} + \desc{a synonym for \gls{Glsxtrlong} defined by the + \opteqvalref{shortcuts}{abbreviations} package option} + } + % \AL + \gcmdspa{AL}% + {% + \syntax{\margm{options}\margm{entry-label}\margm{inset}} + \desc{a synonym for \gls{GLSxtrlong} defined by the + \opteqvalref{shortcuts}{abbreviations} package option} + } + % \alp + \gcmdspa{alp}% + {% + \syntax{\margm{options}\margm{entry-label}\margm{inset}} + \desc{a synonym for \gls{glsxtrlongpl} defined by the + \opteqvalref{shortcuts}{abbreviations} package option} + } + % \Alp + \gcmdspa{Alp}% + {% + \syntax{\margm{options}\margm{entry-label}\margm{inset}} + \desc{a synonym for \gls{Glsxtrlongpl} defined by the + \opteqvalref{shortcuts}{abbreviations} package option} + } + % \ALP + \gcmdspa{ALP}% + {% + \syntax{\margm{options}\margm{entry-label}\margm{inset}} + \desc{a synonym for \gls{GLSxtrlongpl} defined by the + \opteqvalref{shortcuts}{abbreviations} package option} + } + % \af + \gcmdspa{af}% + {% + \syntax{\margm{options}\margm{entry-label}\margm{inset}} + \desc{a synonym for \gls{glsxtrfull} defined by the + \opteqvalref{shortcuts}{abbreviations} package option} + } + % \Af + \gcmdspa{Af}% + {% + \syntax{\margm{options}\margm{entry-label}\margm{inset}} + \desc{a synonym for \gls{Glsxtrfull} defined by the + \opteqvalref{shortcuts}{abbreviations} package option} + } + % \AF + \gcmdspa{AF}% + {% + \syntax{\margm{options}\margm{entry-label}\margm{inset}} + \desc{a synonym for \gls{Glsxtrfull} defined by the + \opteqvalref{shortcuts}{abbreviations} package option} + } + % \afp + \gcmdspa{afp}% + {% + \syntax{\margm{options}\margm{entry-label}\margm{inset}} + \desc{a synonym for \gls{glsxtrfullpl} defined by the + \opteqvalref{shortcuts}{abbreviations} package option} + } + % \Afp + \gcmdspa{Afp}% + {% + \syntax{\margm{options}\margm{entry-label}\margm{inset}} + \desc{a synonym for \gls{Glsxtrfullpl} defined by the + \opteqvalref{shortcuts}{abbreviations} package option} + } + % \AFP + \gcmdspa{AFP}% + {% + \syntax{\margm{options}\margm{entry-label}\margm{inset}} + \desc{a synonym for \gls{GLSxtrfullpl} defined by the + \opteqvalref{shortcuts}{abbreviations} package option} + } + % \glsentrytype + \gcmd{gls\-entry\-type} + {% + \providedby{\sty{glossaries}} + \syntax{\margm{entry-label}} + \desc{simply expands to the value of the \gloskey{type} key. + Does nothing if the entry hasn't been defined} + } + % \glsentryname + \gcmd{gls\-entry\-name} + {% + \providedby{\sty{glossaries}} + \syntax{\margm{entry-label}} + \desc{simply expands to the value of the \gloskey{name} key. + Does nothing if the entry hasn't been defined. May be used in + expandable contexts provided that the \gloskey{name} key doesn't + contain any fragile commands} + } + % \Glsentryname + \gcmd{Gls\-entry\-name} + {% + \providedby{\sty{glossaries}} + \syntax{\margm{entry-label}} + \desc{partially robust command that displays the value of the + \gloskey{name} \idx{field} with \idx{sentencecase} applied. + As from \sty{glossaries} v4.50, this command + can expand in PDF bookmarks. Outside of PDF bookmarks it will + expand to a robust internal command} + } + % \glsentryparent + \gcmd{gls\-entry\-parent} + {% + \providedby{\sty{glossaries}} + \syntax{\margm{entry-label}} + \desc{expands to the value of the \gloskey{parent} \idx{field}. + Expands to nothing if the \gloskey{parent} \idx{field} hasn't been set + and expands to \gls{relax} if the entry hasn't been defined} + } + % \glsentrytext + \gcmd{gls\-entry\-text} + {% + \providedby{\sty{glossaries}} + \syntax{\margm{entry-label}} + \desc{simply expands to the value of the \gloskey{text} \idx{field}. + Does nothing if the entry hasn't been defined. May be used in + expandable contexts provided that the \gloskey{text} \idx{field} doesn't + contain any fragile commands} + } + % \Glsentrytext + \gcmd{Gls\-entry\-text} + {% + \providedby{\sty{glossaries}} + \syntax{\margm{entry-label}} + \desc{partially robust command that displays the value of the + \gloskey{text} \idx{field} with \idx{sentencecase} applied. + As from \sty{glossaries} v4.50, this command + can expand in PDF bookmarks. Outside of PDF bookmarks it will + expand to a robust internal command} + } + % \glsentryplural + \gcmd{gls\-entry\-plural} + {% + \providedby{\sty{glossaries}} + \syntax{\margm{entry-label}} + \desc{simply expands to the value of the \gloskey{plural} \idx{field}. + Does nothing if the entry hasn't been defined. May be used in + expandable contexts provided that the \gloskey{plural} \idx{field} doesn't + contain any fragile commands} + } + % \Glsentryplural + \gcmd{Gls\-entry\-plural} + {% + \providedby{\sty{glossaries}} + \syntax{\margm{entry-label}} + \desc{partially robust command that displays the value of the + \gloskey{plural} \idx{field} with \idx{sentencecase} applied. + As from \sty{glossaries} v4.50, this command + can expand in PDF bookmarks. Outside of PDF bookmarks it will + expand to a robust internal command} + } + % \glsentryfirst + \gcmd{gls\-entry\-first} + {% + \providedby{\sty{glossaries}} + \syntax{\margm{entry-label}} + \desc{simply expands to the value of the \gloskey{first} \idx{field}. + Does nothing if the entry hasn't been defined. May be used in + expandable contexts provided that the \gloskey{first} \idx{field} doesn't + contain any fragile commands} + } + % \Glsentryfirst + \gcmd{Gls\-entry\-first} + {% + \providedby{\sty{glossaries}} + \syntax{\margm{entry-label}} + \desc{partially robust command that displays the value of the + \gloskey{first} \idx{field} with the first letter converted to + \idx{uppercase}. As from \sty{glossaries} v4.50, this command + can expand in PDF bookmarks. Outside of PDF bookmarks it will + expand to a robust internal command} + } + % \glsentryfirstplural + \gcmd{gls\-entry\-first\-plural} + {% + \providedby{\sty{glossaries}} + \syntax{\margm{entry-label}} + \desc{simply expands to the value of the \gloskey{firstplural} \idx{field}. + Does nothing if the entry hasn't been defined. May be used in + expandable contexts provided that the \gloskey{firstplural} \idx{field} doesn't + contain any fragile commands} + } + % \Glsentryfirstplural + \gcmd{Gls\-entry\-first\-plural} + {% + \providedby{\sty{glossaries}} + \syntax{\margm{entry-label}} + \desc{partially robust command that displays the value of the + \gloskey{firstplural} \idx{field} with \idx{sentencecase} + applied. As from \sty{glossaries} v4.50, this command + can expand in PDF bookmarks. Outside of PDF bookmarks it will + expand to a robust internal command} + } + % \glsentrydesc + \gcmd{gls\-entry\-desc} + {% + \providedby{\sty{glossaries}} + \syntax{\margm{entry-label}} + \desc{simply expands to the value of the \gloskey{description} \idx{field}. + Does nothing if the entry hasn't been defined. May be used in + expandable contexts provided that the \gloskey{description} \idx{field} doesn't + contain any fragile commands} + } + % \Glsentrydesc + \gcmd{Gls\-entry\-desc} + {% + \providedby{\sty{glossaries}} + \syntax{\margm{entry-label}} + \desc{partially robust command that displays the value of the + \gloskey{description} \idx{field} with \idx{sentencecase} + applied. As from \sty{glossaries} v4.50, this command + can expand in PDF bookmarks. Outside of PDF bookmarks it will + expand to a robust internal command} + } + % \glsentrydescplural + \gcmd{gls\-entry\-desc\-plural} + {% + \providedby{\sty{glossaries}} + \syntax{\margm{entry-label}} + \desc{simply expands to the value of the \gloskey{descriptionplural} + \idx{field}. Does nothing if the entry hasn't been defined. + May be used in expandable contexts provided that the + \gloskey{descriptionplural} \idx{field} doesn't contain any fragile commands} + } + % \glsentryshort + \gcmd{gls\-entry\-short} + {% + \providedby{\sty{glossaries} v3.0+} + \syntax{\margm{entry-label}} + \desc{simply expands to the value of the \gloskey{short} \idx{field}. + Does nothing if the entry hasn't been defined. May be used in + expandable contexts provided that the \gloskey{short} \idx{field} doesn't + contain any fragile commands} + } + % \glsentryshortpl + \gcmd{gls\-entry\-short\-pl} + {% + \providedby{\sty{glossaries} v3.0+} + \syntax{\margm{entry-label}} + \desc{simply expands to the value of the \gloskey{shortplural} \idx{field}. + Does nothing if the entry hasn't been defined. May be used in + expandable contexts provided that the \gloskey{shortplural} \idx{field} doesn't + contain any fragile commands} + } + % \glsentrylong + \gcmd{gls\-entry\-long} + {% + \providedby{\sty{glossaries} v3.0+} + \syntax{\margm{entry-label}} + \desc{simply expands to the value of the \gloskey{long} \idx{field}. + Does nothing if the entry hasn't been defined. May be used in + expandable contexts provided that the \gloskey{long} \idx{field} doesn't + contain any fragile commands} + } + % \glsentrylongpl + \gcmd{gls\-entry\-long\-pl} + {% + \providedby{\sty{glossaries} v3.0+} + \syntax{\margm{entry-label}} + \desc{simply expands to the value of the \gloskey{longplural} \idx{field}. + Does nothing if the entry hasn't been defined. May be used in + expandable contexts provided that the \gloskey{longplural} \idx{field} doesn't + contain any fragile commands} + } + % \Glsentryshort + \gcmd{Gls\-entry\-short} + {% + \providedby{\sty{glossaries} v3.0+} + \syntax{\margm{entry-label}} + \desc{displays the value of the \gloskey{short} \idx{field} with + \idx{sentencecase} applied. + Does nothing if the entry hasn't been defined. + As from \sty{glossaries} v4.50, this command + can expand in PDF bookmarks. Outside of PDF bookmarks it will + expand to a robust internal command} + } + % \Glsentrylong + \gcmd{Gls\-entry\-long} + {% + \providedby{\sty{glossaries} v3.0+} + \syntax{\margm{entry-label}} + \desc{displays the value of the \gloskey{long} \idx{field} with + \idx{sentencecase} applied. + Does nothing if the entry hasn't been defined. + As from \sty{glossaries} v4.50, this command + can expand in PDF bookmarks. Outside of PDF bookmarks it will + expand to a robust internal command} + } + % \Glsentryshortpl + \gcmd{Gls\-entry\-short\-pl} + {% + \providedby{\sty{glossaries} v3.0+} + \syntax{\margm{entry-label}} + \desc{displays the value of the \gloskey{shortplural} \idx{field} with + \idx{sentencecase} applied. + Does nothing if the entry hasn't been defined. As from \sty{glossaries} v4.50, this command + can expand in PDF bookmarks. Outside of PDF bookmarks it will + expand to a robust internal command} + } + % \Glsentrylong + \gcmd{Gls\-entry\-long\-pl} + {% + \providedby{\sty{glossaries} v3.0+} + \syntax{\margm{entry-label}} + \desc{displays the value of the \gloskey{longplural} \idx{field} with + \idx{sentencecase} applied. + Does nothing if the entry hasn't been defined. As from \sty{glossaries} v4.50, this command + can expand in PDF bookmarks. Outside of PDF bookmarks it will + expand to a robust internal command} + } + % \glsentrysymbol + \gcmd{gls\-entry\-symbol} + {% + \providedby{\sty{glossaries}} + \syntax{\margm{entry-label}} + \desc{simply expands to the value of the \gloskey{symbol} \idx{field}. + Does nothing if the entry hasn't been defined. May be used in + expandable contexts provided that the \gloskey{symbol} \idx{field} doesn't + contain any fragile commands} + } + % \Glsentrysymbol + \gcmd{Gls\-entry\-symbol} + {% + \providedby{\sty{glossaries}} + \syntax{\margm{entry-label}} + \desc{partially robust command that displays the value of the + \gloskey{symbol} \idx{field} with \idx{sentencecase} applied. + As from \sty{glossaries} v4.50, this command + can expand in PDF bookmarks. Outside of PDF bookmarks it will + expand to a robust internal command} + } + % \glsentrysymbolplural + \gcmd{gls\-entry\-symbol\-plural} + {% + \providedby{\sty{glossaries}} + \syntax{\margm{entry-label}} + \desc{simply expands to the value of the \gloskey{symbolplural} \idx{field}. + Does nothing if the entry hasn't been defined. May be used in + expandable contexts provided that the \gloskey{symbolplural} \idx{field} doesn't + contain any fragile commands} + } + % \glsentryuseri + \gcmd{gls\-entry\-useri} + {% + \providedby{\sty{glossaries} v2.04+} + \syntax{\margm{entry-label}} + \desc{simply expands to the value of the \gloskey{user1} \idx{field}. + Does nothing if the entry hasn't been defined. May be used in + expandable contexts provided that the \gloskey{user1} \idx{field} doesn't + contain any fragile commands} + } + % \Glsentryuseri + \gcmd{Gls\-entry\-useri} + {% + \providedby{\sty{glossaries} v2.04+} + \syntax{\margm{entry-label}} + \desc{partially robust command that displays the value of the + \gloskey{user1} \idx{field} with \idx{sentencecase} applied. + As from \sty{glossaries} v4.50, this command + can expand in PDF bookmarks. Outside of PDF bookmarks it will + expand to a robust internal command} + } + % \glsentryuserii + \gcmd{gls\-entry\-user\-ii} + {% + \providedby{\sty{glossaries} v2.04+} + \syntax{\margm{entry-label}} + \desc{simply expands to the value of the \gloskey{user2} \idx{field}. + Does nothing if the entry hasn't been defined. May be used in + expandable contexts provided that the \gloskey{user2} \idx{field} doesn't + contain any fragile commands} + } + % \Glsentryuserii + \gcmd{Gls\-entry\-user\-ii} + {% + \providedby{\sty{glossaries} v2.04+} + \syntax{\margm{entry-label}} + \desc{partially robust command that displays the value of the + \gloskey{user2} \idx{field} with \idx{sentencecase} applied. + As from \sty{glossaries} v4.50, this command + can expand in PDF bookmarks. Outside of PDF bookmarks it will + expand to a robust internal command} + } + % \glsentryuseriii + \gcmd{gls\-entry\-user\-iii} + {% + \providedby{\sty{glossaries} v2.04+} + \syntax{\margm{entry-label}} + \desc{simply expands to the value of the \gloskey{user3} \idx{field}. + Does nothing if the entry hasn't been defined. May be used in + expandable contexts provided that the \gloskey{user3} \idx{field} doesn't + contain any fragile commands} + } + % \Glsentryuseriii + \gcmd{Gls\-entry\-user\-iii} + {% + \providedby{\sty{glossaries} v2.04+} + \syntax{\margm{entry-label}} + \desc{partially robust command that displays the value of the + \gloskey{user3} \idx{field} with \idx{sentencecase} applied. + As from \sty{glossaries} v4.50, this command + can expand in PDF bookmarks. Outside of PDF bookmarks it will + expand to a robust internal command} + } + % \glsentryuseriv + \gcmd{gls\-entry\-user\-iv} + {% + \providedby{\sty{glossaries} v2.04+} + \syntax{\margm{entry-label}} + \desc{simply expands to the value of the \gloskey{user4} \idx{field}. + Does nothing if the entry hasn't been defined. May be used in + expandable contexts provided that the \gloskey{user4} \idx{field} doesn't + contain any fragile commands} + } + % \Glsentryuseriv + \gcmd{Gls\-entry\-user\-iv} + {% + \providedby{\sty{glossaries} v2.04+} + \syntax{\margm{entry-label}} + \desc{partially robust command that displays the value of the + \gloskey{user4} \idx{field} with \idx{sentencecase} applied. + As from \sty{glossaries} v4.50, this command + can expand in PDF bookmarks. Outside of PDF bookmarks it will + expand to a robust internal command} + } + % \glsentryuserv + \gcmd{gls\-entry\-user\-v} + {% + \providedby{\sty{glossaries} v2.04+} + \syntax{\margm{entry-label}} + \desc{simply expands to the value of the \gloskey{user5} \idx{field}. + Does nothing if the entry hasn't been defined. May be used in + expandable contexts provided that the \gloskey{user5} \idx{field} doesn't + contain any fragile commands} + } + % \Glsentryuserv + \gcmd{Gls\-entry\-user\-v} + {% + \providedby{\sty{glossaries} v2.04+} + \syntax{\margm{entry-label}} + \desc{partially robust command that displays the value of the + \gloskey{user5} \idx{field} with \idx{sentencecase} applied. + As from \sty{glossaries} v4.50, this command + can expand in PDF bookmarks. Outside of PDF bookmarks it will + expand to a robust internal command} + } + % \glsentryuservi + \gcmd{gls\-entry\-user\-vi} + {% + \providedby{\sty{glossaries} v2.04+} + \syntax{\margm{entry-label}} + \desc{simply expands to the value of the \gloskey{user6} \idx{field}. + Does nothing if the entry hasn't been defined. May be used in + expandable contexts provided that the \gloskey{user6} \idx{field} doesn't + contain any fragile commands} + } + % \Glsentryuservi + \gcmd{Gls\-entry\-user\-vi} + {% + \providedby{\sty{glossaries} v2.04+} + \syntax{\margm{entry-label}} + \desc{partially robust command that displays the value of the + \gloskey{user6} \idx{field} with \idx{sentencecase} applied. + As from \sty{glossaries} v4.50, this command + can expand in PDF bookmarks. Outside of PDF bookmarks it will + expand to a robust internal command} + } + % \glsxtrhiername + \gcmd{gls\-xtr\-hier\-name} + { + \providedby{\sty{glossaries-extra} v1.37+} + \syntax{\margm{entry-label}} + \desc{displays the entry's hierarchical name} + } + % \Glsxtrhiername + \gcmd{Gls\-xtr\-hier\-name} + { + \providedby{\sty{glossaries-extra} v1.37+} + \syntax{\margm{entry-label}} + \desc{displays the entry's hierarchical name using + \idx{sentencecase}} + } + % \GlsXtrhiername + \gcmd{Gls\-Xtr\-hier\-name} + { + \providedby{\sty{glossaries-extra} v1.37+} + \syntax{\margm{entry-label}} + \desc{displays the entry's hierarchical name where each element + name has its first character converted to \idx{uppercase}} + } + % \GLSxtrhiername + \gcmd{GLS\-xtr\-hier\-name} + { + \providedby{\sty{glossaries-extra} v1.37+} + \syntax{\margm{entry-label}} + \desc{displays the entry's hierarchical name where the first + name is converted to \idx{uppercase}} + } + % \GLSXTRhiername + \gcmd{GLS\-XTR\-hier\-name} + { + \providedby{\sty{glossaries-extra} v1.37+} + \syntax{\margm{entry-label}} + \desc{displays the entry's hierarchical name where each + name is converted to \idx{uppercase}} + } + % \glsxtrhiernamesep + \gcmd{gls\-xtr\-hier\-name\-sep} + { + \providedby{\sty{glossaries-extra} v1.37+} + \desc{separator used by commands like \gls{glsxtrhiername}} + } + % \GlsXtrForeignText + \gcmd{Gls\-Xtr\-Foreign\-Text} + {% + \providedby{\sty{glossaries-extra} v1.32+} + \syntax{\margm{entry-label}\margm{text}} + \desc{If the entry given by \meta{entry-label} has the field identified by + \gls{GlsXtrForeignTextField} then \meta{text} will be + encapsulated according to the language tag stored in that + field (using \sty{tracklang}['s] interface)} + } + % \GlsXtrForeignTextField + \gcmd{Gls\-Xtr\-Foreign\-Text\-Field} + {% + \providedby{\sty{glossaries-extra} v1.32+} + \desc{expands to the \idx{internalfieldlabel} used by + \gls{GlsXtrForeignText}} + } + % \glsxtrfmt + \gcmd{gls\-xtr\-fmt}{% + \providedby{\sty{glossaries-extra} v1.12+} + \syntax{\oargm{options}\margm{entry-label}\margm{text}} + \desc{behaves like +\code{\gls{glslink}\oargm{options}\margm{entry-label}\marg{\cmd{\meta{csname}}\margm{text}\meta{insert}}} + where the control sequence name \meta{csname} is obtained from the + field given by \gls{GlsXtrFmtField}. The actual format of the + \idx{linktext} is governed by \gls{glsxtrfmtdisplay}} + } + % \glsxtrfmt* + \gcmd{gls\-xtr\-fmt*}{% + \providedby{\sty{glossaries-extra} v1.23+} + \syntax{\oargm{options}\margm{entry-label}\margm{text}\oargm{insert}} + \desc{as the unstarred version \gls{glsxtrfmt} but accepts the +final \meta{insert} option} + } + % \Glsxtrfmt + \gcmd{Gls\-xtr\-fmt}{% + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\oargm{options}\margm{entry-label}\margm{text}} + \desc{as \gls{glsxtrfmt} but applies a \idx{sentencecase} change + to \meta{text}} + } + % \Glsxtrfmt* + \gcmd{Gls\-xtr\-fmt*}{% + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\oargm{options}\margm{entry-label}\margm{text}\oargm{insert}} + \desc{as \gls{glsxtrfmt*} but applies a \idx{sentencecase} change + to \meta{text}} + } + % \glsxtrfmtdisplay + \gcmd{gls\-xtr\-fmt\-display}{% + \providedby{\sty{glossaries-extra} v1.23+} + \syntax{\margm{csname}\margm{text}\margm{insert}} + \desc{formats the \idx{linktext} used in \gls{glsxtrfmt}} + } + % \GlsXtrFmtDefaultOptions + \gcmd{Gls\-Xtr\-Fmt\-Default\-Options} + {% + \providedby{\sty{glossaries-extra} v1.12+} + \initval{noindex} + \desc{expands to the default options for \gls{glsxtrfmt}} + } + % \GlsXtrFmtField + \gcmd{Gls\-Xtr\-Fmt\-Field}{% + \providedby{\sty{glossaries-extra} v1.12+} + \initval{useri} + \desc{expands to the name of the \idxc{internalfieldlabel} used by \gls{glsxtrfmt}} + } + % \glsxtrentryfmt + \gcmd{gls\-xtr\-entry\-fmt}{% + \providedby{\sty{glossaries-extra} v1.12+} + \syntax{\margm{entry-label}\margm{text}} + \desc{does \code{\cmd{\meta{csname}}\margm{text}} + where the control sequence name \meta{csname} is obtained from the + field given by \gls{GlsXtrFmtField}. If \sty{hyperref} has been loaded and + this command will expand to \gls{glsxtrpdfentryfmt}\margm{entry-label}\margm{text} + in a PDF bookmark} + } + % \Glsxtrentryfmt + \gcmd{Gls\-xtr\-entry\-fmt}{% + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{entry-label}\margm{text}} + \desc{as \gls{glsxtrentryfmt} but converts \meta{text} to + \idx{sentencecase}} + } + % \glsxtrpdfentryfmt + \gcmd{gls\-xtr\-pdf\-entry\-fmt}{% + \providedby{\sty{glossaries-extra} v1.42+} + \syntax{\margm{entry-label}\margm{text}} + \desc{just does \meta{text}} + } + % \Glsxtrpdfentryfmt + \gcmd{Gls\-xtr\-pdf\-entry\-fmt}{% + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{entry-label}\margm{text}} + \desc{does \code{\gls{MFUsentencecase}\margm{text}}} + } + % \setupglslink + \gcmd{setup\-gls\-link}% + {% + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{options}} + \desc{set the default \idxpl{glsopt}} + \field{seealso}{setupglsadd} + } + % \setupglsadd + \gcmd{setup\-gls\-add}% + {% + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{options}} + \desc{set the default options for \gls{glsadd}} + \field{seealso}{setupglslink} + } + % all \gls... options + \gidx{glsopt}{\name{{}\csfmt{gls}-like and {}\csfmt{glstext}-like options}% + \common + \field{text}{\csfmt{glslink} option}% + \desc{most (but not all) of these options can be used in the optional argument + of all the \idx{glslike}, \idx{glstextlike} and \gls{glsadd} commands} + } + % format + \gglsopt{format}% + {% + \common + \providedby{\sty{glossaries}} + \syntax{\meta{cs-name}} + \desc{the control sequence name (without the leading backslash) + that should be used to \idxc{locationencap}{encapsulate} the \idx{entrylocation}}% + }% + % counter + \gglsopt{counter}% + {% + \providedby{\sty{glossaries}} + \syntax{\meta{counter-name}} + \desc{the \idx{locationcounter}}% + }% + % local + \gglsopt{local}% + {% + \providedby{\sty{glossaries} v3.04+} + \syntax{\meta{boolean}} + \initval{false} + \defval{true} + \desc{if true use \gls{glslocalunset} to unset the + \idx{firstuseflag}, otherwise use \gls{glsunset} (only applies + to \idx{glslike} commands)}% + }% + % postunset + \gglsopt{post\-unset}% + {% + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\meta{value}} + \initval{global} + \defval{global} + \desc{determines whether or not to unset the \idx{firstuseflag} + after the \idx{linktext}. The value may be one of: + \code{global}, \code{local} or \code{none} + (only applies to \idx{glslike} commands)}% + }% + % prefix + \gglsopt{prefix}% + {% + \providedby{\sty{glossaries-extra} v1.31+} + \syntax{\meta{link-prefix}} + \desc{the prefix to use for the entry's hyperlink target}% + }% + % textformat + \gglsopt{text\-format}% + {% + \providedby{\sty{glossaries-extra} v1.30+} + \syntax{\meta{csname}} + \desc{the name of the control sequence to use instead of \gls{glstextformat} +to encapsulate the \idx{linktext}}% + }% + % innertextformat + \gglsopt{inner\-text\-format}% + {% + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\meta{csname}} + \initval{glsxtrdefaultentrytextfmt}% + \desc{the name of the control sequence to use for the \idx{innerformatting}}% + }% + % hyperoutside + \gglsopt{hyper\-outside}% + {% + \providedby{\sty{glossaries-extra} v1.21+} + \initval{true} + \defval{true} + \syntax{\meta{boolean}} + \desc{determines whether the hyperlink should be inside or outside of \gls{glstextformat}}% + }% + % wrgloss + \gglsopt{wr\-gloss}% + {% + \providedby{\sty{glossaries-extra} v1.14+} + \initval{before} + \syntax{\meta{position}} + \desc{determines whether to do the \idx{indexing} before or after the +\idx{linktext}. Allowed values: \optfmt{before} and \optfmt{after}}% + }% + % noindex + \gglsopt{no\-index}% + {% + \providedby{\sty{glossaries-extra}} + \initval{false} + \defval{true} + \syntax{\meta{boolean}} + \desc{if \optfmt{true} this option will suppress \idx{indexing}. + If you are using \app{bib2gls}, you may want to consider using + \glsoptval{format}{glsignore} to prevent a \location\ but + ensure that the entry is selected}% + }% + % hyper + \gglsopt{hyper}% + {% + \providedby{\sty{glossaries}} + \initval{true} + \defval{true} + \syntax{\meta{boolean}} + \desc{determines whether or not the \idx{linktext} should have a + hyperlink (provided hyperlinks are supported)}% + }% + % thevalue + \gglsopt{the\-value}% + {% + \providedby{\sty{glossaries-extra} v1.19+} + \syntax{\meta{location}} + \desc{set the \location\ to this value instead of obtaining it from the + \idx{locationcounter}}% + }% + % theHvalue + \gglsopt{the\-H\-value}% + {% + \providedby{\sty{glossaries-extra} v1.19+} + \syntax{\meta{the-H-value}} + \desc{set the hyper \location\ to this value instead of obtaining it +from \gls{theHcounter}}% + }% + % types + \gglsopt{types}% + { + \providedby{\sty{glossaries}} + \syntax{\margm{glossary list}} + \desc{only available with \gls{glsaddall}, the value is the + list of glossaries to iterate over} + } + % prereset + \gglsopt{pre\-reset}% + {% + \providedby{\sty{glossaries-extra} v1.49+} + \initval{none} + \defval{local} + \syntax{\meta{value}} + \desc{determines whether or not to reset the entry before the + \idx{linktext}. Allowed values: \optfmt{none} (no reset), + \optfmt{local} (localise the reset) and \optfmt{global}}% + }% + % preunset + \gglsopt{pre\-unset}% + {% + \providedby{\sty{glossaries-extra} v1.49+} + \initval{none} + \defval{local} + \syntax{\meta{value}} + \desc{determines whether or not to unset the entry before the + \idx{linktext}. Allowed values: \optfmt{none} (no unset), + \optfmt{local} (localise the unset) and \optfmt{global}}% + }% + % \glolinkprefix + \gcmd{glo\-link\-prefix} + { + \providedby{\sty{glossaries}} + \initval{glo:} + \desc{expands to the default prefix for the entry's hypertarget anchor + in the glossary} + } + % \glstextformat + \gcmd{gls\-text\-format} + { + \providedby{\sty{glossaries} v1.04+} + \syntax{\margm{text}} + \desc{the default outer text formatting command used by the + \idx{glslike} and \idx{glstextlike} commands} + } + % \glsrefentry + \gcmd{gls\-ref\-entry} + {% + \providedby{\sty{glossaries} v3.0+} + \syntax{\margm{entry-label}} + \desc{references (using \gls{ref}) the entry counter or sub-counter (if + \opt{entrycounter} or \opt{subentrycounter} options are set) + otherwise just does \gls{gls}\margm{entry-label}} + } + % \glsxtrpageref + \gcmd{gls\-xtr\-page\-ref} + {% + \providedby{\sty{glossaries-extra} v1.11+} + \syntax{\margm{entry-label}} + \desc{as \gls{glsrefentry} but uses \gls{pageref} instead of + \gls{ref}. As with \gls{glsrefentry}, this will use \gls{gls} + instead if the corresponding entry counter is disabled} + } + % \glsxtrp + \gcmd{gls\-xtrp} + { + \providedby{\sty{glossaries-extra} v1.07+} + \syntax{\margm{field}\margm{entry-label}} + \desc{for use in headings and captions (instead of the + \gls{glslike} or \gls{glstextlike} commands). This command is + designed to expand to the field value if used in a PDF + bookmark and can also expand to a more appropriate command if + it ends up in the page header. Note that there's no option + argument. Options should be set beforehand using + \gls{glsxtrsetpopts}, which is done automatically in the + glossary with \gls{glossxtrsetpopts}} + } + % \Glsxtrp + \gcmd{Gls\-xtrp} + { + \providedby{\sty{glossaries-extra} v1.07+} + \syntax{\margm{field}\margm{entry-label}} + \desc{as \gls{glsxtrp} but converts the first letter to + uppercase (but not in the PDF bookmark)} + } + % \GLSxtrp + \gcmd{GLS\-xtrp} + { + \providedby{\sty{glossaries-extra} v1.07+} + \syntax{\margm{field}\margm{entry-label}} + \desc{as \gls{glsxtrp} but converts to + uppercase (but not in the PDF bookmark)} + } + % \glsps + \gcmd{gls\-ps} + { + \providedby{\sty{glossaries-extra} v1.07+} + \syntax{\margm{entry-label}} + \desc{shortcut for \code{\gls{glsxtrp}\marg{short}\margm{entry-label}}} + } + % \glspt + \gcmd{gls\-pt} + {% + \providedby{\sty{glossaries-extra} v1.07+} + \syntax{\margm{entry-label}} + \desc{shortcut for \code{\gls{glsxtrp}\marg{text}\margm{entry-label}}} + } + % \glsxtrsetpopts + \gcmd{gls\-xtr\-set\-p\-opts} + {% + \providedby{\sty{glossaries-extra} v1.07+} + \syntax{\margm{options}} + \desc{sets the options that \gls{glsxtrp} (and case-change + variants) pass to the relevant \gls{glstextlike} command} + } + % \glossxtrsetpopts + \gcmd{gloss\-xtr\-set\-p\-opts} + { + \providedby{\sty{glossaries-extra} v1.07+} + \desc{used at the start of each glossary to set the current + options for the \gls{glsxtrp} set of commands (with + \gls{glsxtrsetpopts})} + } + % \glsxtridentifyglslike + \gcmd{gls\-xtr\-identify\-gls\-like} + { + \providedby{\sty{glossaries-extra} v1.37+} + \syntax{\margm{label-prefix}\margm{cs}} + \desc{used to inform \app{bib2gls} to include the given command + when it searches for dependencies} + } + % \glsxtraddlabelprefix + \gcmd{gls\-xtr\-add\-label\-prefix} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.37+} + \syntax{\margm{label-prefix}} + \desc{appends \meta{label-prefix} to the list of known labels} + } + % \glsxtrprependlabelprefix + \gcmd{gls\-xtr\-prepend\-label\-prefix} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.37+} + \syntax{\margm{label-prefix}} + \desc{prepends \meta{label-prefix} to the list of known labels} + } + % \glsxtrclearlabelprefixes + \gcmd{gls\-xtr\-clear\-label\-prefixes} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.37+} + \desc{clears the list of known prefixes} + \field{seealso}{glsxtraddlabelprefix,glsxtrprependlabelprefix} + } + % \glsxtrifinlabelprefixlist + \gcmd{glsxtrifinlabelprefixlist} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.37+} + \syntax{\margm{label-prefix}\margm{true}\margm{false}} + \desc{does \meta{true} if \meta{label-prefix} has been + identified as a label prefix} + \field{seealso}{glsxtraddlabelprefix,glsxtrprependlabelprefix} + } + % \ifGlsXtrPrefixLabelFallbackLast + \gcond{if\-Gls\-Xtr\-Prefix\-Label\-Fallback\-Last} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.49+} + \initvalcs{iftrue} + \desc{conditional that determines whether or not to use the + last label prefix as the default} + } + % \GlsXtrPrefixLabelFallbackLasttrue + \gcmd{Gls\-Xtr\-Prefix\-Label\-Fallback\-Last\-true} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.49+} + \desc{sets the \gls{ifGlsXtrPrefixLabelFallbackLast} conditional to true} + } + % \GlsXtrPrefixLabelFallbackLastfalse + \gcmd{Gls\-Xtr\-Prefix\-Label\-Fallback\-Last\-false} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.49+} + \desc{sets the \gls{ifGlsXtrPrefixLabelFallbackLast} conditional to false} + } + % \dgls + \gcmdspa{dgls}{% + \providedby{\sty{glossaries-extra-bib2gls} v1.37+} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{does \code{\gls{gls}\oargm{options}\marg{\meta{prefix}\marg{entry-label}}\oargm{insert}} + for the first prefix in the prefix list that matches a defined entry} + \field{seealso}{glsxtraddlabelprefix,glsxtrprependlabelprefix} + } + % \dGls + \gcmdspa{dGls}{% + \providedby{\sty{glossaries-extra-bib2gls} v1.37+} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{as \gls{dgls} but uses \gls{Gls}} + \field{seealso}{glsxtraddlabelprefix,glsxtrprependlabelprefix} + } + % \dGLS + \gcmdspa{dGLS}{% + \providedby{\sty{glossaries-extra-bib2gls} v1.37+} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{as \gls{dgls} but uses \gls{GLS}} + \field{seealso}{glsxtraddlabelprefix,glsxtrprependlabelprefix} + } + % \dglspl + \gcmdspa{dgls\-pl}{% + \providedby{\sty{glossaries-extra-bib2gls} v1.37+} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{as \gls{dgls} but uses \gls{glspl}} + \field{seealso}{glsxtraddlabelprefix,glsxtrprependlabelprefix} + } + % \dGlspl + \gcmdspa{dGls\-pl}{% + \providedby{\sty{glossaries-extra-bib2gls} v1.37+} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{as \gls{dgls} but uses \gls{Glspl}} + \field{seealso}{glsxtraddlabelprefix,glsxtrprependlabelprefix} + } + % \dGLSpl + \gcmdspa{dGLS\-pl}{% + \providedby{\sty{glossaries-extra-bib2gls} v1.37+} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{as \gls{dgls} but uses \gls{GLSpl}} + \field{seealso}{glsxtraddlabelprefix,glsxtrprependlabelprefix} + } + % \dglslink + \gcmdspa{dgls\-link}{% + \providedby{\sty{glossaries-extra-bib2gls} v1.37+} + \syntax{\oargm{options}\margm{entry-label}\margm{text}} + \desc{as \gls{dgls} but uses \gls{glslink}} + \field{seealso}{glsxtraddlabelprefix,glsxtrprependlabelprefix} + } + % \dGlslink + \gcmdspa{dGls\-link}{% + \providedby{\sty{glossaries-extra-bib2gls} v1.49+} + \syntax{\oargm{options}\margm{entry-label}\margm{text}} + \desc{as \gls{dglslink} but applies \idx{sentencecase}} + \field{seealso}{glsxtraddlabelprefix,glsxtrprependlabelprefix} + } + % \dglsdisp + \gcmdspa{dgls\-disp}{% + \providedby{\sty{glossaries-extra-bib2gls} v1.37+} + \syntax{\oargm{options}\margm{entry-label}\margm{text}} + \desc{as \gls{dgls} but uses \gls{glsdisp}} + \field{seealso}{glsxtraddlabelprefix,glsxtrprependlabelprefix} + } + % \dGlsdisp + \gcmdspa{dGls\-disp}{% + \providedby{\sty{glossaries-extra-bib2gls} v1.49+} + \syntax{\oargm{options}\margm{entry-label}\margm{text}} + \desc{as \gls{dglsdisp} but applies \idx{sentencecase}} + \field{seealso}{glsxtraddlabelprefix,glsxtrprependlabelprefix} + } + % \dglsfield + \gcmdspa{dgls\-field}{% + \providedby{\sty{glossaries-extra-bib2gls} v1.49+} + \syntax{\oargm{options}\margm{entry-label}\margm{field-label}\margm{text}} + \desc{as \gls{dgls} but selects the first matching label that + has an entry with the field set} + \field{seealso}{glsxtraddlabelprefix,glsxtrprependlabelprefix} + } + % \dGlsfield + \gcmdspa{dGls\-field}{% + \providedby{\sty{glossaries-extra-bib2gls} v1.49+} + \syntax{\oargm{options}\margm{entry-label}\margm{field-label}\margm{text}} + \desc{as \gls{dglsfield} but applies \idx{sentencecase}} + \field{seealso}{glsxtraddlabelprefix,glsxtrprependlabelprefix} + } + % \dGLSfield + \gcmdspa{dGLS\-field}{% + \providedby{\sty{glossaries-extra-bib2gls} v1.49+} + \syntax{\oargm{options}\margm{entry-label}\margm{field-label}\margm{text}} + \desc{as \gls{dglsfield} but \idx{allcaps}} + \field{seealso}{glsxtraddlabelprefix,glsxtrprependlabelprefix} + } + % \dglsfieldcurrentfieldlabel + \gcmd{dgls\-field\-current\-field\-label} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.49+} + \desc{set by the \gls{dglsfield} family of commands to the given + \meta{field-label}} + } + % \dglsfieldfallbackfieldlabel + \gcmd{dgls\-field\-fallback\-field\-label} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.49+} + \initvalopt{gloskey}{text} + \desc{expands to the fallback field to use for the + \gls{dglsfield} family of commands} + } + % \dglsfieldactualfieldlabel + \gcmd{dgls\-field\-actual\-field\-label} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.49+} + \desc{set by the \gls{dglsfield} family of commands to the + actual field used. This will either be the requested field or + the fallback field} + } + % \newdglsfield + \gcmd{new\-d\-gls\-field} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.49+} + \syntax{\oargm{default-options}\margm{field}\margm{cs}} + \desc{defines the command +\meta{cs}\oargm{options}\margm{entry-label} to behave like + \code{\gls{dglsfield}\oarg{\meta{default-options},\meta{options}}\margm{entry-label}\margm{field}}} + } + % \newdglsfieldlike + \gcmd{new\-d\-gls\-field\-like} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.49+} + \syntax{\oargm{default-options}\margm{field}\margm{cs}\margm{Cs}\margm{CS}} + \desc{similar to \gls{newdglsfield} but also defines + \idx{sentencecase} (\meta{Cs}) and \idx{allcaps} (\meta{CS}) commands + with mappings} + } + % \glsxtrnewgls + \gcmd{gls\-xtr\-new\-gls} + { + \providedby{\sty{glossaries-extra} v1.21+} + \syntax{\oargm{default-options}\margm{prefix}\margm{cs}} + \desc{defines the command +\meta{cs}\oargm{options}\margm{entry-label} to behave like + \code{\gls{gls}\oarg{\meta{default-options},\meta{options}}\marg{\meta{prefix}\meta{entry-label}}}} + } + % \glsxtrnewglslike + \gcmd{gls\-xtr\-new\-gls\-like} + { + \providedby{\sty{glossaries-extra} v1.21+} + \syntax{\oargm{default-options}\margm{prefix}\margm{\gls{gls}-like +cs}\margm{\gls{glspl}-like cs}\margm{\gls{Gls}-like cs}\margm{\gls{Glspl}-like cs}} + \desc{like \gls{glsxtrnewgls} but provides plural and + \idx{sentencecase} commands as well} + } + % \glsxtrnewGLSlike + \gcmd{gls\-xtr\-new\-GLS\-like} + { + \providedby{\sty{glossaries-extra} v1.21+} + \syntax{\oargm{default-options}\margm{prefix}\margm{\gls{GLS}-like +cs}\margm{\gls{GLSpl}-like cs}} + \desc{like \gls{glsxtrnewgls} but provides \idx+{allcaps} commands} + } + % \glsxtrnewrgls + \gcmd{gls\-xtr\-new\-rgls} + { + \providedby{\sty{glossaries-extra} v1.21+} + \syntax{\oargm{default-options}\margm{prefix}\margm{cs}} + \desc{like \gls{glsxtrnewgls} but uses \gls{rgls}} + } + % \glsxtrnewrglslike + \gcmd{gls\-xtr\-new\-rgls\-like} + { + \providedby{\sty{glossaries-extra} v1.21+} + \syntax{\oargm{default-options}\margm{prefix}\margm{\gls{rgls}-like +cs}\margm{\gls{rglspl}-like cs}\margm{\gls{rGls}-like +cs}\margm{\gls{rGlspl}-like cs}} + \desc{like \gls{glsxtrnewrgls} but provides plural and + \idx{sentencecase} commands as well} + } + % \glsxtrnewrGLSlike + \gcmd{gls\-xtr\-new\-rGLS\-like} + { + \providedby{\sty{glossaries-extra} v1.21+} + \syntax{\oargm{default-options}\margm{prefix}\margm{\gls{rGLS}-like +cs}\margm{\gls{rGLSpl}-like cs}} + \desc{like \gls{glsxtrnewrgls} but provides \idx+{allcaps} commands} + } + % \glsxtrnewglslink + \gcmd{gls\-xtr\-new\-gls\-link} + { + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\oargm{default-options}\margm{prefix}\margm{cs}} + \desc{defines the command \code{\meta{cs}\oargm{options}\margm{label}\margm{text}} to behave like + \code{\gls{glslink}\oarg{\meta{default-options},\meta{options}}\marg{\meta{prefix}\meta{label}}\margm{text}}} + } + % \glsxtrnewglsdisp + \gcmd{gls\-xtr\-new\-gls\-disp} + { + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\oargm{default-options}\margm{prefix}\margm{cs}} + \desc{defines the command \code{\meta{cs}\oargm{options}\margm{label}\margm{text}} to behave like + \code{\gls{glsdisp}\oarg{\meta{default-options},\meta{options}}\marg{\meta{prefix}\meta{label}}\margm{text}}} + } + % \GlsXtrRecordCounter + \gcmd{Gls\-Xtr\-Record\-Counter} + { + \providedby{\sty{glossaries-extra} v1.12+} + \syntax{\margm{counter-name}} + \desc{activates recording for the given counter} + \note{preamble only} + } + % \glsxtr@counterrecord + \gcmd{gls\-xtr\-@\-counter\-record} + { + \providedby{\sty{glossaries-extra} v1.12+} + \syntax{\margm{entry-label}\margm{counter}\margm{value}} + \desc{an \ext{aux} file command used with \gls{GlsXtrRecordCounter} + to append \meta{value} to the \glosfield{record.counter} field. + Also implements \gls{glsxtrAddCounterRecordHook}} + } + % \glsxtrAddCounterRecordHook + \gcmd{gls\-xtr\-Add\-Counter\-Record\-Hook} + { + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{entry-label}\margm{counter}\margm{value}} + \desc{user-level hook used by \gls{glsxtr@counterrecord}. If + this command is redefined, it must be done so in the preamble before + the \ext{aux} file is input} + } + % \glsxtrsupphypernumber + \gcmd{gls\-xtr\-supp\-hyper\-number} + { + \providedby{\sty{glossaries-extra} v1.14+} + \syntax{\margm{location}} + \desc{used to hyperlink to a location in an external document if + the \catattr{externallocation} attribute has been set. This will + define \gls{glsxtrsupplocationurl} to the location provided by the + attribute or to empty if the attribute isn't set} + } + % \glsxtrsupplocationurl + \gcmd{gls\-xtr\-supp\-lo\-ca\-tion\-url} + { + \providedby{\sty{glossaries-extra} v1.14+} + \desc{defined by \gls{glsxtrsupphypernumber} to the external + location or empty if not provided} + } + % COMMANDS: ENTRY COUNTING + % \ifglsresetcurrcount + \gcond{if\-gls\-re\-set\-curr\-count} + { + \providedby{\sty{glossaries-extra} v1.49+} + \initvalcs{iffalse} + \desc{conditional that determines whether or not to reset the + entry counter to 0 when the \idx{firstuseflag} is reset} + } + % \glsresetcurrcounttrue + \gcmd{gls\-re\-set\-curr\-count\-true} + { + \providedby{\sty{glossaries-extra} v1.49+} + \desc{sets \gls{ifglsresetcurrcount} to true} + } + % \glsresetcurrcountfalse + \gcmd{gls\-re\-set\-curr\-count\-false} + { + \providedby{\sty{glossaries-extra} v1.49+} + \desc{sets \gls{ifglsresetcurrcount} to false} + } + % \glsenableentrycount + \gcmd{gls\-enable\-entry\-count} + { + \providedby{\sty{glossaries} v4.14+} + \desc{enables entry counting} + } + % \glsenableentryunitcount + \gcmd{gls\-enable\-entry\-unit\-count} + { + %\providedby{\sty{glossaries-extra} v0.5.4+} + \desc{enables entry unit counting} + } + % \glsentrycurrcount + \gcmd{gls\-entry\-curr\-count} + { + \syntax{\margm{entry-label}} + \providedby{\sty{glossaries} v4.14+} + \desc{expands to the current entry count running total or 0 if + not available (needs to be enabled with + \gls{glsenableentrycount} or \gls{glsenableentryunitcount}). + With unit entry counting, this + expands to the total for the current unit} + } + % \glsentryprevcount + \gcmd{gls\-entry\-prev\-count} + { + \syntax{\margm{entry-label}} + \providedby{\sty{glossaries} v4.14+} + \desc{expands to the final entry count total from the previous + \LaTeX\ run or if 0 if not available (needs to be enabled with + \gls{glsenableentrycount} or \gls{glsenableentryunitcount}). + With unit entry counting, this + expands to the total for the current unit} + } + % \glsentryprevtotalcount + \gcmd{gls\-entry\-prev\-total\-count} + { + \providedby{\sty{glossaries} v4.14+} + \syntax{\margm{entry-label}} + \desc{expands to the final entry count total from the previous + \LaTeX\ run or if 0 if not available (needs to be enabled with + \gls{glsenableentryunitcount})} + } + % \glsentryprevmaxcount + \gcmd{gls\-entry\-prev\-max\-count} + { + \providedby{\sty{glossaries} v4.14+} + \syntax{\margm{entry-label}} + \desc{expands to the maximum entry unit count total from the previous + \LaTeX\ run or if 0 if not available (needs to be enabled with + \gls{glsenableentryunitcount})} + } + % \cgls + \gcmdspa{cgls} + { + \providedby{\sty{glossaries} v4.14+} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{like \gls{gls} but hooks into the entry counting mechanism} + \field{seealso}{glsenableentrycount,cglsformat} + } + % \cglspl + \gcmdspa{cglspl} + { + \providedby{\sty{glossaries} v4.14+} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{like \gls{glspl} but hooks into the entry counting mechanism} + \field{seealso}{glsenableentrycount,cglsplformat} + } + % \cGls + \gcmdspa{cGls} + { + \providedby{\sty{glossaries} v4.14+} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{like \gls{Gls} but hooks into the entry counting mechanism} + \field{seealso}{glsenableentrycount,cGlsformat} + } + % \cGlspl + \gcmdspa{cGlspl} + { + \providedby{\sty{glossaries} v4.14+} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{like \gls{Glspl} but hooks into the entry counting mechanism} + \field{seealso}{glsenableentrycount,cGlsplformat} + } + % \cglsformat + \gcmd{cgls\-format} + { + \providedby{\sty{glossaries} v4.14+} + \syntax{\margm{entry-label}\margm{insert}} + \desc{format used by \gls{cgls} if the entry was not used more + than the given trigger value on the previous run} + } + % \cglsplformat + \gcmd{cgls\-pl\-format} + { + \providedby{\sty{glossaries} v4.14+} + \syntax{\margm{entry-label}\margm{insert}} + \desc{format used by \gls{cglspl} if the entry was not used more + than the given trigger value on the previous run} + } + % \cGlsformat + \gcmd{cGls\-format} + { + \providedby{\sty{glossaries} v4.14+} + \syntax{\margm{entry-label}\margm{insert}} + \desc{format used by \gls{cGls} if the entry was not used more + than the given trigger value on the previous run} + } + % \cGlsplformat + \gcmd{cGls\-pl\-format} + { + \providedby{\sty{glossaries} v4.14+} + \syntax{\margm{entry-label}\margm{insert}} + \desc{format used by \gls{cGlspl} if the entry was not used more + than the given trigger value on the previous run} + } + % \cGLS + \gcmdspa{cGLS} + { + %\providedby{\sty{glossaries-extra} v0.5+} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{like \gls{GLS} but hooks into the entry counting mechanism} + \field{seealso}{glsenableentrycount,cGLSformat} + } + % \cGLSpl + \gcmdspa{cGLSpl} + { + %\providedby{\sty{glossaries-extra} v0.5+} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{like \gls{GLSpl} but hooks into the entry counting mechanism} + \field{seealso}{glsenableentrycount,cGLSplformat} + } + % \cGLSformat + \gcmd{cGLS\-format} + { + %\providedby{\sty{glossaries-extra} v0.5+} + \syntax{\margm{entry-label}\margm{insert}} + \desc{format used by \gls{cGLS} if the entry was not used more + than the given trigger value on the previous run} + } + % \cGLSplformat + \gcmd{cGLS\-pl\-format} + { + %\providedby{\sty{glossaries-extra} v0.5+} + \syntax{\margm{entry-label}\margm{insert}} + \desc{format used by \gls{cGLSpl} if the entry was not used more + than the given trigger value on the previous run} + } + % \glsxtrifcounttrigger + \gcmd{gls\-xtr\-if\-count\-trigger} + { + %\providedby{\sty{glossaries-extra} v0.5+} + \syntax{\margm{entry-label}\margm{true}\margm{false}} + \desc{does \meta{true} if the entry's total use count at the end + of the previous run exceeds the trigger value assigned to the + entry's category, otherwise does \meta{false}} + } + % \GlsXtrEnableEntryCounting + \gcmd{Gls\-Xtr\-Enable\-Entry\-Count\-ing} + { + %\providedby{\sty{glossaries-extra} v0.5+} + \syntax{\margm{category-list}\margm{trigger-value}} + \desc{enables entry counting for the given list of categories + with the given trigger value (which must be an integer)} + } + % \GlsXtrEnableEntryUnitCounting + \gcmd{Gls\-Xtr\-Enable\-Entry\-Unit\-Count\-ing} + { + %\providedby{\sty{glossaries-extra} v0.5.4+} + \syntax{\margm{category-list}\margm{trigger-value}\margm{counter}} + \desc{enables unit entry counting for the given list of categories + with the given trigger value (which must be an integer) and the + associated counter} + } + % \GlsXtrStartUnsetBuffering + \gcmds{Gls\-Xtr\-Start\-Unset\-Buffering} + { + \providedby{\sty{glossaries-extra} v1.30+} + \desc{enables unset buffering. The starred version doesn't check + for duplicates} + \field{seealso}{GlsXtrStopUnsetBuffering,GlsXtrDiscardUnsetBuffering} + } + % \GlsXtrStopUnsetBuffering + \gcmds{Gls\-Xtr\-Stop\-Unset\-Buffering} + { + \providedby{\sty{glossaries-extra} v1.30+} + \desc{stops buffering. The starred version performs a global unset} + \field{seealso}{GlsXtrStartUnsetBuffering,GlsXtrDiscardUnsetBuffering,GlsXtrForUnsetBufferedList} + } + % \GlsXtrDiscardUnsetBuffering + \gcmd{Gls\-Xtr\-Discard\-Unset\-Buffering} + { + \providedby{\sty{glossaries-extra} v1.42+} + \desc{discards the pending buffer and restores \gls{glsunset}} + \field{seealso}{GlsXtrStartUnsetBuffering,GlsXtrStopUnsetBuffering} + } + % \GlsXtrForUnsetBufferedList + \gcmd{Gls\-Xtr\-For\-Unset\-Buffered\-List} + { + \providedby{\sty{glossaries-extra} v1.31+} + \syntax{\margm{handler-cs}} + \desc{iterates over the labels stored in the current buffer} + } + % \GlsXtrClearUnsetBuffer + \gcmd{Gls\-Xtr\-Clear\-Unset\-Buffer} + { + \providedby{\sty{glossaries-extra} v1.49+} + \desc{locally clears the buffer, but doesn't stop buffering} + } + % \GlsXtrUnsetBufferEnableRepeatLocal + \gcmd{Gls\-Xtr\-Unset\-Buffer\-Enable\-Repeat\-Local} + { + \providedby{\sty{glossaries-extra} v1.49+} + \desc{allows repeat entries within the buffering code to be + locally unset before the \idx{linktext}} + \field{seealso}{GlsXtrResetLocalBuffer} + } + % \GlsXtrResetLocalBuffer + \gcmd{Gls\-Xtr\-Reset\-Local\-Buffer} + { + \providedby{\sty{glossaries-extra} v1.49+} + \desc{if local unset for repeat entries has been enabled with + \gls{GlsXtrUnsetBufferEnableRepeatLocal}, this will locally + reset all entries that are in the buffer that hadn't been + marked as used before the function was enabled} + \field{seealso}{GlsXtrUnsetBufferEnableRepeatLocal} + } + % \GlsXtrUnsetBufferDisableRepeatLocal + \gcmd{Gls\-Xtr\-Un\-set\-Buffer\-Disable\-Repeat\-Local} + { + \providedby{\sty{glossaries-extra} v1.49+} + \desc{disables GlsXtrUnsetBufferEnableRepeatLocal} + } + % \glsxtrpostlocalunset + \gcmd{gls\-xtr\-post\-local\-unset} + { + %\providedby{\sty{glossaries-extra} v0.5.4+} + \syntax{\margm{entry-label}} + \desc{hook performed by \gls{glslocalunset}. This hook is + modified by \gls{glsenableentrycount} and \gls{glsenableentryunitcount}} + } + % \glsxtrpostunset + \gcmd{gls\-xtr\-post\-unset} + { + %\providedby{\sty{glossaries-extra} v0.5.4+} + \syntax{\margm{entry-label}} + \desc{hook performed by \gls{glsunset}. This hook is + modified by \gls{glsenableentrycount} and \gls{glsenableentryunitcount}} + } + % \glsxtrpostlocalreset + \gcmd{gls\-xtr\-post\-local\-reset} + { + %\providedby{\sty{glossaries-extra} v0.5.4+} + \syntax{\margm{entry-label}} + \desc{hook performed by \gls{glslocalreset}. This hook is + modified by \gls{glsenableentrycount} and \gls{glsenableentryunitcount}} + } + % \glsxtrpostreset + \gcmd{gls\-xtr\-post\-reset} + { + %\providedby{\sty{glossaries-extra} v0.5.4+} + \syntax{\margm{entry-label}} + \desc{hook performed by \gls{glsreset}. This hook is + modified by \gls{glsenableentrycount} and \gls{glsenableentryunitcount}} + } + % \GlsXtrEnableLinkCounting + \gcmd{Gls\-Xtr\-Enable\-Link\-Count\-ing} + { + \providedby{\sty{glossaries-extra} v1.26+} + \syntax{\oargm{parent counter}\margm{categories}} + \desc{enables link counting for the given categories} + \note{preamble only} + } + % \glsxtrinclinkcounter + \gcmd{gls\-xtr\-inc\-link\-counter} + { + \providedby{\sty{glossaries-extra} v1.26+} + \syntax{\margm{counter}} + \desc{increments the link counter with \gls{stepcounter}} + } + % \GlsXtrLinkCounterValue + \gcmd{Gls\-Xtr\-Link\-Counter\-Value} + { + \providedby{\sty{glossaries-extra} v1.26+} + \syntax{\margm{entry-label}} + \desc{expands to the internal link count register associated + with the given register or 0 if it hasn't been defined} + } + % \GlsXtrTheLinkCounter + \gcmd{Gls\-Xtr\-The\-Link\-Counter} + { + \providedby{\sty{glossaries-extra} v1.26+} + \syntax{\margm{entry-label}} + \desc{expands to the value of the link counter associated + with the given entry or 0 if it hasn't been defined} + } + % \GlsXtrIfLinkCounterDef + \gcmd{Gls\-Xtr\-If\-Link\-Counter\-Def} + { + \providedby{\sty{glossaries-extra} v1.26+} + \syntax{\margm{entry-label}\margm{true}\margm{false}} + \desc{expands to \meta{true} if the link counter associated + with the given entry has been defined, otherwise expands to \meta{false}} + } + % \GlsXtrLinkCounterName + \gcmd{Gls\-Xtr\-Link\-Counter\-Name} + { + \providedby{\sty{glossaries-extra} v1.26+} + \syntax{\margm{entry-label}} + \desc{expands to the name of the link counter associated with the given entry + (no check for existence)} + } + % COMMANDS: MULTI-ENTRY + % \multiglossaryentry + \gcmd{multi\-glossary\-entry} + { + \providedby{\sty{glossaries-extra} v1.48+} + \syntax{\oargm{options}\margm{multi-label}\oargm{main-label}\margm{entry-label-list}} + \desc{defines a multi-entry set with the label + \meta{multi-label}, consisting of the entries whose labels are + listed in \meta{entry-label-list}, where the main entry (which must be + present in \meta{entry-label-list}) is identified by \meta{main-label} + (or the final element in \meta{entry-label-list}, if \meta{main-label} is + omitted)} + } + % \providemultiglossaryentry + \gcmd{provide\-multi\-glossary\-entry} + { + \providedby{\sty{glossaries-extra} v1.48+} + \syntax{\oargm{options}\margm{multi-label}\oargm{main-label}\margm{entry-label-list}} + \desc{as \gls{multiglossaryentry} but does nothing if a + multi-entry set has already been defined with the given label} + } + % \ifmultiglossaryentryglobal + \gcond{if\-multi\-glossary\-entry\-global} + { + \providedby{\sty{glossaries-extra} v1.48+} + \initvalcs{iffalse} + \desc{if true, subsequent multi-entry definitions will be global} + } + % \multiglossaryentryglobaltrue + \gcmd{multi\-glossary\-entry\-global\-true} + { + \providedby{\sty{glossaries-extra} v1.48+} + \desc{sets \gls{ifmultiglossaryentryglobal} to true} + } + % \multiglossaryentryglobalfalse + \gcmd{multi\-glossary\-entry\-global\-false} + { + \providedby{\sty{glossaries-extra} v1.48+} + \desc{sets \gls{ifmultiglossaryentryglobal} to false} + } + % \mglsSetOptions + \gcmd{mgls\-Set\-Options} + { + \providedby{\sty{glossaries-extra} v1.48+} + \syntax{\margm{multi-label}\margm{new-options}} + \desc{locally sets the options associated with the given + multi-entry} + } + % \mglsAddOptions + \gcmd{mgls\-Add\-Options} + { + \providedby{\sty{glossaries-extra} v1.48+} + \syntax{\margm{multi-label}\margm{new-options}} + \desc{locally appends to the options associated with the given + multi-entry} + } + % \GlsXtrMglsOrGls + \gcmd{GlsXtrMglsOrGls} + { + \providedby{\sty{glossaries-extra} v1.48+} + \syntax{\margm{mgls cs}\margm{gls cs}\meta{modifier}\oargm{options}\margm{label}\oargm{insert}} + \desc{if \meta{label} matches a defined multi-entry, this will + do \meta{mgls cls} otherwise it will do \meta{gls cs}. The + \meta{modifier} (\code{*} or \code{+} or the token identified + with \gls{GlsXtrSetAltModifier}) may be omitted} + } + % \multiglossaryentrysetup + \gcmd{multi\-glossary\-entry\-set\-up} + { + \providedby{\sty{glossaries-extra} v1.48+} + \syntax{\margm{options}} + \desc{specifies a general set of options to apply to all multi-entries} + } + % \mglsdefcategoryprefix + \gcmd{mgls\-def\-category\-prefix} + { + \providedby{\sty{glossaries-extra} v1.48+} + \syntax{\margm{category-label}\margm{definition}} + \desc{defines the prefix for the given multi-entry category} + } + % \mglshascategoryprefix + \gcmd{mgls\-has\-category\-prefix} + { + \providedby{\sty{glossaries-extra} v1.48+} + \syntax{\margm{category-label}\margm{true}\margm{false}} + \desc{does \meta{true} if the given multi-entry category has a + prefix set otherwise does \meta{false}} + } + % \mglsusecategoryprefix + \gcmd{mgls\-use\-category\-prefix} + { + \providedby{\sty{glossaries-extra} v1.48+} + \syntax{\margm{category-label}} + \desc{expands to the prefix assigned to the given multi-entry + category or does nothing if no prefix assigned} + } + % \mglsdefcategorysuffix + \gcmd{mgls\-def\-category\-suffix} + { + \providedby{\sty{glossaries-extra} v1.48+} + \syntax{\margm{category-label}\margm{definition}} + \desc{defines the suffix for the given multi-entry category} + } + % \mglsprefix + \gcmd{mgls\-prefix} + { + \providedby{\sty{glossaries-extra} v1.48+} + \desc{code used to typeset the multi-entry prefix} + } + % \mglshascategorysuffix + \gcmd{mgls\-has\-category\-suffix} + { + \providedby{\sty{glossaries-extra} v1.48+} + \syntax{\margm{category-label}\margm{true}\margm{false}} + \desc{does \meta{true} if the given multi-entry category has a + suffix set otherwise does \meta{false}} + } + % \mglsusecategorysuffix + \gcmd{mgls\-use\-category\-suffix} + { + \providedby{\sty{glossaries-extra} v1.48+} + \syntax{\margm{category-label}} + \desc{expands to the suffix assigned to the given multi-entry + category or does nothing if no suffix assigned} + } + % \mglssuffix + \gcmd{mgls\-suffix} + { + \providedby{\sty{glossaries-extra} v1.48+} + \desc{code used to typeset the multi-entry suffix} + } + % \glscombinedsep + \gcmd{gls\-combined\-sep} + { + \providedby{\sty{glossaries-extra} v1.48+} + \syntax{\margm{prev label}\margm{next label}} + \desc{separator used between elements of a multi-entry set where + both elements have been marked as used} + } + % \glscombinedfirstsep + \gcmd{gls\-combined\-first\-sep} + { + \providedby{\sty{glossaries-extra} v1.48+} + \syntax{\margm{prev label}\margm{next label}} + \desc{separator used between elements of a multi-entry set where + only the next element have been marked as used} + } + % \glscombinedsepfirst + \gcmd{gls\-combined\-sep\-first} + { + \providedby{\sty{glossaries-extra} v1.48+} + \syntax{\margm{prev label}\margm{next label}} + \desc{separator used between elements of a multi-entry set where + only the previous element have been marked as used} + } + % \glscombinedfirstsepfirst + \gcmd{gls\-combined\-first\-sep\-first} + { + \providedby{\sty{glossaries-extra} v1.48+} + \syntax{\margm{prev label}\margm{next label}} + \desc{separator used between elements of a multi-entry set where + neither the previous nor the next element has been marked as used} + } + % \glssetcombinedsepabbrvnbsp + \gcmd{gls\-set\-combined\-sep\-abbrv\-nbsp} + { + \providedby{\sty{glossaries-extra} v1.48+} + \desc{defines the multi-entry separators to use a + \idx{nbsp} for abbreviations} + } + % \glssetcombinedsepabbrvnone + \gcmd{gls\-set\-combined\-sep\-abbrv\-none} + { + \providedby{\sty{glossaries-extra} v1.48+} + \desc{defines the multi-entry separators to use no + separator for abbreviations} + } + % \glssetcombinedsepnarrow + \gcmd{gls\-set\-combined\-sep\-narrow} + { + \providedby{\sty{glossaries-extra} v1.48+} + \syntax{\margm{width}\margm{narrow-sep}} + \desc{defines the multi-entry separators to use + \meta{narrow-sep} if the width of associated field values is less + than \meta{width}} + } + % \mglselementprehook + \gcmd{mgls\-element\-pre\-hook} + { + \providedby{\sty{glossaries-extra} v1.48+} + \desc{hook performed before each (non-skipped) element in a + multi-entry set} + } + % \mglselementposthook + \gcmd{mgls\-element\-post\-hook} + { + \providedby{\sty{glossaries-extra} v1.48+} + \desc{hook performed after each (non-skipped) element in a + multi-entry set} + } + % \mglscurrentmultilabel + \gcmd{mgls\-current\-multi\-label} + { + \providedby{\sty{glossaries-extra} v1.48+} + \desc{placeholder command for use in multi-entry hooks, this + expands to the multi-entry label} + } + % \mglscurrentmainlabel + \gcmd{mgls\-current\-main\-label} + { + \providedby{\sty{glossaries-extra} v1.48+} + \desc{placeholder command for use in multi-entry hooks, this + expands to the label of the main element} + } + % \mglscurrentlist + \gcmd{mgls\-current\-list} + { + \providedby{\sty{glossaries-extra} v1.48+} + \desc{placeholder command for use in multi-entry hooks, this + expands to the complete comma-separated list of elements} + } + % \mglscurrentoptions + \gcmd{mgls\-current\-options} + { + \providedby{\sty{glossaries-extra} v1.48+} + \desc{placeholder command for use in multi-entry hooks, this + expands to the options used when the multi-entry was defined} + } + % \mglscurrentcategory + \gcmd{mgls\-current\-category} + { + \providedby{\sty{glossaries-extra} v1.48+} + \desc{placeholder command for use in multi-entry hooks, this + expands to the multi-entry category current in effect} + } + % \glsxtrcurrentmglscsname + \gcmd{gls\-xtr\-current\-mgls\-cs\-name} + { + \providedby{\sty{glossaries-extra} v1.48+} + \desc{placeholder command for use in multi-entry hooks, this + expands to the control sequence name of the calling command} + } + % \mglscurrentlabel + \gcmd{mgls\-current\-label} + { + \providedby{\sty{glossaries-extra} v1.48+} + \desc{placeholder command for use in multi-entry hooks, this + expands to the current element label} + } + % \mglselementindex + \gcmd{mgls\-element\-index} + { + \providedby{\sty{glossaries-extra} v1.48+} + \desc{a count register used in multi-entry hooks, this + is set to the element index} + } + % \mglscurrentprefix + \gcmd{mgls\-current\-prefix} + { + \providedby{\sty{glossaries-extra} v1.48+} + \desc{placeholder command for use in multi-entry hooks, this + expands to the current prefix} + } + % \mglscurrentsuffix + \gcmd{mgls\-current\-suffix} + { + \providedby{\sty{glossaries-extra} v1.48+} + \desc{placeholder command for use in multi-entry hooks, this + expands to the current suffix} + } + % \mglsisfirstuse + \gcmd{mgls\-is\-first\-use} + { + \providedby{\sty{glossaries-extra} v1.48+} + \syntax{\margm{true}\margm{false}} + \desc{for use in multi-entry hooks, this expands to \meta{true} + if this is the first use otherwise expands to \meta{false}} + } + % \mglsiflast + \gcmd{mgls\-if\-last} + { + \providedby{\sty{glossaries-extra} v1.48+} + \syntax{\margm{true}\margm{false}} + \desc{for use in multi-entry hooks, this expands to \meta{true} + if this is the last iteration otherwise expands to \meta{false}} + } + % \mglslastmultilabel + \gcmd{mgls\-last\-multi\-label} + { + \providedby{\sty{glossaries-extra} v1.48+} + \desc{for use in multi-entry suffix and post-link hooks, this expands to the + multi-entry label} + } + % \mglslastcategory + \gcmd{mgls\-last\-category} + { + \providedby{\sty{glossaries-extra} v1.48+} + \desc{for use in multi-entry suffix and post-link hooks, this expands to the + multi-entry category or nothing, if no category assigned} + } + % \mglswasfirstuse + \gcmd{mgls\-was\-first\-use} + { + \providedby{\sty{glossaries-extra} v1.48+} + \syntax{\margm{true}\margm{false}} + \desc{for use in multi-entry suffix and post-link hooks, this expands to the + \meta{true} if this was the first use of the multi-entry, + otherwise to \meta{false}} + } + % \mglslastelementlabel + \gcmd{mgls\-last\-element\-label} + { + \providedby{\sty{glossaries-extra} v1.48+} + \desc{for use in multi-entry suffix and post-link hooks, this expands to the + label of the last non-skipped element} + } + % \mglsiflastelementskipped + \gcmd{mgls\-if\-last\-element\-skipped} + { + \providedby{\sty{glossaries-extra} v1.48+} + \syntax{\margm{true}\margm{false}} + \desc{for use in multi-entry suffix and post-link hooks, this expands to the + \meta{true} if the last element was skipped, + otherwise to \meta{false}} + } + % \mglsiflastelementwasfirstuse + \gcmd{mgls\-if\-last\-element\-was\-first\-use} + { + \providedby{\sty{glossaries-extra} v1.48+} + \syntax{\margm{true}\margm{false}} + \desc{for use in multi-entry suffix and post-link hooks, this expands to the + \meta{true} if the last element was used for the first time, + otherwise to \meta{false}} + } + % \mglsiflastelementwasplural + \gcmd{mgls\-if\-last\-element\-was\-plural} + { + \providedby{\sty{glossaries-extra} v1.48+} + \syntax{\margm{true}\margm{false}} + \desc{for use in multi-entry suffix and post-link hooks, this expands to the + \meta{true} if the last element had the plural form displayed, + otherwise to \meta{false}} + } + % \mglsiflastelementcapscase + \gcmd{mgls\-if\-last\-element\-caps\-case} + { + \providedby{\sty{glossaries-extra} v1.48+} + \syntax{\margm{no-change}\margm{firstuc}\margm{all caps}} + \desc{for use in multi-entry suffix and post-link hooks, this expands to the + \meta{no-change} if the last element had no case-change applied, + to \meta{firstuc} if the last element had \idx+{sentencecase} + applied or to \meta{all caps} if the last element had \idx+{allcaps} + applied} + } + % \mglslastmainlabel + \gcmd{mgls\-last\-main\-label} + { + \providedby{\sty{glossaries-extra} v1.48+} + \desc{for use in multi-entry suffix and post-link hooks, this expands to the + label of the main element that was just referenced} + } + % \mglsiflastmainskipped + \gcmd{mgls\-if\-last\-main\-skipped} + { + \providedby{\sty{glossaries-extra} v1.48+} + \syntax{\margm{true}\margm{false}} + \desc{for use in multi-entry suffix and post-link hooks, this expands to the + \meta{true} if the main element from the multi-entry just + referenced was skipped, otherwise to \meta{false}} + } + % \mglsiflastmainwasfirstuse + \gcmd{mgls\-if\-last\-main\-was\-first\-use} + { + \providedby{\sty{glossaries-extra} v1.48+} + \syntax{\margm{true}\margm{false}} + \desc{for use in multi-entry suffix and post-link hooks, this expands to the + \meta{true} if the main element from the multi-entry just + referenced was used for the first time, otherwise to \meta{false}} + } + % \mglsiflastmainwasplural + \gcmd{mgls\-if\-last\-main\-was\-plural} + { + \providedby{\sty{glossaries-extra} v1.48+} + \syntax{\margm{true}\margm{false}} + \desc{for use in multi-entry suffix and post-link hooks, this expands to the + \meta{true} if the main element from the multi-entry just + referenced had the plural form shown, otherwise to \meta{false}} + } + % \mglsiflastmaincapscase + \gcmd{mgls\-if\-last\-main\-caps\-case} + { + \providedby{\sty{glossaries-extra} v1.48+} + \syntax{\margm{no-change}\margm{firstuc}\margm{all caps}} + \desc{for use in multi-entry suffix and post-link hooks, this expands to the + \meta{no-change} if the main element from the multi-entry just + referenced had no case-change applied, + to \meta{firstuc} if the last element had \idx+{sentencecase} + applied or to \meta{all caps} if the last element had \idx+{allcaps} + applied} + } + % \mglscustompostlinkhook + \gcmd{mgls\-custom\-post\-link\-hook} + { + \providedby{\sty{glossaries-extra} v1.48+} + \desc{hook used with the \mglsoptval{mpostlinkelement}{custom} option} + } + % \mglslastelementpostlinkhook + \gcmd{mgls\-last\-element\-post\-link\-hook} + { + \providedby{\sty{glossaries-extra} v1.48+} + \desc{hook used with the \mglsoptval{mpostlinkelement}{last} option} + } + % \mglslastmainpostlinkhook + \gcmd{mgls\-last\-main\-post\-link\-hook} + { + \providedby{\sty{glossaries-extra} v1.48+} + \desc{hook used with the \mglsoptval{mpostlinkelement}{main} option} + } + % \ifmglsused + \gcmd{if\-mgls\-used} + { + \providedby{\sty{glossaries-extra} v1.48+} + \syntax{\margm{multi-label}\margm{true}\margm{false}} + \desc{does \meta{true} if the given multi-entry has been marked + as used, otherwise does \meta{false}} + } + % \mglsunset + \gcmd{mgls\-unset} + { + \providedby{\sty{glossaries-extra} v1.48+} + \syntax{\margm{multi-label}} + \desc{globally unsets the first use flag for the given multi-entry} + } + % \mglsreset + \gcmd{mgls\-reset} + { + \providedby{\sty{glossaries-extra} v1.48+} + \syntax{\margm{multi-label}} + \desc{globally resets the first use flag for the given multi-entry} + } + % \mglslocalunset + \gcmd{mgls\-local\-unset} + { + \providedby{\sty{glossaries-extra} v1.48+} + \syntax{\margm{multi-label}} + \desc{locally unsets the first use flag for the given multi-entry} + } + % \mglslocalreset + \gcmd{mgls\-local\-reset} + { + \providedby{\sty{glossaries-extra} v1.48+} + \syntax{\margm{multi-label}} + \desc{locally resets the first use flag for the given multi-entry} + } + % \mglsunsetall + \gcmd{mgls\-unset\-all} + { + \providedby{\sty{glossaries-extra} v1.48+} + \desc{unsets the first use flag for all multi-entries} + } + % \mglsresetall + \gcmd{mgls\-reset\-all} + { + \providedby{\sty{glossaries-extra} v1.48+} + \desc{resets the first use flag for all multi-entries} + } + % \mglsSetMain + \gcmd{mgls\-Set\-Main} + { + \providedby{\sty{glossaries-extra} v1.48+} + \syntax{\margm{multi-label}\margm{new-main-label}} + \desc{locally changes the main element for the given multi-entry} + } + % \mgls + \gcmdspa{mgls} + { + \providedby{\sty{glossaries-extra} v1.48+} + \syntax{\oargm{options}\margm{multi-label}\oargm{insert}} + \desc{references a multi-entry identified by the given + \meta{multi-label}} + } + % \mglspl + \gcmdspa{mgls\-pl} + { + \providedby{\sty{glossaries-extra} v1.48+} + \syntax{\oargm{options}\margm{multi-label}\oargm{insert}} + \desc{as \gls{mgls} but uses the plural form for each element} + } + % \mglsmainpl + \gcmdspa{mgls\-main\-pl} + { + \providedby{\sty{glossaries-extra} v1.48+} + \syntax{\oargm{options}\margm{multi-label}\oargm{insert}} + \desc{as \gls{mgls} but uses the plural form for the main element} + } + % \Mgls + \gcmdspa{Mgls} + { + \providedby{\sty{glossaries-extra} v1.48+} + \syntax{\oargm{options}\margm{multi-label}\oargm{insert}} + \desc{as \gls{mgls} but uses \gls{Gls} for the first element} + } + % \MGls + \gcmdspa{MGls} + { + \providedby{\sty{glossaries-extra} v1.48+} + \syntax{\oargm{options}\margm{multi-label}\oargm{insert}} + \desc{as \gls{mgls} but uses \gls{Gls} for all elements} + } + % \Mglspl + \gcmdspa{Mglspl} + { + \providedby{\sty{glossaries-extra} v1.48+} + \syntax{\oargm{options}\margm{multi-label}\oargm{insert}} + \desc{as \gls{mgls} but uses \gls{Glspl} for the first element + and \gls{glspl} for the remaining elements} + } + % \Mglsmainpl + \gcmdspa{Mglsmainpl} + { + \providedby{\sty{glossaries-extra} v1.48+} + \syntax{\oargm{options}\margm{multi-label}\oargm{insert}} + \desc{as \gls{mgls} uses \idx{sentencecase} for the first + element and the plural form for the main element} + } + % \MGlspl + \gcmdspa{MGls\-pl} + { + \providedby{\sty{glossaries-extra} v1.48+} + \syntax{\oargm{options}\margm{multi-label}\oargm{insert}} + \desc{as \gls{mgls} but uses \gls{Glspl} for each element} + } + % \MGlsmainpl + \gcmdspa{MGls\-main\-pl} + { + \providedby{\sty{glossaries-extra} v1.48+} + \syntax{\oargm{options}\margm{multi-label}\oargm{insert}} + \desc{as \gls{mgls} but uses \gls{Glspl} for the main entry and + \gls{Gls} for the others} + } + % \MGLS + \gcmdspa{MGLS} + { + \providedby{\sty{glossaries-extra} v1.48+} + \syntax{\oargm{options}\margm{multi-label}\oargm{insert}} + \desc{as \gls{mgls} but uses \gls{GLS} for each element} + } + % \MGLSpl + \gcmdspa{MGLS\-pl} + { + \providedby{\sty{glossaries-extra} v1.48+} + \syntax{\oargm{options}\margm{multi-label}\oargm{insert}} + \desc{as \gls{mgls} but uses \gls{GLSpl} for each element} + } + % \MGLSmainpl + \gcmdspa{MGLS\-main\-pl} + { + \providedby{\sty{glossaries-extra} v1.48+} + \syntax{\oargm{options}\margm{multi-label}\oargm{insert}} + \desc{as \gls{mgls} but uses \gls{GLSpl} for the main element + and \gls{GLS} for the others} + } + % \mglsshort + \gcmdspa{mgls\-short} + { + \providedby{\sty{glossaries-extra} v1.48+} + \syntax{\oargm{options}\margm{multi-label}\oargm{insert}} + \desc{as \gls{mgls} but uses \gls{glsxtrshort} for any elements + that have the \gloskey{short} field set and \gls{glstext} otherwise} + } + % \mglslong + \gcmdspa{mgls\-long} + { + \providedby{\sty{glossaries-extra} v1.48+} + \syntax{\oargm{options}\margm{multi-label}\oargm{insert}} + \desc{as \gls{mgls} but uses \gls{glsxtrlong} for any elements + that have the \gloskey{long} field set and \gls{glstext} otherwise} + } + % \mglsfull + \gcmdspa{mgls\-full} + { + \providedby{\sty{glossaries-extra} v1.48+} + \syntax{\oargm{options}\margm{multi-label}\oargm{insert}} + \desc{as \gls{mgls} but uses \gls{glsxtrfull} for any elements + that have the \gloskey{short} field set and \gls{glsfirst} otherwise} + } + % \Mglsshort + \gcmdspa{Mgls\-short} + { + \providedby{\sty{glossaries-extra} v1.48+} + \syntax{\oargm{options}\margm{multi-label}\oargm{insert}} + \desc{as \gls{mglsshort} but \idx{sentencecase}} + } + % \Mglslong + \gcmdspa{Mgls\-long} + { + \providedby{\sty{glossaries-extra} v1.48+} + \syntax{\oargm{options}\margm{multi-label}\oargm{insert}} + \desc{as \gls{mglslong} but \idx{sentencecase}} + } + % \Mglsfull + \gcmdspa{Mgls\-full} + { + \providedby{\sty{glossaries-extra} v1.48+} + \syntax{\oargm{options}\margm{multi-label}\oargm{insert}} + \desc{as \gls{mglsfull} but \idx{sentencecase}} + } + % \mglsname + \gcmdspa{mgls\-name} + { + \providedby{\sty{glossaries-extra} v1.48+} + \syntax{\oargm{options}\margm{multi-label}\oargm{insert}} + \desc{as \gls{mgls} but uses \gls{glsname}} + } + % \MGlsname + \gcmdspa{MGls\-name} + { + \providedby{\sty{glossaries-extra} v1.48+} + \syntax{\oargm{options}\margm{multi-label}\oargm{insert}} + \desc{as \gls{mgls} but uses \gls{Glsname}} + } + % \Mglsname + \gcmdspa{Mgls\-name} + { + \providedby{\sty{glossaries-extra} v1.48+} + \syntax{\oargm{options}\margm{multi-label}\oargm{insert}} + \desc{as \gls{mgls} but uses \gls{Glsname} for the first entry + and \gls{glsname} for the remaining entries} + } + % \mglssymbol + \gcmdspa{mgls\-symbol} + { + \providedby{\sty{glossaries-extra} v1.48+} + \syntax{\oargm{options}\margm{multi-label}\oargm{insert}} + \desc{as \gls{mgls} but uses \gls{glssymbol} if the + \gloskey{symbol} field is set and \gls{gls} otherwise} + } + % \MGlssymbol + \gcmdspa{MGls\-symbol} + { + \providedby{\sty{glossaries-extra} v1.48+} + \syntax{\oargm{options}\margm{multi-label}\oargm{insert}} + \desc{as \gls{mgls} but uses \gls{glssymbol} if the + \gloskey{symbol} field is set and \gls{Gls} otherwise} + } + % \Mglssymbol + \gcmdspa{Mgls\-symbol} + { + \providedby{\sty{glossaries-extra} v1.48+} + \syntax{\oargm{options}\margm{multi-label}\oargm{insert}} + \desc{as \gls{mgls} but uses \gls{glssymbol} if the + \gloskey{symbol} field is set, otherwise it uses \gls{Gls} for + the first element and \gls{gls} for the remaining elements} + } + % \mglsusefield + \gcmdspa{mgls\-use\-field} + { + \providedby{\sty{glossaries-extra} v1.48+} + \syntax{\oargm{options}\margm{multi-label}\oargm{insert}} + \desc{as \gls{mgls} but uses \gls{glsdisp} if the field + identified by \gls{mglsfield} exists with the + \idx{linktext} obtained from the field value} + } + % \Mglsusefield + \gcmdspa{Mgls\-use\-field} + { + \providedby{\sty{glossaries-extra} v1.48+} + \syntax{\oargm{options}\margm{multi-label}\oargm{insert}} + \desc{as \gls{mglsusefield} but \idx{sentencecase} for the first +element} + } + % \MGlsusefield + \gcmdspa{MGls\-use\-field} + { + \providedby{\sty{glossaries-extra} v1.48+} + \syntax{\oargm{options}\margm{multi-label}\oargm{insert}} + \desc{as \gls{mglsusefield} but \idx{sentencecase} for each element} + } + % \mglsfield + \gcmd{mgls\-field} + { + \providedby{\sty{glossaries-extra} v1.48+} + \initval{useri} + \desc{expands to the \idx{internalfieldlabel} required by + \gls{mglsusefield}} + } + % \mpgls + \gcmdspa{mpgls} + { + \providedby{\sty{glossaries-extra} v1.48+} + \syntax{\oargm{options}\margm{multi-label}\oargm{insert}} + \desc{as \gls{mgls} but uses \gls{pgls} for the first element} + } + % \mpglspl + \gcmdspa{mpgls\-pl} + { + \providedby{\sty{glossaries-extra} v1.48+} + \syntax{\oargm{options}\margm{multi-label}\oargm{insert}} + \desc{as \gls{mgls} but uses \gls{pglspl} for the first element + and \gls{glspl} for the remaining elements} + } + % \mpglsmainpl + \gcmdspa{mpgls\-main\-pl} + { + \providedby{\sty{glossaries-extra} v1.48+} + \syntax{\oargm{options}\margm{multi-label}\oargm{insert}} + \desc{as \gls{mgls} but uses \gls{pglspl} for the first element + if its the main element otherwise \gls{pgls} and, for the remaining + elements, uses \gls{glspl} if the element is the main entry or + \gls{gls} otherwise} + } + % \Mpgls + \gcmdspa{Mpgls} + { + \providedby{\sty{glossaries-extra} v1.48+} + \syntax{\oargm{options}\margm{multi-label}\oargm{insert}} + \desc{as \gls{mpgls} but \idx{sentencecase} for the first element} + } + % \Mpglsmain + \gcmdspa{Mpglsmainpl} + { + \providedby{\sty{glossaries-extra} v1.48+} + \syntax{\oargm{options}\margm{multi-label}\oargm{insert}} + \desc{as \gls{mpglspl} but \idx{sentencecase} for the first element} + } + % \MPGls + \gcmdspa{MPGls} + { + \providedby{\sty{glossaries-extra} v1.48+} + \syntax{\oargm{options}\margm{multi-label}\oargm{insert}} + \desc{as \gls{mpgls} but \idx{sentencecase} for all elements} + } + % \MPGlspl + \gcmdspa{MPGls\-pl} + { + \providedby{\sty{glossaries-extra} v1.48+} + \syntax{\oargm{options}\margm{multi-label}\oargm{insert}} + \desc{as \gls{mpglspl} but \idx{sentencecase} for all elements} + } + % \MPGlsmainpl + \gcmdspa{MPGls\-main\-pl} + { + \providedby{\sty{glossaries-extra} v1.48+} + \syntax{\oargm{options}\margm{multi-label}\oargm{insert}} + \desc{as \gls{mpglsmainpl} but \idx{sentencecase} for all elements} + } + % \MPGLS + \gcmdspa{MPGLS} + { + \providedby{\sty{glossaries-extra} v1.48+} + \syntax{\oargm{options}\margm{multi-label}\oargm{insert}} + \desc{as \gls{mpgls} but \idx{allcaps} for the all elements} + } + % \MPGLSpl + \gcmdspa{MPGLSpl} + { + \providedby{\sty{glossaries-extra} v1.48+} + \syntax{\oargm{options}\margm{multi-label}\oargm{insert}} + \desc{as \gls{mpglspl} but \idx{allcaps} for the all elements} + } + % \MPGLSmainpl + \gcmdspa{MPGLS\-main\-pl} + { + \providedby{\sty{glossaries-extra} v1.48+} + \syntax{\oargm{options}\margm{multi-label}\oargm{insert}} + \desc{as \gls{mpglsmainpl} but \idx{allcaps} for the all elements} + } + % \mglsseefirstitem + \gcmd{mgls\-see\-first\-item} + { + \providedby{\sty{glossaries-extra} v1.48+} + \syntax{\margm{multi-label}} + \desc{formatting command used by cross-reference lists for the + first item if the item is a multi-entry} + } + % \mglsseeitem + \gcmd{mgls\-see\-item} + { + \providedby{\sty{glossaries-extra} v1.48+} + \syntax{\margm{multi-label}} + \desc{formatting command used by cross-reference lists for + subsequent items if the item is a multi-entry} + } + % \glsxtrifmulti + \gcmd{gls\-xtr\-if\-multi} + { + \providedby{\sty{glossaries-extra} v1.48+} + \syntax{\margm{multi-label}\margm{true}\margm{false}} + \desc{does \meta{true} if a multi-entry has been defined with + the label \meta{multi-label} otherwise does \meta{false}} + } + % \glsxtrmultimain + \gcmd{gls\-xtr\-multi\-main} + { + \providedby{\sty{glossaries-extra} v1.48+} + \syntax{\margm{multi-label}} + \desc{expands to the main label for the multi-entry identified +by \meta{multi-label} or nothing if not defined} + } + % \glsxtrmultilist + \gcmd{gls\-xtr\-multi\-list} + { + \providedby{\sty{glossaries-extra} v1.48+} + \syntax{\margm{multi-label}} + \desc{expands to the list of element labels for the multi-entry identified +by \meta{multi-label} or nothing if not defined} + } + % \mglsforelements + \gcmd{mgls\-for\-elements} + { + \providedby{\sty{glossaries-extra} v1.48+} + \syntax{\margm{multi-label}\margm{cs}\margm{body}} + \desc{iterates over the list of element labels for the multi-entry identified +by \meta{multi-label}} + } + % \mglsforotherelements + \gcmd{mgls\-for\-other\-elements} + { + \providedby{\sty{glossaries-extra} v1.48+} + \syntax{\margm{multi-label}\margm{cs}\margm{body}} + \desc{as \gls{mglsforelements} but skips the main entry label} + } + % \glsxtrmultitotalelements + \gcmd{gls\-xtr\-multi\-total\-elements} + { + \providedby{\sty{glossaries-extra} v1.48+} + \syntax{\margm{multi-label}} + \desc{expands to the total number of elements in the given + multi-entry or nothing if \meta{multi-label} hasn't been defined} + } + % \glsxtrmultimainindex + \gcmd{gls\-xtr\-multi\-main\-index} + { + \providedby{\sty{glossaries-extra} v1.48+} + \syntax{\margm{multi-label}} + \desc{expands to the index of the main element in the given + multi-entry or nothing if \meta{multi-label} hasn't been defined} + } + % \glsxtrmultilastotherindex + \gcmd{gls\-xtr\-multi\-last\-other\-index} + { + \providedby{\sty{glossaries-extra} v1.48+} + \syntax{\margm{multi-label}} + \desc{expands to the index of the final non-main element in the given + multi-entry or nothing if \meta{multi-label} hasn't been defined} + } + % \writemultiglossentry + \gcmd{write\-multi\-gloss\-entry} + { + \providedby{\sty{glossaries-extra} v1.48+} + \syntax{\margm{options}\margm{multi-label}\margm{main-label}\margm{list}} + \desc{writes multi-entry information to the \ext{aux} file} + } + % \@glsxtr@multientry + \gcmd{@gls\-xtr\-@multi\-entry} + { + \providedby{\sty{glossaries-extra} v1.48+} + \syntax{\margm{options}\margm{multi-label}\margm{main-label}\margm{list}} + \desc{information in the \ext{aux} about a multi-label defined + in the previous \LaTeX\ run} + } + % \glsxtrmultientryadjustedname + \gcmd{gls\-xtr\-multi\-entry\-adjust\-ed\-name} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.48+} + \syntax{\margm{sublist1}\margm{name}\margm{sublist2}\margm{multi-label}} + \desc{used by \resourceopt{compound-adjust-name}} + } + % \Glsxtrmultientryadjustedname + \gcmd{Gls\-xtr\-multi\-entry\-adjust\-ed\-name} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.48+} + \syntax{\margm{sublist1}\margm{name}\margm{sublist2}\margm{multi-label}} + \desc{as \gls{glsxtrmultientryadjustedname} but \idx{sentencecase}} + } + % \GlsXtrmultientryadjustedname + \gcmd{Gls\-Xtr\-multi\-entry\-adjust\-ed\-name} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.48+} + \syntax{\margm{sublist1}\margm{name}\margm{sublist2}\margm{multi-label}} + \desc{as \gls{glsxtrmultientryadjustedname} but \idx{titlecase}} + } + % \GLSxtrmultientryadjustedname + \gcmd{GLS\-xtr\-multi\-entry\-adjust\-ed\-name} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.48+} + \syntax{\margm{sublist1}\margm{name}\margm{sublist2}\margm{multi-label}} + \desc{as \gls{glsxtrmultientryadjustedname} but \idx{allcaps}} + } + % \glsxtrmultientryadjustednamesep + \gcmd{gls\-xtr\-multi\-entry\-adjusted\-name\-sep} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.48+} + \syntax{\margm{pre-label}\margm{post-label}} + \desc{separator used by \gls{glsxtrmultientryadjustedname}} + } + % \glsxtrmultientryadjustednamepresep + \gcmd{gls\-xtr\-multi\-entry\-adjusted\-name\-pre\-sep} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.48+} + \syntax{\margm{pre-label}\margm{post-label}} + \desc{separator used by \gls{glsxtrmultientryadjustedname} + between the last element of the first sublist and the main element} + } + % \glsxtrmultientryadjustednamepostsep + \gcmd{gls\-xtr\-multi\-entry\-adjusted\-name\-post\-sep} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.48+} + \syntax{\margm{pre-label}\margm{post-label}} + \desc{separator used by \gls{glsxtrmultientryadjustedname} + between the main element and the first element of the second + sublist} + } + % \glsxtrmultientryadjustednamefmt + \gcmd{gls\-xtr\-multi\-entry\-adjusted\-name\-fmt} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.48+} + \syntax{\margm{text}} + \desc{used by \gls{glsxtrmultientryadjustedname} + to encapsulate the main entry name} + } + % \Glsxtrmultientryadjustednamefmt + \gcmd{Gls\-xtr\-multi\-entry\-adjusted\-name\-fmt} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.48+} + \syntax{\margm{text}} + \desc{used by \gls{Glsxtrmultientryadjustedname} + to encapsulate the main entry name if the first sublist is empty} + } + % \GlsXtrmultientryadjustednamefmt + \gcmd{Gls\-Xtr\-multi\-entry\-adjusted\-name\-fmt} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.48+} + \syntax{\margm{text}} + \desc{used by \gls{GlsXtrmultientryadjustedname} + to encapsulate the main entry name} + } + % \GLSxtrmultientryadjustednamefmt + \gcmd{GLS\-xtr\-multi\-entry\-adjusted\-name\-fmt} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.48+} + \syntax{\margm{text}} + \desc{used by \gls{GLSxtrmultientryadjustedname} + to encapsulate the main entry name} + } + % \glsxtrmultientryadjustednameother + \gcmd{gls\-xtr\-multi\-entry\-adjusted\-name\-other} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.48+} + \syntax{\margm{text}} + \desc{used by \gls{glsxtrmultientryadjustedname} + to encapsulate the other (not main) entries} + } + % \Glsxtrmultientryadjustednameother + \gcmd{Gls\-xtr\-multi\-entry\-adjusted\-name\-other} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.48+} + \syntax{\margm{text}} + \desc{used by \gls{Glsxtrmultientryadjustedname} + to encapsulate the other (not main) entries} + } + % \GlsXtrmultientryadjustednameother + \gcmd{Gls\-Xtr\-multi\-entry\-adjusted\-name\-other} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.48+} + \syntax{\margm{text}} + \desc{used by \gls{GlsXtrmultientryadjustedname} + to encapsulate the other (not main) entries} + } + % \GLSxtrmultientryadjustednameother + \gcmd{GLS\-xtr\-multi\-entry\-adjusted\-name\-other} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.48+} + \syntax{\margm{text}} + \desc{used by \gls{GLSxtrmultientryadjustedname} + to encapsulate the other (not main) entries} + } + % \mglselementreset + \gcmd{mgls\-element\-reset} + { + \providedby{\sty{glossaries-extra} v1.48+} + \syntax{\margm{entry-label}} + \desc{used by options such as \mglsopt{resetall} to reset an + element's \idx{firstuseflag} (taking the \mglsopt{presetlocal} + option into account)} + } + % \mglselementunset + \gcmd{mgls\-element\-unset} + { + \providedby{\sty{glossaries-extra} v1.48+} + \syntax{\margm{entry-label}} + \desc{used by options such as \mglsopt{unsetall} to unset an + element's \idx{firstuseflag} (taking the \mglsopt{presetlocal} + option into account)} + } + % \mglsunsetothers + \gcmd{mgls\-unset\-others} + { + \providedby{\sty{glossaries-extra} v1.48+} + \syntax{\margm{multi-label}} + \desc{globally unsets the \idx{firstuseflag} for the other (not main) elements + of the given multi-entry} + } + % \mglslocalunsetothers + \gcmd{mgls\-local\-unset\-others} + { + \providedby{\sty{glossaries-extra} v1.48+} + \syntax{\margm{multi-label}} + \desc{locally unsets the \idx{firstuseflag} for the other (not main) elements + of the given multi-entry} + } + % MULTI-ENTRY OPTIONS: + \gidx{mglsopt}{\name{multi-entry set options}} + % option: indexmain + \gmglsopt{index\-main} + { + \syntax{\meta{value}} + \initval{true} + \defval{true} + \desc{indicates if the main element should + be \indexed, should only be \indexed\ on \idx{firstuse} or should not indexed} + } + % option: indexothers + \gmglsopt{index\-others} + { + \syntax{\meta{value}} + \initval{true} + \defval{true} + \desc{indicates if the \qt{other} elements should + be \indexed, should only be \indexed\ on \idx{firstuse} or should not indexed} + } + % option: encapmain + \gmglsopt{encap\-main} + { + \syntax{\meta{value}} + \initval{glsnumberformat} + \desc{the value to pass to the \glsopt{format} option for the + main entry} + } + % option: encapothers + \gmglsopt{encap\-others} + { + \syntax{\meta{value}} + \initval{glsnumberformat} + \desc{the value to pass to the \glsopt{format} option for the + \qt{other} elements} + } + % option: postlinks + \gmglsopt{post\-links} + { + \syntax{\meta{value}} + \initval{none} + \desc{indicates which \idxpl{postlinkhook} should be enabled} + } + % option: mpostlink + \gmglsopt{mpost\-link} + { + \syntax{\meta{value}} + \initval{true} + \defval{true} + \desc{indicates whether or not the multi-entry post-link hook + should be enabled and, if so, whether it should only be enabled + on \idxc{mfirstuse}{first} or \idxc{msubsequentuse}{subsequent} use} + } + % option: mpostlinkelement + \gmglsopt{mpost\-link\-element} + { + \syntax{\meta{value}} + \initval{last} + \desc{indicates which \idx{postlinkhook} to use if the + multi-entry post-link hook has been enabled} + } + % option: firstprefix + \gmglsopt{first\-prefix} + { + \syntax{\meta{value}} + \desc{the prefix to use on \idx{firstuse} of the multi-entry} + } + % option: usedprefix + \gmglsopt{used\-prefix} + { + \syntax{\meta{value}} + \desc{the prefix to use on \idx{subsequentuse} of the multi-entry} + } + % option: firstsuffix + \gmglsopt{first\-suffix} + { + \syntax{\meta{value}} + \desc{the suffix to use on \idx{mfirstuse} of the multi-entry} + } + % option: usedsuffix + \gmglsopt{used\-suffix} + { + \syntax{\meta{value}} + \desc{the suffix to use on \idx{msubsequentuse} of the multi-entry} + } + % option: firstskipmain + \gmglsopt{first\-skip\-main} + { + \syntax{\meta{boolean}} + \initval{false} + \defval{true} + \desc{determines whether or not to skip the main entry on \idx{mfirstuse}} + } + % option: firstskipothers + \gmglsopt{first\-skip\-others} + { + \syntax{\meta{boolean}} + \initval{false} + \defval{true} + \desc{determines whether or not to skip the \qt{other} elements on \idx{mfirstuse}} + } + % option: usedskipmain + \gmglsopt{used\-skip\-main} + { + \syntax{\meta{boolean}} + \initval{false} + \defval{true} + \desc{determines whether or not to skip the main entry on + \idx{msubsequentuse}} + } + % option: usedskipothers + \gmglsopt{used\-skip\-others} + { + \syntax{\meta{boolean}} + \initval{false} + \defval{true} + \desc{determines whether or not to skip the \qt{other} elements + on \idx{msubsequentuse}} + } + % option: hyper (\multiglossaryentry) + \gmglsopt{multi.hyper} + { + \name{hyper} + \syntax{\meta{value}} + \initval{individual} + \desc{indicates which elements should have hyperlinks, if + supported. This option is a multi-entry setting, see + \sectionref{sec:multiglsoptions}} + } + % option: hyper (\mgls) + \gmglsopt{hyper} + { + \syntax{\meta{boolean}} + \defval{true} + \desc{indicates whether or not to use hyperlinks, if supported, + for all elements. This option is for use in the optional + argument of \gls{mgls} and can be set implicitly with the + default behaviour of the \cmdmod{star} and \cmdmod{plus} modifiers} + } + % option: textformat + \gmglsopt{text\-format} + { + \syntax{\meta{value}} + \initval{@firstofone} + \desc{the control sequence name of the command that should + encapsulate the entire content} + } + % option: category + \gmglsopt{category} + { + \syntax{\meta{category-label}} + \desc{the category to assign to the multi-entry set} + } + % option: mglsopts + \gmglsopt{mgls\-opts} + { + \syntax{\meta{option list}} + \desc{the default options to pass to commands like \gls{mgls}} + } + % option: setup + \gmglsopt{set\-up} + { + \syntax{\meta{option list}} + \desc{multi-entry options that will override any conflicting + options already assigned to the multi-entry} + } + % option: all + \gmglsopt{all} + { + \syntax{\meta{option list}} + \desc{options to pass to the \idx{glslike} command for each element} + } + % option: main + \gmglsopt{main} + { + \syntax{\meta{option list}} + \desc{options to pass to the \idx{glslike} command for the main entry} + } + % option: others + \gmglsopt{others} + { + \syntax{\meta{option list}} + \desc{options to pass to the \idx{glslike} command for the \qt{other} + elements} + } + % option: multiunset + \gmglsopt{multi\-un\-set} + { + \syntax{\meta{value}} + \initval{global} + \desc{indicates whether or not the \idx{mfirstuseflag} should be unset} + } + % option: presetlocal + \gmglsopt{pre\-set\-local} + { + \syntax{\meta{boolean}} + \initval{false} + \defval{true} + \desc{indicates whether or not the prereset options should have + a local or global effect} + } + % option: resetall + \gmglsopt{reset\-all} + { + \syntax{\meta{boolean}} + \initval{false} + \defval{true} + \desc{indicates whether or not to reset all elements' + \idx{firstuseflag} before using \gls{gls}} + } + % option: resetmain + \gmglsopt{reset\-main} + { + \syntax{\meta{boolean}} + \initval{false} + \defval{true} + \desc{indicates whether or not to reset the main entry's + \idx{firstuseflag} before using \gls{gls}} + } + % option: resetothers + \gmglsopt{reset\-others} + { + \syntax{\meta{boolean}} + \initval{false} + \defval{true} + \desc{indicates whether or not to reset all \qt{other} elements' + \idx{firstuseflag} before using \gls{gls}} + } + % option: unsetall + \gmglsopt{unset\-all} + { + \syntax{\meta{boolean}} + \initval{false} + \defval{true} + \desc{indicates whether or not to unset all elements' + \idx{firstuseflag} before using \gls{gls}} + } + % option: unsetmain + \gmglsopt{unset\-main} + { + \syntax{\meta{boolean}} + \initval{false} + \defval{true} + \desc{indicates whether or not to unset the main entry's + \idx{firstuseflag} before using \gls{gls}} + } + % option: unsetothers + \gmglsopt{unset\-others} + { + \syntax{\meta{boolean}} + \initval{false} + \defval{true} + \desc{indicates whether or not to unset all \qt{other} elements' + \idx{firstuseflag} before using \gls{gls}} + } + % COMMANDS: PREFIXES + % \pgls + \gcmdspa{pgls}{% + \providedby{\sty{glossaries-prefix}} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{similar to \gls{gls} but inserts the appropriate prefix, + if provided} + } + % \Pgls + \gcmdspa{Pgls}{% + \providedby{\sty{glossaries-prefix}} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{as \gls{pgls} but \idx{sentencecase}} + } + % \PGLS + \gcmdspa{PGLS}{% + \providedby{\sty{glossaries-prefix}} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{as \gls{pgls} but \idx{allcaps}} + } + % \pglspl + \gcmdspa{pgls\-pl}{% + \providedby{\sty{glossaries-prefix}} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{similar to \gls{glspl} but inserts the appropriate prefix, + if provided} + } + % \Pglspl + \gcmdspa{Pgls\-pl}{% + \providedby{\sty{glossaries-prefix}} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{as \gls{pgls} but \idx{sentencecase}} + } + % \PGLSpl + \gcmdspa{PGLS\-pl}{% + \providedby{\sty{glossaries-prefix}} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{as \gls{pgls} but \idx{allcaps}} + } + % \glsprefixsep + \gcmd{glsprefixsep} + { + \providedby{\sty{glossaries-prefix} v4.45+} + \initvalempty + \desc{separator between the prefix and the term} + } + % COMMANDS: PREFIXES (glossaries-extra) + % \pglsxtrshort + \gcmdspa{pgls\-xtr\-short}{% + \providedby{\sty{glossaries-extra} v1.49+} + \note{requires \sty{glossaries-prefix}} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{as \gls{glsxtrshort} but inserts the \gloskey{prefix} + field and separator in front if set} + } + % \pglsxtrshortpl + \gcmdspa{pgls\-xtr\-short\-pl}{% + \providedby{\sty{glossaries-extra} v1.49+} + \note{requires \sty{glossaries-prefix}} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{as \gls{glsxtrshortpl} but inserts the \gloskey{prefixplural} + field and separator in front if set} + } + % \pglsxtrlong + \gcmdspa{pgls\-xtr\-long}{% + \providedby{\sty{glossaries-extra} v1.49+} + \note{requires \sty{glossaries-prefix}} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{as \gls{glsxtrlong} but inserts the \gloskey{prefixfirst} + field and separator in front if set} + } + % \pglsxtrlongpl + \gcmdspa{pgls\-xtr\-long\-pl}{% + \providedby{\sty{glossaries-extra} v1.49+} + \note{requires \sty{glossaries-prefix}} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{as \gls{glsxtrlongpl} but inserts the \gloskey{prefixfirstplural} + field and separator in front if set} + } + % \Pglsxtrshort + \gcmdspa{Pgls\-xtr\-short}{% + \providedby{\sty{glossaries-extra} v1.49+} + \note{requires \sty{glossaries-prefix}} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{as \gls{pglsxtrshort} but \idx{sentencecase}} + } + % \Pglsxtrshortpl + \gcmdspa{Pgls\-xtr\-short\-pl}{% + \providedby{\sty{glossaries-extra} v1.49+} + \note{requires \sty{glossaries-prefix}} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{as \gls{pglsxtrshortpl} but \idx{sentencecase}} + } + % \Pglsxtrlong + \gcmdspa{Pgls\-xtr\-long}{% + \providedby{\sty{glossaries-extra} v1.49+} + \note{requires \sty{glossaries-prefix}} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{as \gls{pglsxtrlong} but \idx{sentencecase}} + } + % \Pglsxtrlongpl + \gcmdspa{Pgls\-xtr\-long\-pl}{% + \providedby{\sty{glossaries-extra} v1.49+} + \note{requires \sty{glossaries-prefix}} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{as \gls{pglsxtrlongpl} but \idx{sentencecase}} + } + % \PGLSxtrshort + \gcmdspa{PGLS\-xtr\-short}{% + \providedby{\sty{glossaries-extra} v1.49+} + \note{requires \sty{glossaries-prefix}} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{as \gls{pglsxtrshort} but \idx{allcaps}} + } + % \PGLSxtrshortpl + \gcmdspa{PGLS\-xtr\-short\-pl}{% + \providedby{\sty{glossaries-extra} v1.49+} + \note{requires \sty{glossaries-prefix}} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{as \gls{pglsxtrshortpl} but \idx{allcaps}} + } + % \PGLSxtrlong + \gcmdspa{PGLS\-xtr\-long}{% + \providedby{\sty{glossaries-extra} v1.49+} + \note{requires \sty{glossaries-prefix}} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{as \gls{pglsxtrlong} but \idx{allcaps}} + } + % \PGLSxtrlongpl + \gcmdspa{PGLS\-xtr\-long\-pl}{% + \providedby{\sty{glossaries-extra} v1.49+} + \note{requires \sty{glossaries-prefix}} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{as \gls{pglsxtrlongpl} but \idx{allcaps}} + } + % \pglsfmtshort + \gcmdspa{pgls\-fmt\-short}{% + \providedby{\sty{glossaries-extra} v1.49+} + \note{requires \sty{glossaries-prefix}} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{as \gls{glsfmtshort} but inserts the \gloskey{prefix} + field and separator in front if set} + } + % \pglsfmtshortpl + \gcmdspa{pgls\-fmt\-short\-pl}{% + \providedby{\sty{glossaries-extra} v1.49+} + \note{requires \sty{glossaries-prefix}} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{as \gls{glsfmtshortpl} but inserts the \gloskey{prefixplural} + field and separator in front if set} + } + % \pglsfmtlong + \gcmdspa{pgls\-fmt\-long}{% + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{as \gls{glsfmtlong} but inserts the \gloskey{prefixfirst} + field and separator in front if set} + } + % \pglsfmtlongpl + \gcmdspa{pgls\-fmt\-long\-pl}{% + \providedby{\sty{glossaries-extra} v1.49+} + \note{requires \sty{glossaries-prefix}} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{as \gls{glsfmtlongpl} but inserts the \gloskey{prefixfirstplural} + field and separator in front if set} + } + % \Pglsfmtshort + \gcmdspa{Pgls\-fmt\-short}{% + \providedby{\sty{glossaries-extra} v1.49+} + \note{requires \sty{glossaries-prefix}} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{as \gls{pglsfmtshort} but \idx{sentencecase}} + } + % \Pglsfmtshortpl + \gcmdspa{Pgls\-fmt\-short\-pl}{% + \providedby{\sty{glossaries-extra} v1.49+} + \note{requires \sty{glossaries-prefix}} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{as \gls{pglsfmtshortpl} but \idx{sentencecase}} + } + % \PGLSfmtshort + \gcmdspa{PGLS\-fmt\-short}{% + \providedby{\sty{glossaries-extra} v1.49+} + \note{requires \sty{glossaries-prefix}} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{as \gls{pglsfmtshort} but \idx{allcaps}} + } + % \PGLSfmtshortpl + \gcmdspa{PGLS\-fmt\-short\-pl}{% + \providedby{\sty{glossaries-extra} v1.49+} + \note{requires \sty{glossaries-prefix}} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{as \gls{pglsfmtshortpl} but \idx{allcaps}} + } + % \Pglsfmtlong + \gcmdspa{Pgls\-fmt\-long}{% + \providedby{\sty{glossaries-extra} v1.49+} + \note{requires \sty{glossaries-prefix}} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{as \gls{pglsfmtlong} but \idx{sentencecase}} + } + % \Pglsfmtlongpl + \gcmdspa{Pgls\-fmt\-long\-pl}{% + \providedby{\sty{glossaries-extra} v1.49+} + \note{requires \sty{glossaries-prefix}} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{as \gls{pglsfmtlongpl} but \idx{sentencecase}} + } + % \PGLSfmtlong + \gcmdspa{PGLS\-fmt\-long}{% + \providedby{\sty{glossaries-extra} v1.49+} + \note{requires \sty{glossaries-prefix}} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{as \gls{pglsfmtlong} but \idx{allcaps}} + } + % \PGLSfmtlongpl + \gcmdspa{PGLS\-fmt\-long\-pl}{% + \providedby{\sty{glossaries-extra} v1.49+} + \note{requires \sty{glossaries-prefix}} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{as \gls{pglsfmtlongpl} but \idx{allcaps}} + } + % \Pglsxtrtitleshort + \gcmd{Pgls\-xtr\-title\-short} + { + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{entry-label}} + \note{requires \sty{glossaries-prefix}} + \desc{the normal behaviour of \gls{Pglsfmtshort}} + } + % \Pglsxtrtitleshortpl + \gcmd{Pgls\-xtr\-title\-short\-pl} + { + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{entry-label}} + \note{requires \sty{glossaries-prefix}} + \desc{the normal behaviour of \gls{Pglsfmtshortpl}} + } + % \Pglsxtrtitlelong + \gcmd{Pgls\-xtr\-title\-long} + { + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{entry-label}} + \note{requires \sty{glossaries-prefix}} + \desc{the normal behaviour of \gls{Pglsfmtlong}} + } + % \Pglsxtrtitlelongpl + \gcmd{Pgls\-xtr\-title\-long\-pl} + { + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{entry-label}} + \note{requires \sty{glossaries-prefix}} + \desc{the normal behaviour of \gls{Pglsfmtlongpl}} + } + % COMMANDS: ACCESSIBILITY + % \glsentrysymbolaccess + \gcmd{gls\-entry\-symbol\-access} + { + \providedby{\sty{glossaries-accsupp}} + \syntax{\margm{entry-label}} + \desc{as \gls{glsentrysymbol} but for the \gloskey{symbolaccess} field} + } + % \glsxtrassignactualsetup + \gcmd{gls\-xtr\-assign\-actual\-set\-up} + { + \providedby{\sty{glossaries-extra} v1.42+} + \note{requires \opt{accsupp}} + \desc{used to strip common formatting commands from a field + value to supply the text-only accessibility content when + initialising the default \gloskey{shortaccess} and + \gloskey{shortpluralaccess} values} + } + % \glsdefaultshortaccess + \gcmd{gls\-default\-short\-access} + { + \note{requires \opt{accsupp}} + \providedby{\sty{glossaries-accsupp} v4.45+} + \syntax{\margm{long}\margm{short}} + \desc{used when \gls{newabbreviation} automatically assigns + \gloskey{shortaccess}. This is defined by + \sty{glossaries-accsupp} to just do \meta{long} but is redefined by + \sty{glossaries-extra} to do \code{\meta{long} (\meta{short})}} + } + % \glsnameaccessdisplay + \gcmd{gls\-name\-access\-display} + { + \providedby{\sty{glossaries-accsupp}} + \syntax{\margm{text}\margm{entry-label}} + \desc{does \meta{text} with the \gloskey{access} replacement + text (if set)} + } + % \glstextaccessdisplay + \gcmd{gls\-text\-access\-display} + { + \providedby{\sty{glossaries-accsupp}} + \syntax{\margm{text}\margm{entry-label}} + \desc{does \meta{text} with the \gloskey{textaccess} replacement + text (if set)} + } + % \glspluralaccessdisplay + \gcmd{gls\-plural\-access\-display} + { + \providedby{\sty{glossaries-accsupp}} + \syntax{\margm{text}\margm{entry-label}} + \desc{does \meta{text} with the \gloskey{pluralaccess} replacement + text (if set)} + } + % \glsfirstaccessdisplay + \gcmd{gls\-first\-access\-display} + { + \providedby{\sty{glossaries-accsupp}} + \syntax{\margm{text}\margm{entry-label}} + \desc{does \meta{text} with the \gloskey{firstaccess} replacement + text (if set)} + } + % \glsfirstpluralaccessdisplay + \gcmd{gls\-first\-plural\-access\-display} + { + \providedby{\sty{glossaries-accsupp}} + \syntax{\margm{text}\margm{entry-label}} + \desc{does \meta{text} with the \gloskey{firstpluralaccess} replacement + text (if set)} + } + % \glssymbolaccessdisplay + \gcmd{gls\-symbol\-access\-display} + { + \providedby{\sty{glossaries-accsupp}} + \syntax{\margm{text}\margm{entry-label}} + \desc{does \meta{text} with the \gloskey{symbolaccess} replacement + text (if set)} + } + % \glssymbolpluralaccessdisplay + \gcmd{gls\-symbol\-plural\-access\-display} + { + \providedby{\sty{glossaries-accsupp}} + \syntax{\margm{text}\margm{entry-label}} + \desc{does \meta{text} with the \gloskey{symbolpluralaccess} replacement + text (if set)} + } + % \glsdescriptionaccessdisplay + \gcmd{gls\-description\-access\-display} + { + \providedby{\sty{glossaries-accsupp}} + \syntax{\margm{text}\margm{entry-label}} + \desc{does \meta{text} with the \gloskey{descriptionaccess} replacement + text (if set)} + } + % \glsdescriptionpluralaccessdisplay + \gcmd{gls\-description\-plural\-access\-display} + { + \providedby{\sty{glossaries-accsupp}} + \syntax{\margm{text}\margm{entry-label}} + \desc{does \meta{text} with the \gloskey{descriptionpluralaccess} replacement + text (if set)} + } + % \glsshortaccessdisplay + \gcmd{gls\-short\-access\-display} + { + \providedby{\sty{glossaries-accsupp}} + \syntax{\margm{text}\margm{entry-label}} + \desc{does \meta{text} with the \gloskey{shortaccess} replacement + text (if set)} + } + % \glsshortpluralaccessdisplay + \gcmd{gls\-short\-plural\-access\-display} + { + \providedby{\sty{glossaries-accsupp}} + \syntax{\margm{text}\margm{entry-label}} + \desc{does \meta{text} with the \gloskey{shortpluralaccess} replacement + text (if set)} + } + % \glslongaccessdisplay + \gcmd{gls\-long\-access\-display} + { + \providedby{\sty{glossaries-accsupp}} + \syntax{\margm{text}\margm{entry-label}} + \desc{does \meta{text} with the \gloskey{longaccess} replacement + text (if set)} + } + % \glslongpluralaccessdisplay + \gcmd{gls\-long\-plural\-access\-display} + { + \providedby{\sty{glossaries-accsupp}} + \syntax{\margm{text}\margm{entry-label}} + \desc{does \meta{text} with the \gloskey{longpluralaccess} replacement + text (if set)} + } + % \glsuseriaccessdisplay + \gcmd{gls\-user\-i\-access\-display} + { + \providedby{\sty{glossaries-accsupp} v4.45+} + \syntax{\margm{text}\margm{entry-label}} + \desc{does \meta{text} with the \gloskey{user1access} replacement + text (if set)} + } + % \glsuseriiaccessdisplay + \gcmd{gls\-user\-ii\-access\-display} + { + \providedby{\sty{glossaries-accsupp} v4.45+} + \syntax{\margm{text}\margm{entry-label}} + \desc{does \meta{text} with the \gloskey{user2access} replacement + text (if set)} + } + % \glsuseriiiaccessdisplay + \gcmd{gls\-user\-iii\-access\-display} + { + \providedby{\sty{glossaries-accsupp} v4.45+} + \syntax{\margm{text}\margm{entry-label}} + \desc{does \meta{text} with the \gloskey{user3access} replacement + text (if set)} + } + % \glsuserivaccessdisplay + \gcmd{gls\-user\-iv\-access\-display} + { + \providedby{\sty{glossaries-accsupp} v4.45+} + \syntax{\margm{text}\margm{entry-label}} + \desc{does \meta{text} with the \gloskey{user4access} replacement + text (if set)} + } + % \glsuservaccessdisplay + \gcmd{gls\-user\-v\-access\-display} + { + \providedby{\sty{glossaries-accsupp} v4.45+} + \syntax{\margm{text}\margm{entry-label}} + \desc{does \meta{text} with the \gloskey{user5access} replacement + text (if set)} + } + % \glsuserviaccessdisplay + \gcmd{gls\-user\-vi\-access\-display} + { + \providedby{\sty{glossaries-accsupp} v4.45+} + \syntax{\margm{text}\margm{entry-label}} + \desc{does \meta{text} with the \gloskey{user6access} replacement + text (if set)} + } + % \glsaccessname + \gcmd{gls\-access\-name} + {% + %\providedby{\sty{glossaries-extra} v0.3+} + \syntax{\margm{entry-label}} + \desc{if accessibility support was enabled when + \sty{glossaries-extra} was loaded (\opt{accsupp}) this will + display the value of the \gloskey{name} key with the accessibility + support enabled for that key (\gloskey{access}). If there is no accessibility + support, this just uses \gls{glsentryname}} + } + % \Glsaccessname + \gcmd{Gls\-access\-name} + {% + %\providedby{\sty{glossaries-extra} v0.5.1+} + \syntax{\margm{entry-label}} + \desc{the \idx{sentencecase} version of \gls{glsaccessname}} + } + % \GLSaccessname + \gcmd{GLS\-access\-name} + {% + %\providedby{\sty{glossaries-extra} v0.5.2+} + \syntax{\margm{entry-label}} + \desc{the \idx{allcaps} version of \gls{glsaccessname}} + } + % \glsaccesstext + \gcmd{gls\-access\-text} + {% + %\providedby{\sty{glossaries-extra} v0.3+} + \syntax{\margm{entry-label}} + \desc{if accessibility support was enabled when + \sty{glossaries-extra} was loaded (\opt{accsupp}) this will + display the value of the \gloskey{text} key with the accessibility + support enabled for that key (\gloskey{textaccess}). If there is no accessibility + support, this just uses \gls{glsentrytext}} + } + % \Glsaccesstext + \gcmd{Gls\-access\-text} + {% + %\providedby{\sty{glossaries-extra} v0.5.1+} + \syntax{\margm{entry-label}} + \desc{the \idx{sentencecase} version of \gls{glsaccesstext}} + } + % \GLSaccesstext + \gcmd{GLS\-access\-text} + {% + %\providedby{\sty{glossaries-extra} v0.5.2+} + \syntax{\margm{entry-label}} + \desc{the \idx{allcaps} version of \gls{glsaccesstext}} + } + % \glsaccessplural + \gcmd{gls\-access\-plural} + {% + %\providedby{\sty{glossaries-extra} v0.3+} + \syntax{\margm{entry-label}} + \desc{if accessibility support was enabled when + \sty{glossaries-extra} was loaded (\opt{accsupp}) this will + display the value of the \gloskey{plural} key with the accessibility + support enabled for that key (\gloskey{pluralaccess}). If there is + no accessibility support, this just uses \gls{glsentryplural}} + } + % \Glsaccessplural + \gcmd{Gls\-access\-plural} + {% + %\providedby{\sty{glossaries-extra} v0.5.1+} + \syntax{\margm{entry-label}} + \desc{the \idx{sentencecase} version of \gls{glsaccessplural}} + } + % \GLSaccessplural + \gcmd{GLS\-access\-plural} + {% + %\providedby{\sty{glossaries-extra} v0.5.2+} + \syntax{\margm{entry-label}} + \desc{the \idx{allcaps} version of \gls{glsaccessplural}} + } + % \glsaccessfirst + \gcmd{gls\-access\-first} + {% + %\providedby{\sty{glossaries-extra} v0.3+} + \syntax{\margm{entry-label}} + \desc{if accessibility support was enabled when + \sty{glossaries-extra} was loaded (\opt{accsupp}) this will + display the value of the \gloskey{first} key with the accessibility + support enabled for that key (\gloskey{firstaccess}). If there is + no accessibility support, this just uses \gls{glsentryfirst}} + } + % \Glsaccessfirst + \gcmd{Gls\-access\-first} + {% + %\providedby{\sty{glossaries-extra} v0.5.1+} + \syntax{\margm{entry-label}} + \desc{the \idx{sentencecase} version of \gls{glsaccessfirst}} + } + % \GLSaccessfirst + \gcmd{GLS\-access\-first} + {% + %\providedby{\sty{glossaries-extra} v0.5.2+} + \syntax{\margm{entry-label}} + \desc{the \idx{allcaps} version of \gls{glsaccessfirst}} + } + % \glsaccessfirstplural + \gcmd{gls\-access\-firstplural} + {% + %\providedby{\sty{glossaries-extra} v0.3+} + \syntax{\margm{entry-label}} + \desc{if accessibility support was enabled when + \sty{glossaries-extra} was loaded (\opt{accsupp}) this will + display the value of the \gloskey{firstplural} key with the accessibility + support enabled for that key (\gloskey{firstpluralaccess}). If there is + no accessibility support, this just uses \gls{glsentryfirstplural}} + } + % \Glsaccessfirstplural + \gcmd{Gls\-access\-firstplural} + {% + %\providedby{\sty{glossaries-extra} v0.5.1+} + \syntax{\margm{entry-label}} + \desc{the \idx{sentencecase} version of \gls{glsaccessfirstplural}} + } + % \GLSaccessfirstplural + \gcmd{GLS\-access\-firstplural} + {% + %\providedby{\sty{glossaries-extra} v0.5.2+} + \syntax{\margm{entry-label}} + \desc{the \idx{allcaps} version of \gls{glsaccessfirstplural}} + } + % \glsaccesssymbol + \gcmd{gls\-access\-symbol} + {% + %\providedby{\sty{glossaries-extra} v0.3+} + \syntax{\margm{entry-label}} + \desc{if accessibility support was enabled when + \sty{glossaries-extra} was loaded (\opt{accsupp}) this will + display the value of the \gloskey{symbol} key with the accessibility + support enabled for that key (\gloskey{symbolaccess}). If there is + no accessibility support, this just uses \gls{glsentrysymbol}} + } + % \Glsaccesssymbol + \gcmd{Gls\-access\-symbol} + {% + %\providedby{\sty{glossaries-extra} v0.5.1+} + \syntax{\margm{entry-label}} + \desc{the \idx{sentencecase} version of \gls{glsaccesssymbol}} + } + % \GLSaccesssymbol + \gcmd{GLS\-access\-symbol} + {% + %\providedby{\sty{glossaries-extra} v0.5.2+} + \syntax{\margm{entry-label}} + \desc{the \idx{allcaps} version of \gls{glsaccesssymbol}} + } + % \glsaccesssymbolplural + \gcmd{gls\-access\-symbolplural} + {% + %\providedby{\sty{glossaries-extra} v0.3+} + \syntax{\margm{entry-label}} + \desc{if accessibility support was enabled when + \sty{glossaries-extra} was loaded (\opt{accsupp}) this will + display the value of the \gloskey{symbolplural} key with the accessibility + support enabled for that key (\gloskey{symbolpluralaccess}). If there is + no accessibility support, this just uses \gls{glsentrysymbolplural}} + } + % \Glsaccesssymbolplural + \gcmd{Gls\-access\-symbolplural} + {% + %\providedby{\sty{glossaries-extra} v0.5.1+} + \syntax{\margm{entry-label}} + \desc{the \idx{sentencecase} version of \gls{glsaccesssymbolplural}} + } + % \GLSaccesssymbolplural + \gcmd{GLS\-access\-symbolplural} + {% + %\providedby{\sty{glossaries-extra} v0.5.2+} + \syntax{\margm{entry-label}} + \desc{the \idx{allcaps} version of \gls{glsaccesssymbolplural}} + } + % \glsaccessdesc + \gcmd{gls\-access\-desc} + {% + %\providedby{\sty{glossaries-extra} v0.3+} + \syntax{\margm{entry-label}} + \desc{if accessibility support was enabled when + \sty{glossaries-extra} was loaded (\opt{accsupp}) this will + display the value of the \gloskey{description} key with the accessibility + support enabled for that key (\gloskey{descriptionaccess}). If there is + no accessibility support, this just uses \gls{glsentrydesc}} + } + % \Glsaccessdesc + \gcmd{Gls\-access\-desc} + {% + %\providedby{\sty{glossaries-extra} v0.5.1+} + \syntax{\margm{entry-label}} + \desc{the \idx{sentencecase} version of \gls{glsaccessdesc}} + } + % \GLSaccessdesc + \gcmd{GLS\-access\-desc} + {% + %\providedby{\sty{glossaries-extra} v0.5.2+} + \syntax{\margm{entry-label}} + \desc{the \idx{allcaps} version of \gls{glsaccessdesc}} + } + % \glsaccessdescplural + \gcmd{gls\-access\-desc\-plural} + {% + %\providedby{\sty{glossaries-extra} v0.3+} + \syntax{\margm{entry-label}} + \desc{if accessibility support was enabled when + \sty{glossaries-extra} was loaded (\opt{accsupp}) this will + display the value of the \gloskey{descriptionplural} key with the accessibility + support enabled for that key (\gloskey{descriptionpluralaccess}). If there is + no accessibility support, this just uses \gls{glsentrydescplural}} + } + % \Glsaccessdescplural + \gcmd{Gls\-access\-desc\-plural} + {% + %\providedby{\sty{glossaries-extra} v0.5.1+} + \syntax{\margm{entry-label}} + \desc{the \idx{sentencecase} version of \gls{glsaccessdescplural}} + } + % \GLSaccessdescplural + \gcmd{GLS\-access\-desc\-plural} + {% + %\providedby{\sty{glossaries-extra} v0.5.2+} + \syntax{\margm{entry-label}} + \desc{the \idx{allcaps} version of \gls{glsaccessdescplural}} + } + % \glsaccessshort + \gcmd{gls\-access\-short} + {% + %\providedby{\sty{glossaries-extra} v0.3+} + \syntax{\margm{entry-label}} + \desc{if accessibility support was enabled when + \sty{glossaries-extra} was loaded (\opt{accsupp}) this will + display the value of the \gloskey{short} key with the accessibility + support enabled for that key (\gloskey{shortaccess}). If there is + no accessibility support, this just uses \gls{glsentryshort}} + } + % \Glsaccessshort + \gcmd{Gls\-access\-short} + {% + %\providedby{\sty{glossaries-extra} v0.5.1+} + \syntax{\margm{entry-label}} + \desc{the \idx{sentencecase} version of \gls{glsaccessshort}} + } + % \GLSaccessshort + \gcmd{GLS\-access\-short} + {% + %\providedby{\sty{glossaries-extra} v0.5.2+} + \syntax{\margm{entry-label}} + \desc{the \idx{allcaps} version of \gls{glsaccessshort}} + } + % \glsaccessshortpl + \gcmd{gls\-access\-shortpl} + {% + %\providedby{\sty{glossaries-extra} v0.3+} + \syntax{\margm{entry-label}} + \desc{if accessibility support was enabled when + \sty{glossaries-extra} was loaded (\opt{accsupp}) this will + display the value of the \gloskey{shortplural} key with the accessibility + support enabled for that key (\gloskey{shortpluralaccess}). If there is + no accessibility support, this just uses \gls{glsentryshortpl}} + } + % \Glsaccessshortpl + \gcmd{Gls\-access\-shortpl} + {% + %\providedby{\sty{glossaries-extra} v0.5.1+} + \syntax{\margm{entry-label}} + \desc{the \idx{sentencecase} version of \gls{glsaccessshortpl}} + } + % \GLSaccessshortpl + \gcmd{GLS\-access\-shortpl} + {% + %\providedby{\sty{glossaries-extra} v0.5.2+} + \syntax{\margm{entry-label}} + \desc{the \idx{allcaps} version of \gls{glsaccessshortpl}} + } + % \glsaccesslong + \gcmd{gls\-access\-long} + {% + %\providedby{\sty{glossaries-extra} v0.3+} + \syntax{\margm{entry-label}} + \desc{if accessibility support was enabled when + \sty{glossaries-extra} was loaded (\opt{accsupp}) this will + display the value of the \gloskey{long} key with the accessibility + support enabled for that key (\gloskey{longaccess}). If there is + no accessibility support, this just uses \gls{glsentrylong}} + } + % \Glsaccesslong + \gcmd{Gls\-access\-long} + {% + %\providedby{\sty{glossaries-extra} v0.5.1+} + \syntax{\margm{entry-label}} + \desc{the \idx{sentencecase} version of \gls{glsaccesslong}} + } + % \GLSaccesslong + \gcmd{GLS\-access\-long} + {% + %\providedby{\sty{glossaries-extra} v0.5.2+} + \syntax{\margm{entry-label}} + \desc{the \idx{allcaps} version of \gls{glsaccesslong}} + } + % \glsaccesslongpl + \gcmd{gls\-access\-longpl} + {% + %\providedby{\sty{glossaries-extra} v0.3+} + \syntax{\margm{entry-label}} + \desc{if accessibility support was enabled when + \sty{glossaries-extra} was loaded (\opt{accsupp}) this will + display the value of the \gloskey{longplural} key with the accessibility + support enabled for that key (\gloskey{longpluralaccess}). If there is + no accessibility support, this just uses \gls{glsentrylongpl}} + } + % \Glsaccesslongpl + \gcmd{Gls\-access\-longpl} + {% + %\providedby{\sty{glossaries-extra} v0.5.1+} + \syntax{\margm{entry-label}} + \desc{the \idx{sentencecase} version of \gls{glsaccesslongpl}} + } + % \GLSaccesslongpl + \gcmd{GLS\-access\-longpl} + {% + %\providedby{\sty{glossaries-extra} v0.5.2+} + \syntax{\margm{entry-label}} + \desc{the \idx{allcaps} version of \gls{glsaccesslongpl}} + } + % \glsaccessuseri + \gcmd{gls\-access\-useri} + {% + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{entry-label}} + \desc{if accessibility support was enabled when + \sty{glossaries-extra} was loaded (\opt{accsupp}) this will + display the value of the \gloskey{user1} key with the accessibility + support enabled for that key (\gloskey{user1access}). If there is + no accessibility support, this just uses \gls{glsentryuseri}} + } + % \Glsaccessuseri + \gcmd{Gls\-access\-useri} + {% + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{entry-label}} + \desc{the \idx{sentencecase} version of \gls{glsaccessuseri}} + } + % \GLSaccessuseri + \gcmd{GLS\-access\-useri} + {% + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{entry-label}} + \desc{the \idx{allcaps} version of \gls{glsaccessuseri}} + } + % \glsaccessuserii + \gcmd{gls\-access\-userii} + {% + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{entry-label}} + \desc{if accessibility support was enabled when + \sty{glossaries-extra} was loaded (\opt{accsupp}) this will + display the value of the \gloskey{user2} key with the accessibility + support enabled for that key (\gloskey{user2access}). If there is + no accessibility support, this just uses \gls{glsentryuserii}} + } + % \Glsaccessuserii + \gcmd{Gls\-access\-userii} + {% + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{entry-label}} + \desc{the \idx{sentencecase} version of \gls{glsaccessuserii}} + } + % \GLSaccessuserii + \gcmd{GLS\-access\-userii} + {% + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{entry-label}} + \desc{the \idx{allcaps} version of \gls{glsaccessuserii}} + } + % \glsaccessuseriii + \gcmd{gls\-access\-useriii} + {% + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{entry-label}} + \desc{if accessibility support was enabled when + \sty{glossaries-extra} was loaded (\opt{accsupp}) this will + display the value of the \gloskey{user3} key with the accessibility + support enabled for that key (\gloskey{user3access}). If there is + no accessibility support, this just uses \gls{glsentryuseriii}} + } + % \Glsaccessuseriii + \gcmd{Gls\-access\-useriii} + {% + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{entry-label}} + \desc{the \idx{sentencecase} version of \gls{glsaccessuseriii}} + } + % \GLSaccessuseriii + \gcmd{GLS\-access\-useriii} + {% + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{entry-label}} + \desc{the \idx{allcaps} version of \gls{glsaccessuseriii}} + } + % \glsaccessuseriv + \gcmd{gls\-access\-useriv} + {% + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{entry-label}} + \desc{if accessibility support was enabled when + \sty{glossaries-extra} was loaded (\opt{accsupp}) this will + display the value of the \gloskey{user4} key with the accessibility + support enabled for that key (\gloskey{user4access}). If there is + no accessibility support, this just uses \gls{glsentryuseriv}} + } + % \Glsaccessuseriv + \gcmd{Gls\-access\-useriv} + {% + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{entry-label}} + \desc{the \idx{sentencecase} version of \gls{glsaccessuseriv}} + } + % \GLSaccessuseriv + \gcmd{GLS\-access\-useriv} + {% + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{entry-label}} + \desc{the \idx{allcaps} version of \gls{glsaccessuseriv}} + } + % \glsaccessuserv + \gcmd{gls\-access\-userv} + {% + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{entry-label}} + \desc{if accessibility support was enabled when + \sty{glossaries-extra} was loaded (\opt{accsupp}) this will + display the value of the \gloskey{user5} key with the accessibility + support enabled for that key (\gloskey{user5access}). If there is + no accessibility support, this just uses \gls{glsentryuserv}} + } + % \Glsaccessuserv + \gcmd{Gls\-access\-userv} + {% + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{entry-label}} + \desc{the \idx{sentencecase} version of \gls{glsaccessuserv}} + } + % \GLSaccessuserv + \gcmd{GLS\-access\-userv} + {% + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{entry-label}} + \desc{the \idx{allcaps} version of \gls{glsaccessuserv}} + } + % \glsaccessuservi + \gcmd{gls\-access\-uservi} + {% + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{entry-label}} + \desc{if accessibility support was enabled when + \sty{glossaries-extra} was loaded (\opt{accsupp}) this will + display the value of the \gloskey{user6} key with the accessibility + support enabled for that key (\gloskey{user6access}). If there is + no accessibility support, this just uses \gls{glsentryuservi}} + } + % \Glsaccessuservi + \gcmd{Gls\-access\-uservi} + {% + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{entry-label}} + \desc{the \idx{sentencecase} version of \gls{glsaccessuservi}} + } + % \GLSaccessuservi + \gcmd{GLS\-access\-uservi} + {% + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{entry-label}} + \desc{the \idx{allcaps} version of \gls{glsaccessuservi}} + } + % \glsaccessfmtname + \gcmd{gls\-access\-fmt\-name} + {% + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{insert}\margm{cs}\margm{entry-label}} + \desc{similar to \gls{glsaccessname} but formats the displayed + text with \gls{glsfmtfield}} + } + % \Glsaccessfmtname + \gcmd{Gls\-access\-fmt\-name} + {% + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{insert}\margm{cs}\margm{entry-label}} + \desc{similar to \gls{Glsaccessname} but formats the displayed + text with \gls{Glsfmtfield}} + } + % \GLSaccessfmtname + \gcmd{GLS\-access\-fmt\-name} + {% + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{insert}\margm{cs}\margm{entry-label}} + \desc{similar to \gls{GLSaccessname} but formats the displayed + text with \gls{GLSfmtfield}} + } + % \glsaccessfmttext + \gcmd{gls\-access\-fmt\-text} + {% + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{insert}\margm{cs}\margm{entry-label}} + \desc{similar to \gls{glsaccesstext} but formats the displayed + text with \gls{glsfmtfield}} + } + % \Glsaccessfmttext + \gcmd{Gls\-access\-fmt\-text} + {% + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{insert}\margm{cs}\margm{entry-label}} + \desc{similar to \gls{Glsaccesstext} but formats the displayed + text with \gls{Glsfmtfield}} + } + % \GLSaccessfmttext + \gcmd{GLS\-access\-fmt\-text} + {% + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{insert}\margm{cs}\margm{entry-label}} + \desc{similar to \gls{GLSaccesstext} but formats the displayed + text with \gls{GLSfmtfield}} + } + % \glsaccessfmtplural + \gcmd{gls\-access\-fmt\-plural} + {% + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{insert}\margm{cs}\margm{entry-label}} + \desc{similar to \gls{glsaccessplural} but formats the displayed + text with \gls{glsfmtfield}} + } + % \Glsaccessfmtplural + \gcmd{Gls\-access\-fmt\-plural} + {% + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{insert}\margm{cs}\margm{entry-label}} + \desc{similar to \gls{Glsaccessplural} but formats the displayed + text with \gls{Glsfmtfield}} + } + % \GLSaccessfmtplural + \gcmd{GLS\-access\-fmt\-plural} + {% + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{insert}\margm{cs}\margm{entry-label}} + \desc{similar to \gls{GLSaccessplural} but formats the displayed + text with \gls{GLSfmtfield}} + } + % \glsaccessfmtfirst + \gcmd{gls\-access\-fmt\-first} + {% + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{insert}\margm{cs}\margm{entry-label}} + \desc{similar to \gls{glsaccessfirst} but formats the displayed + text with \gls{glsfmtfield}} + } + % \Glsaccessfmtfirst + \gcmd{Gls\-access\-fmt\-first} + {% + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{insert}\margm{cs}\margm{entry-label}} + \desc{similar to \gls{Glsaccessfirst} but formats the displayed + text with \gls{Glsfmtfield}} + } + % \GLSaccessfmtfirst + \gcmd{GLS\-access\-fmt\-first} + {% + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{insert}\margm{cs}\margm{entry-label}} + \desc{similar to \gls{GLSaccessfirst} but formats the displayed + text with \gls{GLSfmtfield}} + } + % \glsaccessfmtfirstplural + \gcmd{gls\-access\-fmt\-first\-plural} + {% + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{insert}\margm{cs}\margm{entry-label}} + \desc{similar to \gls{glsaccessfirstplural} but formats the displayed + text with \gls{glsfmtfield}} + } + % \Glsaccessfmtfirstplural + \gcmd{Gls\-access\-fmt\-first\-plural} + {% + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{insert}\margm{cs}\margm{entry-label}} + \desc{similar to \gls{Glsaccessfirstplural} but formats the displayed + text with \gls{Glsfmtfield}} + } + % \GLSaccessfmtfirstplural + \gcmd{GLS\-access\-fmt\-first\-plural} + {% + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{insert}\margm{cs}\margm{entry-label}} + \desc{similar to \gls{GLSaccessfirstplural} but formats the displayed + text with \gls{GLSfmtfield}} + } + % \glsaccessfmtsymbol + \gcmd{gls\-access\-fmt\-symbol} + {% + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{insert}\margm{cs}\margm{entry-label}} + \desc{similar to \gls{glsaccesssymbol} but formats the displayed + text with \gls{glsfmtfield}} + } + % \Glsaccessfmtsymbol + \gcmd{Gls\-access\-fmt\-symbol} + {% + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{insert}\margm{cs}\margm{entry-label}} + \desc{similar to \gls{Glsaccesssymbol} but formats the displayed + text with \gls{Glsfmtfield}} + } + % \GLSaccessfmtsymbol + \gcmd{GLS\-access\-fmt\-symbol} + {% + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{insert}\margm{cs}\margm{entry-label}} + \desc{similar to \gls{GLSaccesssymbol} but formats the displayed + text with \gls{GLSfmtfield}} + } + % \glsaccessfmtsymbolplural + \gcmd{gls\-access\-fmt\-symbol\-plural} + {% + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{insert}\margm{cs}\margm{entry-label}} + \desc{similar to \gls{glsaccesssymbolplural} but formats the displayed + text with \gls{glsfmtfield}} + } + % \Glsaccessfmtsymbolplural + \gcmd{Gls\-access\-fmt\-symbol\-plural} + {% + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{insert}\margm{cs}\margm{entry-label}} + \desc{similar to \gls{Glsaccesssymbolplural} but formats the displayed + text with \gls{Glsfmtfield}} + } + % \GLSaccessfmtsymbolplural + \gcmd{GLS\-access\-fmt\-symbol\-plural} + {% + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{insert}\margm{cs}\margm{entry-label}} + \desc{similar to \gls{GLSaccesssymbolplural} but formats the displayed + text with \gls{GLSfmtfield}} + } + % \glsaccessfmtdesc + \gcmd{gls\-access\-fmt\-desc} + {% + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{insert}\margm{cs}\margm{entry-label}} + \desc{similar to \gls{glsaccessdesc} but formats the displayed + text with \gls{glsfmtfield}} + } + % \Glsaccessfmtdesc + \gcmd{Gls\-access\-fmt\-desc} + {% + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{insert}\margm{cs}\margm{entry-label}} + \desc{similar to \gls{Glsaccessdesc} but formats the displayed + text with \gls{Glsfmtfield}} + } + % \GLSaccessfmtdesc + \gcmd{GLS\-access\-fmt\-desc} + {% + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{insert}\margm{cs}\margm{entry-label}} + \desc{similar to \gls{GLSaccessdesc} but formats the displayed + text with \gls{GLSfmtfield}} + } + % \glsaccessfmtdescplural + \gcmd{gls\-access\-fmt\-desc\-plural} + {% + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{insert}\margm{cs}\margm{entry-label}} + \desc{similar to \gls{glsaccessdescplural} but formats the displayed + text with \gls{glsfmtfield}} + } + % \Glsaccessfmtdescplural + \gcmd{Gls\-access\-fmt\-desc\-plural} + {% + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{insert}\margm{cs}\margm{entry-label}} + \desc{similar to \gls{Glsaccessdescplural} but formats the displayed + text with \gls{Glsfmtfield}} + } + % \GLSaccessfmtdescplural + \gcmd{GLS\-access\-fmt\-desc\-plural} + {% + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{insert}\margm{cs}\margm{entry-label}} + \desc{similar to \gls{GLSaccessdescplural} but formats the displayed + text with \gls{GLSfmtfield}} + } + % \glsaccessfmtshort + \gcmd{gls\-access\-fmt\-short} + {% + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{insert}\margm{cs}\margm{entry-label}} + \desc{similar to \gls{glsaccessshort} but formats the displayed + text with \gls{glsfmtfield}} + } + % \Glsaccessfmtshort + \gcmd{Gls\-access\-fmt\-short} + {% + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{insert}\margm{cs}\margm{entry-label}} + \desc{similar to \gls{Glsaccessshort} but formats the displayed + text with \gls{Glsfmtfield}} + } + % \GLSaccessfmtshort + \gcmd{GLS\-access\-fmt\-short} + {% + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{insert}\margm{cs}\margm{entry-label}} + \desc{similar to \gls{GLSaccessshort} but formats the displayed + text with \gls{GLSfmtfield}} + } + % \glsaccessfmtshortpl + \gcmd{gls\-access\-fmt\-short\-pl} + {% + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{insert}\margm{cs}\margm{entry-label}} + \desc{similar to \gls{glsaccessshortpl} but formats the displayed + text with \gls{glsfmtfield}} + } + % \Glsaccessfmtshortpl + \gcmd{Gls\-access\-fmt\-short\-pl} + {% + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{insert}\margm{cs}\margm{entry-label}} + \desc{similar to \gls{Glsaccessshortpl} but formats the displayed + text with \gls{Glsfmtfield}} + } + % \GLSaccessfmtshortpl + \gcmd{GLS\-access\-fmt\-short\-pl} + {% + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{insert}\margm{cs}\margm{entry-label}} + \desc{similar to \gls{GLSaccessshortpl} but formats the displayed + text with \gls{GLSfmtfield}} + } + % \glsaccessfmtlong + \gcmd{gls\-access\-fmt\-long} + {% + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{insert}\margm{cs}\margm{entry-label}} + \desc{similar to \gls{glsaccesslong} but formats the displayed + text with \gls{glsfmtfield}} + } + % \Glsaccessfmtlong + \gcmd{Gls\-access\-fmt\-long} + {% + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{insert}\margm{cs}\margm{entry-label}} + \desc{similar to \gls{Glsaccesslong} but formats the displayed + text with \gls{Glsfmtfield}} + } + % \GLSaccessfmtlong + \gcmd{GLS\-access\-fmt\-long} + {% + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{insert}\margm{cs}\margm{entry-label}} + \desc{similar to \gls{GLSaccesslong} but formats the displayed + text with \gls{GLSfmtfield}} + } + % \glsaccessfmtlongpl + \gcmd{gls\-access\-fmt\-long\-pl} + {% + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{insert}\margm{cs}\margm{entry-label}} + \desc{similar to \gls{glsaccesslongpl} but formats the displayed + text with \gls{glsfmtfield}} + } + % \Glsaccessfmtlongpl + \gcmd{Gls\-access\-fmt\-long\-pl} + {% + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{insert}\margm{cs}\margm{entry-label}} + \desc{similar to \gls{Glsaccesslongpl} but formats the displayed + text with \gls{Glsfmtfield}} + } + % \GLSaccessfmtlongpl + \gcmd{GLS\-access\-fmt\-long\-pl} + {% + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{insert}\margm{cs}\margm{entry-label}} + \desc{similar to \gls{GLSaccesslongpl} but formats the displayed + text with \gls{GLSfmtfield}} + } + % \glsaccessfmtuseri + \gcmd{gls\-access\-fmt\-useri} + {% + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{insert}\margm{cs}\margm{entry-label}} + \desc{similar to \gls{glsaccessuseri} but formats the displayed + text with \gls{glsfmtfield}} + } + % \Glsaccessfmtuseri + \gcmd{Gls\-access\-fmt\-useri} + {% + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{insert}\margm{cs}\margm{entry-label}} + \desc{similar to \gls{Glsaccessuseri} but formats the displayed + text with \gls{Glsfmtfield}} + } + % \GLSaccessfmtuseri + \gcmd{GLS\-access\-fmt\-useri} + {% + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{insert}\margm{cs}\margm{entry-label}} + \desc{similar to \gls{GLSaccessuseri} but formats the displayed + text with \gls{GLSfmtfield}} + } + % \glsaccessfmtuserii + \gcmd{gls\-access\-fmt\-userii} + {% + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{insert}\margm{cs}\margm{entry-label}} + \desc{similar to \gls{glsaccessuserii} but formats the displayed + text with \gls{glsfmtfield}} + } + % \Glsaccessfmtuserii + \gcmd{Gls\-access\-fmt\-userii} + {% + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{insert}\margm{cs}\margm{entry-label}} + \desc{similar to \gls{Glsaccessuserii} but formats the displayed + text with \gls{Glsfmtfield}} + } + % \GLSaccessfmtuserii + \gcmd{GLS\-access\-fmt\-userii} + {% + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{insert}\margm{cs}\margm{entry-label}} + \desc{similar to \gls{GLSaccessuserii} but formats the displayed + text with \gls{GLSfmtfield}} + } + % \glsaccessfmtuseriii + \gcmd{gls\-access\-fmt\-useriii} + {% + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{insert}\margm{cs}\margm{entry-label}} + \desc{similar to \gls{glsaccessuseriii} but formats the displayed + text with \gls{glsfmtfield}} + } + % \Glsaccessfmtuseriii + \gcmd{Gls\-access\-fmt\-useriii} + {% + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{insert}\margm{cs}\margm{entry-label}} + \desc{similar to \gls{Glsaccessuseriii} but formats the displayed + text with \gls{Glsfmtfield}} + } + % \GLSaccessfmtuseriii + \gcmd{GLS\-access\-fmt\-useriii} + {% + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{insert}\margm{cs}\margm{entry-label}} + \desc{similar to \gls{GLSaccessuseriii} but formats the displayed + text with \gls{GLSfmtfield}} + } + % \glsaccessfmtuseriv + \gcmd{gls\-access\-fmt\-useriv} + {% + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{insert}\margm{cs}\margm{entry-label}} + \desc{similar to \gls{glsaccessuseriv} but formats the displayed + text with \gls{glsfmtfield}} + } + % \Glsaccessfmtuseriv + \gcmd{Gls\-access\-fmt\-useriv} + {% + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{insert}\margm{cs}\margm{entry-label}} + \desc{similar to \gls{Glsaccessuseriv} but formats the displayed + text with \gls{Glsfmtfield}} + } + % \GLSaccessfmtuseriv + \gcmd{GLS\-access\-fmt\-useriv} + {% + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{insert}\margm{cs}\margm{entry-label}} + \desc{similar to \gls{GLSaccessuseriv} but formats the displayed + text with \gls{GLSfmtfield}} + } + % \glsaccessfmtuserv + \gcmd{gls\-access\-fmt\-userv} + {% + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{insert}\margm{cs}\margm{entry-label}} + \desc{similar to \gls{glsaccessuserv} but formats the displayed + text with \gls{glsfmtfield}} + } + % \Glsaccessfmtuserv + \gcmd{Gls\-access\-fmt\-userv} + {% + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{insert}\margm{cs}\margm{entry-label}} + \desc{similar to \gls{Glsaccessuserv} but formats the displayed + text with \gls{Glsfmtfield}} + } + % \GLSaccessfmtuserv + \gcmd{GLS\-access\-fmt\-userv} + {% + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{insert}\margm{cs}\margm{entry-label}} + \desc{similar to \gls{GLSaccessuserv} but formats the displayed + text with \gls{GLSfmtfield}} + } + % \glsaccessfmtuservi + \gcmd{gls\-access\-fmt\-uservi} + {% + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{insert}\margm{cs}\margm{entry-label}} + \desc{similar to \gls{glsaccessuservi} but formats the displayed + text with \gls{glsfmtfield}} + } + % \Glsaccessfmtuservi + \gcmd{Gls\-access\-fmt\-uservi} + {% + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{insert}\margm{cs}\margm{entry-label}} + \desc{similar to \gls{Glsaccessuservi} but formats the displayed + text with \gls{Glsfmtfield}} + } + % \GLSaccessfmtuservi + \gcmd{GLS\-access\-fmt\-uservi} + {% + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{insert}\margm{cs}\margm{entry-label}} + \desc{similar to \gls{GLSaccessuservi} but formats the displayed + text with \gls{GLSfmtfield}} + } + % COMMANDS: HEADINGS AND CAPTIONS + % \glsxtrRevertMarks + \gcmd{gls\-xtr\-Revert\-Marks} + { + %\providedby{\sty{glossaries-extra} v1.0+} + \desc{restores \gls{markright}, \gls{markboth} and + \gls{@starttoc} to their previous definitions} + \field{seealso}{glsxtrRevertTocMarks} + } + % \glsxtrRevertTocMarks + \gcmd{gls\-xtr\-Revert\-Toc\-Marks} + { + \providedby{\sty{glossaries-extra} v1.31+} + \desc{restores \gls{@starttoc} to its previous definition} + \field{seealso}{glsxtrRevertMarks} + } + % \glsxtrifinmark + \gcmd{glsxtrifinmark} + { + \providedby{\sty{glossaries-extra} v1.07+} + \syntax{\margm{true}\margm{false}} + \desc{does \meta{true} if within \gls{markright}, + \gls{markboth} or \gls{@starttoc} otherwise does \meta{false}} + } + % \@glsxtrinmark + \gcmd{@gls\-xtr\-in\-mark} + { + \providedby{\sty{glossaries-extra} v1.07+} + \desc{redefines \gls{glsxtrifinmark} to do its first argument + (\meta{true})} + } + % \@glsxtrnotinmark + \gcmd{@gls\-xtr\-not\-in\-mark} + { + \providedby{\sty{glossaries-extra} v1.07+} + \desc{redefines \gls{glsxtrifinmark} to do its first argument + (\meta{true})} + } + % \@glsxtr@org@markboth + \gcmd{@gls\-xtr\-@org\-@mark\-both} + { + %\providedby{\sty{glossaries-extra} v1.0+} + \syntax{\margm{left text}\margm{right text}} + \desc{set to the definition of \gls{markboth} when + \sty{glossaries-extra} loads} + } + % \@glsxtr@org@markright + \gcmd{@gls\-xtr\-@org\-@mark\-right} + { + %\providedby{\sty{glossaries-extra} v1.0+} + \syntax{\margm{text}} + \desc{set to the definition of \gls{markright} when + \sty{glossaries-extra} loads} + } + % \@glsxtr@org@@starttoc + \gcmd{@gls\-xtr\-@org\-@@start\-toc} + { + %\providedby{\sty{glossaries-extra} v1.0+} + \syntax{\margm{toc}} + \desc{set to the definition of \gls{@starttoc} when + \sty{glossaries-extra} loads} + } + % \glsxtrmarkhook + \gcmd{gls\-xtr\-mark\-hook} + { + %\providedby{\sty{glossaries-extra} v1.0+} + \desc{hook that's performed at the start of \gls{markright}, + \gls{markboth} and \gls{@starttoc} to redefine commands that + need to change when they occur within page headers or + contents. This must be counteracted with \gls{glsxtrrestoremarkhook} + afterwards} + } + % \glsxtrrestoremarkhook + \gcmd{gls\-xtr\-restore\-mark\-hook} + { + %\providedby{\sty{glossaries-extra} v1.0+} + \desc{counteracts \gls{glsxtrmarkhook}} + } + % \glsxtrtitleorpdforheading + \gcmd{gls\-xtr\-title\-or\-pdf\-or\-heading} + { + \providedby{\sty{glossaries-extra} v1.21+} + \syntax{\margm{title}\margm{PDF bookmarks}\margm{heading}} + \desc{does the applicable argument depending on whether the + command occurs within a title\slash caption or PDF bookmark or + heading} + } + % \glsxtrifheaduc + \gcmd{gls\-xtr\-if\-head\-uc} + { + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{entry-label}\margm{true}\margm{false}} + \desc{if the category associated with the entry given by + \meta{entry-label} has the \catattr{headuc} attribute set to + \code{true} this does \meta{true} otherwise it does \meta{false}} + } + % \glsxtrifintoc + \gcmd{gls\-xtr\-if\-in\-toc} + { + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{true}\margm{false}} + \desc{normally just expands to \meta{false} but \gls{@starttoc} + is redefined to temporarily set this macro to expand to \meta{true} + instead. Will always expand to \meta{false} if \gls{glsxtrRevertTocMarks} + or \gls{glsxtrRevertMarks} are used to revert \gls{@starttoc} + to its former definition} + } + % \glsfmtshort + \gcmd{gls\-fmt\-short} + { + %\providedby{\sty{glossaries-extra} v0.2+} + \syntax{\margm{entry-label}} + \desc{for use within captions or section titles to display the + formatted short form} + } + % \Glsfmtshort + \gcmd{Gls\-fmt\-short} + { + %\providedby{\sty{glossaries-extra} v0.2+} + \syntax{\margm{entry-label}} + \desc{for use within captions or section titles to display the + formatted \idx{sentencecase} short form} + } + % \GLSfmtshort + \gcmd{GLS\-fmt\-short} + { + %\providedby{\sty{glossaries-extra} v0.2+} + \syntax{\margm{entry-label}} + \desc{for use within captions or section titles to display the + formatted \idx{allcaps} short form} + } + % \glsfmtshortpl + \gcmd{gls\-fmt\-short\-pl} + { + %\providedby{\sty{glossaries-extra} v0.2+} + \syntax{\margm{entry-label}} + \desc{for use within captions or section titles to display the + formatted short plural form} + } + % \Glsfmtshortpl + \gcmd{Gls\-fmt\-short\-pl} + { + %\providedby{\sty{glossaries-extra} v0.2+} + \syntax{\margm{entry-label}} + \desc{for use within captions or section titles to display the + formatted \idx{sentencecase} short plural form} + } + % \GLSfmtshortpl + \gcmd{GLS\-fmt\-short\-pl} + { + %\providedby{\sty{glossaries-extra} v0.2+} + \syntax{\margm{entry-label}} + \desc{for use within captions or section titles to display the + formatted \idx{allcaps} short plural form} + } + % \glsfmtlong + \gcmd{gls\-fmt\-long} + { + %\providedby{\sty{glossaries-extra} v0.2+} + \syntax{\margm{entry-label}} + \desc{for use within captions or section titles to display the + formatted long form} + } + % \Glsfmtlong + \gcmd{Gls\-fmt\-long} + { + %\providedby{\sty{glossaries-extra} v0.2+} + \syntax{\margm{entry-label}} + \desc{for use within captions or section titles to display the + formatted \idx{sentencecase} long form} + } + % \GLSfmtlong + \gcmd{GLS\-fmt\-long} + { + %\providedby{\sty{glossaries-extra} v0.2+} + \syntax{\margm{entry-label}} + \desc{for use within captions or section titles to display the + formatted \idx{allcaps} long form} + } + % \glsfmtlongpl + \gcmd{gls\-fmt\-long\-pl} + { + %\providedby{\sty{glossaries-extra} v0.2+} + \syntax{\margm{entry-label}} + \desc{for use within captions or section titles to display the + formatted long plural form} + } + % \Glsfmtlongpl + \gcmd{Gls\-fmt\-long\-pl} + { + %\providedby{\sty{glossaries-extra} v0.2+} + \syntax{\margm{entry-label}} + \desc{for use within captions or section titles to display the + formatted \idx{sentencecase} long plural form} + } + % \GLSfmtlongpl + \gcmd{GLS\-fmt\-long\-pl} + { + %\providedby{\sty{glossaries-extra} v0.2+} + \syntax{\margm{entry-label}} + \desc{for use within captions or section titles to display the + formatted \idx{allcaps} long plural form} + } + % \glspdffmtfull + \gcmd{gls\-pdf\-fmt\-full} + { + \providedby{\sty{glossaries-extra} v1.42+} + \syntax{\margm{entry-label}} + \desc{shortcut for \code{\gls{glsentrylong}\margm{entry-label} + (\gls{glsentryshort}\margm{entry-label})} for use in PDF + bookmarks or other text-only contexts} + } + % \glspdffmtfullpl + \gcmd{gls\-pdf\-fmt\-full\-pl} + { + \providedby{\sty{glossaries-extra} v1.42+} + \syntax{\margm{entry-label}} + \desc{shortcut for \code{\gls{glsentrylongpl}\margm{entry-label} + (\gls{glsentryshortpl}\margm{entry-label})} for use in PDF + bookmarks or other text-only contexts} + } + % \glsfmtfull + \gcmd{gls\-fmt\-full} + { + \providedby{\sty{glossaries-extra} v1.02+} + \syntax{\margm{entry-label}} + \desc{designed for use in section headings or captions, this + expands to just \code{\gls{glspdffmtfull}\margm{entry-label}} + in PDF bookmarks, otherwise it + expands to \code{\gls{glsxtrtitlefull}\margm{entry-label}}} + } + % \Glsfmtfull + \gcmd{Gls\-fmt\-full} + { + \providedby{\sty{glossaries-extra} v1.02+} + \syntax{\margm{entry-label}} + \desc{designed for use in section headings or captions, this + expands to just \code{\gls{glspdffmtfull}\margm{entry-label}} + in PDF bookmarks (no case-change), otherwise it + expands to \code{\gls{Glsxtrtitlefull}\margm{entry-label}}} + } + % \GLSfmtfull + \gcmd{GLS\-fmt\-full} + { + \providedby{\sty{glossaries-extra} v1.42+} + \syntax{\margm{entry-label}} + \desc{designed for use in section headings or captions, this + expands to just \code{\gls{glspdffmtfull}\margm{entry-label}} + in PDF bookmarks (no case-change), otherwise it + expands to \code{\gls{GLSxtrtitlefull}\margm{entry-label}}} + } + % \glsfmtfullpl + \gcmd{gls\-fmt\-full\-pl} + { + \providedby{\sty{glossaries-extra} v1.02+} + \syntax{\margm{entry-label}} + \desc{designed for use in section headings or captions, this + expands to just \code{\gls{glspdffmtfullpl}\margm{entry-label}} + in PDF bookmarks, otherwise it + expands to \code{\gls{glsxtrtitlefullpl}\margm{entry-label}}} + } + % \Glsfmtfullpl + \gcmd{Gls\-fmt\-full\-pl} + { + \providedby{\sty{glossaries-extra} v1.02+} + \syntax{\margm{entry-label}} + \desc{designed for use in section headings or captions, this + expands to just \code{\gls{glspdffmtfullpl}\margm{entry-label}} + in PDF bookmarks (no case-change), otherwise it + expands to \code{\gls{Glsxtrtitlefullpl}\margm{entry-label}}} + } + % \GLSfmtfullpl + \gcmd{GLS\-fmt\-full\-pl} + { + \providedby{\sty{glossaries-extra} v1.42+} + \syntax{\margm{entry-label}} + \desc{designed for use in section headings or captions, this + expands to just \code{\gls{glspdffmtfullpl}\margm{entry-label}} + in PDF bookmarks (no case-change), otherwise it + expands to \code{\gls{GLSxtrtitlefullpl}\margm{entry-label}}} + } + % \glsfmtname + \gcmd{gls\-fmt\-name} + { + \providedby{\sty{glossaries-extra} v1.21+} + \syntax{\margm{entry-label}} + \desc{for use within captions or section titles to display the + formatted \gloskey{name}} + } + % \Glsfmtname + \gcmd{Gls\-fmt\-name} + { + \providedby{\sty{glossaries-extra} v1.21+} + \syntax{\margm{entry-label}} + \desc{for use within captions or section titles to display the + formatted \idx{sentencecase} \gloskey{name}} + } + % \GLSfmtname + \gcmd{GLS\-fmt\-name} + { + \providedby{\sty{glossaries-extra} v1.21+} + \syntax{\margm{entry-label}} + \desc{for use within captions or section titles to display the + formatted \idx{allcaps} \gloskey{name}} + } + % \glsfmttext + \gcmd{gls\-fmt\-text} + { + %\providedby{\sty{glossaries-extra} v0.5+} + \syntax{\margm{entry-label}} + \desc{for use within captions or section titles to display the + formatted \gloskey{text}} + } + % \Glsfmttext + \gcmd{Gls\-fmt\-text} + { + %\providedby{\sty{glossaries-extra} v0.5+} + \syntax{\margm{entry-label}} + \desc{for use within captions or section titles to display the + formatted \idx{sentencecase} \gloskey{text}} + } + % \GLSfmttext + \gcmd{GLS\-fmt\-text} + { + \providedby{\sty{glossaries-extra} v1.42+} + \syntax{\margm{entry-label}} + \desc{for use within captions or section titles to display the + formatted \idx{allcaps} \gloskey{text}} + } + % \glsfmtplural + \gcmd{gls\-fmt\-plural} + { + %\providedby{\sty{glossaries-extra} v0.5+} + \syntax{\margm{entry-label}} + \desc{for use within captions or section titles to display the + formatted \gloskey{plural}} + } + % \Glsfmtplural + \gcmd{Gls\-fmt\-plural} + { + %\providedby{\sty{glossaries-extra} v0.5+} + \syntax{\margm{entry-label}} + \desc{for use within captions or section titles to display the + formatted \idx{sentencecase} \gloskey{plural}} + } + % \GLSfmtplural + \gcmd{GLS\-fmt\-plural} + { + \providedby{\sty{glossaries-extra} v1.42+} + \syntax{\margm{entry-label}} + \desc{for use within captions or section titles to display the + formatted \idx{allcaps} \gloskey{plural}} + } + % \glsfmtfirst + \gcmd{gls\-fmt\-first} + { + %\providedby{\sty{glossaries-extra} v0.5+} + \syntax{\margm{entry-label}} + \desc{for use within captions or section titles to display the + formatted \gloskey{first}} + } + % \Glsfmtfirst + \gcmd{Gls\-fmt\-first} + { + %\providedby{\sty{glossaries-extra} v0.5+} + \syntax{\margm{entry-label}} + \desc{for use within captions or section titles to display the + formatted \idx{sentencecase} \gloskey{first}} + } + % \GLSfmtfirst + \gcmd{GLS\-fmt\-first} + { + \providedby{\sty{glossaries-extra} v1.42+} + \syntax{\margm{entry-label}} + \desc{for use within captions or section titles to display the + formatted \idx{allcaps} \gloskey{first}} + } + % \glsfmtfirstpl + \gcmd{gls\-fmt\-firstpl} + { + %\providedby{\sty{glossaries-extra} v0.5+} + \syntax{\margm{entry-label}} + \desc{for use within captions or section titles to display the + formatted \gloskey{firstplural}} + } + % \Glsfmtfirstpl + \gcmd{Gls\-fmt\-firstpl} + { + %\providedby{\sty{glossaries-extra} v0.5+} + \syntax{\margm{entry-label}} + \desc{for use within captions or section titles to display the + formatted \idx{sentencecase} \gloskey{firstplural}} + } + % \GLSfmtfirstpl + \gcmd{GLS\-fmt\-firstpl} + { + \providedby{\sty{glossaries-extra} v1.42+} + \syntax{\margm{entry-label}} + \desc{for use within captions or section titles to display the + formatted \idx{allcaps} \gloskey{firstplural}} + } + % COMMANDS: INNER HEAD AND TITLE + % \glsxtrtitleopts + \gcmd{gls\-xtr\-title\-opts} + { + \providedby{\sty{glossaries-extra} v1.49+} + \desc{expands to the options that commands like + \gls{glsfmtshort} should use in the title or caption within the + document text} + } + % \glsxtrheadshort + \gcmd{gls\-xtr\-head\-short} + { + %\providedby{\sty{glossaries-extra} v0.5.1+} + \syntax{\margm{entry-label}} + \desc{the behaviour of \gls{glsfmtshort} when it occurs in a + page header} + } + % \glsxtrtitleshort + \gcmd{gls\-xtr\-title\-short} + { + %\providedby{\sty{glossaries-extra} v0.5.1+} + \syntax{\margm{entry-label}} + \desc{the normal behaviour of \gls{glsfmtshort}} + } + % \Glsxtrheadshort + \gcmd{Gls\-xtr\-head\-short} + { + %\providedby{\sty{glossaries-extra} v0.5.1+} + \syntax{\margm{entry-label}} + \desc{the behaviour of \gls{Glsfmtshort} when it occurs in a + page header} + } + % \Glsxtrtitleshort + \gcmd{Gls\-xtr\-title\-short} + { + %\providedby{\sty{glossaries-extra} v0.5.1+} + \syntax{\margm{entry-label}} + \desc{the normal behaviour of \gls{Glsfmtshort}} + } + % \GLSxtrheadshort + \gcmd{GLS\-xtr\-head\-short} + { + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{entry-label}} + \desc{the behaviour of \gls{GLSfmtshort} when it occurs in a + page header} + } + % \GLSxtrtitleshort + \gcmd{GLS\-xtr\-title\-short} + { + \providedby{\sty{glossaries-extra} v1.42+} + \syntax{\margm{entry-label}} + \desc{the normal behaviour of \gls{GLSfmtshort}} + } + % \glsxtrheadshortpl + \gcmd{gls\-xtr\-head\-short\-pl} + { + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{entry-label}} + \desc{the behaviour of \gls{glsfmtshortpl} when it occurs in a + page header} + } + % \glsxtrtitleshortpl + \gcmd{gls\-xtr\-title\-short\-pl} + { + \providedby{\sty{glossaries-extra} v1.03+} + \syntax{\margm{entry-label}} + \desc{the normal behaviour of \gls{glsfmtshortpl}} + } + % \Glsxtrheadshortpl + \gcmd{Gls\-xtr\-head\-short\-pl} + { + %\providedby{\sty{glossaries-extra} v0.5+} + \syntax{\margm{entry-label}} + \desc{the behaviour of \gls{Glsfmtshortpl} when it occurs in a + page header} + } + % \Glsxtrtitleshortpl + \gcmd{Gls\-xtr\-title\-short\-pl} + { + %\providedby{\sty{glossaries-extra} v0.5+} + \syntax{\margm{entry-label}} + \desc{the normal behaviour of \gls{Glsfmtshortpl}} + } + % \GLSxtrheadshortpl + \gcmd{GLS\-xtr\-head\-short\-pl} + { + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{entry-label}} + \desc{the behaviour of \gls{GLSfmtshortpl} when it occurs in a + page header} + } + % \GLSxtrtitleshortpl + \gcmd{GLS\-xtr\-title\-short\-pl} + { + \providedby{\sty{glossaries-extra} v1.42+} + \syntax{\margm{entry-label}} + \desc{the normal behaviour of \gls{GLSfmtshortpl}} + } + % \glsxtrheadlong + \gcmd{gls\-xtr\-head\-long} + { + \providedby{\sty{glossaries-extra} v1.02+} + \syntax{\margm{entry-label}} + \desc{the behaviour of \gls{glsfmtlong} when it occurs in a + page header} + } + % \glsxtrtitlelong + \gcmd{gls\-xtr\-title\-long} + { + \providedby{\sty{glossaries-extra} v1.02+} + \syntax{\margm{entry-label}} + \desc{the normal behaviour of \gls{glsfmtlong}} + } + % \Glsxtrheadlong + \gcmd{Gls\-xtr\-head\-long} + { + \providedby{\sty{glossaries-extra} v1.02+} + \syntax{\margm{entry-label}} + \desc{the behaviour of \gls{Glsfmtlong} when it occurs in a + page header} + } + % \Glsxtrtitlelong + \gcmd{Gls\-xtr\-title\-long} + { + \providedby{\sty{glossaries-extra} v1.02+} + \syntax{\margm{entry-label}} + \desc{the normal behaviour of \gls{Glsfmtlong}} + } + % \GLSxtrheadlong + \gcmd{GLS\-xtr\-head\-long} + { + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{entry-label}} + \desc{the behaviour of \gls{GLSfmtlong} when it occurs in a + page header} + } + % \GLSxtrtitlelong + \gcmd{GLS\-xtr\-title\-long} + { + \providedby{\sty{glossaries-extra} v1.42+} + \syntax{\margm{entry-label}} + \desc{the normal behaviour of \gls{GLSfmtlong}} + } + % \glsxtrheadlongpl + \gcmd{gls\-xtr\-head\-long\-pl} + { + \providedby{\sty{glossaries-extra} v1.02+} + \syntax{\margm{entry-label}} + \desc{the behaviour of \gls{glsfmtlongpl} when it occurs in a + page header} + } + % \glsxtrtitlelongpl + \gcmd{gls\-xtr\-title\-long\-pl} + { + \providedby{\sty{glossaries-extra} v1.02+} + \syntax{\margm{entry-label}} + \desc{the normal behaviour of \gls{glsfmtlongpl}} + } + % \Glsxtrheadlongpl + \gcmd{Gls\-xtr\-head\-long\-pl} + { + \providedby{\sty{glossaries-extra} v1.02+} + \syntax{\margm{entry-label}} + \desc{the behaviour of \gls{Glsfmtlongpl} when it occurs in a + page header} + } + % \Glsxtrtitlelongpl + \gcmd{Gls\-xtr\-title\-long\-pl} + { + \providedby{\sty{glossaries-extra} v1.02+} + \syntax{\margm{entry-label}} + \desc{the normal behaviour of \gls{Glsfmtlongpl}} + } + % \GLSxtrheadlongpl + \gcmd{GLS\-xtr\-head\-long\-pl} + { + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{entry-label}} + \desc{the behaviour of \gls{GLSfmtlongpl} when it occurs in a + page header} + } + % \GLSxtrtitlelongpl + \gcmd{GLS\-xtr\-title\-long\-pl} + { + \providedby{\sty{glossaries-extra} v1.42+} + \syntax{\margm{entry-label}} + \desc{the normal behaviour of \gls{GLSfmtlongpl}} + } + % \glsxtrheadfull + \gcmd{gls\-xtr\-head\-full} + { + \providedby{\sty{glossaries-extra} v1.02+} + \syntax{\margm{entry-label}} + \desc{used to display the entry's full form in the page header + (converts to \idx{allcaps} if \catattr{headuc} attribute is \code{true})} + \field{seealso}{glsfmtfull,glsxtrtitlefull} + } + % \glsxtrtitlefull + \gcmd{gls\-xtr\-title\-full} + { + \providedby{\sty{glossaries-extra} v1.02+} + \syntax{\margm{entry-label}} + \desc{used to display the entry's full form in the section title and + table of contents} + \field{seealso}{glsfmtfull,glsxtrheadfull} + } + % \glsxtrheadfullpl + \gcmd{gls\-xtr\-head\-full\-pl} + { + \providedby{\sty{glossaries-extra} v1.02+} + \syntax{\margm{entry-label}} + \desc{used to display the entry's full plural form in the page header + (converts to \idx{allcaps} if \catattr{headuc} attribute is \code{true})} + \field{seealso}{glsfmtfullpl,glsxtrtitlefullpl} + } + % \glsxtrtitlefullpl + \gcmd{gls\-xtr\-title\-full\-pl} + { + \providedby{\sty{glossaries-extra} v1.02+} + \syntax{\margm{entry-label}} + \desc{used to display the entry's full plural form in the section title and + table of contents} + \field{seealso}{glsfmtfullpl,glsxtrheadfullpl} + } + % \Glsxtrheadfull + \gcmd{Gls\-xtr\-head\-full} + { + \providedby{\sty{glossaries-extra} v1.02+} + \syntax{\margm{entry-label}} + \desc{used to display the entry's \idx{sentencecase} full form in the page header + (converts to \idx{allcaps} if \catattr{headuc} attribute is \code{true})} + \field{seealso}{Glsfmtfull,Glsxtrtitlefull} + } + % \Glsxtrtitlefull + \gcmd{Gls\-xtr\-title\-full} + { + \providedby{\sty{glossaries-extra} v1.02+} + \syntax{\margm{entry-label}} + \desc{used to display the entry's \idx{sentencecase} full form in the section title and + table of contents} + \field{seealso}{Glsfmtfull,Glsxtrheadfull} + } + % \GLSxtrheadfull + \gcmd{GLS\-xtr\-head\-full} + { + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{entry-label}} + \desc{used to display the entry's \idx{allcaps} full form in the page header} + \field{seealso}{GLSfmtfull,GLSxtrtitlefull} + } + % \GLSxtrtitlefull + \gcmd{GLS\-xtr\-title\-full} + { + \providedby{\sty{glossaries-extra} v1.42+} + \syntax{\margm{entry-label}} + \desc{used to display the entry's \idx{allcaps} full form in the section title and + table of contents} + \field{seealso}{GLSfmtfull} + } + % \Glsxtrheadfullpl + \gcmd{Gls\-xtr\-head\-full\-pl} + { + \providedby{\sty{glossaries-extra} v1.02+} + \syntax{\margm{entry-label}} + \desc{used to display the entry's \idx{sentencecase} full plural form in the page header + (converts to \idx{allcaps} if \catattr{headuc} attribute is \code{true})} + \field{seealso}{Glsfmtfullpl,Glsxtrtitlefullpl} + } + % \Glsxtrtitlefullpl + \gcmd{Gls\-xtr\-title\-full\-pl} + { + \providedby{\sty{glossaries-extra} v1.02+} + \syntax{\margm{entry-label}} + \desc{used to display the entry's \idx{sentencecase} full plural form in the section title and + table of contents} + \field{seealso}{Glsfmtfullpl,Glsxtrheadfullpl} + } + % \GLSxtrheadfullpl + \gcmd{GLS\-xtr\-head\-full\-pl} + { + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{entry-label}} + \desc{used to display the entry's \idx{allcaps} full plural form in the + page header} + \field{seealso}{GLSfmtfullpl,GLSxtrtitlefullpl} + } + % \GLSxtrtitlefullpl + \gcmd{GLS\-xtr\-title\-full\-pl} + { + \providedby{\sty{glossaries-extra} v1.42+} + \syntax{\margm{entry-label}} + \desc{used to display the entry's \idx{allcaps} full plural form in the section title and + table of contents} + \field{seealso}{GLSfmtfullpl} + } + % \glsxtrheadname + \gcmd{gls\-xtr\-head\-name} + { + \providedby{\sty{glossaries-extra} v1.21+} + \syntax{\margm{entry-label}} + \desc{used to display the entry's name in the page header + (converts to \idx{allcaps} if \catattr{headuc} attribute is \code{true})} + \field{seealso}{glsfmtname,glsxtrtitlename} + } + % \glsxtrtitlename + \gcmd{gls\-xtr\-title\-name} + { + \providedby{\sty{glossaries-extra} v1.21+} + \syntax{\margm{entry-label}} + \desc{used to display the entry's name in the section title and + table of contents} + \field{seealso}{glsfmtname,glsxtrheadname} + } + % \Glsxtrheadname + \gcmd{Gls\-xtr\-head\-name} + { + \providedby{\sty{glossaries-extra} v1.21+} + \syntax{\margm{entry-label}} + \desc{used to display the \idx{sentencecase} entry's name in the page header + (converts to \idx{allcaps} if \catattr{headuc} attribute is \code{true})} + \field{seealso}{Glsfmtname,Glsxtrtitlename} + } + % \Glsxtrtitlename + \gcmd{Gls\-xtr\-title\-name} + { + \providedby{\sty{glossaries-extra} v1.21+} + \syntax{\margm{entry-label}} + \desc{used to display the \idx{sentencecase} entry's name in the section title and + table of contents} + \field{seealso}{Glsfmtname,Glsxtrheadname} + } + % \GLSxtrheadname + \gcmd{GLS\-xtr\-head\-name} + { + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{entry-label}} + \desc{used to display the \idx{allcaps} entry's + \gloskey{name} \idx{field} in the page header} + \field{seealso}{GLSfmtname,GLSxtrtitlename} + } + % \GLSxtrtitlename + \gcmd{GLS\-xtr\-title\-name} + { + \providedby{\sty{glossaries-extra} v1.42+} + \syntax{\margm{entry-label}} + \desc{used to display the \idx{allcaps} entry's name in the section title and + table of contents} + \field{seealso}{GLSfmtname,GLSxtrheadname} + } + % \glsxtrheadtext + \gcmd{gls\-xtr\-head\-text} + { + %\providedby{\sty{glossaries-extra} v0.5+} + \syntax{\margm{entry-label}} + \desc{used to display the entry's \gloskey{text} \idx{field} in the page header + (converts to \idx{allcaps} if \catattr{headuc} attribute is \code{true})} + \field{seealso}{glsfmttext,glsxtrtitletext} + } + % \glsxtrtitletext + \gcmd{gls\-xtr\-title\-text} + { + %\providedby{\sty{glossaries-extra} v0.5+} + \syntax{\margm{entry-label}} + \desc{used to display the entry's \gloskey{text} \idx{field} in the section title and + table of contents} + \field{seealso}{glsfmttext,glsxtrheadtext} + } + % \Glsxtrheadtext + \gcmd{Gls\-xtr\-head\-text} + { + %\providedby{\sty{glossaries-extra} v0.5+} + \syntax{\margm{entry-label}} + \desc{used to display the \idx{sentencecase} entry's + \gloskey{text} \idx{field} in the page header + (converts to \idx{allcaps} if \catattr{headuc} attribute is \code{true})} + \field{seealso}{Glsfmttext,Glsxtrtitletext} + } + % \Glsxtrtitletext + \gcmd{Gls\-xtr\-title\-text} + { + %\providedby{\sty{glossaries-extra} v0.5+} + \syntax{\margm{entry-label}} + \desc{used to display the \idx{sentencecase} entry's + \gloskey{text} \idx{field} in the section title and + table of contents} + \field{seealso}{Glsfmttext,Glsxtrheadtext} + } + % \GLSxtrheadtext + \gcmd{GLS\-xtr\-head\-text} + { + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{entry-label}} + \desc{used to display the \idx{allcaps} entry's + \gloskey{text} \idx{field} in the page header} + \field{seealso}{GLSfmttext,GLSxtrtitletext} + } + % \GLSxtrtitletext + \gcmd{GLS\-xtr\-title\-text} + { + \providedby{\sty{glossaries-extra} v1.42+} + \syntax{\margm{entry-label}} + \desc{used to display the \idx{allcaps} entry's \gloskey{text} \idx{field} + in the section title and table of contents} + \field{seealso}{GLSfmttext,GLSxtrheadtext} + } + % \glsxtrheadplural + \gcmd{gls\-xtr\-head\-plural} + { + %\providedby{\sty{glossaries-extra} v0.5+} + \syntax{\margm{entry-label}} + \desc{used to display the entry's \gloskey{plural} \idx{field} in the page header + (converts to \idx{allcaps} if \catattr{headuc} attribute is \code{true})} + \field{seealso}{glsfmtplural,glsxtrtitleplural} + } + % \glsxtrtitleplural + \gcmd{gls\-xtr\-title\-plural} + { + %\providedby{\sty{glossaries-extra} v0.5+} + \syntax{\margm{entry-label}} + \desc{used to display the entry's \gloskey{plural} \idx{field} in the section title and + table of contents} + \field{seealso}{glsfmtplural,glsxtrheadplural} + } + % \Glsxtrheadplural + \gcmd{Gls\-xtr\-head\-plural} + { + %\providedby{\sty{glossaries-extra} v0.5+} + \syntax{\margm{entry-label}} + \desc{used to display the \idx{sentencecase} entry's + \gloskey{plural} \idx{field} in the page header + (converts to \idx{allcaps} if \catattr{headuc} attribute is \code{true})} + \field{seealso}{Glsfmtplural,Glsxtrtitleplural} + } + % \Glsxtrtitleplural + \gcmd{Gls\-xtr\-title\-plural} + { + %\providedby{\sty{glossaries-extra} v0.5+} + \syntax{\margm{entry-label}} + \desc{used to display the \idx{sentencecase} entry's + \gloskey{plural} \idx{field} in the section title and + table of contents} + \field{seealso}{Glsfmtplural,Glsxtrheadplural} + } + % \GLSxtrheadplural + \gcmd{GLS\-xtr\-head\-plural} + { + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{entry-label}} + \desc{used to display the \idx{allcaps} entry's + \gloskey{plural} \idx{field} in the page header} + \field{seealso}{GLSfmtplural,GLSxtrtitleplural} + } + % \GLSxtrtitleplural + \gcmd{GLS\-xtr\-title\-plural} + { + \providedby{\sty{glossaries-extra} v1.42+} + \syntax{\margm{entry-label}} + \desc{used to display the \idx{allcaps} entry's \gloskey{plural} \idx{field} in the section title and + table of contents} + \field{seealso}{GLSfmtplural,GLSxtrheadplural} + } + % \glsxtrheadfirst + \gcmd{gls\-xtr\-head\-first} + { + %\providedby{\sty{glossaries-extra} v0.5+} + \syntax{\margm{entry-label}} + \desc{used to display the entry's \gloskey{first} \idx{field} in the page header + (converts to \idx{allcaps} if \catattr{headuc} attribute is \code{true})} + \field{seealso}{glsfmtfirst,glsxtrtitlefirst} + } + % \glsxtrtitlefirst + \gcmd{gls\-xtr\-title\-first} + { + %\providedby{\sty{glossaries-extra} v0.5+} + \syntax{\margm{entry-label}} + \desc{used to display the entry's \gloskey{first} \idx{field} in the section title and + table of contents} + \field{seealso}{glsfmtfirst,glsxtrheadfirst} + } + % \Glsxtrheadfirst + \gcmd{Gls\-xtr\-head\-first} + { + %\providedby{\sty{glossaries-extra} v0.5+} + \syntax{\margm{entry-label}} + \desc{used to display the \idx{sentencecase} entry's + \gloskey{first} \idx{field} in the page header + (converts to \idx{allcaps} if \catattr{headuc} attribute is \code{true})} + \field{seealso}{Glsfmtfirst,Glsxtrtitlefirst} + } + % \Glsxtrtitlefirst + \gcmd{Gls\-xtr\-title\-first} + { + %\providedby{\sty{glossaries-extra} v0.5+} + \syntax{\margm{entry-label}} + \desc{used to display the \idx{sentencecase} entry's + \gloskey{first} \idx{field} in the section title and + table of contents} + \field{seealso}{Glsfmtfirst,Glsxtrheadfirst} + } + % \GLSxtrheadfirst + \gcmd{GLS\-xtr\-head\-first} + { + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{entry-label}} + \desc{used to display the \idx{allcaps} entry's + \gloskey{first} \idx{field} in the page header} + \field{seealso}{GLSfmtfirst,GLSxtrtitlefirst} + } + % \GLSxtrtitlefirst + \gcmd{GLS\-xtr\-title\-first} + { + \providedby{\sty{glossaries-extra} v1.42+} + \syntax{\margm{entry-label}} + \desc{used to display the \idx{allcaps} entry's \gloskey{first} \idx{field} in the section title and + table of contents} + \field{seealso}{GLSfmtfirst,GLSxtrheadfirst} + } + % \glsxtrheadfirstplural + \gcmd{gls\-xtr\-head\-firstplural} + { + %\providedby{\sty{glossaries-extra} v0.5+} + \syntax{\margm{entry-label}} + \desc{used to display the entry's \gloskey{firstplural} \idx{field} in the page header + (converts to \idx{allcaps} if \catattr{headuc} attribute is \code{true})} + \field{seealso}{glsfmtfirstpl,glsxtrtitlefirstplural} + } + % \glsxtrtitlefirstplural + \gcmd{gls\-xtr\-title\-firstplural} + { + %\providedby{\sty{glossaries-extra} v0.5+} + \syntax{\margm{entry-label}} + \desc{used to display the entry's \gloskey{firstplural} \idx{field} in the section title and + table of contents} + \field{seealso}{glsfmtfirstpl,glsxtrheadfirstplural} + } + % \Glsxtrheadfirstplural + \gcmd{Gls\-xtr\-head\-firstplural} + { + %\providedby{\sty{glossaries-extra} v0.5+} + \syntax{\margm{entry-label}} + \desc{used to display the \idx{sentencecase} entry's + \gloskey{firstplural} \idx{field} in the page header + (converts to \idx{allcaps} if \catattr{headuc} attribute is \code{true})} + \field{seealso}{Glsfmtfirstpl,Glsxtrtitlefirstplural} + } + % \Glsxtrtitlefirstplural + \gcmd{Gls\-xtr\-title\-firstplural} + { + %\providedby{\sty{glossaries-extra} v0.5+} + \syntax{\margm{entry-label}} + \desc{used to display the \idx{sentencecase} entry's + \gloskey{firstplural} \idx{field} in the section title and + table of contents} + \field{seealso}{Glsfmtfirstpl,Glsxtrheadfirstplural} + } + % \GLSxtrheadfirstplural + \gcmd{GLS\-xtr\-head\-first\-plural} + { + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{entry-label}} + \desc{used to display the \idx{allcaps} entry's + \gloskey{firstplural} \idx{field} in the page header} + \field{seealso}{GLSfmtfirstpl,GLSxtrtitlefirstplural} + } + % \GLSxtrtitlefirstplural + \gcmd{GLS\-xtr\-title\-firstplural} + { + \providedby{\sty{glossaries-extra} v1.42+} + \syntax{\margm{entry-label}} + \desc{used to display the \idx{allcaps} entry's \gloskey{firstplural} \idx{field} in the section title and + table of contents} + \field{seealso}{GLSfmtfirstpl,GLSxtrheadfirstplural} + } + % COMMANDS: FORMATTING + % \glsxtrassignfieldfont + \gcmd{gls\-xtr\-assign\-field\-font} + { + \providedby{\sty{glossaries-extra} v1.04+} + \syntax{\margm{entry-label}} + \desc{used by the \idx{glstextlike} commands to initialise the + formatting commands required for the given entry} + } + % \glssetabbrvfmt + \gcmd{gls\-set\-abbrv\-fmt} + { + %\providedby{\sty{glossaries-extra} v1.0+} + \syntax{\margm{category}} + \desc{implements the \meta{display definitions} code for the + abbreviation style associated with the given category} + } + % \GlsXtrUseAbbrStyleSetup + \gcmd{Gls\-Xtr\-Use\-Abbr\-Style\-Set\-up} + { + %\providedby{\sty{glossaries-extra} v1.0+} + \syntax{\margm{style-name}} + \desc{implements the \meta{setup} code for the given + abbreviation style} + } + % \GlsXtrUseAbbrStyleFmts + \gcmd{Gls\-Xtr\-Use\-Abbr\-Style\-Fmts} + { + %\providedby{\sty{glossaries-extra} v1.0+} + \syntax{\margm{style-name}} + \desc{implements the \meta{display definitions} code for the given + abbreviation style} + } + % \glsuseabbrvfont + \gcmd{gls\-use\-abbrv\-font} + { + \providedby{\sty{glossaries-extra} v1.21+} + \syntax{\margm{style-name}\margm{text}} + \desc{formats \meta{text} according to the short format for the + given abbreviation style} + } + % \glsuselongfont + \gcmd{gls\-use\-long\-font} + { + \providedby{\sty{glossaries-extra} v1.21+} + \syntax{\margm{style-name}\margm{text}} + \desc{formats \meta{text} according to the long format for the + given abbreviation style} + } + % \glsxtrgenabbrvfmt + \gcmd{gls\-xtr\-gen\-abbrv\-fmt} + { + %\providedby{\sty{glossaries-extra} v1.0+} + \desc{the display format used by \gls{glsentryfmt} for entries that have + the \gloskey{short} field set and have the \catattr{regular} + attribute set to \code{false}} + } + % \glsgenentryfmt + \gcmd{gls\-gen\-entry\-fmt} + { + \providedby{\sty{glossaries} v3.11a+} + \desc{the display format used by \gls{glsentryfmt} for regular entries} + } + % \glsentryfmt + \gcmd{gls\-entry\-fmt} + { + \providedby{\sty{glossaries} v3.11a+} + \desc{the default display format used by the \idx{glslike} + commands. This checks if the \gloskey{short} field has been + set for the current entry and, if set, initialises the + abbreviation formatting commands (with \gls{glssetabbrvfmt}). + This command will do \gls{glsgenentryfmt} (encapsulated with + \gls{glsxtrregularfont}) if the entry is considered a regular + entry (\gls{glsifregular}) or if the entry doesn't have the + \gloskey{short} field set. Otherwise it will do \gls{glsxtrgenabbrvfmt} + encapsulated with \gls{glsxtrabbreviationfont}} + } + % \glsxtrregularfont + \gcmd{gls\-xtr\-regular\-font} + { + \providedby{\sty{glossaries-extra} v1.04+} + \syntax{\margm{text}} + \desc{used by \gls{glsentryfmt} to encapsulate regular entries. + Also used by \gls{glsxtrassignfieldfont} for regular entries} + } + % \glsxtrabbreviationfont + \gcmd{gls\-xtr\-ab\-bre\-vi\-a\-tion\-font} + { + \providedby{\sty{glossaries-extra} v1.30+} + \syntax{\margm{text}} + \desc{used by \gls{glsentryfmt} to encapsulate non-regular entries + the have the \gloskey{short} field set} + } + % \defglsentryfmt + \gcmd{def\-gls\-entry\-fmt} + { + \providedby{\sty{glossaries} v3.11a+} + \providedby{\sty{glossaries}} + \syntax{\oargm{type}\margm{display}} + \desc{overrides the default display format (\gls{glsentryfmt}) + for the given glossary. If \meta{type} is omitted, + \gls{glsdefaulttype} is assumed. This will make the + \idx{glslike} commands do \meta{display} for any entries that + have the \gloskey{type} field set to the given \meta{type}. If + you want to support any abbreviation styles, you need to include + \gls{glssetabbrvfmt} in \meta{display}. Non-regular abbreviation + styles are designed to work with \gls{glsxtrgenabbrvfmt}} + } + % \glslabel + \gcmd{gls\-label} + { + \providedby{\sty{glossaries}} + \desc{the current entry label, initialised by the \idx{glslike} + and \idx{glstextlike} commands. This command may be used + within associated hooks, entry display styles + (\gls{defglsentryfmt}), and the \idx{postlinkhook}} + } + % \glsinsert + \gcmd{gls\-insert} + { + \providedby{\sty{glossaries}} + \desc{the final \meta{insert} argument passed to the + \idx{glslike} commands (but not to the \idx{glstextlike} commands, + where the \meta{insert} is added to \gls{glscustomtext}). This command may be used + within associated hooks, entry display styles + (\gls{defglsentryfmt}), and the \idx{postlinkhook}} + \field{seealso}{glsxtrsaveinsert,glsxtrfullsaveinsert} + } + % \glscustomtext + \gcmd{gls\-custom\-text} + { + \providedby{\sty{glossaries}} + \desc{the custom text provided by \gls{glsdisp} or the + \idx{linktext} for the \idx{glstextlike} commands. This command may be used + within associated hooks, entry display styles + (\gls{defglsentryfmt}), and the \idx{postlinkhook}} + } + % \glsifplural + \gcmd{gls\-if\-plural} + { + \providedby{\sty{glossaries}} + \syntax{\margm{true}\margm{false}} + \desc{initialised by the \idx{glslike} + and \idx{glstextlike} commands, this expands to \meta{true} if + the calling command accesses a plural field (such as \gls{glspl} or + \gls{glsplural}) otherwise it expands to \meta{false}. This command may be used + within associated hooks, entry display styles + (\gls{defglsentryfmt}), and the \idx{postlinkhook}} + } + % \glscapscase + \gcmd{gls\-caps\-case} + { + \providedby{\sty{glossaries}} + \syntax{\margm{no change}\margm{sentence}\margm{all caps}} + \desc{initialised by the \idx{glslike} + and \idx{glstextlike} commands, this expands to \meta{no change} if + the calling command doesn't apply a case-change (such as \gls{gls} or + \gls{glstext}), to \meta{sentence} if the calling command + converts to \idx+{sentencecase} (such as \gls{Gls} or \gls{Glstext}), + or to \meta{all caps} if the calling command converts to + \idx+{allcaps} (such as \gls{GLS} or \gls{GLStext}). This command may be used + within associated hooks, entry display styles + (\gls{defglsentryfmt}), and the \idx{postlinkhook}} + } + % \glsxtrifallcaps + \gcmd{gls\-xtr\-if\-all\-caps} + { + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{all caps}\margm{not all caps}} + \desc{shortcut for \code{\gls{glscapscase}\margm{not all caps}\margm{not all caps}\margm{all caps}}} + } + % \glsxtrifwasfirstuse + \gcmd{gls\-xtr\-if\-was\-first\-use} + { + %\providedby{\sty{glossaries-extra} v1.0+} + \syntax{\margm{true}\margm{false}} + \desc{initialised by the \idx{glslike} + and \idx{glstextlike} commands, this expands to \meta{true} if + the calling command was considered the \idx{firstuse}, + otherwise it expands to \meta{false}. This command may be used + within the \idx{postlinkhook} (where it's too late to test the + \idx{firstuseflag} with \gls{ifglsused})} + } + % \glsxtrifwasglslike + \gcmd{gls\-xtr\-if\-was\-gls\-like} + { + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{true}\margm{false}} + \desc{initialised by the \idx{glslike} + and \idx{glstextlike} commands, this expands to \meta{true} if + the calling command was a \idx{glslike} command, + otherwise it expands to \meta{false}. This command may be used + within the \idx{postlinkhook}} + } + % \glsxtrifwasglslikeandfirstuse + \gcmd{gls\-xtr\-if\-was\-gls\-like\-and\-first\-use} + { + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{true}\margm{false}} + \desc{a shortcut that nests \gls{glsxtrifwasglslike} + and \gls{glsxtrifwasfirstuse}. This does \meta{true} + if the calling command was both a \idx{glslike} command and + was considered the \idx{firstuse}} + } + % \glsxtrifwassubsequentuse + \gcmd{gls\-xtr\-if\-was\-subsequent\-use} + { + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{true}\margm{false}} + \desc{a shortcut that nests \gls{glsxtrifwasglslike} + and \gls{glsxtrifwasfirstuse}. This does \meta{true} + if the calling command was a \idx{glslike} command but + was not considered the \idx{firstuse}} + } + % \glsxtrifwassubsequentorshort + \gcmd{gls\-xtr\-if\-was\-subsequent\-or\-short} + { + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{true}\margm{false}} + \desc{expands to \meta{true} if the calling command was a + \idx{glslike} command and was the \idx{subsequentuse} or if + \gls{glsxtrcurrentfield} was set to \code{short}} + } + % \glsxtrcurrentfield + \gcmd{gls\-xtr\-current\-field} + { + \providedby{\sty{glossaries-extra} v1.49+} + \desc{placeholder command for use in \idxpl{postlinkhook}. This + expands to empty if the calling command was one of the + \idx{glslike} commands or it was one of the \idx{inlinefullform} + commands, otherwise it will expand to the name of the key + associated with the \emph{singular} form of the command} + } + % \glsxtrassignlinktextfmt + \gcmd{gls\-xtr\-assign\-link\-text\-fmt} + { + \providedby{\sty{glossaries-extra} v1.49+} + \desc{initialised by the \idx{glslike} + and \idx{glstextlike} commands, this contains the definitions of + \gls{glslabel}, \gls{glstextformat}, + \gls{glsxtrgenentrytextfmt}} + } + % COMMANDS: CATEGORIES + % \glsifcategory + \gcmd{gls\-if\-category} + { + %\providedby{\sty{glossaries-extra} v1.0+} + \syntax{\margm{entry-label}\margm{category}\margm{true}\margm{false}} + \desc{tests if the entry identified by \meta{entry-label} has + the \gloskey{category} set to \meta{category} (uses + \gls{ifglsfieldeq} for the test)} + } + % \glsifregularcategory + \gcmd{gls\-if\-regular\-category} + { + %\providedby{\sty{glossaries-extra} v1.0+} + \syntax{\margm{category}\margm{true}\margm{false}} + \desc{does \meta{true} if the given category has the + \catattr{regular} attribute explicitly set to \code{true}, + otherwise does \meta{false}} + } + % \glsifnotregularcategory + \gcmd{gls\-if\-not\-regular\-category} + { + \providedby{\sty{glossaries-extra} v1.04+} + \syntax{\margm{category}\margm{true}\margm{false}} + \desc{does \meta{true} if the given category has the + \catattr{regular} attribute explicitly set to \code{false}, + otherwise does \meta{false}} + } + % \glsifregular + \gcmd{gls\-if\-regular} + { + %\providedby{\sty{glossaries-extra} v1.0+} + \syntax{\margm{entry-label}\margm{true}\margm{false}} + \desc{does \meta{true} if the category for the given entry has the + \catattr{regular} attribute explicitly set to \code{true}, + otherwise does \meta{false}} + } + % \glsifnotregular + \gcmd{gls\-if\-not\-regular} + { + \providedby{\sty{glossaries-extra} v1.04+} + \syntax{\margm{entry-label}\margm{true}\margm{false}} + \desc{does \meta{true} if the category for the given entry has the + \catattr{regular} attribute explicitly set to \code{false}, + otherwise does \meta{false}} + } + % \glsforeachincategory + \gcmd{gls\-for\-each\-in\-category} + { + %\providedby{\sty{glossaries-extra} v1.0+} + \syntax{\oargm{glossary-types}\margm{category}\margm{glossary-cs}\margm{label-cs}\margm{body}} + \desc{iterates over all entry in the given list of + \idxpl{glossary} (or all non-\idxpl{ignoredglossary}, if the optional + argument is omitted) and performs \meta{body} for those entries that + have the \gloskey{category} set to \meta{category}. Within + \meta{body}, the current entry can be referenced with + \meta{label-cs} and the \idx{glossary} can be referenced with + \meta{glossary-cs}} + } + % \glsforeachwithattribute + \gcmd{gls\-for\-each\-with\-attribute} + { + %\providedby{\sty{glossaries-extra} v1.0+} + \syntax{\oargm{glossary-types}\margm{attribute-label}\margm{attribute-value}\margm{glossary-cs}\margm{label-cs}\margm{body}} + \desc{iterates over all entry in the given list of + \idxpl{glossary} (or all non-\idxpl{ignoredglossary}, if the optional + argument is omitted) and performs \meta{body} for those entries that + have the attribute given by \meta{attribute-label} set to + \meta{attribute-value}. Within + \meta{body}, the current entry can be referenced with + \meta{label-cs} and the \idx{glossary} can be referenced with + \meta{glossary-cs}} + } + % \glssetcategoryattribute + \gcmd{gls\-set\-category\-attribute} + { + %\providedby{\sty{glossaries-extra} v1.0+} + \syntax{\margm{category}\margm{attribute}\margm{value}} + \desc{locally sets the given attribute to \meta{value} for the given + category} + } + % \glssetcategoriesattribute + \gcmd{gls\-set\-categories\-attribute} + { + \providedby{\sty{glossaries-extra} v1.48+} + \syntax{\margm{category list}\margm{attribute}\margm{value}} + \desc{globally sets the given attribute to \meta{value} for all the + categories in the comma-separated list \meta{category list}} + } + % \glssetcategoriesattributes + \gcmd{gls\-set\-categories\-attributes} + { + \providedby{\sty{glossaries-extra} v1.48+} + \syntax{\margm{category list}\margm{attribute list}\margm{value}} + \desc{globally sets each attribute in the comma separated + \meta{attribute list} to \meta{value} for each + category in the comma-separated list \meta{category list}} + } + % \glssetcategoryattributes + \gcmd{gls\-set\-category\-attributes} + { + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{category}\margm{attribute list}\margm{value}} + \desc{globally sets each attribute in the comma separated + \meta{attribute list} to \meta{value} for the given \meta{category}} + } + % \glssetregularcategory + \gcmd{gls\-set\-regular\-category} + { + %\providedby{\sty{glossaries-extra} v1.0+} + \syntax{\margm{category}} + \desc{locally sets the \catattr{regular} attribute to + \code{true} for the given category} + } + % \glsgetcategoryattribute + \gcmd{gls\-get\-category\-attribute} + { + %\providedby{\sty{glossaries-extra} v1.0+} + \syntax{\margm{category}\margm{attribute}} + \desc{expands to the value of the given attribute for the given + category. Expands to nothing if the attribute hasn't been set} + } + % \glsunsetcategoryattribute + \gcmd{gls\-unset\-category\-attribute}% + {% + \providedby{\sty{glossaries-extra} v1.47+} + \syntax{\margm{category}\margm{attribute}} + \desc{locally unsets the given attribute for the given category} + } + % \glshascategoryattribute + \gcmd{gls\-has\-category\-attribute} + { + %\providedby{\sty{glossaries-extra} v0.5+} + \syntax{\margm{category}\margm{attribute}\margm{true}\margm{false}} + \desc{tests if the given attribute has been set for the given + category (using \sty{etoolbox}['s] \gls{ifcsvoid})} + } + % \glssetattribute + \gcmd{gls\-set\-attribute} + { + %\providedby{\sty{glossaries-extra} v1.0+} + \syntax{\margm{entry-label}\margm{attribute}\margm{value}} + \desc{locally sets the given attribute to \meta{value} for the + category associated with the entry identified by + \meta{entry-label}} + } + % \glsgetattribute + \gcmd{gls\-get\-attribute} + { + %\providedby{\sty{glossaries-extra} v1.0+} + \syntax{\margm{entry-label}\margm{attribute}} + \desc{expands to the value of the given attribute for the + category associated with the entry identified by \meta{entry-label}. + Expands to nothing if the attribute hasn't been set} + } + % \glsxtrsetcategory + \gcmd{gls\-xtr\-set\-category} + { + %\providedby{\sty{glossaries-extra} v1.0+} + \syntax{\margm{entry-labels}\margm{category-label}} + \desc{globally sets the \gloskey{category} field to the fully + expanded \meta{category-label} for each entry listed in + \meta{entry-labels}} + } + % \glsxtrsetcategoryforall + \gcmd{gls\-xtr\-set\-category\-for\-all} + { + %\providedby{\sty{glossaries-extra} v1.0+} + \syntax{\margm{glossary-labels}\margm{category-label}} + \desc{globally sets the \gloskey{category} field to the fully + expanded \meta{category-label} for each entry belonging to the + \idxpl{glossary} listed in \meta{glossary-labels}} + } + % \glshasattribute + \gcmd{gls\-has\-attribute} + { + %\providedby{\sty{glossaries-extra} v0.5+} + \syntax{\margm{entry-label}\margm{attribute}\margm{true}\margm{false}} + \desc{tests if the given attribute has been set for the category + associated with the entry identified by \meta{entry-label} + (using \sty{etoolbox}['s] \gls{ifcsvoid}). Does \meta{false} + if the entry hasn't been defined} + } + % \glsifcategoryattribute + \gcmd{gls\-if\-category\-attribute} + { + %\providedby{\sty{glossaries-extra} v1.0+} + \syntax{\margm{category}\margm{attribute}\margm{value}\margm{true}\margm{false}} + \desc{tests if the given category has the given attribute set to + \meta{value}. Does \meta{true} if the attribute is + \meta{value} and \meta{false} otherwise. Does \meta{false} if there's + no such attribute for the given category} + } + % \glsifattribute + \gcmd{gls\-if\-attribute} + { + %\providedby{\sty{glossaries-extra} v1.0+} + \syntax{\margm{entry-label}\margm{attribute}\margm{value}\margm{true}\margm{false}} + \desc{tests if the category associated with the entry identified + by \meta{entry-label} has the given attribute set to + \meta{value}. Does \meta{true} if the attribute is + \meta{value} and \meta{false} otherwise. Does \meta{false} if there's + no such attribute for the given category or if the entry hasn't + been defined} + } + % \glsifcategoryattributetrue + \gcmd{gls\-if\-category\-attribute\-true} + { + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{category}\margm{attribute}\margm{true}\margm{false}} + \desc{tests if the given category has the given attribute set to + \code{true}. Does \meta{true} if the attribute is + \code{true} and \meta{false} otherwise. Does \meta{false} if there's + no such attribute for the given category} + } + % \glsifattributetrue + \gcmd{gls\-if\-attribute\-true} + { + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{entry-label}\margm{attribute}\margm{true}\margm{false}} + \desc{tests if the category associated with the entry given by + \meta{entry-label} has the given attribute set to + \code{true}. Does \meta{true} if the attribute is + \code{true} and \meta{false} otherwise. Does \meta{false} if there's + no such attribute for the given category or if the entry hasn't + been defined} + } + % \glsifcategoryattributehasitem + \gcmd{gls\-if\-category\-attribute\-has\-item} + { + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{category}\margm{attribute}\margm{item}\margm{true}\margm{false}} + \desc{does \meta{true} if the category has the attribute (whose + value is a comma-separated list) contains the given item and \meta{false} + otherwise. Does \meta{false} if there's + no such attribute for the given category. The item and list are + expanded and passed to \sty{datatool}['s] \gls{DTLifinlist} to perform the test} + } + % \glsxtrchecknohyperfirst + \gcmd{gls\-xtr\-check\-no\-hyper\-first} + { + \providedby{\sty{glossaries-extra} v1.07+} + \syntax{\margm{entry-label}} + \desc{sets \glsoptval{hyper}{false} if the + \catattr{nohyperfirst} attribute is set} + } + % COMMANDS: INDEXING + % \glsignore + \gcmd{gls\-ignore} + { + \providedby{\sty{glossaries} v4.12+} + \syntax{\margm{text}} + \desc{does nothing. When used as a \idx{locationencap}, this + signifies to \app{bib2gls} that the entry is required but the + \location\ shouldn't be added to the \idx{locationlist}. With + other \idx{indexing} methods, this simply creates an invisible + \location} + } + % \glsxtrdowrglossaryhook + \gcmd{gls\-xtr\-do\-wr\-glossary\-hook} + { + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{entry-label}} + \desc{hook used whenever an entry is \indexed. Does nothing by default} + } + % \glsadd + \gcmd{gls\-add} + {% + \providedby{\sty{glossaries}} + \syntax{\oargm{options}\margm{entry-label}} + \desc{indexes the entry identified by \meta{entry-label}} + } + % \glsaddall + \gcmd{gls\-add\-all} + {% + \providedby{\sty{glossaries}} + \syntax{\oargm{options}} + \desc{iterates over all \idxpl{glossary} (or all those + listed in the \glsopt{types} option) + and \idxc{indexing}{indexes} each entry in the \idx{glossary}. The optional + argument \meta{options} are passed to \gls{glsadd}. + This command can't be used with \app{bib2gls}. Use the + \resourceoptval{selection}{all} \idx{resourceopt} instead} + } + % \glsaddallunused + \gcmd{gls\-add\-all\-unused} + {% + \providedby{\sty{glossaries} v3.08a+} + \syntax{\oargm{glossary types}} + \desc{iterates over all \idxpl{glossary} listed in + \meta{glossary types} and \idxc{indexing}{indexes} each entry + (with \glsoptval{format}{glsignore}) that hasn't been used. + This command can't be used with \app{bib2gls}. Use the + \resourceoptval{selection}{all} \idx{resourceopt} instead} + } + % \glsaddallunindexed + \gcmd{gls\-add\-all\-un\-indexed} + {% + \syntax{\oargm{glossary types}} + \providedby{\sty{glossaries-extra} v1.49+} + \desc{iterates over all \idxpl{glossary} listed in + \meta{glossary types} and \idxc{indexing}{indexes} each entry + (with \glsoptval{format}{glsignore}) that hasn't already been indexed. + This command can't be used with \app{bib2gls}. Use the + \resourceoptval{selection}{all} \idx{resourceopt} instead} + } + % \glsaddeach + \gcmd{gls\-add\-each} + { + \providedby{\sty{glossaries-extra} v1.31+} + \syntax{\oargm{options}\margm{entry label list}} + \desc{does \code{\gls{glsadd}\oargm{options}\margm{entry-label}} for each label + in the supplied comma-separated list} + } + % \GlsXtrAutoAddOnFormat + \gcmd{Gls\-Xtr\-Auto\-Add\-On\-Format} + { + \providedby{\sty{glossaries-extra} v1.37+} + \syntax{\oargm{entry-label}\margm{format list}\margm{gls\-add options}} + \desc{identifies formats that should trigger an automatic + \gls{glsadd} by the \idx{glslike} and \idx{glstextlike} +commands} + } + % \glsxtrdoautoindexname + \gcmd{gls\-xtr\-do\-auto\-index\-name} + { + %\providedby{\sty{glossaries-extra} v0.5.3+} + \syntax{\margm{entry-label}\margm{attribute}} + \desc{used to automatically index (using \gls{glsxtrautoindex}) + the entry's name, if the given attribute is set for the entry's category} + } + % \glsxtrautoindex + \gcmd{gls\-xtr\-auto\-index} + { + \providedby{\sty{glossaries-extra} v1.16+} + \initvalcs{index} + \desc{the indexing command used by by the auto-indexing feature} + } + % \glsxtrautoindexesc + \gcmd{gls\-xtr\-auto\-index\-esc} + { + \providedby{\sty{glossaries-extra} v1.36+} + \desc{escapes the sort value used by the auto-indexing feature} + } + % \glsxtrautoindexentry + \gcmd{gls\-xtr\-auto\-index\-entry} + { + \providedby{\sty{glossaries-extra} v1.16+} + \syntax{\margm{entry-label}} + \desc{expands to the \qt{actual} part for the auto-indexing feature} + } + % \glsxtrautoindexassignsort + \gcmd{gls\-xtr\-auto\-index\-assign\-sort} + { + \providedby{\sty{glossaries-extra} v1.16+} + \syntax{\margm{entry-label}} + \desc{used to assign the sort value for the auto-indexing feature} + } + % \GlsXtrEnableIndexFormatOverride + \gcmd{Gls\-Xtr\-Enable\-Index\-Format\-Override} + { + %\providedby{\sty{glossaries-extra}} + \desc{allows the \glsopt{format} key to override the attribute value} + \note{preamble only} + } + % \GlsXtrSetActualChar + \gcmd{Gls\-Xtr\-Set\-Actual\-Char} + { + %\providedby{\sty{glossaries-extra}} + \syntax{\margm{character}} + \desc{sets the \qt{actual character} for the auto-indexing feature} + \note{preamble only} + } + % \GlsXtrSetEncapChar + \gcmd{Gls\-Xtr\-Set\-Encap\-Char} + { + %\providedby{\sty{glossaries-extra}} + \syntax{\margm{character}} + \desc{sets the \qt{encap character} for the auto-indexing feature} + \note{preamble only} + } + % \GlsXtrSetLevelChar + \gcmd{Gls\-Xtr\-Set\-Level\-Char} + { + %\providedby{\sty{glossaries-extra}} + \syntax{\margm{character}} + \desc{sets the \qt{level character} for the auto-indexing feature} + \note{preamble only} + } + % \GlsXtrSetEscChar + \gcmd{Gls\-Xtr\-Set\-Esc\-Char} + { + %\providedby{\sty{glossaries-extra}} + \syntax{\margm{character}} + \desc{sets the \qt{escape character} for the auto-indexing feature} + \note{preamble only} + } + % \glssee + \gcmd{gls\-see} + {% + \providedby{\sty{glossaries} v1.17+} + \syntax{\oargm{tag}\margm{entry-label}\margm{xr-list}} + \desc{indexes the entry identified by \meta{entry-label} as a + general cross-reference to the entries identified in the comma-separated + list \meta{xr-list}. The optional argument is the textual tag + that's inserted before the cross-reference list and defaults to + \gls{seename}} + \field{seealso}{glsxtrindexseealso} + } + % \glsseeformat + \gcmd{gls\-see\-format} + { + \providedby{\sty{glossaries} v1.17+} + \syntax{\oargm{tag}\margm{xr-list}\margm{location}} + \desc{used to format the \gloskey{see} cross-reference in the + \idx{locationlist}. This requires a \location\ argument for + \app{makeindex} even though it isn't required. The default + definition is \code{\csfmt{emph}\margm{tag} \gls{glsseelist}\margm{xr-list}}} + } + % \glsseelist + \gcmd{gls\-see\-list} + { + \providedby{\sty{glossaries} v1.17+} + \syntax{\margm{csv-list}} + \desc{iterates over a comma-separated list of entry labels + \meta{csv-list} and formats them. Each label in the list is + encapsulated with \gls{glsseeitem} (or \gls{mglsseeitem}, the + label corresponds to a multi-entry). The separators are + \gls{glsseelastsep} (between the penultimate and last items) + and \gls{glsseesep} (between all the other items). With + \sty{glossaries-extra}, the first label is encapsulated with + \gls{glsseefirstitem} (or \gls{mglsseefirstitem}) and the final separator for a list + consisting of at least three items is given by + \gls{glsseelastoxfordsep}} + \field{seealso}{glsxtrseelist} + } + % \glsseeitem + \gcmd{gls\-see\-item} + { + \providedby{\sty{glossaries} v1.17+} + \syntax{\margm{entry-label}} + \desc{used by \gls{glsseelist} to format each entry} + \field{seealso}{glsseefirstitem} + } + % \glsseeitemformat + \gcmd{gls\-see\-item\-format} + { + \providedby{\sty{glossaries} v3.0+} + \syntax{\margm{entry-label}} + \desc{used by \gls{glsseeitem} to produce the hyperlink text} + } + % \glsseefirstitem + \gcmd{gls\-see\-first\-item} + { + \providedby{\sty{glossaries-extra} v1.47+} + \syntax{\margm{entry-label}} + \desc{used by \gls{glsseelist} to format the first entry} + \field{seealso}{glsseeitem} + } + % \glsseesep + \gcmd{gls\-see\-sep} + { + \providedby{\sty{glossaries} v1.17+} + \initval{{,\textvisiblespace}} + \desc{used by \gls{glsseelist} as a separator between each entry + except the last pair} + \field{seealso}{glsseelastsep,glsseelastoxfordsep} + } + % \glsseelastsep + \gcmd{gls\-see\-last\-sep} + { + \providedby{\sty{glossaries} v1.17+} + \desc{used by \gls{glsseelist} as a separator between + penultimate and final entry in the list} + \field{seealso}{glsseelastsep,glsseelastoxfordsep} + } + % \glsseelastoxfordsep + \gcmd{gls\-see\-last\-oxford\-sep} + { + \providedby{\sty{glossaries-extra} v1.47+} + \desc{used by \gls{glsseelist} as a separator between + penultimate and final entry in the list if there are at least + three entries in the list} + \field{seealso}{glsseelastsep,glsseelastoxfordsep} + } + % \andname + \gcmd{and\-name} + { + \initvalcs{amp} + \desc{used by \gls{glsseelastsep} (provided by \sty{glossaries} + if not already defined)} + } + % \glsxtrseelist + \gcmd{glsxtrseelist} + { + \providedby{\sty{glossaries-extra} v1.16+} + \syntax{\margm{csv-list}} + \desc{fully expands \meta{csv-list} and passes it to + \gls{glsseelist}} + } + % \glsxtrtaggedlist + \gcmd{gls\-xtr\-tagged\-list} + { + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{singular tag}\margm{plural tag}\margm{label prefix}\margm{csv-list}} + \desc{similar to \gls{glsseelist}, this will start the list with + \meta{singular tag} if the list only contains one element and + \meta{plural tag} if the list contains more than one element. + Each element is prefixed with \meta{label prefix}. The tag is + separated from the start of the list with + \gls{glsxtrtaggedlistsep}. The actual list separators as as for + \gls{glsseelist}. The \meta{csv-list} is expanded before being + iterated over. Does nothing if \meta{csv-list} is empty} + } + % \glsxtrtaggedlistsep + \gcmd{gls\-xtr\-tagged\-list\-sep} + { + \providedby{\sty{glossaries-extra} v1.49+} + \initvalcs{space} + \desc{separator used by \gls{glsxtrtaggedlist} between the tag and the list} + } + % \glsxtrusesee + \gcmd{gls\-xtr\-use\-see} + { + \providedby{\sty{glossaries-extra} v1.06+} + \syntax{\margm{entry-label}} + \desc{if the entry given by \meta{entry-label} has the + \gloskey{see} field set, this will display the cross reference + according to \gls{glsxtruseseeformat}} + \field{seealso}{glsxtrusealias,glsxtruseseealso,glsxtrseelists} + } + % \glsxtrusealias + \gcmd{gls\-xtr\-use\-alias} + { + \providedby{\sty{glossaries-extra} v1.42+} + \syntax{\margm{entry-label}} + \desc{if the entry given by \meta{entry-label} has the + \gloskey{alias} field set, this will display the cross reference + according to \gls{glsxtruseseeformat}} + \field{seealso}{glsxtrusesee,glsxtruseseealso,glsxtrseelists} + } + % \glsxtruseseealso + \gcmd{gls\-xtr\-use\-see\-also} + { + \providedby{\sty{glossaries-extra} v1.16+} + \syntax{\margm{entry-label}} + \desc{if the entry given by \meta{entry-label} has the + \gloskey{seealso} field set, this will display the cross reference + according to \gls{glsxtruseseealsoformat}} + \field{seealso}{glsxtrusesee,glsxtrusealias,glsxtrseelists} + } + % \glsxtrseelists + \gcmd{gls\-xtr\-see\-lists} + { + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{entry-label}} + \desc{if the entry given by \meta{entry-label} has the + \gloskey{see}, \gloskey{seealso} or \gloskey{alias} fields set, + this will display the cross reference + according to \gls{glsxtruseseeformat} (for \gloskey{see} and + \gloskey{alias}) or \gls{glsxtruseseealsoformat} (for + \gloskey{seealso}). If any of these fields are set, the list is + encapsulated with \gls{glsxtrseelistsencap}} + \field{seealso}{glsxtrseelistsencap,glsxtrseelistsdelim} + } + % \glsxtrseelistsencap + \gcmd{gls\-xtr\-see\-lists\-encap} + { + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{content}} + \desc{used by \gls{glsxtrseelists} to encapsulate the lists} + } + % \glsxtrseelistsdelim + \gcmd{gls\-xtr\-see\-lists\-delim} + { + \providedby{\sty{glossaries-extra} v1.49+} + \desc{used by \gls{glsxtrseelists} to as separator between sub-lists} + } + % \glsxtruseseeformat + \gcmd{gls\-xtr\-use\-see\-format} + { + \providedby{\sty{glossaries-extra} v1.06+} + \syntax{\margm{tag}\margm{xr-list}} + \desc{format used by \gls{glsxtrusesee}. This internally uses + \gls{glsseeformat}} + } + % \glsxtruseseealsoformat + \gcmd{gls\-xtr\-use\-see\-also\-format} + { + \providedby{\sty{glossaries-extra} v1.16+} + \syntax{\margm{csv-list}} + \desc{formats the comma-separated list of entry labels as a + \qt{see also} cross-reference} + } + % \glsxtrindexseealso + \gcmd{gls\-xtr\-index\-see\-also} + {% + \providedby{\sty{glossaries-extra} v1.16+} + \syntax{\margm{entry-label}\margm{xr-list}} + \desc{indexes the entry identified by \meta{entry-label} as a + \qt{see also} cross-reference to the entries identified in the comma-separated + list \meta{xr-list}. The cross-reference list is prefixed with + \gls{seealsoname}} + \field{seealso}{glssee} + } + % \glsxtrsetaliasnoindex + \gcmd{gls\-xtr\-set\-alias\-no\-index} + { + \providedby{\sty{glossaries-extra} v1.12+} + \desc{hook used to switch off indexing for aliases} + } + % \glsxtrindexaliased + \gcmd{gls\-xtr\-index\-aliased} + { + \providedby{\sty{glossaries-extra} v1.12+} + \desc{index the current entry's alias. May only be used within + the definition of \gls{glsxtrsetaliasnoindex}} + } + % \glsxtralias + \gcmd{gls\-xtr\-alias} + { + \providedby{\sty{glossaries-extra} v1.12+} + \syntax{\margm{entry-label}} + \desc{expands to the value of the \gloskey{alias} field for the + entry identified by \meta{entry-label}. If the field isn't set, this + will expand to nothing. If the entry isn't defined, this will expand + to \gls{relax}} + } + % \glsxtraliashook + \gcmd{gls\-xtr\-alias\-hook} + { + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{entry-label}} + \desc{hook implemented when the \gloskey{alias} key is provided when an + entry is defined} + } + % \glsxtrseealsolabels + \gcmd{gls\-xtr\-see\-also\-labels} + { + \providedby{\sty{glossaries-extra} v1.16+} + \syntax{\margm{entry-label}} + \desc{expands to the value of the \gloskey{seealso} field for the + entry identified by \meta{entry-label}. If the field isn't set, this + will expand to nothing. If the entry isn't defined, this will expand + to \gls{relax}} + } + % \glsxtraddallcrossrefs + \gcmd{gls\-xtr\-add\-all\-cross\-refs} + { + %\providedby{\sty{glossaries-extra} v1.0+} + \desc{iterates over all defined entries and indexes any + cross-references (identified by the \gloskey{see} or \gloskey{seealso} + keys) that haven't been used} + \field{seealso}{opt.indexcrossrefs} + } + % \glsxtraddunusedxrefs + \gcmd{gls\-xtr\-add\-un\-used\-xrefs} + { + \providedby{\sty{glossaries-extra} v1.49+} + \desc{indexes any cross-references (identified by the \gloskey{see} or \gloskey{seealso} + keys) that haven't been used} + } + % \glsxtrunusedformat + \gcmd{gls\-xtr\-un\-used\-format} + { + %\providedby{\sty{glossaries-extra} v1.0+} + \syntax{\margm{location}} + \desc{the \idxc{locationencap}{format} used by \gls{glsxtraddallcrossrefs}} + } + % \glsxtrdowrglossaryhook + \gcmd{gls\-xtr\-wr\-glossary\-hook} + {% + %\providedby{\sty{glossaries-extra} v0.5.4+} + \syntax{\margm{entry-label}} + \desc{hook implemented everytime an entry is indexed} + } + % \GlsXtrSetAltModifier + \gcmd{Gls\-Xtr\-Set\-Alt\-Modifier} + { + %\providedby{\sty{glossaries-extra} v0.5.4+} + \syntax{\margm{token}\margm{options}} + \desc{sets \meta{token} as a modifier for the \idx{glslike} and + \idx{glstextlike} commands that will automatically implement the + given options} + } + % \GlsXtrSetStarModifier + \gcmd{Gls\-Xtr\-Set\-Star\-Modifier} + { + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{options}} + \desc{overrides the options that should be implemented by the + star (\code{*}) modifier for \idx{glslike} and + \idx{glstextlike} commands} + } + % \GlsXtrSetPlusModifier + \gcmd{Gls\-Xtr\-Set\-Plus\-Modifier} + { + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{options}} + \desc{overrides the options that should be implemented by the + plus (\code{+}) modifier for \idx{glslike} and + \idx{glstextlike} commands} + } + % \glslinkwrcontent + \gcmd{gls\-link\-wr\-content} + { + \providedby{\sty{glossaries-extra} v1.48+} + \syntax{\margm{code}} + \desc{encapsulates the \idx{linktext} and \idx{indexing}. Just + does \meta{code} by default} + } + % \glsencapwrcontent + \gcmd{gls\-encap\-wr\-content} + { + \providedby{\sty{glossaries} v4.50+ \& \sty{glossaries-extra} v1.49+} + \syntax{\margm{code}} + \desc{encapsulates the \idx{indexing} code (within \gls{glslinkwrcontent})} + } + % \glsentryindexcount + \gcmd{gls\-entry\-index\-count} + {% + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{entry-label}} + \desc{expands to the number of times the given entry has been indexed. This + will expand to 0 if the entry hasn't been indexed or hasn't been defined} + } + % \glsifindexed + \gcmd{gls\-if\-indexed} + {% + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{entry-label}\margm{true}\margm{false}} + \desc{tests if the value obtained from \gls{glsentryindexcount} is greater than 0} + } + % \glswriteentry + \gcmd{gls\-write\-entry} + {% + %\providedby{\sty{glossaries-extra} v1.0+} + \syntax{\margm{entry-label}\margm{code}} + \desc{performs the indexing code unless indexing should be suppressed} + } + % \glsxtrifindexing + \gcmd{gls\-xtr\-if\-indexing} + {% + %\providedby{\sty{glossaries-extra} v1.0+} + \syntax{\margm{true}\margm{false}} + \desc{tests whether or not the \glsopt{noindex} has been set. Does + \meta{false} if \glsoptval{noindex}{true} otherwise does \meta{true}} + } + % \ifglsindexonlyfirst + \gcond{if\-gls\-index\-only\-first} + {% + \providedby{\sty{glossaries} v3.02+} + \initvalcs{iffalse} + \desc{a conditional that corresponds to the \opt{indexonlyfirst} option} + } + % \ifglsxtrinitwrglossbefore + \gcond{if\-gls\-xtr\-init\-wr\-gloss\-before} + {% + \providedby{\sty{glossaries-extra} v1.14+} + \initvalcs{iftrue} + \desc{a conditional that indicates whether or not + \glsoptval{wrgloss}{before} is set} + } + % \glsxtrinitwrglossbeforetrue + \gcmd{gls\-xtr\-init\-wr\-gloss\-before\-true} + {% + \providedby{\sty{glossaries-extra} v1.14+} + \desc{corresponds to \glsoptval{wrgloss}{before}} + } + % \glsxtrinitwrglossbeforefalse + \gcmd{gls\-xtr\-init\-wr\-gloss\-before\-false} + {% + \providedby{\sty{glossaries-extra} v1.14+} + \desc{corresponds to \glsoptval{wrgloss}{after}} + } + % \GlsXtrSetDefaultNumberFormat + \gcmd{Gls\-Xtr\-Set\-Default\-Number\-Format} + { + \providedby{\sty{glossaries-extra} v1.19+} + \syntax{\margm{encap}} + \desc{sets the default \glsopt{format} to \meta{encap} (without + the leading backslash)} + } + % \GlsXtrSetDefaultGlsOpts + \gcmd{Gls\-Xtr\-Set\-Default\-Gls\-Opts} + {% + %\providedby{\sty{glossaries-extra} v0.5.4+} + \syntax{\margm{options}} + \desc{locally set the default options for the + \idx{glslike} and \idx{glstextlike} commands} + } + % \GlsXtrAppToDefaultGlsOpts + \gcmd{Gls\-Xtr\-App\-To\-Default\-Gls\-Opts} + {% + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{options}} + \desc{locally append \meta{options} to the default options for the + \idx{glslike} and \idx{glstextlike} commands} + } + % \GlsXtrPreToDefaultGlsOpts + \gcmd{Gls\-Xtr\-Pre\-To\-Default\-Gls\-Opts} + {% + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{options}} + \desc{locally prepend \meta{options} to the default options for the + \idx{glslike} and \idx{glstextlike} commands} + } + % \glslinkpresetkeys + \gcmd{gls\-link\-pre\-set\-keys} + {% + \providedby{\sty{glossaries-extra} v1.26+} + \desc{hook implemented before setting the options passed to the + \idx{glslike} and \idx{glstextlike} commands} + } + % \glslinkpostsetkeys + \gcmd{gls\-link\-post\-set\-keys} + {% + \providedby{\sty{glossaries} v4.16+} + \desc{hook implemented after setting the options passed to the + \idx{glslike} and \idx{glstextlike} commands} + } + % \glslinkcheckfirsthyperhook + \gcmd{gls\-link\-check\-first\-hyper\-hook} + { + \providedby{\sty{glossaries} v4.08+} + \desc{hook used at the end of the code in the \idx{glslike} + commands that tests if the hyperlink should be switched off on \idx{firstuse}} + } + % \glsaddpresetkeys + \gcmd{gls\-add\-pre\-set\-keys} + {% + \providedby{\sty{glossaries-extra} v1.30+} + \desc{hook implemented before setting the options passed to \gls{glsadd}} + } + % \glsaddpostsetkeys + \gcmd{gls\-add\-post\-set\-keys} + {% + \providedby{\sty{glossaries-extra} v1.30+} + \desc{hook implemented after setting the options passed to \gls{glsadd}} + } + % \glsxtrinitwrgloss + \gcmd{gls\-xtr\-init\-wr\-gloss} + {% + \providedby{\sty{glossaries-extra} v1.14+} + \desc{hook that initialises the \glsopt{wrgloss} setting} + } + % \glsxtrinithyperoutside + \gcmd{gls\-xtr\-init\-hyper\-out\-side} + {% + \providedby{\sty{glossaries-extra} v1.21+} + \desc{hook that initialises the \glsopt{hyperoutside} setting} + } + % \glsinitreunsets + \gcmd{gls\-init\-re\-un\-sets} + {% + \providedby{\sty{glossaries-extra} v1.49+} + \desc{hook that initialises the \glsopt{prereset}, + \glsopt{preunset} and \glsopt{postunset} settings} + } + % COMMANDS: CONDITIONALS + % \glsunset + \gcmd{gls\-unset} + {% + \providedby{\sty{glossaries}} + \syntax{\margm{entry-label}} + \desc{globally unsets the entry's \idx{firstuseflag}. That is, this marks the entry + as \qt{used}} + \field{seealso}{glslocalunset,glsreset,ifglsused,GlsXtrIfUnusedOrUndefined} + } + % \glslocalunset + \gcmd{gls\-local\-unset} + {% + \providedby{\sty{glossaries}} + \syntax{\margm{entry-label}} + \desc{locally unsets the entry's \idx{firstuseflag}. That is, this marks the entry + as \qt{used}} + \field{seealso}{glsunset,glslocalreset,ifglsused,GlsXtrIfUnusedOrUndefined} + } + % \glslocalunseteach + \gcmd{gls\-local\-unset\-each} + {% + \providedby{\sty{glossaries-extra} v1.31+} + \syntax{\margm{entry-labels}} + \desc{locally unsets each listed entry's \idx{firstuseflag}} + \field{seealso}{glsunset,glslocalreset,ifglsused,GlsXtrIfUnusedOrUndefined} + } + % \glsreset + \gcmd{gls\-reset} + {% + \providedby{\sty{glossaries}} + \syntax{\margm{entry-label}} + \desc{globally resets the entry's \idx{firstuseflag}. That is, this marks the entry + as \qt{not used}} + \field{seealso}{glslocalreset,glsunset,ifglsused,GlsXtrIfUnusedOrUndefined} + } + % \glslocalreset + \gcmd{gls\-local\-reset} + {% + \providedby{\sty{glossaries}} + \syntax{\margm{entry-label}} + \desc{locally resets the entry's \idx{firstuseflag}. That is, this marks the entry + as \qt{not used}} + \field{seealso}{glsreset,glslocalunset,ifglsused,GlsXtrIfUnusedOrUndefined} + } + % \glslocalreseteach + \gcmd{gls\-local\-reset\-each} + {% + \providedby{\sty{glossaries-extra} v1.31+} + \syntax{\margm{entry-labels}} + \desc{locally resets each listed entry's \idx{firstuseflag}} + \field{seealso}{glsreset,glslocalreset,ifglsused,GlsXtrIfUnusedOrUndefined} + } + % \glsunsetall + \gcmd{gls\-unset\-all} + {% + \providedby{\sty{glossaries}} + \syntax{\oargm{types}} + \desc{globally unsets all entries associated with the listed + glossaries or all glossaries if \meta{types} is omitted} + \field{seealso}{glsunset,glsresetall,ifglsused,GlsXtrIfUnusedOrUndefined} + } + % \glsresetall + \gcmd{gls\-reset\-all} + {% + \providedby{\sty{glossaries}} + \syntax{\oargm{types}} + \desc{globally resets all entries associated with the listed + glossaries or all glossaries if \meta{types} is omitted} + \field{seealso}{glsreset,glsunsetall,ifglsused,GlsXtrIfUnusedOrUndefined} + } + % \glslocalunsetall + \gcmd{gls\-local\-un\-set\-all} + { + \providedby{\sty{glossaries}} + \syntax{\oargm{glossary labels list}} + \desc{locally unsets the \idx+{firstuseflag} for all + entries in whose labels are listed in the \meta{glossary + labels list} comma-separated list. If the optional argument is + omitted, the list of all non-\idxpl{ignoredglossary} is assumed} + \field{seealso}{glsunset,glslocalunset,glsunsetall,glslocalresetall} + } + % \glslocalresetall + \gcmd{gls\-local\-re\-set\-all} + { + \providedby{\sty{glossaries}} + \syntax{\oargm{glossary labels list}} + \desc{locally resets the \idx+{firstuseflag} for all + entries in whose labels are listed in the \meta{glossary + labels list} comma-separated list. If the optional argument is + omitted, the list of all non-\idxpl{ignoredglossary} is assumed} + \field{seealso}{glsreset,glslocalreset,glsresetall,glslocalunsetall} + } + % \ifglsused + \gcmd{if\-gls\-used} + {% + \providedby{\sty{glossaries}} + \syntax{\margm{entry-label}\margm{true}\margm{false}} + \desc{does \meta{true} if the entry has been marked as + \idxc{firstuseflag}{used}, does \meta{false} if the entry is + marked as \idxc{firstuseflag}{unused}, and does neither if + the entry hasn't been defined (but will generate an error or + warning according to \opt{undefaction})} + \field{seealso}{GlsXtrIfUnusedOrUndefined,glsxtrifwasfirstuse} + } + % \GlsXtrIfUnusedOrUndefined + \gcmd{Gls\-Xtr\-If\-Unused\-Or\-Undefined} + { + \providedby{\sty{glossaries-extra} v1.34+} + \syntax{\margm{entry-label}\margm{true}\margm{false}} + \desc{does \meta{true} if the entry hasn't been defined or hasn't been marked as + \idxc{firstuseflag}{used}, otherwise does \meta{true}. Note + that this command will generate an error or warning (according to + \opt{undefaction}) if the entry hasn't been defined, but will + still do \meta{true}} + \field{seealso}{ifglsused,glsxtrifwasfirstuse} + } + % \glscurrentfieldvalue + \gcmd{gls\-current\-field\-value} + { + \providedby{\sty{glossaries} v4.23+} + \desc{conditional commands such as \gls{ifglshasfield} set this + to the field's value for use within the \meta{true} code} + } + % \ifglshasfield + \gcmd{if\-gls\-has\-field} + { + \providedby{\sty{glossaries} v4.03+} + \syntax{\margm{field}\margm{entry-label}\margm{true}\margm{false}} + \desc{if the field identified by either its key or its + \idx{internalfieldlabel} \meta{field} for the entry identified by + \meta{entry-label} is set and non-empty, this sets + \gls{glscurrentfieldvalue} to the field value and does \meta{true} + otherwise it does \meta{false}} + \field{seealso}{glsxtrifhasfield,ifglsfieldvoid} + } + % \ifglsfieldvoid + \gcmd{if\-gls\-field\-void} + { + \providedby{\sty{glossaries} v4.50+} + \syntax{\margm{field-label}\margm{entry-label}\margm{true}\margm{false}} + \desc{an expandable test to determine if the entry is undefined + or the field is undefined or empty. The \meta{field-label} + must be the field's \idxc{internalfieldlabel}{internal label}} + \field{seealso}{GlsXtrIfFieldUndef} + }% + % \ifglshasparent + \gcmd{if\-gls\-has\-parent} + { + \providedby{\sty{glossaries} v3.02+} + \syntax{\margm{entry-label}\margm{true}\margm{false}} + \desc{does \meta{true} if the entry's \gloskey{parent} field is + set otherwise does \meta{false}} + } + % \ifglshasdesc + \gcmd{if\-gls\-has\-desc} + { + \providedby{\sty{glossaries} v3.08a+} + \syntax{\margm{entry-label}\margm{true}\margm{false}} + \desc{does \meta{true} if the entry's \gloskey{description} field is + set otherwise does \meta{false}} + } + % \ifglshasdescsuppressed + \gcmd{if\-gls\-has\-desc\-suppressed} + { + \providedby{\sty{glossaries} v3.08a+} + \syntax{\margm{entry-label}\margm{true}\margm{false}} + \desc{does \meta{true} if the entry's \gloskey{description} field is + just \gls{nopostdesc} otherwise does \meta{false}} + } + % \ifglshassymbol + \gcmd{if\-gls\-has\-symbol} + { + \providedby{\sty{glossaries} v3.08a+} + \syntax{\margm{entry-label}\margm{true}\margm{false}} + \desc{does \meta{true} if the entry's \gloskey{symbol} field is + set otherwise does \meta{false}} + } + % \ifglshaslong + \gcmd{if\-gls\-has\-long} + { + \providedby{\sty{glossaries} v3.11a+} + \syntax{\margm{entry-label}\margm{true}\margm{false}} + \desc{does \meta{true} if the entry's \gloskey{long} field is + set otherwise does \meta{false}} + } + % \ifglshasshort + \gcmd{if\-gls\-has\-short} + { + \providedby{\sty{glossaries} v3.11a+} + \syntax{\margm{entry-label}\margm{true}\margm{false}} + \desc{does \meta{true} if the entry's \gloskey{short} field is + set otherwise does \meta{false}} + } + % \ifglshaschildren + \gcmd{if\-gls\-has\-children} + { + \providedby{\sty{glossaries} v3.02+} + \syntax{\margm{entry-label}\margm{true}\margm{false}} + \desc{does \meta{true} if the given entry has child entries + otherwise does \meta{false}. Note that this has to iterate over + the set of defined entries for the entry's \idx{glossary} to + find one that has the entry identified in its \gloskey{parent} + field. A more efficient approach can be achieved with + \app{bib2gls} and the \resourceopt{save-child-count} resource option} + \field{seealso}{GlsXtrIfHasNonZeroChildCount} + } + % COMMANDS: LOOPS + % \forglsentries + \gcmd{for\-gls\-entries} + {% + \providedby{\sty{glossaries}} + \syntax{\oargm{type}\margm{cs}\margm{body}} + \desc{iterates over all entries in the given \idx{glossary} + and, at each iteration, defines the command \meta{cs} + to the current entry label and does \meta{body}. The optional + argument \meta{type} is the \idx{glossary} + label and defaults to \gls{glsdefaulttype} if omitted. + This command can't be used with \app{bib2gls} since there are no + defined entries until \app{bib2gls} has selected them and added + them to the \ext{glstex} file} + \field{seealso}{forallglsentries} + } + % \forallglsentries + \gcmd{for\-all\-gls\-entries} + {% + \providedby{\sty{glossaries}} + \syntax{\oargm{types}\margm{cs}\margm{body}} + \desc{does \gls{forglsentries} for each \idx{glossary}. The optional + argument \meta{types} is a comma-separated list of \idx{glossary} + labels. If omitted, all non-\idxpl{ignoredglossary} is assumed} + } + % \forallglossaries + \gcmd{for\-all\-glossaries} + { + \providedby{\sty{glossaries}} + \syntax{\oargm{types}\margm{cs}\margm{body}} + \desc{iterates overall all the \idx{glossary} labels given in + the \meta{types} argument, defines the command \meta{cs} to the + current label and does \meta{body}. If the optional argument is + omitted, the list of all non-\idxpl{ignoredglossary} is assumed} + } + % \forallacronyms + \gcmd{for\-all\-acronyms} + { + \banned + \providedby{\sty{glossaries} v4.08+} + \syntax{\margm{cs}\margm{body}} + \desc{iterates overall all \idxpl{glossary} that have been + declared lists of acronyms, defines the command \meta{cs} to the + current label and does \meta{body}. Use + \gls{forallabbreviationlists} with \sty{glossaries-extra}} + } + % \forallabbreviationlists + \gcmd{forallabbreviationlists} + { + \providedby{\sty{glossaries-extra} v1.42+} + \syntax{\margm{cs}\margm{body}} + \desc{iterates overall all lists of abbreviations, defines the + command \meta{cs} to the current label and does \meta{body}} + \field{seealso}{forallglossaries} + } + % CATEGORIES + \gidxpl{category}{\field{plural}{categories} + \common + \desc{with \sty{glossaries-extra}, each entry has an associated + category (a simple label) assigned with the \gloskey{category} key. Each category + can have a set of \attrs\ (assigned with + commands like \gls{glssetcategoryattribute}), which can affect the way the entry + is formatted. Some categories, such as \cat{general}, are supplied by + \sty{glossaries-extra}} + } + % general category + \gcat{general}{\desc{the default \idx{category} for + \gls{newglossaryentry} and similar commands. This + category has the \catattr{regular} attribute set to \code{true}}}% + % abbreviation category + \gcat{abbreviation}{\desc{the default \idx{category} for + \gls{newabbreviation}}}% + % acronym category + \gcat{acronym}{\desc{the default \idx{category} for + \gls{newacronym} (as redefined by \sty{glossaries-extra}). This + category has the \catattr{regular} attribute set to \code{true} + by default but this may be changed to \code{false} by certain + \idx{abbrvstyle}}}% + % symbol category + \gcat{symbol}{\desc{the default \idx{category} for + \gls{glsxtrnewsymbol}. This + category has the \catattr{regular} attribute set to \code{true}}}% + % number category + \gcat{number}{\desc{the default \idx{category} for + \gls{glsxtrnewnumber}. This + category has the \catattr{regular} attribute set to \code{true}}}% + % index category + \gcat{index}{\desc{the default \idx{category} for + \gls{newterm} (as redefined by \sty{glossaries-extra}). This + category has the \catattr{regular} attribute set to \code{true}}}% + % term category + \gcat{term}{\desc{a \idx{catpostdeschook} is provided for this +category, but no commands are provided that set the +\gloskey{category} key to this label}} + % CATEGORY ATTRIBUTES + \gidxpl{categoryattribute}{\field{text}{category attribute}% + \desc{a category can have a set of attributes (assigned with commands like + \gls{glssetcategoryattribute}), which can affect the way the entry + is formatted. Some attributes are recognised by certain + commands. Custom attributes can also be defined and referenced + in hooks or custom commands as required} + } + % regular + \gcatattr{regular}% + {% + \common + \syntax{\meta{boolean}} + \desc{if set to \code{true}, this attribute indicates that the + entry should be treated as a regular entry (the + \gloskey{first}\slash\gloskey{firstplural} key is used on + \idx{firstuse} and the \gloskey{text}\slash\gloskey{plural} key + is used on subsequent use). If set to \code{false}, the entry + is assumed to be governed by the \idx{abbrvstyle} associated + with the category or the default style for the + \cat{abbreviation} category, if no style is associated with the + entry's category. If this attribute isn't set, \code{true} is + assumed. Certain \idxpl{abbrvstyle} set this attribute to + \code{true} or \code{false}, depending on the complexity of the + style} + } + % markwords + \gcatattr{mark\-words}% + {% + \syntax{\meta{boolean}} + \desc{if set to \code{true}, this attribute indicates that + abbreviations should have the words in the long form marked up + with \gls{glsxtrword} and separated by \gls{glsxtrwordsep}. If + this attribute isn't set, \code{false} is assumed} + } + % markshortwords + \gcatattr{mark\-short\-words}% + {% + \syntax{\meta{boolean}} + \desc{if set to \code{true}, this attribute indicates that + abbreviations should have the words in the short form marked up + with \gls{glsxtrword} and separated by \gls{glsxtrwordsep}. If + this attribute isn't set, \code{false} is assumed} + } + % discardperiod + \gcatattr{discard\-period}% + { + \syntax{\meta{boolean}} + \desc{this attribute is provided for abbreviations that end in a + \idx{fullstop}. If set to \code{true}, indicates that + the \idx{postlinkhook} will discard a \idx{fullstop} that + follows \emph{non-plural} commands like \gls{gls} or \gls{glstext}} + } + % pluraldiscardperiod + \gcatattr{plural\-discard\-period}% + { + \syntax{\meta{boolean}} + \desc{as \catattr{discardperiod} but for plural commands like \gls{glspl}} + } + % insertdots + \gcatattr{insert\-dots}% + { + \syntax{\meta{boolean}} + \desc{if set to \code{true}, this attribute indicates that + the abbreviation short form should have a \idx{fullstop} automatically + inserted after every character} + } + % accessinsertdots + \gcatattr{access\-insert\-dots}% + { + \syntax{\meta{boolean}} + \desc{if set to \code{true}, this attribute indicates that + the abbreviation accessibility replacement (provided in the + \gloskey{shortaccess} key) should have a \idx{fullstop} automatically + inserted after every character. Only checked if + \catattr{insertdots} hasn't been set} + } + % retainfirstuseperiod + \gcatattr{retain\-first\-use\-period} + { + \providedby{\sty{glossaries-extra} v1.01+} + \syntax{\meta{boolean}} + \desc{if set, the \idx{fullstop} won't be discarded for + \idx{firstuse} with \catattr{discardperiod} or + \catattr{pluraldiscardperiod}} + } + % noshortplural + \gcatattr{no\-short\-plural}% + {% + \syntax{\meta{boolean}} + \desc{if set to \code{true}, this attribute indicates that + abbreviations should have the \gloskey{shortplural} field set to the + same as the \gloskey{short} value by default} + } + % accessnoshortplural + \gcatattr{access\-no\-short\-plural}% + {% + \syntax{\meta{boolean}} + \desc{if set to \code{true} and \gloskey{shortpluralaccess} + hasn't been set, this attribute indicates that + abbreviations should have the \gloskey{shortpluralaccess} field set to the + same as the \gloskey{shortaccess} value by default} + } + % aposplural + \gcatattr{apos\-plural}% + {% + \syntax{\meta{boolean}} + \desc{if set to \code{true}, this attribute indicates that + abbreviations should have the \gloskey{shortplural} field set to the + short form followed by \code{'\gls{abbrvpluralsuffix}} by default} + } + % accessaposplural + \gcatattr{access\-apos\-plural}% + {% + \syntax{\meta{boolean}} + \desc{if set to \code{true} and \gloskey{shortpluralaccess} + hasn't been set, this attribute indicates that + abbreviations should have the \gloskey{shortpluralaccess} field set to the + short form followed by \code{'\gls{glsxtrpluralsuffix}} by default} + } + % nameshortaccess + \gcatattr{name\-short\-access} + {% + \syntax{\meta{boolean}} + \desc{if the \gloskey{access} hasn't been set then if this + attribute is \code{true}, the \gloskey{access} field will be + set to the \gloskey{shortaccess}} + } + % textshortaccess + \gcatattr{text\-short\-access} + {% + \syntax{\meta{boolean}} + \desc{if the \gloskey{textaccess} hasn't been set then if this + attribute is \code{true}, the \gloskey{textaccess} field will be + set to the \gloskey{shortaccess} and, likewise, if the + \gloskey{pluralaccess} field hasn't been set it will be set to the + \gloskey{shortpluralaccess}} + } + % firstshortaccess + \gcatattr{first\-short\-access} + {% + \syntax{\meta{boolean}} + \desc{if the \gloskey{firstaccess} hasn't been set then if this + attribute is \code{true}, the \gloskey{firstaccess} field will be + set to the \gloskey{shortaccess} and, likewise, if the + \gloskey{firstpluralaccess} field hasn't been set it will be set to the + \gloskey{shortpluralaccess}} + } + % tagging + \gcatattr{tagging}% + { + \syntax{\meta{boolean}} + \desc{if set to \code{true}, this attribute indicates that + abbreviations with the associated category use the command + defined with \gls{GlsXtrEnableInitialTagging} to tag initials} + } + % textformat + \gcatattr{text\-format}% + { + \syntax{\meta{cs-name}} + \desc{if set, the value should be the name of a control sequence + (without the leading backslash) that should be used to + encapsulate the link text (instead of \gls{glstextformat})} + } + % innertextformat + \gcatattr{inner\-text\-format}% + { + \syntax{\meta{cs-name}} + \desc{when used with \gls{glsxtrattrentrytextfmt}, the value + should be the name of a control sequence (without the leading + backslash)} + } + % nohyper + \gcatattr{no\-hyper} + { + \syntax{\meta{boolean}} + \desc{if set to \code{true}, this attribute indicates that + the hyperlink should be switched off for commands like \gls{gls}} + } + % nohyperfirst + \gcatattr{no\-hyper\-first} + { + \syntax{\meta{boolean}} + \desc{if set to \code{true}, this attribute indicates that + the hyperlink should be switched off on \idx{firstuse} of the + \idx{glslike} commands} + } + % nohypernext + \gcatattr{no\-hyper\-next} + { + \syntax{\meta{boolean}} + \desc{if set to \code{true}, this attribute indicates that + the hyperlink should be switched off on \idx{subsequentuse} of the + \idx{glslike} commands} + } + % indexonlyfirst + \gcatattr{index\-only\-first} + { + \syntax{\meta{boolean}} + \desc{if set to \code{true}, this attribute indicates that + \idx{indexing} should only occur on \idx{firstuse}} + } + % indexname + \gcatattr{index\-name} + { + \providedby{\sty{glossaries-extra}} + \syntax{\margm{value}} + \desc{used by the \idx{postnamehook} with + \gls{glsxtrdoautoindexname} to indicate that an entry + needs to be automatically indexed with \gls{index}. The value + may be \code{true} or the encap} + } + % wrgloss + \gcatattr{wr\-gloss} + { + \syntax{\meta{value}} + \desc{determines whether the \idx{indexing} is performed before or + after the \idx{linktext}. If the value is \code{after} then + \glsoptval{wrgloss}{after} otherwise it implements + \glsoptval{wrgloss}{before}} + } + % hyperoutside + \gcatattr{hyper\-out\-side} + { + \syntax{\meta{boolean}} + \desc{if set to \code{true}, this attribute indicates that + the hyperlink should be outside of the outer formatting command} + } + % headuc + \gcatattr{head\-uc}% + {% + \syntax{\meta{boolean}} + \desc{if set to \code{true}, this attribute indicates that the + text produced by commands like \gls{glsfmttext} should be converted + to \idx+{allcaps} when they appear in a page header} + } + % encapnocase + \gcatattr{encap\-no\-case} + { + \syntax{\meta{internal field list}} + \desc{if set, all the listed fields (identified by their + \idx{internalfieldlabel}) will have their values encapsulated + with \gls{NoCaseChange} when an entry with the associated category is defined} + } + % encapinnerfmt + \gcatattr{encap\-inner\-fmt} + { + \syntax{\meta{internal field list}} + \desc{if set, all the listed fields (identified by their + \idx{internalfieldlabel}) will have their values encapsulated + with the inner formatting command \gls{glsxtrgenentrytextfmt} + when an entry with the associated category is defined} + } + % encapnocaseinnerfmt + \gcatattr{encap\-no\-case\-inner\-fmt} + { + \syntax{\meta{internal field list}} + \desc{combines \catattr{encapnocase} and \catattr{encapinnerfmt} + for the same field set} + } + % entrycount + \gcatattr{entry\-count} + { + \syntax{\meta{trigger-value}} + \desc{when used with entry counting, this attribute provides the trigger value} + } + % unitcount + \gcatattr{unit\-count} + { + \syntax{\meta{counter}} + \desc{when used with unit entry counting, this attribute + provides the name of the counter associated with the unit} + } + % recordcount + \gcatattr{record\-count} + { + \syntax{\meta{trigger-value}} + \desc{when used with record counting, this attribute provides the trigger value} + } + % multioptions + \gcatattr{multioptions} + { + \syntax{\meta{options}} + \desc{default options to apply to any multi-entry set for the + given category} + } + % glossname + \gcatattr{gloss\-name} + { + \syntax{\meta{value}} + \desc{indicates if any \idx{casechange} should be applied + within \gls{glossentryname}} + } + % glossdesc + \gcatattr{gloss\-desc} + { + \syntax{\meta{value}} + \desc{indicates if any \idx{casechange} should be applied + within \gls{glossentrydesc}} + } + % glossnamefont + \gcatattr{gloss\-name\-font} + { + \syntax{\meta{cs-name}} + \desc{the control sequence name (without the leading backslash) + to format the name within \gls{glossentryname}} + } + % glossdescfont + \gcatattr{gloss\-desc\-font} + { + \syntax{\meta{cs-name}} + \desc{the control sequence name (without the leading backslash) + to format the description within \gls{glossentrydesc}} + } + % glosssymbolfont + \gcatattr{gloss\-symbol\-font} + { + \syntax{\meta{cs-name}} + \desc{the control sequence name (without the leading backslash) + to format the symbol within \gls{glossentrysymbol}} + } + % linkcount + \gcatattr{link\-count} + { + \syntax{\meta{boolean}} + \desc{if true, link counting is enabled} + } + % linkcountmaster + \gcatattr{link\-count\-master} + { + \syntax{\meta{counter-name}} + \desc{if link counting is enabled, the value should be the name + of the counter that needs to have its reset list updated} + } + % dualindex + \gcatattr{dual\-index} + { + \syntax{\meta{value}} + \desc{if set, implement dual indexing} + } + % targeturl + \gcatattr{target\-url} + { + \syntax{\meta{url}} + \desc{if set, indicates the target URL for the hyperlinks + created by the \idx{glslike} and \idx{glstextlike} commands} + } + % targetname + \gcatattr{target\-name} + { + \syntax{\meta{anchor}} + \desc{if set, the named anchor within the URL provided by + \catattr{targeturl}} + } + % targetcategory + \gcatattr{target\-category} + { + \syntax{\meta{anchor}} + \desc{if set, the named anchor category within the URL provided by + \catattr{targeturl} (combined with \catattr{targetname})} + } + % externallocation + \gcatattr{external\-location} + { + \providedby{\sty{glossaries-extra} v1.14+} + \syntax{\meta{PDF filename}} + \desc{if set, the value is the filename of the external target PDF document + (used by \gls{glsxtrsupphypernumber})} + } + % combinedsep + \gcatattr{combined\-sep} + { + \providedby{\sty{glossaries-extra} v1.48+} + \syntax{\meta{separator}} + \desc{if set, indicates separator to use in \gls{glscombinedsep}} + } + % combinedsepfirst + \gcatattr{combined\-sep\-first} + { + \providedby{\sty{glossaries-extra} v1.48+} + \syntax{\meta{separator}} + \desc{if set, indicates separator to use in \gls{glscombinedsepfirst}} + } + % combinedfirstsepfirst + \gcatattr{combined\-first\-sep\-first} + { + \providedby{\sty{glossaries-extra} v1.48+} + \syntax{\meta{separator}} + \desc{if set, indicates separator to use in \gls{glscombinedfirstsepfirst}} + } + % combinedfirstsep + \gcatattr{combined\-first\-sep} + { + \providedby{\sty{glossaries-extra} v1.48+} + \syntax{\meta{separator}} + \desc{if set, indicates separator to use in \gls{glscombinedfirstsep}} + } + % COMMANDS: bib2gls + % \glsxtrresourcefile + \gcmd{gls\-xtr\-resource\-file}% + {% + \providedby{\sty{glossaries-extra} v1.11+} + \syntax{\oargm{options}\margm{basename}} + \field{seealso}{idx.resourceopt,GlsXtrLoadResources} + \desc{for use with \app{bib2gls}, this both sets up the options + for the \idx{resourceset} (which \app{bib2gls} can detect from the + \ext{aux} file) and inputs the file \metafilefmt{}{basename}{.glstex} file + created by \app{bib2gls}} + } + % \GlsXtrLoadResources + \gcmd{Gls\-Xtr\-Load\-Resources}% + {% + \providedby{\sty{glossaries-extra} v1.11+} + \syntax{\oargm{options}} + \field{seealso}{idx.resourceopt} + \desc{a shortcut that uses + \gls{glsxtrresourcefile}\oargm{options}\margm{basename}, where + the \meta{basename} is obtained from \gls{jobname} and + \gls{glsxtrresourcecount}} + } + % \glsxtrresourcecount + \gcmd{gls\-xtr\-resource\-count}% + {% + \providedby{\sty{glossaries-extra} v1.12+} + \desc{a count register that is incremented on each use of + \gls{GlsXtrLoadResources} to provide a unique basename for each + \idx{resourceset}} + } + % \glsxtrresourceinit + \gcmd{gls\-xtr\-resource\-init}% + {% + \providedby{\sty{glossaries-extra} v1.21+} + \desc{may be defined to temporarily change command definitions + before information is written to the \ext{aux} file by the protected + write used by \gls{glsxtrresourcefile}} + } + % \GlsXtrDefaultResourceOptions + \gcmd{Gls\-Xtr\-Default\-Resource\-Options}% + {% + \providedby{\sty{glossaries-extra} v1.40+} + \desc{expands to default \idxpl{resourceopt}} + } + % \glsxtr@resource + \gcmd{gls\-xtr\-@\-resource}% + {% + \providedby{\sty{glossaries-extra} v1.08+} + \syntax{\margm{options}\margm{basename}} + \desc{used in the \ext{aux} file to provide the + \idxpl{resourceopt} for \app{bib2gls} for each \idx{resourceset}. + Ignored by \LaTeX} + } + % \glsxtr@record + \gcmd{gls\-xtr\-@\-record}% + {% + \providedby{\sty{glossaries-extra} v1.08+} + \syntax{\margm{entry-label}\margm{h-prefix}\margm{counter}\margm{encap}\margm{location}} + \desc{used in the \ext{aux} file to provide the \record\ for + \app{bib2gls} (\opteqvalref{record}{only}). Ignored by \LaTeX} + } + % \glsxtr@record@nameref + \gcmd{gls\-xtr\-@\-record\-@\-name\-ref}% + {% + \providedby{\sty{glossaries-extra} v1.37+} + \syntax{\margm{entry-label}\margm{h-prefix}\margm{counter}\margm{encap}\margm{location}\margm{current title}\margm{current anchor}\margm{the-h-counter}} + \desc{used in the \ext{aux} file to provide the + \optvalref{record}{nameref} \record\ for \app{bib2gls}. Ignored by \LaTeX} + } + % \glsxtrMFUsave + \gcmd{gls\-xtr\-MFU\-save} + { + \providedby{\sty{glossaries-extra} v1.49+} + \desc{used on the first instance of \gls{glsxtrresourcefile}, + this will add \gls{MFUsave} to the begin document hook and + then disable itself. This is provided to help \app{bib2gls} + pick up any of \sty{mfirstuc}['s] exclusions, blockers and + mappings to assist with its \idx{sentencecase} function} + } + % \bibgls@input + \gcmd{bib\-gls\-@\-in\-put} + { + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{filename}} + \desc{indicates that the \app{bib2gls} records are in the file + identified in the argument \meta{filename}, which corresponds + to the file \metafilefmt{}{basename}{.aux} identified in the option + \optval{bibglsaux}{\meta{basename}}} + } + % \IfTeXParserLib + \gcmd{If\-TeX\-Parser\-Lib} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.49+} + \syntax{\margm{\TeX\ parser lib code}\margm{\LaTeX\ code}} + \desc{defined by \sty{glossaries-extra-bib2gls} to \meta{\LaTeX\ code} + but defined by \app{bib2gls}['s] interpreter to expand to + \meta{\TeX\ parser lib code}} + } + % \glshex + \gcmd{gls\-hex} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.21+} + \syntax{\meta{hex}} + \desc{expands to \code{\gls{string}\gls{u}\meta{hex}}} + } + % \u + \gcmd{u} + { + \syntax{\meta{hex}} + \desc{recognised by \app{bib2gls} within some \idxpl{resourceopt} + as identifying the Unicode character given by \meta{hex}. Since + \csfmt{u} is defined by the \LaTeX\ kernel, you need to protect + it from expansion while the options are written to the \ext{aux} file + (\code{\gls{string}\csfmt{u}\meta{hex}})} + \field{seealso}{glshex} + } + % \glscapturedgroup + \gcmd{gls\-captured\-group} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.31+} + \syntax{\meta{n}} + \desc{expands to \code{\gls{string}\gls{dollar}\meta{n}}} + } + % \glshashchar + \gcmd{gls\-hash\-char} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.49+} + \desc{expands to a literal hash \idx{sym.hash}} + } + % \GlsXtrBibTeXEntryAliases + \gcmd{Gls\-Xtr\-Bib\-TeX\-Entry\-Aliases} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.29+} + \desc{expands to the \BibTeX\ to \app{bib2gls} entry aliases + for use in \resourceopt{entry-type-aliases}} + } + % \GlsXtrProvideBibTeXFields + \gcmd{Gls\-Xtr\-Provide\-Bib\-TeX\-Fields} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.29+} + \desc{provides the standard \BibTeX\ fields as glossary entry + keys (using \gls{glsaddstoragekey})} + } + % \glsxtrbibaddress + \gcmd{gls\-xtr\-bib\-address} + { + \note{defined by \gls{GlsXtrProvideBibTeXFields}} + \syntax{\margm{entry-label}} + \desc{accesses the \fieldfmt{address} field} + } + % \glsxtrbibauthor + \gcmd{gls\-xtr\-bib\-author} + { + \note{defined by \gls{GlsXtrProvideBibTeXFields}} + \syntax{\margm{entry-label}} + \desc{accesses the \fieldfmt{author} field} + } + % \glsxtrbibbooktitle + \gcmd{gls\-xtr\-bib\-book\-title} + { + \note{defined by \gls{GlsXtrProvideBibTeXFields}} + \syntax{\margm{entry-label}} + \desc{accesses the \fieldfmt{booktitle} field} + } + % \glsxtrbibchapter + \gcmd{gls\-xtr\-bib\-chapter} + { + \note{defined by \gls{GlsXtrProvideBibTeXFields}} + \syntax{\margm{entry-label}} + \desc{accesses the \fieldfmt{chapter} field} + } + % \glsxtrbibedition + \gcmd{gls\-xtr\-bib\-edition} + { + \note{defined by \gls{GlsXtrProvideBibTeXFields}} + \syntax{\margm{entry-label}} + \desc{accesses the \fieldfmt{edition} field} + } + % \glsxtrbibhowpublished + \gcmd{gls\-xtr\-bib\-how\-published} + { + \note{defined by \gls{GlsXtrProvideBibTeXFields}} + \syntax{\margm{entry-label}} + \desc{accesses the \fieldfmt{howpublished} field} + } + % \glsxtrbibinstitution + \gcmd{gls\-xtr\-bib\-institution} + { + \note{defined by \gls{GlsXtrProvideBibTeXFields}} + \syntax{\margm{entry-label}} + \desc{accesses the \fieldfmt{institution} field} + } + % \glsxtrbibjournal + \gcmd{gls\-xtr\-bib\-journal} + { + \note{defined by \gls{GlsXtrProvideBibTeXFields}} + \syntax{\margm{entry-label}} + \desc{accesses the \fieldfmt{journal} field} + } + % \glsxtrbibmonth + \gcmd{gls\-xtr\-bib\-month} + { + \note{defined by \gls{GlsXtrProvideBibTeXFields}} + \syntax{\margm{entry-label}} + \desc{accesses the \fieldfmt{month} field} + } + % \glsxtrbibnote + \gcmd{gls\-xtr\-bib\-note} + { + \note{defined by \gls{GlsXtrProvideBibTeXFields}} + \syntax{\margm{entry-label}} + \desc{accesses the \fieldfmt{note} field} + } + % \glsxtrbibnumber + \gcmd{gls\-xtr\-bib\-number} + { + \note{defined by \gls{GlsXtrProvideBibTeXFields}} + \syntax{\margm{entry-label}} + \desc{accesses the \fieldfmt{number} field} + } + % \glsxtrbiborganization + \gcmd{gls\-xtr\-bib\-organization} + { + \note{defined by \gls{GlsXtrProvideBibTeXFields}} + \syntax{\margm{entry-label}} + \desc{accesses the \fieldfmt{organization} field} + } + % \glsxtrbibpages + \gcmd{gls\-xtr\-bib\-pages} + { + \note{defined by \gls{GlsXtrProvideBibTeXFields}} + \syntax{\margm{entry-label}} + \desc{accesses the \fieldfmt{pages} field} + } + % \glsxtrbibpublisher + \gcmd{gls\-xtr\-bib\-publisher} + { + \note{defined by \gls{GlsXtrProvideBibTeXFields}} + \syntax{\margm{entry-label}} + \desc{accesses the \fieldfmt{publisher} field} + } + % \glsxtrbibschool + \gcmd{gls\-xtr\-bib\-school} + { + \note{defined by \gls{GlsXtrProvideBibTeXFields}} + \syntax{\margm{entry-label}} + \desc{accesses the \fieldfmt{school} field} + } + % \glsxtrbibseries + \gcmd{gls\-xtr\-bib\-series} + { + \note{defined by \gls{GlsXtrProvideBibTeXFields}} + \syntax{\margm{entry-label}} + \desc{accesses the \fieldfmt{series} field} + } + % \glsxtrbibtitle + \gcmd{gls\-xtr\-bib\-title} + { + \note{defined by \gls{GlsXtrProvideBibTeXFields}} + \syntax{\margm{entry-label}} + \desc{accesses the \fieldfmt{title} field} + } + % \glsxtrbibvolume + \gcmd{gls\-xtr\-bib\-volume} + { + \note{defined by \gls{GlsXtrProvideBibTeXFields}} + \syntax{\margm{entry-label}} + \desc{accesses the \fieldfmt{volume} field} + } + % \glsxtrbibtype + \gcmd{gls\-xtr\-bib\-type} + { + \note{defined by \gls{GlsXtrProvideBibTeXFields}} + \syntax{\margm{entry-label}} + \desc{accesses the \fieldfmt{bibtextype} field} + } + % \glsxtrprovidecommand + \gcmds{gls\-xtr\-provide\-command} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \syntax{\margm{cs}\oargm{n}\oargm{default}\margm{definition}} + \desc{just uses \gls{providecommand} within the \LaTeX\ document + but is treated as \gls{renewcommand} by \app{bib2gls}['s] + interpreter} + } + % \glsrenewcommand + \gcmds{gls\-re\-new\-command} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.37+} + \syntax{\margm{cs}\oargm{n}\oargm{default}\margm{definition}} + \desc{like \gls{renewcommand} but only issues a warning instead + of an error if the command hasn't been defined} + } + % \GlsXtrIndexCounterLink + \gcmd{Gls\-Xtr\-Index\-Counter\-Link} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.29+} + \syntax{\margm{text}\margm{entry-label}} + \desc{creates a hyperlink (if supported) to the target + obtained from \glosfield{indexcounter}, if the field has been + defined with the given hyperlink text (otherwise just does + \meta{text})} + } + % \Alpha + \gcmd{Alpha} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{defined with \gls{providecommand}, this just does + \code{\cmd{mathrm}\marg{A}}} + } + % \Beta + \gcmd{Beta} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{defined with \gls{providecommand}, this just does + \code{\cmd{mathrm}\marg{B}}} + } + % \Epsilon + \gcmd{Epsilon} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{defined with \gls{providecommand}, this just does + \code{\cmd{mathrm}\marg{E}}} + } + % \Zeta + \gcmd{Zeta} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{defined with \gls{providecommand}, this just does + \code{\cmd{mathrm}\marg{Z}}} + } + % \Eta + \gcmd{Eta} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{defined with \gls{providecommand}, this just does + \code{\cmd{mathrm}\marg{H}}} + } + % \Iota + \gcmd{Iota} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{defined with \gls{providecommand}, this just does + \code{\cmd{mathrm}\marg{I}}} + } + % \Kappa + \gcmd{Kappa} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{defined with \gls{providecommand}, this just does + \code{\cmd{mathrm}\marg{K}}} + } + % \Mu + \gcmd{Mu} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{defined with \gls{providecommand}, this just does + \code{\cmd{mathrm}\marg{M}}} + } + % \Nu + \gcmd{Nu} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{defined with \gls{providecommand}, this just does + \code{\cmd{mathrm}\marg{N}}} + } + % \Omicron + \gcmd{Omicron} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{defined with \gls{providecommand}, this just does + \code{\cmd{mathrm}\marg{O}}} + } + % \omicron + \gcmd{omicron} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{defined with \gls{providecommand}, this just does + \code{\cmd{mathrm}\marg{O}}} + } + % \Rho + \gcmd{Rho} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{defined with \gls{providecommand}, this just does + \code{\cmd{mathrm}\marg{P}}} + } + % \Tau + \gcmd{Tau} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{defined with \gls{providecommand}, this just does + \code{\cmd{mathrm}\marg{T}}} + } + % \Chi + \gcmd{Chi} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{defined with \gls{providecommand}, this just does + \code{\cmd{mathrm}\marg{X}}} + } + % \Digamma + \gcmd{Digamma} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{defined with \gls{providecommand}, this just does + \code{\cmd{mathrm}\marg{F}}} + } + % \Upalpha + \gcmd{Upalpha} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{defined with \gls{providecommand} and only if + \sty{upgreek} has been loaded, this just does + \code{\cmd{mathrm}\marg{A}}} + } + % \Upbeta + \gcmd{Upbeta} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{defined with \gls{providecommand} and only if + \sty{upgreek} has been loaded, this just does + \code{\cmd{mathrm}\marg{B}}} + } + % \Upepsilon + \gcmd{Upepsilon} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{defined with \gls{providecommand} and only if + \sty{upgreek} has been loaded, this just does + \code{\cmd{mathrm}\marg{E}}} + } + % \Upzeta + \gcmd{Upzeta} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{defined with \gls{providecommand} and only if + \sty{upgreek} has been loaded, this just does + \code{\cmd{mathrm}\marg{Z}}} + } + % \Upeta + \gcmd{Upeta} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{defined with \gls{providecommand} and only if + \sty{upgreek} has been loaded, this just does + \code{\cmd{mathrm}\marg{H}}} + } + % \Upiota + \gcmd{Upiota} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{defined with \gls{providecommand} and only if + \sty{upgreek} has been loaded, this just does + \code{\cmd{mathrm}\marg{I}}} + } + % \Upkappa + \gcmd{Upkappa} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{defined with \gls{providecommand} and only if + \sty{upgreek} has been loaded, this just does + \code{\cmd{mathrm}\marg{K}}} + } + % \Upmu + \gcmd{Upmu} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{defined with \gls{providecommand} and only if + \sty{upgreek} has been loaded, this just does + \code{\cmd{mathrm}\marg{M}}} + } + % \Upnu + \gcmd{Upnu} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{defined with \gls{providecommand} and only if + \sty{upgreek} has been loaded, this just does + \code{\cmd{mathrm}\marg{N}}} + } + % \Upomicron + \gcmd{Upomicron} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{defined with \gls{providecommand} and only if + \sty{upgreek} has been loaded, this just does + \code{\cmd{mathrm}\marg{O}}} + } + % \upomicron + \gcmd{upomicron} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{defined with \gls{providecommand} and only if + \sty{upgreek} has been loaded, this just does + \code{\cmd{mathrm}\marg{o}}} + } + % \Uprho + \gcmd{Uprho} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{defined with \gls{providecommand} and only if + \sty{upgreek} has been loaded, this just does + \code{\cmd{mathrm}\marg{P}}} + } + % \Uptau + \gcmd{Uptau} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{defined with \gls{providecommand} and only if + \sty{upgreek} has been loaded, this just does + \code{\cmd{mathrm}\marg{T}}} + } + % \Upchi + \gcmd{Upchi} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{defined with \gls{providecommand} and only if + \sty{upgreek} has been loaded, this just does + \code{\cmd{mathrm}\marg{X}}} + } + % \glsxtrcontrolrules + \gcmd{gls\-xtr\-control\-rules} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{expands to control character sort rules} + } + % \glsxtrspacerules + \gcmd{gls\-xtr\-space\-rules} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{expands to space character sort rules} + } + % \glsxtrnonprintablerules + \gcmd{gls\-xtr\-non\-printable\-rules} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{expands to non-printable character sort rules} + } + % \glsxtrcombiningdiacriticrules + \gcmd{gls\-xtr\-combining\-diacritic\-rules} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{expands to all the combining diacritic sort rules} + } + % \glsxtrcombiningdiacriticIrules + \gcmd{gls\-xtr\-combining\-diacritic\-I\-rules} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{expands to the first set of combining diacritic sort rules} + } + % \glsxtrcombiningdiacriticIIrules + \gcmd{gls\-xtr\-combining\-diacritic\-II\-rules} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{expands to the second set of combining diacritic sort rules} + } + % \glsxtrcombiningdiacriticIIIrules + \gcmd{gls\-xtr\-combining\-diacritic\-III\-rules} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{expands to the third set of combining diacritic sort rules} + } + % \glsxtrcombiningdiacriticIVrules + \gcmd{gls\-xtr\-combining\-diacritic\-IV\-rules} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{expands to the fourth set of combining diacritic sort rules} + } + % \glsxtrhyphenrules + \gcmd{gls\-xtr\-hyphen\-rules} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{expands to hyphen character sort rules} + } + % \glsxtrgeneralpuncrules + \gcmd{gls\-xtr\-general\-punc\-rules} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{expands to all sets of general punctuation sort rules} + } + % \glsxtrgeneralpuncIrules + \gcmd{gls\-xtr\-general\-punc\-I\-rules} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{expands to the first set of general punctuation (including + currency) sort rules} + } + % \glsxtrgeneralpuncmarksrules + \gcmd{gls\-xtr\-general\-punc\-marks\-rules} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.49+} + \desc{punctuation mark subset of \gls{glsxtrgeneralpuncIrules}} + } + % \glsxtrgeneralpuncaccentsrules + \gcmd{gls\-xtr\-general\-punc\-accents\-rules} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.49+} + \desc{punctuation accent subset of \gls{glsxtrgeneralpuncIrules}} + } + % \glsxtrgeneralpuncquoterules + \gcmd{gls\-xtr\-general\-punc\-quote\-rules} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.49+} + \desc{punctuation quote subset of \gls{glsxtrgeneralpuncIrules}} + } + % \glsxtrgeneralpuncbracketrules + \gcmd{gls\-xtr\-general\-punc\-bracket\-rules} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.49+} + \desc{punctuation bracket subset of \gls{glsxtrgeneralpuncIrules}} + } + % \glsxtrgeneralpuncsignrules + \gcmd{gls\-xtr\-general\-punc\-sign\-rules} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.49+} + \desc{punctuation sign subset of \gls{glsxtrgeneralpuncIrules}} + } + % \glsxtrgeneralpuncIIrules + \gcmd{gls\-xtr\-general\-punc\-II\-rules} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{expands to the second set of general punctuation (including + currency) sort rules} + } + % \glsxtrcurrencyrules + \gcmd{gls\-xtr\-currency\-rules} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{expands to currency character sort rules} + } + % \glsxtrdigitrules + \gcmd{gls\-xtr\-digit\-rules} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{expands to 0--9 digit character sort rules (includes + superscript and subscript digits)} + } + % \glsxtrBasicDigitrules + \gcmd{gls\-xtr\-Basic\-Digit\-rules} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{expands to the Basic Latin digit character sort rules} + } + % \glsxtrSubScriptDigitrules + \gcmd{gls\-xtr\-Sub\-Script\-Digit\-rules} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{expands to the 0--9 subscript digit character sort rules} + } + % \glsxtrSuperScriptDigitrules + \gcmd{gls\-xtr\-Super\-Script\-Digit\-rules} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{expands to the 0--9 superscript digit character sort rules} + } + % \glsxtrfractionrules + \gcmd{gls\-xtr\-fraction\-rules} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{expands to the number forms fraction character sort rules} + } + % \glsxtrIgnorableRules + \gcmd{gls\-xtr\-Ignorable\-Rules} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.49+} + \desc{a shortcut that expands to the control rules, space rules + and non-printable rules} + } + % \glsxtrGeneralInitRules + \gcmd{gls\-xtr\-General\-Init\-Rules} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.49+} + \desc{a shortcut that expands to the ignorable rules, + combining diacritic rules, hyphen rules, general punctuation + rules, digit rules, and fraction rules} + } + % \glsxtrLatinA + \gcmd{gls\-xtr\-LatinA} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{(sort rule) expands to the variations of Latin A (includes 0x00AA and 0x2090)} + } + % \glsxtrLatinE + \gcmd{gls\-xtr\-LatinE} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{(sort rule) expands to the variations of Latin E (includes 0x2091)} + } + % \glsxtrLatinH + \gcmd{gls\-xtr\-LatinH} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{(sort rule) expands to the variations of Latin H (includes 0x2095)} + } + % \glsxtrLatinI + \gcmd{gls\-xtr\-LatinI} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{(sort rule) expands to the variations of Latin I (includes 0x2071)} + } + % \glsxtrLatinK + \gcmd{gls\-xtr\-LatinK} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{(sort rule) expands to the variations of Latin K (includes 0x2096)} + } + % \glsxtrLatinL + \gcmd{gls\-xtr\-LatinL} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{(sort rule) expands to the variations of Latin L (includes 0x2097)} + } + % \glsxtrLatinM + \gcmd{gls\-xtr\-LatinM} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{(sort rule) expands to the variations of Latin M (includes 0x2098)} + } + % \glsxtrLatinN + \gcmd{gls\-xtr\-LatinN} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{(sort rule) expands to the variations of Latin N (includes 0x2099)} + } + % \glsxtrLatinO + \gcmd{gls\-xtr\-LatinO} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{(sort rule) expands to the variations of Latin O (includes 0x00BA and 0x2092)} + } + % \glsxtrLatinP + \gcmd{gls\-xtr\-LatinP} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{(sort rule) expands to the variations of Latin P (includes 0x209A)} + } + % \glsxtrLatinS + \gcmd{gls\-xtr\-LatinS} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{(sort rule) expands to the variations of Latin S (includes 0x209B)} + } + % \glsxtrLatinT + \gcmd{gls\-xtr\-LatinT} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{(sort rule) expands to the variations of Latin T (includes 0x209C)} + } + % \glsxtrLatinX + \gcmd{gls\-xtr\-LatinX} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{(sort rule) expands to the variations of Latin X (includes 0x2093)} + } + % \glsxtrLatinSchwa + \gcmd{gls\-xtr\-Latin\-Schwa} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{(sort rule) expands to the variations of Latin schwa} + } + % \glsxtrLatinEszettSs + \gcmd{gls\-xtr\-Latin\-EszettSs} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{(sort rule) expands to rule for \ss and \char"017F\relax s} + } + % \glsxtrLatinEszettSz + \gcmd{gls\-xtr\-Latin\-EszettSz} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{(sort rule) expands to rule for \ss and \char"017F\relax z} + } + % \glsxtrLatinEth + \gcmd{gls\-xtr\-Latin\-Eth} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{(sort rule) expands to the variations of Latin eth} + } + % \glsxtrLatinThorn + \gcmd{gls\-xtr\-Latin\-Thorn} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{(sort rule) expands to the variations of Latin thorn} + } + % \glsxtrLatinAELigature + \gcmd{gls\-xtr\-Latin\-AE\-Ligature} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{(sort rule) expands to the variations of Latin ae-ligature} + } + % \glsxtrLatinOELigature + \gcmd{gls\-xtr\-Latin\-OE\-Ligature} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{(sort rule) expands to the variations of Latin oe-ligature} + } + % \glsxtrLatinAA + \gcmd{gls\-xtr\-Latin\-AA} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{(sort rule) expands to the variations of Latin \aa} + } + % \glsxtrLatinWynn + \gcmd{gls\-xtr\-Latin\-Wynn} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{(sort rule) expands to the variations of Latin wynn} + } + % \glsxtrLatinInsularG + \gcmd{gls\-xtr\-Latin\-InsularG} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{(sort rule) expands to the variations of Latin insular G and g, G} + } + % \glsxtrLatinOslash + \gcmd{gls\-xtr\-Latin\-O\-slash} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{(sort rule) expands to the variations of Latin \o} + } + % \glsxtrLatinLslash + \gcmd{gls\-xtr\-Latin\-L\-slash} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{(sort rule) expands to the variations of Latin \l} + } + % \glsxtrGeneralLatinAtoMrules + \gcmd{gls\-xtr\-General\-Latin\-A\-to\-M\-rules} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.49+} + \desc{expands to the A--M subset of General Latin I sort rules} + } + % \glsxtrGeneralLatinNtoZrules + \gcmd{gls\-xtr\-General\-Latin\-N\-to\-Z\-rules} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.49+} + \desc{expands to the N--Z subset of General Latin I sort rules} + } + % \glsxtrGeneralLatinAtoGrules + \gcmd{gls\-xtr\-General\-Latin\-A\-to\-G\-rules} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.49+} + \desc{expands to the A--G subset of General Latin I sort rules} + } + % \glsxtrGeneralLatinHtoMrules + \gcmd{gls\-xtr\-General\-Latin\-H\-to\-M\-rules} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.49+} + \desc{expands to the H--M subset of General Latin I sort rules} + } + % \glsxtrGeneralLatinNtoSrules + \gcmd{gls\-xtr\-General\-Latin\-N\-to\-S\-rules} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.49+} + \desc{expands to the N--S subset of General Latin I sort rules} + } + % \glsxtrGeneralLatinTtoZrules + \gcmd{gls\-xtr\-General\-Latin\-T\-to\-Z\-rules} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.49+} + \desc{expands to the T--Z subset of General Latin I sort rules} + } + % \glsxtrGeneralLatinIrules + \gcmd{gls\-xtr\-General\-Latin\-I\-rules} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{expands to the first set of General Latin sort rules} + } + % \glsxtrGeneralLatinIIrules + \gcmd{gls\-xtr\-General\-Latin\-II\-rules} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{expands to the second set of General Latin sort rules} + } + % \glsxtrGeneralLatinIIIrules + \gcmd{gls\-xtr\-General\-Latin\-III\-rules} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{expands to the third set of General Latin sort rules} + } + % \glsxtrGeneralLatinIVrules + \gcmd{gls\-xtr\-General\-Latin\-IV\-rules} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{expands to the fourth set of General Latin sort rules} + } + % \glsxtrGeneralLatinVrules + \gcmd{gls\-xtr\-General\-Latin\-V\-rules} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{expands to the fifth set of General Latin sort rules} + } + % \glsxtrGeneralLatinVIrules + \gcmd{gls\-xtr\-General\-Latin\-VI\-rules} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{expands to the sixth set of General Latin sort rules} + } + % \glsxtrGeneralLatinVIIrules + \gcmd{gls\-xtr\-General\-Latin\-VII\-rules} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{expands to the seventh set of General Latin sort rules} + } + % \glsxtrGeneralLatinVIIIrules + \gcmd{gls\-xtr\-General\-Latin\-VIII\-rules} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{expands to the eighth set of General Latin sort rules} + } + % \glsxtrMathUpGreekIrules + \gcmd{gls\-xtr\-Math\-Up\-Greek\-I\-rules} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{expands to the first set of math upright Greek sort rules} + } + % \glsxtrMathUpGreekIIrules + \gcmd{gls\-xtr\-Math\-Up\-Greek\-II\-rules} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{expands to the second set of math upright Greek sort rules} + } + % \glsxtrMathItalicGreekIrules + \gcmd{gls\-xtr\-Math\-Italic\-Greek\-I\-rules} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{expands to the first set of math italic Greek sort rules} + } + % \glsxtrMathItalicGreekIIrules + \gcmd{gls\-xtr\-Math\-Italic\-Greek\-II\-rules} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{expands to the second set of math italic Greek sort rules} + } + % \glsxtrMathItalicUpperGreekIrules + \gcmd{gls\-xtr\-Math\-Italic\-Upper\-Greek\-I\-rules} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{expands to the first set of math italic \idx{uppercase} Greek sort rules} + } + % \glsxtrMathItalicUpperGreekIIrules + \gcmd{gls\-xtr\-Math\-Italic\-Upper\-Greek\-II\-rules} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{expands to the second set of math italic \idx{uppercase} Greek sort rules} + } + % \glsxtrMathItalicLowerGreekIrules + \gcmd{gls\-xtr\-Math\-Italic\-Lower\-Greek\-I\-rules} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{expands to the first set of math italic \idx{lowercase} Greek sort rules} + } + % \glsxtrMathItalicLowerGreekIIrules + \gcmd{gls\-xtr\-Math\-Italic\-Lower\-Greek\-II\-rules} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{expands to the second set of math italic \idx{lowercase} Greek sort rules} + } + % \glsxtrMathGreekIrules + \gcmd{gls\-xtr\-Math\-Greek\-I\-rules} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{expands to the first set of math Greek sort rules} + } + % \glsxtrMathGreekIIrules + \gcmd{gls\-xtr\-Math\-Greek\-II\-rules} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{expands to the second set of math Greek sort rules} + } + % \glsxtrUpAlpha + \gcmd{gls\-xtr\-Up\-Alpha} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{(sort rule) expands to the variations of math Greek upright alpha} + } + % \glsxtrUpBeta + \gcmd{gls\-xtr\-Up\-Beta} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{(sort rule) expands to the variations of math Greek upright beta} + } + % \glsxtrUpGamma + \gcmd{gls\-xtr\-Up\-Gamma} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{(sort rule) expands to the variations of math Greek upright gamma} + } + % \glsxtrUpDelta + \gcmd{gls\-xtr\-Up\-Delta} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{(sort rule) expands to the variations of math Greek upright delta} + } + % \glsxtrUpEpsilon + \gcmd{gls\-xtr\-Up\-Epsilon} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{(sort rule) expands to the variations of math Greek upright epsilon} + } + % \glsxtrUpDigamma + \gcmd{gls\-xtr\-Up\-Digamma} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{(sort rule) expands to the variations of math Greek upright digamma} + } + % \glsxtrUpZeta + \gcmd{gls\-xtr\-Up\-Zeta} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{(sort rule) expands to the variations of math Greek upright zeta} + } + % \glsxtrUpEta + \gcmd{gls\-xtr\-Up\-Eta} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{(sort rule) expands to the variations of math Greek upright eta} + } + % \glsxtrUpTheta + \gcmd{gls\-xtr\-Up\-Theta} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{(sort rule) expands to the variations of math Greek upright theta} + } + % \glsxtrUpIota + \gcmd{gls\-xtr\-Up\-Iota} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{(sort rule) expands to the variations of math Greek upright iota} + } + % \glsxtrUpKappa + \gcmd{gls\-xtr\-Up\-Kappa} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{(sort rule) expands to the variations of math Greek upright kappa} + } + % \glsxtrUpLambda + \gcmd{gls\-xtr\-Up\-Lambda} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{(sort rule) expands to the variations of math Greek upright lambda} + } + % \glsxtrUpMu + \gcmd{gls\-xtr\-Up\-Mu} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{(sort rule) expands to the variations of math Greek upright mu} + } + % \glsxtrUpNu + \gcmd{gls\-xtr\-Up\-Nu} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{(sort rule) expands to the variations of math Greek upright nu} + } + % \glsxtrUpXi + \gcmd{gls\-xtr\-Up\-Xi} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{(sort rule) expands to the variations of math Greek upright xi} + } + % \glsxtrUpOmicron + \gcmd{gls\-xtr\-Up\-Omicron} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{(sort rule) expands to the variations of math Greek upright omicron} + } + % \glsxtrUpPi + \gcmd{gls\-xtr\-Up\-Pi} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{(sort rule) expands to the variations of math Greek upright pi} + } + % \glsxtrUpRho + \gcmd{gls\-xtr\-Up\-Rho} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{(sort rule) expands to the variations of math Greek upright rho} + } + % \glsxtrUpSigma + \gcmd{gls\-xtr\-Up\-Sigma} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{(sort rule) expands to the variations of math Greek upright sigma} + } + % \glsxtrUpTau + \gcmd{gls\-xtr\-Up\-Tau} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{(sort rule) expands to the variations of math Greek upright tau} + } + % \glsxtrUpUpsilon + \gcmd{gls\-xtr\-Up\-Upsilon} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{(sort rule) expands to the variations of math Greek upright upsilon} + } + % \glsxtrUpPhi + \gcmd{gls\-xtr\-Up\-Phi} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{(sort rule) expands to the variations of math Greek upright phi} + } + % \glsxtrUpChi + \gcmd{gls\-xtr\-Up\-Chi} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{(sort rule) expands to the variations of math Greek upright chi} + } + % \glsxtrUpPsi + \gcmd{gls\-xtr\-Up\-Psi} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{(sort rule) expands to the variations of math Greek upright psi} + } + % \glsxtrUpOmega + \gcmd{gls\-xtr\-Up\-Omega} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{(sort rule) expands to the variations of math Greek upright omega} + } + % \glsxtrMathItalicAlpha + \gcmd{gls\-xtr\-Math\-Italic\-Alpha} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{(sort rule) expands to the variations of math italic Greek alpha} + } + % \glsxtrMathItalicBeta + \gcmd{gls\-xtr\-Math\-Italic\-Beta} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{(sort rule) expands to the variations of math italic Greek beta} + } + % \glsxtrMathItalicGamma + \gcmd{gls\-xtr\-Math\-Italic\-Gamma} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{(sort rule) expands to the variations of math italic Greek gamma} + } + % \glsxtrMathItalicDelta + \gcmd{gls\-xtr\-Math\-Italic\-Delta} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{(sort rule) expands to the variations of math italic Greek delta} + } + % \glsxtrMathItalicEpsilon + \gcmd{gls\-xtr\-Math\-Italic\-Epsilon} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{(sort rule) expands to the variations of math italic Greek epsilon} + } + % \glsxtrMathItalicDigamma + \gcmd{gls\-xtr\-Math\-Italic\-Digamma} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{(sort rule) expands to the variations of math italic Greek digamma} + } + % \glsxtrMathItalicZeta + \gcmd{gls\-xtr\-Math\-Italic\-Zeta} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{(sort rule) expands to the variations of math italic Greek zeta} + } + % \glsxtrMathItalicEta + \gcmd{gls\-xtr\-Math\-Italic\-Eta} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{(sort rule) expands to the variations of math italic Greek eta} + } + % \glsxtrMathItalicTheta + \gcmd{gls\-xtr\-Math\-Italic\-Theta} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{(sort rule) expands to the variations of math italic Greek theta} + } + % \glsxtrMathItalicIota + \gcmd{gls\-xtr\-Math\-Italic\-Iota} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{(sort rule) expands to the variations of math italic Greek iota} + } + % \glsxtrMathItalicKappa + \gcmd{gls\-xtr\-Math\-Italic\-Kappa} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{(sort rule) expands to the variations of math italic Greek kappa} + } + % \glsxtrMathItalicLambda + \gcmd{gls\-xtr\-Math\-Italic\-Lambda} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{(sort rule) expands to the variations of math italic Greek lambda} + } + % \glsxtrMathItalicMu + \gcmd{gls\-xtr\-Math\-Italic\-Mu} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{(sort rule) expands to the variations of math italic Greek mu} + } + % \glsxtrMathItalicNu + \gcmd{gls\-xtr\-Math\-Italic\-Nu} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{(sort rule) expands to the variations of math italic Greek nu} + } + % \glsxtrMathItalicXi + \gcmd{gls\-xtr\-Math\-Italic\-Xi} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{(sort rule) expands to the variations of math italic Greek xi} + } + % \glsxtrMathItalicOmicron + \gcmd{gls\-xtr\-Math\-Italic\-Omicron} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{(sort rule) expands to the variations of math italic Greek omicron} + } + % \glsxtrMathItalicPi + \gcmd{gls\-xtr\-Math\-Italic\-Pi} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{(sort rule) expands to the variations of math italic Greek pi} + } + % \glsxtrMathItalicRho + \gcmd{gls\-xtr\-Math\-Italic\-Rho} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{(sort rule) expands to the variations of math italic Greek rho} + } + % \glsxtrMathItalicSigma + \gcmd{gls\-xtr\-Math\-Italic\-Sigma} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{(sort rule) expands to the variations of math italic Greek sigma} + } + % \glsxtrMathItalicTau + \gcmd{gls\-xtr\-Math\-Italic\-Tau} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{(sort rule) expands to the variations of math italic Greek tau} + } + % \glsxtrMathItalicUpsilon + \gcmd{gls\-xtr\-Math\-Italic\-Upsilon} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{(sort rule) expands to the variations of math italic Greek upsilon} + } + % \glsxtrMathItalicPhi + \gcmd{gls\-xtr\-Math\-Italic\-Phi} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{(sort rule) expands to the variations of math italic Greek phi} + } + % \glsxtrMathItalicChi + \gcmd{gls\-xtr\-Math\-Italic\-Chi} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{(sort rule) expands to the variations of math italic Greek chi} + } + % \glsxtrMathItalicPsi + \gcmd{gls\-xtr\-Math\-Italic\-Psi} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{(sort rule) expands to the variations of math italic Greek psi} + } + % \glsxtrMathItalicOmega + \gcmd{gls\-xtr\-Math\-Italic\-Omega} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{(sort rule) expands to the variations of math italic Greek omega} + } + % \glsxtrMathItalicPartial + \gcmd{gls\-xtr\-Math\-Italic\-Partial} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{(sort rule) expands to the Unicode codepoint for math italic partial differential} + } + % \glsxtrMathItalicNabla + \gcmd{gls\-xtr\-Math\-Italic\-Nabla} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.27+} + \desc{(sort rule) expands to the Unicode codepoint for nabla} + } + % \glsxtrSetWidest + \gcmd{gls\-xtr\-Set\-Widest} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.37+} + \syntax{\margm{type}\margm{level}} + \desc{written to the \ext{glstex} by the + \resourceopt{set-widest} option} + } + % \glsxtrSetWidestFalback + \gcmd{gls\-xtr\-Set\-Widest\-Fallback} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.37+} + \syntax{\margm{type}\margm{level}} + \desc{written to the \ext{glstex} by the + \resourceopt{set-widest} option if \app{bib2gls} can't + determine the widest name} + } + % \GlsXtrIfHasNonZeroChildCount + \gcmds{Gls\-Xtr\-If\-Has\-Non\-Zero\-Child\-Count} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.47+} + \syntax{\margm{entry-label}\margm{true}\margm{false}} + \desc{tests if the value in the \glosfield{childcount} field is + non-zero (using \gls{GlsXtrIfFieldNonZero}). This requires the + \resourceopt{save-child-count} resource option} + } + % \glsxtrdisplaysupploc + \gcmds{gls\-xtr\-display\-supp\-loc} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.36+} + \syntax{\margm{prefix}\margm{counter}\margm{format}\margm{src}\margm{location}} + \desc{like \gls{glsnoidxdisplayloc} but used for supplementary + locations} + } + % \glsxtrmultisupplocation + \gcmds{gls\-xtr\-multi\-supp\-location} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.36+} + \syntax{\margm{src}\margm{location}\margm{format}} + \desc{used by \gls{glsxtrdisplaysupploc} to format the + location} + } + % \glsxtrdisplaylocnameref + \gcmd{gls\-xtr\-display\-loc\-name\-ref} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.37+} + \syntax{\margm{prefix}\margm{counter}\margm{format}\margm{location}\margm{title}\margm{href}\margm{hcounter}\margm{file}} + \desc{used to display \records\ created with + \opteqvalref{record}{nameref}} + } + % \glsxtrtitlednamereflink + \gcmd{gls\-xtr\-titled\-name\-ref\-link} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.49+} + \syntax{\margm{format}\margm{location}\margm{title}\margm{file}} + \desc{used by \gls{glsxtrdisplaylocnameref} to display locations + that have a title and are not associated with the \ctr{page} counter + and don't have an associated \gls{glsxtrcounterlocfmt} command. + The anchor is obtained from \gls{glsxtrrecentanchor}} + } + % \glsxtrlocationanchor + \gcmd{gls\-xtr\-location\-anchor} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.49+} + \desc{defined by \gls{glsxtrdisplaylocnameref} to expand to the + anchor constructed from \meta{counter} and \meta{hcounter}, + which corresponds to the record counter} + } + % \glsxtrrecentanchor + \gcmd{gls\-xtr\-recent\-anchor} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.49+} + \desc{defined by \gls{glsxtrdisplaylocnameref} to expand to + the \meta{href} argument. This corresponds to the value of + \gls{@currentHref} when the record was created} + } + % \glsxtractualanchor + \gcmd{gls\-xtr\-actual\-anchor} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.49+} + \desc{expands to the anchor required by \gls{glsxtrdisplaylocnameref}} + } + % \glsxtrsetactualanchor + \gcmd{gls\-xtr\-set\-actual\-anchor} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.49+} + \syntax{\margm{counter}} + \desc{hook used by \gls{glsxtrdisplaylocnameref} to override + the default definition of \gls{glsxtractualanchor}} + } + % \glsxtrlocfmt + \gcmdmeta{gls\-xtr}{counter}{loc\-fmt} + { + \note{user defined} + \syntax{\margm{location}\margm{title}} + \desc{used by \gls{glsxtrdisplaylocnameref} for format a + \location\ where the counter matches \meta{counter}} + } + % \glsxtrequationlocfmt + \gcmd{gls\-xtr\-equation\-loc\-fmt} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.42+} + \syntax{\margm{location}\margm{title}} + \desc{used by \gls{glsxtrdisplaylocnameref} to format a + \location\ where the counter is \ctr{equation}} + } + % \glsxtrwrglossarylocfmt + \gcmd{gls\-xtr\-wr\-glossary\-loc\-fmt} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.49+} + \syntax{\margm{location}\margm{title}} + \desc{used by \gls{glsxtrdisplaylocnameref} to format a + \location\ where the counter is \ctr{wrglossary}} + } + % \glsxtrnamereflink + \gcmd{gls\-xtr\-name\-ref\-link} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.37+} + \syntax{\margm{format}\margm{title}\margm{target}\margm{file}} + \desc{used by \gls{glsxtrdisplaylocnameref} to create a + \location\ hyperlink} + } + % \glsxtrfmtinternalnameref + \gcmd{gls\-xtr\-fmt\-internal\-name\-ref} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.37+} + \syntax{\margm{target}\margm{format}\margm{file}} + \desc{used by \gls{glsxtrnamereflink} to create an internal + \location\ hyperlink} + } + % \glsxtrfmtexternalnameref + \gcmd{gls\-xtr\-fmt\-external\-name\-ref} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.37+} + \syntax{\margm{target}\margm{format}\margm{title}\margm{file}} + \desc{used by \gls{glsxtrnamereflink} to create an external + \location\ hyperlink} + } + % \glsxtrnameloclink + \gcmd{gls\-xtr\-name\-loc\-link} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.37+} + \syntax{\margm{prefix}\margm{counter}\margm{format}\margm{location}\margm{text}\margm{file}} + \desc{create an external \location\ hyperlink using the prefix and counter} + } + % RESOURCE OPTIONS + \gidx{resourceopt}{\name{resource options}% + \field{text}{resource option}% + \desc{these options may be used in the optional argument of + \gls{GlsXtrLoadResources} and \gls{glsxtrresourcefile}} + } + % resource option loc-prefix + \gresourceopt{loc\dhyphen prefix}% + {% + \syntax{\meta{value}} + \initval{false} + \desc{inserts a prefix in front of \idxpl{locationlist}} + } + % resource option loc-suffix + \gresourceopt{loc\dhyphen suffix}% + {% + \syntax{\meta{value}} + \initval{false} + \desc{inserts a suffix at the end of \idxpl{locationlist}} + } + % resource option group-level + \gresourceopt{group\dhyphen level} + { + \syntax{\meta{value}} + \initval{0} + \desc{if the \switch{group} switch is used, this indicates which + \idxpl{hierarchicallevel} should have the \gloskey{group} field + set. The default is 0, which means the \idx{group} is only set for + top-level entries. This option has no effect if the default + \switch{no-group} is in effect} + } + % resource option label-prefix + \gresourceopt{label\dhyphen prefix}% + {% + \syntax{\meta{value}} + \desc{inserts a prefix in front of primary entry labels} + } + % resource option dual-prefix + \gresourceopt{dual\dhyphen prefix}% + {% + \syntax{\meta{value}} + \initval{dual.} + \desc{inserts a prefix in front of dual entry labels} + } + % resource option src + \gresourceopt{src}% + {% + \syntax{\meta{list}} + \initvalcs{jobname} + \desc{a comma-separated list of \ext+{bib} files that contain the + entry data (the file extension may be omitted)} + } + % resource option selection + \gresourceopt{selection}% + {% + \syntax{\meta{value}} + \initval{recorded and deps and see} + \desc{the selection criteria} + } + % resource option sort-field + \gresourceopt{sort\dhyphen field}% + {% + \syntax{\meta{value}} + \initval{sort} + \desc{the field to use for sorting} + } + % resource option sort-replace + \gresourceopt{sort\dhyphen replace}% + {% + \syntax{\meta{regex list}} + \desc{the value is a command separated list of + \margm{regex}\margm{replacement} pairs to perform on the sort value} + } + % resource option save-locations + \gresourceopt{save\dhyphen locations}% + {% + \syntax{\meta{value}} + \initval{true} + \defval{true} + \desc{determines whether or not to save the \idx{locationlist}. +This was originally a boolean option but as from \app{bib2gls} v3.0 it +now takes additional values} + } + % resource option loc-counters + \gresourceopt{loc\dhyphen counters}% + {% + \syntax{\meta{counter list}} + \desc{indicates that the \idx{locationlist} should be divided up + into counter groups corresponding to the listed counters} + } + % resource option sort + \gresourceopt{sort}% + {% + \syntax{\meta{value}} + \initval{doc} + \desc{identifies the sort method. The default is to use the + document's language or (if not set) the default locale} + } + % resource option save-index-counter + \gresourceopt{save\dhyphen index\dhyphen counter}% + {% + \syntax{\meta{value}} + \initval{false} + \desc{determines whether or not to create the + \glosfield{indexcounter} \idx{internalfield} with the value set to the first + \ctr{wrglossary} \location. This option is designed to be used + with the \opt{indexcounter} package option} + } + % resource option save-child-count + \gresourceopt{save\dhyphen child\dhyphen count}% + {% + \syntax{\meta{boolean}} + \initval{false} + \defval{true} + \desc{if true, each entry will have the total number of child + entries stored in the \glosfield{childcount} field and the list of + children will be stored in the \glosfield{childlist} field} + } + % resource option post-description-dot + \gresourceopt{post\dhyphen description\dhyphen dot}% + {% + \syntax{\meta{value}} + \initval{none} + \desc{appends a \idx{fullstop} to the \gloskey{description} field. + Allowed values: \optfmt{none} (no change), \optfmt{all} (append for all selected entries), + \optfmt{check} (only appends according to certain criteria). Note this inserts the + punctuation into the field value not in the \idx{postdeschook}. + See the \app{bib2gls} manual for further details.} + } + % resource option alias-loc + \gresourceopt{alias\dhyphen loc} + { + \syntax{\meta{value}} + \initval{transfer} + \desc{if an entry has an \gloskey{alias} field, this setting indicates + whether to keep the \idx{locationlist}, transfer it, or omit it} + } + % resource option see + \gresourceopt{see} + { + \syntax{\meta{value}} + \initval{transfer} + \desc{if an entry has an \gloskey{see} field, this setting indicates + whether to show the cross-reference at the start or end of the \idx{locationlist} + or omit it} + } + % resource option seealso + \gresourceopt{seealso} + { + \syntax{\meta{value}} + \initval{transfer} + \desc{if an entry has an \gloskey{seealso} field, this setting indicates + whether to show the cross-reference at the start or end of the \idx{locationlist} + or omit it} + } + % resource option alias + \gresourceopt{alias} + { + \syntax{\meta{value}} + \initval{transfer} + \desc{if an entry has an \gloskey{alias} field, this setting indicates + whether to show the cross-reference at the start or end of the \idx{locationlist} + or omit it} + } + % resource option supplemental-locations + \gresourceopt{supplemental\dhyphen locations} + { + \syntax{\meta{basename list}} + \desc{add \locations\ from the supplemental documents to the + corresponding entry's \idx{locationlist}} + } + % resource option prune-xr + \gresourceopt{prune\dhyphen xr} + { + \syntax{\meta{boolean}} + \initval{false} + \desc{shortcut option that enables pruning for both the + \gloskey{see} and \gloskey{seealso} fields} + } + % resource option sort-label-list + \gresourceopt{sort\dhyphen label\dhyphen list} + { + \syntax{\meta{field-list}:\meta{sort}:\meta{csname}} + \desc{instructs \app{bib2gls} to sort the given field values + (which must contain comma-separated lists of labels) according + to the given sort method. The final \code{:\meta{csname}} is + optional and indicates that the sort value should be obtained by + encapsulating the item with the command with the given control + sequence name (which needs to be recognised by \app{bib2gls})} + } + % resource option compound-adjust-name + \gresourceopt{compound\dhyphen adjust\dhyphen name} + { + \syntax{\meta{value}} + \desc{adjusts the \gloskey{name} of main entries in compound sets} + } + % resource option description-case-change + \gresourceopt{description\dhyphen case\dhyphen change} + { + \syntax{\meta{value}} + \desc{applies a \idx{casechange} to the \gloskey{description} field} + } + % resource option name-case-change + \gresourceopt{name\dhyphen case\dhyphen change} + { + \syntax{\meta{value}} + \desc{applies a \idx{casechange} to the \gloskey{name} field} + } + % resource option entry-type-aliases + \gresourceopt{entry\dhyphen type\dhyphen aliases} + { + \syntax{\meta{key=val list}} + \desc{the value is a comma-separated list of + \code{\meta{org type}\dequals\meta{new type}} elements, where + \meta{org type} is the original entry type given in the + \ext{bib} file (without the leading \code{@}) and \meta{new type} + is the entry type it should be treated as} + } + % resource option combine-dual-locations + \gresourceopt{combine\dhyphen dual\dhyphen locations} + { + \syntax{\meta{value}} + \desc{indicates whether or not to combine the + \idxpl{locationlist} for the primary and dual entries, and + indicates which entry (either or both) should have the \idx{locationlist}} + } + % resource option type + \gresourceopt{type} + { + \syntax{\meta{glossary-type}} + \desc{indicates that primary entries should be + assigned to the given \idx{glossary}} + } + % resource option category + \gresourceopt{category} + { + \syntax{\meta{category-label}} + \desc{indicates that primary entries should be + assigned to the given category} + } + % resource option group + \gresourceopt{group} + { + \syntax{\meta{group-label}} + \desc{indicates that primary entries should have the + \gloskey{group} field set to the given value} + } + % resource option trigger-type + \gresourceopt{trigger\dhyphen type} + { + \syntax{\meta{glossary-type}} + \desc{indicates that entries with trigger records should be + assigned to the given \idx{glossary}} + } + % resource option dual-type + \gresourceopt{dual\dhyphen type} + { + \syntax{\meta{glossary-type}} + \desc{indicates that dual entries should be + assigned to the given \idx{glossary}} + } + % resource option dual-field + \gresourceopt{dual\dhyphen field} + { + \syntax{\meta{field-name}} + \initval{false} + \defval{dual} + \desc{indicates that dual entry labels should be stored in the + given field} + } + % resource option dual-backlink + \gresourceopt{dual\dhyphen backlink} + { + \syntax{\meta{boolean}} + \initval{false} + \defval{true} + \desc{switches on all the dual backlink settings} + } + % resource option flatten + \gresourceopt{flatten} + { + \syntax{\meta{boolean}} + \initval{false} + \defval{true} + \desc{if true, sorting will ignore hierarchy and the + \gloskey{parent} key won't be used in the \ext{glstex} file, but the + parent entry will still be considered a dependency (unlike + \resourceoptvalm{ignore-fields}{parent})} + } + % resource option ignore-fields + \gresourceopt{ignore\dhyphen fields} + { + \syntax{\margm{field list}} + \desc{instructs \app{bib2gls} to ignore the listed fields} + } + % resource option secondary + \gresourceopt{secondary} + { + \syntax{\meta{sort}:\meta{field}:\meta{type}} + \desc{re-sorts the entries according to the given sort + method, using the value in the given \meta{field} as the sort + value, and copies the entry to the glossary identified by + \meta{type}. The \code{:\meta{field}} may be omitted, in which case + the \gloskey{sort} field is assumed} + } + % resource option symbol-sort-fallback + \gresourceopt{symbol\dhyphen sort\dhyphen fallback} + { + \syntax{\margm{field}} + \desc{if the \gloskey{sort} key is being used to obtain the sort + value but the \gloskey{sort} key hasn't been set for any symbol + entries (for example, \atentry{symbol} or \atentry{number}) then the + sort value will be obtained from the given \meta{field} instead. If + the \gloskey{sort} key has been set or if a different field is being + used for sorting, then this option has no effect} + } + % resource option field-aliases + \gresourceopt{field\dhyphen aliases} + { + \syntax{\margm{src-field=target-field list}} + \desc{makes \meta{src-field} an alias of \meta{target-field} for + each pair in the list} + } + % resource option replicate-fields + \gresourceopt{replicate\dhyphen fields} + { + \syntax{\margm{key=value list}} + \desc{where each element in the \meta{key=value list} is in the + form \code{\meta{src-field}\dequals\meta{dest-field list}}, + this copies the value of the field identified by \meta{src-field} to + each field in the comma-separated \meta{dest-field list}} + } + % resource option interpret-fields + \gresourceopt{interpret\dhyphen fields} + { + \syntax{\margm{field list}} + \desc{replaces each field in the list with its interpreted value} + } + % resource option set-widest + \gresourceopt{set\dhyphen widest} + { + \syntax{\meta{boolean}} + \initval{false} + \defval{true} + \desc{instructs \app{bib2gls} to determine the widest entry name + for use with styles like \glostyle{alttree}. Only suitable for + textual names} + } + % resource option sort-rule + \gresourceopt{sort\dhyphen rule} + { + \syntax{\margm{value}} + \desc{the comparator rule to use with \resourceoptval{sort}{custom}} + } + % COMMANDS: LANGUAGE-SENSITIVE + % \glossaryname + \gcmd{glossary\-name}% + {% + \initval{Glossary}% + \note{language-sensitive} + \desc{expands to the default \idx{glossary} title (provided by + \sty{glossaries} if not already defined)} + }% + % \indexname + \gcmd{index\-name}% + {% + \initval{Index}% + \note{language-sensitive} + \desc{expands to the index title} + }% + % \acronymname + \gcmd{acronym\-name}% + {% + \providedby{\sty{glossaries}} + \initval{Acronyms}% + \note{language-sensitive} + \desc{expands to the title of the \code{acronym} \idx{glossary}} + }% + % \abbreviationsname + \gcmd{abbre\-vi\-a\-tions\-name}% + {% + \initval{Abbreviations}% + \providedby{\sty{glossaries-extra}} + \note{language-sensitive} + \desc{expands to the title of the \code{abbreviations} \idx{glossary}. + The default is \qt{Abbreviations} or \gls{acronymname} if \sty{babel} + has been detected} + }% + % \glsnumbersgroupname + \gcmd{gls\-numbers\-group\-name}% + {% + \providedby{\sty{glossaries}} + \initval{Numbers}% + \note{language-sensitive} + \desc{expands to the title of the \code{numbers} \idx{group} and + (if the \opt{numbers} package option is used) the + \code{numbers} \idx{glossary}} + }% + % \glssymbolsgroupname + \gcmd{gls\-symbols\-group\-name}% + {% + \providedby{\sty{glossaries}} + \initval{Symbols}% + \note{language-sensitive} + \desc{expands to the title of the \code{symbols} \idx{group} and + (if the \opt{symbols} package option is used) the + \code{symbols} \idx{glossary}} + }% + % \seename + \gcmd{see\-name}% + {% + \initval{see}% + \note{language-sensitive} + \desc{used as a cross-reference tag (provided by + \sty{glossaries} if not already defined)} + }% + % \seealsoname + \gcmd{see\-also\-name}% + {% + \providedby{\sty{glossaries-extra} v1.16+} + \initval{see also}% + \note{language-sensitive} + \desc{used as a cross-reference tag. The default value is + \gls{alsoname}, if that command has been defined, or \qt{see also}} + }% + % \alsoname + \gcmd{also\-name}% + {% + \initval{see also}% + \note{language-sensitive} + \desc{used as a cross-reference tag (provided by language + packages, such as \sty{babel})} + }% + % \entryname + \gcmd{entry\-name}% + {% + \providedby{\sty{glossaries}} + \initval{Notation}% + \note{language-sensitive} + \desc{expands to the title of the name column for headed + \env{tabular}-like styles} + }% + % \descriptionname + \gcmd{description\-name}% + {% + \providedby{\sty{glossaries}} + \initval{Description}% + \note{language-sensitive} + \desc{expands to the title of the description column for headed + \env{tabular}-like styles} + }% + % \symbolname + \gcmd{symbol\-name}% + {% + \providedby{\sty{glossaries}} + \initval{Symbol}% + \note{language-sensitive} + \desc{expands to the title of the symbol column for headed + \env{tabular}-like styles} + }% + % \pagelistname + \gcmd{page\-list\-name}% + {% + \providedby{\sty{glossaries}} + \initval{Page List}% + \note{language-sensitive} + \desc{expands to the title of the \idx{locationlist} column for headed + \env{tabular}-like styles} + }% + % COMMANDS: PLURAL SUFFIXES + % \glspluralsuffix + \gcmd{gls\-plural\-suffix}{ + \desc{expands to the letter \qt{s} and is used to form default + plurals. This command isn't language-sensitive as there's + guarantee when it will be expanded. (It may be expanded when + the entry is defined or it may be expanded when the entry is + used). If you need to suppress this suffix for abbreviations, + use the \catattr{noshortplural} attribute. If you need an + apostrophe before the \qt{s} for single-letter abbreviations to + avoid ambiguity, use the \catattr{aposplural} attribute} + } + % \acrpluralsuffix + \gcmd{acr\-plural\-suffix}{ + \banned + \desc{used for the plural suffixes for the base package's + acronym mechanism. Not used with \sty{glossaries-extra}'s abbreviations, + which use \gls{glsxtrabbrvpluralsuffix}, + \gls{abbrvpluralsuffix} and commands provided for use with + particular \idxpl{abbrvstyle}. This command should not be used + with \sty{glossaries-extra}} + } + % \glsxtrabbrvpluralsuffix + \gcmd{gls\-xtr\-abbrv\-plural\-suffix}{ + \providedby{\sty{glossaries-extra} v1.12+} + \initvalcs{glspluralsuffix} + \desc{the default plural suffix used for abbreviations} + } + % \abbrvpluralsuffix + \gcmd{abbrv\-plural\-suffix}{ + %\providedby{\sty{glossaries-extra} v1.0+} + \initvalcs{glsxtrabbrvpluralsuffix} + \desc{style-sensitive abbreviation suffix. This is the command + that's actually used in the value of the \gloskey{shortplural} key + when an entry is defined with \gls{newabbreviation} (unless + suppressed with the \catattr{noshortplural} attribute). This command is + redefined by the \idxpl{abbrvstyle} to + \gls{glsxtrabbrvpluralsuffix} or the style's custom suffix command + (such as \gls{glsxtrscsuffix})} + } + % \glsxtrscsuffix + \gcmd{gls\-xtr\-sc\-suffix}{ + %\providedby{\sty{glossaries-extra} 0.5+} + \desc{the plural suffix used by the \idx{smallcaps} (\qt{sc}) + \idxpl{abbrvstyle}. This switches off the \idx{smallcaps} font to + prevent the suffix from also appearing in \idx{smallcaps}} + } + % \glsxtrsmsuffix + \gcmd{gls\-xtr\-sm\-suffix}{ + %\providedby{\sty{glossaries-extra} 0.5+} + \initvalcs{glsxtrabbrvpluralsuffix} + \desc{the plural suffix used by the smaller (\qt{sm}) \idxpl{abbrvstyle} + (such as \abbrstyle{short-sm-long})} + } + % \glsxtremsuffix + \gcmd{gls\-xtr\-em\-suffix}{ + %\providedby{\sty{glossaries-extra} 0.5+} + \initvalcs{glsxtrabbrvpluralsuffix} + \desc{the plural suffix used by the emphasized (\qt{em}) \idxpl{abbrvstyle}} + } + % \glsxtrusersuffix + \gcmd{gls\-xtr\-user\-suffix}{ + \providedby{\sty{glossaries-extra} v1.04+} + \initvalcs{glsxtrabbrvpluralsuffix} + \desc{the plural suffix used by styles like \abbrstyle{short-long-user}} + } + % \glsxtrscusersuffix + \gcmd{gls\-xtr\-sc\-user\-suffix}{ + \providedby{\sty{glossaries-extra} v1.48+} + \desc{the plural suffix used by styles like + \abbrstyle{long-postshort-sc-user}} + } + % \glsxtrhyphensuffix + \gcmd{gls\-xtr\-hyphen\-suffix}{ + \providedby{\sty{glossaries-extra} v1.17+} + \initvalcs{glsxtrabbrvpluralsuffix} + \desc{the plural suffix used by the \qt{hyphen} \idxpl{abbrvstyle} + (such as \abbrstyle{short-hyphen-long-hyphen})} + } + % \glsxtronlysuffix + \gcmd{gls\-xtr\-only\-suffix}{ + \providedby{\sty{glossaries-extra} v1.17+} + \initvalcs{glsxtrabbrvpluralsuffix} + \desc{the plural suffix used by the \qt{only} \idxpl{abbrvstyle} + (such as \abbrstyle{long-only-short-only})} + } + % \glsxtrsconlysuffix + \gcmd{gls\-xtr\-sc\-only\-suffix}{ + \providedby{\sty{glossaries-extra} v1.48+} + \initvalcs{glsxtrscsuffix} + \desc{the plural suffix used by the \qt{sc-only} \idxpl{abbrvstyle} + (such as \abbrstyle{long-only-short-sc-only})} + } + % COMMANDS: POST-LINK HOOKS + % \glspostlinkhook + \gcmd{gls\-post\-link\-hook}{% + \providedby{\sty{glossaries} v4.16+} + \desc{a \idx{postlinkhook} used after all the \idx{glslike} and + \idx{glstextlike} commands. This is redefined by + \sty{glossaries-extra} to use \gls{glsxtrpostlinkhook}} + } + % \glsxtrpostlinkhook + \gcmd{gls\-xtr\-post\-link\-hook}{% + %\providedby{\sty{glossaries-extra} v1.0+}% + \desc{a \idx{postlinkhook} that + checks if a following \idx{fullstop} needs to be discarded, in which case + it does \gls{glsxtrpostlinkendsentence}, otherwise it does + \gls{glsxtrpostlink}} + } + % \glsxtrpostlinkendsentence + \gcmd{gls\-xtr\-post\-link\-end\-sentence} + { + %\providedby{\sty{glossaries-extra} v1.0+}% + \desc{a \idx{postlinkhook} that's used if a \idx{fullstop} is + discarded in order to adjust the space factor (to denote the end + of a sentence). If the \idx{catpostlinkhook} exists, and will be applied and the + \idx{fullstop} will be restored} + } + % \glsxtrpostlink + \gcmd{gls\-xtr\-post\-link}{% + %\providedby{\sty{glossaries-extra} v1.0+}% + \desc{a \idx{postlinkhook} that does \gls{glsxtrpostlinkcat} if + that command has been defined, where the category label is + obtained from the entry that has just been referenced with a + \idx{glslike} or \idx{glstextlike} command (using \gls{glslabel}). + Does nothing if \gls{glsxtrpostlinkcat} isn't defined} + } + % \glsxtrpostlink + \gcmd{glsxtrpostlinkcat}{% + \name{{}\csfmt{gls\-xtr\-post\-link\meta{category}}} + %\providedby{\sty{glossaries-extra} v1.0+}% + \desc{the \idx{postlinkhook} associated with the category + identified by the label \meta{category}} + } + % \glsdefpostlink + \gcmd{gls\-def\-post\-link}{% + \syntax{\margm{category}\margm{definition}} + \providedby{\sty{glossaries-extra} v1.31+}% + \desc{defines \idx{postlinkhook} associated with the category + identified by the label \meta{category}. This simply (re)defines + \gls{glsxtrpostlinkcat} for the given \meta{category} to + \meta{definition}} + } + % \glspretopostlink + \gcmd{gls\-pre\-to\-post\-link}{% + \syntax{\margm{category}\margm{code}} + \providedby{\sty{glossaries-extra} v1.49+}% + \desc{prepends \meta{code} to \idx{postlinkhook} associated with the category + identified by the label \meta{category} (or simply defines it, + if it doesn't already exist)} + } + % \glsapptopostlink + \gcmd{gls\-app\-to\-post\-link}{% + \syntax{\margm{category}\margm{code}} + \providedby{\sty{glossaries-extra} v1.49+}% + \desc{appends \meta{code} to \idx{postlinkhook} associated with the category + identified by the label \meta{category} (or simply defines it, + if it doesn't already exist)} + } + % \glsxtrpostlinkAddDescOnFirstUse + \gcmd{gls\-xtr\-post\-link\-Add\-Desc\-On\-First\-Use}{% + %\providedby{\sty{glossaries-extra} v0.3+}% + \desc{may be used within a \idx{postlinkhook} to display the + description in parentheses on \idx{firstuse}} + } + % \glsxtrpostlinkAddSymbolOnFirstUse + \gcmd{gls\-xtr\-post\-link\-Add\-Symbol\-On\-First\-Use}{% + %\providedby{\sty{glossaries-extra} v0.3+}% + \desc{may be used within a \idx{postlinkhook} to display the + symbol in parentheses on \idx{firstuse}} + } + % \glsxtrpostlinkAddSymbolDescOnFirstUse + \gcmd{gls\-xtr\-post\-link\-Add\-Symbol\-Desc\-On\-First\-Use}{% + \providedby{\sty{glossaries-extra} v1.31+}% + \desc{may be used within a \idx{postlinkhook} to display the + symbol and description in parentheses on \idx{firstuse}} + } + % \glsxtrpostlinkSymbolDescSep + \gcmd{gls\-xtr\-post\-link\-Symbol\-Desc\-Sep}{% + \providedby{\sty{glossaries-extra} v1.49+}% + \desc{used by \gls{glsxtrpostlinkAddSymbolDescOnFirstUse} to + separate the symbol and description, if both are set} + } + % \glsxtrdiscardperiod + \gcmd{gls\-xtr\-discard\-period}{% + %\providedby{\sty{glossaries-extra} v1.0+} + \syntax{\margm{entry-label}\margm{discarded}\margm{no discard}\meta{token}} + \providedby{\sty{glossaries-extra}}% + \desc{if \meta{token} is a \idx{fullstop} and the entry's + \idxpl{categoryattribute} indicate that a \idx{fullstop} should be discarded + (such as \catattr{discardperiod}), + then \meta{discarded} is performed, otherwise + \meta{no discard} is done and the \meta{token} is processed. The actual test to + determine if \meta{token} is a \idx{fullstop} is performed by + \gls{glsxtrifperiod}. This command is used in \glspl{postlinkhook}} + } + % \glsxtrifcustomdiscardperiod + \gcmd{gls\-xtr\-if\-custom\-discard\-period} + { + \providedby{\sty{glossaries-extra} v1.23+} + \syntax{\margm{true}\margm{false}} + \initval{\meta{false}} + \desc{user hook to trigger a check for a following \idx{fullstop}. + This should do \meta{true} if there should be a check for a + following \idx{fullstop} otherwise should do \meta{false}} + } + % \glsxtrifperiod + \gcmd{gls\-xtr\-if\-period}{% + %\providedby{\sty{glossaries-extra} v1.0+} + \syntax{\margm{true}\margm{false}\meta{token}} + \providedby{\sty{glossaries-extra}}% + \desc{does \meta{true} if \meta{token} is a \idx{fullstop}, otherwise + does \meta{false}} + } + % \glsxtrdiscardperiodretainfirstuse + \gcmd{gls\-xtr\-discard\-period\-retain\-first\-use}{% + \providedby{\sty{glossaries-extra} v1.49+}% + \syntax{\margm{entry-label}\margm{discarded}\margm{no discard}\meta{token}} + \desc{used to discard a following \idx{fullstop} when the + \catattr{retainfirstuseperiod} attribute is set} + } + % \glsxtrdopostpunc + \gcmd{gls\-xtr\-do\-post\-punc}{% + \providedby{\sty{glossaries-extra} v1.49+} + \syntax{\margm{code}\meta{token}} + \desc{if \meta{token} is a recognised punctuation character + (see \gls{glsxtrifnextpunc}) this does the punctuation + character and then \meta{code}, otherwise if does \meta{code} + followed by \meta{token}} + } + % \glsxtrifnextpunc + \gcmd{gls\-xtr\-if\-next\-punc}{% + %\providedby{\sty{glossaries-extra} v1.0+} + \syntax{\margm{true}\margm{false}} + \providedby{\sty{glossaries-extra}}% + \desc{performs \meta{true} if this command is followed by a + recognised punctuation character otherwise does \meta{false}. + The list of recognised punctuation marks is initialised to \code{.,:;?!} + (\idx{fullstop}, comma, colon, semicolon, question mark, and + exclamation mark). Additional punctuation characters can be + added with \gls{glsxtraddpunctuationmark}} + } + % \glsxtraddpunctuationmark + \gcmd{gls\-xtr\-add\-punctuation\-mark}{% + %\providedby{\sty{glossaries-extra} v1.0+} + \syntax{\margm{token(s)}} + \desc{adds \meta{token(s)} to the list of punctuation characters + used by \gls{glsxtrifnextpunc}. You may list multiple characters + at the same time to add a batch, but don't add any separators + (including spaces). Note that each character must be a + single token, which means a single-byte character for \pdfLaTeX. + Multi-byte characters (\idx{utf8}) will required a native + Unicode engine (\XeLaTeX\ or \LuaLaTeX)} + } + % \glsxtrsetpunctuationmarks + \gcmd{gls\-xtr\-set\-punctuation\-marks}{% + %\providedby{\sty{glossaries-extra} v1.0+} + \syntax{\margm{token list}} + \desc{sets the punctuation list used by \gls{glsxtrifnextpunc}. + The \meta{token list} must be a non-delimited list of single + tokens that represent each punctuation character. Note that the + element of the list must be a single token, which means a single-byte + character for \pdfLaTeX\ (for example, \idx{ascii}). Multi-byte + characters (\idx{utf8}) will required a native Unicode engine + (\XeLaTeX\ or \LuaLaTeX)} + } + % COMMANDS: bib2gls + % \bibglssettotalrecordcount + \gcmd{bib\-gls\-set\-total\-record\-count} + { + \providedby{\app{bib2gls} v1.1+} + \syntax{\margm{entry-label}\margm{value}} + \desc{sets the total record count for the given entry} + \field{seealso}{switch.record-count} + } + % \bibglssetrecordcount + \gcmd{bib\-gls\-set\-record\-count} + { + \providedby{\app{bib2gls} v1.1+} + \syntax{\margm{entry-label}\margm{counter}\margm{value}} + \desc{sets the \meta{counter} record count for the given entry} + \field{seealso}{switch.record-count} + } + % \bibglssetlocationrecordcount + \gcmd{bib\-gls\-set\-location\-record\-count} + { + \providedby{\app{bib2gls} v1.1+} + \syntax{\margm{entry-label}\margm{counter}\margm{location}\margm{value}} + \desc{sets the location record count for the given entry} + \field{seealso}{switch.record-count-unit} + } + % \bibglsprimaryprefixlabel + \gcmd{bib\-gls\-primary\-prefix\-label} + { + \providedby{\app{bib2gls} v1.8+} + \syntax{\margm{label-prefix}} + \desc{hook written to the \ext{glstex} file identifying the + primary label prefix} + } + % \bibglsdualprefixlabel + \gcmd{bib\-gls\-dual\-prefix\-label} + { + \providedby{\app{bib2gls} v1.8+} + \syntax{\margm{label-prefix}} + \desc{hook written to the \ext{glstex} file identifying the + dual label prefix} + } + % \bibglstertiaryprefixlabel + \gcmd{bib\-gls\-tertiary\-prefix\-label} + { + \providedby{\app{bib2gls} v1.8+} + \syntax{\margm{label-prefix}} + \desc{hook written to the \ext{glstex} file identifying the + tertiary label prefix} + } + % \GlsXtrTotalRecordCount + \gcmd{Gls\-Xtr\-Total\-Record\-Count} + { + \providedby{\sty{glossaries-extra} v1.21+} + \syntax{\margm{entry-label}} + \desc{expands to the entry's total record count (stored in + the \glosfield{recordcount} field) or to 0 if not set} + } + % \GlsXtrRecordCount + \gcmd{Gls\-Xtr\-Record\-Count} + { + \providedby{\sty{glossaries-extra} v1.21+} + \syntax{\margm{entry-label}\margm{counter}} + \desc{expands to the entry's record count for the given + \idxc{locationcounter}{counter} (stored in + the \glosfield{recordcount.counter} field) or to 0 if not set} + } + % \GlsXtrLocationRecordCount + \gcmd{Gls\-Xtr\-Location\-Record\-Count} + { + \providedby{\sty{glossaries-extra} v1.21+} + \syntax{\margm{entry-label}\margm{counter}\margm{location}} + \desc{expands to the entry's record count for the given + \idxc{locationcounter}{counter} and \location\ (stored in + the \glosfield{recordcount.counter.location} field) or + to 0 if not set} + } + % \glsxtrenablerecordcount + \gcmd{gls\-xtr\-enable\-record\-count} + { + \providedby{\sty{glossaries-extra} v1.21+} + \desc{redefines the \idx{glslike} commands (except \gls{glsdisp}) + to use the analogous record count commands (\gls{rgls} etc)} + } + % \rgls + \gcmdspa{rgls} + { + \providedby{\sty{glossaries-extra} v1.21+} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{like \gls{gls} but hooks into the entry's record count} + \field{seealso}{glsxtrifrecordtrigger,rglsformat,switch.record-count} + } + % \rglspl + \gcmdspa{rgls\-pl} + { + \providedby{\sty{glossaries-extra} v1.21+} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{like \gls{glspl} but hooks into the entry's record count} + \field{seealso}{glsxtrifrecordtrigger,rglsplformat,switch.record-count} + } + % \rGls + \gcmdspa{rGls} + { + \providedby{\sty{glossaries-extra} v1.21+} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{like \gls{Gls} but hooks into the entry's record count} + \field{seealso}{glsxtrifrecordtrigger,rGlsformat,switch.record-count} + } + % \rGlspl + \gcmdspa{rGls\-pl} + { + \providedby{\sty{glossaries-extra} v1.21+} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{like \gls{Glspl} but hooks into the entry's record count} + \field{seealso}{glsxtrifrecordtrigger,rGlsplformat,switch.record-count} + } + % \rGLS + \gcmdspa{rGLS} + { + \providedby{\sty{glossaries-extra} v1.21+} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{like \gls{GLS} but hooks into the entry's record count} + \field{seealso}{glsxtrifrecordtrigger,rGLSformat,switch.record-count} + } + % \rGLSpl + \gcmdspa{rGLS\-pl} + { + \providedby{\sty{glossaries-extra} v1.21+} + \syntax{\oargm{options}\margm{entry-label}\oargm{insert}} + \desc{like \gls{GLSpl} but hooks into the entry's record count} + \field{seealso}{glsxtrifrecordtrigger,rGlsplformat,switch.record-count} + } + % \glsxtrifrecordtrigger + \gcmd{gls\-xtr\-if\-record\-trigger} + { + \providedby{\sty{glossaries-extra} v1.21+} + \syntax{\margm{entry-label}\margm{true}\margm{false}} + \desc{does \meta{true} if the entry's total record count + (obtained with \gls{glsxtrrecordtriggervalue}) exceeds the value + supplied by the \catattr{recordcount} attribute, + otherwise does \meta{false}} + \field{seealso}{rgls,GlsXtrSetRecordCountAttribute,switch.record-count} + } + % \glsxtrrecordtriggervalue + \gcmd{gls\-xtr\-record\-trigger\-value} + { + \providedby{\sty{glossaries-extra} v1.21+} + \syntax{\margm{entry-label}} + \desc{expands to the trigger value used by \gls{glsxtrifrecordtrigger}} + \field{seealso}{rgls,switch.record-count} + } + % \glstriggerrecordformat + \gcmd{gls\-trigger\-record\-format} + { + \providedby{\sty{glossaries-extra} v1.21+} + \syntax{\margm{location}} + \desc{used as a special location format that indicates that the + record is a trigger record} + \field{seealso}{rgls,switch.record-count} + } + % \GlsXtrSetRecordCountAttribute + \gcmd{Gls\-Xtr\-Set\-Record\-Count\-Attribute} + { + \providedby{\sty{glossaries-extra} v1.21+} + \syntax{\margm{category-list}\margm{value}} + \desc{sets the \catattr{recordcount} attribute to \meta{value} + for each of the listed categories} + } + % \rglsformat + \gcmd{rgls\-format} + { + \providedby{\sty{glossaries-extra} v1.21+} + \syntax{\margm{entry-label}\margm{insert}} + \desc{format used by \gls{rgls} if the entry's record count is more + than the given trigger value} + } + % \rglsplformat + \gcmd{rgls\-pl\-format} + { + \providedby{\sty{glossaries-extra} v1.21+} + \syntax{\margm{entry-label}\margm{insert}} + \desc{format used by \gls{rglspl} if the entry's record count is more + than the given trigger value} + } + % \rGlsformat + \gcmd{rGls\-format} + { + \providedby{\sty{glossaries-extra} v1.21+} + \syntax{\margm{entry-label}\margm{insert}} + \desc{format used by \gls{rGls} if the entry's record count is more + than the given trigger value} + } + % \rGlsplformat + \gcmd{rGls\-pl\-format} + { + \providedby{\sty{glossaries-extra} v1.21+} + \syntax{\margm{entry-label}\margm{insert}} + \desc{format used by \gls{rGlspl} if the entry's record count is more + than the given trigger value} + } + % \rGLSformat + \gcmd{rGLS\-format} + { + \providedby{\sty{glossaries-extra} v1.21+} + \syntax{\margm{entry-label}\margm{insert}} + \desc{format used by \gls{rGLS} if the entry's record count is more + than the given trigger value} + } + % \rGLSplformat + \gcmd{rGLS\-pl\-format} + { + \providedby{\sty{glossaries-extra} v1.21+} + \syntax{\margm{entry-label}\margm{insert}} + \desc{format used by \gls{rGLSpl} if the entry's record count is more + than the given trigger value} + } + % \bibglsnewdualindexsymbolsecondary + \gcmd{bib\-gls\-new\-dual\-index\-symbol\-secondary} + { + \providedby{\app{bib2gls}} + \syntax{\margm{label}\margm{options}\margm{name}\margm{description}} + \desc{defines secondary terms provided with \atentry{dualindexsymbol}} + } + % \bibglssetlastgrouptitle + \gcmd{bib\-gls\-set\-last\-group\-title} + { + \providedby{\app{bib2gls}} + \syntax{\margm{cs}\margm{specs}} + \desc{sets the last group title} + } + % \GlsXtrDualField + \gcmd{Gls\-Xtr\-Dual\-Field} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.30+} + \initval{dual} + \desc{expands to the \idx{internalfieldlabel} used by \gls{GlsXtrDualBackLink}} + } + % \GlsXtrDualBackLink + \gcmd{Gls\-Xtr\-Dual\-Back\-Link} + { + \providedby{\sty{glossaries-extra-bib2gls} v1.30+} + \syntax{\margm{text}\margm{entry-label}} + \desc{Adds a hyperlink to the given entry's dual (whose label is + stored in the field given by \gls{GlsXtrDualField}) with the + given hyperlink text} + } + % COMMANDS: ON THE FLY + % \GlsXtrEnableOnTheFly + \gcmds{Gls\-Xtr\-Enable\-On\-The\-Fly} + { + %\providedby{\sty{glossaries-extra} v0.5.4+} + \desc{enables on the fly commands, such as \gls{glsxtr}} + } + % \glsxtr + \gcmd{gls\-xtr} + { + %\providedby{\sty{glossaries-extra} v0.5.4+} + \syntax{\oargm{gls-options}\oargm{dfn-options}\margm{entry-label}} + \desc{if \meta{entry-label} has already been defined, this just + references it, otherwise the entry is defined. This command must + be enabled with \gls{GlsXtrEnableOnTheFly}} + } + % \glsxtrpl + \gcmd{gls\-xtr\-pl} + { + %\providedby{\sty{glossaries-extra} v0.5.4+} + \syntax{\oargm{gls-options}\oargm{dfn-options}\margm{entry-label}} + \desc{as \gls{glsxtr} but shows the plural form} + } + % \Glsxtr + \gcmd{Gls\-xtr} + { + %\providedby{\sty{glossaries-extra} v0.5.4+} + \syntax{\oargm{gls-options}\oargm{dfn-options}\margm{entry-label}} + \desc{as \gls{glsxtr} but applies \idx{sentencecase}} + } + % \Glsxtrpl + \gcmd{Gls\-xtr\-pl} + { + %\providedby{\sty{glossaries-extra} v0.5.4+} + \syntax{\oargm{gls-options}\oargm{dfn-options}\margm{entry-label}} + \desc{as \gls{glsxtrpl} but applies \idx{sentencecase}} + } + % \glsxtrcat + \gcmd{gls\-xtr\-cat} + { + %\providedby{\sty{glossaries-extra} v0.5.4+} + \initval{general} + \desc{expands to the default category set by commands like \gls{glsxtr}} + } + % COMMANDS: OTHER + % \GlsXtrInternalLocationHyperlink + \gcmd{Gls\-Xtr\-Internal\-Location\-Hyper\-link} + { + \providedby{\sty{glossaries-extra} v1.29+} + \syntax{\margm{counter}\margm{prefix}\margm{location}} + \desc{used by \gls{glsxtrlocationhyperlink} to create an + internal hyperlink to the given location (advanced command, see + documented code for use)} + } + % \glsxtrlocationhyperlink + \gcmd{gls\-xtr\-location\-hyper\-link} + { + \providedby{\sty{glossaries-extra} v1.14+} + \syntax{\margm{counter}\margm{prefix}\margm{location}} + \desc{used to create a hyperlink to either an external or an + internal location, depending on whether or not + \gls{glsxtrsupplocationurl} is defined and not empty (advanced command, see + documented code for use)} + } + % \glsxtrundefaction + \gcmd{gls\-xtr\-un\-def\-action} + { + \providedby{\sty{glossaries-extra} v1.08+} + \syntax{\margm{message}\margm{additional help}} + \desc{will either produce an error or a warning, depending on + the \opt{undefaction} setting. In the \envfmt{document} environment + this will also generate the unknown marker (\idx{unknowntag})} + } + % \glsxtrundeftag + \gcmd{gls\-xtr\-un\-def\-tag} + { + \providedby{\sty{glossaries-extra} v1.08+} + \initval{\glsxtrundeftag} + \desc{expands to the unknown marker (\idx{unknowntag})} + } + % \ProvidesGlossariesExtraLang + \gcmd{Provides\-Glossaries\-Extra\-Lang} + { + %\providedby{\sty{glossaries-extra} v0.5.3+} + \syntax{\margm{tag}} + \desc{should be placed at the start of a \sty{glossaries-extra} + \ext{ldf} file} + } + % \RequireGlossariesExtraLang + \gcmd{Require\-Glossaries\-Extra\-Lang} + { + %\providedby{\sty{glossaries-extra} v0.5.3+} + \syntax{\margm{tag}} + \desc{indicates that a \sty{glossaries-extra} + \ext{ldf} file should be input, if it hasn't already been input} + } + % \GlsXtrNoGlsWarningHead + \gcmd{Gls\-Xtr\-No\-Gls\-Warning\-Head} + { + %\providedby{\sty{glossaries-extra} v1.0+} + \syntax{\margm{glossary-label}\margm{file}} + \desc{produces the header boilerplate text if a glossary file is missing} + } + % \GlsXtrNoGlsWarningEmptyStart + \gcmd{Gls\-Xtr\-No\-Gls\-Warning\-Empty\-Start} + { + %\providedby{\sty{glossaries-extra} v1.0+} + \desc{produces the boilerplate text if a glossary is + probably empty} + } + % \GlsXtrNoGlsWarningEmptyMain + \gcmd{Gls\-Xtr\-No\-Gls\-Warning\-Empty\-Main} + { + %\providedby{\sty{glossaries-extra} v1.0+} + \desc{produces the boilerplate text if the probably empty + glossary is the \code{main} one} + } + % \GlsXtrNoGlsWarningEmptyNotMain + \gcmd{Gls\-Xtr\-No\-Gls\-Warning\-Empty\-Not\-Main} + { + %\providedby{\sty{glossaries-extra} v1.0+} + \syntax{\margm{glossary-label}} + \desc{produces the boilerplate text if the probably empty + glossary is not the \code{main} one} + } + % \GlsXtrNoGlsWarningCheckFile + \gcmd{Gls\-Xtr\-No\-Gls\-Warning\-Check\-File} + { + %\providedby{\sty{glossaries-extra} v1.0+} + \syntax{\margm{file}} + \desc{advisory message to check the file contents} + } + % \GlsXtrNoGlsWarningAutoMake + \gcmd{Gls\-Xtr\-No\-Gls\-Warning\-Auto\-Make} + { + %\providedby{\sty{glossaries-extra} v1.0+} + \syntax{\margm{glossary-label}} + \desc{advisory message when \opt{automake} has been used} + } + % \GlsXtrNoGlsWarningMisMatch + \gcmd{Gls\-Xtr\-No\-Gls\-Warning\-Mis\-Match} + { + %\providedby{\sty{glossaries-extra} v1.0+} + \desc{advisory message on mis-matching \gls{makenoidxglossaries}} + } + % \GlsXtrNoGlsWarningBuildInfo + \gcmd{Gls\-Xtr\-No\-Gls\-Warning\-Build\-Info} + { + %\providedby{\sty{glossaries-extra} v1.0+} + \desc{build advice} + } + % \GlsXtrRecordWarning + \gcmd{Gls\-Xtr\-Record\-Warning} + { + \providedby{\sty{glossaries-extra} v1.31+} + \syntax{\margm{glossary-type}} + \desc{incorrect use of \gls{printglossary} with non-hybrid \opt{record}} + } + % \GlsXtrNoGlsWarningTail + \gcmd{Gls\-Xtr\-No\-Gls\-Warning\-Tail} + { + %\providedby{\sty{glossaries-extra} v1.0+} + \desc{final paragraph of missing glossary boilerplate text} + } + % \GlsXtrNoGlsWarningNoOut + \gcmd{Gls\-Xtr\-No\-Gls\-Warning\-No\-Out} + { + %\providedby{\sty{glossaries-extra} v1.0+} + \syntax{\margm{file}} + \desc{advisory if no output file was created} + } + % \glspar + \gcmd{gls\-par} + { + \providedby{\sty{glossaries}} + \desc{paragraph break (for instances where \gls{par} can't be used directly)} + } + % \glsbackslash + \gcmd{gls\-back\-slash} + { + \providedby{\sty{glossaries} v4.11+} + \desc{expands to a literal backslash} + } + % \glspercentchar + \gcmd{gls\-percent\-char} + { + \providedby{\sty{glossaries} v4.10+} + \desc{expands to a literal percent sign} + } + % \glstildechar + \gcmd{gls\-tilde\-char} + { + \providedby{\sty{glossaries} v4.10+} + \desc{expands to a literal tilde character} + } + % \GlsXtrExpandedFmt + \gcmd{Gls\-Xtr\-Expanded\-Fmt} + { + \providedby{\sty{glossaries-extra} v1.30+} + \syntax{\margm{cs}\margm{content}} + \desc{fully-expands \meta{content} and passes it to \meta{cs}, + which must be a command that takes a single argument} + } + % \GlossariesExtraWarning + \gcmd{Glossaries\-Extra\-Warning} + { + %\providedby{\sty{glossaries-extra} v1.0+} + \syntax{\margm{message}} + \desc{writes a warning in the transcript with the current line + number. The \opt{nowarn} option redefines this command to do nothing} + } + % \GlossariesExtraWarningNoLine + \gcmd{Glossaries\-Extra\-Warning\-No\-Line} + { + %\providedby{\sty{glossaries-extra} v0.5+} + \providedby{\sty{glossaries-extra}} + \syntax{\margm{message}} + \desc{writes a warning in the transcript without a + corresponding line number. The \opt{nowarn} + option redefines this command to do nothing} + } + % \GlsXtrWarnDeprecatedAbbrStyle + \gcmd{Gls\-Xtr\-Warn\-Deprecated\-Abbr\-Style} + { + \providedby{\sty{glossaries-extra} v1.04+} + \syntax{\margm{old-name}\margm{new-name}} + \desc{issues a warning with \gls{GlossariesExtraWarning} + indicating that a deprecated abbreviation style has been used} + } + % \glsxtrNoGlossaryWarning + \gcmd{gls\-xtr\-No\-Glossary\-Warning} + { + %\providedby{\sty{glossaries-extra} v0.3+} + \syntax{\margm{glossary-type}} + \desc{issues a warning with \gls{GlossariesExtraWarning} + indicating that the given glossary is missing} + } + % \GlsXtrUnknownDialectWarning + \gcmd{Gls\-Xtr\-Unknown\-Dialect\-Warning} + { + \providedby{\sty{glossaries-extra} v1.32+} + \syntax{\margm{locale}\margm{root language}} + \desc{issues a warning with \gls{GlossariesExtraWarning} + indicating that a valid dialect label can't be determined for + the given locale and root language} + } + % \glsxtrstarflywarn + \gcmd{gls\-xtr\-star\-fly\-warn} + { + %\providedby{\sty{glossaries-extra} v0.5.4+} + \desc{issues a warning with \gls{GlossariesExtraWarning} + indicating that the experimental starred version of + \gls{GlsXtrEnableOnTheFly} has been used} + } + % \GlsXtrWarning + \gcmd{Gls\-Xtr\-Warning} + { + %\providedby{\sty{glossaries-extra} v0.5.4+} + \syntax{\margm{options}\margm{entry}} + \desc{issues a warning with \gls{GlossariesExtraWarning} + indicating that the given options list has been ignored by the + given entry because it has already been defined} + } + % \glsxtrmglsWarnAllSkipped + \gcmd{gls\-xtr\-mgls\-Warn\-All\-Skipped} + { + \providedby{\sty{glossaries-extra} v1.48+} + \syntax{\margm{message}\margm{insert}\margm{fmt-cs}} + \desc{issues the given warning message with \gls{GlossariesExtraWarning} + and does \code{\meta{fmt-cs}\margm{insert}} (this warning is used if all + elements of a multi-entry set are skipped)} + } + % \mpglsWarning + \gcmd{mpglsWarning} + { + \providedby{\sty{glossaries-extra} v1.48+} + \desc{issues a warning with \gls{GlossariesExtraWarning} + indicating that \sty{glossaries-prefix} is required for + \gls{mpgls} family of commands} + } + % \GlossariesAbbrStyleTooComplexWarning + \gcmd{Glossaries\-Abbr\-Style\-Too\-Complex\-Warning} + { + \providedby{\sty{glossaries-extra} v1.49+} + \desc{issues a warning with \gls{GlossariesExtraWarning} + when a command is used that isn't supported by a complex + abbreviation style} + } + % GENERAL COMMANDS AND ENVIRONMENTS (index only) + \genv{document}{} + \genv{description}{} + \genv{equation}{} + \genv{align}{} + \genv{figure}{} + \genv{table}{} + \genv{tabular}{} + \genv{long\-table}{}% longtable + \genv{super\-tabular}{}% supertabular + \genv{the\-index}{}% theindex + \genv{multi\-cols}{}% multicols + \genv{multi\-cols*}{}% multicols* + \gcmd{item}{\syntax{\oarg{marker}}}% \item + \gcmd{index\-space}{}% \indexspace + \gcmd{hsize}{}% \hsize + \gcmd{index}{}% \index + \gcmd{actual\-char}{}% \actualchar + \gcmd{level\-char}{}% \levelchar + \gcmd{quote\-char}{}% \quotechar + \gcmd{encap\-char}{}% \encapchar + \gcmd{table\-of\-contents}{}% \tableofcontents + \gcmd{char}{}% \char + \gcmd{null}{}% \null + \gcmd{relax}{}% \relax + \gcmd{par\-indent}{}% \parindent + \gcmd{line\-width}{}% \linewidth + \gcmd{tab\-col\-sep}{}% \tabcolsep + \gcmd{@gobble}{}% \@gobble + \gcmd{@first\-of\-one}{}% \@firstofone + \gcmd{@first\-of\-two}{}% \@firstoftwo + \gcmd{@second\-of\-two}{}% \@secondoftwo + \gcmd{par}{}% \par + \gcmd{protect}{}% \protect + \gcmd{string}{}% \string + \gcmd{chapter}{}% \chapter + \gcmd{section}{}% \section + \gcmd{part}{}% \part + \gcmd{expand\-after}{}% \expandafter + \gcmd{expand\-once}{}% \expandonce + \gcmd{un\-skip}{}% \unskip + \gcmd{leave\-v\-mode}{}% \leavevmode + \gcmd{let}{}% \let + \gcmd{hfil}{}% \hfil + \gcmd{caption}{}% \caption + \gcmd{label}{}% \label + \gcmd{ref}{}% \ref + \gcmd{name\-ref}{}% \nameref + \gcmd{Get\-Title\-String\-Disable\-Commands}{}% \GetTitleStringDisableCommands + \gcmd{Get\-Title\-String\-Set\-up}{}% \GetTitleStringSetup + \gcmd{textsc}{}% \textsc + \gcmd{textbf}{}% \textbf + \gcmd{textup}{}% \textup + \gcmd{emph}{}% \emph + \gcmd{underline}{}% \underline + \gcmd{text\-smaller}{}% \textsmaller + \gcmd{text\-larger}{}% \textlarger + \gcmd{page\-ref}{}% \pageref + \gcmd{job\-name}{}% \jobname + \gcmd{input}{}% \input + \gcmd{the\-page}{}% \thepage + \gcmdmeta{the}{counter}{}{}% \the + \gcmdmeta{theH}{counter}{}{}% \theH + \gcmd{foreign\-language}{}% \foreignlanguage + \gpunccmd{amp}{\&}{}% \& + \gpunccmd{dollar}{\$}{}% \$ + \gcmd{new\-command}{}% \newcommand + \gcmd{re\-new\-command}{}% \renewcommand + \gcmd{provide\-command}{}% \providecommand + \gcmd{step\-counter}{}% \stepcounter + \gcmd{ref\-step\-counter}{}% \refstepcounter + \gcmd{@current\-label}{}% \@currentlabel + \gcmd{@current\-label\-name}{}% \@currentlabelname + \gcmd{@current\-Href}{}% \@currentHref + \gcmd{cs\-def}{}% \csdef + \gcmd{cs\-let}{}% \cslet + \gcmd{cs\-let\-cs}{}% \csletcs + \gcmd{let\-cs}{}% \letcs + \gcmd{if\-cs\-undef}{}% \ifcsundef + \gcmd{if\-undef}{}% \ifundef + \gcmd{if\-def\-empty}{}% \ifdefempty + \gcmd{if\-def\-string}{}% \ifdefstring + \gcmd{if\-cs\-string}{}% \ifcsstring + \gcmd{if\-cs\-void}{}% \ifcsvoid + \gcmd{app\-to}{}% \appto + \gcmd{pre\-to}{}% \preto + \gcmd{list\-cs\-add}{}% \listcsadd + \gcmd{list\-cs\-gadd}{}% \listcsgadd + \gcmd{list\-cs\-eadd}{}% \listcseadd + \gcmd{list\-cs\-xadd}{}% \listcsxadd + \gcmd{do\-list\-cs\-loop}{}% \dolistcsloop + \gcmd{for\-list\-cs\-loop}{}% \forlistcsloop + \gcmd{if\-in\-list\-cs}{}% \ifinlistcs + \gcmd{xif\-in\-list\-cs}{}% \xifinlistcs + \gcmd{hyper\-target}{}% \hypertarget + \gcmd{hyper\-link}{}% \hyperlink + \gcmd{hyper\-ref}{}% \hyperref + \gcmd{hl}{}% \hl + \gcmd{so}{}% \so + \gcmd{ul}{}% \ul + \gcmd{mbox}{}% \mbox + \gcmd{fbox}{}% \fbox + \gcmd{text\-super\-script}{}% \textsuperscript + \gcmd{text\-sub\-script}{}% \textsubscript + \gcmd{foot\-note}{}% \footnote + \gcmd{upper\-case}{}% \uppercase + \gcmd{Make\-Upper\-case}{}% \MakeUppercase + \gcmd{Make\-Text\-Upper\-case}{}% \MakeTextUppercase + \gcmd{Make\-Text\-Lower\-case}{}% \MakeTextLowercase + \gcmd{Make\-Lower\-case}{}% \MakeLowercase + \gcmd{main\-matter}{}% \mainmatter + \gcmd{front\-matter}{}% \frontmatter + \gcmd{back\-matter}{}% \backmatter + \gcmd{@start\-toc}{}% \@starttoc + \gcmd{mark\-right}{}% \markright + \gcmd{mark\-both}{}% \markboth + \gcmd{pdf\-book\-mark}{}% \pdfbookmark + \gcmd{tex\-or\-pdf\-string}{}% \texorpdfstring + \gcmd{No\-Case\-Change}{}% \NoCaseChange + \gcmd{pagestyle}{}% \pagestyle + \gcmd{alph}{}% \alph + \gcmd{Alph}{}% \Alph + \gcmd{arabic}{}% \arabic + \gcmd{roman}{}% \roman + \gcmd{Roman}{}% \Roman + \gcmd{@for}{}% \@for + \gcmd{@endfortrue}{}% \@endfortrue + \gcmd{alpha}{}% \alpha + \gcmd{beta}{}% \beta + \gcmd{Delta}{}% \Delta + \gcmd{digamma}{}% \digamma + \gcmd{up\-alpha}{}% \upalpha + \gcmd{up\-beta}{}% \upbeta + \gcmd{If\-Track\-ed\-Language\-File\-Exists}{}% \IfTrackedLanguageFileExists + % GENERAL COUNTERS + \gctr{page}{} + \gctr{section}{} + \gctr{chapter}{} + \gctr{part}{} + \gctr{equation}{} + \gctr{figure}{} + \gctr{table}{} + % TERMS + \gterm{indexingapp}{\name{indexing application}% + \desc{an application (piece of software) separate from + \protect\TeX/\protect\LaTeX\ that collates and sorts information that has an + associated page reference. Generally the information is an index + entry but in this case the information is a \idx{glossary} entry. + There are two main indexing applications that are used with \TeX: + \app+{makeindex} and \app+{xindy}. (There is also a new + application called \app{xindex}, but this isn't supported by + \sty{glossaries} or \sty{glossaries-extra}.) The \sty{glossaries-extra} + package additionally supports \app{bib2gls}. These are all + \idx{cli} applications.}% + }% + \gterm{indexing}{% + \name{indexing (or recording)} + \field{text}{indexing} + \desc{the process of saving the \idx+{entrylocation} and any + associated information that is required in the \idx{glossary}. In + the case of \app{makeindex} and \app{xindy}, the + \idx{entrylocation}, \idxc{locationencap}{encap}, entry item and sort value are written + to a supplementary file associated with the \idx{glossary} that is + subsequently read by \app{makeindex}\slash\app{xindy}. In the + case of \app{bib2gls} and the \qt{noidx} method, the + \idx{entrylocation}, \idxc{locationencap}{encap} and label is written to the + \ext+{aux} file. With \opteqvalref{record}{nameref}, the + current title and hyperlink target are also included. With + \app{bib2gls}, each line of data in the \ext{aux} is referred + to as a \qt{record} and indexing is referred to as + \qt{recording}. The \optval{record}{hybrid} option indexes + twice: a \app{bib2gls} record in the \ext{aux} file and a + \app{makeindex}\slash\app{xindy} line in the corresponding file, See + \sectionref{sec:wrglossary}} + } + \gterm{glossary}% + {% + \common + \name{glossary} + \field{plural}{glossaries} + \desc{technically a glossary is an alphabetical list of words + relating to a particular topic. For the purposes of describing + the \sty{glossaries} and \sty{glossaries-extra} packages, a + glossary is either the list produced by commands like + \gls{printglossary} or \gls{printunsrtglossary} (which may or + may not be ordered alphabetically) or a glossary is a set of + entry labels where the set is identified by the glossary label + or type} + } + \gidx{mini-glossary}{\field{plural}{mini-glossaries}} + \gidx{glossmini}{\name{glossary, mini}\field{see}{idx.mini-glossary}} + \gtermacr{cli}{CLI}{command-line interface}% + {% + \desc{an application that doesn't have a graphical user + interface. That is, an application that doesn't have any windows, + buttons or menus and can be run in + \dickimawhref{latex/novices/html/terminal.html}{a command + prompt or terminal}}% + }% + \gtermacr{gui}{GUI}{graphical user interface}% + {% + \desc{an application that has windows, buttons or menus} + } + \gtermacr{ascii}{ASCII}{American Standard Code for Information Interchange} + {% + \desc{a single-byte character encoding. Related blog article: + \blog{binary-files-text-files-and-file-encodings/}{Binary + Files, Text Files and File Encodings}} + } + \gtermacr{utf8}{UTF\glsxtrrevert{-8}}{Unicode Transformation Format (8-bit)} + {% + \desc{a variable-width encoding that uses 8-bit code units. This + means that some characters are represented by more that one byte. + \XeLaTeX\ and \LuaLaTeX\ treat the multi-byte sequence as a single + token, but the older \LaTeX\ formats have single-byte tokens, which + can cause complications, although these have mostly been addressed with + the newer kernels introduced over the past few years. Related blog article: + \blog{binary-files-text-files-and-file-encodings/}{Binary Files, + Text Files and File Encodings}} + } + \gterm{idx.group}{\name{group (letters, numbers, symbols)} + \field{text}{group}% + \desc{a logical division within a \idx{glossary} that is typically a + by-product of the \idx{indexingapp}['s] sorting algorithm. See also + \gallerypage{logicaldivisions}{Gallery: Logical Glossary Divisions + (type vs group vs parent)}}% + }% + \gterm{hierarchicallevel}{\name{hierarchical level}% + \desc{a number that indicates how many ancestors an entry has. + An entry with no parent has hierarchical level~0. If an entry + has a parent then the hierarchical level for the entry is one + more than the hierarchical level of the parent. Most styles will + format an entry according to its hierarchical level, giving + prominence to level~0 entries, although some may have a maximum + supported limit. The \idx{unsrtfam} allow the + hierarchical level to be locally adjusted by adding an offset + (\printglossopt{leveloffset}) or to have hierarchy ignored + (\printglossopt{flatten})} + } + \gterm{locationlist}{\name{location list}% + \desc{a list of \idxpl+{entrylocation} (also called a number + list). May be suppressed for all \idxpl{glossary} with the package option + \opt{nonumberlist} or for individual \idxpl{glossary} with + \printglossopt{nonumberlist}. With \app{bib2gls}, the list may + also be suppressed with \resourceoptval{save-locations}{false}} + } + \gterm{locationencap}{\name{location encap (format)} + \field{text}{location encap} + \desc{a command used to encapsulate an \idx{entrylocation}. + The control sequence name (without the leading backslash) + is identified by the \glsopt{format} key. The default encap is + \gls{glsnumberformat}} + } + \gterm{locationcounter}{\name{location counter} + \desc{the counter used to obtain the \idx{entrylocation}} + } + \gterm{entrylocation}{\common\name{entry location}% + \desc{the location of the entry in the document (obtained from + the \idx{locationcounter} or from the \glsopt{thevalue} option). This defaults to the page number + on which the entry has been + referenced with any of the \idx{glslike}, \idx{glstextlike} or \gls{glsadd} + commands. An entry may have multiple locations that form a list} + } + \gidx{numberlist}{\name{number list}\field{alias}{locationlist}} + \gterm{ignoredlocation}{\name{ignored location (or record)}% + \field{text}{ignored location} + \desc{a \location\ that uses \encap{glsignore} as the + \idxc{locationencap}{encap}. With \app{bib2gls}, this indicates that the entry + needs to be selected but the \location\ isn't added to the + \idx{locationlist}. With other methods, this will simply create + an invisible \location, which can result in unwanted commas if + the \idx{locationlist} has other items} + } + \gidx{locationignored}{\name{location, ignored\slash invisible}% + \field{see}{ignoredlocation}} + \gterm{ignoredglossary}{\name{ignored glossary}% + \field{plural}{ignored glossaries}% + \desc{a \idx{glossary} that has been defined using a command like + \gls{newignoredglossary}. These \idxpl{glossary} are omitted by + iterative commands, such as \gls{printglossaries} and + \gls{printunsrtglossaries}. An ignored + \idx{glossary} can only be displayed with \gls{printunsrtglossary} + or \gls{printunsrtinnerglossary}} + } + \gidx{glossaryignored}{\name{glossary, ignored}\field{see}{ignoredglossary}} + \gterm{firstuseflag}{\name{first use flag}% + \common + \desc{a conditional that keeps track of whether or not an entry + has been referenced by any of the \idx{glslike} commands (which + can adjust their behaviour according to whether or not this flag is + true). The conditional is true if the entry hasn't been used by + one of these commands + (or if the flag has been reset) and false if it has been used + (or if the flag has been unset). Note that multi-entries have + their own flag that's distinct from the first use flags of the + individual elements} + } + \gterm{firstuse}{\name{first use}% + \common + \desc{the first time an entry is used by a command that unsets + the \idx{firstuseflag} (or the first time since the flag was + reset). For multi-entry sets, see \idx{mfirstuse}} + } + \gterm{firstusetext}{\name{first use text}% + \common + \desc{the \idx{linktext} that is displayed on \idx{firstuse} of + the \idx{glslike} commands} + } + \gterm{subsequentuse}{\name{subsequent use} + \common + \desc{using an entry that unsets the \idx{firstuseflag} when it + has already been unset} + } + \gterm{mfirstuseflag}{\name{multi-entry first use flag}% + \desc{a conditional that keeps track of whether or not a + multi-entry has been used. This is distinct from the + \idxpl{firstuseflag} of the individual elements} + } + \gterm{mfirstuse}{\name{multi-entry first use}% + \field{text}{first use} + \desc{the first time a multi-entry is referenced (or the first time since + the \idx{mfirstuseflag} was reset). This is not necessary the + \idx{firstuse} of any of the individual entries that form the set} + } + \gterm{msubsequentuse}{\name{multi-entry subsequent use}% + \field{text}{subsequent use} + \desc{when a multi-entry that has already been marked as used is referenced. + This is not necessary the \idx{subsequentuse} of any of the individual entries + that form the set} + } + \gterm{glslike}{\common\name{{}\csfmt{gls}-like} + \desc{commands like \gls{gls} and \gls{glsdisp} that change the + \idx{firstuseflag}. These commands index the entry (if indexing + is enabled), create a hyperlink to the entry's \idx{glossary} listing (if enabled) + and unset the \idx{firstuseflag}. These commands end with the + \idx{postlinkhook}} + } + \gterm{glstextlike}{\common\name{{}\csfmt{glstext}-like} + \desc{commands like \gls{glstext} and \gls{glslink} that don't change + the \idx{firstuseflag}. These commands index the entry (if indexing + is enabled) and create a hyperlink to the entry's \idx{glossary} listing (if enabled). These commands end with the \idx{postlinkhook}} + } + \gterm{linktext}{\name{link text}% + \desc{the text produced by \idx{glslike} and \idx{glstextlike} + commands that have the potential to be a hyperlink} + } + \gterm{postlinkhook}{\name{post-link hook} + \desc{a hook (command) that is used after \idx{linktext} to + allow code to be automatically added. The base \sty{glossaries} + package provides a general purpose hook \gls{glspostlinkhook}. The + \sty{glossaries-extra} package modifies this command to provide + additional hooks, including \glspl{catpostlinkhook}} + } + \gterm{catpostlinkhook}{\name{category post-link hook} + \desc{a \idx{postlinkhook} called \gls{glsxtrpostlinkcat} that is + associated with a particular \idx{category}} + } + \gterm{postdeschook}{\name{post-description hook}% + \desc{a hook (\gls{glspostdescription}) included in some \idxpl{glossarystyle} + that is used after the description is displayed. The \sty{glossaries-extra} package modifies + this command to provide additional hooks, including \glspl{catpostdeschook}. + The \sty{glossaries-extra-stylemods} + package modifies the predefined styles provided with + \sty{glossaries} to ensure that they all use + \gls{glspostdescription} to allow the \glspl{catpostdeschook} to be + implemented} + } + \gterm{catpostdeschook}{\name{category post-description hook} + \desc{a \gls{postdeschook} called \gls{glsxtrpostdesccategory} that is + associated with a particular \idx{category}} + } + \gterm{postnamehook}{\name{post-name hook}% + \desc{a hook (command) that is used after the name is + displayed in \idxpl{glossarystyle}. These hooks are implemented by + \gls{glossentryname}, which needs to be present in the + \idx{glossarystyle}. The main hook is \gls{glsxtrpostnamehook}, + which implements auto-indexing (see \sectionref{sec:autoindex}), + performs a general purpose hook \gls{glsextrapostnamehook} + and a \idx{category}-specific hook \gls{glsxtrpostnamecategory}} + } + \gterm{catpostnamehook}{\name{category post-name hook} + \desc{a \gls{postnamehook} called \gls{glsxtrpostnamecategory} that is + associated with a particular \idx{category}} + } + \gterm{standaloneentry}% + {% + \name{standalone entry} + \desc{normally the \idx{linktext} target is created in the + \idx{glossary}, where the entry's name and description (and optionally + other information, such as the symbol) are shown. It may be that + you don't want a list but need to have the name and description + somewhere in the document text. These are standalone entries. + Whilst it is possible to simply use \gls{glsentryname} and + \gls{glsentrydesc}, the \sty{glossaries-extra} package provides + a way inserting the name that includes the hypertarget for the + \idx{linktext} and obeys the \idx{postnamehook}} + } + \gterm{resourceset}% + {% + \name{resource set} + \desc{all the settings (\idxpl{resourceopt}) and entries associated with a particular + instance of \gls{GlsXtrLoadResources} (or \gls{glsxtrresourcefile})} + } + \gterm{resourcefile}% + {% + \name{resource file} + \desc{the \ext+{glstex} file created by \app{bib2gls} and loaded by + \gls{GlsXtrLoadResources} (or \gls{glsxtrresourcefile})} + } + \gterm{field}% + {% + \name{field} + \desc{entry data is stored in fields. These may have a + corresponding key used to set the value, such as \gloskey{name} + or \gloskey{description}, but field values may also be set + using commands like \gls{GlsXtrSetField}, in which case there + doesn't need to be a corresponding key. Some fields are + considered \idxpl{internalfield}. If you are using + \app{bib2gls}, it will only recognise fields in the \ext{bib} + file that have had a key defined in the document or that are + special to \app{bib2gls}} + } + \gterm{internalfield}% + {% + \name{internal field} + \desc{an internal \idx{field} may refer to a key that shouldn't be + used in the \ext{bib} file (\idx{bib2glsinternalfield}), such as + the \gloskey{group} field, or it may refer to the + \idxc{internalfieldlabel}{label} used to internally represent the + \idx{field} (which may or may not match the key used to set the + \idx{field} or may not have an associated key), such as \fieldfmt{useri} which + corresponds to the \gloskey{user1} key, or it may refer to a \idx{field} + that is only ever used internally that should not be explicitly + modified, such as the field used to store the entry's + hierarchical level +} + } + \gterm{bib2glsinternalfield}% + {% + \name{internal field (\appfmt{bib2gls})} + \desc{a \idx{field} that is used or assigned by \app{bib2gls} + that should typically not be used in the \ext+{bib} file} + } + \gterm{internalfieldlabel}% + {% + \name{internal field label} + \desc{the field label that forms part of the internal control + sequence used to store the field value. This may or may not + match the key used to assign the value when defining the entry. + See the \ctanmirrornofn{macros/latex/contrib/glossaries/glossaries-user.html\#tab:fieldmap}{\qt{Key to Field Mappings}} table in the \sty{glossaries} + user manual} + } + \gterm{unsrtfam}% + {% + \name{print \qt{unsrt} glossary commands (and environment)} + \field{text}{\qt{unsrt} family of commands} + \desc{the set of commands used for displaying a \idx{glossary} or + partial \idx{glossary} that have \qt{unsrt} in the name: + \gls{printunsrtglossary}, \gls{printunsrtglossaries} (which + internally uses \gls{printunsrtglossary}), and + \gls{printunsrtinnerglossary}. These all simply + iterate over the list of entries associated with the given + \idx{glossary}, in the order in which they were added to the \idx{glossary} + (hence \qt{unsrt}, which is short for \qt{unsorted}). The way that \app{bib2gls} + works is that it sorts the entries according to the + \idxpl{resourceopt} and adds the entries to the glossary in the + required order. These commands may be used with or without + \app{bib2gls}. If you don't use \app{bib2gls}, you will need + to manually ensure that the entries are added in the desired + order. The \env{printunsrtglossarywrap} environment may also be + included in this category, although it only sets up the start + and end of the \idx{glossary} for use with \gls{printunsrtinnerglossary}} + } + \gterm{whatsit}% + {% + \desc{a command whose execution is delayed or an OS-specific special command. + This includes writing to external files (which is what indexing does)} + } + \gterm{inlinefullform}% + { + \name{inline full form} + \desc{the full form of an abbreviation obtained with + \gls{glsxtrfull} or \gls{glsxtrfullpl} (or case-changing + variants). This may or may not produce the same result as the + full form on \idx{firstuse} of the corresponding \idx{glslike} + command (the \idx{displayfullform}), depending on the abbreviation style} + } + \gterm{displayfullform}% + { + \name{display full form} + \desc{the full form of an abbreviation obtained with + the \idx{firstuse} of \gls{gls} or \gls{glspl} (or case-changing + variants). This may or may not produce the same result as the + \idx{inlinefullform} the corresponding \idx{glsxtrfull} command, + depending on the abbreviation style} + } + \gterm{innerformatting} + { + \name{inner formatting} + \desc{the formatting applied by the \glsopt{innertextformat} + option, which redefines \gls{glsxtrgenentrytextfmt}. The inner + formatting can only be applied if \gls{glsxtrgenentrytextfmt} is + embedded within the entry's display style} + } + % FILE EXTENSIONS + \gext{log}{}% + \gext{aux}{\common}% + \gext{bib}{\common}% + \gext{tex}{\common}% + \gext{toc}{}% + \gext{glstex}{}% + \gext{glsdefs}{}% + \gext{glslabels}{}% + \gext{gls}{}% + \gext{glo}{}% + \gext{glg}{}% + \gext{ist}{}% + \gext{xdy}{}% + \gext{acr}{}% + \gext{gls-abr}{}% + \gext{glo-abr}{}% + \gext{glg-abr}{}% + \gext{ldf}{}% + % GENERAL INDEX + \gpunc{unknowntag}{\name{\code{??} (unknown entry marker)} + \field{text}{\code{??}}} + \gpunc{sym.fullstop}{\name{\code{.} (full stop or period)} + \field{see}{idx.fullstop} + } + \gpunc{sym.nbsp}{\name{\code{\textasciitilde} (non-breaking space)} + \field{see}{idx.nbsp} + } + \gpunc{sym.hash}{\name{\code{\#}}} + \gidx{uppercase}{\field{seealso}{idx.titlecase,idx.sentencecase,idx.allcaps}} + \gidx{lowercase}{} + \gidx{titlecase}{\name{title case}} + \gidx{sentencecase}{\common\name{sentence case}} + \gidx{allcaps}{\common\name{all caps}} + \gidx{casechange}{\name{case change} + \field{seealso}{idx.uppercase,idx.lowercase,idx.titlecase,idx.sentencecase,idx.allcaps}} + \gidx{smallcaps}{\name{small caps}} + \gidx{period}{\name{period (\code{.})}% + \field{text}{period} + \field{alias}{idx.fullstop} + } + \gidx{fullstop}{\name{full stop (\code{.})}% + \field{text}{full stop} + } + \gidx{nbsp}{\name{non-breaking space (\code{\textasciitilde})} + \field{symbol}{\code{\textasciitilde}} + } +} + +\title{\styfmt{glossaries-extra.sty} v1.49: + an extension to the \styfmt{glossaries} package} +\author{Nicola L.C. Talbot\\[10pt] +Dickimaw Books\\ +\href{https://www.dickimaw-books.com/}{\nolinkurl{dickimaw-books.com}}} + +\date{2022-10-14 +} +\begin{document} + \maketitle + +\htmlavailable + +\begin{abstract} +The \sty{glossaries-extra} package is an extension to the +\sty{glossaries} package, providing additional features. +In particular, it provides a completely different abbreviation +mechanism. +You will need at least \sty{glossaries} version 4.19, but it is best +to update both packages at the same time, if new releases are +available for both of them. +\end{abstract} + +\begin{warning} +The \sty{glossaries-extra} package uses a different set +of defaults to the base \sty{glossaries} package. This means that if +you simply replace \sty{glossaries} with \sty{glossaries-extra} in +an existing document, there may be some differences in the PDF, and +you may encounter errors. See \sectionref{sec:defaults} for more details. +\end{warning} + +\begin{information} +This document assumes some familiarity with the \sty{glossaries} package. +If you are new to \sty{glossaries}, you may prefer to start with the +following: +\begin{itemize} +\item +\ctanmirrordocnofn{macros/latex/contrib/glossaries/glossariesbegin}{The +\styfmt{glossaries} package: a guide for beginners} +\texdocref{glossariesbegin} + +\item +\ctanmirrornofn{support/bib2gls/bib2gls-begin.pdf}{\styfmt{glossaries-extra} +and \appfmt{bib2gls}: an +introductory guide} +\texdocref{bib2gls-begin} +\end{itemize} +\end{information} + +\frontmatter +\tableofcontents +\listofexamples + +\mainmatter +\part{User Guide} + +\chapter{Introduction} +\label{sec:intro} + +The \sty+{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 \sty+{glossaries-extra} package is an attempt to provide +a~compromise for this conflict. Version 4.22 of the \sty{glossaries} +package is the last version to incorporate any major new features. +Future versions of \sty{glossaries} will mostly 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. + +\begin{important} +Some of the commands provided by the base \sty+{glossaries} package +are incompatible with \sty+{glossaries-extra}. These are marked with +\glssymbol{sym.banned} in this document. +\end{important} + +The \sty{glossaries-extra} package internally loads the +\sty{glossaries} package. As a general rule, it's better to defer +loading the base \sty{glossaries} package to \sty{glossaries-extra} +rather than loading the two packages separately. + +\section{Package Defaults} +\label{sec:defaults} + +I'm not happy with some of the default settings assumed by the +\sty{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 \sty{glossaries} as it would break backward +compatibility, but since \sty{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 \optval{toc}{true} (add the glossaries to the table of +contents). Use \optval{toc}{false} to switch this back off. + +\item \optval{nopostdot}{true} (suppress the terminating \idx{fullstop} +after the description in the \idx{glossary}). Use +\optval{nopostdot}{false} or just \opt{postdot} to restore the +terminating \idx{fullstop}. Alternatively, if you are interested in +switching to \app{bib2gls}, you can instruct \app{bib2gls} to insert +it with the \resourceopt{post-description-dot} option. + +\item \opt{noredefwarn} (suppress the warnings that occur when +the \env{theglossary} environment and \gls{printglossary} are redefined while +\sty{glossaries} is loading). Note that this won't have any effect if +the \sty{glossaries} package has already been loaded before you load +the \sty{glossaries-extra} package. + +\item If \sty{babel} has been loaded, the \optval{translate}{babel} +option is switched on. To revert to using the \sty{translator} +interface, use \optval{translate}{true}. There is no change to the +default if \sty{babel} hasn't been loaded. + +\item The default style used by \gls{newacronym} is +\abbrstyle{short-nolong}. (That is, the long form is not shown on +\idx{firstuse}.) To revert back to \qt{\meta{long} (\meta{short})} on +\idx{firstuse} do: +\begin{codebox} +\gls{setabbreviationstyle}\oarg{\cat{acronym}}\marg{\abbrstyle{long-short}} +\end{codebox} +In the above example, \abbrstyle{long-short} refers to the + \sty{glossaries-extra} \idx{abbrvstyle} not the \sty{glossaries} acronym style +of the same name. See \sectionref{sec:abbreviations} for further details. + +\end{itemize} + +\section{Example Differences Between \stytext{glossaries} and +\stytext{glossaries-extra}} +\label{sec:examplediffs} + +The examples below illustrate the difference in explicit package +options between \sty{glossaries} and \sty{glossaries-extra}. There +may be other differences resulting from modifications to commands +provided by \sty{glossaries}. + +\subsection{Basic defaults} +\label{sec:examplediffsbasic} + +\begin{codebox} +\cmd{documentclass}\marg{article} +\cmd{usepackage}\marg{glossaries-extra} +\end{codebox} +This is like: +\begin{codebox*} +\cmd{documentclass}\marg{article} +\cmd{usepackage}[\opt{toc},\opt{nopostdot}]\marg{glossaries} +\cmd{usepackage}\marg{glossaries-extra} +\end{codebox*} + +\subsection{Language defaults} +\label{sec:examplediffslang} + +\begin{codebox*} +\cmd{documentclass}[british]\marg{article} +\cmd{usepackage}\marg{\sty{babel}} +\cmd{usepackage}\marg{glossaries-extra} +\end{codebox*} +This is like: +\begin{codebox*} +\cmd{documentclass}[british]\marg{article} +\cmd{usepackage}\marg{\sty{babel}} +\cmd{usepackage}[\opt{toc},\opt{nopostdot},\optval{translate}{babel}]\marg{glossaries} +\cmd{usepackage}\marg{glossaries-extra} +\end{codebox*} + +\subsection{Combined with \clstext{memoir}} +\label{sec:examplediffsmemoir} + +\begin{codebox} +\cmd{documentclass}\marg{\cls{memoir}} +\cmd{usepackage}\marg{glossaries-extra} +\end{codebox} +This is like: +\begin{codebox} +\cmd{documentclass}\marg{\cls{memoir}} +\cmd{usepackage}[\opt{toc},\opt{nopostdot},\opt{noredefwarn}]\marg{glossaries} +\cmd{usepackage}\marg{glossaries-extra} +\end{codebox} +\emph{However} +\begin{codebox} +\cmd{documentclass}\marg{\cls{memoir}} +\cmd{usepackage}\marg{glossaries} +\cmd{usepackage}\marg{glossaries-extra} +\end{codebox} +This is like: +\begin{codebox} +\cmd{documentclass}\marg{\cls{memoir}} +\cmd{usepackage}[\optval{toc}{false},\optval{nopostdot}{false}]\marg{glossaries} +\cmd{usepackage}\marg{glossaries-extra} +\end{codebox} +Since by the time \sty{glossaries-extra} has been loaded, +the base \sty{glossaries} package has already redefined \cls{memoir}['s] +\idx{glossary}-related commands. + +\subsection{Abbreviations} +\label{sec:examplediffsabbrv} + +Abbreviations are defined with \gls{newabbreviation}: +\begin{codebox} +\cmd{usepackage}\marg{glossaries-extra} +\gls{newabbreviation}\marg{svm}\marg{SVM}\marg{support vector machine} +\cbeg{document} +First use: \gls{gls}\marg{svm}. Explicit full form: \gls{glsxtrfull}\marg{svm}. +\cend{document} +\end{codebox} +This is the closest match to: +\begin{codebox} +\cmd{usepackage}\marg{glossaries} +\gls{newacronym}\marg{svm}\marg{SVM}\marg{support vector machine} +\cbeg{document} +First use: \gls{gls}\marg{svm}. Explicit full form: \gls{acrfull}\marg{svm}. +\cend{document} +\end{codebox} +If you want to continue using \gls{newacronym} then you will need to +change the style for the \cat{acronym} \idx{category}: +\begin{codebox} +\cmd{usepackage}\marg{glossaries-extra} +\gls{setabbreviationstyle}\oarg{\cat{acronym}}\marg{\abbrstyle{long-short}} +\gls{newacronym}\marg{svm}\marg{SVM}\marg{support vector machine} +\cbeg{document} +First use: \gls{gls}\marg{svm}. Explicit full form: \gls{glsxtrfull}\marg{svm}. +\cend{document} +\end{codebox} + +\begin{important} +Don't use commands like \gls{glsfirst} or \gls{glstext} with +abbreviations. See \sectionref{sec:abbreviations} for further +details. +\end{important} + +\subsection{Glossary Mid-Build Placeholder (\glsfmttext{printglossary})} +\label{sec:examplediffprintgloss} + +Another noticeable change with \sty{glossaries-extra} is that by +default \gls{printglossary} will now display information text in the +document if the external \idx{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 \app+{makeindex}\slash\app+{xindy} on just the +non-empty \idx{glossary} (or \idxpl{glossary}) and use the iterative +\gls{printglossaries} command instead of \gls{printglossary}. For +example, consider the following: +\begin{codebox} +\cmd{documentclass}\marg{article} +\cmd{usepackage}[\opt{acronym}]\marg{glossaries} +\gls{makeglossaries} +\gls{newacronym}\marg{laser}\marg{laser}\marg{light amplification by stimulated +emission of radiation} +\cbeg{document} +\gls{gls}\marg{laser} +\gls{printglossaries} +\cend{document} +\end{codebox} +The above document will only display the list of +acronyms at the place where \gls{printglossaries} occurs. However it +will also attempt to input the \ext{gls} file associated with +the \code{main} \idx{glossary}. + +If you use \app{makeglossaries}, you'll get the warning message: +\begin{transcript} +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{transcript} +(where the original file is called \filefmt{test.tex}) +but if you simply call \app{makeindex} directly to generate the +\ext+{acr} file (without attempting to create the \ext{gls} +file) then the transcript file will always contain the message: +\begin{transcript} +No file test.gls. +\end{transcript} +This doesn't occur with \app{makeglossaries} as it will create +the \ext{gls} file containing the single command \gls{null}. + +If you simply change from \sty{glossaries} to +\sty{glossaries-extra} in this document, you'll find a change in the +resulting PDF if you don't use \app{makeglossaries} and you only +generate the \ext{acr} file with \app{makeindex}. + +The transcript file will still contain the message +about the missing \ext{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 \opt{nomain} package option: +\begin{codebox} +\cmd{documentclass}\marg{article} +\cmd{usepackage}[\opt{nomain},\opt{acronym},\opt{postdot}]\marg{glossaries-extra} +\gls{makeglossaries} +\gls{setabbreviationstyle}\oarg{\cat{acronym}}\marg{\abbrstyle{long-short}} +\gls{newacronym}\marg{laser}\marg{laser}\marg{light amplification by stimulated +emission of radiation} +\cbeg{document} +\gls{gls}\marg{laser} +\gls{printglossaries} +\cend{document} +\end{codebox} +\begin{information} +Note the need to set the acronym style using +\gls{setabbreviationstyle} before \gls{newacronym}. +See \sectionref{sec:abbreviations} for further details. +\end{information} + +\section{Further Reading} +\label{sec:reading} + +The following documents and web pages are also available: +\begin{itemize} +\item +\ctanmirrornofn{macros/latex/contrib/glossaries-extra/glossaries-extra-code.pdf}% +{The \styfmt{glossaries-extra} documented code} +\texdocref{glossaries-extra-code} + +\item \gallery{Gallery: \styfmt{glossaries}, +\styfmt{glossaries-extra} and \appfmt{bib2gls}}. + +\item \dickimawhref{faq.php}{FAQs: \styfmt{glossaries}, +\styfmt{glossaries-extra} and \appfmt{bib2gls}}. + +\item \dickimawhref{latex/buildglossaries/}{Incorporating +\appfmt{makeglossaries} or \appfmt{makeglossaries-lite} or +\appfmt{bib2gls} into the document build}. + +\item \ctanref{pkg/bib2gls}{The \appfmt{bib2gls} application}. + +\item \ctanref{pkg/glossaries}{The \styfmt{glossaries} package}. + +\end{itemize} + +\chapter{Package Options} +\label{sec:pkgopts} + +\pkgdef{glossaries-extra} +% +This chapter describes the package options provided by \sty{glossaries-extra} +that are either not defined by the base \sty{glossaries} package or are modified by +\sty{glossaries-extra}. You can additionally pass the base package +options to \sty{glossaries-extra}. For example, instead of: +\begin{codebox} +\cmd{usepackage}\oarg{\opt{nonumberlist}}\marg{glossaries} +\cmd{usepackage}\oarg{\opt{abbreviations}}\marg{glossaries-extra} +\end{codebox} +you can simply do: +\begin{codebox} +\cmd{usepackage}\oarg{\opt{abbreviations},\opt{nonumberlist}}\marg{glossaries-extra} +\end{codebox} + +\begin{information} +It's better not to load the \sty{glossaries} package first. +Leave \sty{glossaries-extra} to load it, where possible, to allow for +a smoother integration between the two packages. +\end{information} + +After \sty{glossaries-extra} has been loaded, some of the \sty{glossaries-extra} +package options may be changed with: +\cmddef{glossariesextrasetup} +where \meta{options} are the same as the relevant package option. + +\begin{important} +Certain options can only be supplied as package options since the +settings need to be known while \sty{glossaries-extra} is loading. +\end{important} + +To change the base \sty{glossaries} package's options (that may be +changed after the package has loaded), continue to use: +\cmddef{setupglossaries} +but don't use any of the options listed here in that command. + +\section{Glossary Lists} +\label{sec:gloslistopts} + +% PACKAGE OPTION: nomissingglstext +\optiondef{nomissingglstext} +If true, this will suppress the warning written to the transcript +and 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. + +% PACKAGE OPTION: abbreviations +\optiondef{abbreviations} +This option has no value and can't be cancelled. If used, +it will automatically create a new glossary with the label +\code{abbreviations} and redefines \gls{glsxtrabbrvtype} to this +label. (The file extensions are \ext+{glg-abr}, +\ext+{gls-abr} and \ext+{glo-abr}.) +In addition, this option defines a shortcut command: +\cmddef*{printabbreviations} +which is equivalent to: +\begin{codebox} +\gls{printglossary}\oarg{\printglossoptval{type}{\gls{glsxtrabbrvtype}},\meta{options}} +\end{codebox} +If \sty{glossaries-extra-bib2gls} is also loaded then this option +will additionally provide \gls{printunsrtabbreviations} +which uses \gls{printunsrtglossary} instead. + +The title of the new glossary is given by +\cmddef*{abbreviationsname} +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 \gls{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{information} +If you don't use the \opt{abbreviations} package option, +the \gls{abbreviationsname} command won't be defined (unless it's +defined by an included language file). +\end{information} + +If the \opt{abbreviations} option is used and the +\opt{acronym} option provided by the \sty{glossaries} +package hasn't been used, then \gls{acronymtype} +will be set to \gls{glsxtrabbrvtype} so that acronyms defined with +\gls{newacronym} can be added to the list of abbreviations. If you +want acronyms in the \code{main} glossary and other abbreviations in the +\code{abbreviations} glossary then you will need to redefine +\gls{acronymtype} to \code{main}: +\begin{codebox} +\cmd{renewcommand}*\marg{\gls{acronymtype}}\marg{main} +\end{codebox} + +Note that there are no analogous options to the \sty{glossaries} +package's \opt{acronymlists} option (or associated commands) +as the abbreviation mechanism is handled differently with +\sty{glossaries-extra}. + +% PACKAGE OPTION: symbols +\optiondef{symbols} +This is passed to the base \sty{glossaries} package, but +\sty{glossaries-extra} will additionally define: +\cmddef*{glsxtrnewsymbol} +which is equivalent to: +\begin{codebox} +\gls{newglossaryentry}\margm{entry-label}\marg{\gloskeyval{name}{\meta{symbol}}, + \gloskeyval{sort}{\meta{entry-label}},\gloskeyval{type}{symbols},\gloskeyval{category}{symbol}, +\meta{options}} +\end{codebox} +Note that the \gloskey{sort} key is set to the \meta{entry-label} +not the \meta{symbol} as the symbol will likely contain commands. +If this isn't appropriate, you can override it by using the \gloskey{sort} key +in the optional argument. + +This option also sets the \catattr{regular} attribute to \code{true} +for the \cat{symbol} category and provides the +\idx{catpostdeschook}: +\cmddef*{glsxtrpostdescsymbol} + +If \sty{glossaries-extra-bib2gls} is also loaded then this option +will additionally provide \gls{printunsrtsymbols} +which uses \gls{printunsrtglossary}. + +% PACKAGE OPTION: numbers +\optiondef{numbers} +This is passed to the base \sty{glossaries} package but +\sty{glossaries-extra} will additionally define: +\cmddef*{glsxtrnewnumber} +which is equivalent to: +\begin{codebox} +\gls{newglossaryentry}\margm{entry-label}\marg{\gloskeyval{name}{\meta{number}}, + \gloskeyval{sort}{\meta{entry-label}},\gloskeyval{type}{numbers},\gloskeyval{category}{number}, +\meta{options}} +\end{codebox} +Note that the \gloskey{sort} key is set to the \meta{entry-label}. +If this isn't appropriate, you can override it by using the \gloskey{sort} key +in the optional argument. + +This option also sets the \catattr{regular} attribute to \code{true} +for the \cat{number} category and provides the +\idx{catpostdeschook}: +\cmddef*{glsxtrpostdescnumber} + +If \sty{glossaries-extra-bib2gls} is also loaded then this option +will additionally provide \gls{printunsrtnumbers} +which uses \gls{printunsrtglossary}. + +% PACKAGE OPTION: acronyms +\optiondef{acronyms} +This is passed to the base \sty{glossaries} package (which defines +\gls{printacronyms} and creates a new glossary with the label \code{acronym}) but +if \sty{glossaries-extra-bib2gls} is loaded then this option will +additionally provide \gls{printunsrtacronyms} +which uses \gls{printunsrtglossary}. + +As with the base \sty{glossaries} package, this option redefines +\gls{acronymtype} to \code{acronym}. Note that this option doesn't +change \gls{glsxtrabbrvtype}. + +% PACKAGE OPTION: acronym +\optiondef{acronym} +If \optval{acronym}{true}, this behaves like \opt{acronyms}. +Note that \optval{acronym}{false} won't work if the base +\sty{glossaries} package was loaded before \sty{glossaries-extra}. + +% PACKAGE OPTION: index +\optiondef{index} +This is passed to the base \sty{glossaries} package but +if \sty{glossaries-extra-bib2gls} is loaded then this option will +additionally provide \gls{printunsrtindex} +which uses \gls{printunsrtglossary}. + +The base package \opt{index} option also defines: +\cmddef*{newterm} +This definition is modified by \sty{glossaries-extra} to +additionally set the \gloskey{category} to \cat{index} and sets the +\gloskey{description} to discard the \idx{postdeschook} +(\gls{nopostdesc}) but retain \gls{glsxtrpostdescription} so that +the \idx{catpostdeschook} can still be applied. + +This option also sets the \catattr{regular} attribute to \code{true} +for the \cat{index} category and defines an associated +\idx{catpostdeschook}: +\cmddef*{glsxtrpostdescindex} + +\section{Glossary Style Options} +\label{sec:glosstyleopts} + +% PACKAGE OPTION: nopostdot +\optiondef{nopostdot} +This option is provided by \sty{glossaries} where it simply alters a +corresponding conditional that's used inside +\gls{glspostdescription} to determine whether or not to insert a +\idx{fullstop}. + +The \opt{postpunc} option (see below) redefines \gls{glspostdescription}, so the +\opt{nopostdot} option is modified by \sty{glossaries-extra} to +reset the hook back to its original definition to +counteract any use of the \opt{postpunc} option. + +\begin{important} +This option will have no effect if the \idx{glossarystyle} doesn't +include \gls{glspostdescription}. (Use \opt{stylemods} to ensure that all the +predefined styles that show the description have this hook added.) +\end{important} + +If you are using \app{bib2gls}, you may prefer to use the +\resourceopt{post-description-dot} resource option. + +% PACKAGE OPTION: postdot +\optiondef{postdot} +This is a shortcut for \optval{nopostdot}{false}. + +% PACKAGE OPTION: postpunc +\optiondef{postpunc} +This option redefines \gls{glspostdescription} to display the +required punctuation. Note that this means the hook will no longer +check for the \opt{nopostdot} conditional. + +\begin{important} +This option will have no effect if the \idx{glossarystyle} doesn't +include \gls{glspostdescription}. (Use \opt{stylemods} to ensure that all the +predefined styles that show the description have this hook added.) +\end{important} + +The \opt{postpunc} value may either be the required punctuation or +one of the following keywords: + +\optionvaldef{postpunc}{dot} +This redefines \gls{glspostdescription} to use a \idx{fullstop} but +also adjusts the space factor. This isn't exactly the same as +\optval{nopostdot}{false} since it removes the conditional from +\gls{glspostdescription}. +If you are using \app{bib2gls}, you may prefer to use the +\resourceopt{post-description-dot} resource option. + +\optionvaldef{postpunc}{comma} +This redefines \gls{glspostdescription} to a comma. + +\optionvaldef{postpunc}{none} +This redefines \gls{glspostdescription} to do nothing. This isn't +exactly the same as \optval{nopostdot}{true} since it removes the +conditional from \gls{glspostdescription}. + +% PACKAGE OPTION: stylemods +\optiondef{stylemods} +Loads the \sty{glossaries-extra-stylemods} package (see +\sectionref{sec:stylemods}), which patches the styles provided with +the base \sty{glossaries} package so that they all use +\gls{glspostdescription}. Extra hooks are also provided to make them +easier to customize. +The value may be one of the following: + +\optionvaldef{stylemods}{all} +Loads all styles that are provided by both \sty{glossaries} and +\sty{glossaries-extra}. + +\optionvaldef{stylemods}{default} +Patches all the predefined styles that have been loaded, without +loading any extra styles. This will typically be all the styles that +are usually loaded by \sty{glossaries} (for example, \glostyle{list} +and \glostyle{long}). Package options such as \opt{nolist} will +alter which styles are loaded. In the case of \opt{nostyles}, no +styles will be loaded, so none of them will be patched. + +\begin{information} +It's pointless using both \opteqvalref{stylemods}{default} and +\opt{nostyles}. Any \idx{glossarystyle} packages that are subsequently loaded +won't be patched. +\end{information} + +\optionvaldef{stylemods}{list} +For each element \meta{tag} in \meta{list}, the corresponding package +\styfmt{glossary\dhyphen\meta{tag}} will be loaded. You can use +this in combination with \opt{nostyles} to only load the particular +style package or packages that you require (without loading the full +set of defaults). For example, +\begin{codebox} +\cmd{usepackage}[\opt{nostyles},\optval{stylemods}{\marg{bookindex,longextra}}, + \optval{style}{bookindex}]\marg{\sty{glossaries-extra}} +\end{codebox} +This prevents the base \sty{glossaries} package from loading the +default set of styles, but loads \sty{glossaries-extra-stylemods}, +\sty{glossary-bookindex} and \sty{glossary-longextra}, +and then sets the default style to \glostyle{bookindex}. + +\section{Loading Other Packages} +\label{sec:otherpkgopts} + +Some options listed in other sections, such as the \opt{stylemods} +and \opt{record} options, also load supplementary packages. + +% PACKAGE OPTION: prefix +\optiondef{prefix} +Loads the \sty{glossaries-prefix} package (if not already loaded). + +% PACKAGE OPTION: accsupp +\optiondef{accsupp} +Loads the \sty{glossaries-accsupp} package (if not already loaded). +This option can only be used as a package option (not in +\gls{glossariesextrasetup}) as \sty{glossaries-extra} needs to know +whether or not to provide accessibility support while it's loading. + +\begin{important} +The \sty{glossaries-accsupp} package is still experimental and so +accessibility features are liable to change. +\end{important} + +If you want to define styles that can interface with the +accessibility support provided by \sty{glossaries-accsupp} use +the \csfmt{glsaccess\meta{xxx}} type of commands instead of +\csfmt{glsentry\meta{xxx}} (for example, \gls{glsaccesstext} instead of +\gls{glsentrytext}). If \sty{glossaries-accsupp} hasn't been loaded +those commands are equivalent (for example, \gls{glsaccesstext} +just does \gls{glsentrytext}) but if it has been loaded, then the +\csfmt{glsaccess\meta{xxx}} commands will add the accessibility +information. See \sectionref{sec:accsupp} for further details. + +\section{Entry Definitions, References and Indexing} +\label{sec:refindexopts} + +% PACKAGE OPTION: undefaction +\optiondef{undefaction} +This indicates what to do if an undefined \idx{glossary} entry is referenced. + +\begin{important} +Undefined entries can't be picked up by any commands that iterate +over a \idx{glossary} list. This includes \gls{forglsentries} and +\gls{glsaddall}. +\end{important} + +\optionvaldef{undefaction}{error} +Produces an error message for undefined \idx{glossary} entries. + +\optionvaldef{undefaction}{warn} +Only produces a warning message for undefined \idx{glossary} entries. The +place where the entry has been referenced will be marked with +\idx{unknowntag} (as with undefined labels or citations). The +unknown marker is produced with: +\cmddef{glsxtrundeftag} +This defaults to two question marks. + +Note that \gls{ifglsused} will only display \idx{unknowntag} in the document text with +\opteqvalref{undefaction}{warn} if the entry hasn't been defined, as the +underlying boolean variable doesn't exist and so is neither true nor +false. (There will also be a warning in the transcript.) You may +prefer to use \gls{GlsXtrIfUnusedOrUndefined} instead. See +\sectionref{sec:glsunset} for further details. + +If you want to write a custom command that needs to generate a +warning or error for an undefined reference, you can use: +\cmddef{glsxtrundefaction} +This will produce the unknown marker if used within the document +environment. Depending on the \opt{undefaction}, +\gls{glsxtrundefaction} will either create an error with the given +\meta{message} and \meta{additional help} or will create a warning with the given +\meta{message}. + +% PACKAGE OPTION: docdef +\optiondef{docdef} +This setting governs where \gls{newglossaryentry} can be used +(preamble-only or anywhere before the first \idx{glossary} or +anywhere within the document). + +Commands like \gls{newabbreviation} and \gls{glsxtrnewsymbol} that internally use +\gls{newglossaryentry} are also governed by this option. Other +commands, such as \gls{longnewglossaryentry} are always preamble-only. + +With just the base \sty{glossaries} package, \gls{newglossaryentry} is allowed in +the \env{document} environment as long as you haven't used +\gls{makenoidxglossaries}. There are, however, problems that can +occur when entries are defined within the \env{document} environment +(see the \sty{glossaries} documentation for further details). +To encourage preamble-only use, the \sty{glossaries-extra} package +prohibits the use of \gls{newglossaryentry} within the +\env{document} environment by default, but if you really want this +you can use this package option to allow it. + +\begin{information} +Note that in the case of \app{bib2gls}, all entry data is originally +defined in \ext{bib} files. The entry definitions (using commands +like \gls{longnewglossaryentry} and \gls{newabbreviation}) are +written to the \ext{glstex} files that are input in the preamble. +\end{information} + +\optionvaldef{docdef}{false} +Prohibits the use of \gls{newglossaryentry} within the +\env{document} environment. All entries must be defined in the +preamble. + +\optionvaldef{docdef}{true} +Permits the use of \gls{newglossaryentry} in the \env{document} +environment provided \gls{makenoidxglossaries} hasn't been used (as +per the base \sty{glossaries} package). +This will create a temporary \ext+{glsdefs} file that contains the +entry definitions so that they can be available on the next \LaTeX\ +run at the beginning of the document to allow any \idxpl{glossary} +in the front matter to display correctly. + +If all your \idxpl{glossary} occur at the end of the document, consider +using \opteqvalref{docdef}{restricted} instead. + +\optionvaldef{docdef}{restricted} +Permits the use of \gls{newglossaryentry} in the \env{document} +environment provided the entry definitions all occur before the first +\idx{glossary} is displayed. + +This avoids the need for the \ext+{glsdefs} file. You will still need to take +care about any changes made to the category code of characters that are required +by the \meta{key}\dequals\meta{value} mechanism (that is, the comma and +equal sign) and any \app+{makeindex} or \app+{xindy} special character that +occurs in the \gloskey{sort} key or label. If any of those +characters are made active in the document (for example, through +\sty{babel} shortcuts), then it can cause problems with the entry definition. + +This option will allow \gls{newglossaryentry} to be used in the document with +\gls{makenoidxglossaries}, but note that \gls{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 \opteqvalref{undefaction}{warn} 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 +\ext+{aux} and \ext+{gls} files). + +\optionvaldef{docdef}{atom} +This option behaves like \opteqvalref{docdef}{restricted} but creates the +\ext+{glsdefs} file for +\href{https://atom.io/packages/autocomplete-glossaries}{atom's +autocomplete support}. This file isn't input by +\sty{glossaries-extra} and so associated problems with the use of +this file are avoided, but it allows the autocomplete support to +find the labels in the file. + +\begin{important} +A \dickimawhrefnofn{bugtracker.php?key=173}{bug fix} in \sty{glossaries} v4.47 has changed the format of the +\ext+{glsdefs} file slightly. +\end{important} + +As with \opteqvalref{docdef}{restricted}, +entries may be defined in the preamble or anywhere in the document, +but they may only be referenced after they have been defined. +Entries must be defined before the associated glossary is displayed. + +If you need a list of all entry labels for the use of an editor or +helper script you may also want to consider the package options +\opt{writeglslabels} and \opt{writeglslabelnames} provided by the +base \sty{glossaries} package. Note that with these options and +with \opteqvalref{docdef}{atom}, only the entry labels that are visible +to \LaTeX\ can be saved. So if you are using \app{bib2gls} you will +only get the labels of the entries that have already been selected by +\app{bib2gls}. The \ext+{bib} files can be found by parsing the +\ext+{aux} file for \gls{glsxtr@resource} (listed in the \resourceopt{src} +option or \gls{jobname}\filefmt{.bib} if \resourceopt{src} is +missing). + +% PACKAGE OPTION: shortcuts +\optiondef{shortcuts} +Unlike the base \sty{glossaries} package +option of the same name, this option isn't boolean but has multiple +values. + +\begin{information} +Multiple invocations of the \opt{shortcuts} option +\emph{within the same option list} will override each other. +Since these options define commands, the action can't be undone with +a later \gls{glossariesextrasetup}. +\end{information} + +\optionvaldef{shortcuts}{ac} +Set the shortcut commands provided by the base \sty{glossaries} package for +acronyms (such as \gls{ac}) but use the \sty{glossaries-extra} +abbreviation commands, such as \gls{glsxtrshort} and +\gls{glsxtrlong}, instead of the analogous base commands, such as +\gls{acrshort} and \gls{acrlong}. See \sectionref{sec:abbrshortcuts} +for further details. + +\optionvaldef{shortcuts}{abbreviations} +Sets the abbreviation shortcuts (see \sectionref{sec:abbrshortcuts}). +This setting doesn't switch on the acronym shortcuts provided by the +base \sty{glossaries} package. + +\optionvaldef{shortcuts}{abbr} +Synonym for \opteqvalref{shortcuts}{abbreviations}. + +\optionvaldef{shortcuts}{other} +Implements the other (non-abbreviation) shortcut commands: +\cmddef*{newentry} +A synonym for \gls{newglossaryentry}. + +\cmddef*{newsym} +A synonym for \gls{glsxtrnewsymbol} (provided that the \opt{symbols} +package option is also used). + +\cmddef*{newnum} +A synonym for \gls{glsxtrnewnumber} (provided that the \opt{numbers} +package option is also used). + +\optionvaldef{shortcuts}{acother} +Implements \opteqvalref{shortcuts}{ac} and \optval{shortcuts}{other}. + +\optionvaldef{shortcuts}{abother} +Implements \opteqvalref{shortcuts}{abbreviations} and \optval{shortcuts}{other}. + +\optionvaldef{shortcuts}{all} +Implements \opteqvalref{shortcuts}{ac}, \opteqvalref{shortcuts}{abbreviations} +and \optval{shortcuts}{other}. + +\optionvaldef{shortcuts}{acronyms} +Sets the shortcuts provided by the base \sty{glossaries} package for +acronyms (such as \gls{ac}). See the \sty{glossaries} package +documentation for further details. + +Note that the short and long forms (\gls{acs} and \gls{acl}) don't +use \gls{glsxtrshort} and \gls{glsxtrlong} but use the original +\gls{acrshort} and \gls{acrlong}, which aren't compatible with the +\sty{glossaries-extra} abbreviation mechanism. The better option is +to use \opteqvalref{shortcuts}{ac}. + +\begin{information} +Don't use \opteqvalref{shortcuts}{acronyms} unless you have reverted \gls{newacronym} back to the base +\sty{glossaries} package's acronym mechanism. See \sectionref{sec:acrorevert} +for further details. +\end{information} + +\optionvaldef{shortcuts}{acro} +Synonym for \opteqvalref{shortcuts}{acronyms}. + +\optionvaldef{shortcuts}{true} +This setting is provided by the base \sty{glossaries} package. With +\sty{glossaries-extra} it's equivalent to \opteqvalref{shortcuts}{all}. + +\optionvaldef{shortcuts}{false} +This setting is provided by the base \sty{glossaries} package. With +\sty{glossaries-extra} it's equivalent to \opteqvalref{shortcuts}{none}. + +% PACKAGE OPTION: indexcrossrefs +\optiondef{indexcrossrefs} +This is a boolean option that governs whether or not to +automatically index any cross-referenced entries that haven't been +marked as used at the end of the document. These are entries that are identified +in one of the cross-referencing fields (\gloskey{see} and \gloskey{seealso}) of +another used entry as opposed to entries that have the cross-referencing fields set. + +Since entries with the \gloskey{alias} key are intended as synonyms for another +term, the target is expected to be indexed so entries with the \gloskey{alias} +key set aren't affected by this option. + +For example: +\begin{codebox} +\gls{newglossaryentry}\marg{courgette}\marg{\gloskeyval{name}{courgette}, + \gloskeyval{description}{small vegetable marrow}} +\gls{newglossaryentry}\marg{marrow}\marg{\gloskeyval{name}{marrow}, + \gloskeyval{description}{long gourd with green skin}, + \gloskeyval{seealso}{courgette}} +\end{codebox} +Suppose that \qt{marrow} is indexed (so that it appears in the glossary with the +cross-reference to \qt{courgette}) but if courgette isn't indexed anywhere in +the document (using commands like \gls{gls} or \gls{glsadd}) then there will be +a broken cross-reference in the marrow \idx{locationlist} pointing to courgette, +which doesn't appear in the glossary. With \opteqvalref{indexcrossrefs}{true}, +the courgette entry will be indexed at the end of the document using \gls{glsadd} with +\glsoptval{format}{glsxtrunusedformat}, which corresponds to the command +\gls{glsxtrunusedformat}. + +Note that this special format \gls{glsxtrunusedformat} simply does \gls{unskip} +and ignores its argument, which creates a blank location. +If any of the cross-referenced entries have been indexed but haven't been marked +as used (for example, with \gls{glsadd}) then this will cause a spurious comma in the +\idx{locationlist}. This is a limitation of the way that \app+{makeindex} and +\app+{xindy} work as they are general purpose indexing applications which require +locations. If you have entries with cross-references, you may want to consider +switching to \app{bib2gls} instead. + +\begin{information} +Note that \app{bib2gls} can automatically find dependent +entries when it parses the \ext{bib} source file, so +the \opt{record} option automatically implements +\opteqvalref{indexcrossrefs}{false}. +\end{information} + +This function is implemented by code added to the end document hook +that determines whether or not to use the command +\gls{glsxtraddallcrossrefs}. This command iterates over all entries +in all glossaries, which adds to the overall document build time, +especially if you have defined a large number of entries, so this +defaults to \opteqvalref{indexcrossrefs}{false}, but it will be +automatically switched on if you use the \gloskey{see} or +\gloskey{seealso} keys in any entries. See also \sectionref{sec:xr}. + +\optionvaldef{indexcrossrefs}{true} +Enables this setting. + +\optionvaldef{indexcrossrefs}{false} +Disables this setting even if the \gloskey{see} or \gloskey{seealso} +key is present in any entries. + +% PACKAGE OPTION: autoseeindex +\optiondef{autoseeindex} +This is a boolean option that governs whether or not the +\gloskey{see} and \gloskey{seealso} keys should automatically index the +cross-reference when an entry is defined (see \sectionref{sec:xr}). + +With the base +\sty{glossaries} package, the \gloskey{see} key was provided as a +shortcut for \gls{glssee}. For example: +\begin{codebox} +\gls{newglossaryentry}\marg{courgette}\marg{\gloskeyval{name}{courgette}, + \gloskeyval{description}{small vegetable marrow}} +\gls{newglossaryentry}\marg{zucchini}\marg{\gloskeyval{name}{zucchini}, + \gloskeyval{description}{}, + \gloskeyval{see}{courgette}} +\end{codebox} +is equivalent to: +\begin{codebox} +\gls{newglossaryentry}\marg{courgette}\marg{\gloskeyval{name}{courgette}, + \gloskeyval{description}{small vegetable marrow}} +\gls{newglossaryentry}\marg{zucchini}\marg{\gloskeyval{name}{zucchini}, + \gloskeyval{description}{}} +\gls{glssee}\marg{zucchini}\marg{courgette} +\end{codebox} +This was designed for documents where only entries that are actually +used in the document are defined and ensures that the +cross-reference is included in the \idx{glossary}, even though it may not +be referenced anywhere in the document. However, it becomes +problematic if neither entry is required in the document. + +The \sty{glossaries-extra} package modifies the action of the +\gloskey{see} key so that it also saves the value and will only +perform the automated \gls{glssee} if +\opteqvalref{autoseeindex}{true}. Similarly for the \gloskey{seealso} key. + +\begin{information} +Note that the \opt{record} option automatically implements +\opteqvalref{autoseeindex}{false} as the corresponding action can be +implemented with \app{bib2gls}['s] \resourceopt{selection} option. +\end{information} + +\optionvaldef{autoseeindex}{true} +Enables automatic indexing using \gls{glssee} for the \gloskey{see} +key (as per the base \sty{glossaries} package) and \gls{glsxtrindexseealso} +for the \gloskey{seealso} key. + +For example, if an entry is defined as +\begin{codebox} +\gls{newglossaryentry}\marg{foo}\marg{\gloskeyval{name}{foo}, + \gloskeyval{description}{},\gloskeyval{see}{bar,baz}} +\end{codebox} +then, with \opteqvalref{autoseeindex}{true} and the default +\opt{indexcrossrefs} setting, this is equivalent to +\begin{codebox} +\gls{newglossaryentry}\marg{foo}\marg{\gloskeyval{name}{foo},\gloskeyval{description}{}} +\gls{glssee}\marg{foo}\marg{bar,baz} +\gls{glossariesextrasetup}\marg{\opteqvalref{indexcrossrefs}{true}} +\gls{GlsXtrSetField}\marg{foo}\marg{see}\marg{bar,baz} +\end{codebox} + +\optionvaldef{autoseeindex}{false} +The value of the \gloskey{see} and \gloskey{seealso} keys will +be stored in their corresponding fields (and can be accessed using +commands like \gls{glsxtrusesee} and \gls{glsxtruseseealso}) but +the cross-reference won't be automatically \indexed. + +\begin{information} +Note that \opt{indexcrossrefs} isn't automatically implemented +by the presence of the \gloskey{see} key when \opt{autoseeindex} +is false. +\end{information} + +For example, if an entry is defined as +\begin{codebox} +\gls{newglossaryentry}\marg{foo}\marg{\gloskeyval{name}{foo}, + \gloskeyval{description}{},\gloskeyval{see}{bar,baz}} +\end{codebox} +then, with \opteqvalref{autoseeindex}{false} and the default +\opt{indexcrossrefs} setting, this is equivalent to +\begin{codebox} +\gls{newglossaryentry}\marg{foo}\marg{\gloskeyval{name}{foo}, + \gloskeyval{description}{}} +\gls{GlsXtrSetField}\marg{foo}\marg{see}\marg{bar,baz} +\end{codebox} + +It's therefore possible with this option to remove the cross-references from the +location lists and set their position within the \idx{glossarystyle}. + +Another method of preventing the automatic indexing is to +define the entries before the external indexing files have been +opened with \gls{makeglossaries}. Since the appropriate file isn't +open, the information can't be written to it. This will need +the package option \optval{seenoindex}{ignore} to prevent an error occurring. + +% PACKAGE OPTION: record +\optiondef{record} +This setting indicates whether or not \app{bib2gls} is required. + +\begin{information} +This option can only be set in the preamble and can't be used after +\gls{GlsXtrLoadResources} or \gls{glsxtrresourcefile}. +\end{information} + +With the recording setting on (\opteqvalref{record}{only}, +\opteqvalref{record}{nameref} or \opteqvalref{record}{hybrid}), any of the +commands that would typically index the entry (such as \gls{gls}, +\gls{glstext} or \gls{glsadd}) will add a \record\ to +the \ext{aux} file. \app{bib2gls} can then read this information to +find out which entries have been used. (Remember that commands like +\gls{glsentryname} don't index, so any use of these commands won't +add a corresponding \record.) See \sectionref{sec:bib2gls} for further details. + +The hybrid method additionally performs the standard indexing action +that's required for \app+{makeindex} or \app+{xindy} to work, but this +can't be done until \app{bib2gls} has created the \ext{glstex} files +that provide the entry definitions. In general, it's best to avoid +the hybrid method. + +\optionvaldef{record}{off} +Indexing is performed as per the base \sty{glossaries} package using +either \gls{makeglossaries} or \gls{makenoidxglossaries}. +This setting implements \opteqvalref{undefaction}{error}. + +\optionvaldef{record}{only} +\Glsname{indexing} is performed by adding \app{bib2gls} \records\ +in the \ext{aux} file. Neither +\gls{makeglossaries} nor \gls{makenoidxglossaries} is permitted. +Use \gls{GlsXtrLoadResources} (or \gls{glsxtrresourcefile}) +to set up \app{bib2gls} \idxpl{resourceopt}. Glossaries should be +displayed with the \idx{unsrtfam}, such as \gls{printunsrtglossary}. + +This setting implements \opteqvalref{undefaction}{warn}, +\opteqvalref{autoseeindex}{false}, \opteqvalref{indexcrossrefs}{false} +\opteqvalref{sort}{none}, and automatically +loads the supplementary \sty{glossaries-extra-bib2gls} package. +(There should be no need to explicitly load \sty{glossaries-extra-bib2gls}.) + +This option also defines the \gloskey{location} and \gloskey{group} +keys that are set by \app{bib2gls} to provide the \idx{locationlist} +and \idx{group} information required by the \idx{unsrtfam}. + +The document build process is (assuming the file is called +\filefmt{myDoc.tex}): +\begin{terminal} +pdflatex myDoc +bib2gls myDoc +pdflatex myDoc +\end{terminal} +If you want letter \idxpl{group} you will need the \switch{group} +or \switch{g} switch when invoking \app{bib2gls}: +\begin{terminal} +pdflatex myDoc +bib2gls \switch{g} myDoc +pdflatex myDoc +\end{terminal} + +\begin{important} +Note that this setting will prevent the \gloskey{see} from +automatically implementing \gls{glssee}. (\app{bib2gls} deals with the +\gloskey{see} field.) You may explicitly use \gls{glssee} in the +document, but \app{bib2gls} will ignore the cross-reference if the +\gloskey{see} field was already set for that entry. +\end{important} + +\optionvaldef{record}{nameref} +As \opteqvalref{record}{only} but uses nameref \records, which +include the current label information given by \gls{@currentlabel} +and \gls{@currentHref}. This means that the title can be included in +the \idxpl{entrylocation}, if available. This setting also supports +location hypertargets that don't follow a simple +\meta{h-prefix}\meta{\idxc{locationcounter}{the-counter}} format, +which can't be used with other indexing options. + +See \sectionref{sec:recordnameref} for further details of this +option. + +\begin{information} +This option requires \sty{hyperref}, otherwise it will fall back on the usual +location \records. +\end{information} + +Note that \gls{@currentHref} is always globally updated whenever +\gls{refstepcounter} is used, but \gls{@currentlabel} isn't. This can +cause some undesired side-effects with some settings. Remember also +that the \opt{indexcounter} option increments the associated +counter every time an entry is \indexed, which affects this option. +If the \idx{locationcounter} is the default \ctr{page}, only the +\location\ number is shown. + +\optionvaldef{record}{alsoindex} +Deprecated synonym of \opteqvalref{record}{hybrid}. + +\optionvaldef{record}{hybrid} +This is a hybrid setting that uses \app{bib2gls} to fetch entry +information from \ext{bib} files, but uses \app+{makeindex} or +\app+{xindy} to create the \idx{glossary} files (which are input with +\gls{printglossary}). Note that this requires a slower and more +complicated build process (see below). + +This hybrid approach is provided for the rare instances +where an existing \app{xindy} rule or module is too complicated to convert to +a \app{bib2gls} rule but the entries need to be fetched from a +\ext{bib} file. There's no benefit in using this option with \app{makeindex}. + +This setting does not load \sty{glossaries-extra-bib2gls}, as +\app{bib2gls} is only being used to fetch the entry definitions. + +\begin{information} +Since it's redundant to make \app{bib2gls} also sort and collate +locations (in addition to \app{xindy} performing these tasks), use the resource options +\resourceoptval{sort}{none} and +\resourceoptval{save-locations}{false} for a faster build. +Many of the other \idxpl{resourceopt} are likely to be irrelevant. +\end{information} + +This setting must be used with \gls{makeglossaries} but not with +its optional argument. +Each \idx{glossary} should be displayed using \gls{printglossary} (or +\gls{printglossaries} for all of them). + +\begin{important} +This setting should not be used with \gls{makenoidxglossaries}. +\end{important} + +You may need to change the transcript file used by \app{bib2gls} to +avoid a clash with \app{xindy}['s] transcript file. This can be done +with \app{bib2gls}['s] \switch{log-file} or \switch{t} option. + +The document build process is (assuming the file is called +\filefmt{myDoc.tex}): +\begin{terminal} +pdflatex myDoc +bib2gls myDoc +pdflatex myDoc +makeglossaries myDoc +pdflatex myDoc +\end{terminal} +Note that, in this case, it's redundant to call \app{bib2gls} with the +\switch{group} or \switch{g} switch as \app{xindy} +will insert the group heading information into the corresponding +\idx{glossary} file. + +\begin{information} +If you want \app{bib2gls} to form the letter groups +then this hybrid method is inappropriate. +\end{information} + +% PACKAGE OPTION: bibglsaux +\optiondef{bibglsaux} + +Alternatively, this setting can be implemented with: +\cmddef{glsxtrsetbibglsaux} + +This option should only be used once. If used again no new file will +be created. If the \meta{basename} value is empty, \records\ will be +written to the normal \ext{aux} file. + +A document containing many \records\ can result in a large +\ext+{aux} file with information that's only relevant to +\app{bib2gls}. This option will create a new file called +\metafilefmt{}{basename}{.aux} that will be used to store the +\records. The file will be skipped by \LaTeX\ but will be picked up +by \app{bib2gls} v3.0+ when it inputs the main \ext{aux} file. Note that +this creates an extra write register. + +\begin{important} +You should still supply the main \ext{aux} file when you run +\app{bib2gls} as \metafilefmt{}{basename}{.aux} will only contain +the \records\ and not the other information that \app{bib2gls} +requires (such as the \idxpl{resourceopt}). +\end{important} + +% PACKAGE OPTION: equations +\optiondef{equations} +This setting will cause the default \idx{locationcounter} to automatically switch +to \ctr{equation} when inside a numbered equation environment, such +as \env{equation} or \env{align}. The counter can be explicitly +overridden with the \glsopt{counter} \idx{glsopt}. + +% PACKAGE OPTION: floats +\optiondef{floats} +This setting will cause the default \idx{locationcounter} to automatically switch +to the corresponding counter when inside a floating environment, +such as \env{figure} or \env{table}. The counter can be explicitly +overridden with the \glsopt{counter} \idx{glsopt}. + +Remember that within floats it's the \gls{caption} command that actually uses +\gls{refstepcounter}, so indexing before the caption will result in +the wrong reference. The commands for use in captions and sections, +such as \gls{glsfmttext} and \gls{glsfmtshort}, don't index. (See +\sectionref{sec:headtitle}). You may +want to consider using \gls{glsadd} after the caption (not before). For example: +\begin{codebox} +\cbeg{figure}[htbp] + \cmd{centering} + \cmd{includegraphics}\marg{example-image} + \gls{caption}\marg{Sample \gls{glsfmttext}\marg{foobar} figure} + \gls{glsadd}\marg{foobar} +\cend{figure} +\end{codebox} + +% PACKAGE OPTION: indexcounter +\optiondef{indexcounter} +This option defines the \idx{indexing} counter: +\ctrdef*{wrglossary} +which is incremented every time an entry is \indexed. This option +automatically implements \optval{counter}{wrglossary}. This means +that each \location\ will link to the relevant part of the page +where the \idx{indexing} occurred (instead of to the top of the page). +See the \app{bib2gls} documentation for the +\resourceopt{save-index-counter} resource option for more details. + +\begin{warning} +This option is primarily intended for use with +\app{bib2gls} (v1.4+) and \sty{hyperref}. It can be used with +\app{makeindex} or \app{xindy}, but it will interfere with the +\idx{locationlist} collation, so you won't have ranges and you'll have +duplicate page numbers present. +\end{warning} + +This option works by incrementing \ctr{wrglossary} with +\gls{refstepcounter} and adding \gls{label}. This can cause a problem if the +\idx{indexing} occurs in an \env{equation} environment as \sty{amsmath} +forbids multiple occurrences of \gls{label} (resulting in the +\qt{Multiple \gls{label}'s} error). It's best to change the counter +to \ctr{page} or \ctr{equation} when in maths mode with this option. +For example: +\begin{codebox} +\cmd{renewcommand}\marg{\gls{glslinkpresetkeys}}\marg{\comment{} + \cmd{ifmmode} \gls{setupglslink}\marg{\glsoptval{counter}{page}}\cmd{fi}} +\cmd{renewcommand}\marg{\gls{glsaddpresetkeys}}\marg{\comment{} + \cmd{ifmmode} \gls{setupglsadd}\marg{\glsoptval{counter}{page}}\cmd{fi}} +\end{codebox} + +\section{Debugging} +\label{sec:debuggingopts} + +% PACKAGE OPTION: debug +\optiondef{debug} +Enables debugging information for draft documents. +This option is defined by the base \sty{glossaries} package, but is +extended by \sty{glossaries-extra} to provide additional settings. +If no value is provided, \optvalref{debug}{true} is assumed. +The following values are available: + +\optionvaldef{debug}{false} +This setting is provided by the \sty{glossaries} package and is the +default. This switches off all debugging commands. + +\optionvaldef{debug}{true} +This setting is provided by the \sty{glossaries} package and +switches on logging information if an entry is \indexed\ before the +relevant \idx{indexing} files have been opened (only applicable with +\app+{makeindex} and \app+{xindy}). This option is extended by +\sty{glossaries-extra} to also display the label of unknown entries +before the \idx{unknowntag} marker. +\begin{coderesult} +\cmd{documentclass}\marg{article} +\cmd{usepackage}[\opt{debug}] + \marg{glossaries-extra} +\cbeg{document} +\gls{gls}\marg{example} +\cend{document} +\tcblower +\glsshowtargetfonttext{[example]}\glslink{idx.unknowntag}{??} +\end{coderesult} +This uses \gls{glsshowtargetfonttext} for the annotation, which is +provided by \sty{glossaries}. + +\optionvaldef{debug}{showaccsupp} +Provided by \sty{glossaries}, this setting shows accessibility +information (\sty{glossaries-accsupp}). + +\optionvaldef{debug}{all} +Implements all debugging options. + +\optionvaldef{debug}{showwrgloss} +This setting is only available with \sty{glossaries-extra}. +This implements \opteqvalref{debug}{true} and shows +a marker~(\glsxtrwrglossmark) just before the write operation is +performed by indexing commands. With \opteqvalref{record}{hybrid} +there will be two marks: one for the write operation to the +\ext{aux} file and one for the associated \idx{glossary} file used by +\app{makeindex}\slash\app{xindy}. The marker is produced with the +command: +\cmddef*{glsxtrwrglossmark} + +If the \opt{indexcounter} option has been used, this setting will +also mark where the \ctr{wrglossary} counter has been incremented. +The marker is produced with the command: +\cmddef*{glsxtrwrglosscountermark} +This marker is also inserted before the location in the definition +of \gls{glsxtrwrglossarylocfmt}. + +\optionvaldef{debug}{showtargets} +This setting is provided by \sty{glossaries} and displays the +hyperlink target names whenever any \idx{glossary}-related commands +create a hyperlink or hypertarget (for example, \gls{gls}, +\gls{glstarget} or \gls{glshypernumber}). The default is to +use marginal notes in \TeX's \qt{outer} mode and inline annotations +for \qt{inner} or maths modes. This uses \gls{glsshowtargetinner} +for inner and maths annotations and \gls{glsshowtargetouter} for the +outer annotation. + +If there are many targets within a single paragraph this can lead to +\qt{too many floats}, so \sty{glossaries-extra} provides a new +package option \opt{showtargets} that can be used to easily switch +to inline annotations for outer mode (rather than having to redefine +\gls{glsshowtargetouter}). + +% PACKAGE OPTION: showtargets +\optiondef{showtargets} +Automatically implements \opteqvalref{debug}{showtargets} and +adjusts the annotations according to the \meta{value}. The +\sty{glossaries-extra} package provides supplementary commands to +support this option. + +\cmddef*{glsxtrshowtargetouter} +Formats annotations in outer mode. This is initially +\gls{glsshowtargetouter} to match \opteqvalref{debug}{showtargets}. + +\cmddef*{glsxtrshowtargetinner} +Formats annotations in inner mode. This is initially +\gls{glsshowtargetinner} to match \opteqvalref{debug}{showtargets}. + +\cmddef*{glsshowtargetinnersymleft} +Shows the left annotation and marker. This uses the left +symbol marker: +\cmddef*{glsxtrshowtargetsymbolleft} + +\cmddef*{glsshowtargetinnersymright} +Shows the right marker and annotation. This uses the right +symbol marker: +\cmddef*{glsxtrshowtargetsymbolright} + +\optionvaldef{showtargets}{left} +A marker is placed to the left of the link/target and a marginal +note is used in outer mode. + +\optionvaldef{showtargets}{right} +A marker is placed to the right of the link/target and a marginal +note is used in outer mode. + +\optionvaldef{showtargets}{innerleft} +A marker and annotation are placed to the left of the +link/target in all modes. + +\optionvaldef{showtargets}{innerright} +A marker and annotation are placed to the right of the +link/target in all modes. + +\optionvaldef{showtargets}{annoteleft} +Markers are placed on either side of the +link/target with the annotation on the left in all modes. + +\optionvaldef{showtargets}{annoteright} +Markers are placed on either side of the +link/target with the annotation on the right in all modes. + +\chapter{Defining Entries} +\label{sec:newentry} + +The base \sty{glossaries} package provides commands, such as +\gls{newglossaryentry}, to define entries. The +\sty{glossaries-extra} package provides some additional commands, +described in \sectionref{sec:newentrydefs}. For abbreviations, see +\sectionref{sec:abbreviations}. If you use \app{bib2gls}, it will +write command definitions within the \ext{glstex} file. See the +\app{bib2gls} user manual for further information about those +commands. + +The \sty{glossaries} user manual warns against using commands such +as \gls{gls} within \idx{field} values. However, if you really need +this, the \sty{glossaries-extra} package provides \gls{glsxtrp} (see +\sectionref{sec:nested}). Alternatively, you may want to consider +multi (compound) entries instead (see \sectionref{sec:multientries}). + +\section{Command Definitions} +\label{sec:newentrydefs} + +\cmddef{longnewglossaryentry} +This command is provided by the base \sty{glossaries} package to +cater for entries with descriptions that contain paragraph breaks. +(The \meta{key}\dequals\meta{value} interface doesn't support +paragraph breaks in the value.) The base package only provides an +unstarred version of this command, which automatically inserts +\gls{leavevmode}\gls{unskip}\gls{nopostdesc} at the end of the +description. The \sty{glossaries-extra} package replaces this with a +single command: +\cmddef{glsxtrpostlongdescription} +which has the same effect, but can be redefined if required. + +The \sty{glossaries-extra} package provides a starred form: +\cmddef{longnewglossaryentry*} +This doesn't insert the hook at the end of the description. + +\begin{information} +For a general purpose post-description hook, see \sectionref{sec:postdeschooks}. +\end{information} + +Additionally, the \opt{symbols} package option provides +\gls{glsxtrnewsymbol}, and the \opt{numbers} package option provides +\gls{glsxtrnewnumber}. See \sectionref{sec:gloslistopts} for further +details. + +\section{Glossary Entry Keys} +\label{sec:newkeys} +In addition to the \idxpl+{gloskey} provided by the base \sty{glossaries} +package (summarised in \sectionref{sec:gloskeys}) the +\sty{glossaries-extra} package provides: + +% KEY: category + +\optiondef{gloskey.category} +Assigns the \idx{category} label. This should not contain any +special or active characters as it's used to form command names. +See \sectionref{sec:categories} for further details. + +% KEY: seealso + +\optiondef{gloskey.seealso} +This key is analogous to the \gloskey{see} key but the tag is always +given by \gls{seealsoname}. The value \meta{xr-list} should be a +comma-separated list of entry labels. As with the \gloskey{see} key, this key +automatically indexes the cross-reference by default. The cross-reference will +be displayed in the \idx{locationlist} using +\gls{glsxtruseseealsoformat} (see \sectionref{sec:xr}). +Use \opteqvalref{autoseeindex}{false} to prevent the automatic +\idx{indexing}. (With \app{bib2gls}, adjust the \resourceopt{selection} criteria.) + +\begin{important} +With just the base \sty{glossaries} package, the \gloskey{see} key +simply performs this automated indexing. With +\sty{glossaries-extra} the value is also saved. Similarly with the +\gloskey{seealso} key. The value isn't saved with explicit use of +\gls{glsxtrindexseealso} or \gls{glssee}. +\end{important} + +% KEY: alias + +\optiondef{gloskey.alias} +This is similar to the \gloskey{see} key but the value can only +be a single entry label. In addition to automatically \idx{indexing} the +cross-reference, this command will cause the entry with this key to +have hyperlinks go to the aliased entry when referenced with +commands like \gls{gls}. Whenever the entry is \indexed\ with +commands like \gls{gls}, the \idx{indexing} will be performed on the +target entry (the \gloskey{alias} value). See \sectionref{sec:xr} +for further details. + +\begin{important} +Any entry that has a \gloskey{see}, \gloskey{seealso} or +\gloskey{alias} key set will be added to the glossary by default +when using \app{makeindex} or \app{xindy}. If you don't want this +behaviour, use the \optval{autoseeindex}{false} package option and +implement a \idx{postdeschook} to insert the cross-reference. +Alternatively, consider switching to \app{bib2gls}. +\end{important} + +If you use \app{bib2gls} (see \sectionref{sec:bib2gls}) then most of +the \idxpl{gloskey} can be used as analogous fields in the \ext+{bib} +file. For example, instead of writing the following code in your +\ext+{tex} file: +\begin{codebox} +\gls{newglossaryentry}\marg{duck}\marg{\gloskeyval{name}{duck}, + \gloskeyval{description}{a waterbird with webbed feet}} +\gls{newabbreviation}\marg{svm}\marg{SVM}\marg{support vector machine} +\end{codebox} +You would write the following in a \ext+{bib} file: +\begin{codebox} +\atentry{entry}\marg{duck, + \gloskeyval{name}{duck}, + \gloskeyval{description}{a waterbird with webbed feet} +} +\atentry{abbreviation}\marg{svm, + \gloskeyval{short}{SVM}, + \gloskeyval{long}{support vector machine}, +} +\end{codebox} + +There are, however, some keys that are considered +\idxc{bib2glsinternalfield}{internal fields} by \app{bib2gls}, +in that they are defined as keys by +\sty{glossaries-extra} and may be assigned in the \ext+{glstex} +file that's input by \gls{GlsXtrLoadResources}, but +they should not be used in the \ext+{bib} files. + +For example, the \gloskey{sort} key (which is recommended with +\app{xindy} where the \gloskey{name} contains symbols) should not be +used in the \ext{bib} file. Instead, use the +\resourceopt{sort-field} resource option or the system of sort +fallbacks to choose the most appropriate field to obtain the sort +value (see \gallerypage{bib2gls-sorting}{Gallery: Sorting}). The +\gloskey{group} and \gloskey{location} keys are also considered +\idxc{bib2glsinternalfield}{internal fields} and are only applicable +with the \idx{unsrtfam}. + +\begin{information} +The \gloskey{group} and \gloskey{location} keys are defined by the +\opteqvalref{record}{only} and \opteqvalref{record}{nameref} options +and are only applicable with the \idx{unsrtfam}. +\end{information} + +% KEY: group + +\optiondef{gloskey.group} +This key is used by \app{bib2gls} within the \ext{glstex} file to +set the \idx{group} label. This label is typically a by-product of +the sorting method (see \sectionref{sec:glosgroups}). If it is +explicitly set without reference to the order it can result in +fragmented groups, see \gallerypage{logicaldivisions}{Gallery: +Logical Glossary Divisions (type vs group vs parent)}. The group +title can be set with \gls{glsxtrsetgrouptitle}. You will need to +invoke \app{bib2gls} with the \switch{group} (or \switch{g}) switch +to ensure that this key is set, when required. + +\begin{important} +Letter \idxpl{group} are a consequence of sorting, not the other way +around. +\end{important} + +% KEY: location + +\optiondef{gloskey.location} +Used by \app{bib2gls} to store the formatted \idx{locationlist}. +The unformatted \idxc{internalfield}{internal location list} is stored in the +\glosfield{loclist} field, as with \gls{printnoidxglossary}. + +With the \idx{unsrtfam}, if the \gloskey{location} field isn't set, +then it will try the \glosfield{loclist} field instead, using the same +method as \gls{printnoidxglossary} to display the \locations. If you +don't want locations with \app{bib2gls}, either use +\printglossopt{nonumberlist} or use the +\resourceoptval{save-locations}{false} resource option. + +The base \sty{glossaries} package provides \gls{glsaddkey} and +\gls{glsaddstoragekey} to allow custom keys to be defined. The +\sty{glossaries-extra} package additionally provides: + +\cmddef{glsxtrprovidestoragekey} +This is like \gls{glsaddstoragekey} but does nothing if the key has +already been defined. As with \gls{glsaddstoragekey}, the starred +version switches on field expansion for the given key (provided +that it hasn't already been defined). + +\cmddef{glsxtrifkeydefined} +Tests if the given key has been defined as a \idx{gloskey}. + +\section{Plurals} +\label{sec: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 lets the \gloskey{plural} field default +to the value of the \gloskey{text} field with \gls{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 \gls{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 \gls{glspluralsuffix} +appended. + +\item If the \gloskey{longplural} field is missing, then +\gls{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}, \gls{acrpluralsuffix} +is appended to the \gloskey{short} field. + +\end{itemize} + +The \emph{last case is changed} with \sty{glossaries-extra}. +With this extension package, the \gloskey{shortplural} field +defaults to the \gloskey{short} field with \gls{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, +\gls{abbrvpluralsuffix} is redefined, see \sectionref{sec:abbrvfieldslongshortpl} +for further details. + +\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 +\app{bib2gls}.) + +\cmddef*{glsxtraliashook} +This hook is implemented when an entry is defined with the +\gloskey{alias} key set. It does nothing by default. The value of +the \gloskey{alias} field can be obtained with +\code{\gls{glsxtralias}\margm{entry-label}}. + +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{compactcodebox} +\gls{glssee}\margm{entry-1}\margm{entry-2} +\end{compactcodebox} + +\item If the \sty{hyperref} package has been loaded then +\code{\gls{gls}\margm{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 \opteqvalref{record}{off} or +\opteqvalref{record}{hybrid}, the \glsopt{noindex} setting will automatically be triggered +when referencing \meta{entry-1} with commands like \gls{gls} or +\gls{glstext}. This prevents \meta{entry-1} from having a +\idx{locationlist} (aside from the cross-reference added with +\gls{glssee}) unless it's been explicitly indexed with \gls{glsadd} or +if the indexing has been explicitly set using +\glsoptval{noindex}{false}. +See \sectionref{sec:glssee} for adjusting the indexing hook. + +Note that with \opteqvalref{record}{only}, the \idx{locationlist} +for aliased entries is controlled with \app{bib2gls}['s] settings. +\end{itemize} + +The value of the \gloskey{alias} field can be accessed with +\gls{glsxtralias} (see \sectionref{sec:getsee}). + +\section{Setting or Updating Fields} +\label{sec:setfields} + +See \sectionref{sec:getfields} for accessing field values and +\sectionref{sec:fieldconditionals} for testing field values. + +\begin{warning} +Modifications to fields only have an effect from that point onwards +and may be localised to the current scope. If you are using +\opteqvalref{docdef}{true}, any changes to the field values won't be +saved in the \ext+{glsdefs} file. +\end{warning} + +Some of these commands are subtly different from each other. For +example, \gls{glsfielddef} (provided by the base \sty{glossaries} +package), \gls{glsxtrdeffield} and \gls{GlsXtrSetField} all assign a +value to a field, but \gls{glsfielddef} requires that both the entry +and the field exists (so it can't be used to set an unknown \idx{internalfield}), +\gls{GlsXtrSetField} requires that the entry +exists (so it can be used to set an \idx{internalfield} that doesn't have +an associated key provided that the entry has been defined), and +\gls{glsxtrdeffield} doesn't perform any existence checks (which +means that it can be used to assign \idxpl{internalfield} before the entry +is actually defined). + +The commands described in this section don't require the \idx{field} to +have an associated \idx{gloskey}, so you need to be +careful not to misspell the field labels. + +\begin{information} +Assigning or changing fields using the commands described here won't +alter related fields. For example, if you use the \gloskey{text} key +but not the \gloskey{plural} key when you define an entry with +\gls{newglossaryentry}, the \gloskey{plural} key will automatically +be set as well, but if you change the value of the \gloskey{text} +field after the entry has been defined, the \gloskey{plural} field +won't be changed. Particular care is required if the field +contributes in some way to the \idx{indexing} information, as this +information is typically initialised when the entry is first +defined. This includes the \gloskey{sort} and \gloskey{parent} keys, +which should not be changed after the entry has been defined. +\end{information} + +With \app{bib2gls}, entries aren't defined on the first \LaTeX\ run. +This means that commands that test for existence will produce a +warning and (within the \env{document} environment) the \idx{unknowntag} +unknown marker. For example: +\begin{codebox} +\cmd{documentclass}\marg{article} +\cmd{usepackage}[\opt{record}]\marg{glossaries-extra} +\gls{GlsXtrLoadResources}\oarg{\resourceoptval{src}{myentries},\resourceoptval{selection}{all}} +\cbeg{document} +Defining info +\gls{glsxtrdeffield}\marg{sample}\marg{info}\marg{some information}. +Defining note +\gls{GlsXtrSetField}\marg{sample}\marg{note}\marg{some note}. +\codepar +Info: \gls{glsxtrusefield}\marg{sample}\marg{info}. +Note: \gls{glsxtrusefield}\marg{sample}\marg{note}. +\cend{document} +\end{codebox} +On the first \LaTeX\ run, this produces: +\begin{resultbox} +Defining info . Defining note \glslink{idx.unknowntag}{??}. + +Info: some information. Note: . +\end{resultbox} +At this point the \code{sample} entry hasn't been defined, so +referencing it in \gls{GlsXtrSetField} results in a warning and the +double question mark \idx{unknowntag} unknown marker in the text. +The field (\code{note}) isn't saved, +so nothing is shown when the field is referenced with +\gls{glsxtrusefield}. Whereas \gls{glsxtrdeffield} does save the +field with the label \code{info} associated with the label +\code{sample}, even though the \code{sample} entry hasn't actually +been defined. The field can then be later obtained with +\gls{glsxtrusefield}. Once \app{bib2gls} has been run, the +\code{sample} entry should now have its definition in the +\ext{glstex} file, which is loaded by \gls{GlsXtrLoadResources} and +the \code{note} field can be set. + +\cmddef{glsxtrdeffield} +This uses \sty{etoolbox}'s \gls{csdef} command to locally set the \idx{field} +given by its \idxc{internalfieldlabel}{internal label} +\meta{field-label} to \meta{value} for the entry identified by +\meta{entry-label}. No existence check is performed. + +\cmddef{glsxtredeffield} +This is like \gls{glsxtrdeffield} but (protected) fully expands the +value before assigning it to the field. + +\cmddef{glsxtrapptocsvfield} +This command is designed for fields that should contain +comma-separated lists. If the field hasn't been defined, this +behaves like \gls{glsxtrdeffield} otherwise it will append a comma +followed by \meta{element} (unexpanded) to the field value. No +existence check is performed. This field can be iterated over using +\gls{glsxtrforcsvfield} or formatted using \gls{glsxtrfieldformatcsvlist}. +See \sectionref{sec:csvfields} for further details. + +\cmddef{glsxtrfieldlistadd} +Appends the given value to the given entry's field (identified using +the \idxc{internalfieldlabel}{field's internal label}) using +\sty{etoolbox}['s] \gls{listcsadd}. The field value can later be +iterated over using \gls{glsxtrfielddolistloop} or +\gls{glsxtrfieldforlistloop}. + +\cmddef{glsxtrfieldlistgadd} +As above but uses \gls{listcsgadd} to make a global change. + +\cmddef{glsxtrfieldlisteadd} +As above but uses \gls{listcseadd} to expand the value. + +\cmddef{glsxtrfieldlistxadd} +As above but uses \gls{listcsxadd} to make a global change. + +\cmddef{glsxtrsetfieldifexists} +This is used by the commands \gls{GlsXtrSetField}, \gls{gGlsXtrSetField}, +\gls{xGlsXtrSetField}, \gls{eGlsXtrSetField}, +\gls{GlsXtrLetField}, \gls{csGlsXtrLetField} and +\gls{GlsXtrLetFieldToField} to produce an error (or warning with +\opteqvalref{undefaction}{warn}) if the entry doesn't exist. This +can be redefined to add extra checks (for example, to prohibit +changing certain fields). + +\cmddef{GlsXtrSetField} +This uses \sty{etoolbox}'s \gls{csdef} command to locally set the \idx{field} +given by its \idxc{internalfieldlabel}{internal label} +\meta{field-label} to \meta{value} for the entry identified by +\meta{entry-label}. + +This command is written to the \ext{glstex} file by \app{bib2gls} to +set fields that don't have a corresponding key. + +\cmddef{gGlsXtrSetField} +This is like \gls{GlsXtrSetField} but uses a global assignment. + +\cmddef{eGlsXtrSetField} +This is like \gls{GlsXtrSetField} but (protected) fully expands the +value first. + +\cmddef{xGlsXtrSetField} +This is like \gls{eGlsXtrSetField} but uses a global assignment. + + +\cmddef{GlsXtrLetField} +This uses \sty{etoolbox}'s \gls{cslet} command to locally set the \idx{field} +given by its \idxc{internalfieldlabel}{internal label} +\meta{field-label} to \meta{cs} for the entry identified by +\meta{entry-label}. + +\cmddef{csGlsXtrLetField} +This uses \sty{etoolbox}'s \gls{csletcs} command to locally set the +\idx{field} given by its \idxc{internalfieldlabel}{internal label} +\meta{field-label} to the control sequence given by \meta{cs-name} +for the entry identified by \meta{entry-label}. + +\cmddef{GlsXtrLetFieldToField} +This assigns the field identified by its +\idxc{internalfieldlabel}{internal label} \meta{field1-label} for +the entry identified by \meta{entry1-label} to the value of the +\idx{field} identified by \meta{field2-label} for the entry identified by +\meta{entry2-label} + +\chapter{Abbreviations} +\label{sec:abbreviations} + +The acronym mechanism implemented by the base \sty+{glossaries} +package is insufficiently flexible for some documents. The +\sty{glossaries-extra} package provides a completely different +mechanism to deal with abbreviations in a more flexible manner. The +two methods are incompatible. However, the \sty{glossaries-extra} +package provides predefined styles that emulate the appearance +of the styles provided by the base package. If you have previously +used just the base \sty+{glossaries} package, consult +\tableref{tab:acrabbrvstyles} for the closest matching abbreviation +style. + +\section{Defining Abbreviations} +\label{sec:newabbr} + +Abbreviations are defined using: +\cmddef{newabbreviation} +where \meta{entry-label} is the entry's label (used in commands like +\gls{gls}), \meta{short} is the short form (the abbreviation) and +\meta{long} is the long form (what the abbreviation is short for). +The optional argument \meta{options} may be used to set additional +keys (as per the \idxc{gloskey}{options list} in \gls{newglossaryentry}), such as +\gloskey{type} or \gloskey{category}. + +This command internally uses \gls{newglossaryentry} and sets the +\gloskey{type} to \gls{glsxtrabbrvtype} and the +\gloskey{category} to \cat{abbreviation}. The category (see +\sectionref{sec:categories}) determines the abbreviation style. +The style for a particular category is set using +\gls{setabbreviationstyle}. If the optional argument is omitted, the +\cat{abbreviation} category is assumed (see \sectionref{sec:abbrstyle} for +further details). + +The following example document sets up three different abbreviation +styles: \abbrstyle{long-short-sc} for the \cat{abbreviation} +category, \abbrstyle{long-only-short-only} for the custom +\code{genus} category, and \abbrstyle{short-nolong} for the custom +\code{common} category. Note that the custom \code{title} category +doesn't have an associated style. +\begin{codebox} +\gls{setabbreviationstyle}\marg{\abbrstyle{long-short-sc}} +\gls{setabbreviationstyle}\oarg{genus}\marg{\abbrstyle{long-only-short-only}} +\gls{setabbreviationstyle}\oarg{common}\marg{\abbrstyle{short-nolong}} +\gls{newabbreviation}\marg{xml}\marg{xml}\marg{extensible markup language} +\gls{newabbreviation}\oarg{\gloskeyval{category}{genus}}\marg{clostridium}\marg{C.}\marg{Clostridium} +\gls{newabbreviation}\oarg{\gloskeyval{category}{genus}}\marg{myristica}\marg{M.}\marg{Myristica} +\gls{newabbreviation}\oarg{\gloskeyval{category}{common}}\marg{html}\marg{HTML}\marg{hypertext markup language} +\gls{newabbreviation}\oarg{\gloskeyval{category}{title}}\marg{dr}\marg{Dr}\marg{Doctor} +\cbeg{document} +First use: \gls{gls}\marg{xml}, \gls{gls}\marg{clostridium}, \gls{gls}\marg{myristica}, +\gls{gls}\marg{html}, \gls{gls}\marg{dr}. +\codepar +Next use: \gls{gls}\marg{xml}, \gls{gls}\marg{clostridium}, \gls{gls}\marg{myristica}, +\gls{gls}\marg{html}, \gls{gls}\marg{dr}. +\cend{document} +\end{codebox} +\begin{resultbox} +\createexample*[title={Multiple abbreviation styles}, + description={Example document with multiple abbreviation styles}, + label={ex:multiabbrvstyles} +] +{% +\cmd{usepackage}\marg{glossaries-extra}^^J% +\gls{setabbreviationstyle}\marg{long-short-sc}^^J% +\gls{setabbreviationstyle}\oarg{genus}\marg{long-only-short-only}^^J% +\gls{setabbreviationstyle}\oarg{common}\marg{short-nolong}^^J% +\gls{newabbreviation}\marg{xml}\marg{xml}\marg{extensible markup +language}^^J% +\gls{newabbreviation}\oarg{\gloskeyval{category}{genus}}\marg{clostridium}\marg{C.}\marg{Clostridium}^^J% +\gls{newabbreviation}\oarg{\gloskeyval{category}{genus}}\marg{myristica}\marg{M.}\marg{Myristica}^^J% +\gls{newabbreviation}\oarg{\gloskeyval{category}{common}}\marg{html}\marg{HTML}\marg{hypertext +markup language} +\gls{newabbreviation}\oarg{\gloskeyval{category}{title}}\marg{dr}\marg{Dr}\marg{Doctor} +} +{% +First use: \gls{gls}\marg{xml}, \gls{gls}\marg{clostridium}, \gls{gls}\marg{myristica}, +\gls{gls}\marg{html}, \gls{gls}\marg{dr}. +\codepar +Next use: \gls{gls}\marg{xml}, \gls{gls}\marg{clostridium}, \gls{gls}\marg{myristica}, +\gls{gls}\marg{html}, \gls{gls}\marg{dr}. +} +\end{resultbox} + +If the category doesn't have an associated style, the style for the +\cat{abbreviation} category will be used, as with the \code{dr} entry +above, which uses the \abbrstyle{long-short-sc} style because no +style has been associated with its custom \code{title} category. + +There are two categories that have an abbreviation style set by +default: \cat{abbreviation} and \cat{acronym}. These are initialised +as follows: +\begin{codebox} +\gls{setabbreviationstyle}\marg{\abbrstyle{long-short}} +\gls{setabbreviationstyle}\oarg{\cat{acronym}}\marg{\abbrstyle{short}} +\end{codebox} +This means that abbreviations defined with the default +\cat{abbreviation} category will show the long form followed by the +short form in parentheses on \idx{firstuse}, and those defined with the +\gloskey{category} set to \cat{acronym} will only show the short +form (that is, the long form won't be shown on \idx{firstuse}). + +To make it easier to migrate a file containing entries defined with +\gls{newacronym}, the \sty{glossaries-extra} package redefines +\gls{newacronym} to do: +\begin{codebox} +\gls{newabbreviation}\oarg{\gloskey{type}=\gls{acronymtype},\gloskey{category}=\cat{acronym},\meta{options}}\margm{entry-label}\margm{short}\margm{long} +\end{codebox} +Note that this sets the \gloskey{category} to \cat{acronym}, which +means that any abbreviations defined with \gls{newacronym} will use +the \abbrstyle{short} style by default. If you want to use a +different style, you need to set the abbreviation style for the +\cat{acronym} category. For example, to use the +\abbrstyle{long-short} style: +\begin{codebox} +\gls{setabbreviationstyle}\oarg{\cat{acronym}}\marg{\abbrstyle{long-short}} +\end{codebox} +This must be placed before the first instance of \gls{newacronym}. + +\begin{information} +You can't use \gls{setacronymstyle} with \sty{glossaries-extra}. +\end{information} + +If you have defined any acronym styles with +\gls{newacronymstyle}, you will have to migrate them over to +\gls{newabbreviationstyle}. However, most of the predefined +abbreviation styles are flexible enough to adapt to common +abbreviation formats. It is possible to revert \gls{newacronym} back +to using the base \sty{glossaries} package's acronym mechanism +(\sectionref{sec:acrorevert}), but it should generally not be +necessary. + +Terms defined with \gls{newabbreviation} (and \gls{newacronym}) can +be referenced in the main document text using commands like \gls{gls}. +(If you want to use shortcut commands like \gls{ac}, use the +\opteqvalref{shortcuts}{ac} package option.) +Remember that you can use the \glsopt{prereset} and +\glsopt{preunset} options to reset or unset the \idx{firstuseflag} +(see \sectionref{sec:glsunset}). Alternatively, you can use the +commands described in \sectionref{sec:abbrvfieldrefs}. For headings +and captions, see \sectionref{sec:headingcommands}. + +\begin{important} +Avoid using \gls{glsfirst}, \gls{glsfirstplural}, \gls{glstext} and +\gls{glsplural} with abbreviations. Many of the abbreviation styles +are too complex to work with these commands (particularly the +case-changing variants or with the \meta{insert} final optional +argument or with \glsopt{innertextformat}). Instead, use commands +like \gls{gls}, \gls{glsxtrshort}, \gls{glsxtrlong} and \gls{glsxtrfull}. +\end{important} + +\subsection{Abbreviation Fields: \optfmt{long} and \optfmt{short}} +\label{sec:abbrvfieldslongshort} + +The \meta{short} and \meta{long} arguments are internally assigned with the +\gloskey{short} and \gloskey{long} keys (so don't use those keys in +\meta{options}), but the short and long values may first be modified by +category attributes, such as \catattr{markwords} or +\catattr{markshortwords}. As with other entries, avoid nested links +(see \sectionref{sec:nested}). This means avoid using the +\idx{glslike} and \idx{glstextlike} commands within \meta{short} and +\meta{long}. + +\begin{information} +If an abbreviation can be formed by combining other +entries, consider using the multi (compound) entry function +(see \sectionref{sec:multientries}). +\end{information} + +\subsection{Abbreviation Fields: \optfmt{longplural} and \optfmt{shortplural}} +\label{sec:abbrvfieldslongshortpl} + +The \gloskey{longplural} key defaults to +\meta{long}\gls{glspluralsuffix} and the \gloskey{shortplural} key +defaults to \meta{short}\gls{abbrvpluralsuffix}. The +\catattr{aposplural} attribute will instead set the +\gloskey{shortplural} to \code{\meta{short}'\gls{abbrvpluralsuffix}} +and the \catattr{noshortplural} attribute will set +\gloskey{shortplural} to just \meta{short} (see +\sectionref{sec:categories}). If these values are not appropriate, +you will need to explicitly set the \gloskey{longplural} and +\gloskey{shortplural} keys in \meta{options}. + +The short plural suffix \gls{abbrvpluralsuffix} is redefined by the +abbreviation style. Some styles, such as the \abbrstyle{long-short} style, +simply redefine \gls{abbrvpluralsuffix} to just: +\cmddef{glsxtrabbrvpluralsuffix} +which is defined to \gls{glspluralsuffix}. + +Some styles, such as the \abbrstyle{long-short-sc} style, redefine +\gls{abbrvpluralsuffix} to include code to counteract the formatting +of the abbreviation. + +\begin{information} +If you want to change the default short plural suffix, you need to +redefine \gls{glsxtrabbrvpluralsuffix} not \gls{abbrvpluralsuffix}. +If you don't want the suffix added, then set the +\catattr{noshortplural} attribute to \code{true}. +\end{information} + +\subsection{Abbreviation Fields: \optfmt{name} and \optfmt{description}} +\label{sec:abbrvfieldsnamedesc} + +The \gloskey{name} key is set according to the abbreviation style. +There should not be any need to explicitly set it. +Some styles require the \gloskey{description} key to be set in +\meta{options}, but other styles will set the \gloskey{description} +to the long form. + +\subsection{Abbreviation Fields: \optfmt{type}} +\label{sec:abbrvfieldstype} + +Abbreviations can be assigned to a particular \idx{glossary} using +the \gloskey{type} key in \meta{options}. The default for \gls{newabbreviation} is: +\cmddef{glsxtrabbrvtype} +This is initialised to \gls{glsdefaulttype} (the default glossary), +but the \opt{abbreviations} package option will redefine it to +\code{abbreviations}. + +The default \gloskey{type} for \gls{newacronym} is: +\cmddef{acronymtype} +This is initialised to \gls{glsdefaulttype}, +but the \opt{acronyms} package option will redefine it to +\code{acronym}. + +\subsection{General Hooks} +\label{sec:abbrvgeneralhooks} + +The following are general purpose hooks used within +\gls{newabbreviation}. Note that there are additional hooks that are +used by the abbreviation styles (see \sectionref{sec:abbrstyleinit}). + +\cmddef{glsxtrnewabbrevpresetkeyhook} +This hook is provided for further customisation, if required. +It's implemented before the entry is defined (before the +\gloskey{shortplural} and \gloskey{longplural} keys supplied in +\meta{options} are parsed). +Does nothing by default. The arguments are a legacy throwback to old +versions that didn't have \gls{glsxtrorgshort}. + +\cmddef{newabbreviationhook} +This hook is performed just before the entry is defined. +Does nothing by default. + +\section{Examples: \appfmt{makeindex} vs +\appfmt{bib2gls}} +\label{sec:abbrvmakeindexvsbib2gls} + +Example document using \app{makeindex}: +\begin{codebox} +\cmd{documentclass}\marg{article} +\cmd{usepackage}\marg{glossaries-extra} +\gls{makeglossaries} +\gls{newglossaryentry}\marg{sample}\marg{\gloskeyval{name}{sample},\gloskeyval{description}{an example}} +\gls{newabbreviation}\marg{xml}\marg{XML}\marg{extensible markup language} +\gls{newacronym}\marg{nasa}\marg{NASA}\marg{National Aeronautics and Space Administration} +\cbeg{document} +First use: \gls{gls}\marg{sample}, \gls{gls}\marg{xml} and \gls{gls}\marg{nasa}. +Next use: \gls{gls}\marg{sample}, \gls{gls}\marg{xml} and \gls{gls}\marg{nasa}. +\gls{printglossaries} +\cend{document} +\end{codebox} +\begin{resultbox} +\createexample*[arara={pdflatex,makeglossaries,pdflatex,pdfcrop}, + label{ex:newabbVSnewacVSnewentry}, + title={\cmd{newabbreviation} vs \cmd{newacronym} vs \cmd{newglossaryentry}}, + description={Example document illustrating the difference between + \cmd{newabbreviation}, \cmd{newacronym} and \cmd{newglossaryentry}}] +{% +\cmd{usepackage}\marg{glossaries-extra}^^J% +\gls{makeglossaries}^^J% +\gls{newglossaryentry}\marg{sample}\marg{\gloskeyval{name}{sample},\gloskeyval{description}{an +example}}^^J% +\gls{newabbreviation}\marg{xml}\marg{XML}\marg{extensible markup +language}^^J% +\gls{newacronym}\marg{nasa}\marg{NASA}\marg{National Aeronautics and +Space Administration}% +} +{% +First use: \gls{gls}\marg{sample}, \gls{gls}\marg{xml} and \gls{gls}\marg{nasa}. +Next use: \gls{gls}\marg{sample}, \gls{gls}\marg{xml} and +\gls{gls}\marg{nasa}.^^J% +\gls{printglossaries} +} +\end{resultbox} +Note that the long form of NASA isn't displayed on the +\idx{firstuse} of \code{\gls{gls}\marg{nasa}}. This is because the +\cat{acronym} category uses the \abbrstyle{short} style by default. + +In the above example, all entries are placed in the main (default) +glossary. The package options \opt{abbreviations} and \opt{acronyms} +can be used to split them off into separate glossaries. + +If you use \app{bib2gls}, the analogous \ext!{bib} entry types are +\atentry{abbreviation} and \atentry{acronym}. The above example can +be rewritten to use \app{bib2gls}: +\begin{codebox} +\cmd{documentclass}\marg{article} +\cbeg{filecontents*}\marg{\gls{jobname}.bib} +\atentry{entry}\marg{sample, + \gloskeyval{name}{sample}, + \gloskeyval{description}{an example} +} +\atentry{abbreviation}\marg{xml, + \gloskeyval{short}{XML}, + \gloskeyval{long}{extensible markup language} +} +\atentry{acronym}\marg{nasa, + \gloskeyval{short}{NASA}, + \gloskeyval{long}{National Aeronautics and Space Administration} +} +\cend{filecontents*} +\cmd{usepackage}\oarg{\opt{record}}\marg{glossaries-extra} +\gls{GlsXtrLoadResources} +\cbeg{document} +First use: \gls{gls}\marg{sample}, \gls{gls}\marg{xml} and \gls{gls}\marg{nasa}. +Next use: \gls{gls}\marg{sample}, \gls{gls}\marg{xml} and \gls{gls}\marg{nasa}. +\gls{printunsrtglossaries} +\cend{document} +\end{codebox} +\begin{resultbox} +\createexample*[arara={pdflatex,bib2gls,pdflatex,pdfcrop}, + label{ex:atabbVSatacVSatentry}, + title={\code{@abbreviation} vs \code{@acronym} vs \code{@entry}}, + description={Example document illustrating the difference between + \code{@abbreviation}, \code{@acronym} and \code{@entry}}] +{% +\cbeg{filecontents*}\marg{\gls{jobname}.bib}^^J% +@entry{sample,^^J% + name={sample},^^J% + description={an example}^^J% +}^^J% +@abbreviation{xml,^^J% + short={XML},^^J% + long={extensible markup language}^^J% +}^^J% +@acronym{nasa,^^J% + short={NASA},^^J% + long={National Aeronautics and Space Administration}^^J% +}^^J% +\cend{filecontents*}^^J% +\cmd{usepackage}\oarg{record}\marg{glossaries-extra}^^J% +\gls{GlsXtrLoadResources} +} +{% +First use: \gls{gls}\marg{sample}, \gls{gls}\marg{xml} and \gls{gls}\marg{nasa}.^^J% +Next use: \gls{gls}\marg{sample}, \gls{gls}\marg{xml} and \gls{gls}\marg{nasa}.^^J% +\gls{printunsrtglossaries} +} +\end{resultbox} + +\section{Referencing (Using) Abbreviations} +\label{sec:abbrvfieldrefs} + +Since \gls{newabbreviation} internally uses \gls{newglossaryentry}, +you can reference abbreviations with the \gls{glslike} commands as with other entries. +Remember that you can use the \glsopt{prereset} and +\glsopt{preunset} options to reset or unset the \idx{firstuseflag} +(see \sectionref{sec:glsunset}). + +In general it's best not to use \gls{glsfirst}, +\gls{glsfirstplural}, \gls{glstext}, \gls{glsplural} or their +case-changing variants as many of the abbreviation styles are too +complicated for those commands. If you specifically want the full +form, use \gls{gls} with \glsopt{prereset} or use \gls{glsxtrfull}. +If you specifically want the short form for a particular instance, use \gls{gls} with +\glsopt{preunset} or use \gls{glsxtrshort}. If you only want the +long form for a particular instance, use \gls{glsxtrlong}. + +If you never want the short form with \gls{gls}, use one of the \qt{noshort} +styles, such as \abbrstyle{long-noshort}. If you never want the long +form with \gls{gls}, use one of the \qt{nolong} styles, such as +\abbrstyle{short-nolong}. + +\begin{information} +If you need to use abbreviations in headings or captions, use +commands like \gls{glsfmtshort} and \gls{glsfmtlong} (see +\sectionref{sec:headingcommands}). Commands like \gls{glsentryname} +are likely to contain non-expandable content. +\end{information} + +Example: +\begin{codebox} +\cmd{usepackage}\oarg{colorlinks}\marg{hyperref} +\cmd{usepackage}\marg{glossaries-extra} +\gls{makeglossaries} +\gls{newabbreviation}\marg{svm}\marg{SVM}\marg{support vector machine} +\gls{newabbreviation}\marg{html}\marg{HTML}\marg{hypertext markup language} +\codepar +\cbeg{document} +\gls{tableofcontents} +\cmd{section}\marg{Introducing the \gls{glsfmtlong}\marg{svm}} +First use: \gls{gls}\marg{svm}. +Next use: \gls{gls}\marg{svm}. +\codepar +\cmd{section}\marg{Introducing \gls{gls}\marg{html} (incorrect)} +First use (not!): \gls{gls}\marg{html}. +Next use: \gls{gls}\marg{html}. +\codepar +\gls{glsreset}\marg{html} +\cmd{section}\marg{Introducing \gls{glsxtrshort}\marg{html} (incorrect)} +First use: \gls{gls}\marg{html}. +Next use: \gls{gls}\marg{html}. +\codepar +\gls{glsreset}\marg{html} +\cmd{section}\marg{Introducing \gls{glsfmtshort}\marg{html}} +First use: \gls{gls}\marg{html}. +Next use: \gls{gls}\marg{html}. +\codepar +\gls{printglossaries} +\cend{document} +\end{codebox} +\begin{resultbox} +\createexample*[arara={pdflatex,makeglossaries,pdflatex,pdfcrop}, + label={ex:abbrhyper}, + title={Referencing an abbreviation (with \styfmt{hyperref})}, + description={Example document illustrating referencing an + abbreviation (with hyperref)}] +{% +\cmd{usepackage}\oarg{colorlinks}\marg{hyperref}^^J% +\cmd{usepackage}\marg{glossaries-extra}^^J% +\gls{makeglossaries}^^J% +\gls{newabbreviation}\marg{svm}\marg{SVM}\marg{support vector machine}^^J% +\gls{newabbreviation}\marg{html}\marg{HTML}\marg{hypertext markup +language}^^J% +} +{% +\gls{tableofcontents}^^J% +\cmd{section}\marg{Introducing the \gls{glsfmtlong}\marg{svm}}^^J% +First use: \gls{gls}\marg{svm}.^^J% +Next use: \gls{gls}\marg{svm}. +\codepar +\cmd{section}\marg{Introducing \gls{gls}\marg{html} (incorrect)}^^J% +First use (not!): \gls{gls}\marg{html}.^^J% +Next use: \gls{gls}\marg{html}. +\codepar +\gls{glsreset}\marg{html}^^J% +\cmd{section}\marg{Introducing \gls{glsxtrshort}\marg{html} (incorrect)}^^J% +First use: \gls{gls}\marg{html}.^^J% +Next use: \gls{gls}\marg{html}.^^J% +\codepar +\gls{glsreset}\marg{html}^^J% +\cmd{section}\marg{Introducing \gls{glsfmtshort}\marg{html}}^^J% +First use: \gls{gls}\marg{html}.^^J% +Next use: \gls{gls}\marg{html}.^^J% +\gls{printglossaries} +} +\end{resultbox} +In the above example, compare the first section heading (which +references an abbreviation with \gls{glsfmtlong}) with the second +section heading (which references an abbreviation with \gls{gls}). +Note that the \idx{firstuse} of the \code{html} entry actually +occurs in the table of contents, which results in the full form +showing in the table of contents, but only the abbreviation is +shown in the actual section~2 heading. The PDF bookmark shows the entry label +(\code{html}) not the abbreviation (HTML). +There is also a nested link for section~2 in the table of contents. +In some PDF viewers (such as Okular), this will lead to section~2 +but, in others (such as Evince), it will lead to the HTML entry +target in the glossary. Similarly for section~3. + +As with the base \sty{glossaries} package, the unformatted short and long forms +can be obtained with \gls{glsentryshort} and \gls{glsentrylong} or, +for the plural forms, \gls{glsentryshortpl} and +\gls{glsentrylongpl}. These are analogous to commands like +\gls{glsentrytext} and may be used in expandable contexts. The +sentence case versions (\gls{Glsentryshort}, +\gls{Glsentrylong}, \gls{Glsentryshort}, and \gls{Glsentrylong}) are all robust +in \sty{glossaries} v4.49 and lower. As from \sty{glossaries} v4.50, +they can expand in PDF bookmarks, but outside of PDF bookmarks they +will expand to a robust internal command. + +\begin{important} +Don't use the base \sty{glossaries} package's acronym commands, such +as \gls{acrshort}. These aren't compatible with \gls{newabbreviation}. +\end{important} + +Each abbreviation style has a \idx{displayfullform}, which is the +format produced with the \idx{firstuse} of \gls{gls}, and an +\idx{inlinefullform}, which is the format produced by +\gls{glsxtrfull}. For some styles, such as \abbrstyle{long-short}, +the \idxc{displayfullform}{display} and \idxc{inlinefullform}{inline} forms are identical. + +The example below demonstrates the difference between the +\idx{firstuse} of \gls{gls} compared with the \idx{inlinefullform} for +the \abbrstyle{footnote} abbreviation style. The +example also uses \gls{glsfirst} to demonstrate that it produces an +undesirable result with the selected abbreviation style. +\begin{coderesult} +\gls{setabbreviationstyle}\marg{footnote} +\gls{newabbreviation}\marg{nasa}\marg{NASA}\marg{National Aeronautics and Space +Administration} +\codepar +\cbeg{document} +\gls{gls}\marg{nasa}\oarg{'s} space +exploration\cmd{ldots} +\codepar +\gls{glsxtrfull}\marg{nasa}\oarg{'s} space +exploration\cmd{ldots} +\codepar +\gls{glsfirst}\marg{nasa}\oarg{'s} space +exploration\cmd{ldots} +\cend{document} +\tcblower +\createexample*[fontsize={20}, + label={ex:glsVSfullVSfirst}, + title={First use of \cmd{gls} vs \cmd{glsxtrfull} vs \cmd{glsfirst}}, + description={Example document illustrating the difference between + the first use of \cmd{gls} compared with \cmd{glsxtrfull} and + \cmd{glsfirst}}] +{% +\cmd{usepackage}\marg{glossaries-extra}^^J% +\gls{setabbreviationstyle}\marg{footnote}^^J% +\gls{newabbreviation}\marg{nasa}\marg{NASA}\marg{National Aeronautics and Space Administration}^^J% +} +{% +\gls{gls}\marg{nasa}\oarg{'s} space exploration\cmd{ldots}^^J% +\codepar +\gls{glsxtrfull}\marg{nasa}\oarg{'s} space exploration\cmd{ldots}^^J% +\codepar +\gls{glsfirst}\marg{nasa}\oarg{'s} space exploration\cmd{ldots}^^J% +} +\end{coderesult} +In the above, the \idx{firstuse} of \gls{gls} puts the long form in +the footnote but correctly inserts the final optional argument +before the footnote marker. The \idx{inlinefullform} (obtained with +\gls{glsxtrfull}) doesn't use a footnote, but instead shows the long +form in parentheses after the short form. The insert material is +correctly placed after the short form. +Compare this with the final line, which uses \gls{glsfirst}. This +shows the long form in the footnote, but the inserted material can't +be shifted before the footnote marker, which results in the strange +\qt{NASA\textsuperscript{2}'s}. + +The following commands are included in the set of +\idx{glstextlike} commands. They have the \idxc{glsopt}{same +options} as \gls{glstext} and don't change the \idx{firstuseflag}. +They will index (unless \glsopt{noindex} is used), create a +hyperlink (if enabled), and use the \idx{postlinkhook}. + +\cmddef{glsxtrshort} +Displays the short form using the abbreviation style's formatting. + +\cmddef{Glsxtrshort} +As above, but \idx{sentencecase} version. + +\cmddef{GLSxtrshort} +As above, but \idx{allcaps} version. + +\cmddef{glsxtrshortpl} +Displays the short plural form using the abbreviation style's formatting. + +\cmddef{Glsxtrshortpl} +As above, but \idx{sentencecase} version. + +\cmddef{GLSxtrshortpl} +As above, but \idx{allcaps} version. + +\cmddef{glsxtrlong} +Displays the long form using the abbreviation style's formatting. +As from v1.49, this command simulates \idx{firstuse} by defining +\gls{glsxtrifwasfirstuse} to do its first argument. This is done via +the command: +\cmddef{glsxtrsetlongfirstuse} +which is defined as: +\begin{compactcodebox} +\cmd{newcommand}\marg{\gls{glsxtrsetlongfirstuse}}[1]\marg{\comment{} + \cmd{let}\gls{glsxtrifwasfirstuse}\gls+{@firstoftwo}\comment{} +} +\end{compactcodebox} +This command takes the entry label as the argument, which is +ignored by default. + +To restore the original behaviour, redefine this command as follows: +\begin{codebox} +\cmd{renewcommand}\marg{\gls{glsxtrsetlongfirstuse}}[1]\marg{\comment{} + \cmd{letcs}\gls{glsxtrifwasfirstuse}\marg{@secondoftwo}\comment{} +} +\end{codebox} +This command is also used by the case-changing and plural variants +listed below. + +\cmddef{Glsxtrlong} +As above, but \idx{sentencecase} version. + +\cmddef{GLSxtrlong} +As above, but \idx{allcaps} version. + +\cmddef{glsxtrlongpl} +Displays the long plural form using the abbreviation style's formatting. + +\cmddef{Glsxtrlongpl} +As above, but \idx{sentencecase} version. + +\cmddef{GLSxtrlongpl} +As above, but \idx{allcaps} version. + +\cmddef{glsxtrfull} +Displays the \idx{inlinefullform} using the abbreviation style's formatting. +Depending on the style, this may not be the same as the text +produced with the \idx{firstuse} of \gls{gls}. + +\cmddef{Glsxtrfull} +As above, but \idx{sentencecase} version. + +\cmddef{GLSxtrfull} +As above, but \idx{allcaps} version. + +\cmddef{glsxtrfullpl} +Displays the \idxc{inlinefullform}{inline full plural form} using the abbreviation style's formatting. +Depending on the style, this may not be the same as the text +produced with the \idx{firstuse} of \gls{glspl}. + +\cmddef{Glsxtrfullpl} +As above, but \idx{sentencecase} version. + +\cmddef{GLSxtrfullpl} +As above, but \idx{allcaps} version. + +\cmddef{glsxtrsetupfulldefs} +This hook is used within \gls{glsxtrfull}, \gls{glsxtrfullpl} and +the case-changing variations to initialise +\gls{glsxtrifwasfirstuse} in case it's required in the +\idx{postlinkhook}. The default definition is to simulate +\idx{firstuse}. Note that changing this can cause unexpected results +with abbreviation styles that set the \idx{postlinkhook}, such as +\abbrstyle{short-postlong-user}. + +\cmddef{glsxtrfullsaveinsert} +This hook is used within \gls{glsxtrfull}, \gls{glsxtrfullpl} and +the case-changing variations to initialise the \gls{glsinsert} +placeholder. The default definition is to use +\gls{glsxtrsaveinsert}. If the insert isn't saved, it can't be used +within the \idx{postlinkhook} for the \gls{glsxtrfull} etc. +This affects the behaviour of the \qt{post-hyphen} abbreviation +styles, such as \abbrstyle{long-hyphen-postshort-hyphen}. + +\subsection{Prefixes} +\label{sec:abbrprefixes} + +If you are using the \sty{glossaries-prefix} package (which can +be loaded via the \opt{prefix} package option), then there are +commands similar to \gls{glsxtrshort} and \gls{glsxtrlong} that +insert the corresponding prefix and separator at the front if the +short or long form, if the prefix has been set and is non-empty. In all cases, the +separator is \gls{glsprefixsep}, as with \gls{pgls}. + +\begin{important} +These commands require \sty{glossaries-prefix}. +\end{important} + +\cmddef{pglsxtrshort} +As \gls{glsxtrshort} but inserts the \gloskey{prefix} field +and separator, if the \gloskey{prefix} value is set and non-empty. + +\cmddef{Pglsxtrshort} +As \gls{pglsxtrshort} but \idx{sentencecase}. Note the initial +\qt{P} in the command name, which matches \gls{Pgls} (similarly for +the other prefix \idx{sentencecase} commands). + +\cmddef{PGLSxtrshort} +As \gls{pglsxtrshort} but \idx{allcaps}. + +\cmddef{pglsxtrshortpl} +As \gls{glsxtrshortpl} but inserts the \gloskey{prefixplural} field +and separator, if the \gloskey{prefixplural} value is set and non-empty. + +\cmddef{Pglsxtrshortpl} +As \gls{pglsxtrshortpl} but \idx{sentencecase}. + +\cmddef{PGLSxtrshortpl} +As \gls{pglsxtrshortpl} but \idx{allcaps}. + +\cmddef{pglsxtrlong} +As \gls{glsxtrlong} but inserts the \gloskey{prefixfirst} field +and separator, if the \gloskey{prefixfirst} value is set and non-empty. + +\cmddef{Pglsxtrlong} +As \gls{pglsxtrlong} but \idx{sentencecase}. + +\cmddef{PGLSxtrlong} +As \gls{pglsxtrlong} but \idx{allcaps}. + +\cmddef{pglsxtrlongpl} +As \gls{glsxtrlongpl} but inserts the \gloskey{prefixfirstplural} field +and separator, if the \gloskey{prefixfirstplural} value is set and non-empty. + +\cmddef{Pglsxtrlongpl} +As \gls{pglsxtrlongpl} but \idx{sentencecase}. + +\cmddef{PGLSxtrlongpl} +As \gls{pglsxtrlongpl} but \idx{allcaps}. + +\subsection{Abbreviation Shortcut Commands} +\label{sec:abbrshortcuts} + +The abbreviation shortcut commands can be enabled using +the \opteqvalref{shortcuts}{abbreviations} package option (or +\opteqvalref{shortcuts}{abbr} or \opteqvalref{shortcuts}{ac}). +The provided shortcut commands listed in +\tableref{tab:abbrshortcuts}. Note that +\gls{glsxtrenablerecordcount} will switch the shortcuts that use the +\gls{cgls}-like commands to the corresponding \gls{rgls}-like +command. + +\begin{table}[htbp] +\caption{Abbreviation Shortcut Commands} +\label{tab:abbrshortcuts} +\centering +\begin{tabular}{lll} +\bfseries Shortcut & +\bfseries Shortcut & +\bfseries Equivalent Command\\ +\bfseries (\opteqvalref{shortcuts}{abbreviations}) & +\bfseries (\opteqvalref{shortcuts}{ac})\\ +\inlineglsdef{ab} & \inlineglsdef{ac} & \gls{cgls}\\ +\inlineglsdef{abp} & \inlineglsdef{acp} & \gls{cglspl}\\ +\inlineglsdef{as} & \inlineglsdef{acs} & \gls{glsxtrshort}\\ +\inlineglsdef{asp} & \inlineglsdef{acsp} & \gls{glsxtrshortpl}\\ +\inlineglsdef{al} & \inlineglsdef{acl} & \gls{glsxtrlong}\\ +\inlineglsdef{alp} & \inlineglsdef{aclp} & \gls{glsxtrlongpl}\\ +\inlineglsdef{af} & \inlineglsdef{acf} & \gls{glsxtrfull}\\ +\inlineglsdef{afp} & \inlineglsdef{acfp} & \gls{glsxtrfullpl}\\ +\inlineglsdef{Ab} & \inlineglsdef{Ac} & \gls{cgls}\\ +\inlineglsdef{Abp} & \inlineglsdef{Acp} & \gls{cglspl}\\ +\inlineglsdef{As} & \inlineglsdef{Acs} & \gls{Glsxtrshort}\\ +\inlineglsdef{Asp} & \inlineglsdef{Acsp} & \gls{Glsxtrshortpl}\\ +\inlineglsdef{Al} & \inlineglsdef{Acl} & \gls{Glsxtrlong}\\ +\inlineglsdef{Alp} & \inlineglsdef{Aclp} & \gls{Glsxtrlongpl}\\ +\inlineglsdef{Af} & \inlineglsdef{Acf} & \gls{Glsxtrfull}\\ +\inlineglsdef{Afp} & \inlineglsdef{Acfp} & \gls{Glsxtrfullpl}\\ +\inlineglsdef{AB} & \inlineglsdef{AC} & \gls{cGLS}\\ +\inlineglsdef{ABP} & \inlineglsdef{ACP} & \gls{cGLSpl}\\ +\inlineglsdef{AS} & \inlineglsdef{ACS} & \gls{GLSxtrshort}\\ +\inlineglsdef{ASP} & \inlineglsdef{ACSP} & \gls{GLSxtrshortpl}\\ +\inlineglsdef{AL} & \inlineglsdef{ACL} & \gls{GLSxtrlong}\\ +\inlineglsdef{ALP} & \inlineglsdef{ACLP} & \gls{GLSxtrlongpl}\\ +\inlineglsdef{AF} & \inlineglsdef{ACF} & \gls{GLSxtrfull}\\ +\inlineglsdef{AFP} & \inlineglsdef{ACFP} & \gls{GLSxtrfullpl}\\ +\inlineglsdef{newabbr} & \gls{newabbr} & \gls{newabbreviation} +\end{tabular} +\end{table} + +\section{Tagging Initials} +\label{sec:tagging} + +Initial tagging allows you to highlight the initials that form the +abbreviation when the long form is shown in the glossary. + +\cmddef{GlsXtrEnableInitialTagging} + +\begin{information} +\gls{GlsXtrEnableInitialTagging} must be placed before the abbreviations are defined. +\end{information} + +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 \meta{cs} +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: +\cmddef{glsxtrtagfont} +This command defaults to \code{\gls{underline}\margm{text}} +but may be redefined as required. + +The control sequence \meta{cs} can't already be defined when +used with the unstarred version of +\gls{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. + +The first argument of \gls{GlsXtrEnableInitialTagging} is a +comma-separated list of category names. The \catattr{tagging} +attribute will automatically be set to \code{true} 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. + +For example, the following uses initial tagging for both the \cat{acronym} and +\cat{abbreviation} categories. The custom command \csfmt{itag} is +defined as the tagging command. +\begin{codebox} +\gls{makeglossaries} +\gls{GlsXtrEnableInitialTagging}\marg{\cat{acronym},\cat{abbreviation}}\marg{\cmd{itag}} +\gls{setabbreviationstyle}\oarg{\cat{acronym}}\marg{\abbrstyle{short-nolong-desc}} +\gls{newacronym} + \oarg{description=\marg{a system for detecting the location and + speed of ships, aircraft, etc, through the use of radio + waves}\comment{description of this term} + } + \marg{radar}\comment{identifying label} + \marg{radar}\comment{short form} + \marg{\cmd{itag}\marg{ra}dio \cmd{itag}\marg{d}etection \cmd{itag}\marg{a}nd \cmd{itag}\marg{r}anging} +\codepar +\gls{newabbreviation}\marg{xml}\marg{XML} + \marg{e\cmd{itag}\marg{x}tensible \cmd{itag}\marg{m}arkup \cmd{itag}\marg{l}anguage} +\codepar +\gls{newabbreviation}\oarg{\gloskeyval{category}{other}}\marg{tne}\marg{TNE} + \marg{\cmd{itag}\marg{t}agging \cmd{itag}\marg{n}ot \cmd{itag}\marg{e}nabled} +\codepar +\cbeg{document} +First use: \gls{gls}\marg{radar}, \gls{gls}\marg{xml}, \gls{gls}\marg{tne}. +\codepar +Long form only: \gls{glsxtrlong}\marg{radar}, \gls{glsxtrlong}\marg{xml}, \gls{glsxtrlong}\marg{tne}. +\gls{printglossaries} +\cend{document} +\end{codebox} +\begin{resultbox} +\createexample*[arara={pdflatex,makeglossaries,pdflatex,pdfcrop}, + label={ex:tagging}, + title={Tagging abbreviation initials}, + description={Example document illustrating the use of +\cmd{GlsXtrEnableInitialTagging} to tag initial letters that form +the abbreviation}] +{% +\cmd{usepackage}\marg{glossaries-extra}^^J% +\gls{makeglossaries}^^J% +\gls{GlsXtrEnableInitialTagging}\marg{acronym,abbreviation}\marg{\cmd{itag}}^^J% +\gls{setabbreviationstyle}\oarg{acronym}\marg{short-nolong-desc}^^J% +\gls{newacronym}^^J% + \oarg{description=\marg{a system for detecting the location and + speed of ships, aircraft, etc, through the use of radio + waves}\comment{description of this term} + }^^J + \marg{radar}\comment{identifying label} + \marg{radar}\comment{short form} + \marg{\cmd{itag}\marg{ra}dio \cmd{itag}\marg{d}etection +\cmd{itag}\marg{a}nd \cmd{itag}\marg{r}anging} +\codepar +\gls{newabbreviation}\marg{xml}\marg{XML}^^J + \marg{e\cmd{itag}\marg{x}tensible \cmd{itag}\marg{m}arkup \cmd{itag}\marg{l}anguage} +\codepar +\gls{newabbreviation}\oarg{\gloskeyval{category}{other}}\marg{tne}\marg{TNE}^^J + \marg{\cmd{itag}\marg{t}agging \cmd{itag}\marg{n}ot \cmd{itag}\marg{e}nabled} +} +{% +First use: \gls{gls}\marg{radar}, \gls{gls}\marg{xml}, \gls{gls}\marg{tne}. +\codepar +Long form only: \gls{glsxtrlong}\marg{radar}, \gls{glsxtrlong}\marg{xml}, \gls{glsxtrlong}\marg{tne}.^^J% +\gls{printglossaries} +} +\end{resultbox} +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 style for a particular category is set using: +\cmddef{setabbreviationstyle} +If the \meta{category} is omitted, \cat{abbreviation} is assumed. +Remember that \gls{newacronym} sets the \gloskey{category} to +\cat{acronym} so with \gls{newacronym} you need to change the style with: +\begin{codebox} +\gls{setabbreviationstyle}\oarg{\cat{acronym}}\margm{style-name} +\end{codebox} + +\begin{important} +The abbreviation style must be set before the abbreviation with the +corresponding category is defined. If you are using \app{bib2gls}, +the style must be set before \gls{GlsXtrLoadResources}. +\end{important} + +The style associated with the \cat{abbreviation} category will be +used if an abbreviation is defined with a category that doesn't have +an associated style. + +Once you have defined an abbreviation with a given category, you +can't subsequently change the style for that category. You can't +have more than one style per category. The default style for the +\cat{abbreviation} category is \abbrstyle{long-short} and the +default style for the \cat{acronym} category is +\abbrstyle{short-nolong}. + +In the example below, the custom \code{latin} category doesn't have +an associated abbreviation style, so it uses the style assigned to +the \cat{abbreviation} category, not the \cat{acronym} category. +The only reason that the \qt{radar} abbreviation (defined with +\gls{newacronym}) uses the style associated with the \cat{acronym} +category is because the default definition of \gls{newacronym} sets +\gloskeyval{category}{\cat{acronym}}. +\begin{coderesult} +\cmd{usepackage}[T1]\marg{fontenc} +\cmd{usepackage}\marg{glossaries-extra} +\gls{setabbreviationstyle}\marg{long-short-sc} +\gls{newabbreviation}\marg{html}\marg{html}\marg{hypertext markup language} +\gls{setabbreviationstyle}\oarg{\cat{acronym}}\marg{footnote} +\gls{newacronym}\marg{radar}\marg{radar}\marg{radio detection and ranging} +\gls{newacronym}\oarg{\gloskeyval{category}{latin}}\marg{ibid}\marg{ibid}\marg{ibidem} +\cbeg{document} +\gls{gls}\marg{html}, \gls{gls}\marg{radar} and \gls{gls}\marg{ibid}. +\gls{printunsrtglossaries} +\cend{document} +\tcblower +\createexample*[fontsize=20, + label={ex:fallbackabbrstyle}, + title={Category without an associated abbreviation style}, + description={Example document that has an abbreviation with a +category that doesn't have an associated abbreviation style}] +{% +\cmd{usepackage}[T1]\marg{fontenc}^^J% +\cmd{usepackage}\marg{glossaries-extra}^^J% +\gls{setabbreviationstyle}\marg{long-short-sc}^^J% +\gls{newabbreviation}\marg{html}\marg{html}\marg{hypertext markup language}^^J% +\gls{setabbreviationstyle}\oarg{acronym}\marg{footnote}^^J% +\gls{newacronym}\marg{radar}\marg{radar}\marg{radio detection and ranging}^^J% +\gls{newacronym}\oarg{category=latin}\marg{ibid}\marg{ibid}\marg{ibidem} +} +{% +\gls{gls}\marg{html}, \gls{gls}\marg{radar} and \gls{gls}\marg{ibid}.^^J% +\gls{printunsrtglossaries} +} +\end{coderesult} + +\subsection{Predefined Abbreviation Styles} +\label{sec:predefabbrstyles} + +There are two types of abbreviation styles: those that treat the +abbreviation as a regular entry (so that \gls{gls} uses +\gls{glsgenentryfmt} and is encapsulated with +\gls{glsxtrregularfont}) and those that don't treat the abbreviation +as a regular entry (so that \gls{gls} uses \gls{glsxtrgenabbrvfmt} +and is encapsulated with \gls{glsxtrabbreviationfont}). See +\sectionref{sec:entryfmt} for further details of those commands. + +\begin{information} +The non-regular abbreviation styles allow for more complex formats +than the regular styles. +\end{information} + +The regular entry abbreviation styles set the \catattr{regular} +attribute to \code{true} for the category assigned to each +abbreviation with that style. This means that on \idx{firstuse}, +\gls{gls} uses the value of the \gloskey{first} field and on +subsequent use \gls{gls} uses the value of the \gloskey{text} field +(and analogously for the plural and case-changing versions). + +The non-regular abbreviation styles don't set the \catattr{regular} +attribute, unless it has already been set, in which case it will be +changed to \code{false}. The \gloskey{first} and \gloskey{text} +fields (and their plural forms) are set, but they aren't used by +commands like \gls{gls}, which instead use formatting commands, such +as \gls{glsxtrfullformat} and \gls{glsxtrsubsequentfmt}, which are +defined by the style. + +In both cases, the \idx{firstuse} of \gls{gls} may not match the +text produced by \gls{glsfirst} (and likewise 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 \gls{glsxtrshort} and +\gls{glsxtrlong}. These may appear slightly differently to the way +the short or long form is displayed within \gls{gls}, depending on the +style. + +The sample file +\ctanmirrornofn{macros/latex/contrib/glossaries-extra/samples/sample-abbr-styles.pdf}{\filefmt{sample-abbr-styles.pdf}} +demonstrates all predefined styles described here. + +\begin{important} +For the \qt{sc} styles that use \gls{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. If you're using +\pdfLaTeX, I recommend that you at least use the \sty{fontenc} +package with the \optfmt{T1} option or something similar. +\end{important} + +The predefined styles have helper commands to make it easier to modify +the format. These are described in \sectionref{sec:abbrvcmds}. + +Table~\ref{tab:acrabbrvstyles} lists the nearest equivalent +\sty{glossaries-extra} abbreviation styles for +the predefined acronym styles provided by \sty{glossaries}, but +note that the new styles use different formatting commands. + +\begin{table}[htbp] +\caption[Base Acronym Styles Verses New Abbreviation Styles]{Base Acronym Styles +\glsfmttext{setacronymstyle}\margm{base-style-name} Verses New Abbreviation +Styles \glsfmttext{setabbreviationstyle}\oargm{category}\margm{new-style-name}} +\label{tab:acrabbrvstyles} +\centering +\begin{tabular}{lp{0.7\textwidth}} +\bfseries Base 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 +\code{\cmd{renewcommand}\marg{\gls{glsxtrfullsep}}\marg{\gls{glsabspace}}}\\ +\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 +\code{\cmd{renewcommand}\marg{\gls{glsxtrfullsep}}\marg{\gls{glsabspace}}}\\ +\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 example documents used to illustrate the predefined styles in +the sub-sections below are all in the form (document class and +options may vary): +\begin{codebox} +\cmd{documentclass}\marg{article} +\cmd{usepackage}\oarg{T1}\marg{fontenc} +\cmd{usepackage}\oarg{colorlinks}\marg{hyperref} +\cmd{usepackage}\marg{glossaries-extra} +\gls{setabbreviationstyle}\margm{style-name} +\gls{newabbreviation}\oargm{options}\marg{ex}\margm{short}\marg{long form} +\cbeg{document} +First: \gls{gls}\marg{ex}[-insert]. Next: \gls{gls}\marg{ex}[-insert]. +Full: \gls{glsxtrfull}\marg{ex}[-insert]. +\gls{printunsrtglossaries} +\cend{document} +\end{codebox} +where \meta{style-name} is the name of the abbreviation style, +\meta{short} is either \qt{SHRT FM} or (for the \idx{smallcaps} +examples) \qt{shrt fm}. The styles that require the +\gloskey{description} or \gloskey{user1} key to be set will include that in +\meta{options} otherwise the optional argument of +\gls{newabbreviation} will be omitted. +The examples with a style that requires +\gls{textsmaller} will load \sty{relsize}. +The \qt{hyphen} styles set the \catattr{markwords} and +\catattr{markshortwords} attributes. +Note that \sty{hyperref} is loaded with the \optfmt{colorlinks} +option, so the hyperlink text will be red. + +The naming scheme for abbreviation styles is as follows: +\begin{itemize} +\item +\meta{field1}[\code{-}\meta{modifier1}]\code{-}[post]\meta{field2}[\code{-}\meta{modifier2}][\code{-user}] + +This is for the parenthetical styles. The \code{-}\meta{modifier} parts may +be omitted. These styles display \meta{field1} followed by +\meta{field2} in parentheses. If \meta{field1} or \meta{field2} starts +with \qt{no} then that element is omitted from the +\idxc{displayfullform}{display style} (no +parenthetical part) but is included in the \idxc{inlinefullform}{inline style}. + +If \code{post} is present then \meta{field2} is +placed after the \gls{linktext} using the \idx{postlinkhook}. +Note that this will use the singular form of \meta{field2} by +default, even if \gls{glspl} is used. The corresponding non-post +style will use the matching form for \meta{field2}. + +If the \code{-}\meta{modifier} part is present and is one of +\code{sc}, \code{sm} or \code{em}, then the field has +a font changing command applied to it. + +The modifier \code{-only} indicates that field is only present +according to whether or not the entry has been used. + +The modifier \code{-hyphen} indicates the style will substitute +inter-word spaces (that have been marked up with the +\catattr{markwords} or \catattr{markshortwords} attributes) will be +changed to spaces if the inserted material starts with a hyphen (but +not for the set of \gls{glsxtrshort} and \gls{glsxtrlong} commands). + +If the \code{-user} part is present, then the value of the field +given by \gls{glsxtruserfield} (\gloskey{user1}), if set, is inserted into the +parenthetical material. + +Examples: + \begin{itemize} + \item\abbrstyle{long-noshort-sc}: \meta{field1} is the long +form, the short form is set in \idx{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}). + + \item\abbrstyle{long-hyphen-postshort-hyphen}: the short +form and the inserted material (provided by the final optional +argument of commands like \gls{gls}) is moved to the post-link hook. +The long form is formatted according to \gls{glslonghyphenfont} +(or \gls{glsfirstlonghyphenfont} on first use). +The short form is formatted according to \gls{glsabbrvhyphenfont} +(or \gls{glsfirstabbrvhyphenfont} on first use). + \end{itemize} + +\item \meta{style}\code{-noreg} + +Some styles set the \catattr{regular} attribute. In some cases, +there's a version of the style that doesn't set this attribute. +For example, \abbrstyle{long-em-noshort-em} sets the +\catattr{regular} attribute. The +\abbrstyle{long-em-noshort-em-noreg} style is a minor variation +of that style that sets the attribute to \code{false}. + +There are a few \qt{noshort} styles, such as +\abbrstyle{long-hyphen-noshort-noreg}, where there isn't a +corresponding regular version. This is because the +style won't work properly with the \catattr{regular} attribute set, but the +naming scheme is maintained for consistency with the other +\qt{noshort} styles. + +\item +\meta{field1}[\code{-}\meta{modifier1}]\code{-}[\code{post}]\code{footnote} + +The display style uses \meta{field1} followed by a footnote with the +other field in it. If \code{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 \code{-}\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 \gls{footnote} doesn't work. +\end{important} + +\item \meta{style}\code{-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). + +\subsubsection{Regular Styles} +\label{sec:predefregabbrvstyles} + +The following abbreviation styles set the \catattr{regular} +attribute to \code{true} for all categories that have abbreviations +defined with any of these styles. This means that they are treated +like ordinary entries and are encapsulated with +\gls{glsxtrregularfont} not \gls{glsxtrabbreviationfont}. The +\idx{glslike} commands are formatted according to +\gls{glsgenentryfmt}. + +\paragraph{Short Styles} +\label{sec:predefregabbrvstylesshort}These styles only show the +short form on both \idx{firstuse} and \idx{subsequentuse}. +See \sectionref{sec:abbrvcmdsgeneral} and +\sectionref{sec:abbrvcmdsnolong} for style commands. + +\abbrstyledef{short-nolong} +Only the short form is shown on \idx{firstuse} of the \idx{glslike} +commands. The \idx{inlinefullform} uses the same +parenthetical style as \abbrstyle{short-long} (\gls{glsxtrshortlongformat}). +Font variations are available with \abbrstyle{short-sc-nolong}, +\abbrstyle{short-sm-nolong} and \abbrstyle{short-em-nolong}. + +\abbrvstyleexampleuc{short-nolong} + +The long form is formatted with \gls{glslongdefaultfont} for the +\gls{glsxtrlong} set of commands. + +The short form is formatted with \gls{glsfirstabbrvdefaultfont} +within the full form and with \gls{glsabbrvdefaultfont} for +\idx{subsequentuse} and for the \gls{glsxtrshort} set of commands. + +The name is set to the short form (\gls{glsxtrshortnolongname}) and +the description is set to the unencapsulated long form. + +\abbrstyledef{short} +A synonym for \abbrstyle{short-nolong}. + +\abbrstyledef{short-nolong-desc} +As \abbrstyle{short-nolong} but the description must be supplied in +the optional argument of \gls{newabbreviation}. +Font variations are available with \abbrstyle{short-sc-nolong-desc}, +\abbrstyle{short-sm-nolong-desc} and \abbrstyle{short-em-nolong-desc}. + +\abbrvstyleexampleucdesc{short-nolong-desc} + +The name is set to the short form followed by the long form in +parentheses (\gls{glsxtrshortdescname}), and the sort is set to +just the short form. + +\abbrstyledef{short-desc} +A synonym for \abbrstyle{short-nolong-desc}. + +\abbrstyledef{nolong-short} +The same as \abbrstyle{short-nolong} except for the +\idx{inlinefullform}, which shows the same parenthetical style as +\abbrstyle{long-short} (\gls{glsxtrlongshortformat}). +Font variations are available with \abbrstyle{nolong-short-sc}, +\abbrstyle{nolong-short-sm} and \abbrstyle{nolong-short-em}. + +\abbrvstyleexampleuc{nolong-short} + +\abbrstyledef{short-sc-nolong} +This style is like \abbrstyle{short-nolong} but it uses +\gls{glsxtrscsuffix}, \gls{glsabbrvscfont} and +\gls{glsfirstabbrvscfont} (see \sectionref{sec:abbrvcmdsfonts}). + +\abbrvstyleexamplelc{short-sc-nolong} + +\abbrstyledef{short-sc} +A synonym for \abbrstyle{short-sc-nolong}. + +\abbrstyledef{short-sc-nolong-desc} +This style is like \abbrstyle{short-nolong-desc} but it uses +\gls{glsxtrscsuffix}, \gls{glsabbrvscfont} and +\gls{glsfirstabbrvscfont} (see \sectionref{sec:abbrvcmdsfonts}). + +\abbrvstyleexamplelcdesc{short-sc-nolong-desc} + +\abbrstyledef{short-sc-desc} +A synonym for \abbrstyle{short-sc-nolong-desc}. + +\abbrstyledef{nolong-short-sc} +This style is like \abbrstyle{nolong-short} but it uses +\gls{glsxtrscsuffix}, \gls{glsabbrvscfont} and +\gls{glsfirstabbrvscfont} (see \sectionref{sec:abbrvcmdsfonts}). + +\abbrvstyleexamplelc{nolong-short-sc} + +\abbrstyledef{short-sm-nolong} +This style is like \abbrstyle{short-nolong} but it uses +\gls{glsxtrsmsuffix}, \gls{glsabbrvsmfont} and +\gls{glsfirstabbrvsmfont} (see \sectionref{sec:abbrvcmdsfonts}). + +\abbrvstyleexamplesm{short-sm-nolong} + +\abbrstyledef{short-sm} +A synonym for \abbrstyle{short-sm-nolong}. + +\abbrstyledef{short-sm-nolong-desc} +This style is like \abbrstyle{short-nolong-desc} but it uses +\gls{glsxtrsmsuffix}, \gls{glsabbrvsmfont} and +\gls{glsfirstabbrvsmfont} (see \sectionref{sec:abbrvcmdsfonts}). + +\abbrvstyleexamplesmdesc{short-sm-nolong-desc} + +\abbrstyledef{short-sm-desc} +A synonym for \abbrstyle{short-sm-nolong-desc}. + +\abbrstyledef{nolong-short-sm} +This style is like \abbrstyle{nolong-short} but it uses +\gls{glsxtrsmsuffix}, \gls{glsabbrvsmfont} and +\gls{glsfirstabbrvsmfont} (see \sectionref{sec:abbrvcmdsfonts}). + +\abbrvstyleexamplesm{nolong-short-sm} + +\abbrstyledef{short-em-nolong} +This style is like \abbrstyle{short-nolong} but it uses +\gls{glsxtremsuffix}, \gls{glsabbrvemfont} and +\gls{glsfirstabbrvemfont} (see \sectionref{sec:abbrvcmdsfonts}). + +\abbrvstyleexampleuc{short-em-nolong} + +\abbrstyledef{short-em} +A synonym for \abbrstyle{short-em-nolong}. + +\abbrstyledef{short-em-nolong-desc} +This style is like \abbrstyle{short-nolong-desc} but it uses +\gls{glsxtremsuffix}, \gls{glsabbrvemfont} and +\gls{glsfirstabbrvemfont} (see \sectionref{sec:abbrvcmdsfonts}). + +\abbrvstyleexampleucdesc{short-em-nolong-desc} + +\abbrstyledef{short-em-desc} +A synonym for \abbrstyle{short-em-nolong-desc}. + +\abbrstyledef{nolong-short-em} +This style is like \abbrstyle{nolong-short} but it uses +\gls{glsxtremsuffix}, \gls{glsabbrvemfont} and +\gls{glsfirstabbrvemfont} (see \sectionref{sec:abbrvcmdsfonts}). + +\abbrvstyleexampleuc{nolong-short-em} + +\paragraph{Long Styles} +\label{sec:predefregabbrvstyleslong}These styles only show the long +form on both \idx{firstuse} and \idx{subsequentuse}. See +\sectionref{sec:abbrvcmdsgeneral} and +\sectionref{sec:abbrvcmdsnoshort} for style commands. + +\abbrstyledef{long-noshort-desc} +Only the long form is shown on \idx{firstuse} and +\idx{subsequentuse} of the \idx{glslike} commands +(\gls{glsxtrlongformat}). The \idx{inlinefullform} uses the same +parenthetical style as \abbrstyle{long-short} +(\gls{glsxtrlongshortformat}). +Font variations are available with \abbrstyle{long-noshort-sc-desc}, +\abbrstyle{long-noshort-sm-desc} and \abbrstyle{long-noshort-em-desc}. + +\abbrvstyleexampleucdesc{long-noshort-desc} + +The long form is formatted with \gls{glsfirstlongdefaultfont} on +\idx{firstuse} and \gls{glslongdefaultfont} for \idx{subsequentuse} +and for the \gls{glsxtrlong} set of commands. + +The short form is formatted with \gls{glsfirstabbrvdefaultfont} +within the \idx{inlinefullform} and with \gls{glsabbrvdefaultfont} +for the \gls{glsxtrshort} set of commands. + +The name is set to the long form (\gls{glsxtrlongnoshortdescname}) and +the description must be supplied. + +\abbrstyledef{long-desc} +A synonym for \abbrstyle{long-noshort-desc}. + +\abbrstyledef{long-noshort} +This is like \abbrstyle{long-noshort-desc} but the name is set to +the short form (\gls{glsxtrlongnoshortname}) and the description is +set to the unencapsulated long form. + +\abbrvstyleexampleuc{long-noshort} + +\abbrstyledef{long} +A synonym for \abbrstyle{long-noshort}. + +\abbrstyledef{long-noshort-sc} +This style is like \abbrstyle{long-noshort} but it uses +\gls{glsxtrscsuffix}, \gls{glsabbrvscfont} and +\gls{glsfirstabbrvscfont} (see \sectionref{sec:abbrvcmdsfonts}). + +\abbrvstyleexamplelc{long-noshort-sc} + +\abbrstyledef{long-noshort-sc-desc} +This style is like \abbrstyle{long-noshort-desc} but it uses +\gls{glsxtrscsuffix}, \gls{glsabbrvscfont} and +\gls{glsfirstabbrvscfont} (see \sectionref{sec:abbrvcmdsfonts}). + +\abbrvstyleexamplelcdesc{long-noshort-sc-desc} + +\abbrstyledef{long-noshort-sm} +This style is like \abbrstyle{long-noshort} but it uses +\gls{glsxtrsmsuffix}, \gls{glsabbrvsmfont} and +\gls{glsfirstabbrvsmfont} (see \sectionref{sec:abbrvcmdsfonts}). + +\abbrvstyleexamplesm{long-noshort-sm} + +\abbrstyledef{long-noshort-sm-desc} +This style is like \abbrstyle{long-noshort-desc} but it uses +\gls{glsxtrsmsuffix}, \gls{glsabbrvsmfont} and +\gls{glsfirstabbrvsmfont} (see \sectionref{sec:abbrvcmdsfonts}). + +\abbrvstyleexamplesmdesc{long-noshort-sm-desc} + +\abbrstyledef{long-noshort-em} +This style is like \abbrstyle{long-noshort} but it uses +\gls{glsxtremsuffix}, \gls{glsabbrvemfont} and +\gls{glsfirstabbrvemfont} (see \sectionref{sec:abbrvcmdsfonts}). + +\abbrvstyleexampleuc{long-noshort-em} + +\abbrstyledef{long-noshort-em-desc} +This style is like \abbrstyle{long-noshort-desc} but it uses +\gls{glsxtremsuffix}, \gls{glsabbrvemfont} and +\gls{glsfirstabbrvemfont} (see \sectionref{sec:abbrvcmdsfonts}). + +\abbrvstyleexampleucdesc{long-noshort-em-desc} + +\abbrstyledef{long-em-noshort-em} +This style is like \abbrstyle{long-noshort} but it uses +\gls{glsxtremsuffix}, \gls{glsabbrvemfont}, +\gls{glsfirstabbrvemfont}, \gls{glslongemfont} and +\gls{glsfirstlongemfont} (see \sectionref{sec:abbrvcmdsfonts}). +This emphasizes both the long and short forms. + +\abbrvstyleexampleuc{long-em-noshort-em} + +\abbrstyledef{long-em-noshort-em-desc} +This style is like \abbrstyle{long-noshort-desc} but it uses +\gls{glsxtremsuffix}, \gls{glsabbrvemfont}, +\gls{glsfirstabbrvemfont}, \gls{glslongemfont} and +\gls{glsfirstlongemfont} (see \sectionref{sec:abbrvcmdsfonts}). +This emphasizes both the long and short forms. + +\abbrvstyleexampleucdesc{long-em-noshort-em-desc} + +\subsubsection{Non-Regular Styles} +\label{sec:predefnonregabbrvstyles} + +The following abbreviation styles will set the +\catattr{regular} attribute to \code{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. + +The non-regular styles are too complicated to use +\gls{glsgenentryfmt} as the display style (with the +\idx{glslike} commands). Instead they use \gls{glsxtrgenabbrvfmt}. This +means that these styles won't work if you provide your own custom +display style (using \gls{defglsentryfmt}) that doesn't check for +the \catattr{regular} attribute. + +\begin{important} +Avoid using \gls{glsfirst}, \gls{glsfirstplural}, +\gls{glstext} and \gls{glsplural} (or their case-changing variants) +with these styles. There are also some styles that can be +problematic with \gls{GLSname}. +\end{important} + +\paragraph{Long (Short) Styles} +\label{sec:predefnonregabbrvstyleslongshort}These styles show the +long form followed by the short form in parentheses on +\idx{firstuse}. On \idx{subsequentuse} only the short form is shown. +See \sectionref{sec:abbrvcmdsgeneral} and \sectionref{sec:abbrvcmdsparen} +for style commands. + +\abbrstyledef{long-short} +The \meta{insert} is placed after the long form on \idx{firstuse} +of the \idx{glslike} commands and after the short form on \idx{subsequentuse}. +The \idx{inlinefullform} is the same as the \idx{displayfullform} +(\gls{glsxtrlongshortformat}). +Font variations are available with \abbrstyle{long-short-sc}, +\abbrstyle{long-short-sm}, \abbrstyle{long-short-em} and +\abbrstyle{long-em-short-em}. + +\abbrvstyleexampleuc{long-short} + +The long form is formatted with \gls{glsfirstlongdefaultfont} +within the full form and with \gls{glslongdefaultfont} for the +\gls{glsxtrlong} set of commands. + +The short form is formatted with \gls{glsfirstabbrvdefaultfont} +within the full form and with \gls{glsabbrvdefaultfont} for +\idx{subsequentuse} and for the \gls{glsxtrshort} set of commands. + +The name is set to the short form (\gls{glsxtrlongshortname}) and +the description is set to the unencapsulated long form. + +\abbrstyledef{long-short-desc} +As \abbrstyle{long-short} but the description must be supplied in +the optional argument of \gls{newabbreviation}. +Font variations are available with \abbrstyle{long-short-sc-desc}, +\abbrstyle{long-short-sm-desc}, \abbrstyle{long-short-em-desc} and +\abbrstyle{long-em-short-em-desc}. + +\abbrvstyleexampleucdesc{long-short-desc} + +The name and sort are set to the long form followed by the short form in +parentheses (\gls{glsxtrlongshortdescname} and +\gls{glsxtrlongshortdescsort}). + +\abbrstyledef{long-short-sc} +This style is like \abbrstyle{long-short} but it uses +\gls{glsxtrscsuffix}, \gls{glsabbrvscfont} and +\gls{glsfirstabbrvscfont} (see \sectionref{sec:abbrvcmdsfonts}). + +\abbrvstyleexamplelc{long-short-sc} + +\abbrstyledef{long-short-sc-desc} +This style is like \abbrstyle{long-short-desc} but it uses +\gls{glsxtrscsuffix}, \gls{glsabbrvscfont} and +\gls{glsfirstabbrvscfont} (see \sectionref{sec:abbrvcmdsfonts}). + +\abbrvstyleexamplelcdesc{long-short-sc-desc} + +\abbrstyledef{long-short-sm} +This style is like \abbrstyle{long-short} but it uses +\gls{glsxtrsmsuffix}, \gls{glsabbrvsmfont} and +\gls{glsfirstabbrvsmfont} (see \sectionref{sec:abbrvcmdsfonts}). + +\abbrvstyleexamplesm{long-short-sm} + +\abbrstyledef{long-short-sm-desc} +This style is like \abbrstyle{long-short-desc} but it uses +\gls{glsxtrsmsuffix}, \gls{glsabbrvsmfont} and +\gls{glsfirstabbrvsmfont} (see \sectionref{sec:abbrvcmdsfonts}). + +\abbrvstyleexamplesmdesc{long-short-sm-desc} + +\abbrstyledef{long-short-em} +This style is like \abbrstyle{long-short} but it uses +\gls{glsxtremsuffix}, \gls{glsabbrvemfont} and +\gls{glsfirstabbrvemfont} (see \sectionref{sec:abbrvcmdsfonts}). + +\abbrvstyleexampleuc{long-short-em} + +\abbrstyledef{long-short-em-desc} +This style is like \abbrstyle{long-short-desc} but it uses +\gls{glsxtremsuffix}, \gls{glsabbrvemfont} and +\gls{glsfirstabbrvemfont} (see \sectionref{sec:abbrvcmdsfonts}). + +\abbrvstyleexampleucdesc{long-short-em-desc} + +\abbrstyledef{long-em-short-em} +This style is like \abbrstyle{long-short} but it uses +\gls{glsxtremsuffix}, \gls{glsabbrvemfont} and +\gls{glsfirstabbrvemfont}, \gls{glsfirstlongemfont} +and \gls{glslongemfont} (see \sectionref{sec:abbrvcmdsfonts}). +That is, both the long and short forms are emphasized. + +\abbrvstyleexampleuc{long-em-short-em} + +\abbrstyledef{long-em-short-em-desc} +This style is like \abbrstyle{long-short-desc} but it uses +\gls{glsxtremsuffix}, \gls{glsabbrvemfont} and +\gls{glsfirstabbrvemfont}, \gls{glsfirstlongemfont} +and \gls{glslongemfont} (see \sectionref{sec:abbrvcmdsfonts}). +That is, both the long and short forms are emphasized. + +\abbrvstyleexampleucdesc{long-em-short-em-desc} + +\paragraph{Long (Short, User) Styles} +\label{sec:predefnonregabbrvstyleslongshortuser}These styles are like the +long (short) styles in \sectionref{sec:predefnonregabbrvstyleslongshort} +but additional content can be supplied in the field identified by +\gls{glsxtruserfield}, which will be placed in the parenthetical +content on \idx{firstuse} (if set). +The \idx{inlinefullform} is the same as the \idx{displayfullform}. + +These styles use the commands \gls{glsxtrusersuffix}, +\gls{glsabbrvuserfont}, \gls{glsfirstabbrvuserfont}, +\gls{glslonguserfont} and \gls{glsfirstlonguserfont} (except where +noted). See \sectionref{sec:abbrvcmdsgeneral} and +\sectionref{sec:abbrvcmdsuser} for style commands. + +If you need to change the font, you can redefine the associated +commands (listed above). However, since \idx{smallcaps} are awkward +because the short plural suffix needs to counteract the +\idx{smallcaps}, \idx{smallcaps} versions are provided. + +\abbrstyledef{long-short-user} +This style is like \abbrstyle{long-short} but it includes the +additional content in the parentheses on \idx{firstuse} or the +\idx{inlinefullform}. The description is obtained from +\gls{glsuserdescription}, which can be redefined to include the +additional information, if required. + +\abbrvstyleexampleucuser{long-short-user} + +\abbrstyledef{long-short-user-desc} +This style is like \abbrstyle{long-short-user} but the description +must be supplied. The name is obtained from +\gls{glsxtrlongshortuserdescname}. + +\abbrvstyleexampleucuserdesc{long-short-user-desc} + +\begin{important} +This style is incompatible with \gls{GLSname}. +\end{important} + +If you need to use \gls{GLSname} with this style, you'll have to +redefine \gls{glsxtrlongshortuserdescname} so that the field name +doesn't include the entry label. For example: +\begin{codebox} +\cmd{newcommand}\marg{\gls{glsxtrlongshortuserdescname}}\marg{\% + \cmd{protect}\gls{glslonguserfont}\marg{\cmd{the}\gls{glslongtok}}\% + \cmd{space}(\cmd{protect}\gls{glsabbrvuserfont}\marg{\cmd{the}\gls{glsshorttok}})\% +} +\end{codebox} + +\abbrstyledef{long-postshort-user} +This style is like \abbrstyle{long-short-user} but the parenthetical +material is placed in the \idx{postlinkhook}. Note that, unlike +\abbrstyle{long-short-user}, the plural form isn't used in the +parenthetical material. If you require this, you will need to +redefine \gls{glsxtrpostusershortformat}. + +\abbrvstyleexampleucuser{long-postshort-user} + +\abbrstyledef{long-postshort-user-desc} +This style is like \abbrstyle{long-postshort-user} but the description +must be supplied. The name is obtained from +\gls{glsxtrlongshortuserdescname}. + +\abbrvstyleexampleucuserdesc{long-postshort-user-desc} + +\begin{important} +This style is incompatible with \gls{GLSname}. +\end{important} + +If you need to use \gls{GLSname} with this style, you'll have to +redefine \gls{glsxtrshortlonguserdescname} so that the field name +doesn't include the entry label, as for +\abbrstyle{long-short-user-desc}. + +\abbrstyledef{long-postshort-sc-user} +This style is like \abbrstyle{long-postshort-user} but it uses +\gls{glsxtrscusersuffix}, \gls{glsabbrvscuserfont} and +\gls{glsfirstabbrvscuserfont}. +The name value is obtained from \gls{glsxtrlongshortscusername}. + +\abbrvstyleexamplelcuser{long-postshort-sc-user} + +\abbrstyledef{long-postshort-sc-user-desc} +This style is like \abbrstyle{long-postshort-sc-user} but the description +must be supplied. The name is obtained from +\gls{glsxtrlongshortuserdescname}. + +\abbrvstyleexamplelcuserdesc{long-postshort-sc-user-desc} + +\begin{important} +This style is incompatible with \gls{GLSname}. +\end{important} + +If you need to use \gls{GLSname} with this style, you'll have to +redefine \gls{glsxtrlongshortscuserdescname} so that the field name +doesn't include the entry label. + +\paragraph{Short (Long) Styles} +\label{sec:predefnonregabbrvstylesshortlong}These styles show the +short form followed by the long form in parentheses on +\idx{firstuse}. On \idx{subsequentuse} only the short form is shown. +See \sectionref{sec:abbrvcmdsgeneral} and \sectionref{sec:abbrvcmdsparen} +for style commands. + +\abbrstyledef{short-long} + +The \meta{insert} is placed after the short form on \idx{firstuse} +and \idx{subsequentuse} of the \idx{glslike} commands. +The \idx{inlinefullform} is the same as the \idx{displayfullform} +(\gls{glsxtrshortlongformat}). +Font variations are available with \abbrstyle{short-sc-long}, +\abbrstyle{short-sm-long}, \abbrstyle{short-em-long} and +\abbrstyle{short-em-long-em}. + +\abbrvstyleexampleuc{short-long} + +The long form is formatted with \gls{glsfirstlongdefaultfont} +within the full form and with \gls{glslongdefaultfont} for the +\gls{glsxtrlong} set of commands. + +The short form is formatted with \gls{glsfirstabbrvdefaultfont} +within the full form and with \gls{glsabbrvdefaultfont} for +\idx{subsequentuse} and for the \gls{glsxtrshort} set of commands. + +The name is set to the short form (\gls{glsxtrlongshortname}) and +the description is set to the unencapsulated long form. + +\abbrstyledef{short-long-desc} +As \abbrstyle{short-long} but the description must be supplied in +the optional argument of \gls{newabbreviation}. +Font variations are available with \abbrstyle{short-sc-long-desc}, +\abbrstyle{short-sm-long-desc}, \abbrstyle{short-em-long-desc} and +\abbrstyle{short-em-long-em-desc}. + +\abbrvstyleexampleucdesc{short-long-desc} + +The name is set to the short form followed by the long form in +parentheses (\gls{glsxtrshortlongdescname}), and the sort is set to +just the short form (\gls{glsxtrshortlongdescsort}). + +\abbrstyledef{short-sc-long} +This style is like \abbrstyle{short-long} but it uses +\gls{glsxtrscsuffix}, \gls{glsabbrvscfont} and +\gls{glsfirstabbrvscfont} (see \sectionref{sec:abbrvcmdsfonts}). + +\abbrvstyleexamplelc{short-sc-long} + +\abbrstyledef{short-sc-long-desc} +This style is like \abbrstyle{short-long-desc} but it uses +\gls{glsxtrscsuffix}, \gls{glsabbrvscfont} and +\gls{glsfirstabbrvscfont} (see \sectionref{sec:abbrvcmdsfonts}). + +\abbrvstyleexamplelcdesc{short-sc-long-desc} + +\abbrstyledef{short-sm-long} +This style is like \abbrstyle{short-long} but it uses +\gls{glsxtrsmsuffix}, \gls{glsabbrvsmfont} and +\gls{glsfirstabbrvsmfont} (see \sectionref{sec:abbrvcmdsfonts}). + +\abbrvstyleexamplesm{short-sm-long} + +\abbrstyledef{short-sm-long-desc} +This style is like \abbrstyle{short-long-desc} but it uses +\gls{glsxtrsmsuffix}, \gls{glsabbrvsmfont} and +\gls{glsfirstabbrvsmfont} (see \sectionref{sec:abbrvcmdsfonts}). + +\abbrvstyleexamplesmdesc{short-sm-long-desc} + +\abbrstyledef{short-em-long} +This style is like \abbrstyle{short-long} but it uses +\gls{glsxtremsuffix}, \gls{glsabbrvemfont} and +\gls{glsfirstabbrvemfont} (see \sectionref{sec:abbrvcmdsfonts}). + +\abbrvstyleexampleuc{short-em-long} + +\abbrstyledef{short-em-long-desc} +This style is like \abbrstyle{short-long-desc} but it uses +\gls{glsxtremsuffix}, \gls{glsabbrvemfont} and +\gls{glsfirstabbrvemfont} (see \sectionref{sec:abbrvcmdsfonts}). + +\abbrvstyleexampleucdesc{short-em-long-desc} + +\abbrstyledef{short-em-long-em} +This style is like \abbrstyle{short-long} but it uses +\gls{glsxtremsuffix}, \gls{glsabbrvemfont} and +\gls{glsfirstabbrvemfont}, \gls{glsfirstlongemfont} +and \gls{glslongemfont} (see \sectionref{sec:abbrvcmdsfonts}). +That is, both the long and short forms are emphasized. + +\abbrvstyleexampleuc{short-em-long-em} + +\abbrstyledef{short-em-long-em-desc} +This style is like \abbrstyle{short-long-desc} but it uses +\gls{glsxtremsuffix}, \gls{glsabbrvemfont} and +\gls{glsfirstabbrvemfont}, \gls{glsfirstlongemfont} +and \gls{glslongemfont} (see \sectionref{sec:abbrvcmdsfonts}). +That is, both the long and short forms are emphasized. + +\abbrvstyleexampleucdesc{short-em-long-em-desc} + +\paragraph{Short (Long, User) Styles} +\label{sec:predefnonregabbrvstylesshortlonguser}These styles are like the +short (long) styles in +\sectionref{sec:predefnonregabbrvstylesshortlong} +but additional content can be supplied in the field identified by +\gls{glsxtruserfield}, which will be placed in the parenthetical +content on \idx{firstuse} (if set). +The \idx{inlinefullform} is the same as the \idx{displayfullform}. + +These styles use the commands \gls{glsxtrusersuffix}, +\gls{glsabbrvuserfont}, \gls{glsfirstabbrvuserfont}, +\gls{glslonguserfont} and \gls{glsfirstlonguserfont} (except where +noted). See \sectionref{sec:abbrvcmdsgeneral} and +\sectionref{sec:abbrvcmdsuser} for style commands. + +\abbrstyledef{short-long-user} +This style is like \abbrstyle{short-long} but it includes the +additional content in the parentheses on \idx{firstuse} or the +\idx{inlinefullform}. + +The description is obtained from +\gls{glsuserdescription}, which can be redefined to include the +additional information, if required. + +\abbrvstyleexampleucuser{short-long-user} + +\abbrstyledef{short-long-user-desc} +This style is like \abbrstyle{short-long-user} but the description +must be provided. The name is obtained from +\gls{glsxtrshortlonguserdescname} and the sort value is obtained +from \gls{glsxtrshortlongdescsort}. + +\abbrvstyleexampleucuserdesc{short-long-user-desc} + +\begin{important} +This style is incompatible with \gls{GLSname}. +\end{important} + +If you need to use \gls{GLSname} with this style, you'll have to +redefine \gls{glsxtrshortlonguserdescname} so that the field name +doesn't include the entry label. For example: +\begin{codebox} +\cmd{newcommand}\marg{\gls{glsxtrlongshortuserdescname}}\marg{\% + \cmd{protect}\gls{glsabbrvuserfont}\marg{\cmd{the}\gls{glsshorttok}}\% + \cmd{space}(\cmd{protect}\gls{glslonguserfont}\marg{\cmd{the}\gls{glslongtok}})\% +} +\end{codebox} + +\abbrstyledef{short-postlong-user} +This style is like \abbrstyle{short-long} but it includes the +additional content in the parentheses on \idx{firstuse} or the +\idx{inlinefullform}. The parenthetical content is placed in the +\idx{postlinkhook} which can avoid overly long hyperlinks. + +The description is obtained from +\gls{glsuserdescription}, which can be redefined to include the +additional information, if required. + +\abbrvstyleexampleucuser{short-postlong-user} + +\abbrstyledef{short-postlong-user-desc} +This style is like \abbrstyle{short-postlong-user} but the description +must be provided. The name is obtained from +\gls{glsxtrshortlonguserdescname}. The sort value is the short form. + +\abbrvstyleexampleucuserdesc{short-postlong-user-desc} + +\begin{important} +This style is incompatible with \gls{GLSname}. +\end{important} + +If you need to use \gls{GLSname} with this style, you'll have to +redefine \gls{glsxtrshortlonguserdescname} so that the field name +doesn't include the entry label, as for \abbrstyle{short-long-user-desc}. + +\paragraph{Hyphen Styles} +\label{sec:predefnonregabbrvstyleshyphen}These styles test +if the inserted material start with a hyphen. See +\sectionref{sec:abbrvcmdsgeneral}, \sectionref{sec:abbrvcmdsparen} +and \sectionref{sec:abbrvcmdshyphen} for style commands. + +\begin{information} +These styles are designed to be used with the \catattr{markwords} +attribute and (if the short form has spaces) the +\catattr{markshortwords} attribute. If the inserted material starts +with a hyphen, the spaces will be replaced with hyphens. This +replacement won't take place if the corresponding attribute wasn't +used to mark the inter-word spaces. +\end{information} + +Note that \gls{glsxtrshort} and \gls{glsxtrlong} (and their plural +and case-changing variants) don't perform the inter-word space +substitution. The \idx{inlinefullform} is slightly different from +the \idx{displayfullform} for the \qt{post} styles. + +\abbrstyledef{long-hyphen-short-hyphen} +This style is like \abbrstyle{long-short} but checks the inserted +material for a leading hyphen. The description is the long form +encapsulated with \gls{glslonghyphenfont}. The name is obtained from +\gls{glsxtrlongshortname}, and the sort value is obtained from +\gls{glsxtrlonghyphenshortsort}. The +\idx{inlinefullform} is the same as the \idx{displayfullform}. + +\abbrvstyleexampleuchyp{long-hyphen-short-hyphen} + +\abbrstyledef{long-hyphen-postshort-hyphen} +This style is like \abbrstyle{long-hyphen-short-hyphen} but places +the insert and parenthetical material in the \idx{postlinkhook} for +the \idx{displayfullform}. + +\abbrvstyleexampleuchyp{long-hyphen-postshort-hyphen} + +Note that the \idx{inlinefullform} (\gls{glsxtrfull}) doesn't show +the insert in the \idx{postlinkhook}, but instead places it at the +end of the \idx{linktext}. This is because only the +\idx{glslike} commands (not the \idx{glstextlike} commands) set the +placeholder \gls{glsinsert} to the supplied insert. If you want the +insert to show in the parenthetical part of the \idx{postlinkhook} for the +\idx{inlinefullform} you need to redefine +\gls{glsxtrfullsaveinsert}: +\begin{codebox} +\cmd{renewcommand}*\marg{\gls{glsxtrfullsaveinsert}}[2]\marg{\cmd{def}\gls{glsinsert}\marg{\#2}} +\end{codebox} + +\abbrstyledef{long-hyphen-short-hyphen-desc} +This style is like \abbrstyle{long-hyphen-short-hyphen} but the +description must be supplied. The name is obtained from +\gls{glsxtrlongshortdescname}, and the sort value is +obtained from \gls{glsxtrlongshortdescsort}. + +\abbrvstyleexampleuchypdesc{long-hyphen-short-hyphen-desc} + +\abbrstyledef{long-hyphen-postshort-hyphen-desc} +This style is like \abbrstyle{long-hyphen-short-hyphen-desc} but places +the insert and parenthetical material in the \idx{postlinkhook} for +the \idx{displayfullform}. + +\abbrvstyleexampleuchypdesc{long-hyphen-postshort-hyphen-desc} + +Note that as with the +\abbrstyle{long-hyphen-postshort-hyphen} style, the insert isn't +included in the \idx{postlinkhook} by default for the +\idx{inlinefullform}. If you want the +insert to show in the \idx{postlinkhook} for the +\idx{inlinefullform} you need to redefine +\gls{glsxtrfullsaveinsert}. + +\abbrstyledef{long-hyphen-noshort-desc-noreg} +This style is like \abbrstyle{long-noshort-desc-noreg} but checks +the inserted material for a leading hyphen. The description must be +supplied. The name is obtained from \gls{glsxtrlongnoshortdescname}, +and the sort value is obtained from \gls{glsxtrlonghyphennoshortdescsort}. + +\abbrvstyleexampleuchypdesc{long-hyphen-noshort-desc-noreg} + +\abbrstyledef{long-hyphen-noshort-noreg} +This style is like \abbrstyle{long-noshort-noreg} but checks +the inserted material for a leading hyphen. The description is set +to the unencapsulated long form. The name is obtained from \gls{glsxtrlongnoshortname}, +and the sort value is obtained from \gls{glsxtrlonghyphennoshortsort}. + +\abbrvstyleexampleuchyp{long-hyphen-noshort-noreg} + +\abbrstyledef{short-hyphen-long-hyphen} +This style is like \abbrstyle{short-long} but checks the inserted +material for a leading hyphen. The description is the long form +encapsulated with \gls{glslonghyphenfont}. The name is obtained from +\gls{glsxtrshortlongname} and the sort value is obtained from +\gls{glsxtrshorthyphenlongsort}. + +\abbrvstyleexampleuchyp{short-hyphen-long-hyphen} + +\abbrstyledef{short-hyphen-postlong-hyphen} +This style is like \abbrstyle{short-hyphen-long-hyphen} but the +insert and parenthetical material are placed in the +\idx{postlinkhook} for the \idx{displayfullform}. + +\abbrvstyleexampleuchyp{short-hyphen-postlong-hyphen} + +Note that as with the \abbrstyle{long-hyphen-postshort-hyphen} style, +the insert isn't included in the \idx{postlinkhook} by default for +the \idx{inlinefullform}. If you want the insert to show in the +\idx{postlinkhook} for the \idx{inlinefullform} you need to redefine +\gls{glsxtrfullsaveinsert} (as described above, for the +\abbrstyle{long-hyphen-postshort-hyphen} style). + +\abbrstyledef{short-hyphen-long-hyphen-desc} +This style is like \abbrstyle{short-hyphen-long-hyphen} but the +description must be supplied. The name is obtained from +\gls{glsxtrshortlongdescname}, and the sort is obtained from +\gls{glsxtrshortlongdescsort}. + +\abbrvstyleexampleuchypdesc{short-hyphen-long-hyphen-desc} + +\abbrstyledef{short-hyphen-postlong-hyphen-desc} +This style is like \abbrstyle{short-hyphen-long-hyphen-desc} but the +insert and parenthetical material are placed in the +\idx{postlinkhook} for the \idx{displayfullform}. + +\abbrvstyleexampleuchypdesc{short-hyphen-postlong-hyphen-desc} + +Note that as with the \abbrstyle{long-hyphen-postshort-hyphen} style, +the insert isn't included in the \idx{postlinkhook} by default for +the \idx{inlinefullform}. If you want the insert to show in the +\idx{postlinkhook} for the \idx{inlinefullform} you need to redefine +\gls{glsxtrfullsaveinsert} (as described above, for the +\abbrstyle{long-hyphen-postshort-hyphen} style). + +\paragraph{Only Styles} +\label{sec:predefnonregabbrvstylesonly}These styles only show the +long form on \idx{firstuse} and only show the short form on +\idx{subsequentuse}. The +\idx{inlinefullform} is the same as the \idx{displayfullform}. See +\sectionref{sec:abbrvcmdsgeneral}, \sectionref{sec:abbrvcmdsparen} +and \sectionref{sec:abbrvcmdsonly} for style commands. + +The \idx{inlinefullform} uses a parenthetical style with the long +form followed by the short form in parentheses. + +\abbrstyledef{long-only-short-only} +The name is obtained from \gls{glsxtronlyname} and the sort value is +just the short form. The description is the long form encapsulated +with \gls{glslongonlyfont}. + +\abbrvstyleexampleuc{long-only-short-only} + +\abbrstyledef{long-only-short-only-desc} +This is like \abbrstyle{long-only-short-only} but the description must +be supplied. The name is obtained from \gls{glsxtronlydescname} and +the sort is obtained from \gls{glsxtronlydescsort}. + +\abbrvstyleexampleucdesc{long-only-short-only-desc} + +\abbrstyledef{long-only-short-sc-only} +This is like \abbrstyle{long-only-short-only} but uses +\idx{smallcaps}. The name is obtained from \gls{glsxtrsconlyname}, +and it uses \gls{glsabbrvsconlyfont}, \gls{glsfirstabbrvsconlyfont} +and \gls{glsxtrsconlysuffix} for the abbreviation fonts and plural +suffix. + +\abbrvstyleexamplelc{long-only-short-sc-only} + +\abbrstyledef{long-only-short-sc-only-desc} +This is like \abbrstyle{long-only-short-only-desc} but uses +\idx{smallcaps}. The name is obtained from \gls{glsxtrsconlydescname}, +and the sort is obtained from \gls{glsxtrsconlydescsort}. + +\abbrvstyleexamplelcdesc{long-only-short-sc-only-desc} + +\paragraph{Footnote Styles} +\label{sec:predefnonregabbrvstylesfootnote}These styles show the +short form (\gls{glsxtrshortformat}) with the long form as a footnote on +\idx{firstuse}. On \idx{subsequentuse} only the short form is shown. +See \sectionref{sec:abbrvcmdsgeneral} and \sectionref{sec:abbrvcmdsfootnote} +for style commands. + +The \idx{inlinefullform} uses the same +parenthetical style as \abbrstyle{short-long} (\gls{glsxtrshortlongformat}). +Font variations are available with \abbrstyle{short-sc-footnote}, +\abbrstyle{short-sm-footnote} and \abbrstyle{short-em-footnote}. + +\abbrstyledef{short-footnote} +The \meta{insert} is placed after the short form on \idx{firstuse} +and \idx{subsequentuse} of the \idx{glslike} commands. + +\abbrvstyleexampleucfn{short-footnote} + +The long form is formatted with \gls{glsfirstlongfootnotefont} +within the full form and with \gls{glslongfootnotefont} for the +\gls{glsxtrlong} set of commands. + +The short form is formatted with \gls{glsfirstabbrvdefaultfont} +within the full form and with \gls{glsabbrvdefaultfont} for +\idx{subsequentuse} and for the \gls{glsxtrshort} set of commands. + +The name is set to the short form (\gls{glsxtrfootnotename}) and +the description is set to the unencapsulated long form. + +This style automatically sets the \catattr{nohyperfirst} attribute +to \code{true} for the entry's category. + +\abbrstyledef{footnote} +A synonym for \abbrstyle{short-footnote}. + +\abbrstyledef{short-footnote-desc} +As \abbrstyle{short-footnote} but the description must be supplied in +the optional argument of \gls{newabbreviation}. + +\abbrvstyleexampleucdescfn{short-footnote-desc} + +The name is set to the short form followed by the long form in +parentheses (\gls{glsxtrfootnotedescname}), and the sort is set to +just the short form (\gls{glsxtrfootnotedescsort}). + +\abbrstyledef{footnote-desc} +A synonym for \abbrstyle{short-footnote-desc}. + +\abbrstyledef{short-postfootnote} +Similar to \abbrstyle{short-footnote} but the footnote command is +placed in the \idx{postlinkhook}. This avoids the problem of nested +hyperlinks caused by the footnote marker hyperlink being inside the +\idx{linktext} (which is why the \abbrstyle{short-footnote} style +switches on the \catattr{nohyperfirst} attribute). Using the +\idx{postlinkhook} makes it possible to check for following +punctuation so that the footnote marker can be shifted after the +punctuation character. + +\abbrvstyleexampleucfn{short-postfootnote} + +\abbrstyledef{postfootnote} +A synonym for \abbrstyle{short-postfootnote}. + +\abbrstyledef{short-postfootnote-desc} +Similar to \abbrstyle{short-footnote-desc} but the footnote command is +placed in the \idx{postlinkhook} as with +\abbrstyle{short-postfootnote}. + +\abbrvstyleexampleucdescfn{short-postfootnote-desc} + +\abbrstyledef{postfootnote-desc} +A synonym for \abbrstyle{short-postfootnote-desc}. + +\abbrstyledef{short-sc-footnote} +This style is like \abbrstyle{short-footnote} but it uses +\gls{glsxtrscsuffix}, \gls{glsabbrvscfont} and +\gls{glsfirstabbrvscfont} (see \sectionref{sec:abbrvcmdsfonts}). + +\abbrvstyleexamplelcfn{short-sc-footnote} + +\abbrstyledef{short-sc-footnote-desc} +This style is like \abbrstyle{short-footnote-desc} but it uses +\gls{glsxtrscsuffix}, \gls{glsabbrvscfont} and +\gls{glsfirstabbrvscfont} (see \sectionref{sec:abbrvcmdsfonts}). + +\abbrvstyleexamplelcdescfn{short-sc-footnote-desc} + +\abbrstyledef{short-sc-postfootnote} +This style is like \abbrstyle{short-postfootnote} but it uses +\gls{glsxtrscsuffix}, \gls{glsabbrvscfont} and +\gls{glsfirstabbrvscfont} (see \sectionref{sec:abbrvcmdsfonts}). + +\abbrvstyleexamplelcfn{short-sc-postfootnote} + +\abbrstyledef{short-sc-postfootnote-desc} +This style is like \abbrstyle{short-postfootnote-desc} but it uses +\gls{glsxtrscsuffix}, \gls{glsabbrvscfont} and +\gls{glsfirstabbrvscfont} (see \sectionref{sec:abbrvcmdsfonts}). + +\abbrvstyleexamplelcdescfn{short-sc-postfootnote-desc} + +\abbrstyledef{short-sm-footnote} +This style is like \abbrstyle{short-footnote} but it uses +\gls{glsxtrsmsuffix}, \gls{glsabbrvsmfont} and +\gls{glsfirstabbrvsmfont} (see \sectionref{sec:abbrvcmdsfonts}). + +\abbrvstyleexamplesmfn{short-sm-footnote} + +\abbrstyledef{short-sm-footnote-desc} +This style is like \abbrstyle{short-footnote-desc} but it uses +\gls{glsxtrsmsuffix}, \gls{glsabbrvsmfont} and +\gls{glsfirstabbrvsmfont} (see \sectionref{sec:abbrvcmdsfonts}). + +\abbrvstyleexamplesmdescfn{short-sm-footnote-desc} + +\abbrstyledef{short-sm-postfootnote} +This style is like \abbrstyle{short-postfootnote} but it uses +\gls{glsxtrsmsuffix}, \gls{glsabbrvsmfont} and +\gls{glsfirstabbrvsmfont} (see \sectionref{sec:abbrvcmdsfonts}). + +\abbrvstyleexamplesmfn{short-sm-postfootnote} + +\abbrstyledef{short-sm-postfootnote-desc} +This style is like \abbrstyle{short-postfootnote-desc} but it uses +\gls{glsxtrsmsuffix}, \gls{glsabbrvsmfont} and +\gls{glsfirstabbrvsmfont} (see \sectionref{sec:abbrvcmdsfonts}). + +\abbrvstyleexamplesmdescfn{short-sm-postfootnote-desc} + +\abbrstyledef{short-em-footnote} +This style is like \abbrstyle{short-footnote} but it uses +\gls{glsxtremsuffix}, \gls{glsabbrvemfont} and +\gls{glsfirstabbrvemfont} (see \sectionref{sec:abbrvcmdsfonts}). + +\abbrvstyleexampleucfn{short-em-footnote} + +\abbrstyledef{short-em-footnote-desc} +This style is like \abbrstyle{short-footnote-desc} but it uses +\gls{glsxtremsuffix}, \gls{glsabbrvemfont} and +\gls{glsfirstabbrvemfont} (see \sectionref{sec:abbrvcmdsfonts}). + +\abbrvstyleexampleucdescfn{short-em-footnote-desc} + +\abbrstyledef{short-em-postfootnote} +This style is like \abbrstyle{short-postfootnote} but it uses +\gls{glsxtremsuffix}, \gls{glsabbrvemfont} and +\gls{glsfirstabbrvemfont} (see \sectionref{sec:abbrvcmdsfonts}). + +\abbrvstyleexampleucfn{short-em-postfootnote} + +\abbrstyledef{short-em-postfootnote-desc} +This style is like \abbrstyle{short-postfootnote-desc} but it uses +\gls{glsxtremsuffix}, \gls{glsabbrvemfont} and +\gls{glsfirstabbrvemfont} (see \sectionref{sec:abbrvcmdsfonts}). + +\abbrvstyleexampleucdescfn{short-em-postfootnote-desc} + + +\paragraph{Short Styles} +\label{sec:predefnonregabbrvstylesshort}These styles only show the +short form on both \idx{firstuse} and \idx{subsequentuse}. +See \sectionref{sec:abbrvcmdsgeneral} and +\sectionref{sec:abbrvcmdsnolong} for style commands. +They are essentially identical to the corresponding regular style +listed in \sectionref{sec:predefnonregabbrvstylesshort} except that +they change the \catattr{regular} attribute to \code{false}. + +\abbrstyledef{short-nolong-noreg} +This style is a non-regular version of the \abbrstyle{short-nolong} style. + +\abbrstyledef{short-nolong-desc-noreg} +This style is a non-regular version of the \abbrstyle{short-nolong-desc} style. + +\abbrstyledef{nolong-short-noreg} +This style is a non-regular version of the \abbrstyle{nolong-short} style. + +\paragraph{Long Styles} +\label{sec:predefnonregabbrvstyleslong}These styles only show the +long form on both \idx{firstuse} and \idx{subsequentuse}. +See \sectionref{sec:abbrvcmdsgeneral} and +\sectionref{sec:abbrvcmdsnoshort} for style commands. +They are essentially identical to the corresponding regular style +listed in \sectionref{sec:predefnonregabbrvstyleslong} except that +they change the \catattr{regular} attribute to \code{false}. + +\abbrstyledef{long-noshort-desc-noreg} +This style is a non-regular version of the \abbrstyle{long-noshort-desc} style. + +\abbrstyledef{long-noshort-noreg} +This style is a non-regular version of the \abbrstyle{long-noshort} style. + +\abbrstyledef{long-em-noshort-em-noreg} +This style is a non-regular version of the +\abbrstyle{long-em-noshort-em} style. + +\abbrstyledef{long-em-noshort-em-desc-noreg} +This style is a non-regular version of the +\abbrstyle{long-em-noshort-em-desc} style. + + +\subsubsection{Formatting Commands and Hooks} +\label{sec:abbrvcmds} + +These commands are used by the predefined abbreviation styles. These +are considered user commands, which you can redefine to customize +the style. + +\paragraph{General} +\label{sec:abbrvcmdsgeneral}These commands apply to all styles. + +\cmddef{ifglsxtrinsertinside} +This conditional is used to determine whether the \meta{insert} part +should go inside or outside of the style's font formatting commands. +The default setting is false. + +\cmddef{glsxtrinsertinsidetrue} +Set the insert inside conditional to true. + +\cmddef{glsxtrinsertinsidefalse} +Set the insert inside conditional to false. + +\cmddef{glsxtrparen} +Used for parenthetical content in the \idx{inlinefullform} and +also, for some styles, the \idx{displayfullform}. Note that this formats the opening +and closing parentheses according to the \idx{innerformatting}, but not the +argument, which should already incorporate it. The default definition is: +\begin{codebox} +\cmd{newcommand}*\marg{\gls{glsxtrparen}}[1]\marg{\% + \gls{glsxtrgenentrytextfmt}\marg{(}\#1\gls{glsxtrgenentrytextfmt}\marg{)}} +\end{codebox} + +\cmddef{glsxtrfullsep} +Separator placed before \gls{glsxtrparen}. This +is a space by default, but it includes the \idx{innerformatting}. +The argument (the entry label) is ignored by default: +\begin{codebox} +\cmd{newcommand}*\marg{\gls{glsxtrfullsep}}[1]\marg{\gls{glsxtrgenentrytextfmt}\marg{ }} +\end{codebox} +You can redefine this to use \gls{glsabspace} if you want to have a +non-breakable space if the short form is less than +\gls{glsacspacemax} in width. (You can use \gls{glsacspace} instead, +but note that \gls{glsacspace} doesn't incorporate the \idx{innerformatting}.) + +\cmddef{glsabbrvdefaultfont} +Abbreviation font command used by styles that don't have specific +font markup (for example, \abbrstyle{long-short} but not +\abbrstyle{long-em-short-em}). This just does its argument. + +\cmddef{glsfirstabbrvdefaultfont} +\Idx{firstuse} abbreviation font command used by styles that don't have specific +font markup. This is defined to just use \gls{glsabbrvdefaultfont}. + +\cmddef{glsxtrdefaultrevert} +This is the default definition of \gls{glsxtrrevert} used by styles +that don't have specific font markup. If you redefine +\gls{glsabbrvdefaultfont}, you will need to redefine +\gls{glsxtrdefaultrevert} as applicable. + +\cmddef{glslongdefaultfont} +Long form font command used by styles that don't have specific +font markup. This just does its argument. + +\cmddef{glsfirstlongdefaultfont} +\Idx{firstuse} long form font command used by styles that don't have specific +font markup. This is defined to just use +\gls{glslongdefaultfont}. + +\paragraph{Parenthetical Styles} +\label{sec:abbrvcmdsparen}These commands apply to the parenthetical +styles, such as \abbrstyle{long-short}. + +\cmddef{glsxtrlongshortname} +This command should expand to the value of the \gloskey{name} key +for styles like \abbrstyle{long-short}. +The default definition is: +\begin{codebox} +\gls{glsxpabbrvfont}\marg{\cmd{the}\gls{glsshorttok}}\marg{\gls{glscategorylabel}} +\end{codebox} + +\cmddef{glsxtrlongshortdescsort} +This command should expand to the sort value used by styles such as +\abbrstyle{long-short-desc}. The default definition is: +\begin{codebox} +\gls+{expandonce}\gls{glsxtrorglong}\cmd{space} (\gls{expandonce}\gls{glsxtrorgshort}) +\end{codebox} +Note that this uses the original \meta{long} and \meta{short} values +supplied to \gls{newabbreviation}. + +\begin{information} +This command is irrelevant with the \idx{unsrtfam}. +\end{information} + +\cmddef{glsxtrlongshortdescname} +This command should expand to the name value used by styles such as +\abbrstyle{long-short-desc}. The default definition is: +\begin{codebox} +\gls{glsxplongfont}\marg{\cmd{the}\gls{glslongtok}}\marg{\gls{glscategorylabel}}\% +\cmd{protect}\gls{glsxtrfullsep}\marg{\cmd{the}\gls{glslabeltok}}\% +\cmd{protect}\gls{glsxtrparen} + \marg{\gls{glsxpabbrvfont}\marg{\cmd{the}\gls{glsshorttok}}\marg{\gls{glscategorylabel}}} +\end{codebox} +This essentially expands to \meta{long} (\meta{short}) but includes the +style font changing commands, the inner text formatting, and +accessibility support. + +\cmddef{glsxtrshortlongname} +This command should expand to the value of the \gloskey{name} key +for styles like \abbrstyle{short-long}. +The default definition is: +\begin{codebox} +\gls{glsxpabbrvfont}\marg{\cmd{the}\gls{glsshorttok}}\marg{\gls{glscategorylabel}} +\end{codebox} + +\cmddef{glsxtrshortlongdescsort} +This command should expand to the value of the \gloskey{sort} key +for styles like \abbrstyle{short-long-desc}. The default definition +is just \code{\gls+{expandonce}\gls{glsxtrorgshort}}. + +\begin{information} +This command is irrelevant with the \idx{unsrtfam}. +\end{information} + +\cmddef{glsxtrshortlongdescname} +This command should expand to the value of the \gloskey{name} key +for styles like \abbrstyle{short-long-desc}. The default definition +is: +\begin{codebox} +\gls{glsxpabbrvfont}\marg{\cmd{the}\gls{glsshorttok}}\marg{\gls{glscategorylabel}}\% +\cmd{protect}\gls{glsxtrfullsep}\marg{\cmd{the}\gls{glslabeltok}}\% +\cmd{protect}\gls{glsxtrparen} + {\gls{glsxplongfont}\marg{\cmd{the}\gls{glslongtok}}\marg{\gls{glscategorylabel}}} +\end{codebox} + +\paragraph{User Styles} +\label{sec:abbrvcmdsuser}These commands apply to the \qt{user} +styles, such as \abbrstyle{long-short-user}. + +\cmddef{glsxtruserfield} +This command should expand to the \idxc{internalfieldlabel}{internal +label} of the field used to store the additional information that +should be shown in the parenthetical material on \idx{firstuse}. The +default is \code{useri}, which corresponds to the \gloskey{user1} +key. + +\cmddef{glsxtruserparensep} +The separator used within the parenthetical content. This defaults +to a comma followed by a space. + +\cmddef{glsxtruserfieldfmt} +Used to encapsulate the value of the field given by +\gls{glsxtruserfield} within \gls{glsxtruserparen} and +\gls{GLSxtruserparen}. This simply does its argument by default. + +The \idx{innerformatting} with both \gls{glsxtruserparen} and +\gls{GLSxtruserparen}, and the case-change with the latter, will be +included in the argument of \gls{glsxtruserfieldfmt}. + +For example, to emphasize the user value and separate it with a +semi-colon instead of a comma: +\begin{codebox} +\cmd{renewcommand}\marg{\gls{glsxtruserparensep}}\marg{; } +\cmd{renewcommand}\marg{\gls{glsxtruserfieldfmt}}[1]\marg{\cmd{emph}\marg{\#1}} +\end{codebox} + +\cmddef{glsabbrvuserfont} +Formatting for the \qt{user} short form. This defaults to +\gls{glsabbrvdefaultfont}. + +\cmddef{glsfirstabbrvuserfont} +Formatting for the \qt{user} short form shown on \idx{firstuse}. +This defaults to \gls{glsabbrvuserfont}. + +\cmddef{glsxtrusersuffix} +Short plural suffix used by the \qt{user} styles. This defaults to +\gls{glsxtrabbrvpluralsuffix}. + +\cmddef{glslonguserfont} +Formatting for the \qt{user} long form. This defaults to +\gls{glsabbrvdefaultfont}. + +\cmddef{glsfirstlonguserfont} +Formatting for the \qt{user} short form shown on \idx{firstuse}. +This defaults to \gls{glslonguserfont}. + +\cmddef{glsabbrvscuserfont} +Formatting for the \qt{sc-user} short form. This uses +\gls{glsabbrvscfont}, which in turn uses \gls{textsc} to +apply a \idx{smallcaps} style, so your document font needs to +support it. + +\begin{information} +\gls{textsc} uses small capital glyphs for \idx{lowercase} +characters. \Idx{uppercase} characters show as normal capitals. +This means that you need to use \idx{lowercase} characters in the +abbreviation. +\end{information} + +\cmddef{glsfirstabbrvscuserfont} +Formatting for the \qt{sc-user} short form shown on \idx{firstuse}. +This defaults to \gls{glsabbrvscuserfont}. + +\cmddef{glsxtrscuserrevert} +Counteracts the effect of \gls{glsabbrvscuserfont}. The default is +\gls{glsxtrscrevert}. If you redefine \gls{glsabbrvscuserfont}, you +will need to redefine \gls{glsxtrscuserrevert} as applicable. + +\cmddef{glsxtrscusersuffix} +Short plural suffix used by the \qt{sc-user} styles. This defaults to +\gls{glsxtrscsuffix}. + +\cmddef{glsuserdescription} +The description field is set to this, where the \meta{text} argument +is the long form, for the \qt{user} styles where the description is +set by default. This is defined to ignore its second argument: +\begin{codebox} +\cmd{newcommand}*\marg{\gls{glsuserdescription}}[2]\marg{\gls{glslonguserfont}\marg{\#1}} +\end{codebox} +If you want to include the information contained in the field +identified by \gls{glsxtruserfield}, the second argument provides a +way of accessing that field without relying on the \gls{glscurrententrylabel} +placeholder. For example: +\begin{codebox} +\cmd{renewcommand}*\marg{\gls{glsuserdescription}}[2]\marg{\% + \gls{glslonguserfont}\marg{\#1}\% + \gls{ifglshasfield}\marg{\gls{glsxtruserfield}}\marg{\#2}\% + \marg{, \gls{glscurrentfieldvalue}}\% + \marg{}\% +} +\end{codebox} + +\cmddef{glsxtruserparen} +If the field given by \gls{glsxtruserfield} has been set, this +essentially does: +\begin{compactcodebox} +\gls{glsxtrfullsep}\margm{entry-label}\gls{glsxtrparen}\marg{\meta{text}, \meta{user-value}} +\end{compactcodebox} +otherwise it does: +\begin{compactcodebox} +\gls{glsxtrfullsep}\margm{entry-label}\gls{glsxtrparen}\marg{\meta{text}} +\end{compactcodebox} +It's a little more complicated than this as the definition includes +the \idx{innerformatting} around the comma and the field value +(\meta{user-value}). The comma separator is given by +\gls{glsxtruserparensep}, and the field value is encapsulated with +\gls{glsxtruserfieldfmt} (with the \idx{innerformatting} inside). + +If you redefine this command, you will also need to redefine the +following one in a similar manner. + +\cmddef{GLSxtruserparen} +As above but the content of the field given by \gls{glsxtruserfield} +is converted to \idx{allcaps}. Note that simply applying an +\idx{uppercase} command to \gls{glsxtruserparen} can fail as +it can cause the label to be converted to \idx{allcaps}, which +is the reason why a separate command to internally perform the +case-change is provided. + +\cmddef{glsxtrlongshortuserdescname} +Expands to the value for the \gloskey{name} key for styles like +\abbrstyle{long-short-user-desc}. The default definition is: +\begin{codebox} +\cmd{protect}\gls{glslonguserfont}\marg{\cmd{the}\gls{glslongtok}}\% +\cmd{protect}\gls{glsxtruserparen} +\marg{\cmd{protect}\gls{glsabbrvuserfont}\marg{\cmd{the}\gls{glsshorttok}}}\marg{\cmd{the}\gls{glslabeltok}} +\end{codebox} + +\cmddef{glsxtrlongshortscusername} +Expands to the value for the \gloskey{name} key for styles like +\abbrstyle{long-postshort-sc-user} styles where the +description is automatically set. The default +definition is: +\begin{codebox} +\cmd{protect}\gls{glsabbrvscuserfont}\marg{\cmd{the}\gls{glsshorttok}} +\end{codebox} + +\cmddef{glsxtrlongshortscuserdescname} +Expands to the value for the \gloskey{name} key for styles like +\abbrstyle{long-postshort-sc-user-desc}. The default definition is: +\begin{codebox} +\cmd{protect}\gls{glslonguserfont}\marg{\cmd{the}\gls{glslongtok}}\% +\cmd{protect}\gls{glsxtruserparen} +\marg{\cmd{protect}\gls{glsabbrvscuserfont}\marg{\cmd{the}\gls{glsshorttok}}}\marg{\cmd{the}\gls{glslabeltok}} +\end{codebox} + +\cmddef{glsxtrshortlonguserdescname} +Expands to the value for the \gloskey{name} key for styles like +\abbrstyle{short-long-user-desc}. The default definition is: +\begin{codebox} +\cmd{protect}\gls{glsabbrvuserfont}\marg{\cmd{the}\gls{glsshorttok}}\% +\cmd{protect}\gls{glsxtruserparen} + \marg{\cmd{protect}\gls{glslonguserfont}\marg{\cmd{the}\gls{glslongpltok}}}\% + \marg{\cmd{the}\gls{glslabeltok}} +\end{codebox} + +\cmddef{glsxtruserlongshortformat} +This command is used on the \idx{firstuse} of \gls{gls} +or with \gls{glsxtrfull} by styles like +\abbrstyle{long-short-user} to format the long form followed by the +short form (with optional user information) in parentheses. The +default definition is: +\begin{codebox} +\cmd{newcommand}*\marg{\gls{glsxtruserlongshortformat}}[4]\marg{\% + \gls{glsxtrlongformat}\marg{\#1}\marg{\#2}\marg{\#3}\% + \gls{glsxtrusershortformat}\marg{\#1}\marg{\#4}\% +} +\end{codebox} + +\cmddef{Glsxtruserlongshortformat} +As above but for \idx{sentencecase}. + +\cmddef{GLSxtruserlongshortformat} +As above but for \idx{allcaps}. + +\cmddef{glsxtruserlongshortplformat} +This command is used on the \idx{firstuse} of \gls{glspl} +or with \gls{glsxtrfullpl} by styles like +\abbrstyle{long-short-user} to format the plural long form followed by the +plural short form (with optional user information) in parentheses. The +default definition is: +\begin{codebox} +\cmd{newcommand}*\marg{\gls{glsxtruserlongshortplformat}}[4]\marg{\% + \gls{glsxtrlongplformat}\marg{\#1}\marg{\#2}\marg{\#3}\% + \gls{glsxtrusershortplformat}\marg{\#1}\marg{\#4}\% +} +\end{codebox} + +\cmddef{Glsxtruserlongshortplformat} +As above but for \idx{sentencecase}. + +\cmddef{GLSxtruserlongshortplformat} +As above but for \idx{allcaps}. + +\cmddef{glsxtrusershortlongformat} +This command is used on the \idx{firstuse} of \gls{gls} +or with \gls{glsxtrfull} by styles like +\abbrstyle{short-long-user} to format the short form followed by the +long form (with optional user information) in parentheses. The +default definition is: +\begin{codebox} +\cmd{newcommand}*\marg{\gls{glsxtrusershortlongformat}}[4]\marg{\% + \gls{glsxtrshortformat}\marg{\#1}\marg{\#2}\marg{\#3}\% + \gls{glsxtruserlongformat}\marg{\#1}\marg{\#4}\% +} +\end{codebox} + +\cmddef{Glsxtrusershortlongformat} +As above but for \idx{sentencecase}. + +\cmddef{GLSxtrusershortlongformat} +As above but for \idx{allcaps}. + +\cmddef{glsxtrusershortlongplformat} +This command is used on the \idx{firstuse} of \gls{glspl} +or with \gls{glsxtrfullpl} by styles like +\abbrstyle{short-long-user} to format the plural short form followed by the +plural long form (with optional user information) in parentheses. The +default definition is: +\begin{codebox} +\cmd{newcommand}*\marg{\gls{glsxtrusershortlongplformat}}[4]\marg{\% + \gls{glsxtrshortplformat}\marg{\#1}\marg{\#2}\marg{\#3}\% + \gls{glsxtruserlongplformat}\marg{\#1}\marg{\#4}\% +} +\end{codebox} + +\cmddef{Glsxtrusershortlongplformat} +As above but for \idx{sentencecase}. + +\cmddef{GLSxtrusershortlongplformat} +As above but for \idx{allcaps}. + + +\cmddef{glsxtrusershortformat} +Used to format the singular short form in parentheses (with +\gls{glsxtruserparen}) on the \idx{firstuse} of \gls{gls} or +\gls{Gls} or with \gls{glsxtrfull} or \gls{Glsxtrfull} for styles like +\abbrstyle{long-short-user}. The default definition is: +\begin{codebox} +\cmd{newcommand}*\marg{\gls{glsxtrusershortformat}}[2]\marg{\% + \gls{glsxtruserparen}\marg{\gls{glsxtrshortformat}\marg{\#1}\marg{}\marg{\#2}}\marg{\#1}\% +} +\end{codebox} + +\cmddef{glsxtrusershortplformat} +As \gls{glsxtrusershortformat} but for the \idx{firstuse} of +\gls{glspl} or with \gls{glsxtrfull} for styles like +\abbrstyle{long-short-user}. This has a similar definition +to the above but with \gls{glsxtrshortplformat}. + +\cmddef{GLSxtrusershortformat} +As \gls{glsxtrusershortformat} but is used with the \idx{allcaps} +\gls{GLS} or \gls{GLSxtrfull}. This uses \gls{GLSxtruserparen} +instead of \gls{glsxtruserparen}. + +\cmddef{GLSxtrusershortplformat} +As \gls{glsxtrusershortplformat} but is used with the \idx{allcaps} +\gls{GLSpl} or \gls{GLSxtrfullpl}. This uses \gls{GLSxtruserparen} +instead of \gls{glsxtruserparen}. + +\cmddef{glsxtrpostusershortformat} +Used in the \idx{postlinkhook} to format the short form in +parentheses for styles like \abbrstyle{long-postshort-user}. The default +definition is: +\begin{codebox} +\cmd{newcommand}*\marg{\gls{glsxtrpostusershortformat}}[2]\marg{\% + \gls{glsxtrifallcaps} + \marg{\gls{GLSxtrusershortformat}\marg{\#1}\marg{\#2}}\% + \marg{\gls{glsxtrusershortformat}\marg{\#1}\marg{\#2}}\% +} +\end{codebox} +Note that this doesn't check if the plural form was used. If you +require this, you will need to redefined this command to include +\gls{glsifplural}: +\begin{codebox} +\cmd{renewcommand}*\marg{\gls{glsxtrpostusershortformat}}[2]\marg{\% + \gls{glsifplural} + \marg{\% + \gls{glsxtrifallcaps} + \marg{\gls{GLSxtrusershortplformat}\marg{\#1}\marg{\#2}}\% + \marg{\gls{glsxtrusershortplformat}\marg{\#1}\marg{\#2}}\% + }\% + \marg{\% + \gls{glsxtrifallcaps} + \marg{\gls{GLSxtrusershortformat}\marg{\#1}\marg{\#2}}\% + \marg{\gls{glsxtrusershortformat}\marg{\#1}\marg{\#2}}\% + }\% +} +\end{codebox} + +\cmddef{glsxtruserlongformat} +Used to format the singular long form in parentheses (with +\gls{glsxtruserparen}) on the \idx{firstuse} of \gls{gls} or +\gls{Gls} or with \gls{glsxtrfull} for styles like +\abbrstyle{short-long-user}. The default definition is: +\begin{codebox} +\cmd{newcommand}*\marg{\gls{glsxtruserlongformat}}[2]\marg{\% + \gls{glsxtruserparen}\marg{\gls{glsxtrlongformat}\marg{\#1}\marg{}\marg{\#2}}\marg{\#1}\% +} +\end{codebox} + +\cmddef{GLSxtruserlongformat} +As \gls{glsxtruserlongformat} but \idx{allcaps}. This uses \gls{GLSxtruserparen} +instead of \gls{glsxtruserparen}. + +\cmddef{glsxtruserlongplformat} +As \gls{glsxtruserlongformat} but for the \idx{firstuse} of +\gls{glspl} or with \gls{glsxtrfull} for styles like +\abbrstyle{short-long-user}. This has a similar definition +to \gls{glsxtruserlongformat} but with \gls{glsxtrlongplformat}. + +\cmddef{GLSxtruserlongplformat} +As \gls{glsxtruserlongplformat} but \idx{allcaps}. This uses \gls{GLSxtruserparen} +instead of \gls{glsxtruserparen}. + +\cmddef{glsxtrpostuserlongformat} +Used in the \idx{postlinkhook} to format the long form in +parentheses for styles like \abbrstyle{short-postlong-user}. The default +definition is: +\begin{codebox} +\cmd{newcommand}*\marg{\gls{glsxtrpostuserlongformat}}[2]\marg{\% + \gls{glsxtrifallcaps} + \marg{\gls{GLSxtruserlongformat}\marg{\#1}\marg{\#2}}\% + \marg{\gls{glsxtruserlongformat}\marg{\#1}\marg{\#2}}\% +} +\end{codebox} +Note that, as with \gls{glsxtrpostusershortformat}, this doesn't +check if the plural form was used. If you require this, you will +need to redefined this command to include \gls{glsifplural}. + +\paragraph{Footnote Styles} +\label{sec:abbrvcmdsfootnote}These commands are only used by the footnote styles. + +\cmddef{glsxtrfootnotename} +This command should expand to the value of the \gloskey{name} key. +The default definition is: +\begin{codebox} +\gls{glsxpabbrvfont}\marg{\cmd{the}\gls{glsshorttok}}\marg{\gls{glscategorylabel}} +\end{codebox} + +\cmddef{glsxtrfootnotedescname} +This command should expand to the value of the \gloskey{name} key +for styles like \abbrstyle{footnote-desc}. +The default definition is: +\begin{codebox} +\gls{glsxpabbrvfont}\marg{\cmd{the}\gls{glsshorttok}}\marg{\gls{glscategorylabel}}\% +\cmd{protect}\gls{glsxtrfullsep}\marg{\cmd{the}\gls{glslabeltok}}\% +\cmd{protect}\gls{glsxtrparen} + \marg{\gls{glsxplongfont}\marg{\cmd{the}\gls{glslongtok}}\marg{\gls{glscategorylabel}}}\% +\end{codebox} + +\cmddef{glsxtrfootnotedescsort} +This command should expand to the value of the \gloskey{sort} key +for styles like \abbrstyle{footnote-desc}. +The default definition is simply \code{\cmd{the}\gls{glsshorttok}}. + +\begin{information} +This command is irrelevant with the \idx{unsrtfam}. +\end{information} + +\cmddef{glslongfootnotefont} +The formatting command used for the long form in the footnote +styles. The default is to simply use \gls{glslongdefaultfont}. + +\cmddef{glsfirstlongfootnotefont} +The formatting command used for the \idx{firstuse} long form in the footnote +styles. The default is to simply use \gls{glslongfootnotefont}. + +\cmddef{glsxtrabbrvfootnote} +The command that produces the footnote. The default definition +ignores the first argument: +\begin{codebox} +\cmd{newcommand}*\marg{\gls{glsxtrabbrvfootnote}}[2]\marg{\gls{footnote}\marg{\#2}} +\end{codebox} + + +\cmddef{glsxtrfootnotelongformat} +This command is used within the footnote to display the long form +formatted with \meta{fmt-cs} for the footnote styles on +\idx{firstuse} of \gls{gls}, \gls{Gls} and \gls{GLS}. The default definition is simply: +\begin{codebox} +\cmd{newcommand}*\marg{\gls{glsxtrfootnotelongformat}}[2]\marg{\% + \gls{glsxtrlongformat}\marg{\#1}\marg{}\marg{\#2}\% +} +\end{codebox} +For example, if the footnote should start with an \idx{uppercase} +letter then simply redefine this to use \gls{Glsxtrlongformat} +instead: +\begin{codebox} +\cmd{renewcommand}*\marg{\gls{glsxtrfootnotelongformat}}[2]\marg{\% + \gls{Glsxtrlongformat}\marg{\#1}\marg{}\marg{\#2}\% +} +\end{codebox} + +\cmddef{glsxtrfootnotelongplformat} +This command is used within the footnote to display the plural long form +formatted with \meta{fmt-cs} for the footnote styles on +\idx{firstuse} of \gls{glspl}, \gls{Glspl} and \gls{GLSpl}. +The default definition is simply: +\begin{codebox} +\cmd{newcommand}*\marg{\gls{glsxtrfootnotelongplformat}}[2]\marg{\% + \gls{glsxtrlongplformat}\marg{\#1}\marg{}\marg{\#2}\% +} +\end{codebox} + +\cmddef{glsxtrpostfootnotelongformat} +This command is used for the \qt{postfootnote} styles. This is +simply defined to do \gls{glsxtrfootnotelongformat}. Note that +there's no plural equivalent as the \qt{postfootnote} styles don't +check if the plural command (\gls{glspl} etc) was used. + +\paragraph{No-Long Styles} +\label{sec:abbrvcmdsnolong}These commands are used by the +\qt{nolong} styles. + +\cmddef{glsxtrshortnolongname} +This command should expand to the value of the \gloskey{name} key +for styles like \abbrstyle{short-nolong}. +The default definition is: +\begin{codebox} +\gls{glsxpabbrvfont}\marg{\cmd{the}\gls{glsshorttok}}\marg{\gls{glscategorylabel}} +\end{codebox} + +\cmddef{glsxtrshortdescname} +This command should expand to the value of the \gloskey{name} key +for styles like \abbrstyle{short-nolong-desc}. +The default definition is: +\begin{codebox} +\gls{glsxpabbrvfont}\marg{\cmd{the}\gls{glsshorttok}}\marg{\gls{glscategorylabel}}\% +\cmd{protect}\gls{glsxtrfullsep}\marg{\cmd{the}\gls{glslabeltok}}\% +\cmd{protect}\gls{glsxtrparen} + \marg{\gls{glsxplongfont}\marg{\cmd{the}\gls{glslongtok}}\marg{\gls{glscategorylabel}}}\% +\end{codebox} + +\paragraph{No-Short Styles} +\label{sec:abbrvcmdsnoshort}These commands are used by the +\qt{noshort} styles. -\item[{\pkgoptdef{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. +\cmddef{glsxtrlongnoshortdescname} +This command should expand to the value of the \gloskey{name} key +for styles like \abbrstyle{long-noshort-desc}. +The default definition is: +\begin{codebox} +\gls{glsxplongfont}\marg{\cmd{the}\gls{glslongtok}}\marg{\gls{glscategorylabel}} +\end{codebox} -If \sty{glossaries-extra-bib2gls} is also loaded then this option -will additionally provide: -\begin{definition}[\DescribeMacro\printunsrtsymbols] -\cs{printunsrtsymbols}\oarg{options} -\end{definition} -which uses \ics{printunsrtglossary}. - -\item[{\pkgoptdef{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} +\cmddef{glsxtrlongnoshortname} +This command should expand to the value of the \gloskey{name} key +for styles like \abbrstyle{long-noshort}. +The default definition is: +\begin{codebox} +\gls{glsxpabbrvfont}\marg{\cmd{the}\gls{glsshorttok}}\marg{\gls{glscategorylabel}} +\end{codebox} + +\paragraph{Hyphen Styles} +\label{sec:abbrvcmdshyphen}These are commands used by the \qt{hyphen} +styles. They are designed to work with the \catattr{markwords} +and \catattr{markshortwords} attributes. + +\cmddef{glsabbrvhyphenfont} +The formatting command used for the short form in the hyphen +styles. The default is to simply use \gls{glsabbrvdefaultfont}. + +\cmddef{glsfirstabbrvhyphenfont} +The formatting command used for the short form in the hyphen +styles on \idx{firstuse}. The default is to simply use +\gls{glsabbrvhyphenfont}. + +\cmddef{glslonghyphenfont} +The formatting command used for the long form in the hyphen +styles. The default is to simply use \gls{glslongdefaultfont}. + +\cmddef{glsfirstlonghyphenfont} +The formatting command used for the long form in the hyphen +styles on \idx{firstuse}. The default is to simply use +\gls{glslonghyphenfont}. + +\cmddef{glsxtrhyphensuffix} +Short plural suffix used by the \qt{hyphen} styles. This defaults to +\gls{glsxtrabbrvpluralsuffix}. + +\cmddef{glsxtrlonghyphenshortsort} +Expands to the sort value for the styles like \abbrstyle{long-hyphen-short-hyphen}. +This defaults to the original short value (\gls{glsxtrorgshort}). +This command is irrelevant with the \idx{unsrtfam}. + +\cmddef{glsxtrshorthyphenlongsort} +Expands to the sort value for the styles like \abbrstyle{short-hyphen-long-hyphen}. +This defaults to the original short value (\gls{glsxtrorgshort}). +This command is irrelevant with the \idx{unsrtfam}. + +\cmddef{glsxtrlonghyphennoshortsort} +Expands to the sort value for the styles like +\abbrstyle{long-hyphen-noshort-noreg}. +This defaults to the original short value (\gls{glsxtrorgshort}). +This command is irrelevant with the \idx{unsrtfam}. + +\cmddef{glsxtrlonghyphennoshortdescsort} +Expands to the sort value for the styles like +\abbrstyle{long-hyphen-noshort-desc-noreg}. +This defaults to the original long value (\gls{glsxtrorglong}). +This command is irrelevant with the \idx{unsrtfam}. + +\cmddef{glsxtrlonghyphenshort} +Formats the long and short form for the full or \idx{firstuse} +\abbrstyle{long-hyphen-short-hyphen} style. This uses +\gls{glsxtrifhyphenstart} to test if the \meta{insert} starts with a +hyphen. If it does, \gls{glsxtrwordsep} is locally set to +\gls{glsxtrwordsephyphen} to replace the inter-word spaces with +hyphens. The short form is placed in parentheses with +\gls{glsxtrparen}, preceded by the \gls{glsxtrfullsep} separator. +The \meta{insert} is placed after both the long and the short form. + +\cmddef{GLSxtrlonghyphenshort} +As above, but the \meta{insert} is converted to \idx{allcaps}. The +\meta{short} and \meta{long} arguments should be supplied as +\idx{allcaps}. Note that it's not possible to simply do +\gls{glsxtrlonghyphenshort} with +\code{\gls{MakeUppercase}\margm{insert}} as the argument as this +will interfere with the check to determine if \meta{insert} starts +with a hyphen. + +\cmddef{glsxtrlonghyphennoshort} +Formats the long form for the full or \idx{firstuse} +\abbrstyle{long-hyphen-noshort-desc-noreg} style. This uses +\gls{glsxtrifhyphenstart} to test if the \meta{insert} starts with a +hyphen. If it does, \gls{glsxtrwordsep} is locally set to +\gls{glsxtrwordsephyphen} to replace the inter-word spaces with +hyphens. The \meta{insert} is placed after the long form. + +\cmddef{GLSxtrlonghyphennoshort} +As above but converts \meta{insert} to \idx{allcaps}. The +\meta{long} argument should already be in \idx{allcaps}. + Note that it's not possible to simply do +\gls{glsxtrlonghyphennoshort} with +\code{\gls{MakeUppercase}\margm{insert}} as the argument as this +will interfere with the check to determine if \meta{insert} starts +with a hyphen. + +\cmddef{glsxtrlonghyphen} +Formats the long form for the full or \idx{firstuse} +\abbrstyle{long-hyphen-postshort-hyphen} style. This is similar to +the above, but the \meta{insert} argument is only used to check if +it starts with a hyphen. The actual \meta{insert} is placed in the +\idx{postlinkhook}. + +\cmddef{xpglsxtrposthyphenshort} +This command is used in the \idx{postlinkhook} for the +\abbrstyle{long-hyphen-postshort-hyphen} style on \idx{firstuse}. +It expands the placeholder commands (\gls{glslabel} and \gls{glsinsert}) +and uses \gls{GLSxtrposthyphenshort} for \idx{allcaps} or +\gls{glsxtrposthyphenshort} otherwise. Note that this doesn't show +the plural by default. If you require the plural form, you need to +redefine this to add a check with \gls{glsifplural}: +\begin{codebox} +\cmd{newcommand}*\marg{\gls{xpglsxtrposthyphenshort}}\marg{\% + \gls{glsifplural} + \marg{\% + \gls{glsxtrifallcaps} + \marg{\% + \gls{expandafter}\gls{GLSxtrposthyphenshortpl}\gls{expandafter}\gls{glslabel} + \gls{expandafter}\marg{\gls{glsinsert}}\% + }\% + \marg{\% + \gls{expandafter}\gls{glsxtrposthyphenshortpl}\gls{expandafter}\gls{glslabel} + \gls{expandafter}\marg{\gls{glsinsert}}\% + }\% + }\% + \marg{\% + \gls{glsxtrifallcaps} + \marg{\% + \gls{expandafter}\gls{GLSxtrposthyphenshort}\gls{expandafter}\gls{glslabel} + \gls{expandafter}\marg{\gls{glsinsert}}\% + }\% + \marg{\% + \gls{expandafter}\gls{glsxtrposthyphenshort}\gls{expandafter}\gls{glslabel} + \gls{expandafter}\marg{\gls{glsinsert}}\% + }\% + }\% +} +\end{codebox} + +\cmddef{glsxtrposthyphenshort} +If \meta{insert} starts with a hyphen, \gls{glsxtrwordsep} is locally set to +\gls{glsxtrwordsephyphen} to replace the inter-word spaces with +hyphens. The \meta{insert} encapsulated with +\gls{glsfirstlonghyphenfont} is then done (to complete the long +form, which has already been displayed with \gls{glsxtrlonghyphen} +in the \idx{linktext}). Then the short form followed by the +\meta{insert} is placed in parentheses (with \gls{glsxtrparen} +preceded by \gls{glsxtrfullsep}). + +\cmddef{GLSxtrposthyphenshort} +As above but \idx{allcaps}. + +\cmddef{glsxtrposthyphenshortpl} +As \gls{glsxtrposthyphenshort} but plural. + +\cmddef{GLSxtrposthyphenshortpl} +As above but \idx{allcaps}. + +\cmddef{xpglsxtrposthyphensubsequent} +This command is used in the \idx{postlinkhook} for the +\abbrstyle{long-hyphen-postshort-hyphen} style on \idx{subsequentuse}. +It expands the placeholder commands (\gls{glslabel} and \gls{glsinsert}) +and uses \gls{GLSxtrposthyphensubsequent} for \idx{allcaps} or +\gls{glsxtrposthyphensubsequent} otherwise. + +\cmddef{glsxtrposthyphensubsequent} +This command is used in the \idx{postlinkhook} for the +\abbrstyle{long-hyphen-postshort-hyphen} style on \idx{subsequentuse}. +Only the \meta{insert} is done. + +\cmddef{GLSxtrposthyphensubsequent} +As above but \idx{allcaps}. + +\cmddef{glsxtrshorthyphenlong} +Formats the short and long form for the full or \idx{firstuse} +\abbrstyle{short-hyphen-long-hyphen} style. Similar to +\gls{glsxtrlonghyphenshort} but the short and long forms are +swapped. + +\cmddef{GLSxtrshorthyphenlong} +As above, but the \meta{insert} is converted to \idx{allcaps}. The +\meta{short} and \meta{long} arguments should be supplied as +\idx{allcaps}. Note that it's not possible to simply do +\gls{glsxtrshorthyphenlong} with +\code{\gls{MakeUppercase}\margm{insert}} as the argument as this +will interfere with the check to determine if \meta{insert} starts +with a hyphen. + +\cmddef{glsxtrshorthyphen} +Formats the short form for the full or \idx{firstuse} +\abbrstyle{short-hyphen-postlong-hyphen} style. The \meta{insert} +argument is only used to check if it starts with a hyphen. The +actual \meta{insert} is placed in the \idx{postlinkhook}. + +\cmddef{xpglsxtrposthyphenlong} +This command is used in the \idx{postlinkhook} for the +\abbrstyle{short-hyphen-postlong-hyphen} style on \idx{firstuse}. +It expands the placeholder commands (\gls{glslabel} and \gls{glsinsert}) +and uses \gls{GLSxtrposthyphenlong} for \idx{allcaps} or +\gls{glsxtrposthyphenlong} otherwise. Note that this doesn't show +the plural by default. If you require the plural form, you need to +redefine this to add a check with \gls{glsifplural}: +\begin{codebox} +\cmd{newcommand}*\marg{\gls{xpglsxtrposthyphenlong}}\marg{\% + \gls{glsifplural} + \marg{\% + \gls{glsxtrifallcaps} + \marg{\% + \gls{expandafter}\gls{GLSxtrposthyphenlongpl}\gls{expandafter}\gls{glslabel} + \gls{expandafter}\marg{\gls{glsinsert}}\% + }\% + \marg{\% + \gls{expandafter}\gls{glsxtrposthyphenlongpl}\gls{expandafter}\gls{glslabel} + \gls{expandafter}\marg{\gls{glsinsert}}\% + }\% + }\% + \marg{\% + \gls{glsxtrifallcaps} + \marg{\% + \gls{expandafter}\gls{GLSxtrposthyphenlong}\gls{expandafter}\gls{glslabel} + \gls{expandafter}\marg{\gls{glsinsert}}\% + }\% + \marg{\% + \gls{expandafter}\gls{glsxtrposthyphenlong}\gls{expandafter}\gls{glslabel} + \gls{expandafter}\marg{\gls{glsinsert}}\% + }\% + }\% +} +\end{codebox} + +\cmddef{glsxtrposthyphenlong} +This command is used in the \idx{postlinkhook} for the +\abbrstyle{short-hyphen-postlong-hyphen} style on \idx{firstuse}. +Similar to \gls{glsxtrposthyphenshort} but shows the long form instead of +the short form. + +\cmddef{GLSxtrposthyphenlong} +As above but \idx{allcaps}. + +\cmddef{glsxtrposthyphenlongpl} +As \gls{glsxtrposthyphenlong} but plural. + +\cmddef{GLSxtrposthyphenlongpl} +As above but \idx{allcaps}. + +\paragraph{Only Styles} +\label{sec:abbrvcmdsonly}These are commands used by the \qt{only} +styles, such as \abbrstyle{long-only-short-only}. + +\cmddef{glsabbrvonlyfont} +The formatting command used for the short form in the only +styles. The default is to simply use \gls{glsabbrvdefaultfont}. + +\cmddef{glsfirstabbrvonlyfont} +The formatting command used for the short form in the only +styles on \idx{firstuse}. The default is to simply use +\gls{glsabbrvonlyfont}. + +\cmddef{glslongonlyfont} +The formatting command used for the long form in the only +styles. The default is to simply use \gls{glslongdefaultfont}. + +\cmddef{glsfirstlongonlyfont} +The formatting command used for the long form in the only +styles on \idx{firstuse}. The default is to simply use +\gls{glslongonlyfont}. + +\cmddef{glsxtronlysuffix} +Short plural suffix used by the \qt{only} styles. This defaults to +\gls{glsxtrabbrvpluralsuffix}. + +\cmddef{glsabbrvsconlyfont} +The formatting command used for the short form in the \qt{sc-only} +styles. The default is to simply use \gls{glsabbrvscfont}. + +\cmddef{glsfirstabbrvsconlyfont} +The formatting command used for the short form in the \qt{sc-only} +styles on \idx{firstuse}. The default is to simply use +\gls{glsabbrvsconlyfont}. + +\cmddef{glsxtrsconlyrevert} +Counteracts the effect of \gls{glsabbrvsconlyfont}. The default is +\gls{glsxtrscrevert}. If you redefine \gls{glsabbrvsconlyfont}, you +will need to redefine \gls{glsxtrsconlyrevert} as applicable. + +\cmddef{glsxtrsconlysuffix} +Short plural suffix used by the \qt{sc-only} styles. This defaults to +\gls{glsxtrscsuffix}. + +\cmddef{glsxtronlyname} +Expands to the value for the \gloskey{name} key for the \qt{only} +styles. The default definition is: +\begin{codebox} +\cmd{protect}\gls{glsabbrvonlyfont}\marg{\cmd{the}\gls{glsshorttok}} +\end{codebox} + +\cmddef{glsxtronlydescname} +Expands to the value for the \gloskey{name} key for the \qt{only} +styles where the description should be described, such as +\abbrstyle{long-only-short-only-desc}. The default definition is: +\begin{codebox} +\cmd{protect}\gls{glslongfont}\marg{\cmd{the}\gls{glslongtok}} +\end{codebox} + +\cmddef{glsxtronlydescsort} +Expands to the value for the \gloskey{sort} key for the \qt{only} +styles where the description should be described, such as +\abbrstyle{long-only-short-only-desc}. The default definition is +\code{\cmd{the}\gls{glslongtok}}. + +\begin{information} +This command is irrelevant with the \idx{unsrtfam}. +\end{information} + +\cmddef{glsxtrsconlyname} +Expands to the value for the \gloskey{name} key for the \qt{sc-only} +styles. The default definition is: +\begin{codebox} +\cmd{protect}\gls{glsabbrvsconlyfont}\marg{\cmd{the}\gls{glsshorttok}} +\end{codebox} + +\cmddef{glsxtrsconlydescname} +Expands to the value for the \gloskey{name} key for the \qt{sc-only} +styles where the description should be described. The default definition is +to simply use \gls{glsxtronlydescname}. + +\cmddef{glsxtrsconlydescsort} +Expands to the value for the \gloskey{sort} key for the \qt{sc-only} +styles where the description should be described, such as +\abbrstyle{long-only-short-only-desc}. The default definition is +to simply use \gls{glsxtronlydescsort}. + +\begin{information} +This command is irrelevant with the \idx{unsrtfam}. +\end{information} + +\paragraph{Fonts} +\label{sec:abbrvcmdsfonts}These are commands used by styles that +use a particular font shape or size, identified by one of the +following two-letter tags: \qt{sc} (\gls{textsc}), \qt{sm} (\gls{textsmaller}) +or \qt{em} (\gls{emph}). + +\begin{information} +For the \qt{sc-user} styles, see \sectionref{sec:abbrvcmdsuser}. +For the \qt{sc-only} styles, see \sectionref{sec:abbrvcmdsonly}. +\end{information} + +\cmddef{glsabbrvscfont} +Formatting for the \qt{sc} short form. This uses \gls{textsc} to +apply a \idx{smallcaps} style, so your document font needs to +support it. + +\begin{information} +\gls{textsc} uses small capital glyphs for \idx{lowercase} +characters. \Idx{uppercase} characters show as normal capitals. +This means that you need to use \idx{lowercase} characters in the +abbreviation. +\end{information} + +\cmddef{glsfirstabbrvscfont} +Formatting for the \qt{sc} short form shown on \idx{firstuse}. +This defaults to \gls{glsabbrvscfont}. + +\cmddef{glsxtrscrevert} +Counteracts the effect of \gls{glsabbrvscfont}. This defaults to +\gls{glstextup}. If you redefine \gls{glsabbrvscfont}, you +will need to redefine \gls{glsxtrscrevert} as applicable. + +\cmddef{glsxtrscsuffix} +Short plural suffix used by the \qt{sc} styles. This needs to +counteract the smallcaps, so it's defined as: +\begin{codebox} +\cmd{protect}\gls{glstextup}{\gls{glsxtrabbrvpluralsuffix}} +\end{codebox} + +\cmddef{glsabbrvsmfont} +Formatting for the \qt{sm} short form. This uses \gls{textsmaller}, +which is defined by the \sty{relsize} package. You will need to +load that package if you want to use any of the \qt{sm} styles. + +\begin{information} +\gls{textsmaller} reduces the font size, so if you want to use it to +simulate \idx{smallcaps}, you need to use \idx{uppercase} characters +in the abbreviation. +\end{information} + +\cmddef{glsfirstabbrvsmfont} +Formatting for the \qt{sm} short form shown on \idx{firstuse}. +This defaults to \gls{glsabbrvsmfont}. + +\cmddef{glsxtrsmrevert} +Counteracts the effect of \gls{glsabbrvsmfont}. This defaults to +\gls{textlarger}. If you redefine \gls{glsabbrvsmfont}, you +will need to redefine \gls{glsxtrsmrevert} as applicable. + +\cmddef{glsxtrsmsuffix} +Short plural suffix used by the \qt{sm} styles. This defaults to +\gls{glsxtrabbrvpluralsuffix}. + +\cmddef{glsabbrvemfont} +Formatting for the \qt{em} short form. This uses \gls{emph}. + +\cmddef{glsfirstabbrvemfont} +Formatting for the \qt{em} short form shown on \idx{firstuse}. +This defaults to \gls{glsabbrvemfont}. + +\cmddef{glsxtremrevert} +Counteracts the effect of \gls{glsabbrvemfont}. This defaults to +\gls{textup}. If you redefine \gls{glsabbrvemfont}, you +will need to redefine \gls{glsxtremrevert} as applicable. + +\cmddef{glsxtremsuffix} +Short plural suffix used by the \qt{em} styles. This defaults to +\gls{glsxtrabbrvpluralsuffix}. + +\cmddef{glslongemfont} +Formatting for the \qt{em} long form. This uses \gls{emph}. + +\cmddef{glsfirstlongemfont} +Formatting for the \qt{em} short form shown on \idx{firstuse}. +This defaults to \gls{glslongemfont}. + +\subsection{Advanced Style Commands} +\label{sec:advancedabbrstylecmds} + +These commands should typically not be needed in a document, but are +provided for advanced users. See \sectionref{sec:abbrvcmds} +for commands to adjust the predefined abbreviation styles. + +\cmddef{glssetabbrvfmt} +Sets the current formatting commands +(\sectionref{sec:abbrstylefmts}) associated with the abbreviation +style associated with the given category. That is, the command +redefinitions provided in the third argument (\meta{display +definitions}) of \gls{newabbreviationstyle} are applied. + +If no abbreviation style has been set for the given category, the +style associated with the \cat{abbreviation} category is used. + +This command is used: +\begin{itemize} +\item At the start of \gls{glsentryfmt} if the +current entry has the \gloskey{short} field set. This ensures that the +\idx{glslike} commands use the appropriate formatting. + +\item At the start of +\gls{glsxtrassignfieldfont} if the current entry has the +\gloskey{short} field set. This ensures that the +\idx{glslike} commands use the appropriate formatting (where +possible). + +\item At the start of \gls{glsxtrshort}, \gls{glsxtrlong}, \gls{glsxtrfull} +and their plural and case-changing variants. + +\item At the start of \gls{glossentryname}, +\gls{glossentrynameother}, \gls{glossentrydesc}, +\gls{Glossentrydesc}, \gls{glossentrysymbol} and \gls{Glossentrysymbol}. +\end{itemize} -If \sty{glossaries-extra-bib2gls} is also loaded then this option -will additionally provide: -\begin{definition}[\DescribeMacro\printunsrtnumbers] -\cs{printunsrtnumbers}\oarg{options} -\end{definition} -which uses \ics{printunsrtglossary}. - -\item[{\pkgoptdef{acronyms} (or \pkgoptdef{acronym})}] This is -passed to \styfmt{glossaries} but if -\sty{glossaries-extra-bib2gls} is also loaded then this option -will additionally provide: -\begin{definition}[\DescribeMacro\printunsrtacronyms] -\cs{printunsrtacronyms}\oarg{options} -\end{definition} -which uses \ics{printunsrtglossary}. +\cmddef{glsuseabbrvfont} +A robust command that applies the abbreviation font for the given +category to the supplied text. -\begin{important} -This option defines a new glossary with the label \texttt{acronym} -not \texttt{acronyms}. You may find it easier to reference it -with the command \ics{acronymtype}. -\end{important} +\cmddef{glsuselongfont} +A robust command that applies the long font for the given +category to the supplied text. -\item[{\pkgoptdef{index}}] This is -passed to \styfmt{glossaries} but if -\sty{glossaries-extra-bib2gls} is also loaded then this option -will additionally provide: -\begin{definition}[\DescribeMacro\printunsrtindex] -\cs{printunsrtindex}\oarg{options} -\end{definition} -which uses \ics{printunsrtglossary}. +\cmddef{GlsXtrUseAbbrStyleSetup} +This implements the given abbreviation style's setup code. +Note that this expects the placeholder macros and token registers to +be set. This may be used in the \meta{setup} of +\gls{newabbreviationstyle} to inherit the setup code of a related +style. -\item[{\pkgoptdef{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}). Note that the short and long forms don't - use \cs{glsxtrshort} and \cs{glsxtrlong} but use the original - \cs{acrshort} and \cs{acrlong}, which don't recognise multiple - abbreviation styles. The better option with \styfmt{glossaries-extra} - is \pkgopt[ac]{shortcuts}. - - \item \pkgopt[ac]{shortcuts}: - set the shortcuts provided by the \styfmt{glossaries} package for - acronyms (such as \cs{ac}) but uses the \styfmt{glossaries-extra} - interface (such as \cs{glsxtrshort} rather than \cs{acrshort}). - In this case \cs{ac} is defined as \cs{cgls} rather than - \cs{gls}. - - \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}): - implements \pkgopt[ac]{shortcuts}, \pkgopt[abbreviations]{shortcuts} - and \pkgopt[other]{shortcuts}. - - \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. +\cmddef{GlsXtrUseAbbrStyleFmts} +This implements the given abbreviation style's display +definitions code. This may be used in the \meta{display +definitions} of \gls{newabbreviationstyle} to inherit the formatting +of a related style. + +\cmddef{xpglsxtrpostabbrvfootnote} +This is used by styles like \abbrstyle{postfootnote} to ensure that +the label and inner and outer formatting are expanded before being +passed to \gls{glsxtrpostabbrvfootnote}, otherwise they may lose +their definitions before the footnote text is typeset. + +\cmddef{glsxtrpostabbrvfootnote} +This is used by the footnote styles that defer the footnote to the +\idx{postlinkhook}. The default definition is: +\begin{codebox} +\cmd{newrobustcmd}*\marg{\gls{glsxtrpostabbrvfootnote}}[2]\marg{\% + \gls{glsxtrabbrvfootnote}\marg{\#1}\% + \marg{\#2\gls{glsxtrpostfootnotelongformat}\marg{\#1}\marg{\gls{glsfirstlongfootnotefont}}}\% +} +\end{codebox} +The second argument will be the expansion of +\gls{glsxtrassignlinktextfmt}, to allow the \idx{innerformatting} +to be picked up, if required. -\end{description} +\cmddef{glsxtrifhyphenstart} +This command is used by the hyphen styles to determine if the insert +material starts with a hyphen. Does \meta{true} if \meta{text} +starts with a hyphen otherwise does \meta{false}. -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} - -\section{Defining Entries} -\label{sec:definingentries} - -The \styfmt{glossaries} package provides \ics{nopostdesc} -which may be used in the \gloskey{description} to suppress -the post-description hook. The \styfmt{glossaries-extra} package -provides another command -\begin{definition}[\DescribeMacro\glsxtrnopostpunc] -\cs{glsxtrnopostpunc} -\end{definition} -which has a similar function but only suppresses the -post-description punctuation. It doesn't suppress the use of -\cs{glsxtrpostdescription} which allows the use of -category-dependent post-description hooks. (Note that the -punctuation, which is in the original base hook \cs{glspostdescription}, -comes after the extended post-description hook -\cs{glsxtrpostdescription} not before.) The post-description hook -can counter-act the effect of \cs{glsxtrnopostpunc} using -\begin{definition}[\DescribeMacro\glsxtrrestorepostpunc] -\cs{glsxtrrestorepostpunc} -\end{definition} -These commands have no effect outside of the glossary (except with -standalone entries that use \cs{glsxtractivatenopost} and -\cs{glspostdescription}, see \sectionref{sec:glossentry}). +\cmddef{GlsXtrWarnDeprecatedAbbrStyle} +This command is used to generate a warning (with \gls{GlossariesExtraWarning}) +if a deprecated abbreviation style is used. -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. +\subsection{Defining New Abbreviation Styles} +\label{sec:newabbrvstyle} -The \cs{newglossaryentry} command has three 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. -\item \gloskey{seealso}, which performs much like \gloskey{see}, but -allows for separate \qt{see} and \qt{see also} treatment. -See \sectionref{sec:see} for further details. -\end{itemize} -This apply to all entry defining commands (such as -\cs{newabbreviation}). - -The test file \nolinkurl{example-glossaries-xr.tex} contains -dummy entries with a mixture of \gloskey{see}, \gloskey{alias} -and \gloskey{seealso} keys for use with minimal working examples. -There are also \nolinkurl{example-glossaries-*.bib} files that -correspond to each \nolinkurl{example-glossaries-*.tex} file -for testing \gls{bib2gls}. - -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. - -This command is not permitted with the \pkgopt[only]{record} -package option. Without the optional argument, it's required -with \pkgopt[hybrid]{record}. With the optional argument, -it's only permitted with the default \pkgopt[off]{record}. - -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.) +If none of the predefined styles suit your requirements, you can +define your own custom style using: +\cmddef{newabbreviationstyle} +The first argument is the style name. This is used internally to +form control sequences, so the name shouldn't contain any special +characters. -\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} +The second argument sets up the information that's required when an +abbreviation is defined (which is why the style must be set before +the abbreviations with that style are defined). The relevant +commands for this argument are listed in +\sectionref{sec:abbrstyleinit}. + +The third argument defines the commands that determine how +the display style (\gls{gls}) and the inline style +(\gls{glsxtrfull}) are formatted. The relevant +commands for this argument are listed in +\sectionref{sec:abbrstylefmts}. + +\cmddef{renewabbreviationstyle} +Redefines an existing abbreviation style. + +\cmddef{letabbreviationstyle} +Defines a synonym of an existing abbreviation style. + +\subsubsection{Style Initialisation Hooks} +\label{sec:abbrstyleinit} + +The style initialisation hooks should be placed in the second +argument (\meta{setup}) of \gls{newabbreviationstyle}. They ensure +that all the fields are correctly initialised when the entry is +defined with the underlying \gls{newglossaryentry} command. They may +also be used to set category attributes. + +The following is prepended to \meta{setup} to initialise the final +hook: +\begin{codebox} +\cmd{renewcommand}*\marg{\gls{GlsXtrPostNewAbbreviation}}\marg{} +\end{codebox} + +When an entry is defined with \gls{newabbreviation}, the following +steps are performed: +\begin{enumerate} +\item Token registers are initialised to the information provided in the +arguments of \gls{newabbreviation}: \gls{glskeylisttok}, +\gls{glslabeltok}, \gls{glsshorttok} and \gls{glslongtok}. -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. +\item The commands \gls{glsxtrorgkeylist}, \gls{glsxtrorgshort} and \gls{glsxtrorglong} are +defined to the options, short and long values supplied to +\gls{newabbreviation}. (The \gls{glskeylisttok} \gls{glsshorttok} and \gls{glslongtok} +token registers may be changed before the entry is actually defined. +These commands may be used to obtain the original values.) -\section{Entry Indexing} -\label{sec:wrglossary} +\item \gls{ExtraCustomAbbreviationFields} is initialised to do +nothing. -As from version 1.31, there is a new command like \cs{glsadd} -where the mandatory argument is a comma-separated list -of labels: -\begin{definition}[\DescribeMacro\glsaddeach] -\cs{glsaddeach}\oarg{options}\marg{list} -\end{definition} -This simply iterates over \meta{list} and does -\cs{glsadd}\oarg{options}\marg{label} for each entry in the list. - -As from version 1.37, you can make commands like \cs{gls} or -\cs{glslink} automatically use \cs{glsadd} with specific options -when a given format is used (identified with -\texttt{format=\marg{format}} in the optional argument of the -corresponding \cs{gls}, \cs{glslink} etc). -\begin{definition}[\DescribeMacro\GlsXtrAutoAddOnFormat] -\cs{GlsXtrAutoAddOnFormat}\oarg{label}\marg{format list}\marg{glsadd options} -\end{definition} -The optional argument \meta{label} defaults to \cs{glslabel} and -indicates the label to use in \cs{glsadd} and so needs to be -expandable. The \meta{format list} is a comma-separated list -of format values that will trigger the automated adding. The -\meta{glsadd options} are the options to pass to \cs{glsadd} with -\texttt{format=\marg{format}} prepended to the list. +\item Accessibility settings are initialised, if required. +These redefine \gls{ExtraCustomAbbreviationFields} to set the +accessibility fields. -For example, with: -\begin{verbatim} -\GlsXtrAutoAddOnFormat{hyperbf}{counter=chapter} -\end{verbatim} -then \verb|\gls[format=hyperbf]{sample}| will be equivalent to -\begin{verbatim} -\glsadd[format=hyperbf,counter=chapter]{sample}\gls[format=hyperbf]{sample} -\end{verbatim} -Note that the explicit range markers will prevent a match -unless you include them in \meta{format list} (in which case, be -sure to add both the start and end formats). +\item The command \gls{glscategorylabel} is defined to \code{abbreviation}. + +\item The options list is parsed for the following keys: \gloskey{category} +and, if accessibility is enabled, +\gloskey{access}, \gloskey{textaccess}, \gloskey{pluralaccess}, +\gloskey{firstaccess}, \gloskey{firstpluralaccess}, +\gloskey{shortaccess}, \gloskey{shortpluralaccess}, +\gloskey{longaccess}, and \gloskey{longpluralaccess}. + +\item The abbreviation style is applied for the category given by +\gls{glscategorylabel} (which may have been changed when the options +were parsed in the previous step) or the fallback if no abbreviation +style is associated with that category. This performs both the +\meta{setup} and \meta{display definitions} provided when the style +was defined with \gls{newabbreviationstyle}. + +\item The long plural form is initialised to its default value +(\meta{long}\gls{glspluralsuffix}). + +\item The \catattr{markwords} attribute, if set, is implemented for the +singular long form. It will also mark +the entry as having a description with formatting (using +\gls{glsexclapplyinnerfmtfield}). + +\item The \catattr{markshortwords} attribute is implemented, if +set, otherwise the \catattr{insertdots} attribute is implemented, if +set, for the singular short form. + +\item The \catattr{aposplural} attribute is implemented, if +set, otherwise the \catattr{noshortplural} attribute is implemented, if +set. This step will set the default short plural. + +\item \gls{glsshorttok} is updated to reflect any changes. + +\item The \gls{glsxtrnewabbrevpresetkeyhook} hook is performed. + +\item The options list is parsed for the \gloskey{shortplural} and +\gloskey{longplural} keys. The \gls{glskeylisttok} token is updated +to only include the remaining keys that haven't yet been processed. + +\item The \catattr{markwords} attribute, if set, is implemented for the +plural long form. + +\item The \catattr{markshortwords} attribute, if set, otherwise the +\catattr{insertdots} attribute, if set, is implemented for the +plural short form. + +\item The \gls{glsshortpltok} and \gls{glslongpltok} registers are +set. + +\item \gls{newabbreviationhook} performed. + +\item The entry is defined using \gls{newglossaryentry} with the key value list: +\begin{codebox} +\gloskeyval{type}{\gls{glsxtrabbrvtype}}, +\gloskeyval{category}{abbreviation}, +\gloskeyval{short}{\cmd{the}\gls{glsshorttok}}, +\gloskeyval{shortplural}{\cmd{the}\gls{glsshortpltok}}, +\gloskeyval{long}{\cmd{the}\gls{glslongtok}}, +\gloskeyval{longplural}{\cmd{the}\gls{glslongpltok}}, +\gloskeyval{name}{\cmd{the}\gls{glsshorttok}}, +\gls{CustomAbbreviationFields}, +\gls{ExtraCustomAbbreviationFields} +\cmd{the}\gls{glskeylisttok} +\end{codebox} + +\item Add the \gloskey{name}, \gloskey{first}, +\gloskey{firstplural}, \gloskey{text} and \gloskey{plural} keys to +the list of \idx{innerformatting} exclusions, as +they include formatting commands. + +\item Final hook \gls{GlsXtrPostNewAbbreviation} performed. +\end{enumerate} -Here's another example: -\begin{verbatim} -\GlsXtrAutoAddOnFormat[dual.\glslabel]{hyperbf}{} -\end{verbatim} -In this case \verb|\gls[format=hyperbf]{sample}| will now be -equivalent to: -\begin{verbatim} -\glsadd[format=hyperbf]{dual.sample}\gls[format=hyperbf]{sample} -\end{verbatim} +Note that when these hooks (except the last) are used, the entry hasn't yet been +defined. However, some information will have already been picked up +from the arguments of \gls{newabbreviation}. These can be accessed +in the hooks using the following (but make sure they are fully +expanded): +\cmddef{glscategorylabel} +Expands to the entry's category label. + +\cmddef{glskeylisttok} +A token register that contains the options that were passed to +\gls{newabbreviation} with pre-processed options removed. +Use \code{\cmd{the}\gls{glskeylisttok}} to expand it. + +The original option list, as supplied to \gls{newabbreviation}, can +be obtained with: +\cmddef{glsxtrorgkeylist} +(Not a token register.) + +\cmddef{glslabeltok} +A token register that contains the entry's label. Use +\code{\cmd{the}\gls{glslabeltok}} to expand it. + +\cmddef{glsshorttok} +A token register that contains the short form (which may have been +modified after being passed to \gls{newabbreviation}). Use +\code{\cmd{the}\gls{glsshorttok}} to expand it. + +The original short form, as supplied to \gls{newabbreviation}, can +be obtained with: +\cmddef{glsxtrorgshort} +(Not a token register.) + +\cmddef{glsshortpltok} +A token register that contains the short plural form (which may +have been obtained from the short form or modified after being +passed to \gls{newabbreviation}). Use +\code{\cmd{the}\gls{glsshortpltok}} to expand it. + +\cmddef{glslongtok} +A token register that contains the long form (which may have been +modified after being passed to \gls{newabbreviation}). Use +\code{\cmd{the}\gls{glslongtok}} to expand it. + +The original long form, as supplied to \gls{newabbreviation}, can +be obtained with: +\cmddef{glsxtrorglong} +(Not a token register.) + +\cmddef{glslongpltok} +A token register that contains the long plural form (which may +have been obtained from the long form or modified after being +passed to \gls{newabbreviation}). Use +\code{\cmd{the}\gls{glslongpltok}} to expand it. + +\cmddef{ExtraCustomAbbreviationFields} +Expands to additional field definitions for the entry. This is used +to add the accessibility fields (such as \gloskey{shortaccess}), if +enabled. The abbreviation style may append (\gls{appto}) or prepend +(\gls{preto}) additional information, if required, to this hook. \begin{important} -\cs{GlsXtrAutoAddOnFormat} is not applied to \cs{glsadd} -as it could cause an infinite loop. +If you alter this hook, make sure that you include the trailing +comma after each \code{\meta{key}\dequals\marg{value}}, including the last one. \end{important} -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 - }% +\cmddef{CustomAbbreviationFields} +Expands to the default field definitions for the entry. Take care to +protect any commands that shouldn't be expanded. The comma may be +omitted from the final \code{\meta{key}\dequals\marg{value}}. + +\cmddef{GlsXtrPostNewAbbreviation} +A hook that's used after the entry has been defined (at the end of +\gls{newabbreviation}). This can be used to set category attributes, +define the \idx{postlinkhook}, or mark the entry as having a complex +style (with \gls{glsxtrsetcomplexstyle}). + +For example, the \abbrstyle{long-short} abbreviation style includes +the following in \meta{setup}: +\begin{codebox} +\cmd{renewcommand}*\marg{\gls{GlsXtrPostNewAbbreviation}}\marg{\% + \gls{glsxtrsetcomplexstyle}\marg{\cmd{the}\gls{glslabeltok}}\marg{3}\% + \gls{glshasattribute}\marg{\cmd{the}\gls{glslabeltok}}\marg{regular}\% + \marg{\% + \gls{glssetattribute}\marg{\cmd{the}\gls{glslabeltok}}\marg{regular}\marg{false}\% + }\% + \marg{}\% } -\end{verbatim} -This sets the conditional -\begin{definition} -\ics{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}.) - -\item[{\gloskey[glslink]{hyperoutside}}] (New to v1.21.) This is a -boolean key. The default is \texttt{hyperoutside=true}, which puts -the hyperlink outside \cs{glstextformat}, so that commands like -\cs{gls} will effectively do -\begin{alltt} -\cs{hyperlink}\marg{target}\{\cs{glstextformat}\marg{link text}\} -\end{alltt} -This is the same behaviour as with the base \styfmt{glossaries} -package. With \texttt{hyperoutside=false}, \cs{hyperlink} is placed -inside the argument of \cs{glstextformat}: -\begin{alltt} -\cs{glstextformat}\{\cs{hyperlink}\marg{target}\marg{link text}\} -\end{alltt} -You can use the \catattr{hyperoutside} category attribute to set -the default for a given category. This can be combined -with the use of the \catattr{textformat} attribute to counteract -any interference caused by \cs{hyperlink}. -For example: -\begin{verbatim} -\glssetcategoryattribute{mathrelation}{hyperoutside}{false} -\end{verbatim} -will set \texttt{hyperoutside=false} for all entries that are -assigned to the category \texttt{mathrelation} and -\begin{verbatim} -\glssetcategoryattribute{mathrelation}{textformat}{mathrel} -\end{verbatim} -will use \cs{mathrel} instead of \cs{glstextformat} resulting in: -\begin{alltt} -\cs{mathrel}\{\cs{hyperlink}\marg{target}\marg{link text}\} -\end{alltt} -for entries with the \gloskey{category} key set to -\texttt{mathrelation}. - -\item[{\gloskey[glslink]{textformat}}] This key must have a -control sequence name as its value. The command formed from -this name must exist and must take one argument. (Use -\texttt{relax} for default behaviour.) If set, this overrides -the \catattr{textformat} attribute and \cs{glstextformat}. -See the \sty{soul} example in \sectionref{sec:glsunset}. - -\item[{\gloskey[glslink]{prefix}}] Locally redefines -\ics{glolinkprefix} to the given value. It should match the prefix -for the desired glossary. - -\item[{\gloskey[glslink]{thevalue}}] Explicitly set the location to -this value (see below). - -\item[{\gloskey[glslink]{theHvalue}}] Set the corresponding -hyperlink location (see below). +\end{codebox} +Note that in the above, the commands within the definition of +\gls{GlsXtrPostNewAbbreviation} are all expanded when that hook is +used. However, if this hook defines other commands or hooks that +will be used later, then make sure that the definitions of those +commands use the inner hook's own placeholder commands. + +\begin{information} +Remember that the \idx{postlinkhook} uses \gls{glslabel} to +reference the current label. Don't use \gls{glslabeltok} as that +will contain the label of the last abbreviation to be defined. +\end{information} + +For example, the \abbrstyle{long-hyphen-postshort-hyphen} style has: +\begin{codebox} +\cmd{renewcommand}*\marg{\gls{GlsXtrPostNewAbbreviation}}\marg{\% + \gls{glsexclapplyinnerfmtfield}\marg{\cmd{the}\gls{glslabeltok}}\marg{desc}\% + \gls{csdef}\marg{glsxtrpostlink\gls{glscategorylabel}}\marg{\% + \gls{glsxtrifwasfirstuse} + \marg{\% + \gls{expandafter}\gls{glsxtrposthyphenshort}\gls{expandafter}\gls{glslabel} + \gls{expandafter}\marg{\gls{glsinsert}}\% + }\% + \marg{\% + \gls{expandafter}\gls{glsxtrposthyphensubsequent}\gls{expandafter}\gls{glslabel} + \gls{expandafter}\marg{\gls{glsinsert}}\% + }\% + }\% + \gls{glshasattribute}\marg{\cmd{the}\gls{glslabeltok}}\marg{regular}\% + \marg{\% + \gls{glssetattribute}\marg{\cmd{the}\gls{glslabeltok}}\marg{regular}\marg{false}\% + }\% + \marg{}\% +} +\end{codebox} +In the above, \gls{glslabeltok} and \gls{glscategorylabel} are used +in the parts that will be expanded at the end of +\gls{newabbreviation}, but \gls{glslabel} and \gls{glsinsert} are +used in the definition of the \idx{postlinkhook}, which won't be +expanded until the entry is referenced in the document with a +command such as \gls{gls}. (The use of \gls{expandafter} is included +to assist \glsopt{innertextformat}.) + +\cmddef{glsxtrsetcomplexstyle} +This command should go in the definition of +\gls{GlsXtrPostNewAbbreviation} to indicate that the entry given by +\meta{entry-label} has an abbreviation style that is +complex. The second argument \meta{n} should be numeric and +indicates why it doesn't work with \gls{glsfirst}, \gls{Glsfirst}, +\gls{GLSfirst}, \gls{glsfirstplural}, \gls{Glsfirstplural} +or \gls{GLSfirstplural}: 1 (all caps doesn't work), 2 (all caps and +insert doesn't work), 3 (insert doesn't work). + +\cmddef{glsfirstinnerfmtabbrvfont} +This is a robust command that applies both \gls{glsfirstabbrvfont} and the inner +formatting command \gls{glsxtrgenentrytextfmt}. This is used by the +following command. + +\cmddef{glsfirstxpabbrvfont} +If the \catattr{markshortwords} attribute is true, this does +\code{\cmd{protect}\gls{glsfirstabbrvfont}\margm{text}} +otherwise it does \code{\gls{glsfirstinnerfmtabbrvfont}\margm{text}}. + +This command is designed to be used within +\gls{CustomAbbreviationFields} to set the \gloskey{first} and +\gloskey{firstplural} keys, so it needs to partially expand +within \gls{newabbreviation}. For example, the +\abbrstyle{postfootnote} includes the following lines in the +definition of \gls{CustomAbbreviationFields}: +\begin{codebox} +\gloskeyval{first}{\gls{glsfirstxpabbrvfont}\marg{\cmd{the}\gls{glsshorttok}}\marg{\gls{glscategorylabel}}},\% +\gloskeyval{firstplural}{\gls{glsfirstxpabbrvfont}\marg{\cmd{the}\gls{glsshortpltok}}\marg{\gls{glscategorylabel}}}, +\end{codebox} +This will be expanded before being passed to \gls{newglossaryentry}. +If the \catattr{markshortwords} attribute is true, this will end up +as: +\begin{codebox} +\gloskeyval{first}{\cmd{protect}\gls{glsfirstabbrvfont}\margm{short}},\% +\gloskeyval{firstplural}{\cmd{protect}\gls{glsfirstabbrvfont}\margm{shortpl}} +\end{codebox} +otherwise it will end up as: +\begin{codebox} +\gloskeyval{first}{\gls{glsfirstinnerfmtabbrvfont}\margm{short}},\% +\gloskeyval{firstplural}{\gls{glsfirstinnerfmtabbrvfont}\margm{shortpl}},\% +\end{codebox} +where \meta{short} and \meta{shortpl} are, respectively, the values +in the \gls{glsshorttok} and \gls{glsshortpltok} registers. + +\begin{information} +The placeholder registers and macros (such as \gls{glsshorttok} and +\gls{glscategorylabel}) must be expanded before being passed to +\gls{newglossaryentry} as their values are unreliable outside of +\gls{newabbreviation}. +\end{information} + +\cmddef{glsinnerfmtabbrvfont} +This is a robust command that applies both \gls{glsabbrvfont} and the inner +formatting command \gls{glsxtrgenentrytextfmt}. This is used by the +following command. + +\cmddef{glsxpabbrvfont} +If the \catattr{markshortwords} attribute is true, this does +\code{\cmd{protect}\gls{glsabbrvfont}\margm{text}} +otherwise it does \code{\gls{glsinnerfmtabbrvfont}\margm{text}}. +This command is designed for the \gloskey{name}, \gloskey{text} and \gloskey{plural} +keys within \gls{CustomAbbreviationFields}. + +\cmddef{glsfirstinnerfmtlongfont} +This is a robust command that applies both \gls{glsfirstlongfont} and the inner +formatting command \gls{glsxtrgenentrytextfmt}. This is used by the +following command. + +\cmddef{glsfirstxplongfont} +If the \catattr{markwords} attribute is true, this does +\code{\cmd{protect}\gls{glsfirstlongfont}\margm{text}} +otherwise it does \code{\gls{glsfirstinnerfmtlongfont}\margm{text}}. +This command is designed for the \gloskey{first} and \gloskey{firstplural} +keys within \gls{CustomAbbreviationFields}. + +\cmddef{glsinnerfmtlongfont} +This is a robust command that applies both \gls{glslongfont} and the inner +formatting command \gls{glsxtrgenentrytextfmt}. This is used by the +following command. + +\cmddef{glsxplongfont} +If the \catattr{markwords} attribute is true, this does +\code{\cmd{protect}\gls{glslongfont}\margm{text}} +otherwise it does \code{\gls{glsinnerfmtlongfont}\margm{text}}. +This command is designed for the \gloskey{name}, \gloskey{text} and \gloskey{plural} +keys within \gls{CustomAbbreviationFields} (if they should include +the long form in their value, such as the +\abbrstyle{long-noshort-desc} style). + +\cmddef{glsxtrAccSuppAbbrSetNoLongAttrs} +If accessibility support has been enabled with \opt{accsupp}, this +command will initialise support for the \gloskey{name}, +\gloskey{first}, \gloskey{firstplural}, +\gloskey{text} and \gloskey{plural} fields for the given category +(using \gls{glsxtrprovideaccsuppcmd}). +The \catattr{nameshortaccess}, \catattr{firstshortaccess} and \catattr{textshortaccess} +attributes are set to \code{true}. (Does nothing if accessibility +support has not been enabled.) + +This command is provided for abbreviation styles +where the \gloskey{name}, \gloskey{first} and \gloskey{text} are +just the formatted abbreviation. The +\gloskey{first} field may just be the long form or may be a +combination of short and long. + +\cmddef{glsxtrAccSuppAbbrSetNameLongAttrs} +If accessibility support has been enabled with \opt{accsupp}, this +command will initialise support for the +\gloskey{first}, \gloskey{firstplural}, +\gloskey{text} and \gloskey{plural} fields for the given category +(using \gls{glsxtrprovideaccsuppcmd}). +The \catattr{firstshortaccess} and \catattr{textshortaccess} +attributes are set to \code{true}. (Does nothing if accessibility +support has not been enabled.) + +This command is provided for abbreviation styles +where the \gloskey{first} and \gloskey{text} are +just the formatted abbreviation. The +\gloskey{name} field may just be the long form or may be a +combination of short and long. + +\cmddef{glsxtrAccSuppAbbrSetFirstLongAttrs} +If accessibility support has been enabled with \opt{accsupp}, this +command will initialise support for the \gloskey{name}, +\gloskey{text} and \gloskey{plural} fields for the given category +(using \gls{glsxtrprovideaccsuppcmd}). +The \catattr{nameshortaccess} and \catattr{textshortaccess} +attributes are set to \code{true}. (Does nothing if accessibility +support has not been enabled.) + +This command is provided for abbreviation styles where the +\gloskey{name} and \gloskey{text} are just the formatted +abbreviation. The \gloskey{first} field may just be the long form or +may be a combination of short and long. + +\cmddef{glsxtrAccSuppAbbrSetTextShortAttrs} +If accessibility support has been enabled with \opt{accsupp}, this +command will initialise support for the +\gloskey{text} and \gloskey{plural} fields for the given category +(using \gls{glsxtrprovideaccsuppcmd}). +The \catattr{textshortaccess} +attribute is set to \code{true}. (Does nothing if accessibility +support has not been enabled.) + +This command is provided for abbreviation styles where the +\gloskey{text} is just the formatted abbreviation. The +\gloskey{name} and \gloskey{first} fields may just be the long form +or may be a combination of short and long. The \gloskey{name} may +also be short but followed by the long form in the description. + +\cmddef{glsxtrAccSuppAbbrSetNameShortAttrs} +If accessibility support has been enabled with \opt{accsupp}, this +command will initialise support for the +\gloskey{name} field for the given category +(using \gls{glsxtrprovideaccsuppcmd}). +The \catattr{nameshortaccess} +attribute is set to \code{true}. (Does nothing if accessibility +support has not been enabled.) + +This command is provided for abbreviation styles where only the +\gloskey{name} is just the formatted abbreviation. The +\gloskey{first} and \gloskey{text} fields may just be the long form +or may be a combination of short and long. + +\subsubsection{Style Formatting Commands} +\label{sec:abbrstylefmts} + +The final \meta{display definitions} argument of +\gls{newabbreviationstyle} should contain the redefinitions of the +style commands listed here that are used to format abbreviations. + +Whenever an abbreviation style is activated with commands like +\gls{setabbreviationstyle}, \gls{newabbreviation} or +\gls{glssetabbrvfmt}, \meta{display definitions} are implemented. -\end{description} +\begin{important} +If you simply want to adjust the formatting of one of the predefined +styles, you should redefine the associated commands listed in +\sectionref{sec:abbrvcmds}. +\end{important} -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. +The following initialisation is always prepended to +\meta{display definitions} so you can omit them if the default is +appropriate for your style: +\begin{codebox} +\cmd{renewcommand}*\marg{\gls{glsxtrinlinefullformat}}\marg{\gls{glsxtrfullformat}}\% +\cmd{renewcommand}*\marg{\gls{Glsxtrinlinefullformat}}\marg{\gls{Glsxtrfullformat}}\% +\cmd{renewcommand}*\marg{\gls{GLSxtrinlinefullformat}}\marg{\gls{GLSxtrfullformat}}\% +\cmd{renewcommand}*\marg{\gls{glsxtrinlinefullplformat}}\marg{\gls{glsxtrfullplformat}}\% +\cmd{renewcommand}*\marg{\gls{Glsxtrinlinefullplformat}}\marg{\gls{Glsxtrfullplformat}}\% +\cmd{renewcommand}*\marg{\gls{GLSxtrinlinefullplformat}}\marg{\gls{GLSxtrfullplformat}}\% +\cmd{let}\gls{glsxtrsubsequentfmt}\gls{glsxtrdefaultsubsequentfmt} +\cmd{let}\gls{glsxtrsubsequentplfmt}\gls{glsxtrdefaultsubsequentplfmt} +\cmd{let}\gls{Glsxtrsubsequentfmt}\gls{Glsxtrdefaultsubsequentfmt} +\cmd{let}\gls{Glsxtrsubsequentplfmt}\gls{Glsxtrdefaultsubsequentplfmt} +\cmd{let}\gls{GLSxtrsubsequentfmt}\gls{GLSxtrdefaultsubsequentfmt} +\cmd{let}\gls{GLSxtrsubsequentplfmt}\gls{GLSxtrdefaultsubsequentplfmt} +\end{codebox} +In the event that any styles omit defining the newer \gls{GLSxtrfullformat} +or \gls{GLSxtrfullplformat}, these are also initialised to defaults +but ideally they should have their definitions provided. + +The minimal set of commands that should have their definitions +provided are the abbreviation plural suffix +(\gls{abbrvpluralsuffix}) the \idxpl{displayfullform}: +\gls{glsxtrfullformat}, \gls{glsxtrfullplformat} and their +case-changing variants. + +The \idx{inlinefullform} commands only need to be provided if they +behave differently from the \idx{displayfullform}. The subsequent +use commands only need to be provided if the default (only show the +short form) isn't suitable. \begin{important} -\cs{GlsXtrSetDefaultGlsOpts} doesn't affect \cs{glsadd}. +The content of \meta{display definitions} is placed within the +definition of an internal control sequence, so remember to use +\code{\#\#} instead of \code{\#} to reference command parameters. \end{important} -If you want to change the default value of \gloskey[glsadd]{format}, -you can instead use: -\begin{definition}[\GlsXtrSetDefaultNumberFormat] -\cs{GlsXtrSetDefaultNumberFormat}\marg{format} -\end{definition} -This has the advantage of also working for \cs{glsadd}. -For example, if you want all locations in the back matter to appear -in italic (unless explicitly overridden): -\begin{verbatim} -\backmatter -\GlsXtrSetDefaultNumberFormat{hyperit} -\end{verbatim} - -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). +\paragraph{Suffix and Fonts} +These are the generic suffix and font commands that vary according +to the abbreviation style. The style should provide the appropriate +definitions. The suffix should always be provided. The font commands +are only required if the style applies any font formatting to either +the long or short form. + +\cmddef{abbrvpluralsuffix} +The plural suffix for the short form. For example, the +\abbrstyle{long-short} style defines this to just use +\gls{glsxtrabbrvpluralsuffix}, but the smallcaps styles, such as +\abbrstyle{long-short-sc} define this to \gls{glsxtrscsuffix} in +order to counteract the small caps font. + +\cmddef{glsfirstabbrvfont} +The font formatting command for the short form on \idx{firstuse}. For example, the +\abbrstyle{long-short-sc} style has: +\begin{codebox} +\cmd{renewcommand}*\gls{glsfirstabbrvfont}\oarg{1}\marg{\gls{glsfirstabbrvscfont}\marg{\#\#1}} +\end{codebox} + +\cmddef{glsabbrvfont} +The font formatting command for the short form. For example, the +\abbrstyle{long-short-sc} style has: +\begin{codebox} +\cmd{renewcommand}*\gls{glsabbrvfont}\oarg{1}\marg{\gls{glsabbrvscfont}\marg{\#\#1}} +\end{codebox} + +\cmddef{glsxtrrevert} +This command is designed to counteract the effect of +\gls{glsabbrvfont} if, for some reason, it shouldn't be applied to +part of the abbreviation. For example, you may prefer not to have +digits reduced with the smaller (\qt{sm}) styles. + +\cmddef{glsfirstlongfont} +The font formatting command for the long form on \idx{firstuse}. For example, the +\abbrstyle{long-short-sc} style has: +\begin{codebox} +\cmd{renewcommand}*\marg{\gls{glsfirstlongfont}}[1]\marg{\gls{glsfirstlongdefaultfont}\marg{\#\#1}} +\end{codebox} + +\cmddef{glslongfont} +The font formatting command for the long form. For example, the +\abbrstyle{long-short-sc} style has: +\begin{codebox} +\cmd{renewcommand}*\marg{\gls{glslongfont}}[1]\marg{\gls{glslongdefaultfont}\marg{\#\#1}} +\end{codebox} + +\paragraph{First Use Display Format} +These commands always need to be provided. + +\cmddef{glsxtrfullformat} +The singular \idx{displayfullform} used on the \idx{firstuse} of +\gls{gls}. + +\cmddef{glsxtrfullplformat} +The plural \idx{displayfullform} used on the \idx{firstuse} of +\gls{glspl}. + +\cmddef{Glsxtrfullformat} +The \idx{sentencecase} singular \idx{displayfullform} used on the \idx{firstuse} of +\gls{Gls}. + +\cmddef{Glsxtrfullplformat} +The \idx{sentencecase} plural \idx{displayfullform} used on the \idx{firstuse} of +\gls{Glspl}. + +\cmddef{GLSxtrfullformat} +The \idx{allcaps} singular \idx{displayfullform} used on the \idx{firstuse} of +\gls{GLS}. + +\cmddef{GLSxtrfullplformat} +The \idx{allcaps} plural \idx{displayfullform} used on the \idx{firstuse} of +\gls{GLSpl}. + +\paragraph{Subsequent Use Display Format} +These commands only need to be provided if the \idx{glslike} +commands don't simply show the short form. + +\cmddef{glsxtrsubsequentfmt} +The singular form for \idx{subsequentuse} of \gls{gls}. + +\cmddef{glsxtrsubsequentplfmt} +The plural form for \idx{subsequentuse} of \gls{glspl}. + +\cmddef{Glsxtrsubsequentfmt} +The \idx{sentencecase} singular form for \idx{subsequentuse} of \gls{Gls}. + +\cmddef{Glsxtrsubsequentplfmt} +The \idx{sentencecase} plural form for \idx{subsequentuse} of +\gls{Glspl}. + +\cmddef{GLSxtrsubsequentfmt} +The \idx{allcaps} singular form for \idx{subsequentuse} of \gls{GLS}. + +\cmddef{GLSxtrsubsequentplfmt} +The \idx{allcaps} plural form for \idx{subsequentuse} of \gls{GLSpl}. + +The defaults all show the short form and insert encapsulated with +the \idx{innerformatting} \gls{glsxtrgenentrytextfmt} and +\gls{glsabbrvfont}. The purpose of the \idx{innerformatting} is to get it +as close as possible to the actual text so \gls{glsabbrvfont} is +placed outside of \gls{glsxtrgenentrytextfmt}. + +The \catattr{markshortwords} attribute complicates matters as it +inserts \gls{glsxtrword} and \gls{glsxtrwordsep} into the actual +field value. In that case, the \idx{innerformatting} is within +\gls{glsxtrword} and \gls{glsxtrwordsep}, so only the insert +material needs to be formatted. + +If a custom style doesn't need to support \glsopt{innertextformat} +or \gls{ifglsxtrinsertinside}, it can reduce the complexity by +omitting the \idx{innerformatting} and conditionals, but this lack of +support should be documented if the style is made generally +available. + +\cmddef{glsxtrdefaultsubsequentfmt} +The default singular form for \idx{subsequentuse} of \gls{gls}. + +\cmddef{glsxtrdefaultsubsequentplfmt} +The default plural form for \idx{subsequentuse} of \gls{glspl}. + +\cmddef{Glsxtrdefaultsubsequentfmt} +The default \idx{sentencecase} singular form for \idx{subsequentuse} of \gls{Gls}. + +\cmddef{Glsxtrdefaultsubsequentplfmt} +The default \idx{sentencecase} plural form for \idx{subsequentuse} +of \gls{Glspl}. + +\cmddef{GLSxtrdefaultsubsequentfmt} +The default \idx{allcaps} singular form for \idx{subsequentuse} of \gls{GLS}. + +\cmddef{GLSxtrdefaultsubsequentplfmt} +The default \idx{allcaps} plural form for \idx{subsequentuse} of +\gls{GLSpl}. + +\paragraph{Inline Full Format} +These commands only need to be provided if the \idx{inlinefullform} +is different from the \idx{displayfullform}. + +\cmddef{glsxtrinlinefullformat} +The singular full form of \gls{glsxtrfull}. + +\cmddef{glsxtrinlinefullplformat} +The plural full form of \gls{glsxtrfullpl}. + +\cmddef{Glsxtrinlinefullformat} +The \idx{sentencecase} singular full form of \gls{Glsxtrfull}. + +\cmddef{Glsxtrinlinefullplformat} +The \idx{sentencecase} plural full form of \gls{Glsxtrfullpl}. + +\cmddef{GLSxtrinlinefullformat} +The \idx{allcaps} singular full form of \gls{GLSxtrfull}. + +\cmddef{GLSxtrinlinefullplformat} +The \idx{allcaps} plural full form of \gls{GLSxtrfullpl}. + +\paragraph{Wrapper Commands} +These are commands that can be used in the definitions of the above +to ensure that the appropriate accessibility fields and inner +formatting is supported. + +\cmddef{glsxtrlongformat} +This command is used in the definition of \gls{glsxtrlong} in some +of the predefined abbreviation styles to format the \gloskey{long} +value of the entry identified by \meta{entry-label} with the command +\meta{fmt-cs}, which should take one argument. + +Accessibility support is implemented with \gls{glsaccesslong} if the +\catattr{markwords} attribute is true otherwise with +\gls{glsaccessfmtlong} using \gls{glsxtrgenentrytextfmt} for the +\idx{innerformatting}. + +This is then encapsulated (including or excluding the \meta{insert}, +according to \gls{ifglsxtrinsertinside}) with \meta{fmt-cs}. If the +\meta{insert} content needs to be placed outside of \meta{fmt-cs}, it +will be individually encapsulated with the \idx{innerformatting}. + +\cmddef{Glsxtrlongformat} +As above, but \idx{sentencecase}. + +\cmddef{GLSxtrlongformat} +As above, but \idx{allcaps}. + +\cmddef{glsxtrlongplformat} +As \gls{glsxtrlongformat}, but for the \gloskey{longplural} field. + +\cmddef{Glsxtrlongplformat} +As above, but \idx{sentencecase}. + +\cmddef{GLSxtrlongplformat} +As above, but \idx{allcaps}. + +\cmddef{glsxtrlongformatgrp} +As \gls{glsxtrlongformat}, but adds grouping around \meta{insert} +(with the \idx{innerformatting} inside the group). + +\cmddef{Glsxtrlongformatgrp} +As above, but \idx{sentencecase}. + +\cmddef{GLSxtrlongformatgrp} +As above, but \idx{allcaps}. + +\cmddef{glsxtrlongplformatgrp} +As \gls{glsxtrlongplformat}, but adds grouping around \meta{insert} +(with the \idx{innerformatting} inside the group). + +\cmddef{Glsxtrlongplformatgrp} +As above, but \idx{sentencecase}. + +\cmddef{GLSxtrlongplformatgrp} +As above, but \idx{allcaps}. + +\cmddef{glsxtrshortformat} +This command is used in the definition of \gls{glsxtrshort} and in +some of the predefined abbreviation styles to format the +\gloskey{short} value of the entry identified by \meta{entry-label} +with the command \meta{fmt-cs}, which should take one argument. + +Accessibility support is implemented with \gls{glsaccessshort} if the +\catattr{markshortwords} attribute is true otherwise with +\gls{glsaccessfmtshort} using \gls{glsxtrgenentrytextfmt} for the +\idx{innerformatting}. + +This is then encapsulated (including or excluding the \meta{insert}, +according to \gls{ifglsxtrinsertinside}) with \meta{fmt-cs}. If the +\meta{insert} content needs to be placed outside of \meta{fmt-cs}, it +will be individually encapsulated with the \idx{innerformatting}. + +\cmddef{Glsxtrshortformat} +As above, but \idx{sentencecase}. + +\cmddef{GLSxtrshortformat} +As above, but \idx{allcaps}. + +\cmddef{glsxtrshortplformat} +As \gls{glsxtrshortformat}, but for the \gloskey{shortplural} field. + +\cmddef{Glsxtrshortplformat} +As above, but \idx{sentencecase}. + +\cmddef{GLSxtrshortplformat} +As above, but \idx{allcaps}. + +\cmddef{glsxtrshortformatgrp} +As \gls{glsxtrshortformat}, but adds grouping around \meta{insert} +(with the \idx{innerformatting} inside the group). + +\cmddef{Glsxtrshortformatgrp} +As above, but \idx{sentencecase}. + +\cmddef{GLSxtrshortformatgrp} +As above, but \idx{allcaps}. + +\cmddef{glsxtrshortplformatgrp} +As \gls{glsxtrshortplformat}, but adds grouping around \meta{insert} +(with the \idx{innerformatting} inside the group). + +\cmddef{Glsxtrshortplformatgrp} +As above, but \idx{sentencecase}. + +\cmddef{GLSxtrshortplformatgrp} +As above, but \idx{allcaps}. + +\cmddef{glsxtrlongshortformat} +A shortcut designed for \meta{long} (\meta{short}) styles. This is +defined as: +\begin{codebox} +\gls{glsxtrlongformat}\margm{entry-label}\margm{insert}\margm{long-fmt-cs}% +\gls{glsxtrfullsep}\margm{entry-label}% +\gls{glsxtrparen}\margm{\gls{glsxtrshortformat}\margm{entry-label}\marg{}\margm{short-fmt-cs}}% +\end{codebox} +Note that the \meta{insert} is only placed after the long form. + +\cmddef{Glsxtrlongshortformat} +As above, but \idx{sentencecase}. + +\cmddef{GLSxtrlongshortformat} +As above, but \idx{allcaps}. + +\cmddef{glsxtrlongshortplformat} +As \gls{glsxtrlongshortformat} but uses the plural versions \gls{glsxtrlongplformat} +and \gls{glsxtrshortplformat}. + +\cmddef{Glsxtrlongshortplformat} +As above, but \idx{sentencecase}. + +\cmddef{GLSxtrlongshortplformat} +As above, but \idx{allcaps}. + +\cmddef{glsxtrshortlongformat} +A shortcut designed for \meta{short} (\meta{long}) styles. This is +defined as: +\begin{codebox} +\gls{glsxtrshortformat}\margm{entry-label}\margm{insert}\margm{short-fmt-cs}% +\gls{glsxtrfullsep}\margm{entry-label}% +\gls{glsxtrparen}\margm{\gls{glsxtrlongformat}\margm{entry-label}\marg{}\margm{long-fmt-cs}}% +\end{codebox} +Note that the \meta{insert} is only placed after the short form. + +The syntax is the same as for \gls{glsxtrlongshortformat} even +though \gls{glsxtrlongformat} and \gls{glsxtrshortformat} are +flipped within the definition. + +\cmddef{Glsxtrshortlongformat} +As above, but \idx{sentencecase}. + +\cmddef{GLSxtrshortlongformat} +As above, but \idx{allcaps}. + +\cmddef{glsxtrshortlongplformat} +As \gls{glsxtrshortlongformat} but uses the plural versions +\gls{glsxtrshortplformat} and \gls{glsxtrlongplformat}. + +\cmddef{Glsxtrshortlongplformat} +As above, but \idx{sentencecase}. + +\cmddef{GLSxtrshortlongplformat} +As above, but \idx{allcaps}. + +\section{Restoring Base Acronym Mechanism} +\label{sec:acrorevert} + +It's possible to revert \gls{newacronym} back to the definition +provided by the base \sty{glossaries} package. However, if you do +this, you will lose all the abbreviation features provided by +\sty{glossaries-extra}. \begin{important} -When choosing the character \meta{char} take care of any -changes in category code. +Where possible, avoid this. If you're simply trying to make the long form appear +on \idx{firstuse} with \gls{newacronym}, set the abbreviation style using: +\begin{codebox} +\gls{setabbreviationstyle}\oarg{acronym}\marg{long-short} +\end{codebox} \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. - -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.) - -There's also a new hook (from v1.26) that's used immediately -before the options are set by the \cs{gls}-like and -\cs{glstext}-like commands: -\begin{definition}[\DescribeMacro\glslinkpresetkeys] -\cs{glslinkpresetkeys} -\end{definition} -(The base package provides \ics{glslinkpostsetkeys} that's -used immediately after the options are set.) - -As from version 1.30 there are also similar hooks for \cs{glsadd}: -\begin{definition}[\DescribeMacro\glsaddpresetkeys] -\cs{glsaddpresetkeys} -\end{definition} -and -\begin{definition}[\DescribeMacro\glsaddpostsetkeys] -\cs{glsaddpostsetkeys} -\end{definition} -For example, to default to using the \ctr{equation} counter in maths -mode: -\begin{verbatim} -\renewcommand{\glslinkpresetkeys}{% - \ifmmode \setkeys{glslink}{counter=equation}\fi} -\renewcommand{\glsaddpresetkeys}{% - \ifmmode \setkeys{glossadd}{counter=equation}\fi} -\end{verbatim} -In this case, the counter can be overridden with an explicit use of -\gloskey{counter} in the optional argument of \cs{gls} or -\cs{glsadd}. (As from version 1.37, a simpler method is to just use -the \pkgopt{equations} package option.) - -Alternatively, to enforce this (overriding the option -argument): -\begin{verbatim} -\renewcommand{\glslinkpostsetkeys}{% - \ifmmode \setkeys{glslink}{counter=equation}\fi} -\renewcommand{\glsaddpostsetkeys}{% - \ifmmode \setkeys{glossadd}{counter=equation}\fi} -\end{verbatim} - -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. -As from version 1.19, these two keys are also available for commands -like \cs{gls} and \cs{glslink}. The \gloskey[glsadd]{thevalue} keys is -intended primarily for adding locations in supplementary material -that can't be obtained from a counter. - -The principle key \gloskey[glslink]{thevalue} is for the location value. The -other key \gloskey[glslink]{theHvalue} can be used to -extract a prefix value for the first argument of commands like -\ics{glsnoidxdisplayloc}. Its value must be in the format -\meta{prefix}\meta{location}. In general, there's little need for -this key as the prefix is typically associated with a counter that can be -used to form hypertargets. +If you really need to use the original base \sty{glossaries} package's acronym +mechanism, it's better to stick with just \sty{glossaries} and not use +\sty{glossaries-extra}. However, it may be that you need to use a +\sty{glossaries-extra} feature, such as \gls{printunsrtglossary}, but you have a +custom acronym style that you can't implement using the \sty{glossaries-extra} +abbreviation mechanism. This is a rare edge case for unusual formats, as it should be +possible to implement most common abbreviation formats using the +predefined styles. + +\begin{warning} +Unpredictable results will occur if \gls{RestoreAcronyms} or +\gls{MakeAcronymsAbbreviations} are used after abbreviations or +acronyms have been defined. +\end{warning} + +\cmddef{RestoreAcronyms} +Restores \gls{newacronym} back to the original base \sty{glossaries} +interface. Note that this doesn't affect \gls{newabbreviation}. +It also sets the \catattr{regular} attribute for the \cat{acronym} +category to \code{false} and sets the acronym style to +\code{long-short} (which is the default for the base package). + +The display style for each \idx{glossary} identified in the acronym lists +is switched to the default acronym display style. + +\cmddef{MakeAcronymsAbbreviations} +Counteracts \gls{RestoreAcronyms}. + +\chapter{Referencing (Using) Entries} +\label{sec:glsref} + +Entries can be referenced using the \idx{glslike} and \idx{glstextlike} +commands, as described in the base \sty{glossaries} manual. There are some +additional commands provided by \sty{glossaries-extra}: +\begin{itemize} +\item abbreviation commands, such as \gls{glsxtrshort} + (see \sectionref{sec:abbreviations}); +\item commands for use in captions or section headings, such as +\gls{glsfmttext} (see \sectionref{sec:headingcommands}); +\item commands, such as \gls{glsxtrp}, designed for use within +fields to help mitigate the problems of nesting (see +\sectionref{sec:nested}); +\item commands, such as \gls{mgls}, that are designed for +referencing multi (or compound) entries (see +\sectionref{sec:multientries}); +\item commands, such as \gls{glsaccessname}, used to incorporate +accessibility support (see \sectionref{sec:glsaccessfield}); +\item commands, such as \gls{dgls}, that are designed for +\app{bib2gls}['s] dual entries (see \sectionref{sec:dgls}); +\item commands, such as \gls{rgls}, that depend on the number of +entry records (see \sectionref{sec:recordcount}). +\end{itemize} +Additionally, the entry counting commands, such as \gls{cgls}, +provided by the base \sty{glossaries} package are modified by +\sty{glossaries-extra} (see \sectionref{sec:entrycount}). + +The \idx{glslike} commands are designed to produce text at that +point in the document (the \idx{linktext}, +\sectionref{sec:entryfmtmods}), index the entry (to ensure that it +appears in the glossary, \sectionref{sec:wrglossary}) and unset the +\idx{firstuseflag} (which can alter the \idx{linktext}, +\sectionref{sec:glsunset}). Additional information can be appended +automatically with the \idx{postlinkhook} +(\sectionref{sec:postlinkhook}). The \idx{linktext} is given by the +entry style (see \sectionref{sec:entryfmt}) or by the final argument +of \gls{glsdisp}. + +The \idx{glstextlike} commands are designed to produce text at that +point in the document (the \idx{linktext}, +\sectionref{sec:entryfmtmods}) and index the entry (to ensure that +it appears in the glossary, \sectionref{sec:wrglossary}). Additional +information can be appended automatically with the +\idx{postlinkhook} (\sectionref{sec:postlinkhook}). The +\idx{linktext} is determined by the calling command. For example, +the corresponding field value (possibly encapsulated with +\gls{glsxtrregularfont} and the inner formatting) for commands like +\gls{glstext} or the final argument of \gls{glslink}. + +The \idx{glslike} and \idx{glstextlike} commands can all be used +with a star (\code{*}) or plus (\code{+}) modifier. The star +modifier automatically implements \glsoptval{hyper}{false} +(disables the hyperlink) and the plus modifier automatically +implements \glsoptval{hyper}{true} (forces the hyperlink on, if +supported). + +With \sty{glossaries-extra}, it's possible to define an additional +modifier for your own use with: +\cmddef{GlsXtrSetAltModifier} +The \meta{token} must be a single token, so a multi-byte \idx{utf8} +character will required a native Unicode engine (\XeLaTeX\ or \LuaLaTeX). +For example, the following: +\begin{codebox} +\gls{GlsXtrSetAltModifier}\marg{!}\marg{\glsoptval{format}{glsignore}} +\end{codebox} +means that \code{\gls{gls}!\margm{label}} will be equivalent to +\code{\gls{gls}\oarg{\glsoptval{format}{glsignore}}\margm{label}}. + +It's also possible to redefine the star and plus modifiers: +\cmddef{GlsXtrSetStarModifier} +This sets the options to use for the star modifier. +\cmddef{GlsXtrSetPlusModifier} +This sets the options to use for the plus modifier. +For example, the following: +\begin{codebox} +\gls{GlsXtrSetPlusModifier}\marg{\glsopt{noindex}} +\end{codebox} +means that the star modifier will now suppress \idx{indexing} +instead of switching on the hyperlink. + +The \idx{glslike} and \idx{glstextlike} commands have a complicated +internal structure, which can be viewed as a series of layers. The +outermost common layer is: +\begin{compactcodebox} +\comment{save settings} +\comment{initialise options, see \sectionref{sec:glsopts}} +\gls{glslinkwrcontent}\margm{index \& fmt content} +\comment{restore settings} +\comment{\idx{postlinkhook}, see \sectionref{sec:postlinkhook}} +\end{compactcodebox} +The \meta{index \& fmt content} consists of the \idx{indexing} +(see \sectionref{sec:wrglossary}) and the (possibly +hyperlinked) formatted text, see \sectionref{sec:entryfmtmods}. The +\meta{index \& fmt content} code is encapsulated with: +\cmddef{glslinkwrcontent} +In v1.48, this was added to scope the \idx{linktext} and +\idx{indexing} code, which helped to prevent unwanted spacing caused +by the \idx{whatsit} and also helped to +prevent some setting leakage, in the event of nesting (see +\sectionref{sec:nested}), but this caused spacing issues when used in +math mode, so from v1.49 this command now simply does its argument. +The \idx{whatsit} is now scoped with \gls{glsencapwrcontent} instead. + +The \gls{glsxtrp} command, designed for nested use, deals +with the problem by suppressing the \idx{postlinkhook} and adding an +outer group. For example, +\code{\gls{glsxtrp}\marg{short}\marg{html}} behaves like: +\begin{compactcodebox} +\marg{\gls{let}\gls{glspostlinkhook}\gls{relax} + \gls{glsxtrshort}\oarg{noindex,nohyper}\marg{html}} +\end{compactcodebox} + +Depending on the settings (the \glsopt{wrgloss} option or the +\catattr{wrgloss} attribute), the indexing may come before the text: +\begin{compactcodebox} +\gls{glslinkwrcontent}\marg{\meta{index}\meta{fmt content}} +\end{compactcodebox} +or after the text: +\begin{compactcodebox} +\gls{glslinkwrcontent}\marg{\meta{fmt content}\meta{index}} +\end{compactcodebox} +or may be suppressed with \glsopt{noindex}: +\begin{compactcodebox} +\gls{glslinkwrcontent}\marg{\meta{fmt content}} +\end{compactcodebox} +The \meta{fmt content} part is described in +\sectionref{sec:entryfmtmods}. The \meta{index} part is the actual +\idx{indexing} (see \sectionref{sec:wrglossary}) but also increments +the index count, if applicable. Both the associated \idx{whatsit} and +increment are encapsulated with \gls{glsencapwrcontent}. \begin{important} -If you use \gloskey[glsadd]{thevalue}, you must make sure that you -use an indexing application that will accept the given value. +Avoid using \gls{glstext}, \gls{glsplural}, \gls{glsfirst} and +\gls{glsfirstplural} (and their case-changing variants) with +entries that have been defined with \gls{newabbreviation}. Some of the abbreviation +styles are too complicated to work with those commands. Instead, use +commands like \gls{glsxtrshort}, \gls{glsxtrfull} or use \gls{gls} +with the \glsopt{prereset} or \glsopt{preunset} options. \end{important} -For example, \app{makeindex} will only accept locations in the form -[\meta{num}\meta{sep}]*\meta{num} where \meta{num} is an arabic -number (0, 1, \ldots), roman numeral (i, ii, \ldots\ or I, II, -\ldots) or a character from a, \ldots, z or A, \ldots, Z, and -[\meta{num}\meta{sep}]* indicates zero or more instances of a number -followed by the recognised separator character (set with -\cs{glsSetCompositor}). This means that \app{makeindex} won't -accept, for example, -\begin{verbatim} -\glsadd[thevalue={Supplementary Material}]{sample} -\end{verbatim} -This location value will be accepted by \gls{bib2gls}, since it will -allow any location and will only try forming ranges if the location -matches any of its numerical patterns. -In the case of \app{xindy}, you'll need to add a rule that can match -the value. If you're using \sty{hyperref}, you may need to use the -\gloskey[glslink]{format} key to prevent a hyperlink if one can't -naturally be formed from the prefix, counter and location value. - -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}} +The base \sty{glossaries} package provides a way to adjust the +formatting of the \idx{linktext} for the \idx{glslike} commands +according to the glossary type with \gls{defglsentryfmt}. The +\sty{glossaries-extra} package changes the default entry formatting +(\sectionref{sec:entryfmt}) and provides additional ways of +modifying the displayed content (\sectionref{sec:entryfmtmods}). + +The heading commands (described in \sectionref{sec:headtitle}) are +designed to prevent indexing or changes to the \idx{firstuseflag} if +they appear in the table of contents (or list of figures, etc) or if +they appear in the page header. + +Although the base \sty{glossaries} package warns against nested +\idx{linktext}, the \sty{glossaries-extra} package provides +\gls{glsxtrp} which can be used instead of \gls{gls} in field values +to overcome some of the associated problems. +See \sectionref{sec:nested} for further details. + +If you need to simply access a \idx{field} value without any formatting, +see \sectionref{sec:getfields}. (See \sectionref{sec:setfields} to +set \idx{field} values.) If you want to encapsulate the value with +the appropriate accessibility tag, see \sectionref{sec:glsaccessfield}. + +Commands such as \gls{glsadd} (see \sectionref{sec:wrglossary}) and +\gls{glssee} (see \sectionref{sec:xr}) are designed to only index (to +ensure the entry appears in the glossary) without producing any text or changing +the \idx{firstuseflag}. + +The \idx{glslike}, \idx{glstextlike} and \gls{glsadd} commands all have an initial +optional argument that can be used to override the default actions. +Some options are only applicable for particular subsets of +referencing commands. For example, \glsopt{noindex} is pointless for +\gls{glsadd} since the sole purpose of that command is to index. +Whereas \glsopt{types} is only available with \gls{glsaddall}. + +\section{Options} +\label{sec:glsopts} + +\glsadd[format=(]{idx.glsopt}% +Some options are provided by the base \sty{glossaries} package, but +there are some additional options provided by +\sty{glossaries-extra}, which are listed in \sectionref{sec:xtrglsopts}. +Below, \meta{option-list} indicates the options that are passed in +the optional argument of the calling command (such as \gls{gls}). + +The order that the options are applied is: +\begin{enumerate} +\item \glsopt{prereset}, \glsopt{preunset} and \glsopt{postunset} options are +initialised by \gls{glsinitreunsets}; +\item \glsopt{hyper} is initialised by \gls{glsxtrchecknohyperfirst} +(\gls{glsfirst}-like only); +\item \glsopt{wrgloss} option is initialised by \gls{glsxtrinitwrgloss} +(not implemented by \gls{glsadd} or \gls{glsxtrfmt}); +\item \glsopt{hyperoutside} option is initialised by +\gls{glsxtrinithyperoutside} (not implemented by \gls{glsadd} +or \gls{glsxtrfmt}); +\item initialise \glsoptval{noindex}{false} (not \gls{glsadd}); +\item options identified by \gls{GlsXtrSetDefaultGlsOpts}, +\gls{GlsXtrAppToDefaultGlsOpts} or \gls{GlsXtrPreToDefaultGlsOpts} (not +implemented by \gls{glsadd}); +\item (\gls{glsxtrfmt} only) options provided in +\gls{GlsXtrFmtDefaultOptions}; +\item (\idx{glslike} only) the \opt{hyperfirst} package option, +\catattr{nohyperfirst} attribute and \catattr{nohypernext} +attributes are checked to determine if the \glsopt{hyper} option +should be switched off (tests followed by \gls{glslinkcheckfirsthyperhook}); +\item \gls{glslinkpresetkeys} (not implemented by \gls{glsadd} +or \gls{glsxtrfmt}); +\item (\gls{glsadd} only) \gls{glsaddpresetkeys}; +\item \meta{option-list}; +\item \gls{glslinkpostsetkeys} (provided by the base \sty{glossaries} +package, not implemented by \gls{glsadd} or \gls{glsxtrfmt}); +\item (\gls{glsadd} only) \gls{glsaddpostsetkeys}. +\end{enumerate} -\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} +\subsection{Setting Up Defaults} +\label{sec:defaultglsopts} + +You can (locally) set your preferred default options for the \idx{glslike} and +\idx{glstextlike} commands using: +\cmddef{GlsXtrSetDefaultGlsOpts} +The \meta{options} may be any options that you can pass to those commands. +These options also apply to \gls{glsxtrfmt} but not to \gls{glsadd}. + +\begin{information} +Note that multiple instances of \gls{GlsXtrSetDefaultGlsOpts} will override each +other. +\end{information} + +If you want to add to the existing options, you can use one of the +following commands (both may be scoped). + +\cmddef{GlsXtrAppToDefaultGlsOpts} +Appends \meta{options} to the list of default options. + +\cmddef{GlsXtrPreToDefaultGlsOpts} +Prepends \meta{options} to the list of default options. + +For example, to prevent indexing in the front matter and back matter but +not in the main matter: +\begin{codebox} +\gls+{frontmatter} +\gls{GlsXtrSetDefaultGlsOpts}\marg{\glsopt{noindex}} +\ldots +\gls+{mainmatter} +\gls{GlsXtrSetDefaultGlsOpts}\marg{} +\ldots +\gls+{backmatter} +\gls{GlsXtrSetDefaultGlsOpts}\marg{\glsopt{noindex}} +\end{codebox} +Note that \glsoptval{noindex}{false} is now set before the options +given in \gls{GlsXtrSetDefaultGlsOpts} to ensure that the setting is +correctly initialised, so as from v1.49 you can simply set an empty +options list to reset the default. Prior to v1.49, it was necessary +to ensure that the \glsopt{noindex} key was always present in the +options list to avoid instability. So for pre v1.49, the line after +\gls{mainmatter} in the above would need to be: +\begin{codebox} +\gls{GlsXtrSetDefaultGlsOpts}\marg{\glsoptval{noindex}{false}} +\end{codebox} + +The default \idx{locationencap} is \encap{glsnumberformat} but can +be changed (locally) with: +\cmddef{GlsXtrSetDefaultNumberFormat} +This can be overridden by explicitly setting the \glsopt{format} +key. + +The default options for \gls{glsxtrfmt} only are given by: +\cmddef{GlsXtrFmtDefaultOptions} +This command should simply expand to the required list of options. These options +are set after any options given in \gls{GlsXtrSetDefaultGlsOpts} and before +\meta{option-list}. + +\cmddef{glslinkpresetkeys} +This hook is performed after any settings provided in \gls{GlsXtrSetDefaultGlsOpts} +but before \meta{option-list}. +This hook also applies to \gls{glsxtrfmt} but not to \gls{glsadd}. + +Note that \gls{glslinkpostsetkeys}, provided by the +base \sty{glossaries} package, is performed after \meta{option-list} is +processed. + +\cmddef{glsaddpresetkeys} +This hook, which is only used by \gls{glsadd}, is performed before +\meta{option-list}. + +\cmddef{glsaddpostsetkeys} +This hook, which is only used by \gls{glsadd}, is performed after +\meta{option-list}. + +\cmddef{glsinitreunsets} +This hook initialises the pre unset/reset options to: +\glsoptval{prereset}{none} and \glsoptval{preunset}{none}. It also +initialises the \glsopt{postunset} setting to perform the post-unset +(where applicable) but it will retain the current local/global setting. + +This hook will also implement the local repeat unset feature of +\gls{GlsXtrUnsetBufferEnableRepeatLocal}. + +\cmddef{glsxtrchecknohyperfirst} +This hook is only used by \gls{glsfirst}, \gls{glsfirstplural} and +their case-changing variants. The hook will implement +\glsoptval{hyper}{false} if the \catattr{nohyperfirst} attribute is +set to \code{true}. + +\cmddef{glsxtrinitwrgloss} +This hook initialises the default setting of the \glsopt{wrgloss} option. If the +\catattr{wrgloss} attribute is set to \code{after} then this implements +\glsoptval{wrgloss}{after} otherwise it implements \glsoptval{wrgloss}{before}. +This setting can subsequently be overridden by \gls{GlsXtrSetDefaultGlsOpts}, +\gls{glslinkpresetkeys}, the \meta{option-list} argument or +\gls{glslinkpostsetkeys}. +This hook also applies to \gls{glsxtrfmt} but not to \gls{glsadd}. + +If you prefer to have the default to place the \idx{indexing} after the +\idx{linktext}, you can redefine this hook as follows: +\begin{codebox} +\cmd{renewcommand}*\marg{\gls{glsxtrinitwrgloss}}\marg{\% + \gls{glsifattribute}\marg{\gls{glslabel}}\marg{\catattr{wrgloss}}\marg{before}\% + {\% + \gls+{glsxtrinitwrglossbeforetrue} + }\% + {\% + \gls+{glsxtrinitwrglossbeforefalse} + }\% +} +\end{codebox} + +\cmddef{glsxtrinithyperoutside} +This hook initialises the default setting of the \glsopt{hyperoutside} option. +If the \catattr{hyperoutside} attribute is set to \code{false} then this +implements \glsoptval{hyperoutside}{false} otherwise it implements +\glsoptval{hyperoutside}{true}. +This setting can subsequently be overridden by \gls{GlsXtrSetDefaultGlsOpts}, +\gls{glslinkpresetkeys}, the \meta{option-list} argument or +\gls{glslinkpostsetkeys}. +This hook also applies to \gls{glsxtrfmt} but not to \gls{glsadd}. + +Within any of the hooks that are used by the \idx{glslike}, +\idx{glstextlike} or \gls{glsxtrfmt} commands, you can set options +using: +\cmddef{setupglslink} + +Within any of the hooks that are used by \idx{glsadd}, +you can set options with: +\cmddef{setupglsadd} + +\subsection{Additional Options} +\label{sec:xtrglsopts} + +Options for the \idx{glslike} and \idx{glstextlike} commands that are +provided by the base \sty{glossaries} package also apply to new commands like +\gls{glsxtrfmt} and \gls{glsfmttext}. In addition, the options below are +provided by \sty{glossaries-extra}. Note that some options, such as +\glsopt{postunset}, only apply to the \idx{glslike} commands. +Options that relate to the hyperlink, formatting, \idx{firstuseflag} +or whether\slash where (\glsopt{noindex}\slash\glsopt{wrgloss}) to +perform \idx{indexing} aren't available for \gls{glsadd}. + +\optiondef{glsopt.hyperoutside} +This boolean option determines whether the hyperlink should be inside or outside +of \gls{glstextformat} (see \sectionref{sec:glstextformat}). +If true, the \idx{linktext} is encapsulated as: +\begin{codebox} +\meta{hyperlink-cs}\margm{target}\marg{\gls{glstextformat}\margm{text}} +\end{codebox} +otherwise it's encapsulated as: +\begin{codebox} +\gls{glstextformat}\marg{\meta{hyperlink-cs}\margm{target}\margm{text}} +\end{codebox} +where \meta{hyperlink-cs} is the command that generates the +hyperlink (if enabled). + +\optiondef{glsopt.textformat} +The value of this key should be the name of a control sequence (without the +leading backslash). If this option is set, the given control +sequence will be used instead of \gls{glstextformat} to encapsulate +the \idx{linktext}. Note that this control sequence should take a single +argument (the \idx{linktext}). See \sectionref{sec:glstextformat} +for further details. -\usepackage{glossaries-extra} +\begin{information} +This option will override the \catattr{textformat} attribute. +\end{information} + +\optiondef{glsopt.innertextformat} +The value of this key should be the name of a control sequence +(without the leading backslash). The command +\gls{glsxtrgenentrytextfmt} (which shouldn't be redefined) is +assigned to this control sequence at the start of the \idx{glslike} +and \idx{glstextlike} commands. This command is used within the +predefined abbreviation styles and within \gls{glsgenentryfmt} to +encapsulate the entry field values. + +\begin{information} +Custom styles that don't use \gls{glsxtrgenentrytextfmt} won't +support this key. See \sectionref{sec:innertextformat} for further +details. +\end{information} + +Some formatting commands require direct access to the actual text or +else the content has to be placed inside a box (which inhibits +line-breaking). These commands won't work with \glsopt{textformat} +as the text is usually too deeply embedded. This option provides a +way of using those problematic commands, however there's still no +guarantee that they will work (for example, in the case of custom +styles or where the field value itself contains commands). + +\optiondef{glsopt.postunset} +This option only applies to the \idx{glslike} commands and indicates +whether or not to unset the \idx{firstuseflag} after the +\idx{linktext}. It may take one of three values: \optfmt{global} +(behaves like \glsoptval{local}{false}), \optfmt{local} (behaves +like \glsoptval{local}{true}) or \optfmt{none} (doesn't unset the +\idx{firstuseflag} after the \idx{firstuse}). See +\sectionref{sec:glsunset}. + +\optiondef{glsopt.prereset} +This option may take one of three values: \optfmt{none} (no reset), +\optfmt{local} or \optfmt{global}. This option (if not \optfmt{none}) +will reset the \idx{firstuseflag} before the \idx{linktext} and +additionally change \gls{glsxtrifwasfirstuse} so that it indicates +that this was the \idx{firstuse} of the entry. See +\sectionref{sec:glsunset}. + +Note that this is different from using \gls{glslocalreset} or +\gls{glsreset} before the \idx{glstextlike} commands. Normally +\gls{glstext} and \gls{glsplural} will define +\gls{glsxtrifwasfirstuse} so that it indicates that this was not the +\idx{firstuse} of the entry (regardless of whether or not the entry +has actually been used). -\makeglossaries +For example: +\begin{codebox} +\gls{glsdefpostlink}\marg{general}\marg{\gls{glsxtrpostlinkAddDescOnFirstUse}} +\gls{newglossaryentry}\marg{sample}\marg{\gloskeyval{name}{sample}, + \gloskeyval{first}{sample first use},\gloskeyval{description}{an example}} +\cbeg{document} +Text field: \gls{glstext}\marg{sample}. +\codepar +First use: \gls{gls}\marg{sample}. Next use: \gls{gls}\marg{sample}. +\codepar +Force reset: \gls{gls}\oarg{prereset}\marg{sample}. +Used? \gls{ifglsused}\marg{sample}\marg{Yes}\marg{No}. +\codepar +Force reset: \gls{glstext}\oarg{prereset}\marg{sample}. +Used? \gls{ifglsused}\marg{sample}\marg{Yes}\marg{No}. +\cend{document} +\end{codebox} +\begin{resultbox} +\createexample[title={Illustrating the \optfmt{prereset} option}, + label={ex:prereset}, + description={Example document illustrating the use of the prereset option}] +{\usepackage{glossaries-extra}^^J% +\glsdefpostlink{general}{\glsxtrpostlinkAddDescOnFirstUse}^^J +\newglossaryentry{sample}{name={sample},^^J + first={sample first use},^^J + description={an example}} +}{% +Text field: \glstext{sample}. + +First use: \gls{sample}. Next use: \gls{sample}. + +Force reset: \gls[prereset]{sample}. +Used? \ifglsused{sample}{Yes}{No}. + +Force reset: \glstext[prereset]{sample}. +Used? \ifglsused{sample}{Yes}{No}. +} +\end{resultbox} +Note that \gls{gls} unsets the \idx{firstuseflag} (unless +\glsoptval{postunset}{none}), so the sample entry is marked as used +afterwards, but \gls{glstext} doesn't alter the \idx{firstuseflag}, +after the \idx{linktext} so the sample entry is still marked as unused afterwards. + +\optiondef{glsopt.preunset} +This option may take one of three values: \optfmt{none} (no unset), +\optfmt{local} or \optfmt{global}. This option (if not \optfmt{none}) +will unset the \idx{firstuseflag} before the \idx{linktext} and +additionally change \gls{glsxtrifwasfirstuse} so that it indicates +that this wasn't the \idx{firstuse} of the entry. See +\sectionref{sec:glsunset}. + +\begin{information} +The \glsopt{preunset} key is always performed after the +\glsopt{prereset} key. +\end{information} + +Note the effect of using a global reset but a local unset in the +example below. Both options are performed, but the unset locally +overrides the global reset. +\begin{codebox} +\gls{glsdefpostlink}\marg{general}\marg{\gls{glsxtrpostlinkAddDescOnFirstUse}} +\gls{newglossaryentry}\marg{sample}\marg{\gloskeyval{name}{sample}, + \gloskeyval{first}{sample first use},\gloskeyval{description}{an example}} +\cbeg{document} +\gls{gls}\marg{sample}. Used? \gls{ifglsused}\marg{sample}\marg{Yes}\marg{No}. +\codepar +\marg{\gls{glsfirst}\oarg{preunset=local,prereset=global}\marg{sample}. +Used? \gls{ifglsused}\marg{sample}\marg{Yes}\marg{No}. +} +\codepar +Used? \gls{ifglsused}\marg{sample}\marg{Yes}\marg{No}. +\codepar +\marg{\gls{gls}\oarg{preunset=local,prereset=global}\marg{sample}. +Used? \gls{ifglsused}\marg{sample}\marg{Yes}\marg{No}. +} +\codepar +Used? \gls{ifglsused}\marg{sample}\marg{Yes}\marg{No}. +\cend{document} +\end{codebox} +\begin{resultbox} +\createexample[title={Combining \optfmt{prereset} and \optfmt{preunset}}, + label={ex:preresetpreunset}, + description={Example document illustrating the use of the prereset + and preunset options}] +{\usepackage{glossaries-extra}^^J% +\glsdefpostlink{general}{\glsxtrpostlinkAddDescOnFirstUse}^^J +\newglossaryentry{sample}{name={sample},^^J + first={sample first use},^^J + description={an example}} +}{% +\gls{sample}. Used? \ifglsused{sample}{Yes}{No}. + +{\glsfirst[preunset=local,prereset=global]{sample}. +Used? \ifglsused{sample}{Yes}{No}. +} -\newglossaryentry{sample}{name={sample},description={an example}} +Used? \ifglsused{sample}{Yes}{No}. -\begin{document} -Some \gls{sample} text. +{\gls[preunset=local,prereset=global]{sample}. +Used? \ifglsused{sample}{Yes}{No}. +} -\printglossaries -\glsadd[thevalue={S.2}]{sample} -\end{document} -\end{verbatim} -This location value will be accepted by \app{makeindex} as it's in -the form \meta{num}\meta{sep}\meta{num}. - -If you want hyperlinks, things are more complicated. First -you need to set the \catattr{externallocation} attribute 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 doesn't match in the referencing document, 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}. +Used? \ifglsused{sample}{Yes}{No}. +} +\end{resultbox} +Remember that \gls{gls} globally unsets the \idx{firstuseflag} +(unless changed with \glsopt{postunset}), +which counteracts \glsoptval{prereset}{global}. + +\optiondef{glsopt.noindex} +This is a boolean option that determines whether or not to suppress +the normal \idx{indexing}. For example, to prevent +any \locations\ in the front matter or back matter appearing in +the glossary: +\begin{codebox} +\gls{frontmatter} +\gls{GlsXtrSetDefaultGlsOpts}\marg{\glsopt{noindex}} +\ldots +\gls{mainmatter} +\gls{GlsXtrSetDefaultGlsOpts}\marg{\glsoptval{noindex}{false}} +\ldots +\gls{backmatter} +\gls{GlsXtrSetDefaultGlsOpts}\marg{\glsopt{noindex}} +\end{codebox} +Note that if you are using auto-indexing (see +\sectionref{sec:autoindex}), \glsoptval{noindex}{false} will also +suppress the auto-indexing. + +If you are using \app{bib2gls}, you may want to consider instead using +\glsoptval{format}{glsignore} to create an ignored \location\ +that ensures the entry is selected without adding a \location\ +to the \idx{locationlist}. (Don't use this method for the other +\idx{indexing} methods as you'll end up with invisible +\locations\ with spurious commas in your \idxpl{locationlist}.) + +\optiondef{glsopt.wrgloss} +This option may take one of two values, \optfmt{before} or \optfmt{after}, +which indicate whether the \idx{indexing} should occur before or +after the \idx{linktext}. The \idx{indexing} creates a \idx{whatsit} +that can interfere with spacing or cause other problems. The other thing to +consider is where the \idx{linktext} is long, such as a phrase or +full form of an abbreviation, that may be split by a page break. +You will need to decide if you want the \idx{indexing} before the +\idx{linktext}, so that the \location\ is at the end of the page +where the text starts, or if you want the \idx{indexing} after the +\idx{linktext}, so that the \location\ is at the start of the next +page where the text ends. + +This option corresponds to a conditional: +\cmddef*{ifglsxtrinitwrglossbefore} +The hook \gls{glsxtrinitwrgloss} sets this conditional according to +whether or not the \catattr{wrgloss} attribute has been set to +\code{after}: +\begin{codebox} +\cmd{newcommand}*\marg{\gls{glsxtrinitwrgloss}}\marg{\comment{} + \gls{glsifattribute}\marg{\gls{glslabel}}\marg{wrgloss}\marg{after}\comment{} + \marg{\gls{glsxtrinitwrglossbeforefalse}}\comment{} + \marg{\gls{glsxtrinitwrglossbeforetrue}}\comment{} +} +\end{codebox} + +\optiondef{glsopt.thevalue} +Sets the \idx{entrylocation} to the given value instead of obtaining +it from the \idx{locationcounter}. If you are using \sty{hyperref} you may also +need to set the location's hypertarget with \glsopt{theHvalue}. + +\begin{information} +This option is primarily intended for use with \app{bib2gls} to supply +\locations\ that don't have an associated counter within the document, such +as an external location. If you want to automatically add locations +from a supplemental document to an entry's \idx{locationlist}, you +can use the \resourceopt{supplemental-locations} resource option. See +the \app{bib2gls} user manual for further details. +\end{information} + +For example, to \idxc{indexing}{index} a \location\ in a supplementary document: +\begin{codebox} +\gls{glsadd}\oarg{\glsoptval{thevalue}{\marg{Suppl.\cmd{ }2.45}}}\marg{sample} +\end{codebox} +This will add \qt{Suppl.\ 2.45} to the \idx{locationlist} +for the \qt{sample} entry. \begin{important} +Note that the value must conform to the \idx{indexingapp}['s] location syntax. +For \app+{makeindex}, this is limited to \code{Roman}, \code{roman}, +\code{arabic}, \code{alph} and \code{Alph}. With \app+{xindy}, the location +syntax must be defined in the \app{xindy} module (standard location syntaxes are +supplied by default). There's no restriction on the location syntax for +\app{bib2gls}, although if it can't deduce a numerical value it won't be able to +form a range. +\end{important} + +If you want a hyperlink to an external file, you can use: +\cmddef*{glsxtrsupphypernumber} +as the formatting command for the \idx{locationencap}. For example: +\begin{codebox} +\gls{glsadd}\oarg{\glsoptval{thevalue}{S.2},\glsoptval{format}{glsxtrsupphypernumber}}\marg{sample} +\end{codebox} +The path to the external file needs to be set in the +\catattr{externallocation} category attribute. + +\begin{information} 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} +\end{information} -For example, if both \texttt{sample-suppl-hyp.pdf} -and \texttt{sample-suppl-main-hyp.pdf} are in the same directory, -then viewing \texttt{sample-suppl-main-hyp.pdf} in Evince will +For example, if both \filefmt{sample-suppl-hyp.pdf} +and \filefmt{sample-suppl-main-hyp.pdf} are in the same directory, +then viewing \filefmt{sample-suppl-main-hyp.pdf} in Evince will take you to the correct location in the linked document (when you click on the S.2 external link), but Okular will take you to the top of the first page of the linked document. @@ -1841,10506 +27358,15459 @@ of the first page of the linked document. This method can only be used where there is one external source for the designated category (identified by the \catattr{externallocation} attribute). For multiple sources, you need to use -\gls{bib2gls} version 1.7+, which is the better method in general as it can -automatically fetch the relevant locations from the \texttt{.aux} +\app{bib2gls} v1.7+, which is the better method in general as it can +automatically fetch the relevant locations from the \ext{aux} files of the designated external documents without the need to -explicitly use \cs{glsadd}. - -\section{Cross-References (\qt{see} and \qt{see also})} -\label{sec:see} - -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} value 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). - -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. - -Note that even though the \gloskey{see} key will now -work for entries defined in the \env{document} environment, 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}. - -As with the base \sty{glossaries} package, \cs{glsseeformat} -is defined to do \texttt{\cs{emph}\marg{tag} \cs{glsseelist}\marg{xr -list}}. The third argument is always ignored and is present for -\app{makeindex}, which always requires a final argument to -encapsulate the associated location. The command -\begin{definition} -\ics{glsseelist}\marg{xr list} -\end{definition} -used to iterate over the list of cross-reference labels is also -unchanged from the base \sty{glossaries} package, with each item in -the list formatted according to: -\begin{definition} -\ics{glsseeitem}\marg{label} -\end{definition} -This is defined by the \sty{glossaries} package to: -\begin{alltt} -\cs{glshyperlink}[\cs{glsseeitemformat}\marg{label}]\marg{label} -\end{alltt} -So the actual formatting for each cross-referenced entry is -performed by \ics{glsseeitemformat}, which is redefined by -\sty{glossaries-extra}, as described in -\sectionref{sec:modifications}. This now displays the value -of the \gloskey{text} field for abbreviations and the value -of the \gloskey{name} field otherwise. There's no indication -of the entry hierarchy, which could confuse the reader. Therefore, -as from \sty{glossaries-extra} v1.37, there are some new commands -that include the hierarchical information. You may prefer to -redefine \cs{glsseeitemformat} to use one of this if you have -sub-entries. For example: -\begin{verbatim} -\renewcommand*{\glsseeitemformat}[1]{\glsxtrhiername{#1}} -\end{verbatim} - -The \styfmt{glossaries} package provides -\begin{definition}[\DescribeMacro\glsseeitemformat] -\cs{glsseeitemformat}\marg{label} -\end{definition} -to format items in a cross-reference list (identified with the -\gloskey{see} key or \cs{glssee}). This was originally defined to -use \cs{glsentryname}\marg{label} since it makes more sense for the -cross-reference to match the way the term appears in the glossary. -Unfortunately this caused a problem when the \gloskey{name} field -was sanitized, which used to be the default setting, so -\styfmt{glossaries} v3.0 changed the default definition of this -command to use \cs{glsentrytext} instead. Since the \gloskey{name} -and \gloskey{text} field are quite often the same, this change -usually doesn't have a noticeable effect. However, now that the -\gloskey{name} field is no longer sanitized (following the redesign -of \styfmt{glossaries} v4.0) it makes more sense to restore this -command to its original behaviour, but to take account of -abbreviations \styfmt{glossaries-extra} redefines this as: -\begin{verbatim} -\renewcommand*{\glsseeitemformat}[1]{% - \ifglshasshort{\glslabel}{\glsfmttext{#1}}{\glsfmtname{#1}}% -} -\end{verbatim} -(Note that as from \styfmt{glossaries-extra} version 1.42, this now -uses \cs{glsfmttext} and \cs{glsfmtname} instead of just referencing -the \gloskey{text} and \gloskey{name} fields. This helps to ensure -that any formatting is correctly applied.) - -If you want to restore the \styfmt{glossaries} v3.0+ definition just do: -\begin{verbatim} -\renewcommand*{\glsseeitemformat}[1]{\glsentrytext{#1}} -\end{verbatim} - -The \sty{glossaries-extra} package provides \ics{glsxtrhiername} -and its case-changing variants that may be used within -the definition of \cs{glsseeitemformat} if required. These -display the hierarchy for sub-entries rather than just the name, -which may be more helpful in cross-references. -\begin{definition}[\DescribeMacro\glsxtrhiername] -\cs{glsxtrhiername}\marg{label} -\end{definition} -performs a recursive action: -\begin{enumerate} -\item If the entry given by \meta{label} has a parent, then -\cs{glsxtrhiername}\marg{parent label} is done followed by -\cs{glsxtrhiernamesep} then: -\item If the entry given by \meta{label} is an abbreviation -(that is, it has the \gloskey{short} field set) then -the short form is displayed (using \cs{glsfmtshort}) -otherwise the name is displayed (using \cs{glsfmtname}). -\end{enumerate} -The first step above is skipped if the entry doesn't have a parent. -Each level is separated by: -\begin{definition}[\DescribeMacro\glsxtrhiernamesep] -\cs{glsxtrhiernamesep} -\end{definition} -which defaults to \qt{\glsxtrhiernamesep}. This can be redefined as -appropriate. +explicitly use \gls{glsadd}. + +\optiondef{glsopt.theHvalue} +Sets the hypertarget corresponding to the \location, which will be +used if the \glsopt{format} supports hyperlinks. This is analogous +to \sty{hyperref}['s] \theHcountername\ that provides the +hypertarget for a reference to \thecountername. + +\begin{information} +This option is primarily intended for use with the \glsopt{thevalue} option. +\end{information} + +Unless you are using \opteqvalref{record}{nameref}, you must ensure +that it's possible to form \meta{the-H-value} from +\meta{h-prefix}\meta{thevalue} for some \meta{h-prefix} (where +\meta{thevalue} is given by \glsopt{thevalue} or the value of the +\location\ counter). This restriction is due to the limitations +imposed by \app+{makeindex} and \app+{xindy}. + +\optiondef{glsopt.prefix} +This option locally redefines \gls{glolinkprefix} to \meta{link-prefix}. +If you are using \gls{printunsrtglossary} to redisplay a list (possibly in a +different order) then you will need some way of changing the entry targets to +avoid duplicate hyperlink targets. One way of achieving this is to redefine +\gls{glolinkprefix} for the subsequent lists. You will then need to use the +\glsopt{prefix} option in commands like \gls{gls} to ensure that the hyperlink +for the \idx{linktext} points to the desired list. + +\begin{information} +This option is intended for use with the \idx{unsrtfam} and +\gls{glsxtrcopytoglossary} (which is used by \app{bib2gls}). +The other \idx{indexing} methods don't support repeated lists. +\end{information} +\glsadd[format=)]{idx.glsopt}% + +\section{Case Changing} +\label{sec:casechange} + +Case-changing commands, such as \gls{Gls} and \gls{GLS}, perform the +conversion using commands provided by \sty{mfirstuc}. The underlying +commands provided by \sty{mfirstuc} were redesigned in v2.08 to use +the newer, better case-changing commands available with the \LaTeX3 +kernel. The base \sty{glossaries} package v4.50 and \sty{glossaries-extra} +v1.49 were developed concurrently with \sty{mfirstuc} v2.08 to take +advantage of the new features. Version 1.49 of +\sty{glossaries-extra} was also developed concurrently with +\app{bib2gls} v3.0 which, in turn, was developed alongside version +0.9.2.7b of the \TeX\ parser library. + +It's not possible to upload all these new versions at the same time, +so it will be necessary to stagger their deployment. The new +case-changing features will work best when all these new versions +are installed. In the interim, a reduced feature set will be used. + +\subsection{Sentence Case Commands} +\label{sec:firstuc} + +Both the base \sty{glossaries} package and the +\sty{glossaries-extra} package provide \idx{sentencecase} commands, +which convert the first letter to \idx{uppercase}. These are +provided for situations where an entry is referenced at the start of +a sentence. Sentence-casing is also implemented when the attributes +\catattr{glossname} or \catattr{glossdesc} are set to \code{firstuc}. + +The case conversion is performed using: +\cmddef{glssentencecase} +The default definition uses \gls{makefirstuc}, which is provided by +the \sty{mfirstuc} package. This was originally part of the base +\sty{glossaries} package, but was split into a separately +distributed package in 2015. Back then, there was no expandable +sentence-case command. There was also a problem with referencing +entries where \idx{linktext} was encapsulated with a text-block +command (which occurs, in particular, with acronym and abbreviation styles). +The first letter of the text-block command's argument needed to be +obtained, which resulted in some trickery that proved problematic +with \idx{utf8}. + +The \LaTeX3 kernel now provides a suitable expandable command that +works with \idx{utf8}, and \sty{mfirstuc} v2.08+ provides +\gls{MFUsentencecase} that directly interfaces with it. If an older +version of \sty{mfirstuc} is installed, \sty{glossaries} v4.50+ and +\sty{glossaries-extra} v1.49+ will provide \gls{MFUsentencecase}. You can use this in +expandable contents. For example: +\begin{codebox} +\cmd{section}\marg{\gls{MFUsentencecase}\marg{\gls{glsentrytext}\marg{label}}} +\end{codebox} +However, in the above example, it's simpler to do: +\begin{codebox} +\cmd{section}\marg{\gls{Glsfmttext}\marg{label}} +\end{codebox} +If \sty{hyperref} has been loaded, \code{\gls{Glsfmttext}\marg{label}} +will now expand to: +\begin{compactcodebox} +\gls{MFUsentencecase}\marg{\gls{glsentrytext}\marg{label}} +\end{compactcodebox} +in the PDF bookmark. + +Internally, \gls{makefirstuc} now uses \gls{MFUsentencecase} to +perform the case conversion, but it still parses its argument to +determine if it starts with \code{\meta{cs}\margm{text}}. This means +that with \sty{mfirstuc} v2.08+, you now don't have to worry about +\idx{utf8} characters occurring at the start of the text. + +For example, with \sty{mfirstuc} v2.07 you would need to do +something like: +\begin{codebox} +\gls{newglossaryentry}\marg{elite}\marg{\gloskeyval{name}{\marg{\'e}lite}, + \gloskeyval{description}{...}} +\end{codebox} +in order for \code{\gls{Gls}\marg{elite}} to work. Whereas with +\sty{mfirstuc} v2.08, you can now simply do: +\begin{codebox} +\gls{newglossaryentry}\marg{elite}\marg{\gloskeyval{name}{\'elite}, + \gloskeyval{description}{...}} +\end{codebox} +(As from \sty{glossaries} v4.47, it should be possible to use +\idx{utf8} characters in the label as well.) + +Whilst you can redefine \gls{glssentencecase} to use +\gls{MFUsentencecase} directly (without using \gls{makefirstuc} as +an intermediary), this may result in content being expanded that +wouldn't have been expanded previously. In particularly, if +\meta{cs} isn't robust and expands to content that includes labels +then the case-change can fail. You also won't be able to take +advantage of the blockers and mappings that are only recognised as +such by \gls{makefirstuc}. If you use \gls{MFUsentencecase} instead, +blockers and mappings will be treated as exclusions, which are +likely to result in unwanted side-effects. + +Both \gls{makefirstuc} and \gls{MFUsentencecase} recognise +exclusions. These are text-block commands which take a single +mandatory argument that needs to be skipped. For example, in the +following \code{\gls{glsadd}\marg{example}} needs to be skipped: +\begin{codebox} +\gls{MFUsentencecase}\marg{\gls{glsadd}\marg{example}some text} +\end{codebox} +Exclusions are identified with \gls{MFUexcl}. If you have an older +version of \sty{mfirstuc}, this won't be defined, so +\sty{glossaries} v4.50+ and \sty{glossaries-extra} v1.49+ provide: +\cmddef{glsmfuexcl} +This will use \gls{MFUexcl} with \sty{mfirstuc} v2.08+. +With older versions, a definition will be provided that works with +\gls{MFUsentencecase}, but exclusions won't be recognised by +\gls{makefirstuc}. + +As from \sty{glossaries} v4.50, \gls{glsadd} will +be identified as an exclusion (via \gls{glsmfuexcl}), but the +optional argument will cause a problem if present. See the +\sty{mfirstuc} v2.08+ manual for a workaround. Note that commands +such as \gls{glsaddall} and \gls{glsaddeach} aren't identified as +exclusions as they aren't expected to occur in text that may require +a case-change. + +With glossary entry references, there are commands +that take a label as the argument, which shouldn't have any +case-changed applied, but also shouldn't be skipped. For example: +\begin{codebox} +\gls{makefirstuc}\marg{\gls{GLS}\marg{example} something} +\end{codebox} +In this situation, there shouldn't be any case-change as \gls{GLS} +already implements a case-change. This type of command is referred +to as a blocker in the \sty{mfirstuc} manual, as it indicates a +command that should prevent any case-change if it's encountered at +the start of the text. Blockers are identified with \gls{MFUblocker}. +If you have an older version of \sty{mfirstuc}, this won't be +defined, so \sty{glossaries} v4.50+ and \sty{glossaries-extra} +v1.49+ provide: +\cmddef{glsmfublocker} +This will use \gls{MFUblocker} with \sty{mfirstuc} v2.08+. +With older versions, it will simply use \gls{glsmfuexcl} which will +instead identify the command as an exclusion and won't be recognised +by \gls{makefirstuc}. See the \sty{mfirstuc} v2.08+ manual for +further information about blockers. + +As from \sty{glossaries} v4.50+, commands like \gls{GLS} will be +identified as blockers using \gls{glsmfublocker}, and +\sty{glossaries-extra} now identifies similar commands, such as +\gls{rGLS} as blockers. + +Finally, there are mappings. These are commands that should be +substituted with another command, which is expected to perform the +case-change. For example: +\begin{codebox} +\gls{makefirstuc}\marg{\gls{gls}\marg{example} something} +\end{codebox} +This shouldn't skip or block \gls{gls} but instead should convert +the text to: +\begin{codebox} +\gls{Gls}\marg{example} something +\end{codebox} +This is implemented by adding a mapping from \gls{gls} to \gls{Gls}. +Mappings are added using \gls{MFUaddmap}. +If you have an older version of \sty{mfirstuc}, this won't be +defined, so \sty{glossaries} v4.50+ and \sty{glossaries-extra} +v1.49+ provide: +\cmddef{glsmfuaddmap} +This will use \gls{MFUaddmap} with \sty{mfirstuc} v2.08+. +With older versions, it will simply use \gls{glsmfuexcl} which will +instead identify the command as an exclusion and won't be recognised +by \gls{makefirstuc}. See the \sty{mfirstuc} v2.08+ manual for +further information about mappings. + +As from \sty{glossaries} v4.50+, commands like \gls{gls} will be +mapped to the appropriate \idx{sentencecase} command using +\gls{glsmfuaddmap}, and \sty{glossaries-extra} now identifies +similar mappings, such as \gls{rgls} mapped to \gls{rGls}. + +In order to integrate the full set of features provided by +\sty{mfirstuc} v2.08+, you will need both \sty{glossaries} v4.50+ +and \sty{glossaries-extra} v1.49+. + +\subsection{Lower Case} +\label{sec:lowercase} + +\cmddef{glslowercase} +This is defined by \sty{glossaries} v4.50+ to use the \LaTeX3 command +to convert to \idx+{lowercase}. If an older version of +\sty{glossaries} is present, then this command will be provided by +\sty{glossaries-extra} but it will be defined to use +\gls{MakeTextLowercase} instead. This command is primarily provided for use +with \idx{smallcaps} styles to convert an abbreviation to +\idx{lowercase}, but isn't actually used anywhere by default. + +\subsection{Upper Case} +\label{sec:uppercase} + +\cmddef{glsuppercase} +This is defined by \sty{glossaries} v4.50+ to use the \LaTeX3 command +to convert to \idx+{uppercase} (\idx+{allcaps}). If an older version of +\sty{glossaries} is present, then this command will be provided by +\sty{glossaries-extra} but it will be defined to just use +\gls{mfirstucMakeUppercase}, which is provided by \sty{mfirstuc}. +This command is used by \idx{allcaps} commands such as +\gls{GLSxtrusefield}. + +\subsection{Title Case} +\label{sec:titlecase} + +\cmddef{glscapitalisewords} +This is defined by \sty{glossaries} v4.48 to use \gls{capitalisewords} +to convert to \idx+{titlecase}. If you experience any errors with +\idx{titlecase} commands, such as \gls{glsentrytitlecase}, or +attributes such as \catattr{glossdesc} then try redefining +this command to use \code{\gls{capitalisefmtwords}*} instead. See the +\sty{mfirstuc} manual for further details. + +\section{Entries in Sectioning Titles, Headers, Captions and Contents} +\label{sec:headtitle} -There are some case-changing variants: -\begin{definition}[\DescribeMacro\Glsxtrhiername] -\cs{Glsxtrhiername}\marg{label} -\end{definition} -The top-level has the first letter changed to upper case -(either \cs{Glsfmtshort} or \cs{Glsfmtname}). There's -no case-change for sub-entries. - -\begin{definition}[\DescribeMacro\GlsXtrhiername] -\cs{GlsXtrhiername}\marg{label} -\end{definition} -All levels have the first letter changed to upper case -(either \cs{Glsfmtshort} or \cs{Glsfmtname}). - -\begin{definition}[\DescribeMacro\GLSxtrhiername] -\cs{GLSxtrhiername}\marg{label} -\end{definition} -The top-level is converted to upper case -(either \cs{GLSfmtshort} or \cs{GLSfmtname}). There's -no case-change for sub-entries. - -\begin{definition}[\DescribeMacro\GLSXTRhiername] -\cs{GLSXTRhiername}\marg{label} -\end{definition} -All levels are converted to upper case -(either \cs{GLSfmtshort} or \cs{GLSfmtname}). - -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. - -As from v1.16, there's a separate \gloskey{seealso} key. Unlike -\gloskey{see}, this doesn't have an optional part for the textual -tag. The syntax \texttt{seealso=\marg{xr-labels}} works in much the same way as using -\texttt{see=[\cs{seealsoname}]\marg{xr-labels}} but the information -is stored in a separate field. If you need a different tag, use the -\gloskey{see} key instead (or redefine \cs{seealsoname} or -\cs{glsxtruseseealsoformat}, described below). - -You can display the formatted list of -cross-references stored in the \gloskey{seealso} key using: -\begin{definition}[\DescribeMacro\glsxtruseseealso] -\cs{glsxtruseseealso}\marg{label} -\end{definition} -This works in much the same way as \cs{glsxtrusesee} -but it internally uses -\begin{definition}[\DescribeMacro\glsxtruseseeformat] -\cs{glsxtruseseealsoformat}\marg{xr list} -\end{definition} -For example: -\begin{verbatim} -\renewcommand*{\glsxtrpostdescgeneral}{% - \ifglshasfield{see}{\glscurrententrylabel} - {, \glsxtrusesee{\glscurrententrylabel}}% - {}% - \ifglshasfield{seealso}{\glscurrententrylabel} - { (\glsxtruseseealso{\glscurrententrylabel})}% - {}% -} -\end{verbatim} - -The \gloskey{alias} key only contains a single label not a list, but -if you want to ensure consistent formatting with \cs{glsxtrusesee} -and \cs{glsxtruseseealso} you can use (from v1.42): -\begin{definition}[\DescribeMacro\glsxtrusealias] -\cs{glsxtrusealias}\marg{label} -\end{definition} - -The actual unformatted comma-separated list \meta{xr-list} -stored in the \gloskey{seealso} field can be accessed with: -\begin{definition}[\DescribeMacro\glsxtrseealsolabels] -\cs{glsxtrseealsolabels}\marg{label} -\end{definition} -This will just expand to the \meta{xr-labels} provided in the value -of the \gloskey{seealso} key. There's no corresponding command to -access the \gloskey{see} field. If you really need to access it, you -can use commands like \cs{glsxtrfielduse}, but remember that it -may start with \oarg{tag}, so it can't be automatically treated -as a simple comma-separated list. - -As mentioned above, the base \styfmt{glossaries} package provides \ics{glsseelist}, -which requires a comma-separated list of labels as the argument. -The argument isn't fully expanded, so it's not suitable to use, for -example, \cs{glsxtrseealsolabels}\marg{label} as the argument. -For convenience, \styfmt{glossaries-extra} provides -\begin{definition}[\DescribeMacro\glsxtrseelist] -\cs{glsxtrseelist}\marg{xr list} -\end{definition} -which fully expands its argument and passes it to \cs{glsseelist}. - -As from v1.47, \styfmt{glossaries-extra} redefines \cs{glsseelist} -to make it more flexible. The base package provides -\cs{glsseeitem}\marg{label} which is used to format each element in -the list and \cs{glsseelastsep} for the separator between the final -two items (\cs{glsseesep} is used between the other items). The -modifications provide two additional commands: -\begin{definition}[\DescribeMacro\glsseefirstitem] -\cs{glsseefirstitem}\marg{label} -\end{definition} -This defaults to \cs{glsseeitem}\marg{label} and is used to format -the first label in the list. -\begin{definition}[\DescribeMacro\glsseelastoxfordsep] -\cs{glsseelastoxfordsep} -\end{definition} -This defaults to \cs{glsseelastsep} and is used if the list consists -of three or more labels. - -The \gloskey{seealso} key implements the automatic indexing using -\begin{definition}[\DescribeMacro\glsxtrindexseealso] -\cs{glsxtrindexseealso}\marg{label}\marg{xr list} -\end{definition} -which just does -\begin{alltt} -\cs{glssee}[\cs{seealsoname}]\marg{label}\marg{xr list} -\end{alltt} -unless the \pkgopt{xindy} option is used with \sty{glossaries} -v4.30+, in which case a distinct \texttt{seealso} cross-reference -class is used instead. - -The command that produces this \qt{see also} text is -\begin{definition}[\DescribeMacro\seealsoname] -\cs{seealsoname} -\end{definition} -If \ics{alsoname} (provided by language packages) is defined then -\cs{seealsoname} will simply be defined to \cs{alsoname} otherwise -it will be defined to \texttt{see also}. - -The language-sensitive \cs{alsoname} is used by general indexing -packages, such as \sty{makeidx}, so if you redefine \cs{alsoname} -the change will apply to normal indexes as well as glossaries. If -you only want to change the text produced by the \gloskey{seealso} -key without affecting general indexing (with \cs{index}) then -redefine \cs{seealsoname} instead. - -\section{Entry Display Style Modifications} -\label{sec:entryfmtmods} +The \sty{glossaries} user manual cautions against using commands +like \gls{gls} in chapter or section titles. The principle problems +are: +\begin{itemize} +\item if you have a table of contents, the \idx{firstuseflag} +will be unset in the contents rather than later in the document; -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. +\item if you have the \idxpl{locationlist} displayed in the +\idx{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); -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: +\item if the page style in use adds the chapter or section title to +the header and attempts to convert it to \idx{uppercase}, the entry label +(in the argument of \gls{gls} etc) will be converted to \idx{uppercase} +and the entry won't be recognised; -\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}). +\item if you use \sty{hyperref}, commands like \gls{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). -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 is applied to all linking commands -for all entries, unless overridden by the \catattr{textformat} -attribute. +The \sty{glossaries-extra} package tries to resolve the header +problem by modifying \gls{markright}, \gls{markboth} and \gls{@starttoc}. +If this causes unwanted side-effects, you can restore their former +definitions using: +\cmddef{glsxtrRevertMarks} +This will revert \gls{markright}, \gls{markboth} and \gls{@starttoc} +back to the definitions in effect when \sty{glossaries-extra} was +loaded. Alternatively, you can use: +\cmddef{glsxtrRevertTocMarks} +This will only revert \gls{@starttoc}. + +If you use \gls{glsxtrRevertMarks} or \gls{glsxtrRevertTocMarks}, +you will need to employ the simplistic approach, described in +\sectionref{sec:simplisticapproach}, which is the method recommended +by the \sty{glossaries} user manual. Otherwise, you can use the +commands described in \sectionref{sec:headingcommands}, which +provide a better solution. + +\subsection{Simplistic Approach} +\label{sec:simplisticapproach} + +To get around all these problems, the \sty{glossaries} user manual +recommends using the expandable non-hyperlink commands, such as +\gls{glsentrytext} (for regular entries) or \gls{glsentryshort} +(for abbreviations). This is the simplest solution, but doesn't +allow for special formatting that's applied to the entry through +commands like \gls{glstext} or \gls{glsxtrshort}. 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, for example, provide a custom -attribute called \texttt{font}: -\begin{verbatim} -\glssetcategoryattribute{general}{font}{sf} - -\renewcommand*{\glsxtrregularfont}[1]{% - \glsifattribute{\glslabel}{font}{sf}{\textsf{#1}}{#1}} -\end{verbatim} -As from version 1.21, it's simpler to just do, for example: -\begin{verbatim} -\glssetcategoryattribute{general}{textformat}{textsf} -\end{verbatim} -without redefining \cs{glsxtrregularfont}. - -As from version 1.30, there is also a command for abbreviations -that encapsulates \cs{glsxtrgenabbrvfmt}: -\begin{definition}[\DescribeMacro\glsxtrabbreviationfont] -\cs{glsxtrabbreviationfont}\marg{text} -\end{definition} -This also just does its argument by default. Font changes -made by abbreviation styles are within \meta{text}. - -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. - -It may be that you want to check some other setting (rather -than a category attribute) to determine whether or not to discard -a following full stop. In which case you can redefine: -\begin{definition}[\DescribeMacro\glsxtrifcustomdiscardperiod] -\cs{glsxtrifcustomdiscardperiod}\marg{true}\marg{false} -\end{definition} -You can access the field's label using \cs{glslabel}. -This command should do \meta{true} if the post-link hook -should check if a period follows and \meta{false} otherwise. -The default definition is simply: -\begin{verbatim} -\newcommand*{\glsxtrifcustomdiscardperiod}[2]{#2} -\end{verbatim} -which means that no additional checks are performed. -(Only the recognised category attributes will be checked.) +\begin{codebox} +\cmd{documentclass}\marg{article} +\codepar +\cmd{usepackage}[colorlinks]\marg{hyperref} +\cmd{usepackage}\marg{glossaries-extra} +\codepar +\gls{glsdefpostlink}\marg{general}\marg{\gls{glsxtrpostlinkAddDescOnFirstUse}} +\codepar +\gls{newglossaryentry}\marg{sample}\marg{\gloskeyval{name}{sample}, + \gloskeyval{description}{an example}} +\gls{newglossaryentry}\marg{alpha}\marg{\gloskeyval{name}{\cmd{ensuremath}\marg{\cmd{alpha}}},\gloskeyval{description}{alpha}} +\codepar +\cbeg{document} +\gls{tableofcontents} +\cmd{section}\marg{\gls{texorpdfstring}\marg{\gls{Glsentrytext}\marg{sample} + and \gls{glsentrytext}\marg{alpha}}\marg{Sample and alpha}} +\codepar +First use: \gls{gls}\marg{sample} and \gls{gls}\marg{alpha}. +\codepar +Next use: \gls{gls}\marg{sample} and \gls{gls}\marg{alpha}. +\codepar +\gls{printunsrtglossary} +\cend{document} +\end{codebox} +\begin{resultbox} +\createexample*[arara={pdflatex,pdflatex,pdfcrop}, + label={ex:simpleseccmds}, + title={References in section headings (simplistic approach)}, + description={Example document that uses a simplistic approach to + referencing entries in section titles}] +{\cmd{usepackage}[colorlinks]\marg{hyperref}^^J% + \cmd{usepackage}\marg{glossaries-extra}^^J% + \codepar + \gls{glsdefpostlink}\marg{general}\marg{\gls{glsxtrpostlinkAddDescOnFirstUse}}^^J% + \codepar + \gls{newglossaryentry}\marg{sample}\marg{\gloskeyval{name}{sample},\gloskeyval{description}{an example}}^^J% + \gls{newglossaryentry}\marg{alpha}\marg{\gloskeyval{name}{\cmd{ensuremath}\marg{\cmd{alpha}}},\gloskeyval{description}{alpha}} +} +{% + \gls{tableofcontents}^^J% + \cmd{section}\marg{\gls{texorpdfstring}\marg{\gls{Glsentrytext}\marg{sample} +and \gls{glsentrytext}\marg{alpha}}\marg{Sample and alpha}}^^J% + \codepar + First use: \gls{gls}\marg{sample} and \gls{gls}\marg{alpha}.^^J% + \codepar + Next use: \gls{gls}\marg{sample} and \gls{gls}\marg{alpha}.^^J% + \codepar + \gls{printunsrtglossary} +} +\end{resultbox} +This solves some problems: it avoids nested links in the table of +contents, the \idx{firstuseflag} isn't prematurely unset and the PDF +bookmarks has a reasonable substitution, but it still isn't a +complete solution as the above document will fail if the page style +is changed to \code{headings} and a page break is inserted before +the section (after \gls{tableofcontents}), which will lead to the error: +\begin{transcript} +Glossary entry `SAMPLE' has not been defined. +\end{transcript} +This is because the case-change applied to the header converts +the label \qt{sample} to \qt{SAMPLE}, which doesn't correspond to a +defined entry. (This can now be avoided with \sty{mfirstuc} v2.08+.) + +If the case conversion is applied by, then the case-change can +be prevented by encapsulating the label with \gls{NoCaseChange}, but +this ends up quite complicated. This is actually what the commands +describe in \sectionref{sec:headingcommands} do when they are in a +heading. This allows for older versions of \sty{mfirstuc} that don't +recognise exclusions. See \sectionref{sec:casechange} for further +details. -\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} +\begin{information} +The \gls{NoCaseChange} command was originally provided by the +\sty{textcase} package to prevent \gls{MakeTextUppercase} from +applying a case-change. The functionality of the \sty{textcase} +package has now been absorbed into the \LaTeX\ kernel, which means +that as from 2022, \sty{textcase} is deprecated and +\gls{NoCaseChange} is defined by the kernel. +\end{information} + +\subsection{New Commands Designed for Chapter/Section Headings or Captions} +\label{sec:headingcommands} -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.) +This section is irrelevant if you use \gls{glsxtrRevertMarks} to +restore the definitions of \gls{markright}, +\gls{markboth} and \gls{@starttoc}. If you use +\gls{glsxtrRevertTocMarks}, then this section is only applicable to +\gls{markright} and \gls{markboth}. + +The commands listed here are provided for use within captions or +section headings. They are designed to overcome some of the problems +illustrated in the previous section. Note that they +only have a single argument, the entry label. There are no optional +arguments. Below, \qt{header} refers to page header text added with +\gls{markright} or \gls{markboth}, and \qt{contents} refers to the +table of contents or any other \qt{list of} that uses +\gls{@starttoc}, such as the list of figures. + +Each command \csfmt{glsfmt\meta{field}} (such as \gls{glsfmttext} or +\gls{glsfmtshort}) behaves like an analogous +\csfmt{gls\meta{field}} or \csfmt{glsxtr\meta{field}} command (such +as \gls{glstext} or \gls{glsxtrshort}) but with the options +\glsopt{noindex} and \glsoptval{hyper}{false} and no insert. +When they occur within a header, they are protected from having any +case-change applied (which will interfere with the entry label). +Since this means they won't appear in \idx{allcaps} in the header, +the \catattr{headuc} attribute may be set to use the +\idx{allcaps} \csfmt{GLS\meta{field}} or \csfmt{GLSxtr\meta{field}} instead (such +as \gls{GLStext} or \gls{GLSxtrshort}). + +There is currently only support for the \gloskey{name}, +\gloskey{text}, \gloskey{plural}, \gloskey{first}, +\gloskey{firstplural}, \gloskey{short}, \gloskey{shortplural}, +\gloskey{long}, and \gloskey{longplural} fields, and also limited +support for the full form of abbreviations. For other fields, you +will need to follow the recommendation of the \sty{glossaries} +manual (as discussed above in \sectionref{sec:simplisticapproach}). + +The previous example can be rewritten as follows: +\begin{codebox} +\cmd{documentclass}\marg{article} +\codepar +\cmd{usepackage}[colorlinks]\marg{hyperref} +\cmd{usepackage}\marg{glossaries-extra} +\codepar +\gls{glsdefpostlink}\marg{general}\marg{\gls{glsxtrpostlinkAddDescOnFirstUse}} +\codepar +\gls{newglossaryentry}\marg{sample}\marg{\gloskeyval{name}{sample},\gloskeyval{description}{an example}} +\gls{newglossaryentry}\marg{alpha}\marg{\gloskeyval{name}{\cmd{ensuremath}\marg{\cmd{alpha}}}, + \gloskeyval{description}{alpha}} +\codepar +\cbeg{document} +\gls{tableofcontents} +\cmd{section}\marg{\gls{Glsfmttext}\marg{sample} and \gls{glsfmttext}\marg{alpha}} +\codepar +First use: \gls{gls}\marg{sample} and \gls{gls}\marg{alpha}. +\codepar +Next use: \gls{gls}\marg{sample} and \gls{gls}\marg{alpha}. +\codepar +\gls{printunsrtglossary} +\cend{document} +\end{codebox} +\begin{resultbox} +\createexample*[arara={pdflatex,pdflatex,pdfcrop}, + label={ex:glsfmttext}, + title={References in section headings using \cmd{glsfmttext}}, + description={Example document that references entries in section titles}] +{\cmd{usepackage}[colorlinks]\marg{hyperref}^^J% + \cmd{usepackage}\marg{glossaries-extra}^^J% + \codepar + \gls{glsdefpostlink}\marg{general}\marg{\gls{glsxtrpostlinkAddDescOnFirstUse}}^^J% + \codepar + \gls{newglossaryentry}\marg{sample}\marg{\gloskeyval{name}{sample},\gloskeyval{description}{an example}}^^J% + \gls{newglossaryentry}\marg{alpha}\marg{\gloskeyval{name}{\cmd{ensuremath}{\cmd{alpha}}},\gloskeyval{description}{alpha}} +} +{% +\gls{tableofcontents} +\cmd{section}\marg{\gls{Glsfmttext}\marg{sample} and \gls{glsfmttext}\marg{alpha}} +\codepar +First use: \gls{gls}\marg{sample} and \gls{gls}\marg{alpha}. +\codepar +Next use: \gls{gls}\marg{sample} and \gls{gls}\marg{alpha}. +\codepar +\gls{printunsrtglossary} +} +\end{resultbox} +Note that this still results in \qt{Token not allowed in a PDF +string} warnings from \sty{hyperref}. This is due to the maths shift and +\csfmt{alpha}, and is something that would also occur if the section +title explicitly contained \code{\$\cmd{alpha}\$}. If this is likely +to happen, the issue can be solved by placing +\gls{texorpdfstring} within the field value. For example: +\begin{codebox} +\gls{glsnoexpandfields} +\gls{newglossaryentry}\marg{alpha}\marg{\gloskeyval{description}{alpha}, + \gloskeyval{name}{\gls{texorpdfstring}\marg{\cmd{ensuremath}\marg{\cmd{alpha}}}\marg{alpha}}} +\end{codebox} +Note the need to prevent field expansion with \gls{glsnoexpandfields}, otherwise +\gls{texorpdfstring} will be prematurely expanded while the entry is being +defined. + +The options \glsopt{noindex} and \glsoptval{hyper}{false} are +hard-coded when the commands listed below, such as +\gls{glsfmtshort}, occur in the header or contents, but within the +actual section title or caption in the document text, those options +are obtained from: +\cmddef{glsxtrtitleopts} +This simply expands to the option list. For example, you may +actually want a hyperlink and \idx{indexing} to occur in the +document body, in which case redefine \gls{glsxtrtitleopts} to do +nothing: +\begin{codebox} +\cmd{documentclass}\marg{article} +\codepar +\cmd{usepackage}[colorlinks]\marg{hyperref} +\cmd{usepackage}\marg{glossaries-extra} +\codepar +\gls+{pagestyle}\marg{headings} +\gls{glssetcategoryattribute}\marg{general}\marg{headuc}\marg{true} +\gls{glsdefpostlink}\marg{general}\marg{\gls{glsxtrpostlinkAddDescOnFirstUse}} +\codepar +\gls{newglossaryentry}\marg{sample}\marg{\gloskeyval{name}{sample},\gloskeyval{description}{an example}} +\cmd{renewcommand}\marg{\gls{glsxtrtitleopts}}\marg{} +\codepar +\cbeg{document} +\cmd{section}\marg{\gls{Glsfmttext}\marg{sample}} +First use: \gls{gls}\marg{sample}. +Next use: \gls{gls}\marg{sample}. +\gls{printunsrtglossary} +\cend{document} +\end{codebox} +\begin{resultbox} +\createexample*[arara={pdflatex,pdfcrop}, + label={ex:glslinkinsechead}, + title={Reference with hyperlink in section headings}, + description={Example document that references an entry with a hyperlink in a section title}] +{\cmd{usepackage}[colorlinks]\marg{hyperref}^^J% + \cmd{usepackage}\marg{glossaries-extra}^^J% + \codepar + \cmd{pagestyle}\marg{headings}^^J% + \gls{glssetcategoryattribute}\marg{general}\marg{headuc}\marg{true}^^J% + \gls{glsdefpostlink}\marg{general}\marg{\gls{glsxtrpostlinkAddDescOnFirstUse}}^^J% + \codepar + \gls{newglossaryentry}\marg{sample}\marg{\gloskeyval{name}{sample},\gloskeyval{description}{an example}}^^J% + \cmd{renewcommand}\marg{\gls{glsxtrtitleopts}}\marg{} +} +{% +\cmd{section}\marg{\gls{Glsfmttext}\marg{sample}}^^J% +First use: \gls{gls}\marg{sample}. +Next use: \gls{gls}\marg{sample}. +\codepar +\gls{printunsrtglossary} +} +\end{resultbox} -You can define the post-link hook command using \cs{newcommand}, for -example: -\begin{verbatim} -\newcommand*{\glsxtrpostlinkgeneral}{% - \glsxtrpostlinkAddDescOnFirstUse -} -\end{verbatim} -or, as from v1.31, you can use -\begin{definition}[\DescribeMacro\glsdefpostlink] -\cs{glsdefpostlink}\marg{category}\marg{definition} -\end{definition} -This is simply a shortcut for: -\begin{alltt} -\cs{csdef}\{glsxtrpostlink\meta{category}\}\marg{definition} -\end{alltt} -Note that it doesn't check if the command has already 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}. (Does nothing if the symbol hasn't been set.) - -\begin{definition}[\DescribeMacro\glsxtrpostlinkAddSymbolDescOnFirstUse] -\cs{glsxtrpostlinkAddSymbolDescOnFirstUse} -\end{definition} -(New to v1.31.) On \gls{firstuse}, -this will append \cs{space}(\meta{symbol}, \meta{description}) if -the symbol is defined otherwise it just appends -\cs{space}(\meta{description}). - -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. +% short -\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} +\cmddef{glsfmtshort} +This normally behaves like \gls{glsxtrshort} but expands to just +\gls{glsentryshort} in PDF bookmarks and is adjusted when appearing +in the header or contents. + +\cmddef{Glsfmtshort} +This normally behaves like \gls{Glsxtrshort} but expands to: +\begin{compactcodebox} +\gls{MFUsentencecase}\marg{\gls{glsentryshort}\margm{entry-label}} +\end{compactcodebox} +in PDF bookmarks and is adjusted when appearing in the header or contents. + +\cmddef{GLSfmtshort} +This normally behaves like \gls{GLSxtrshort} but expands to just +\gls{glsentryshort} in PDF bookmarks and is adjusted when appearing +in the header or contents. + +% prefix short + +\cmddef{pglsfmtshort} +As \gls{glsfmtshort} but inserts the \gloskey{prefix} field +and separator, if the \gloskey{prefix} value is set and non-empty. +Provided for use with \sty{glossaries-prefix}. -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}}}{}% +\cmddef{Pglsfmtshort} +As \gls{pglsfmtshort} but \idx{sentencecase}. Note the initial +\qt{P} in the command name, which matches \gls{Pgls} (similarly for +the other prefix \idx{sentencecase} commands). + +\cmddef{PGLSfmtshort} +As \gls{pglsfmtshort} but \idx{allcaps}. + +% short plural + +\cmddef{glsfmtshortpl} +This normally behaves like \gls{glsxtrshortpl} but expands to just +\gls{glsentryshortpl} in PDF bookmarks and is adjusted when appearing +in the header or contents. + +\cmddef{Glsfmtshortpl} +This normally behaves like \gls{Glsxtrshortpl} but expands to: +\begin{compactcodebox} +\gls{MFUsentencecase}\marg{\gls{glsentryshortpl}\margm{entry-label}} +\end{compactcodebox} +in PDF bookmarks and is adjusted when appearing in the header or contents. + +\cmddef{GLSfmtshortpl} +This normally behaves like \gls{GLSxtrshortpl} but expands to just +\gls{glsentryshortpl} in PDF bookmarks and is adjusted when appearing +in the header or contents. + +% prefix short plural + +\cmddef{pglsfmtshortpl} +As \gls{glsfmtshortpl} but inserts the \gloskey{prefixplural} field +and separator, if the \gloskey{prefixplural} value is set and non-empty. +Provided for use with \sty{glossaries-prefix}. + +\cmddef{Pglsfmtshortpl} +As \gls{pglsfmtshortpl} but \idx{sentencecase}. + +\cmddef{PGLSfmtshortpl} +As \gls{pglsfmtshortpl} but \idx{allcaps}. + +% long + +\cmddef{glsfmtlong} +This normally behaves like \gls{glsxtrlong} but expands to just +\gls{glsentrylong} in PDF bookmarks and is adjusted when appearing +in the header or contents. + +\cmddef{Glsfmtlong} +This normally behaves like \gls{Glsxtrlong} but expands to: +\begin{compactcodebox} +\gls{MFUsentencecase}\marg{\gls{glsentrylong}\margm{entry-label}} +\end{compactcodebox} +in PDF bookmarks and is adjusted when appearing in the header or contents. + +\cmddef{GLSfmtlong} +This normally behaves like \gls{GLSxtrlong} but expands to just +\gls{glsentrylong} in PDF bookmarks and is adjusted when appearing +in the header or contents. + +% prefix long + +\cmddef{pglsfmtlong} +As \gls{glsfmtlong} but inserts the \gloskey{prefixfirst} field +and separator, if the \gloskey{prefixfirst} value is set and non-empty. +Provided for use with \sty{glossaries-prefix}. + +\cmddef{Pglsfmtlong} +As \gls{pglsfmtlong} but \idx{sentencecase}. + +\cmddef{PGLSfmtlong} +As \gls{pglsfmtlong} but \idx{allcaps}. + +% long plural + +\cmddef{glsfmtlongpl} +This normally behaves like \gls{glsxtrlongpl} but expands to just +\gls{glsentrylongpl} in PDF bookmarks and is adjusted when appearing +in the header or contents. + +\cmddef{Glsfmtlongpl} +This normally behaves like \gls{Glsxtrlongpl} but expands to: +\begin{compactcodebox} +\gls{MFUsentencecase}\marg{\gls{glsentrylongpl}\margm{entry-label}} +\end{compactcodebox} +in PDF bookmarks and is adjusted when appearing in the header or contents. + +\cmddef{GLSfmtlongpl} +This normally behaves like \gls{GLSxtrlongpl} but expands to just +\gls{glsentrylongpl} in PDF bookmarks and is adjusted when appearing +in the header or contents. + +% prefix long plural + +\cmddef{pglsfmtlongpl} +As \gls{glsfmtlongpl} but inserts the \gloskey{prefixfirstplural} field +and separator, if the \gloskey{prefixfirstplural} value is set and non-empty. +Provided for use with \sty{glossaries-prefix}. + +\cmddef{Pglsfmtlongpl} +As \gls{pglsfmtlongpl} but \idx{sentencecase}. + +\cmddef{PGLSfmtlongpl} +As \gls{pglsfmtlongpl} but \idx{allcaps}. + +% full + +The full form is slightly different as it doesn't correspond to an +individual \idx{field} but instead is formed from a combination of the +short and long \idxpl{field} (the order depending on the abbreviation style). +Since it's too complicated to simply expand to the appropriate +style, a simple expandable command is provided for the PDF +bookmarks: +\cmddef{glspdffmtfull} +This just expands to the long form followed by the short form in +parentheses: +\begin{compactcodebox} +\cmd{newcommand}*\marg{\gls{glspdffmtfull}}[1]\marg{\gls{glsentrylong}\marg{\#1} + (\gls{glsentryshort}\marg{\#1})} +\end{compactcodebox} +You will need to redefine this if you require the short form first. +There is an analogous command for the plural: +\cmddef{glspdffmtfullpl} +This has a similar definition to \gls{glspdffmtfull} but uses +\gls{glsentrylongpl} and \gls{glsentryshortpl}. + +\cmddef{glsfmtfull} +This normally behaves like \gls{glsxtrfull} but expands to just +\gls{glspdffmtfull} in PDF bookmarks and is adjusted when appearing +in the header or contents. + +\cmddef{Glsfmtfull} +This normally behaves like \gls{Glsxtrfull} but expands to: +\begin{compactcodebox} +\gls{MFUsentencecase}\marg{\gls{glspdffmtfull}\margm{entry-label}} +\end{compactcodebox} +in PDF bookmarks and is adjusted when appearing in the header or contents. + +\cmddef{GLSfmtfull} +This normally behaves like \gls{GLSxtrfull} but expands to just +\gls{glspdffmtfull} in PDF bookmarks and is adjusted when appearing +in the header or contents. + +% full plural + +\cmddef{glsfmtfullpl} +This normally behaves like \gls{glsxtrfullpl} but expands to just +\gls{glspdffmtfullpl} in PDF bookmarks and is adjusted when appearing +in the header or contents. + +\cmddef{Glsfmtfullpl} +This normally behaves like \gls{Glsxtrfullpl} but expands to: +\begin{compactcodebox} +\gls{MFUsentencecase}\marg{\gls{glspdffmtfullpl}\margm{entry-label}} +\end{compactcodebox} +in PDF bookmarks and is adjusted when appearing in the header or contents. + +\cmddef{GLSfmtfullpl} +This normally behaves like \gls{GLSxtrfull} but expands to just +\gls{glspdffmtfull} in PDF bookmarks and is adjusted when appearing +in the header or contents. + +% name + +\cmddef{glsfmtname} +This normally behaves like \gls{glsname} but expands to just +\gls{glsentryname} in PDF bookmarks and is adjusted when appearing +in the header or contents. + +\cmddef{Glsfmtname} +This normally behaves like \gls{Glsname} but expands to: +\begin{compactcodebox} +\gls{MFUsentencecase}\marg{\gls{glsentryname}\margm{entry-label}} +\end{compactcodebox} +in PDF bookmarks and is adjusted when appearing +in the header or contents. + +\cmddef{GLSfmtname} +This normally behaves like \gls{GLSname} but expands to just +\gls{glsentryname} in PDF bookmarks and is adjusted when appearing +in the header or contents. + +% text + +\cmddef{glsfmttext} +This normally behaves like \gls{glstext} but expands to just +\gls{glsentrytext} in PDF bookmarks and is adjusted when appearing +in the header or contents. + +\cmddef{Glsfmttext} +This normally behaves like \gls{Glstext} but expands to: +\begin{compactcodebox} +\gls{MFUsentencecase}\marg{\gls{glsentrytext}\margm{entry-label}} +\end{compactcodebox} +in PDF bookmarks and is adjusted when appearing +in the header or contents. + +\cmddef{GLSfmttext} +This normally behaves like \gls{GLStext} but expands to just +\gls{glsentrytext} in PDF bookmarks and is adjusted when appearing +in the header or contents. + +% plural + +\cmddef{glsfmtplural} +This normally behaves like \gls{glsplural} but expands to just +\gls{glsentryplural} in PDF bookmarks and is adjusted when appearing +in the header or contents. + +\cmddef{Glsfmtplural} +This normally behaves like \gls{Glsplural} but expands to: +\begin{compactcodebox} +\gls{MFUsentencecase}\marg{\gls{glsentryplural}\margm{entry-label}} +\end{compactcodebox} +in PDF bookmarks and is adjusted when appearing +in the header or contents. + +\cmddef{GLSfmtplural} +This normally behaves like \gls{GLSplural} but expands to just +\gls{glsentryplural} in PDF bookmarks and is adjusted when appearing +in the header or contents. + +% first + +\cmddef{glsfmtfirst} +This normally behaves like \gls{glsfirst} but expands to just +\gls{glsentryfirst} in PDF bookmarks and is adjusted when appearing +in the header or contents. + +\cmddef{Glsfmtfirst} +This normally behaves like \gls{Glsfirst} but expands to: +\begin{compactcodebox} +\gls{MFUsentencecase}\marg{\gls{glsentryfirst}\margm{entry-label}} +\end{compactcodebox} +in PDF bookmarks and is adjusted when appearing in the header or contents. + +\cmddef{GLSfmtfirst} +This normally behaves like \gls{GLSfirst} but expands to just +\gls{glsentryfirst} in PDF bookmarks and is adjusted when appearing +in the header or contents. + +% first plural + +\cmddef{glsfmtfirstpl} +This normally behaves like \gls{glsfirstplural} but expands to just +\gls{glsentryfirstplural} in PDF bookmarks and is adjusted when appearing +in the header or contents. + +\cmddef{Glsfmtfirstpl} +This normally behaves like \gls{Glsfirstplural} but expands to: +\begin{compactcodebox} +\gls{MFUsentencecase}\marg{\gls{glsentryfirstplural}\margm{entry-label}} +\end{compactcodebox} +in PDF bookmarks and is adjusted when appearing in the header or contents. + +\cmddef{GLSfmtfirstpl} +This normally behaves like \gls{GLSfirstplural} but expands to just +\gls{glsentryfirstplural} in PDF bookmarks and is adjusted when appearing +in the header or contents. + +\subsection{Advanced Commands} +\label{sec:headingsadvanced} + +\begin{information} +This section is intended for advanced users and package developers. +\end{information} + +The commands described here are irrelevant if you use \gls{glsxtrRevertMarks} to +restore the definitions of \gls{markright}, +\gls{markboth} and \gls{@starttoc}. If you use +\gls{glsxtrRevertTocMarks}, then this section is only applicable to +\gls{markright} and \gls{markboth}. + +If you need to know whether or not some code is inside a header or +contents list, you can use: +\cmddef{glsxtrifinmark} +This does \meta{true} if the command occurs within \gls{markright}, +\gls{markboth} or \gls{@starttoc} otherwise does \meta{false}. + +If you need to know whether or not some code is inside a contents +list (but not the header), you can use: +\cmddef{glsxtrifintoc} +This does \meta{true} if the command occurs within \gls{@starttoc} +otherwise it does \meta{false}. +(The modified definition of \gls{@starttoc} sets \gls{glsxtrifintoc} +to \gls{@firstoftwo} at the start and to \gls{@secondoftwo} at +the end.) + +If you need to know whether or not some code is in the PDF bookmarks +or heading, you can use: +\cmddef{glsxtrtitleorpdforheading} +This does the applicable argument depending on whether the +command occurs within a title\slash caption or PDF bookmark or +heading. + +If this command occurs within the \ext+{toc} file, it will +do its \meta{heading} argument but if \gls{glsxtrtitleorpdforheading} +expands while it's being written to the \ext{toc} file, then it will +expand to \meta{title}. This can be illustrated in the following +document: +\begin{codebox} +\cmd{documentclass}\marg{report} +\cmd{usepackage}\marg{lipsum} +\cmd{usepackage}\marg{hyperref} +\cmd{usepackage}\marg{glossaries-extra} +\cmd{pagestyle}\marg{headings} +\cbeg{document} +\gls+{tableofcontents} +\cmd{chapter}\marg{\gls{glsxtrtitleorpdforheading}\marg{Title}\marg{PDF}\marg{Heading} +\gls{glsxtrifinmark}\marg{in mark}\marg{not in mark}} +\cmd{lipsum} +\cmd{chapter}\marg{\cmd{protect}\gls{glsxtrtitleorpdforheading}\marg{Title}\marg{PDF}\marg{Heading} +\cmd{protect}\gls{glsxtrifinmark}\marg{in mark}\marg{not in mark}} +\cmd{lipsum} +\cend{document} +\end{codebox} +In the first case, \gls{glsxtrtitleorpdforheading} expands as it's +being written to the \ext{toc} file, so it expands to \qt{Title}. +In the second case, \gls{glsxtrtitleorpdforheading} is protected so +that command is written to the \ext{toc} file. On the next \LaTeX, +when the table of contents is displayed, this command will expand to +\qt{Heading}, because it's in the \ext{toc} file. Similarly, in the +first case, \gls{glsxtrifinmark} will expand to \qt{not in mark} as +it's written to the \ext{toc} file, but in the second case it's +expansion is prevented, so it will expand to \qt{in mark} in the table of +contents. + +If \sty{gettitlestring} has been loaded (used by \sty{nameref} to +provide \gls{nameref}) then adjustments for both \gls{glsxtrtitleorpdforheading} +and \gls{glsxtrifinmark} will be added to \gls{GetTitleStringDisableCommands}, +but bear in mind that you will need to use the following for it to +have an effect: +\begin{codebox*} +\gls{GetTitleStringSetup}\marg{expand} +\end{codebox*} + +The commands described in \sectionref{sec:headingcommands}, such as +\gls{glsfmtshort}, are essentially defined as: +\begin{compactcodebox} +\gls{texorpdfstring} + \marg{\cmd{glsxtrtitle\meta{field}}\margm{entry-label}}\comment{title} + \marg{\cmd{glsentry\meta{field}}\margm{entry-label}}\comment{bookmark} +\end{compactcodebox} +If \gls{texorpdfstring} isn't defined, then the definition is: +\begin{compactcodebox} +\cmd{glsxtrtitle\meta{field}}\margm{entry-label} +\end{compactcodebox} +For example, \gls{glsfmtshort} is defined as (with \sty{hyperref}): +\begin{compactcodebox} +\cmd{newcommand}*\marg{\gls{glsfmtshort}}[1]\marg{\% + \gls{texorpdfstring}\marg{\gls{glsxtrtitleshort}\marg{\#1}}\marg{\gls{glsentryshort}\marg{\#1}}\% +} +\end{compactcodebox} +This ensures that \gls{glsfmtshort} expands to just +\gls{glsentryshort} within the PDF bookmarks. Provided the field +value doesn't contain any problematic commands, this allows the +actual value to be added to the bookmarks. + +Unfortunately the case-changing commands can't expand and therefore aren't +appropriate for the bookmarks (which need to be a PDF string). +This means that the \idx{sentencecase} and \idx{allcaps} commands +also use the unmodified field value for the bookmark. For example, +\gls{Glsfmtshort} is defined as: +\begin{compactcodebox} +\cmd{newcommand}*\marg{\gls{Glsfmtshort}}[1]\marg{\% + \gls{texorpdfstring}\marg{\gls{Glsxtrtitleshort}\marg{\#1}}\marg{\gls{glsentryshort}\marg{\#1}}\% +} +\end{compactcodebox} + +The \csfmt{glsxtrtitle\meta{field}} set of commands all default to +the corresponding \idx{glstextlike} command with the options given +by \gls{glsxtrtitleopts} and an empty insert final argument. These +title commands are redefined by \gls{glsxtrmarkhook} to the +corresponding \csfmt{glsxtrhead\meta{field}} command. These +\qt{head} commands use \gls{NoCaseChange} to prevent interference +from page headers that convert to \idx{allcaps} (which can +inappropriately convert the entry label to \idx{allcaps}). Instead, +the \catattr{headuc} attribute needs to be set to \code{true} to use +the appropriate \idx{allcaps} command. A shortcut command is +provided to test for this attribute: +\cmddef{glsxtrifheaduc} +This is defined as: +\begin{compactcodebox} +\cmd{newcommand}*\marg{\gls{glsxtrifheaduc}}[3]\marg{\% + \gls{glsxtrifintoc}\marg{\#3}\marg{\gls{glsifattribute}\marg{\#1}\marg{\catattr{headuc}}\marg{true}\marg{\#2}\marg{\#3}}\% +} +\end{compactcodebox} +Since the header commands also end up in the contents, where the +\idx{allcaps} conversion should not be applied, the definition +includes \gls{glsxtrifintoc} to skip the check in the contents. + +\cmddef{glsxtrtitleshort} +The normal behaviour of \gls{glsfmtshort}. +This is redefined by \gls{glsxtrmarkhook} to \gls{glsxtrheadshort}. +The default is: +\begin{compactcodebox} +\gls{glsxtrshort}\oarg{\glsopt{noindex},\glsoptval{hyper}{false}}\margm{entry-label}\oarg{} +\end{compactcodebox} +(This is performed indirectly via an internal command that ensures +that \gls{glsxtrtitleopts} is expanded before being passed in the optional +argument.) + +\cmddef{glsxtrheadshort} +Used to display the short form in the page header. This is defined +as: +\begin{compactcodebox} +\cmd{newcommand}*\marg{\gls{glsxtrheadshort}}[1]\marg{\% + \cmd{protect}\gls{NoCaseChange} + \marg{\% + \gls{glsifattribute}\marg{\#1}\marg{\catattr{headuc}}\marg{true}\% + \marg{\% + \gls{GLSxtrshort}\oarg{\glsopt{noindex},\glsoptval{hyper}{false}}\marg{\#1}\oarg{}\% + }\% + \marg{\% + \gls{glsxtrshort}\oarg{\glsopt{noindex},\glsoptval{hyper}{false}}\marg{\#1}\oarg{}\% + }\% + }\% } -\end{verbatim} +\end{compactcodebox} +The \idx{sentencecase} commands also check the \catattr{headuc} +attribute. + +\cmddef{Glsxtrtitleshort} +The normal behaviour of \gls{Glsfmtshort}. +This is redefined by \gls{glsxtrmarkhook} to \gls{Glsxtrheadshort}. +The default is: +\begin{compactcodebox} +\gls{Glsxtrshort}\oarg{\glsopt{noindex},\glsoptval{hyper}{false}}\margm{entry-label}\oarg{} +\end{compactcodebox} +(Again, this is performed indirectly via an internal command that ensures +that \gls{glsxtrtitleopts} is expanded before being passed in the optional +argument.) + +\cmddef{Glsxtrheadshort} +Used to display the \idx{sentencecase} short form in the page header. This is defined +as: +\begin{compactcodebox} +\cmd{newcommand}*\marg{\gls{Glsxtrheadshort}}[1]\marg{\% + \cmd{protect}\gls{NoCaseChange} + \marg{\% + \gls{glsifattribute}\marg{\#1}\marg{\catattr{headuc}}\marg{true}\% + \marg{\% + \gls{GLSxtrshort}\oarg{\glsopt{noindex},\glsoptval{hyper}{false}}\marg{\#1}\oarg{}\% + }\% + \marg{\% + \gls{Glsxtrshort}\oarg{\glsopt{noindex},\glsoptval{hyper}{false}}\marg{\#1}\oarg{}\% + }\% + }\% +} +\end{compactcodebox} + +\cmddef{GLSxtrtitleshort} +The normal behaviour of \gls{GLSfmtshort}. +This is redefined by \gls{glsxtrmarkhook} to \gls{GLSxtrheadshort}. +The default uses \gls{GLSxtrshort} in a similar way to +\gls{glsxtrtitleshort} and \gls{Glsxtrtitleshort}. + +\cmddef{GLSxtrheadshort} +Used to display the \idx{allcaps} short form in the page header. In +this case, there's no need to check to the \catattr{headuc} +attribute, but the label needs to be protected from any potential +case-change: +\begin{compactcodebox} +\cmd{newcommand}*\marg{\gls{GLSxtrheadshort}}[1]\marg{\% + \cmd{protect}\gls{NoCaseChange} + \marg{\% + \gls{GLSxtrshort}\oarg{\glsopt{noindex},\glsoptval{hyper}{false}}\marg{\#1}\oarg{}\% + }\% +} +\end{compactcodebox} + +All the similar commands listed below are defined in an analogous +way, except for the \sty{glossaries-prefix} commands, where only the +\idx{sentencecase} title version is provided. This is because +commands like \gls{Pglsfmtshort} have to determine whether or not to +use \gls{glsfmtshort} or \gls{Glsfmtshort} depending on whether or +not the prefix has been set. Whereas commands like +\gls{pglsfmtshort} simply need to insert the prefix and separator if +set and then use the corresponding \gls{glsfmtshort}. + +\cmddef{Pglsxtrtitleshort} +The normal behaviour of \gls{Pglsfmtshort}. + +\cmddef{Pglsxtrtitleshortpl} +The normal behaviour of \gls{Pglsfmtshortpl}. + +\cmddef{Pglsxtrtitlelong} +The normal behaviour of \gls{Pglsfmtlong}. + +\cmddef{Pglsxtrtitlelongpl} +The normal behaviour of \gls{Pglsfmtlongpl}. + +% short plural + +\cmddef{glsxtrtitleshortpl} +The title plural short form. (Normal behaviour of \gls{glsfmtshortpl}.) + +\cmddef{glsxtrheadshortpl} +The header plural short form. (The behaviour of \gls{glsfmtshortpl} +when it occurs in a header.) + +\cmddef{Glsxtrtitleshortpl} +The title plural \idx{sentencecase} short form. (Normal behaviour of +\gls{Glsfmtshortpl}.) + +\cmddef{Glsxtrheadshortpl} +The header plural \idx{sentencecase} short form. (The behaviour of \gls{Glsfmtshortpl} +when it occurs in a header.) + +\cmddef{GLSxtrtitleshortpl} +The title plural \idx{allcaps} short form. (Normal behaviour of +\gls{GLSfmtshortpl}.) + +\cmddef{GLSxtrheadshortpl} +The header plural \idx{allcaps} short form. (The behaviour of \gls{GLSfmtshortpl} +when it occurs in a header.) + +% long + +\cmddef{glsxtrtitlelong} +The title long form. (Normal behaviour of \gls{glsfmtlong}.) + +\cmddef{glsxtrheadlong} +The header long form. (The behaviour of \gls{glsfmtlong} +when it occurs in a header.) + +\cmddef{Glsxtrtitlelong} +The title \idx{sentencecase} long form. (Normal behaviour of +\gls{Glsfmtlong}.) + +\cmddef{Glsxtrheadlong} +The header \idx{sentencecase} long form. (The behaviour of \gls{Glsfmtlong} +when it occurs in a header.) + +\cmddef{GLSxtrtitlelong} +The title \idx{allcaps} long form. (Normal behaviour of +\gls{GLSfmtlong}.) + +\cmddef{GLSxtrheadlong} +The header \idx{allcaps} long form. (The behaviour of \gls{GLSfmtlong} +when it occurs in a header.) + +% long plural + +\cmddef{glsxtrtitlelongpl} +The title plural long form. (Normal behaviour of \gls{glsfmtlongpl}.) + +\cmddef{glsxtrheadlongpl} +The header plural long form. (The behaviour of \gls{glsfmtlongpl} +when it occurs in a header.) + +\cmddef{Glsxtrtitlelongpl} +The title plural \idx{sentencecase} long form. (Normal behaviour of +\gls{Glsfmtlongpl}.) + +\cmddef{Glsxtrheadlongpl} +The header plural \idx{sentencecase} long form. (The behaviour of \gls{Glsfmtlongpl} +when it occurs in a header.) + +\cmddef{GLSxtrtitlelongpl} +The title plural \idx{allcaps} long form. (Normal behaviour of +\gls{GLSfmtlongpl}.) + +\cmddef{GLSxtrheadlongpl} +The header plural \idx{allcaps} long form. (The behaviour of \gls{GLSfmtlongpl} +when it occurs in a header.) + +% full + +\cmddef{glsxtrtitlefull} +The title full form. (Normal behaviour of \gls{glsfmtfull}.) + +\cmddef{glsxtrheadfull} +The header full form. (The behaviour of \gls{glsfmtfull} +when it occurs in a header.) + +\cmddef{Glsxtrtitlefull} +The title \idx{sentencecase} full form. (Normal behaviour of +\gls{Glsfmtfull}.) + +\cmddef{Glsxtrheadfull} +The header \idx{sentencecase} full form. (The behaviour of \gls{Glsfmtfull} +when it occurs in a header.) + +\cmddef{GLSxtrtitlefull} +The title \idx{allcaps} full form. (Normal behaviour of +\gls{GLSfmtfull}.) + +\cmddef{GLSxtrheadfull} +The header \idx{allcaps} full form. (The behaviour of \gls{GLSfmtfull} +when it occurs in a header.) + +% full plural + +\cmddef{glsxtrtitlefullpl} +The title plural full form. (Normal behaviour of \gls{glsfmtfullpl}.) + +\cmddef{glsxtrheadfullpl} +The header plural full form. (The behaviour of \gls{glsfmtfullpl} +when it occurs in a header.) + +\cmddef{Glsxtrtitlefullpl} +The title plural \idx{sentencecase} full form. (Normal behaviour of +\gls{Glsfmtfullpl}.) + +\cmddef{Glsxtrheadfullpl} +The header plural \idx{sentencecase} full form. (The behaviour of \gls{Glsfmtfullpl} +when it occurs in a header.) + +\cmddef{GLSxtrtitlefullpl} +The title plural \idx{allcaps} full form. (Normal behaviour of +\gls{GLSfmtfullpl}.) + +\cmddef{GLSxtrheadfullpl} +The header plural \idx{allcaps} full form. (The behaviour of \gls{GLSfmtfullpl} +when it occurs in a header.) + +% name + +\cmddef{glsxtrtitlename} +The title \gloskey{name} field. (Normal behaviour of \gls{glsfmtname}.) + +\cmddef{glsxtrheadname} +The header \gloskey{name} field. (The behaviour of \gls{glsfmtname} +when it occurs in a header.) + +\cmddef{Glsxtrtitlename} +The title \idx{sentencecase} \gloskey{name} field. (Normal behaviour of +\gls{Glsfmtname}.) + +\cmddef{Glsxtrheadname} +The header \idx{sentencecase} \gloskey{name} field. (The behaviour of \gls{Glsfmtname} +when it occurs in a header.) + +\cmddef{GLSxtrtitlename} +The title \idx{allcaps} \gloskey{name} field. (Normal behaviour of +\gls{GLSfmtname}.) + +\cmddef{GLSxtrheadname} +The header \idx{allcaps} \gloskey{name} field. (The behaviour of \gls{GLSfmtname} +when it occurs in a header.) + +% text + +\cmddef{glsxtrtitletext} +The title \gloskey{text} field. (Normal behaviour of \gls{glsfmttext}.) + +\cmddef{glsxtrheadtext} +The header \gloskey{text} field. (The behaviour of \gls{glsfmttext} +when it occurs in a header.) + +\cmddef{Glsxtrtitletext} +The title \idx{sentencecase} \gloskey{text} field. (Normal behaviour of +\gls{Glsfmttext}.) -The \abbrstyle{short-postfootnote} abbreviation style uses the -post-\gls{linktext} hook to -place the footnote after trailing punctuation characters. +\cmddef{Glsxtrheadtext} +The header \idx{sentencecase} \gloskey{text} field. (The behaviour of \gls{Glsfmttext} +when it occurs in a header.) +\cmddef{GLSxtrtitletext} +The title \idx{allcaps} \gloskey{text} field. (Normal behaviour of +\gls{GLSfmttext}.) -\section{Entry Counting Modifications} -\label{sec:entrycountmods} +\cmddef{GLSxtrheadtext} +The header \idx{allcaps} \gloskey{text} field. (The behaviour of \gls{GLSfmttext} +when it occurs in a header.) -If you are using \gls{bib2gls} you may find it more convenient -to use the record count commands described in -\sectionref{sec:bib2gls} instead. +% plural -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}). +\cmddef{glsxtrtitleplural} +The title \gloskey{plural} field. (Normal behaviour of \gls{glsfmtplural}.) -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. +\cmddef{glsxtrheadplural} +The header \gloskey{plural} field. (The behaviour of \gls{glsfmtplural} +when it occurs in a header.) -Further information about entry counting, including the -new per-unit feature, is described in \sectionref{sec:entrycount}. +\cmddef{Glsxtrtitleplural} +The title \idx{sentencecase} \gloskey{plural} field. (Normal behaviour of +\gls{Glsfmtplural}.) -\section{First Use Flag} -\label{sec:glsunset} +\cmddef{Glsxtrheadplural} +The header \idx{sentencecase} \gloskey{plural} field. (The behaviour of \gls{Glsfmtplural} +when it occurs in a header.) -The \styfmt{glossaries} package provides -\begin{definition} -\ics{ifglsused}\marg{label}\marg{true}\marg{false} -\end{definition} -to determine whether or not an entry has been used. This requires -the entry to have been defined. If the entry is undefined, then the -underlying boolean variable doesn't exist and so is neither true -nor false. This command will produce an error with the default -\pkgopt[error]{undefaction} mode and a warning with -\pkgopt[warn]{undefaction} and, where appropriate, displays ?? in -the document text to denote an undefined reference. With both modes, -neither \meta{true} nor \meta{false} will be performed if -\meta{label} doesn't exist. - -The \pkgopt{record} option automatically implements -\pkgopt[warn]{undefaction} since no entries will be defined until -they have been selected by \gls{bib2gls}. In this case, you -may prefer to use: -\begin{definition}[\DescribeMacro\GlsXtrIfUnusedOrUndefined] -\cs{GlsXtrIfUnusedOrUndefined}\marg{label}\marg{true}\marg{false} -\end{definition} -(new to v1.34) which does \meta{true} if the entry given by -\meta{label} is undefined or if the entry is marked as unused. -Remember that neither \cs{ifglsused} nor -\cs{GlsXtrIfUnusedOrUndefined} should be used in the post-link -hook as the \gls{firstuseflag} will have already been unset -before the hook is performed. (Instead, \ics{glsxtrifwasfirstuse} -should be used, see \sectionref{sec:entryfmtmods}.) - -There are two new commands provided with version 1.31+: -\begin{definition}[\DescribeMacro\glslocalreseteach] -\cs{glslocalreseteach}\marg{list} -\end{definition} -and -\begin{definition}[\DescribeMacro\glslocalunseteach] -\cs{glslocalunseteach}\marg{list} -\end{definition} -These behave like \cs{glslocalreset} and \cs{glslocalunset} -but the argument is a comma-separated list of labels. - -The internal command used by \cs{glsunset} is modified first to -allow for the changing in entry counting, described above, but -also to allow for buffering pending unsets when commands like -\cs{gls} are used in a context where changing a boolean variable -can cause things to go wrong. One example of this is using -\cs{gls} in one of the commands provided with the \isty{soul} -package. For example: -\begin{verbatim} -\ul{Some text about \gls{html}.} -\end{verbatim} -This causes the confusing error: -\begin{verbatim} -Glossary entry `{html}' has not been defined. -\end{verbatim} -The simplest workaround is to put \verb|\gls{html}| inside the -argument of \cs{mbox}. For example: -\begin{verbatim} -\ul{Some text about \mbox{\gls{html}}.} -\end{verbatim} -This can work provided it's not the first use of this entry. -It if is, then unsetting the first use flag causes a problem -and results in the error: -\begin{verbatim} -! Package soul Error: Reconstruction failed. -\end{verbatim} -The \styfmt{glossaries-extra} package provides a way of temporarily -switching off \cs{glsunset} so that it just makes a note of the -entry's label but doesn't actually perform the change: -\begin{definition}[\DescribeMacro\GlsXtrStartUnsetBuffering] -\cs{GlsXtrStartUnsetBuffering} -\end{definition} -The unstarred version doesn't check for duplicates, so the internal -list may end up with multiple occurrences of the same label. The -starred version only adds a label to the internal list if it's not -already in it. Note that this buffering only applies to the -global \cs{glsunset} and does not affect the local -\cs{glslocalunset}. - -Later you can restore \cs{glsunset} and unset all buffered -labels using: -\begin{definition}[\DescribeMacro\GlsXtrStopUnsetBuffering] -\cs{GlsXtrStopUnsetBuffering} -\end{definition} -The starred form \cs{GlsXtrStopUnsetBuffering*} uses -\cs{glslocalunset} instead. For example: -\begin{verbatim} -\documentclass{article} - -\usepackage[T1]{fontenc} -\usepackage{soul} -\usepackage{glossaries-extra} - -\newabbreviation{html}{HTML}{hypertext markup language} +\cmddef{GLSxtrtitleplural} +The title \idx{allcaps} \gloskey{plural} field. (Normal behaviour of +\gls{GLSfmtplural}.) -\begin{document} -\GlsXtrStartUnsetBuffering -\ul{Some text about \mbox{\gls{html}}.} -\GlsXtrStopUnsetBuffering +\cmddef{GLSxtrheadplural} +The header \idx{allcaps} \gloskey{plural} field. (The behaviour of \gls{GLSfmtplural} +when it occurs in a header.) -Next use: \gls{html}. -\end{document} -\end{verbatim} -Before you stop the unset buffering, you can iterate over the -current buffer using -\begin{definition}[\DescribeMacro\GlsXtrForUnsetBufferedList] -\cs{GlsXtrForUnsetBufferedList}\marg{cs} -\end{definition} -where \meta{cs} is a control sequence that takes a single argument -(which is the entry label). This is best used with the starred -version \cs{GlsXtrStartUnsetBuffering*} to avoid duplicates. - -You can discard the buffer and restore \cs{glsunset} to its normal -behaviour with (new to v1.42): -\begin{definition}[\DescribeMacro\GlsXtrDiscardUnsetBuffering] -\cs{GlsXtrDiscardUnsetBuffering} -\end{definition} +% first -\begin{important} -Note that since the change in the first use flag now doesn't -occur until \cs{GlsXtrStopUnsetBuffering}, multiple references -of the same term within the buffering zone will always be -treated as first use (if the term wasn't used before the -buffering started). -\end{important} +\cmddef{glsxtrtitlefirst} +The title \gloskey{first} field. (Normal behaviour of \gls{glsfmtfirst}.) -There can still be a problem here as content within \cs{mbox} -can't break across a line so you may end up with an overfull -line or excessive white space within the paragraph. - -An alternative is to use \cs{protect}: -\begin{verbatim} -\GlsXtrStartUnsetBuffering -\ul{Some text about \protect\gls{html}.} -\GlsXtrStopUnsetBuffering -\end{verbatim} -but the formatting (underlining in this example) won't be applied. -Another possibility is: -\begin{verbatim} -\usepackage[T1]{fontenc} -\usepackage{soul} -\usepackage{glossaries-extra} - -\newabbreviation{html}{HTML}{hypertext markup language} - -\newrobustcmd{\gul}[1]{% - {% - \def\glsxtrabbreviationfont##1{\GlsXtrExpandedFmt{\ul}{##1}}% - \def\glsxtrregularfont##1{\GlsXtrExpandedFmt{\ul}{##1}}% - #1% - }% -} +\cmddef{glsxtrheadfirst} +The header \gloskey{first} field. (The behaviour of \gls{glsfmtfirst} +when it occurs in a header.) -\begin{document} -\ul{Some text about }\gls[textformat=gul]{html}. +\cmddef{Glsxtrtitlefirst} +The title \idx{sentencecase} \gloskey{first} field. (Normal behaviour of +\gls{Glsfmtfirst}.) -Next use: \gls{html}. -\end{document} -\end{verbatim} -This moves \cs{gls} outside of \cs{ul} and uses -\gloskey[glslink]{textformat} to locally change the formatting -command used by \cs{gls} (which is normally given by -\cs{glstextformat} or the \catattr{textformat} attribute) -to a custom command \cs{gul}, which locally changes the regular font -and the default abbreviation font to use \cs{ul}. It then uses -\begin{definition}[\DescribeMacro\GlsXtrExpandedFmt] -\cs{GlsXtrExpandedFmt}\marg{cs}\marg{text} -\end{definition} -which (protected) fully expands \meta{text} before applying -\meta{cs}, which must be a control sequence that takes a single -argument. This allows \cs{ul} to move much further inside -and increases its chances of working. It can still break if -\meta{text} expands to something that \cs{ul} can't deal with. -For example, if an abbreviation style is used that contains -complex formatting or if the field value contains problematic -content. +\cmddef{Glsxtrheadfirst} +The header \idx{sentencecase} \gloskey{first} field. (The behaviour of \gls{Glsfmtfirst} +when it occurs in a header.) -\section{Plurals} -\label{sec:plurals} +\cmddef{GLSxtrtitlefirst} +The title \idx{allcaps} \gloskey{first} field. (Normal behaviour of +\gls{GLSfmtfirst}.) -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. +\cmddef{GLSxtrheadfirst} +The header \idx{allcaps} \gloskey{first} field. (The behaviour of \gls{GLSfmtfirst} +when it occurs in a header.) -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 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. +% firstplural -For languages that don't have this general rule, the \gloskey{plural} -field will always need to be supplied, where needed. +\cmddef{glsxtrtitlefirstplural} +The title \gloskey{firstplural} field. (Normal behaviour of \gls{glsfmtfirstpl}.) -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). +\cmddef{glsxtrheadfirstplural} +The header \gloskey{firstplural} field. (The behaviour of \gls{glsfmtfirstpl} +when it occurs in a header.) -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. +\cmddef{Glsxtrtitlefirstplural} +The title \idx{sentencecase} \gloskey{firstplural} field. (Normal behaviour of +\gls{Glsfmtfirstpl}.) -\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. +\cmddef{Glsxtrheadfirstplural} +The header \idx{sentencecase} \gloskey{firstplural} field. (The behaviour of \gls{Glsfmtfirstpl} +when it occurs in a header.) -\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. +\cmddef{GLSxtrtitlefirstplural} +The title \idx{allcaps} \gloskey{firstplural} field. (Normal behaviour of +\gls{GLSfmtfirstpl}.) -\end{itemize} +\cmddef{GLSxtrheadfirstplural} +The header \idx{allcaps} \gloskey{firstplural} field. (The behaviour of \gls{GLSfmtfirstpl} +when it occurs in a header.) -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}, -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}. + +The definitions of \gls{markright}, \gls{markboth} and \gls{@starttoc} +are saved (using \gls{let}) when \sty{glossaries-extra} loads. +\cmddef{@glsxtr@org@markright} +The previous definition of \gls{markright}. + +\cmddef{@glsxtr@org@markboth} +The previous definition of \gls{markboth}. + +\cmddef{@glsxtr@org@@starttoc} +The previous definition of \gls{@starttoc}. + +The \sty{glossaries-extra} definitions of \gls{markright}, +\gls{markboth} and \gls{@starttoc} all start and end with hooks that +redefine commands that are sensitive to being in the header or +contents. +\cmddef{glsxtrmarkhook} +This saves the original definitions and redefines the sensitive +commands. This includes \gls{MakeUppercase} which is \gls{let} to +\gls{MakeTextUppercase}. + +\cmddef{@glsxtrinmark} +This redefines \gls{glsxtrifinmark} to just do its first argument +(\meta{true}). +\cmddef{@glsxtrnotinmark} +This redefines \gls{glsxtrifinmark} to just do its second argument +(\meta{false}). +\cmddef{glsxtrrestoremarkhook} +This restores the sensitive commands to the saved definitions. +(For use where grouping will cause interference.) +For example, \gls{markboth} is redefined as: +\begin{compactcodebox} +\cmd{renewcommand}*\marg{\gls{markboth}}[2]\marg{\% + \gls{glsxtrmarkhook} + \gls{@glsxtr@org@markboth} + \marg{\gls{@glsxtrinmark}\#1\gls{@glsxtrnotinmark}}\% + \marg{\gls{@glsxtrinmark}\#2\gls{@glsxtrnotinmark}}\% + \gls{glsxtrrestoremarkhook} +} +\end{compactcodebox} \section{Nested Links} \label{sec:nested} -Complications arise when you use \ics{gls} in the -value of the \gloskey{name} field (or \gloskey{text} +Complications arise when you use the \idx{glslike} commands 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} +For example, things can go wrong if the following is used with the +\sty{glossaries} package: +\begin{badcodebox} +\gls{newacronym}\marg{ssi}\marg{SSI}\marg{Server Side Includes} +\gls{newacronym}\marg{html}\marg{HTML}\marg{Hypertext Markup Language} +\gls{newacronym}\marg{shtml}\marg{S\gls{gls}\marg{html}}\marg{\gls{gls}\marg{ssi} enabled \gls{gls}\marg{html}} +\end{badcodebox} 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 +\item\label{itm:nestedfirstucprob} With older versions of +\sty{mfirstuc} and \sty{glossaries}, the \idx{sentencecase} commands, +such as \gls{Gls}, won't work for the \code{shtml} entry on \idx{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}. +\begin{compactcodebox} +\gls{gls}\marg{\gls+{uppercase} ssi} enabled \gls{gls}\marg{html} +\end{compactcodebox} +which just doesn't work. Grouping the \code{\gls{gls}\marg{ssi}} doesn't +work either as this will effectively try to do: +\begin{compactcodebox} +\gls+{uppercase}\marg{\gls{gls}\marg{ssi}} enabled \gls{gls}\marg{html} +\end{compactcodebox} +This will upper case the label \code{ssi} so the entry won't be +recognised. This problem will also occur if you use the \idx{allcaps} +version, such as \code{\gls{GLS}\marg{shtml}}. + +With \sty{mfirstuc} v2.08+ and \sty{glossaries} v1.49+, this issue +should now be resolved for \idx{sentencecase} where +\code{\gls{gls}\marg{ssi}} will be mapped to +\code{\gls{Gls}\marg{ssi}} within \code{\gls{Gls}\marg{shtml}}. The +\idx{allcaps} command \code{\gls{GLS}\marg{shtml}} will treat +\gls{gls} as an exclusion and so won't perform a case-change. See +\sectionref{sec:casechange} for further details. \item\label{itm:nonexpandprob} The long and abbreviated forms accessed through -\ics{glsentrylong} and \ics{glsentryshort} are no longer expandable +\gls{glsentrylong} and \gls{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} +\item\label{itm:inconsistentfirstuseprob} The \code{shtml} entry produces inconsistent results +depending on whether the \code{ssi} or \code{html} entries have +been used. Suppose both \code{ssi} and \code{html} are used +before \code{shtml}. For example: +\begin{coderesult} +This section discusses +\gls{gls}\marg{ssi}, \gls{gls}\marg{html} and +\gls{gls}\marg{shtml}. +\tcblower 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 +\end{coderesult} +In the above, the \idx{firstuse} of the \code{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} +Now let's suppose the \code{html} entry is used before the +\code{shtml} but the \code{ssi} entry is used after the +\code{shtml} entry, for example: +\begin{coderesult} +The sample files are +either \gls{gls}\marg{html} or +\gls{gls}\marg{shtml}, but let's +first discuss \gls{gls}\marg{ssi}. +\tcblower 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 +\end{coderesult} +In this case, the \idx{firstuse} of the \code{shtml} entry now produces \qt{server side includes (SSI) enabled HTML (SHTML)}, which looks -a bit strange. +a bit cumbersome. -Now let's suppose the \texttt{shtml} entry is used before (or +Now let's suppose the \code{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} +\begin{coderesult} +This article is an introduction +to \gls{gls}\marg{shtml}. +\tcblower 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} +\end{coderesult} +Now the \idx{firstuse} of the \code{shtml} entry produces +\qt{server side includes (SSI) enabled hypertext markup language (HTML) +(SHTML)}, which looks strange. + +This is all aggravated when using just the base \sty{glossaries} +package when the acronym style is set with +\gls{setacronymstyle}. For example: +\begin{compactcodebox} +\gls{setacronymstyle}\marg{\acrstyle+{long-short}} +\end{compactcodebox} +as this references the label through the use of \gls{glslabel} when displaying the long and short forms, but this value -changes with each use of \cs{gls}, so instead of displaying +changes with each use of \gls{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. +\qt{(HTML)}, since \gls{glslabel} has been changed to \code{html} +by \code{\gls{gls}\marg{html}}. + +\begin{information} +In v1.48, the \sty{glossaries-extra} package added grouping with +\gls{glslinkwrcontent}, which scoped the \idx{linktext}. +Unfortunately this grouping caused problems in math mode and had to +be removed in v1.49. You can redefine \gls{glslinkwrcontent} to put the +grouping back, but it still won't scope the definitions of the +placeholder commands, such as \gls{glslabel}, which need to be +outside of this scope for the benefit of the \idx{postlinkhook}. +\end{information} + +Another oddity occurs if you reset the \code{html} entry between +uses of the \code{shtml} entry. For example: +\begin{compactcodebox} +\gls{gls}\marg{shtml} ... \gls{glsreset}\marg{html}\gls{gls}\marg{shtml} +\end{compactcodebox} +The next use of \code{shtml} produces \qt{Shypertext markup +language (HTML)}, which is downright weird. (This is a result of the +short form being set to \code{S\gls{gls}\marg{html}}, but +\code{\gls{gls}\marg{html}} is showing the full form.) 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 +which amount to \code{\gls{acronymfont}\marg{S\gls{acronymfont}\marg{HTML}}}. This +may not be a problem for some styles, but if you use one of the +\qt{sm} styles (that use \gls{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 +\item\label{itm:indexingprob} Each time the \code{shtml} entry is used, the +\code{html} entry will also be indexed and marked as used, +and on \idx{firstuse} this will happen to both the \code{ssi} +and \code{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 +and there's no consistent way of dealing with this across the +available PDF viewers. If on the \idx{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 +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. - -If the term can simply be treated as a series of previously defined -entries, then consider using multi-entries (or compound sets). See -\sectionref{sec:multientries} for further details. - -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 these reasons, with just the base \sty{glossaries} package, it's +better to use the simple expandable commands like \gls{glsentrytext} +or \gls{glsentryshort} in the definition of other entries. + +The \sty{glossaries-extra} package provides two other ways of +dealing with these problems: +\begin{enumerate} +\item If the term can simply be treated as a +series of previously defined entries, then consider using +multi-entries (or compound sets), as described in +\sectionref{sec:multientries}. This deals with all the issues, +including case-changing. + +\item Use the partially-expandable \gls{glsxtrp}, described below. +\end{enumerate} + +\cmddef{glsxtrp} +where \meta{field} is the \idx{internalfieldlabel}. + +This command partially expands, so it will expand to +just the \idx{field} value if it occurs in the PDF bookmarks. +Otherwise it will behave much like the commands described in +\sectionref{sec:headingcommands}, but with additional outer scoping and the +\idx{postlinkhook} is suppressed. + +Rather than testing the existence of the given +field, this tests the existence of \csfmt{gls\meta{field}} or +\csfmt{glsxtr\meta{field}}, which means that it may be confused if +the \meta{field} argument is set to something that isn't a field but +happens to match either of those command names (such as \code{full}). + +Note that, as with commands like \gls{glsfmtshort}, there's no +optional argument. The default settings are \glsopt{noindex} and +\glsoptval{hyper}{false}. You can change this with: +\cmddef{glsxtrsetpopts} +The argument should be the new default options. + +At the start of each glossary, the default options are locally changed +with: +\cmddef{glossxtrsetpopts} +This is defined as: +\begin{compactcodebox} +\cmd{newcommand}*\marg{\gls{glossxtrsetpopts}}\marg{\% + \gls{glsxtrsetpopts}\marg{noindex}\% +} +\end{compactcodebox} +This allows hyperlinks for any instance of \gls{glsxtrp} that occurs +in the name or description, where it shouldn't be problematic. + +There are some shortcut commands for the most common fields: +\cmddef{glsps} +which is equivalent to +\code{\gls{glsxtrp}\marg{short}\margm{entry-label}}, and +\cmddef{glspt} +which is equivalent to +\code{\gls{glsxtrp}\marg{text}\margm{entry-label}}. + +There are also \idx{sentencecase} and \idx{allcaps} versions. +\cmddef{Glsxtrp} +This uses the corresponding \idx{sentencecase} command +\csfmt{Gls\meta{field}} or \csfmt{Glsxtr\meta{field}}. + +\cmddef{GLSxtrp} +This uses the corresponding \idx{allcaps} command +\csfmt{GLS\meta{field}} or \csfmt{GLSxtr\meta{field}}. + +For example: +\begin{codebox} +\cmd{documentclass}\marg{article} +\cmd{usepackage}\oarg{colorlinks}\marg{hyperref} +\cmd{usepackage}\marg{glossaries-extra} +\gls{setabbreviationstyle}\marg{long-em-short-em} +\gls{newabbreviation}\marg{html}\marg{HTML}\marg{hypertext markup language} +\gls{newabbreviation}\marg{ssi}\marg{SSI}\marg{server-side includes} +\gls{newabbreviation}\marg{shtml}\marg{SHTML}\marg{\gls{glsps}\marg{html} enabled +\gls{glsps}\marg{ssi}} +\cbeg{document} +\gls{tableofcontents} +\cmd{section}\marg{\gls{glsfmtlong}\marg{shtml}} +First use: \gls{gls}\marg{shtml}, \gls{gls}\marg{html}, \gls{gls}\marg{ssi}. +\codepar +Next use: \gls{gls}\marg{shtml}, \gls{gls}\marg{html}, \gls{gls}\marg{ssi}. +\codepar +\gls{printunsrtglossaries} +\cend{document} +\end{codebox} +\begin{resultbox} +\createexample*[arara={pdflatex,pdflatex,pdfcrop}, + label={ex:nestedlinkglspl}, + title={Nested link text with \cmd{glspl}}, + description={Example document illustrating an entry that + references other entries within one of its fields}] +{% +\cmd{usepackage}\oarg{colorlinks}\marg{hyperref}^^J% +\cmd{usepackage}\marg{glossaries-extra}^^J% +\gls{setabbreviationstyle}\marg{long-em-short-em}^^J% +\gls{newabbreviation}\marg{html}\marg{HTML}\marg{hypertext markup language}^^J% +\gls{newabbreviation}\marg{ssi}\marg{SSI}\marg{server-side includes}^^J% +\gls{newabbreviation}\marg{shtml}\marg{SHTML}\marg{\gls{glsps}\marg{html} enabled +\gls{glsps}\marg{ssi}} +} +{% +\gls{tableofcontents}^^J% +\cmd{section}\marg{\gls{glsfmtlong}\marg{shtml}}^^J% +First use: \gls{gls}\marg{shtml}, \gls{gls}\marg{html}, \gls{gls}\marg{ssi}. +\codepar +Next use: \gls{gls}\marg{shtml}, \gls{gls}\marg{html}, \gls{gls}\marg{ssi}. +\codepar +\gls{printunsrtglossaries} +} +\end{resultbox} + +The way that this works is as follows: +\begin{itemize} +\item \code{\gls{glsfmtlong}\marg{shtml}} expands to +\code{\gls{glsentrylong}\marg{shtml}} within the PDF bookmarks, +which expands to the value of the \gloskey{long} field: +\begin{compactcodebox} +\gls{glsps}\marg{html} enabled \gls{glsps}\marg{ssi} +\end{compactcodebox} +This means that \gls{glsps} (within the PDF bookmarks) in turn expands to +\gls{glsentryshort}. So the bookmark text (which can't contain any +formatting commands) ends up as \qt{HTML enabled SSI}. + +\item \code{\gls{glsfmtlong}\marg{shtml}} essentially +behaves like \gls{glsxtrlong}, but with the \idx{indexing} and +hyperlink suppressed. The \idx{linktext} is the value of the +\gloskey{long} field encapsulated with the abbreviation style's +formatting command (\gls{glslongemfont} in this case): +\begin{compactcodebox} +\gls{glslongemfont}\marg{\gls{glsps}\marg{html} enabled \gls{glsps}\marg{ssi}} +\end{compactcodebox} +This then becomes: +\begin{compactcodebox} +\gls{glslongemfont}\marg{\marg{\gls{let}\gls{glspostlinkhook}\gls{relax} + \gls{glsxtrshort}\marg{html}} enabled +\marg{\gls{let}\gls{glspostlinkhook}\gls{relax} + \gls{glsxtrshort}\marg{ssi}}} +\end{compactcodebox} +Note the grouping and localised suppression of the +\idx{postlinkhook}. +\end{itemize} + +Note that in the above example, with older versions of +\sty{mfirstuc} and \sty{glossaries}, it's not possible to use +\code{\gls{Glsxtrlong}\marg{shtml}} or similar. The problem here is +that it will attempt to do: +\begin{compactcodebox} +\gls{makefirstuc}\marg{\gls{glsps}\marg{html} enabled \gls{glsps}\marg{ssi}} +\end{compactcodebox} +This will essentially end up as: +\begin{compactcodebox} +\gls{glsps}\marg{\gls{uppercase} html} enabled \gls{glsps}\marg{ssi} +\end{compactcodebox} +which doesn't work. If you want to protect against automated +case-changes, such as using the \catattr{glossdesc} attribute, +insert an empty brace at the start: +\begin{compactcodebox} +\gls{newabbreviation}\marg{shtml}\marg{SHTML}\marg{\marg{}\gls{glsps}\marg{html} enabled +\gls{glsps}\marg{ssi}} +\end{compactcodebox} +Alternatively, upgrade to \sty{mfirstuc} v2.08+ and \sty{glossaries} +v4.50+. See \sectionref{sec:casechange}. + + +\section{Adjusting the Text Style} +\label{sec:entryfmtmods} + +The \idx{glslike} and \idx{glstextlike} commands produce text that's +essentially formatted either as (\glsoptval{hyperoutside}{true}): +\begin{compactcodebox} +\meta{hyper-cs}\margm{target}\marg{\meta{textformat-cs}\margm{content}}\meta{post-link hook} +\end{compactcodebox} +or (\glsoptval{hyperoutside}{false}): +\begin{compactcodebox} +\meta{textformat-cs}\marg{\meta{hyper-cs}\margm{target}\margm{content}}\meta{post-link hook} +\end{compactcodebox} +If hyperlinks are enabled then \meta{hyper-cs} creates the hyperlink +based on \meta{target} with the hyperlink text given by the second +argument. If hyperlinks aren't enabled then \meta{hyper-cs} ignores +the \meta{target} argument and simply does the second argument. + +The \meta{content} part is the \idx{linktext}, which includes the +final optional \meta{insert} (if supplied). The actual content +depends on the command used (for example, \gls{gls} or +\gls{glstext}). The \idx{glslike} commands all use +the entry display style associated with the entry's \idx{glossary} +type, (see \sectionref{sec:entryfmt}). The \idx{glstextlike} commands set the +\meta{content} to the corresponding field value with the insert +appended, all encapsulated with the inner formatting (see +\sectionref{sec:innertextformat}), with appropriate case-changing, +if required. + +The abbreviation commands (\gls{glsxtrshort}, \gls{glsxtrlong}, +\gls{glsxtrfull} etc) are considered part of the set of +\idx{glstextlike} commands, but the content is set according to the +abbreviation style (see \sectionref{sec:abbrstyle}). + +The commands \gls{glsdisp} and \gls{glslink} both have the content +part explicitly set in their final argument. There's no insert +optional argument as it can simply be included in the content part. +The difference between them is that \gls{glsdisp} is considered a +\idx{glslike} command (it unsets the \idx{firstuseflag}, +\sectionref{sec:glsunset}, and uses the entry display style, +\sectionref{sec:entryfmt}), whereas \gls{glslink} is considered a +\idx{glstextlike} command. + +The \meta{post-link hook} part is described in +\sectionref{sec:postlinkhook}. + +The \meta{textformat-cs} command is the \emph{outer} formatting +command, described in \sectionref{sec:glstextformat}. This doesn't +include the \idx{postlinkhook}. If you want to include the +\idx{postlinkhook} then you need to encapsulate the entire +\idx{glslike} and \idx{glstextlike} command (including the final +optional argument, if present, and following punctuation, if the +\idx{postlinkhook} looks ahead for punctuation). + +Some sensitive formatting commands need to have the actual text in +their argument (or else have the argument in an unbreakable box). +The \meta{content} part is usually too complicated for these +commands. To help support this type of command, there is also an +\idxc{innerformatting}{inner format}, which is described in +\sectionref{sec:innertextformat}. In general, unless you require one +of these sensitive commands, avoid setting the inner text format as +it requires support from the underlying style (either the entry +format style or the abbreviation style), which may not be available. + +The following example document is ugly, but demonstrates the outer +formatting (\texttt{type\-writer} font), middle formatting +(\textbf{bold} for regular entries and \textit{italic} for +abbreviations), inner formatting (highlighted in yellow), hyperlinks +(red), and the \idx{catpostlinkhook} (the description follows in +parentheses for general entries on \idx{firstuse}). +\begin{codebox} +\cmd{usepackage}\marg{courier} +\cmd{usepackage}[T1]\marg{fontenc} +\cmd{usepackage}\marg{xcolor} +\cmd{usepackage}\marg{soul} +\cmd{usepackage}[colorlinks]\marg{hyperref} +\cmd{usepackage}[\opt{nogroupskip}]\marg{glossaries-extra} +\comment{outer formatting:} +\cmd{renewcommand}\marg{\gls{glstextformat}}[1]\marg{\cmd{texttt}\marg{\#1}} +\comment{middle formatting:} +\cmd{renewcommand}\marg{\gls{glsxtrregularfont}}[1]\marg{\cmd{textbf}\marg{\#1}} +\cmd{renewcommand}\marg{\gls{glsxtrabbreviationfont}}[1]\marg{\cmd{textit}\marg{\#1}} +\comment{inner formatting:} +\cmd{renewcommand}\marg{\gls{glsxtrdefaultentrytextfmt}}[1]\marg{\cmd{hl}\marg{\#1}} +\comment{post-link hook for 'general' category:} +\gls{glsdefpostlink}\marg{\cat{general}}\marg{\gls{glsxtrpostlinkAddDescOnFirstUse}} +\comment{define entries:} +\gls{newglossaryentry}\marg{sample}\marg{\gloskeyval{name}{sample},\gloskeyval{description}{an example}} +\gls{newabbreviation}\marg{html}\marg{HTML}\marg{hypertext markup language} +\gls{newacronym}\marg{nasa}\marg{NASA}\marg{National Aeronautics and Space Administration} +\cbeg{document} +First use: \gls{gls}\marg{sample}, \gls{gls}\marg{html}, \gls{gls}\marg{nasa}. +\codepar +Next use: \gls{gls}\marg{sample}, \gls{gls}\marg{html}, \gls{gls}\marg{nasa}. +\gls{printunsrtglossaries} +\cend{document} +\end{codebox} +This produces: +\begin{resultbox} +\createexample*[fontsize={14}, + label={ex:linktextstyles}, +title={Link text styles: outer, middle, inner, hyperlinks and post-link hook}, + description={An example document that illustrates the outer, middle +and inner formatting, hyperlinks and a category post-link hook}] +{ +\cmd{usepackage}\marg{courier}^^J% +\cmd{usepackage}[T1]\marg{fontenc}^^J% +\cmd{usepackage}\marg{xcolor}^^J% +\cmd{usepackage}\marg{soul}^^J% +\cmd{usepackage}[colorlinks]\marg{hyperref}^^J% +\cmd{usepackage}[nogroupskip]\marg{glossaries-extra}^^J% +\% outer formatting:^^J% +\cmd{renewcommand}\marg{\gls{glstextformat}}[1]\marg{\cmd{texttt}\marg{\#1}}^^J% +\% middle formatting:^^J% +\cmd{renewcommand}\marg{\gls{glsxtrregularfont}}[1]\marg{\cmd{textbf}\marg{\#1}}^^J% +\cmd{renewcommand}\marg{\gls{glsxtrabbreviationfont}}[1]\marg{\cmd{textit}\marg{\#1}}^^J% +\% inner formatting:^^J% +\cmd{renewcommand}\marg{\gls{glsxtrdefaultentrytextfmt}}[1]\marg{\cmd{hl}\marg{\#1}}^^J% +\% post-link hook for 'general' category:^^J% +\gls{glsdefpostlink}\marg{general}\marg{\gls{glsxtrpostlinkAddDescOnFirstUse}}^^J% +\% define entries:^^J% +\gls{newglossaryentry}\marg{sample}\marg{\gloskeyval{name}{sample},\gloskeyval{description}{an example}}^^J% +\gls{newabbreviation}\marg{html}\marg{HTML}\marg{hypertext markup language}^^J% +\gls{newacronym}\marg{nasa}\marg{NASA}\marg{National Aeronautics and Space Administration} +} +{ +First use: \gls{gls}\marg{sample}, \gls{gls}\marg{html}, \gls{gls}\marg{nasa}. +\codepar +Next use: \gls{gls}\marg{sample}, \gls{gls}\marg{html}, \gls{gls}\marg{nasa}. +\codepar +\gls{printunsrtglossaries} +} +\end{resultbox} +Note that the hyperlink, outer and middle formatting aren't applied +to the \idx{postlinkhook}. The \cat{acronym} category has the +\abbrstyle{short-nolong} abbreviation style, which sets the +\catattr{regular} attribute to true. This means that the NASA entry +uses the regular middle format (\gls{glsxtrregularfont}) not the +abbreviation middle format (\gls{glsxtrabbreviationfont}). + +If you have a formatting command that needs to have its argument +fully-expanded before being applied, you may be able to use: +\cmddef{GlsXtrExpandedFmt} +This fully-expands \meta{content} and does +\code{\meta{cs}\margm{expanded-content}}, where \meta{cs} is a +command that takes a single argument. For example, to use +\sty{soul}['s] underlining command \gls{ul}: +\begin{codebox} +\cmd{renewcommand}\marg{\gls{glsxtrregularfont}}\oarg{1}\marg{\gls{GlsXtrExpandedFmt}\marg{\#1}} +\end{codebox} +(See \exampleref{ex:protectinnertextformat}.) +This isn't guaranteed to work as the \idx{linktext} may contain +fragile content. + +The inner formatting can be unpredictable. For example, +abbreviation styles are complicated and so the inner formatting +command is included in some of the field values, such as the +\gloskey{name}, which is why the abbreviation name is highlighted in +the \idx{glossary}. In the above example, the inner formatting is +included in the \idx{catpostlinkhook}, but only because +\gls{glsxtrpostlinkAddDescOnFirstUse} is designed to include it. If +the \idx{catpostlinkhook} was simply defined as: +\begin{codebox} +\gls{glsdefpostlink}\marg{general}\marg{\% + \gls{glsxtrifwasfirstuse}\marg{ (\gls{glsentrydesc}\marg{\gls{glslabel}})}\marg{}} +\end{codebox} +then the inner formatting won't be applied, since it's not included +in the hook. This is demonstrated in a slightly modified version of +the above document (initial part of preamble that deals with loading packages and +redefining formatting commands as before): +\begin{codebox} +\comment{post-link hook for 'general' category:} +\gls{glsdefpostlink}\marg{general}\marg{\% + \gls{glsxtrifwasfirstuse}\marg{ (\gls{glsentrydesc}\marg{\gls{glslabel}})}\marg{}} +\comment{this style sets the post-link hook for 'abbreviation' category:} +\gls{setabbreviationstyle}\marg{\abbrstyle{long-postshort-user}} +\comment{this style sets the post-link hook for 'acronym' category:} +\gls{setabbreviationstyle}\oarg{\cat{acronym}}\marg{\abbrstyle{short-postfootnote}} +\comment{define entries:} +\gls{newglossaryentry}\marg{sample}\marg{\gloskeyval{name}{sample},\gloskeyval{description}{an example}} +\gls{newabbreviation}\marg{html}\marg{HTML}\marg{hypertext markup language} +\gls{newacronym}\marg{nasa}\marg{NASA}\marg{National Aeronautics and Space Administration} +\cbeg{document} +First use: \gls{gls}\marg{sample}, \gls{gls}\marg{html}, \gls{gls}\marg{nasa}. +\codepar +Next use: \gls{gls}\marg{sample}, \gls{gls}\marg{html}, \gls{gls}\marg{nasa}. +\gls{printunsrtglossaries} +\cend{document} +\end{codebox} +This produces: +\begin{resultbox} +\createexample*[graphicsopts={scale=0.5},fontsize={14}, + label={ex:linktextstylescustom}, + title={Link text styles: outer, middle, inner, +hyperlinks and post-link hooks (custom and abbreviation style)}, + description={An example document that illustrates the outer, middle +and inner formatting, and hyperlinks, with a custom category +post-link hook and abbreviation style that sets the category +post-link hook}] +{ +\cmd{usepackage}\marg{courier}^^J% +\cmd{usepackage}[T1]\marg{fontenc}^^J% +\cmd{usepackage}\marg{xcolor}^^J% +\cmd{usepackage}\marg{soul}^^J% +\cmd{usepackage}[colorlinks]\marg{hyperref}^^J% +\cmd{usepackage}[nogroupskip]\marg{glossaries-extra}^^J% +\% outer formatting:^^J% +\cmd{renewcommand}\marg{\gls{glstextformat}}[1]\marg{\cmd{texttt}\marg{\#1}}^^J% +\% middle formatting:^^J% +\cmd{renewcommand}\marg{\gls{glsxtrregularfont}}[1]\marg{\cmd{textbf}\marg{\#1}}^^J% +\cmd{renewcommand}\marg{\gls{glsxtrabbreviationfont}}[1]\marg{\cmd{textit}\marg{\#1}}^^J% +\% inner formatting:^^J% +\cmd{renewcommand}\marg{\gls{glsxtrdefaultentrytextfmt}}[1]\marg{\cmd{hl}\marg{\#1}}^^J% +\% post-link hook for 'general' category:^^J% +\gls{glsdefpostlink}\marg{general}\marg{\gls{glsxtrifwasfirstuse}\marg{ +(\gls{glsentrydesc}\marg{\gls{glslabel}})}\marg{}}^^J% +\% this style sets the post-link hook for 'abbreviation' category:^^J% +\gls{setabbreviationstyle}\marg{long-postshort-user}^^J% +\% this style sets the post-link hook for 'acronym' category:^^J% +\gls{setabbreviationstyle}\oarg{acronym}\marg{short-postfootnote}^^J% +\% define entries:^^J% +\gls{newglossaryentry}\marg{sample}\marg{\gloskeyval{name}{sample},\gloskeyval{description}{an example}}^^J% +\gls{newabbreviation}\marg{html}\marg{HTML}\marg{hypertext markup language}^^J% +\gls{newacronym}\marg{nasa}\marg{NASA}\marg{National Aeronautics and Space Administration} +} +{ +First use: \gls{gls}\marg{sample}, \gls{gls}\marg{html}, \gls{gls}\marg{nasa}. +\codepar +Next use: \gls{gls}\marg{sample}, \gls{gls}\marg{html}, \gls{gls}\marg{nasa}. +\codepar +\gls{printunsrtglossaries} +} +\end{resultbox} +The \qt{post} abbreviation styles put some content into the +\idx{postlinkhook} and provide support for the inner formatting. +The above example sets the abbreviation style +to \abbrstyle{long-postshort-user}. This sets up the +\idx{postlinkhook} for the associated category +(\cat{abbreviation}, in this case) to show the parenthetical +material. Be aware that this will override +any previous definition of that hook. This style supports the inner +formatting (so the parenthetical material is highlighted). + +Similarly, the \abbrstyle{short-postfootnote} style is applied to +the \cat{acronym} category, and sets the \idx{postlinkhook} for that +category (which looks head for punctuation). The inner formatting is +applied to the footnote text but not the marker. + +The \idx{postlinkhook} for the \cat{general} category is now much +simpler and doesn't include support for the inner formatting, so +it's not highlighted. + +None of the post-link content is incorporated into the +hyperlink, outer or middle formatting. + +In general, it's better to adjust the abbreviation's style commands +(see \sectionref{sec:abbrvcmds}) rather than use the middle +or inner formatting if abbreviations need to be displayed in a particular +font. + +\subsection{Outer Formatting} +\label{sec:glstextformat} + +By default, the outer formatting is produced with \gls{glstextformat}, which is +defined by the base \sty{glossaries} package. However it can be +replaced by the \catattr{textformat} category attribute or by the +\glsopt{textformat} option. The order of precedence (not cumulative) is: +the option supplied to the \idx{glslike} or \idx{glstextlike} +command, the category attribute, \gls{glstextformat}. + 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{codebox} +\cmd{usepackage}[colorlinks]\marg{hyperref} +\cmd{usepackage}\marg{glossaries-extra} +\gls{glsdefpostlink}\marg{general}\marg{ (\gls{glsentrydesc}\marg{\gls{glslabel}})} +\gls{newglossaryentry}\marg{sample}\marg{\gloskeyval{name}{sample},\gloskeyval{description}{an example}} +\cmd{newcommand}\marg{\cmd{strong}}[1]\marg{\cmd{textbf}\marg{\cmd{color}\marg{green}\#1}} +\cmd{renewcommand}\marg{\gls{glstextformat}}[1]\marg{\cmd{emph}\marg{\#1}} +\cbeg{document} +\gls{gls}\marg{sample}\oarg{-insert}. \cmd{strong}\marg{\gls{gls}\marg{sample}\oarg{-insert}}. +\codepar +\gls{glssetcategoryattribute}\marg{\cat{general}}\marg{\catattr{textformat}}\marg{strong} +\gls{gls}\marg{sample}\oarg{-insert}. +\gls{gls}\oarg{\glsoptval{hyperoutside}{false}}\marg{sample}\oarg{-insert}. +\codepar +\gls{gls}\oarg{\glsoptval{textformat}{textsf}}\marg{sample}\oarg{-insert}. +\cend{document} +\end{codebox} +\begin{resultbox} +\createexample*[title={Changing the outer text format}, + label={ex:textformat}, + description={Example document illustrating the difference between +\cmd{glstextformat}, the \optfmt{textformat} category attribute, and +the \optfmt{textformat} option}] +{\cmd{usepackage}[colorlinks]\marg{hyperref}^^J% +\cmd{usepackage}\marg{glossaries-extra}^^J% +\gls{glsdefpostlink}\marg{general}\marg{ (\gls{glsentrydesc}\marg{\gls{glslabel}})}^^J% +\gls{newglossaryentry}\marg{sample}\marg{\gloskeyval{name}{sample},\gloskeyval{description}{an example}}^^J% +\cmd{newcommand}\marg{\cmd{strong}}[1]\marg{\cmd{textbf}\marg{\cmd{color}\marg{green}\#1}} +\cmd{renewcommand}\marg{\gls{glstextformat}}[1]\marg{\cmd{emph}\marg{\#1}} +}{% +\gls{gls}\marg{sample}\oarg{-insert}. \cmd{strong}\marg{\gls{gls}\marg{sample}\oarg{-insert}}. +\codepar +\gls{glssetcategoryattribute}\marg{general}\marg{textformat}\marg{strong} +\gls{gls}\marg{sample}\oarg{-insert}. +\gls{gls}\oarg{hyperoutside=false}\marg{sample}\oarg{-insert}. +\codepar +\gls{gls}\oarg{textformat=textsf}\marg{sample}\oarg{-insert}. +} +\end{resultbox} +The red text colour is from the hyperlink (red is the +default with \sty{hyperref}['s] \optfmt{colorlinks} option). +The green from the custom \csfmt{strong} command is cancelled by the +hyperlink colour change when the hyperlink is inside \csfmt{strong}. + +After the \catattr{textformat} attribute is set, the +\gls{glstextformat} command isn't used, which is why the remaining +lines don't have any italic. The final line uses the +\glsopt{textformat} option, which overrides the +\catattr{textformat} attribute, so neither \gls{glstextformat} nor the custom +\csfmt{strong} are used. + +Note that the only time that the \idx{postlinkhook} is included in +the formatting is when the entire \gls{gls} command has been +encapsulated. + +\subsection{Middle Formatting} +\label{sec:middleformat} + +The middle formatting comes between the outer formatting +(\sectionref{sec:glstextformat} above) and the \idx{innerformatting} +(\sectionref{sec:innertextformat} below). + +The middle formatting is implemented by the entry format style +(\sectionref{sec:entryfmt}) for the \idx{glslike} commands or is +initialised by \gls{glsxtrassignfieldfont} for the \idx{glstextlike} +commands. + +If you provide your own custom entry format style you will need to +add support for the middle formatting, if required. + +\cmddef{glsxtrregularfont} +The command to use for regular entries. This is initialised to just +do its argument. + +\cmddef{glsxtrabbreviationfont} +The command to use for abbreviations that considered non-regular +entries. + +The following document has a regular entry (sample), a regular +abbreviation (radar, which uses \abbrstyle{short-nolong} the default +\cat{acronym} style), and a non-regular abbreviation (HTML, which +uses \abbrstyle{long-short} the default \cat{abbreviation} style): +\begin{codebox} +\gls{newglossaryentry}\marg{sample}\marg{\gloskeyval{name}{sample},\gloskeyval{description}{an example}} +\gls{newabbreviation}\marg{html}\marg{HTML}\marg{hypertext markup language} +\gls{newacronym}\marg{radar}\marg{radar}\marg{radio detection and ranging} +\cmd{renewcommand}\marg{\gls{glsxtrregularfont}}[1]\marg{\cmd{emph}\marg{\#1}} +\cmd{renewcommand}\marg{\gls{glsxtrabbreviationfont}}[1]\marg{\cmd{textbf}\marg{\#1}} +\cbeg{document} +\gls{gls}\marg{sample}, \gls{gls}\marg{html}, \gls{gls}\marg{radar}. +\cend{document} +\end{codebox} +\begin{resultbox} +\createexample*[title={Middle formatting}, + label={ex:middleformat}, + description={Example document illustrating middle formatting +applied with \cmd{glsxtrregularfont} for regular entries and +\cmd{glsxtrabbreviationfont} for non-regular abbreviations}] +{% +\cmd{usepackage}\marg{glossaries-extra} +\gls{newglossaryentry}\marg{sample}\marg{\gloskeyval{name}{sample},\gloskeyval{description}{an example}} +\gls{newabbreviation}\marg{html}\marg{HTML}\marg{hypertext markup language} +\gls{newacronym}\marg{radar}\marg{radar}\marg{radio detection and ranging} +\cmd{renewcommand}\marg{\gls{glsxtrregularfont}}[1]\marg{\cmd{emph}\marg{\#1}} +\cmd{renewcommand}\marg{\gls{glsxtrabbreviationfont}}[1]\marg{\cmd{textbf}\marg{\#1}} +} +{% +\gls{gls}\marg{sample}, \gls{gls}\marg{html}, \gls{gls}\marg{radar}. +} +\end{resultbox} +Note that even though radar is an abbreviation, it's considered a +regular entry because it uses a regular style. + +\cmddef{glsxtrassignfieldfont} +This command is used by all the \idx{glstextlike} commands to +initialise the internal command used to encapsulate the field value. +This will either be set to \gls{glsxtrregularfont} (for regular +entries) or \gls{@firstofone} otherwise. + +Note that this doesn't use \gls{glsxtrabbreviationfont} +as non-regular abbreviations are too complicated to work with +\gls{glstext}, \gls{glsfirst}, \gls{glsplural}, \gls{glsfirstplural} +or their case-changing variants. Instead, use the \idx{glslike} +commands or the abbreviation commands, such as \gls{glsxtrshort}. + +\subsection{Inner Formatting} +\label{sec:innertextformat} + +If you want to format the \idx{linktext}, the best method is to +either use the outer formatting or encapsulate the entire +\idx{glslike} or \idx{glstextlike} command, as described in +\sectionref{sec:glstextformat}. However, there are some sensitive +commands that don't work if the command argument doesn't simply +contain text. + +\begin{information} +Sometimes the issue may occur when the sensitive command that +needs to encapsulate \gls{gls} doesn't like boolean variables being +changed (which occurs when the \idx{firstuseflag} is unset). If this +is the case, you may want to consider buffering as an alternative +(see \sectionref{sec:unsetbuffer}). +\end{information} + +For example, if the sample document from +\sectionref{sec:glstextformat} is adjusted to include the \sty{soul} +package and the following line is added to the document: +\begin{codebox} +\gls{gls}\oarg{\glsoptval{textformat}{hl}}\marg{sample} +\end{codebox} +then the document build will fail with the error: +\begin{quote} +! Package soul Error: Reconstruction failed. +\end{quote} +Once solution is to do the following instead: +\begin{codebox} +\gls+{hl}\marg{\gls+{mbox}\marg{\gls{gls}\marg{sample}}} +\end{codebox} +This will now work, but the box will prevent hyphenation, so it's +only useful if the \idx{linktext} is short, such as a symbol. If the +\idx{linktext} is long (such as a phrase or the \idx{firstuse} of an +abbreviation), this method can produce undesirable results with +overfull or underfull lines. + +The \idx{innerformatting} is designed to provide a workaround, but it +must be implemented deep within the entry style formatting. This +means that if you provide your own custom style, you will need to +add the appropriate commands if you want that style to support inner +formatting. You may also need to switch to using +\gls{MFUsentencecase} instead of \gls{makefirstuc} if any of the +\idx{sentencecase} commands are required: +\begin{codebox} +\cmd{renewcommand}\marg{\gls{glssentencecase}}[1]\marg{\gls{MFUsentencecase}\marg{\#1}} +\end{codebox} +Although there's no guarantee that this will work for some +particularly problematic formatting commands. + +With the default entry style, the above example can be changed to: +\begin{codebox} +\gls{gls}\oarg{\glsoptval{innertextformat}{hl}}\marg{sample} +\end{codebox} + +\begin{warning} +The inner formatting may be split up in order to move them into the +arguments of internal commands, such as those used for +case-changing. This can result in unwanted side-effects. +\end{warning} + +The following uses \gls{fbox} (which draws a frame around its +argument) and \sty{soul}['s] \gls{so} (which spaces out the letters): +\begin{codebox} +\comment{requires glossaries.sty v4.50+ and mfirstuc v2.08+} +\cmd{renewcommand}\marg{\gls{glssentencecase}}[1]\marg{\gls{MFUsentencecase}\marg{\#1}} +\gls{newacronym}\marg{radar}\marg{radar}\marg{radio detection and ranging} +\cbeg{document} +\gls{Gls}\oarg{\glsoptval{innertextformat}{fbox}}\marg{radar}['s] system\cmd{ldots} +\codepar +\gls{Gls}\oarg{\glsoptval{innertextformat}{so}}\marg{radar}['s] system\cmd{ldots} +\codepar +\gls{fbox}\marg{\gls{Gls}\marg{radar}['s]} system\cmd{ldots} +\codepar +\gls{so}\marg{\gls+{mbox}\marg{\gls{Gls}\marg{radar}['s]}} system\cmd{ldots} +\cend{document} +\end{codebox} +\begin{resultbox} +\createexample*[title={Inner formatting}, + label={ex:innerformat}, + description={Example document illustrating inner formatting}] +{% +\comment{requires glossaries.sty v4.50+ and mfirstuc v2.08+} +\cmd{usepackage}\marg{soul}^^J% +\cmd{usepackage}\marg{glossaries-extra}^^J% +\cmd{renewcommand}\marg{\gls{glssentencecase}}[1]\marg{\gls{MFUsentencecase}\marg{\#1}}^^J% +\gls{newacronym}\marg{radar}\marg{radar}\marg{radio detection and ranging} +} +{% +\gls{Gls}\oarg{innertextformat=fbox}\marg{radar}['s] system\cmd{ldots} +\codepar +\gls{Gls}\oarg{innertextformat=so}\marg{radar}['s] system\cmd{ldots} +\codepar +\gls{fbox}\marg{\gls{Gls}\marg{radar}['s]} system\cmd{ldots} +\codepar +\gls{so}\marg{\gls{mbox}\marg{\gls{Gls}\marg{radar}['s]}} system\cmd{ldots} +} +\end{resultbox} +Note the fragmentation of the inner formatting. The use of +\gls{mbox} in the final line prevents an error but the letters aren't +spaced out. The only way to deal with this case is to use +\gls{glsdisp} or \gls{glslink} with the text explicitly written: +\begin{codebox} +\gls{glslink}\marg{radar}\marg{\gls{so}\marg{Radar's}} system\cmd{ldots} +\end{codebox} + +\begin{warning} +The above example requires \sty{mfirstuc} v2.08+. +\end{warning} + +Below are the commands used to support inner formatting. + +\cmddef{glsxtrgenentrytextfmt} +This is the command that's used to encapsulate any content that +should have the \idx{innerformatting} applied. It should not be redefined +within the document as it's initialised within the +\idx{glslike} and \idx{glstextlike} commands. It's used within +\gls{glsgenentryfmt} and included in the helper commands used by the +predefined abbreviation styles. + +Sometimes it may be necessary to include \gls{glsxtrgenentrytextfmt} +within the actual field value to ensure that it's as close as +possible to the text. This is performed automatically when an entry +is defined if the \catattr{encapinnerfmt} or +\catattr{encapnocaseinnerfmt} attributes are set. Note that even in +this case, fragmentation will occur with \idx{sentencecase} commands +like \gls{Gls} or with the insert optional argument, as in the above +example with \gls{fbox} and \gls{so}. + +\cmddef{glsxtrdefaultentrytextfmt} +This is the default command that \gls{glsxtrgenentrytextfmt} will be +\gls{let} to within the \idx{glslike} and \idx{glstextlike} commands +before their options are processed. This simply does its argument +but may be redefined. (See \exampleref{ex:protectinnertextformat}.) + +\cmddef{glsxtrattrentrytextfmt} +This command applies formatting according to whether or not the +\catattr{innertextformat} attribute is set. It isn't used by default as it +should rarely be needed and increases complexity. However, if you +would like to provide support for the \catattr{innertextformat} attribute, +you can redefine \gls{glsxtrdefaultentrytextfmt} to use +\gls{glsxtrattrentrytextfmt}: +\begin{codebox} +\cmd{renewcommand}\marg{\gls{glsxtrdefaultentrytextfmt}}\marg{\gls{glsxtrattrentrytextfmt}} +\end{codebox} + +\begin{information} +This command expects the entry label to be stored in \gls{glslabel} +(from which it obtains the category label). +\end{information} + +The \idx{glslike} commands use \gls{glsxtrgenentrytextfmt} within +\gls{glsgenentryfmt} for regular entries or within the +abbreviation style commands for non-regular abbreviations +(see \sectionref{sec:entryfmt}). + +The \idx{glstextlike} commands all essentially perform the following +steps: +\begin{enumerate} +\item Initialise the middle formatting command \meta{field-font-cs} used for +encapsulating the field with \gls{glsxtrassignfieldfont} (see +\sectionref{sec:middleformat}). + +\item If \gls{glsifapplyinnerfmtfield} indicates that the field +value should be encapsulated by \gls{glsxtrgenentrytextfmt}, then +this essentially does (or appropriate case-change equivalent): +\begin{codebox} +\meta{field-font-cs}\marg{\cmd{glsaccessfmt\meta{field}}\margm{insert}\marg{\gls{glsxtrgenentrytextfmt}}\margm{entry-label}\margm{internal-field}} +\end{codebox} +otherwise it does: +\begin{codebox} +\meta{field-font-cs}\marg{\cmd{glsaccess\meta{field}}\margm{entry-label}\gls{glsxtrgenentrytextfmt}\margm{insert}} +\end{codebox} +(See \sectionref{sec:accsupp} for the \qt{access} commands.) +\end{enumerate} + +For example, the \idx{linktext} for \gls{glstext} is: +\begin{codebox} +\gls{glsifapplyinnerfmtfield}\margm{entry-label}\marg{text}\% +\marg{\% + \meta{field-font-cs}\marg{\gls{glsaccessfmttext}\margm{insert}\marg{\gls{glsxtrgenentrytextfmt}}\margm{entry-label}}\% +}\% +\marg{\% + \meta{field-font-cs}\marg{\gls{glsaccesstext}\margm{entry-label}\gls{glsxtrgenentrytextfmt}\margm{insert}}\% +} +\end{codebox} +The \csfmt{glsaccessfmt\meta{field}} commands internally use +\gls{glsfmtfield} to apply the \idx{innerformatting}. + +\cmddef{glsifapplyinnerfmtfield} +This determines whether or not the field identified by its +\idx{internalfieldlabel} for the given entry should have its value +encapsulated by the \idx{innerformatting} command. False indicates that +the field value already contains the \idx{innerformatting} command. + +\cmddef{glsexclapplyinnerfmtfield} +Locally adds the given field identified by its +\idx{internalfieldlabel} to the exclusion list for the given entry. + +\cmddef{glsfmtfield} +This command applies the formatting command \meta{cs} (which takes one +argument) to the entry's field value identified by the given +\idx{internalfieldlabel}, including \meta{insert} appended. +This ensures that the internal control sequence used to store the +field's value is expanded before \meta{cs} is applied. + +\cmddef{Glsfmtfield} +As above but \idx{sentencecase}. + +\cmddef{GLSfmtfield} +As above but \idx{allcaps}. + +\subsection{Post Link Hook} +\label{sec:postlinkhook} + +The \idx{postlinkhook} is a convenient way of automatically +appending content after each instant of the \idx{glslike} and +\idx{glstextlike} commands. The simplest method of implementing +this is with the \idx{catpostlinkhook}, which is only applied to +entries that have the given category. For example, the following +will place an asterisk (*) after all entries with the default +\cat{general} category: +\begin{codebox} +\gls{glsdefpostlink}\marg{\cat{general}}\marg{*} +\gls{newglossaryentry}\marg{sample}\marg{\gloskeyval{name}{sample},\gloskeyval{symbol}{X}, + \gloskeyval{description}{an example}} +\cbeg{document} +\gls{Gls}\marg{sample}, \gls{glstext}\marg{sample}, \gls{glsdesc}\marg{sample} +and \gls{glssymbol}\marg{sample}. +\cend{document} +\end{codebox} +\begin{resultbox} +\createexample*[title={Category post-link hook}, + label={ex:catpostlink}, + description={Example document illustrating a simple category +post-link hook}] +{% +\cmd{usepackage}\marg{glossaries-extra}^^J% +\gls{glsdefpostlink}\marg{general}\marg{*}^^J% +\gls{newglossaryentry}\marg{sample}\marg{\gloskeyval{name}{sample},\gloskeyval{symbol}{X},\gloskeyval{description}{an example}} +} +{% +\gls{Gls}\marg{sample}, \gls{glstext}\marg{sample}, +\gls{glsdesc}\marg{sample} and \gls{glssymbol}\marg{sample}. +} +\end{resultbox} +Typically, the \idx{catpostlinkhook} is more likely to include some +conditional, such as to only insert text on \idx{firstuse}. +For example, \gls{glsxtrpostlinkAddDescOnFirstUse} can be used to +insert the description in parentheses after the \idx{firstuse}. + +\begin{warning} +The \qt{post} abbreviation styles all set the \idx{catpostlinkhook}, +which will overwrite any previous definition for the abbreviation's +category. +\end{warning} + +Within the \idx{postlinkhook}, you can use the placeholder commands, +such as \gls{glslabel} (see \sectionref{sec:entryfmt}), but note +that you can't use \gls{ifglsused} to determine whether or not the +entry has been used, since the \idx{postlinkhook} comes after the +entry has been unset. Instead, use \gls{glsxtrifwasfirstuse}. +Additional commands provided for use within the +\idxpl{postlinkhook} are described in this section. + +The \idx{postlinkhook} is implemented with \gls{glspostlinkhook}, +which is defined by the base \sty{glossaries} package. It's used at +the end of the \idx{glslike} and \idx{glstextlike} commands. The +original base definition does nothing, but \sty{glossaries-extra} +redefines this: +\begin{compactcodebox} +\cmd{renewcommand}*\marg{\gls{glspostlinkhook}}\marg{\% + \gls{ifglsentryexists}\marg{\gls{glslabel}}\marg{\gls{glsxtrpostlinkhook}}\marg{}\% +} +\end{compactcodebox} +This uses: +\cmddef{glsxtrpostlinkhook} +which is the main \sty{glossaries-extra} \idx{postlinkhook}. \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. +If you are migrating over from only using the base \sty{glossaries} package and +you have redefined \gls{glspostlinkhook}, consider moving your +modifications to the \idx{catpostlinkhook} or prepend to \gls{glsxtrpostlink}, +as some attributes and abbreviation styles rely on the features +provided by \gls{glsxtrpostlinkhook}. \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}. +The main \idx{postlinkhook} is defined as: +\begin{compactcodebox} +\cmd{newcommand}*\marg{\gls{glsxtrpostlinkhook}}\marg{\% + \gls{glsxtrdiscardperiod}\marg{\gls{glslabel}}\% + \marg{\gls{glsxtrpostlinkendsentence}}\% + \marg{\gls{glsxtrifcustomdiscardperiod} + \marg{\gls{glsxtrifperiod}\marg{\gls{glsxtrpostlinkendsentence}}\marg{\gls{glsxtrpostlink}}}\% + \marg{\gls{glsxtrpostlink}}\% + }\% +} +\end{compactcodebox} +This checks if a following \idx{fullstop} needs to be +discarded and does the inner \idx{postlinkhook} \gls{glsxtrpostlink}. +Note that \gls{glsxtrdiscardperiod} and \gls{glsxtrifperiod} look +ahead for a following token, so if you need to modify this command, +insert your custom code at the start or add it to +the \idx{catpostlinkhook} instead. + +\cmddef{glsxtrdiscardperiod} +This discards \meta{token} if it's a \idx{fullstop} and the +entry's \idxpl{categoryattribute} indicate that a \idx{fullstop} +should be discarded (such as \catattr{discardperiod}). If the +punctuation character is discarded, this will then do +\meta{discarded}, otherwise it will do \meta{no discard} and process \meta{token} as +usual. If the \catattr{retainfirstuseperiod} attribute is set, then +the following command is used to determine whether or not to discard +\meta{token}. + +\cmddef{glsxtrdiscardperiodretainfirstuse} +This was introduced in v1.49 and is defined as: +\begin{compactcodebox} +\cmd{newcommand}*\marg{\gls{glsxtrdiscardperiodretainfirstuse}}[3]\marg{\comment{} + \gls{glsxtrifwassubsequentorshort}\marg{\gls{glsxtrifperiod}\marg{\#2}\marg{\#3}}\marg{\#3}\comment{} +} +\end{compactcodebox} +This will only discard the \idx{fullstop} if it follows the +\idx{subsequentuse} of a \idx{glslike} command or if it follows one +of the \gls{glsxtrshort} set of commands. +Note that this has a different effect from pre v1.49 with the +\idx{glstextlike} commands, but it's more appropriate since it's +typically only the short form that requires the period to be +discarded. To restore the original behaviour: +\begin{compactcodebox} +\cmd{renewcommand}*\marg{\gls{glsxtrdiscardperiodretainfirstuse}}[3]\marg{\comment{} + \gls{glsxtrifwasfirstuse}\marg{\#3}\marg{\gls{glsxtrifperiod}\marg{\#2}\marg{\#3}}\comment{} +} +\end{compactcodebox} + +If you want your own custom code to determine whether or not to check +for a period (instead of using known category attributes), you can +redefine: +\cmddef{glsxtrifcustomdiscardperiod} +This should expand to \meta{true} if a check should be performed, +otherwise it should expand to \meta{false}. The default definition +simply does \meta{false}. + +\cmddef{glsxtrpostlinkendsentence} +This is done if a \idx{fullstop} is discarded. If there is a +\idx{catpostlinkhook} for the entry's category, that hook is +performed (\gls{glsxtrpostlinkcat} not \gls{glsxtrpostlink}) and the +\idx{fullstop} is put back followed by a space factor adjustment. +Otherwise, just the space factor adjustment is done. + +The test to determine whether or not \meta{token} is a +\idx{fullstop} is determined by: +\cmddef{glsxtrifperiod} + +It may be useful to test for other punctuation characters. For +example, styles such as \abbrstyle{short-postfootnote} will +move the footnote after certain punctuation characters. +\cmddef{glsxtrifnextpunc} +This does \meta{true} if it's followed by one of the set of +recognised punctuation characters, otherwise it does false. The set +is initialised to \code{.,:;?!} (\idx{fullstop}, comma, colon, +semi-colon, question mark, and exclamation mark). + +A convenient way of moving code after the punctuation character is +to use: +\cmddef{glsxtrdopostpunc} +If \meta{token} is a recognised punctuation character, +this will place \meta{code} after the token, otherwise it will be +placed before the token. + +The earlier example can be adapted to put the asterisk after +following punctuation: +\begin{codebox} +\gls{glsdefpostlink}\marg{\cat{general}}\marg{\gls{glsxtrdopostpunc}\marg{*}} +\gls{newglossaryentry}\marg{sample}\marg{\gloskeyval{name}{sample},\gloskeyval{symbol}{X}, + \gloskeyval{description}{an example}} +\cbeg{document} +\gls{Gls}\marg{sample}, \gls{glstext}\marg{sample}, +(\gls{glsdesc}\marg{sample}) and \gls{glssymbol}\marg{sample}. +\cend{document} +\end{codebox} +\begin{resultbox} +\createexample*[title={Category post-link hook with punctuation +lookahead}, + label={ex:catpostlinkpunc}, + description={Example document illustrating a category +post-link hook that transfers content after a following punctuation +character}] +{% +\cmd{usepackage}\marg{glossaries-extra}^^J% +\gls{glsdefpostlink}\marg{general}\marg{\gls{glsxtrdopostpunc}\marg{*}}^^J% +\gls{newglossaryentry}\marg{sample}\marg{\gloskeyval{name}{sample},\gloskeyval{symbol}{X},\gloskeyval{description}{an example}} +} +{% +\gls{Gls}\marg{sample}, \gls{glstext}\marg{sample}, +(\gls{glsdesc}\marg{sample}) and \gls{glssymbol}\marg{sample}. +} +\end{resultbox} +Note that the asterisk isn't moved after the closing parenthesis. +This is because that character isn't included in the default list. + +You can add additional punctuation marks with: +\cmddef{glsxtraddpunctuationmark} +You may list multiple characters at the same time to add a batch, +but don't add any separators (including spaces). + +\begin{important} +Note that each character must be a single token, which means a single-byte +character for \pdfLaTeX. Multi-byte characters (\idx{utf8}) will +required a native Unicode engine (\XeLaTeX\ or \LuaLaTeX). +\end{important} -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. +For example: +\begin{codebox} +\gls{glsxtraddpunctuationmark}\marg{-'/} +\end{codebox} +This adds three extra punctuation marks (hyphen, apostrophe and +slash). Note that this doesn't allow for closing double-quotes and +will break \code{'{}'} (double apostrophe sequence for a closing +double-quote) if found. The following will only work with +\XeLaTeX\ or \LuaLaTeX: +\begin{unicodebox} +\cmd{usepackage}\marg{fontspec} +\cmd{usepackage}\marg{glossaries-extra} +\gls{glsxtraddpunctuationmark}\marg{\textrm{\textquotedblright}} +\end{unicodebox} + + +You can set the list with: +\cmddef{glsxtrsetpunctuationmarks} +This will remove the default set as well as any additional +characters. As above, each character must be a single token with no +separators in the list. +For example: +\begin{codebox} +\gls{glsxtrsetpunctuationmarks}\marg{.?!} +\end{codebox} +This sets the list to just three punctuation characters (so comma, +colon, and semi-colon are no longer recognised). + +\cmddef{glsxtrpostlink} +This does the \idx{catpostlinkhook} (or nothing if it hasn't been +defined): +\begin{compactcodebox} +\cmd{newcommand}*\marg{\gls{glsxtrpostlink}}\marg{\% + \cmd{csuse}\marg{glsxtrpostlink\gls{glscategory}\marg{\gls{glslabel}}}\% +} +\end{compactcodebox} +Customisation is best performed within the \idx{catpostlinkhook}, +which can be defined (or redefined) with: +\cmddef{glsdefpostlink} +The first argument is the category label and the second is the code +to perform. Note that this doesn't check if the hook has already +been defined for the category. The hook is a command in the form +\gls{glsxtrpostlinkcat}. If the category label only consists +of letters, you can also use \gls{newcommand} or \gls{renewcommand} +instead. -Example document: -\begin{verbatim} -\documentclass{report} +\cmddef{glspretopostlink} +Similar to the above but prepends \meta{code} to the associated +hook (or simply defines it, if the hook doesn't already exist). + +\cmddef{glsapptopostlink} +Similar to the above but appends \meta{code} to the associated +hook. + +\begin{warning} +Take care not to choose category labels that will cause a conflict. +For example, \code{endsentence} and \code{hook} will conflict with +the commands \gls{glsxtrpostlinkendsentence} and \gls{glsxtrpostlinkhook}. +\end{warning} + +If you want code in the \idx{postlinkhook} that's not dependent on +the category, consider prepending it to \gls{glsxtrpostlink} or +\gls{glsxtrpostlinkhook}. Don't append it to +\gls{glsxtrpostlinkhook} otherwise it will interfere with the +punctuation lookahead. + +For convenience, some commands are provided that may be of use in +the \idx{catpostlinkhook}: + +\cmddef{glsxtrpostlinkAddDescOnFirstUse} +This will add the \gloskey{description} in parentheses if the hook follows the +\idx{firstuse} of the entry. This incorporates the inner formatting +and description accessibility support, if provided. + +\cmddef{glsxtrpostlinkAddSymbolOnFirstUse} +This will add the \gloskey{symbol} in parentheses if that field is +set and the hook follows the \idx{firstuse} of the entry. This +incorporates the inner formatting and symbol accessibility support, +if provided. + +\cmddef{glsxtrpostlinkAddSymbolDescOnFirstUse} +This will add the \gloskey{symbol}, if that field is set, and the +\gloskey{description} (both within the same set of parentheses), if the hook follows +the \idx{firstuse} of the entry. This incorporates the inner +formatting and accessibility support, if provided. +The separator between the symbol and description is given by: +\cmddef{glsxtrpostlinkSymbolDescSep} +The default is a comma followed by a space. -\usepackage[utf8]{inputenc} -\usepackage[T1]{fontenc} -\usepackage{slantsc} -\usepackage[colorlinks]{hyperref} -\usepackage[nopostdot=false]{glossaries-extra} +For example: +\begin{codebox} +\gls{glsdefpostlink}\marg{\cat{general}}\marg{\gls{glsxtrpostlinkAddDescOnFirstUse}} +\gls{glsdefpostlink}\marg{\cat{symbol}}\marg{\gls{glsxtrpostlinkAddSymbolOnFirstUse}} +\gls{glsdefpostlink}\marg{\cat{number}}\marg{\gls{glsxtrpostlinkAddSymbolDescOnFirstUse}} +\gls{newglossaryentry}\marg{sample}\marg{\gloskeyval{name}{sample},\gloskeyval{description}{an example}} +\gls{newglossaryentry}\marg{alpha}\marg{\gloskeyval{name}{alpha},\gloskeyval{symbol}{\cmd{ensuremath}\marg{\cmd{alpha}}}, + \gloskeyval{description}{a symbol},\gloskeyval{category}{\cat{symbol}}} +\gls{newglossaryentry}\marg{pi}\marg{\gloskeyval{name}{pi},\gloskeyval{symbol}{\cmd{ensuremath}\marg{\cmd{pi}}}, + \gloskeyval{description}{a constant},\gloskeyval{category}{\cat{number}}} +\cbeg{document} +First use: \gls{gls}\marg{sample}, \gls{gls}\marg{alpha}, \gls{gls}\marg{pi}. +\codepar +Next use: \gls{gls}\marg{sample}, \gls{gls}\marg{alpha}, \gls{gls}\marg{pi}. +\cend{document} +\end{codebox} +This produces: +\begin{resultbox} +\createexample*[title={Category post-link hooks}, + label={ex:catpostlinkfirstuse}, + description={Example document that uses category post-link hooks to +append additional information after the link text on first use}] +{% +\cmd{usepackage}\marg{glossaries-extra}^^J% +\gls{glsdefpostlink}\marg{general}\marg{\gls{glsxtrpostlinkAddDescOnFirstUse}}^^J% +\gls{glsdefpostlink}\marg{symbol}\marg{\gls{glsxtrpostlinkAddSymbolOnFirstUse}}^^J% +\gls{glsdefpostlink}\marg{number}\marg{\gls{glsxtrpostlinkAddSymbolDescOnFirstUse}}^^J% +\gls{newglossaryentry}\marg{sample}\marg{\gloskeyval{name}{sample},\gloskeyval{description}{an example}}^^J% +\gls{newglossaryentry}\marg{alpha}\marg{\gloskeyval{name}{alpha},\gloskeyval{symbol}{\cmd{ensuremath}\marg{\cmd{alpha}}},^^J% + \gloskeyval{description}{a symbol},\gloskeyval{category}{symbol}}^^J% +\gls{newglossaryentry}\marg{pi}\marg{\gloskeyval{name}{pi},\gloskeyval{symbol}{\cmd{ensuremath}\marg{\cmd{pi}}},^^J% + \gloskeyval{description}{a constant},\gloskeyval{category}{number}} +} +{% +First use: \gls{gls}\marg{sample}, \gls{gls}\marg{alpha}, \gls{gls}\marg{pi}. +\codepar +Next use: \gls{gls}\marg{sample}, \gls{gls}\marg{alpha}, \gls{gls}\marg{pi}. +} +\end{resultbox} + +The following commands are also provided for use in the +\idx{postlinkhook}: + +\cmddef{glsxtrcurrentfield} +This expands to empty if the calling command isn't associated with +one specific field (such as \gls{glslink}, the \idx{glslike} +commands, the \idx{inlinefullform} commands) otherwise it will +expand to the name of the key associated with the \emph{singular} +form of the command. For example, this command will expand to +\code{text} for both \gls{glstext} and \gls{glsplural}, to +\code{description} for both \gls{glsdesc} and \gls{glsdescplural}, and +to \code{short} for both \gls{glsxtrshort} and \gls{glsxtrshortpl}. +Whereas it will expand to nothing for both \gls{gls} and +\gls{glsxtrfull}. + +\cmddef{glsxtrifwasglslike} +This expands to \meta{true} if the calling command was a \idx{glslike} command +and to \meta{false} otherwise. + +\cmddef{glsxtrifwasglslikeandfirstuse} +This expands to \meta{true} if the calling command was a \idx{glslike} command +and was the \idx{firstuse} otherwise it expands to \meta{false}. +This is simply a shortcut command that uses both +\gls{glsxtrifwasglslike} and \gls{glsxtrifwasfirstuse}. + +\cmddef{glsxtrifwassubsequentuse} +This expands to \meta{true} if the calling command was a \idx{glslike} command +and was the \idx{subsequentuse} otherwise it expands to \meta{false}. +This is simply a shortcut command that uses both +\gls{glsxtrifwasglslike} and \gls{glsxtrifwasfirstuse}. + +\cmddef{glsxtrifwassubsequentorshort} +This expands to \meta{true} if the calling command was a \idx{glslike} command +and was the \idx{subsequentuse} or if the calling command set +\gls{glsxtrcurrentfield} to \code{short}. Otherwise it expands to +\meta{false}. + +\cmddef{glsxtrifallcaps} +This simply does: +\begin{compactcodebox} +\gls{glscapscase}\margm{not all caps}\margm{not all caps}\margm{all caps} +\end{compactcodebox} +It's not usually necessary for the \idx{postlinkhook} to +differentiate between no case-change and \idx+{sentencecase}, so this +provides a convenient shortcut if only the \idx+{allcaps} case needs +to be different. + +It's possible you may also want to reference the inserted material. +For the \idx{glslike} commands, this can be obtained with the +placeholder \gls{glsinsert}, but it's not normally set by the +\idx{glstextlike} commands, which don't use the entry format style +(\sectionref{sec:entryfmt}) and instead incorporate the inserted +material at the end of the \idx{linktext}. If you want the \idx{postlinkhook} to +be able to access the inserted material for the \idx{glstextlike} +commands, you must first save it, by redefining the following: + +\cmddef{glsxtrsaveinsert} +This is used by the \idx{glstextlike} commands to initialise \gls{glsinsert}. +The default is: +\begin{compactcodebox} +\cmd{newcommand}*\marg{\gls{glsxtrsaveinsert}}[2]\marg{\cmd{def}\gls{glsinsert}\marg{}} +\end{compactcodebox} +For example, to always save the insert: +\begin{codebox} +\cmd{renewcommand}*\marg{\gls{glsxtrsaveinsert}}[2]\marg{\cmd{def}\gls{glsinsert}\marg{\#2}} +\end{codebox} +The first argument can be used to conditionally assign the insert. +For example, the following will only save it for entries with the +\cat{general} category: +\begin{codebox} +\cmd{renewcommand}*\marg{\gls{glsxtrsaveinsert}}[2]\marg{\% + \gls{glsifcategory}\marg{\#1}\marg{\cat{general}}\marg{\cmd{def}\gls{glsinsert}\marg{\#2}}\marg{\cmd{def}\gls{glsinsert}\marg{}}\% +} +\end{codebox} + +If you only want to save the insert for the \gls{glsxtrfull} set of +commands, you can redefine \gls{glsxtrfullsaveinsert} instead (see +\sectionref{sec:abbrvfieldrefs}). + +\cmddef{glsxtrassignlinktextfmt} +This contains the assignments required to ensure that \gls{glslabel}, +\gls{glstextformat} and \gls{glsxtrgenentrytextfmt} have the +definitions they had within the \idx{linktext}. They would +ordinarily still have those definitions within the +\idx{postlinkhook}, but if, for example, the hook contains content +that may be deferred, such as a footnote, then judicious use and +expansion of \gls{glsxtrassignlinktextfmt} can allow the deferred +code to pick up the label, outer and inner formatting. + +For example, the \idx{postlinkhook} might contain: +\begin{codebox} +\gls+{expandafter}\gls+{footnote}\gls{expandafter} + \marg{\gls{glsxtrassignlinktextfmt}\gls{glstextformat}\marg{\% + \gls{Glsaccessfmtdesc}\marg{}\marg{\gls{glsxtrgenentrytextfmt}}\marg{\gls{glslabel}}}.} +\end{codebox} + +\subsection{Entry Format Style} +\label{sec:entryfmt} + +\begin{information} +This section is for advanced users. Minor modifications can be made +by adjusting the outer formatting (\sectionref{sec:glstextformat}), +the \idx{postlinkhook} (\sectionref{sec:postlinkhook}) or the +abbreviation style commands (\sectionref{sec:abbrvcmds}). +\end{information} + +The \idx{glslike} commands have the \idx{linktext} set to the entry +format style corresponding to the entry's glossary \gloskey{type}. +This can be changed with \gls{defglsentryfmt}, but the default style +is given by \gls{glsentryfmt}, which is defined by the base +\sty{glossaries} package. This uses the placeholder commands +to determine the appropriate text. These are described in the +\sty{glossaries} manual, but to recap they are: \gls{glslabel} (the entry's label), +\gls{glscustomtext} (text provided by \gls{glsdisp} or empty +otherwise), \gls{glsinsert} (supplied in the final optional argument +except for \gls{glsdisp}, empty by default), \gls{glsifplural}, and +\gls{glscapscase}. + +The \sty{glossaries-extra} package redefines \gls{glsentryfmt} to +test whether or not the entry is an abbreviation and, if so, whether +or not the entry should be treated as a regular entry: +\begin{compactcodebox} +\cmd{renewcommand}*\marg{\gls{glsentryfmt}}\marg{\% + \gls{ifglshasshort}\marg{\gls{glslabel}} + \marg{\gls{glssetabbrvfmt}\marg{\gls{glscategory}\marg{\gls{glslabel}}}}\marg{}\% + \gls{glsifregular}\marg{\gls{glslabel}}\% + \marg{\gls{glsxtrregularfont}\marg{\gls{glsgenentryfmt}}}\% + \marg{\% + \gls{ifglshasshort}\marg{\gls{glslabel}}\% + \marg{\gls{glsxtrabbreviationfont}\marg{\gls{glsxtrgenabbrvfmt}}}\% + \marg{\gls{glsxtrregularfont}\marg{\gls{glsgenentryfmt}}}\% + }\% +} +\end{compactcodebox} +This uses \gls{ifglshasshort} to determine whether or not the entry +is an abbreviation. If it is, then \gls{glssetabbrvfmt} is used to +setup the abbreviation style commands for the entry's category. + +Then there's a check (with \gls{glsifregular}) to determine whether +or not the entry should be treated as a regular entry. Note that if +the \catattr{regular} attribute hasn't been set to \code{true}, the +entry will still be treated as a regular entry if it doesn't have +the \gloskey{short} field set. + +Regular entries are formatted according to: +\cmddef{glsgenentryfmt} +This is the generic regular entry format. It's encapsulated with +\gls{glsxtrregularfont}, but note that if the entry is an +abbreviation, it will still use the abbreviation style formatting +commands, which are contained within the \gloskey{first}, +\gloskey{firstplural}, \gloskey{text} and \gloskey{plural} field +values. + +The generic regular entry format \gls{glsgenentryfmt} is provided by +the base \sty{glossaries} package, but is redefined by +\sty{glossaries-extra} to support inner formatting +(\sectionref{sec:innertextformat}) and accessibility +(\sectionref{sec:accsupp}), if required. + +Abbreviations that aren't considered regular, are formatted +according to: +\cmddef{glsxtrgenabbrvfmt} +This is the generic non-regular abbreviation format. It's +encapsulated with \gls{glsxtrabbreviationfont}. Unlike \gls{glsgenentryfmt} +this doesn't reference the \gloskey{first}, \gloskey{firstplural}, +\gloskey{text} or \gloskey{plural} fields, but instead uses the +abbreviation formatting commands \gls{glsxtrfullformat}, +\gls{glsxtrsubsequentfmt} and their plural and case-changing variants. + +If you want to define your own custom entry format, you will need to +consider whether or not your format should support regular and +non-regular abbreviation styles. Further detail can be found in the +documented code: +\texdocref{glossaries-extra-code} + +\section{Hyperlinks} +\label{sec:hyper} + +The \idx{glslike} and \idx{glstextlike} commands will automatically +create a hyperlink by default, if \sty{hyperref} has been loaded +(before \sty{glossaries}\slash \sty{glossaries-extra}). The +hyperlink can be switched off with \glsoptval{hyper}{false} but will +also be switched off if the entry was assigned to an +\idx{ignoredglossary} that was defined with the unstarred +\gls{newignoredglossary}. + +The \optval{hyperfirst}{false} package option and the category attributes +\catattr{nohyper}, \catattr{nohyperfirst} and \catattr{nohypernext} +can also be used to automatically switch off the hyperlink. +See also the \glsopt{hyperoutside} option that determines whether +the hyperlink should be inside or outside of the outer formatting. + +The hyperlink target is usually created by \gls{glstarget} which is +used by all the predefined \idxpl{glossarystyle} by the standalone +commands, such as \gls{GlsXtrStandaloneEntryName}. + +The target for an entry with the label \meta{entry-label} is in the +form \meta{prefix}\meta{entry-label}. The \meta{prefix} is normally +\gls{glolinkprefix} but may be changed with the \printglossopt{prefix} +option when displaying the \idx{glossary}. + +The target can also be changed to a link to an external file with +the \catattr{targeturl} category attribute. + +\section{Label Prefixes} +\label{sec:labelprefixes} + +It's possible that you may want to prefix labels to ensure +uniqueness. For example, this manual references both the +\gls{makeglossaries} command and the \app{makeglossaries} Perl +script. They are both defined as \idx{glossary} entries, but they +can't both have the label \code{makeglossaries}. This manual uses +\app{bib2gls} and is quite complicated, but a simplified version is +as follows: +\begin{codebox} +\cmd{newcommand}\marg{\cmd{csfmt}}[1]\marg{\cmd{texttt}\marg{\glsbackslash\#1}} +\cmd{newcommand}\marg{\cmd{appfmt}}[1]\marg{\cmd{texttt}\marg{\#1}} +\gls{newglossaryentry}\marg{cs.makeglossaries}\marg{\gloskeyval{name}{\cmd{csfmt}\marg{makeglossaries}}, + \gloskeyval{description}{}} +\gls{newglossaryentry}\marg{app.makeglossaries}\marg{\gloskeyval{name}{\cmd{appfmt}\marg{makeglossaries}}, + \gloskeyval{description}{}} +\end{codebox} +So the label \code{cs.makeglossaries} refers to \gls{makeglossaries} +and \code{app.makeglossaries} refers to \app{makeglossaries}. +If you have a lot of prefixes like this, you may prefer to have a +command that automatically adds the prefix. For example, +\begin{codebox} +\cmd{newcommand}*\marg{\cmd{cs}}[2][]\marg{\gls{gls}\oarg{\#1}\marg{cs.\#2}} +\end{codebox} +The problem with this is that the custom command \csfmt{cs} +doesn't allow for the \cmdmod{star}, \cmdmod{plus} and +\cmdmod{alt-mod} modifiers (such as \code{\gls{gls}*} or \code{\gls{gls}+}). +Instead you can use: +\cmddef{glsxtrnewgls} +which defines the command +\begin{compactcodebox} +\meta{cs}\meta{modifier}\oargm{options}\margm{entry-label}\oargm{insert} +\end{compactcodebox} +that behaves like +\begin{compactcodebox} +\gls{gls}\meta{modifier}\oarg{\meta{default options},\meta{options}}\marg{\meta{prefix}\meta{entry-label}}\oargm{insert} +\end{compactcodebox} +For example: +\begin{codebox} +\gls{glsxtrnewgls}\marg{cs.}\marg{\cmd{cs}} +\end{codebox} +or (to default to no hyperlinks) +\begin{codebox} +\gls{glsxtrnewgls}\oarg{\glsoptval{hyper}{false}}\marg{sym.}\marg{\cmd{cs}} +\end{codebox} +now you can use \code{\cmd{cs}+\marg{M}} to behave like \code{\gls{gls}+\marg{cs.M}}. -\makeglossaries +If you also want the plural and \idx{sentencecase} +versions you can use +\cmddef{glsxtrnewglslike} +For example: +\begin{codebox} +\gls{glsxtrnewglslike}\oarg{\glsoptval{hyper}{false}}\marg{idx.}\marg{\cmd{idx}}\marg{\cmd{idxpl}}\marg{\cmd{Idx}}\marg{\cmd{Idxpl}} +\end{codebox} +For the \idx{allcaps} versions: +\cmddef{glsxtrnewGLSlike} +For example: +\begin{codebox} +\gls{glsxtrnewGLSlike}\oarg{\glsoptval{hyper}{false}}\marg{idx.}\marg{\cmd{IDX}}\marg{\cmd{IDXpl}} +\end{codebox} + +For commands that require the link text to be specified, you can use: +\cmddef{glsxtrnewglslink} +which defines +\code{\meta{cs}\oargm{options}\margm{label}\margm{text}} to behave +like +\code{\gls{glslink}\oarg{\meta{default-options},\meta{options}}\marg{\meta{prefix}\meta{label}}\margm{text}}, +or +\cmddef{glsxtrnewglsdisp} +which defines +\code{\meta{cs}\oargm{options}\margm{label}\margm{text}} to behave +like +\code{\gls{glsdisp}\oarg{\meta{default-options},\meta{options}}\marg{\meta{prefix}\meta{label}}\margm{text}}. + +If you are using \app{bib2gls}, it can pick up the custom commands +that are defined using the above, so it can detect dependencies when +it parses fields such as \gloskey{description}. +If you provide your own custom command with just +\gls{newcommand} that has syntax that starts with +\oargm{options}\margm{entry-label}, then you can notify \app{bib2gls} using: +\cmddef{glsxtridentifyglslike} +where \meta{label-prefix} is the prefix to apply to the label that's +passed to the command \meta{cs}. The information is written to the +\ext{aux} file so that \app{bib2gls} can add the given +command to those it looks for when searching for dependencies. + +Another possibility when using \app{bib2gls} is to set up known +label prefixes, see \sectionref{sec:dgls} for further details. + +If you use \app{bib2gls} with record counting, there are +commands to \gls{glsxtrnewgls} for \gls{rgls}: +\cmddef{glsxtrnewrgls} +and for \gls{rgls}, \gls{rglspl}, \gls{rGls} and \gls{rGlspl}: +\cmddef{glsxtrnewrglslike} +and for \idx{allcaps}: +\cmddef{glsxtrnewrGLSlike} + +Defining commands in this manner (rather than simply using +\csfmt{newcommand}) also allows the command to be identified as a +\idx{sentencecase} blocker to prevent the label from being converted +or, in the case of \gls{glsxtrnewglslike} and +\gls{glsxtrnewrglslike}, as a mapping. See +\sectionref{sec:casechange} for further details. + + +\section{Indexing} +\label{sec:wrglossary} -\setabbreviationstyle{long-short-sc} +\Idx{indexing} is normally performed implicitly by the \idx{glslike} +and \idx{glstextlike} commands, but this action can be prevented, +such as by using the option \glsoptval{noindex}{true}. These commands also +generate text (the \idx{linktext}, \sectionref{sec:entryfmtmods}). +If you want to simply index an entry (to ensure that an entry is +shown in the \idx{glossary}) without producing any text then you can use +\gls{glsadd}. \Idx{indexing} is also performed by cross-referencing +commands, such as \gls{glssee}. In the case of \app{makeindex}, +\gls{glssee} simply behaves like \gls{glsadd} with a special format +and the \location\ set to Z (which pushes it to the end of the +\idx{locationlist}). Entries in \idxpl{ignoredglossary} can only be +\indexed\ with \app{bib2gls}. + +If you want \emph{all} defined entries to appear in the +\idx{glossary}, regardless of whether or not they have been used in +the document, then you can use \gls{glsaddall} or \gls{glsaddallunused} +(both provided by the base \sty{glossaries} package). These both +iterate over all entries (in all non-\idxpl{ignoredglossary}). In +the first case (\gls{glsaddall}), every entry is \indexed\ with the +\gls{glsadd} options provided in the optional argument of +\gls{glsaddall}. In the second case (\gls{glsaddallunused}), only +those entries that haven't been marked as \idxc{firstuseflag}{used} +so far will be indexed using +\code{\gls{glsadd}\oarg{\glsoptval{format}{glsignore}}\margm{label}}. +See the \sty{glossaries} manual for further details of those +commands. -\newabbreviation{ssi}{ssi}{server-side includes} -\newabbreviation{html}{html}{hypertext markup language} -\newabbreviation{shtml}{shtml}{{}\glsps{ssi} enabled {}\glsps{html}} +The \sty{glossaries-extra} package provides a similar command: +\cmddef{glsaddallunindexed} +This is like \gls{glsaddallunused} but indexes all entries that +haven't been \indexed\ so far (again using the option \glsoptval{format}{glsignore}). +This is preferable to \gls{glsaddallunused} if you have to reset the +\idx{firstuseflag} for any entries. As with \gls{glsaddallunused}, +if this command is required, it should be placed near the end of the +document. Indexing any entries after either of these commands are +used will cause spurious commas in the \idxpl{locationlist}. -\pagestyle{headings} +\begin{important} +Iterative commands such as \gls{glsaddall}, \gls{glsaddallunused} +and \gls{glsaddallunindexed} +should not be used with \app{bib2gls}. Use the +\resourceoptval{selection}{all} option instead. +\end{important} -\glssetcategoryattribute{abbreviation}{headuc}{true} -\glssetcategoryattribute{abbreviation}{glossdesc}{title} +If you want to index a specific subset of entries, rather than all +entries for a given glossary, you can use: +\cmddef{glsaddeach} +This does \code{\gls{glsadd}\oargm{options}\margm{entry-label}} for +each entry in the comma-separated \meta{entry label list}. This +command may be used with \app{bib2gls}, although it may be simpler +to adjust the selection criteria or use filtering. + +\cmddef{GlsXtrAutoAddOnFormat} +This will make the \idx{glslike} and \idx{glstextlike} commands +automatically use \code{\gls{glsadd}\oargm{gls\-add +options}\margm{entry-label}} whenever a \idx{glslike} or +\idx{glstextlike} command is used for the entry given by +\meta{entry-label} when the \glsopt{format} matches +one of the formats in the comma-separated \meta{format list} + +The optional argument \meta{label} defaults to \gls{glslabel} (which +will match \meta{entry-label} that was used with \gls{gls} etc) and +indicates the entry label to use in \gls{glsadd} and so needs to be +expandable. The \meta{format list} is a comma-separated list +of format values that will trigger the automated adding. The +\meta{glsadd options} are the options to pass to \gls{glsadd} with +\glsoptval{format}{\marg{format}} prepended to the list. -\begin{document} +For example, with: +\begin{codebox} +\gls{GlsXtrAutoAddOnFormat}\marg{hyperbf}\marg{\glsoptval{counter}{chapter}} +\end{codebox} +then \code{\gls{gls}\oarg{\glsoptval{format}{hyperbf}}\marg{sample}} +will be equivalent to: +\begin{compactcodebox} +\gls{glsadd}\oarg{\glsoptval{format}{hyperbf},\glsoptval{counter}{chapter}}\marg{sample}\gls{gls}\oarg{\glsoptval{format}{hyperbf}}\marg{sample} +\end{compactcodebox} +Note that the explicit range markers will prevent a match +unless you include them in \meta{format list} (in which case, be +sure to add both the start and end formats). -\tableofcontents +Here's another example: +\begin{codebox} +\gls{GlsXtrAutoAddOnFormat}\oarg{dual.\gls{glslabel}}\marg{hyperbf}\marg{} +\end{codebox} +In this case +\code{\gls{gls}\oarg{\glsoptval{format}{hyperbf}}\marg{sample}} will +now be equivalent to: +\begin{codebox} +\gls{glsadd}\oarg{\glsoptval{format}{hyperbf}}\marg{dual.sample}\gls{gls}\oarg{\glsoptval{format}{hyperbf}}\marg{sample} +\end{codebox} -\chapter{\glsfmtfull{shtml}} +\begin{important} +\gls{GlsXtrAutoAddOnFormat} is not applied to \gls{glsadd} +as it could cause an infinite loop. +\end{important} -First use: \gls{shtml}, \gls{ssi} and \gls{html}. +In the context of \sty{glossaries} and \sty{glossaries-extra}, \idx{indexing} +refers to the mechanism used to ensure that an entry +is included in its associated glossary. (If you also want to use +\gls{index}, see \sectionref{sec:autoindex}.) This includes any entries +that simply cross-reference another entry. The default is to use +\app{makeindex}, which is a general purpose \idx{indexingapp}. Each +time an entry is \indexed, a line is added to an associated file +that contains the \idx{indexing} information, which includes the +sort value, the \idxc{hierarchicallevel}{hierarchical information} +(if the entry has a parent) and an associated \location\ (the page +number, by default). This information is used to sort the entries +and collate the \locations\ into a compact \idx{locationlist}. The +\opt{xindy} package option switches to using \app{xindy} syntax, but +the process is much the same. + +Since both \app+{makeindex} and \app+{xindy} are general purpose +\idxpl{indexingapp} they require an associated \location\ (or a +cross-reference) since indexes are typically used to lookup the +\locations\ in the document where the term occurs. Although +\idxpl{glossary} are similar to indexes they can simply be used to provide +brief summaries of each term without any \locations. The way that +\app{makeindex} and \app{xindy} work means that valid \locations\ +(that is, \locations\ that conform to +\app{makeindex}\slash\app{xindy} syntax) must be supplied even if no +\idx{locationlist} is required. If an invalid \location\ is used, an +error will occur during the \app{makeindex}\slash\app{xindy} step in +the build process, even if the \location\ will eventually be ignored +when typesetting the \idx{glossary}. + +All \idxpl{locationlist} can be suppressed with the +\opt{nonumberlist} option (which simply discards the +\idx{locationlist} for each entry), but there are occasions where +only some \locations\ need to be suppressed. The main way of hiding +a \location\ is to encapsulate the \location\ with a command that +does nothing. The \gls{glsignore} command is used for this purpose +(\glsoptval{format}{glsignore}). However, it's important to +remember that even though the \location\ isn't shown, it's still +present in the \idx{locationlist}. This means that you will end up +with spurious commas if there's more than one item in the +\idx{locationlist}. + +The \qt{noidx} method similarly writes indexing information, but in this case +the information is written to the \ext{aux} file. Again, empty locations can +cause spurious commas in the \idxpl{locationlist}. + +The only method that recognises \gls{glsignore} as a special +\qt{\idx{ignoredlocation}} is \app{bib2gls}, where this format will trigger the +entry's selection but won't add the \idx{ignoredlocation} to the +\idx{locationlist}. This avoids the problem of spurious commas +caused by invisible locations. + +The \location\ corresponds to a counter. The default is the +\ctr{page} counter, but may be changed with the \opt{counter} +package option, the \meta{counter} optional argument of +\gls{newglossary}, the \gloskey{counter} key when defining an entry, +or the \glsopt{counter} option when \idx{indexing} an entry. + +Note that \app{bib2gls} v3.0+ converts an empty \location\ +(which can occur when the \idx{locationcounter} is 0 and should be +formatted as a Roman numeral) to an \idx{ignoredlocation}. +For example, if you use \optval{counter}{\ctr{part}} but have \gls{gls} +before the first \gls{part}. An empty \location\ will trigger an +error with \app{makeindex} and \app{xindy}. + +\begin{warning} +Since no entries are defined on the first \LaTeX\ run with +\app{bib2gls}, there's no way of determining the entry's +\idx{glossary} \gloskey{type} or of finding if the entry's \gloskey{counter} +key has been set. This means that if the counter has been assigned +to either the entry's \idx{glossary} or to the entry itself, the +\idx{locationcounter} can't be implemented until the entry has +been defined. A second build is required to ensure that the +\locations\ use the correct counter. +\end{warning} + +The \idx{locationcounter} must expand to syntax that's recognised by the +\idx{indexingapp}. This is very restrictive with \app{makeindex}, +which only recognises Western Arabic (\gls{arabic}), +\idx{lowercase} Roman numerals (\gls{roman}), +\idx{uppercase} Roman numerals (\gls{Roman}), +\idx{lowercase} Basic Latin (\gls{alph}) and +\idx{uppercase} Basic Latin (\gls{Alph}), with optionally a +separator (hyphen by default). With \app{xindy}, the syntax must be +defined (see the \sty{glossaries} manual for further details). + +There's no restriction on the location syntax with \app{bib2gls}. +The only limitation is that if \app{bib2gls} can't determine an +associated numeric value according to its location parser, it won't form ranges. +This means that with \app{bib2gls}, you can set arbitrary text as +the \location\ (that's not related to a counter) with \glsopt{thevalue}. +You can also use \glsopt{thevalue} with \app{makeindex} and +\app{xindy}, but only if the value matches the required \location\ +syntax. + +Both \app{makeindex} and \app{xindy} order the \locations\ in the \idxpl{locationlist}. +For example: +\begin{codebox} +\gls{makeglossaries} +\gls{newglossaryentry}\marg{sample}\marg{\gloskeyval{name}{sample},\gloskeyval{description}{an example}} +\cbeg{document} +\gls{gls}\oarg{\glsoptval{thevalue}{Z}}\marg{sample} (Z), \gls{gls}\oarg{\glsoptval{thevalue}{4}}\marg{sample} (4), +\gls{gls}\oarg{\glsoptval{thevalue}{xi}}\marg{sample} (xi), \gls{gls}\oarg{\glsoptval{thevalue}{2}}\marg{sample} (2), +\gls{gls}\oarg{\glsoptval{thevalue}{iii}}\marg{sample} (iii), \gls{gls}\oarg{\glsoptval{thevalue}{A}}\marg{sample} (A). +\codepar +\gls{printglossaries} +\cend{document} +\end{codebox} +\begin{resultbox} +\createexample*[arara={pdflatex,makeglossaries,pdflatex,pdfcrop}, + label={ex:mkidxloclistorder}, +title={Location list ordering (\appfmt{makeindex})}, +description={Example document with contrived locations that result +in an ordered location list consisting of iii, xi, 2, 4, A, Z}] +{% +\cmd{usepackage}\marg{glossaries-extra}^^J% +\gls{makeglossaries}^^J% +\gls{newglossaryentry}\marg{sample}\marg{\gloskeyval{name}{sample},\gloskeyval{description}{an example}} +} +{% +\gls{gls}\oarg{thevalue=Z}\marg{sample} (Z), \gls{gls}\oarg{thevalue=4}\marg{sample} (4),^^J% +\gls{gls}\oarg{thevalue=xi}\marg{sample} (xi), \gls{gls}\oarg{thevalue=2}\marg{sample} (2),^^J% +\gls{gls}\oarg{thevalue=iii}\marg{sample} (iii), \gls{gls}\oarg{thevalue=A}\marg{sample} (A).^^J% +\gls{printglossaries} +} +\end{resultbox} + +With \app{makeindex}, the \idx{locationlist} is grouped into the +different number formats (\gls{roman}, \gls{arabic} and \gls{Alph}), +with each group ordered numerically. The same result can be produced +with \app{xindy} by adding the \opt{xindy} package option to the +above example. + +With \app{bib2gls}, the \idx{locationlist} is always in order of +\idx{indexing}. The above example document can be converted to use +\app{bib2gls} as follows: +\begin{codebox} +\cbeg{filecontents*}\marg{\cmd{jobname}.bib} +\atentry{entry}\marg{sample,\gloskeyval{name}{sample},\gloskeyval{description}{an example}} +\cend{filecontents*} +\cmd{usepackage}[\opt{record}]\marg{glossaries-extra} +\gls{GlsXtrLoadResources} +\cbeg{document} +\gls{gls}\oarg{\glsoptval{thevalue}{Z}}\marg{sample} (Z), \gls{gls}\oarg{\glsoptval{thevalue}{4}}\marg{sample} (4), +\gls{gls}\oarg{\glsoptval{thevalue}{xi}}\marg{sample} (xi), \gls{gls}\oarg{\glsoptval{thevalue}{2}}\marg{sample} (2), +\gls{gls}\oarg{\glsoptval{thevalue}{iii}}\marg{sample} (iii), \gls{gls}\oarg{\glsoptval{thevalue}{A}}\marg{sample} (A). +\gls{printunsrtglossaries} +\cend{document} +\end{codebox} +\begin{resultbox} +\createexample*[arara={pdflatex,bib2gls,pdflatex,pdfcrop}, + label={ex:b2gloclistorder}, +title={Location list ordering (\appfmt{bib2gls})}, +description={Example document with contrived locations that result +in a location list consisting of Z, 4, xi, 2, ii, A, which +corresponds to the record order}] +{% +\cbeg{filecontents*}\marg{\cmd{jobname}.bib}^^J% +@entry\marg{sample,name=\marg{sample},description=\marg{an example}}^^J% +\cend{filecontents*}^^J% +\cmd{usepackage}[record]\marg{glossaries-extra}^^J% +\gls{GlsXtrLoadResources} +} +{% +\gls{gls}\oarg{thevalue=Z}\marg{sample} (Z), \gls{gls}\oarg{thevalue=4}\marg{sample} (4),^^J% +\gls{gls}\oarg{thevalue=xi}\marg{sample} (xi), \gls{gls}\oarg{thevalue=2}\marg{sample} (2),^^J% +\gls{gls}\oarg{thevalue=iii}\marg{sample} (iii), \gls{gls}\oarg{thevalue=A}\marg{sample} (A).^^J% +\codepar +\gls{printunsrtglossaries} +} +\end{resultbox} +This example is contrived. For most documents, the order of \idx{indexing} +will likely match the desired \idx{locationlist} order. + +Another important difference between \app{bib2gls} and the other +indexing methods is the treatment of cross-references identified by +the cross-reference keys \gloskey{see}, \gloskey{seealso} and +\gloskey{alias}. With \app{bib2gls}, the cross-referencing +information is picked up when \app{bib2gls} parses the \ext{bib} +file and is used to establish dependencies, which ensures that when +entries with cross-references are selected, their cross-referenced +entries will also be selected. + +With the other methods, cross-references are added to an entry's +\idx{locationlist} by \idx{indexing} the entry with a special +format. The \gloskey{see}, \gloskey{seealso} and \gloskey{alias} +keys automatically trigger this \idx{indexing} unless +\optval{autoseeindex}{false}. See \sectionref{sec:xr} for further +details. -Next use: \gls{shtml}, \gls{ssi} and \gls{html}. +Every time an entry is \indexed, the following hook is also used: +\cmddef{glsxtrdowrglossaryhook} +This does nothing by default. The argument is the entry's label. + +The \idx{indexing} code is encapsulated with: +\cmddef{glsencapwrcontent} +This adds grouping, which helps to prevent spacing issues caused by +the \idx{whatsit} that's created by the \idx{indexing}. + +The base \sty{glossaries} package always performs the \idx{indexing} +before the \idx{linktext} for the \idx{glslike} and \idx{glstextlike} +commands. This means that if a page break occurs in the middle of +the \idx{linktext}, the \location\ will refer to the page number at +the start of the \idx{linktext} (assuming the default \ctr{page} +\idx{locationcounter}). With \sty{glossaries-extra}, you can use the +option \glsoptval{wrgloss}{after} to have the \idx{indexing} occur after +the \idx{linktext}. The \catattr{wrgloss} attribute can also be +used. The default setting is initialised with \gls{glsxtrinitwrgloss} +(see \sectionref{sec:defaultglsopts}). + +Every time an entry is \indexed, an \idx{internalfield} associated with the entry's +label is globally updated to keep a count of the number of times the entry has +been \indexed. The value can be accessed with: +\cmddef{glsentryindexcount} +This command will expand to 0 if the entry hasn't been \indexed\ or hasn't been +defined. To test if the value is greater than 0 (that is, to test if the entry has been +\indexed\ yet), use: +\cmddef{glsifindexed} +This expands to \meta{true} if the entry is defined and has been \indexed, +otherwise it expands to \meta{false}. No warning or error occurs if +the entry hasn't been defined. + +Note that the index count is a running total. This is not the same as the +\record\ count saved by \app{bib2gls}['s] \switch{record-count} +switch, which represents the total number of \records\ for the given +entry from the previous \LaTeX\ run. + +The base \sty{glossaries} package defines: +\cmddef{glswriteentry} +This command conditionally writes the indexing code (supplied by the second +argument \meta{code}). +The original definition simply tests whether or not the \opt{indexonlyfirst} setting +is on. The \sty{glossaries-extra} package redefines this command to perform additional +checks to determine whether or not the \idx{indexing} code should be performed. + +The modified definition uses: +\cmddef{glsxtrifindexing} +to test the \glsopt{noindex} setting. This does \meta{false} if +\glsoptval{noindex}{true}, otherwise it does \meta{true}. +\cmddef{ifglsindexonlyfirst} +This is a conditional that corresponds to the \opt{indexonlyfirst} +package option. \Idx{firstuse} is tested using +\gls{GlsXtrIfUnusedOrUndefined} rather than \gls{ifglsused}. The +\catattr{indexonlyfirst} attribute is also tested. If the +\qt{index only first} setting is on and the entry has been +\idxc{firstuseflag}{used}, \meta{code} isn't performed but +auto-indexing via \gls{glsxtrdoautoindexname} is still performed +(see \sectionref{sec:autoindex}). + +\begin{warning} +Since no entries are defined on the first \LaTeX\ run with +\app{bib2gls}, there's no way of keeping track of whether or not an +entry has been used or what its \gloskey{category} is, which is required to +query the \catattr{indexonlyfirst} attribute, so for the first +document build all instances will be \indexed. A second build is +required for the \qt{index only first} feature. +\end{warning} + +\section{Cross-Referencing} +\label{sec:xr} + +The base \sty{glossaries} package only provides the \gloskey{see} +key, which automatically \idxc{indexing}{indexes} the cross-reference using +\gls{glssee}. The value of this key isn't saved and can't be +accessed later. (The key was simply provided as a shortcut.) +The \idx{indexing} ensures that the cross-reference is +shown in the \idx{locationlist}. -\newpage -Next page. +\begin{important} +The auto-indexing feature of the \gloskey{see} key was intended as a +shortcut where only entries required in the document are defined. +If you want to have a large file containing entries that may or may not +be required in the document, then using \gloskey{see}, +\gloskey{seealso} or \gloskey{alias} can cause unwanted entries to +appear in the glossary. In this case, see +\sectionref{sec:seenoindex}. +\end{important} +The \sty{glossaries-extra} package saves the value of the +\gloskey{see} key and additionally provides the \gloskey{seealso} +and \gloskey{alias} keys that perform similar functions. The values +of the \gloskey{see}, \gloskey{seealso} and \gloskey{alias} keys can +all be accessed at a later point in the document. + +If an entry with a cross-reference has been included in the +glossary, there's no guarantee that the cross-referenced entry will +also be included. It won't be included if it hasn't been indexed +anywhere in the document. You can use the \opt{indexcrossrefs} +package option to search for cross-references that require \idx{indexing} +at the end of the document, but note that this can be time-consuming +if you have a large number of entries. + +\begin{information} +With \app{bib2gls} you can simply change the selection criteria +(\resourceoptvalm{selection}{recorded and deps and see} or +\resourceoptvalm{selection}{recorded and deps and see not +also}) to ensure that all cross-referenced entries are included even +if they haven't been \indexed\ in the document. +\end{information} + + +Example (\gloskey{see} and \gloskey{seealso} keys): +\begin{codebox} +\gls{newglossaryentry}\marg{pumpkin}\marg{\gloskeyval{name}{pumpkin},\gloskeyval{description}{}} +\gls{newglossaryentry}\marg{cucumber}\marg{\gloskeyval{name}{cucumber},\gloskeyval{description}{}} +\gls{newglossaryentry}\marg{melon}\marg{\gloskeyval{name}{melon},\gloskeyval{description}{}} +\gls{newglossaryentry}\marg{gourd}\marg{\gloskeyval{name}{gourd},\gloskeyval{description}{}, + \gloskeyval{see}{pumpkin,cucumber,melon}} +\gls{newglossaryentry}\marg{courgette}\marg{\gloskeyval{name}{courgette},\gloskeyval{description}{}} +\gls{newglossaryentry}\marg{marrow}\marg{\gloskeyval{name}{marrow},\gloskeyval{description}{}, + \gloskeyval{seealso}{courgette}} +\end{codebox} +When the \code{gourd} entry is defined, the cross-reference will +automatically be \indexed\ using \gls{glssee}. This means that the +\code{gourd} entry will appear in the glossary, regardless of +whether or not it is used in the document, with \qt{\emph{see} +pumpkin, cucumber \& melon} in the \idx{locationlist}. If +\code{gourd} is also \indexed\ in the document, then those +\locations\ will also be added to the gourd's \idx{locationlist}. + +The cross-referenced entries (pumpkin, cucumber and melon) will only +appear in the glossary if they are also \indexed\ in the document. +This can be implemented automatically with \opt{indexcrossrefs}. + +The \gloskey{seealso} key in the \code{marrow} entry functions in +much the same way, but it is \indexed\ with \gls{glsxtrindexseealso}. +This means that the \code{marrow} entry will have \qt{\emph{see +also} courgette} in its \idx{locationlist}. + +The \gloskey{see} key may optionally start with \oargm{tag} to +replace the default \gls{seename} tag with \meta{tag}. The +\gloskey{seealso} key doesn't permit this. For example, the +following is permitted: +\begin{codebox} +\gls{newglossaryentry}\marg{gourd}\marg{\gloskeyval{name}{gourd},\gloskeyval{description}{}, + \gloskeyval{see}{[related topics]pumpkin,cucumber,melon}} +\end{codebox} +but you can't replace \gloskey{see} with \gloskey{seealso} in the +above as it would assume that the first label in the list is +\code{[related topics]pumpkin} which is incorrect. The tag would +have to be removed: +\begin{codebox} +\gls{newglossaryentry}\marg{gourd}\marg{\gloskeyval{name}{gourd},\gloskeyval{description}{}, + \gloskeyval{seealso}{pumpkin,cucumber,melon}} +\end{codebox} +(You could then redefine \gls{seealsoname} to \code{related topics}, +if required or redefine \gls{glsxtruseseealsoformat} as applicable.) + +Example (\gloskey{alias} key): +\begin{codebox} +\gls{newglossaryentry}\marg{zucchini}\marg{\gloskeyval{name}{zucchini},\gloskeyval{description}{}, + \gloskeyval{alias}{courgette}} +\end{codebox} +When the \code{zucchini} entry is defined, the \gloskey{alias} key +will automatically \idxc{indexing}{index} zucchini with +\code{\gls{glssee}\marg{zucchini}\marg{courgette}}. This means that +the \code{zucchini} entry will be present in the glossary with +\qt{\emph{see} courgette} in the \idx{locationlist}. If the +\code{zucchini} entry is referenced in the document using a command +like \gls{gls}, then the hyperlink (if enabled) will go to the +\code{courgette} entry (not the \code{zucchini} entry) but the +\code{zucchini} entry won't be indexed. + +If you want the \code{zucchini} entry \locations\ added to the +\code{courgette} entry, you can redefine +\gls{glsxtrsetaliasnoindex} (see \sectionref{sec:glssee}) or, with +\app{bib2gls}, use the \resourceoptval{alias-loc}{transfer} setting. + +\begin{information} +With \app{bib2gls}, cross-references are selected according to the +\resourceopt{selection} criteria. See the \app{bib2gls} manual for +further details. +\end{information} + +\subsection{Entries that may not be required} +\label{sec:seenoindex} + +If you have a file containing a large number of entry definitions +shared across multiple documents, then the use of the \gloskey{see}, +\gloskey{seealso} or \gloskey{alias} key can cause unwanted entries +to appear in the document. This can be demonstrated as follows. +Suppose the file \filefmt{myentries.tex} contains: +\begin{codebox} +\gls{newglossaryentry}\marg{pumpkin}\marg{\gloskeyval{name}{pumpkin},\gloskeyval{description}{}} +\gls{newglossaryentry}\marg{cucumber}\marg{\gloskeyval{name}{cucumber},\gloskeyval{description}{}} +\gls{newglossaryentry}\marg{melon}\marg{\gloskeyval{name}{melon},\gloskeyval{description}{}} +\gls{newglossaryentry}\marg{gourd}\marg{\gloskeyval{name}{gourd},\gloskeyval{description}{}, + \gloskeyval{see}{pumpkin,cucumber,melon}} +\gls{newglossaryentry}\marg{cucurbit}\marg{\gloskeyval{name}{cucurbit},\gloskeyval{description}{}, + \gloskeyval{see}{gourd}} +\gls{newglossaryentry}\marg{courgette}\marg{\gloskeyval{name}{courgette},\gloskeyval{description}{}} +\gls{newglossaryentry}\marg{marrow}\marg{\gloskeyval{name}{marrow},\gloskeyval{description}{}, + \gloskeyval{seealso}{courgette}} +\gls{newglossaryentry}\marg{zucchini}\marg{\gloskeyval{name}{zucchini},\gloskeyval{description}{}, + \gloskeyval{alias}{courgette}} +\gls{newglossaryentry}\marg{broccoli}\marg{\gloskeyval{name}{broccoli},\gloskeyval{description}{}} +\gls{newglossaryentry}\marg{cauliflower}\marg{\gloskeyval{name}{cauliflower},\gloskeyval{description}{}, + \gloskeyval{seealso}{broccoli}} +\end{codebox} +Some of these entries have a cross-reference key set, but not all of +these entries are required in the document: +\begin{codebox} +\cmd{usepackage}[colorlinks]\marg{hyperref} +\cmd{usepackage}\oarg{\opt{nostyles},\optval{stylemods}{bookindex},\optval{style}{bookindex}} + \marg{glossaries-extra} +\gls{makeglossaries} +\gls{loadglsentries}\marg{myentries} +\cbeg{document} +This document is only discussing \gls{glspl}\marg{courgette} (baby +\gls{glspl}\marg{marrow}, also called a \gls{gls}\marg{zucchini}), +\gls{glspl}\marg{pumpkin} and \gls{glspl}\marg{melon}. +\gls{printglossaries} +\cend{document} +\end{codebox} +\begin{resultbox} +\createexample[arara={pdflatex,makeglossaries,pdflatex,pdfcrop}, + label={ex:autoseeindextrue}, + title={Cross-references (\optfmt{autoseeindex\dequals true})}, + description={Example document illustrating the cross-referencing +fields with the default auto-indexing of the cross-referenced terms}] +{% + \usepackage[colorlinks]{hyperref}^^J% + \usepackage[nostyles,stylemods=bookindex,style=bookindex]^^J% + {glossaries-extra}^^J% + \makeglossaries^^J% + \newglossaryentry{pumpkin}{name={pumpkin},description={}}^^J% + \newglossaryentry{cucumber}{name={cucumber},description={}}^^J% + \newglossaryentry{melon}{name={melon},description={}}^^J% + \newglossaryentry{gourd}{name={gourd},description={},^^J% + see={pumpkin,cucumber,melon}}^^J% + \newglossaryentry{cucurbit}{name={cucurbit},description={},^^J% + see={gourd}}^^J% + \newglossaryentry{courgette}{name={courgette},description={}}^^J% + \newglossaryentry{marrow}{name={marrow},description={},^^J% + seealso={courgette}}^^J% + \newglossaryentry{zucchini}{name={zucchini},description={},^^J% + alias={courgette}}^^J% + \newglossaryentry{broccoli}{name={broccoli},description={}}^^J% + \newglossaryentry{cauliflower}{name={cauliflower},description={}, + seealso={broccoli}}^^J% +} +{ +This document is only discussing +\glspl{courgette} (baby \glspl{marrow}, +also called a \gls{zucchini}), +\glspl{pumpkin} and \glspl{melon}.^^J% \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. If you have used commands like -\ics{acrshort}, \ics{acrlong} and \ics{acrfull}, you need to -substitute them with \ics{glsxtrshort}, \ics{glsxtrlong} and -\ics{glsxtrfull}. (This includes plural and case-changing forms.) -Your text editor's search and replace function should help with -this. If you have used the \pkgopt{shortcuts} package option then -use \pkgopt[ac]{shortcuts} in order to continue using the shortcut -commands like \ics{ac}. With this setting, \ics{acs} will use -\ics{glsxtrshort} instead of \ics{acrshort} etc. - -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} +} +\end{resultbox} +Note that the glossary includes cucurbit and gourd, which aren't +referenced in the document. They could be useful as a redirect for +the reader, but the gourd entry cross-references the +cucumber entry, which isn't included in the glossary, so the +hyperlink target is undefined. The cauliflower entry has also been +included in the glossary, but in this case it's not useful for the +reader as neither cauliflower nor broccoli (which it +cross-references) are mentioned in the document. As with the +cucumber cross-reference, the broccoli cross-reference hyperlink +target is undefined. + +There are a number of methods to address some of these problems. +The first method has the cross-referencing keys in the \ext{tex} +file (as above), but disables the auto-indexing: +\begin{codebox} +\cmd{usepackage}[colorlinks]\marg{hyperref} +\cmd{usepackage}\oarg{\optval{autoseeindex}{false},\opt{nostyles},\optval{stylemods}{bookindex}, + \optval{style}{bookindex}}\marg{glossaries-extra} +\gls{makeglossaries} +\gls{loadglsentries}\marg{myentries} +\cbeg{document} +This document is only discussing \gls{glspl}\marg{courgette} (baby +\gls{glspl}\marg{marrow}, also called a \gls{gls}\marg{zucchini}), +\gls{glspl}\marg{pumpkin} and \gls{glspl}\marg{melon}. +\gls{printglossaries} +\cend{document} +\end{codebox} +\begin{resultbox} +\createexample[arara={pdflatex,makeglossaries,pdflatex,pdfcrop}, + label={ex:autoseeindexfalse}, + title={Cross-references (\optfmt{autoseeindex\dequals false})}, + description={Example document illustrating the cross-referencing +fields without the auto-indexing of the cross-referenced terms}] +{% + \usepackage[colorlinks]{hyperref}^^J% + \usepackage[autoseeindex=false,nostyles,stylemods=bookindex,style=bookindex]^^J% + {glossaries-extra}^^J% + \makeglossaries^^J% + \newglossaryentry{pumpkin}{name={pumpkin},description={}}^^J% + \newglossaryentry{cucumber}{name={cucumber},description={}}^^J% + \newglossaryentry{melon}{name={melon},description={}}^^J% + \newglossaryentry{gourd}{name={gourd},description={},^^J% + see={pumpkin,cucumber,melon}}^^J% + \newglossaryentry{cucurbit}{name={cucurbit},description={},^^J% + see={gourd}}^^J% + \newglossaryentry{courgette}{name={courgette},description={}}^^J% + \newglossaryentry{marrow}{name={marrow},description={},^^J% + seealso={courgette}}^^J% + \newglossaryentry{zucchini}{name={zucchini},description={},^^J% + alias={courgette}}^^J% + \newglossaryentry{broccoli}{name={broccoli},description={}}^^J% + \newglossaryentry{cauliflower}{name={cauliflower},description={}, + seealso={broccoli}}^^J% +} +{ +This document is only discussing +\glspl{courgette} (baby \glspl{marrow}, +also called a \gls{zucchini}), +\glspl{pumpkin} and \glspl{melon}.^^J% \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} +} +\end{resultbox} +This doesn't show the zucchini entry or any of +the cross-references in the \idx{glossary} because the information +hasn't been added to the \idx{indexing} files. One way around this +is to insert the cross-reference in a \idx{postdeschook}. + +\begin{codebox} +\cmd{usepackage}[colorlinks]\marg{hyperref} +\cmd{usepackage}\oarg{\optval{autoseeindex}{false},\opt{nostyles},\optval{stylemods}{bookindex}, + \optval{style}{bookindex}}\marg{glossaries-extra} +\gls{makeglossaries} +\gls{loadglsentries}\marg{myentries} +\gls{glsdefpostdesc}\marg{general}\marg{\comment{} + \gls{glsxtrseelists}\marg{\gls{glscurrententrylabel}}\comment{} +} +\cbeg{document} +This document is only discussing +\gls{glspl}\marg{courgette} (baby \gls{glspl}\marg{marrow}, +also called a \gls{gls}\marg{zucchini}), +\gls{glspl}\marg{pumpkin} and \gls{glspl}\marg{melon}. +\gls{printglossaries} +\cend{document} +\end{codebox} +\begin{resultbox} +\createexample[arara={pdflatex,makeglossaries,pdflatex,pdfcrop}, + label={ex:autoseeindexfalsepostname}, + title={Cross-references (\optfmt{autoseeindex\dequals false} and post-name hook)}, + description={Example document illustrating the cross-referencing +fields without the auto-indexing of the cross-referenced terms but +using the post-name hook}] +{% + \usepackage[colorlinks]{hyperref}^^J% + \usepackage[autoseeindex=false,nostyles,^^J% + stylemods=bookindex,style=bookindex]{glossaries-extra}^^J% + \makeglossaries^^J% + \newglossaryentry{pumpkin}{name={pumpkin},description={}}^^J% + \newglossaryentry{cucumber}{name={cucumber},description={}}^^J% + \newglossaryentry{melon}{name={melon},description={}}^^J% + \newglossaryentry{gourd}{name={gourd},description={},^^J% + see={pumpkin,cucumber,melon}}^^J% + \newglossaryentry{cucurbit}{name={cucurbit},description={},^^J% + see={gourd}}^^J% + \newglossaryentry{courgette}{name={courgette},description={}}^^J% + \newglossaryentry{marrow}{name={marrow},description={},^^J% + seealso={courgette}}^^J% + \newglossaryentry{zucchini}{name={zucchini},description={},^^J% + alias={courgette}}^^J% + \newglossaryentry{broccoli}{name={broccoli},description={}}^^J% + \newglossaryentry{cauliflower}{name={cauliflower},description={}, + seealso={broccoli}}^^J% + \glsdefpostname{general}{\glsxtrseelists{\glscurrententrylabel}}^^J% +} +{ +This document is only discussing +\glspl{courgette} (baby \glspl{marrow}, +also called a \gls{zucchini}), +\glspl{pumpkin} and \glspl{melon}.^^J% +\printglossaries^^J% +} +\end{resultbox} + +However, this still doesn't solve the problem that the zucchini +entry isn't included in the glossary. It needs to be indexed, but +\idx{indexing} has been suppressed. Firstly, because the automatic +\idx{indexing} triggered by the \gloskey{alias} key has been +suppressed with \optval{autoseeindex}{false}, and, secondly, because +the presence of the \gloskey{alias} key automatically suppresses +\idx{indexing} with the \idx{glslike} and \idx{glstextlike} +commands. This doesn't cause a problem for the zucchini hyperlink, +since the target is courgette (obtained from the \gloskey{alias} key). + +The second method is to not use those keys in the entry definitions +and use \gls{glssee} or \gls{glsxtrindexseealso} within the document. +For example, the file \filefmt{myentries.tex} now contains: +\begin{codebox} +\gls{newglossaryentry}\marg{pumpkin}\marg{\gloskeyval{name}{pumpkin},\gloskeyval{description}{}} +\gls{newglossaryentry}\marg{cucumber}\marg{\gloskeyval{name}{cucumber},\gloskeyval{description}{}} +\gls{newglossaryentry}\marg{melon}\marg{\gloskeyval{name}{melon},\gloskeyval{description}{}} +\gls{newglossaryentry}\marg{gourd}\marg{\gloskeyval{name}{gourd},\gloskeyval{description}{}} +\gls{newglossaryentry}\marg{cucurbit}\marg{\gloskeyval{name}{cucurbit},\gloskeyval{description}{}} +\gls{newglossaryentry}\marg{courgette}\marg{\gloskeyval{name}{courgette},\gloskeyval{description}{}} +\gls{newglossaryentry}\marg{marrow}\marg{\gloskeyval{name}{marrow},\gloskeyval{description}{}} +\gls{newglossaryentry}\marg{zucchini}\marg{\gloskeyval{name}{zucchini},\gloskeyval{description}{}} +\gls{newglossaryentry}\marg{broccoli}\marg{\gloskeyval{name}{broccoli},\gloskeyval{description}{}} +\gls{newglossaryentry}\marg{cauliflower}\marg{\gloskeyval{name}{cauliflower},\gloskeyval{description}{}} +\end{codebox} +The document: +\begin{codebox} +\cmd{usepackage}[colorlinks]\marg{hyperref} +\cmd{usepackage}[\opt{nostyles},\optval{stylemods}{bookindex},\optval{style}{bookindex}] + \marg{glossaries-extra} +\gls{makeglossaries} +\gls{loadglsentries}\marg{myentries} +\gls{glssee}\marg{gourd}\marg{pumpkin,melon,courgette} +\gls{glssee}\marg{zucchini}\marg{courgette} +\gls{GlsXtrSetField}\marg{zucchini}\marg{alias}\marg{courgette} +\cbeg{document} +This document is only discussing \gls{glspl}\marg{courgette} (baby +\gls{glspl}\marg{marrow}, also called a \gls{gls}\marg{zucchini}), +\gls{glspl}\marg{pumpkin} and \gls{glspl}\marg{melon}. +\gls{printglossaries} +\cend{document} +\end{codebox} +\begin{resultbox} +\createexample[arara={pdflatex,makeglossaries,pdflatex,pdfcrop}, + label={ex:noxrfields}, + title={Cross-references (no \optfmt{see}, \optfmt{seealso} or \optfmt{alias})}, + description={Example document illustrating cross-references without + using the see, seealso or alias keys} + ] +{% + \usepackage[colorlinks]{hyperref}^^J% + \usepackage[nostyles,stylemods=bookindex,style=bookindex]{glossaries-extra}^^J% + \makeglossaries^^J% + \newglossaryentry{pumpkin}{name={pumpkin},description={}}^^J% + \newglossaryentry{cucumber}{name={cucumber},description={}}^^J% + \newglossaryentry{melon}{name={melon},description={}}^^J% + \newglossaryentry{gourd}{name={gourd},description={}}^^J% + \newglossaryentry{cucurbit}{name={cucurbit},description={}}^^J% + \newglossaryentry{courgette}{name={courgette},description={}}^^J% + \newglossaryentry{marrow}{name={marrow},description={}}^^J% + \newglossaryentry{zucchini}{name={zucchini},description={}}^^J% + \newglossaryentry{broccoli}{name={broccoli},description={}}^^J% + \newglossaryentry{cauliflower}{name={cauliflower},description={}}^^J% + \glssee{gourd}{pumpkin,melon,courgette}^^J% + \glssee{zucchini}{courgette}^^J% + \GlsXtrSetField{zucchini}{alias}{courgette}^^J% +} +{ +This document is only discussing +\glspl{courgette} (baby \glspl{marrow}, +also called a \gls{zucchini}), +\glspl{pumpkin} and \glspl{melon}.^^J% \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} +} +\end{resultbox} +Note that aliases require the \gloskey{alias} field to be set. In +this case, I've set it with \gls{GlsXtrSetField}. The gourd and +zucchini entries have been included in the glossary because they +were added with \gls{glssee}. The other entries are in the glossary +because they were indexed when referenced with \gls{gls} or +\gls{glspl}. + +Since cucumber isn't required in the document, I haven't included it +in the cross-reference list for gourd. This method is flexible as it +allows the cross-referencing to vary between documents. For example, +another document may instead have: +\begin{codebox} +\gls{glsxtrindexseealso}\marg{pumpkin}\marg{courgette,melon} +\gls{glsxtrindexseealso}\marg{melon}\marg{pumpkin,courgette} +\gls{glsxtrindexseealso}\marg{courgette}\marg{pumpkin,melon} +\end{codebox} + +The third method is to switch to \app{bib2gls}. The file +\filefmt{myentries.tex} can be converted to \filefmt{myentries.bib} +using: +\begin{terminal} +\app{convertgls2bib} \switch{index-conversion} myentries.tex myentries.bib +\end{terminal} +I've used the option \switch{index-conversion} (or \switch{i}) which will use +\atentry{index} instead of \atentry{entry} for entries that have an +empty description (which is the case in this example). +This creates the file \filefmt{myentries.bib}, which contains the +following (space compacted): +\begin{codebox} +\comment{Encoding: UTF-8} +@index\marg{pumpkin, \gloskeyval{name}{pumpkin}} +@index\marg{cucumber, \gloskeyval{name}{cucumber}} +@index\marg{melon, \gloskeyval{name}{melon}} +@index\marg{gourd, \gloskeyval{see}{pumpkin,cucumber,melon}, \gloskeyval{name}{gourd}} +@index\marg{cucurbit, \gloskeyval{see}{gourd}, \gloskeyval{name}{cucurbit}} +@index\marg{courgette, \gloskeyval{name}{courgette}} +@index\marg{marrow, \gloskeyval{name}{marrow}, \gloskeyval{seealso}{courgette}} +@index\marg{zucchini, \gloskeyval{name}{zucchini}, \gloskeyval{alias}{courgette}} +@index\marg{broccoli, \gloskeyval{name}{broccoli}} +@index\marg{cauliflower, \gloskeyval{name}{cauliflower}, \gloskeyval{seealso}{broccoli}} +\end{codebox} +The earlier example~\ref{ex:autoseeindextrue} on page~\pageref{ex:autoseeindextrue} +can be rewritten as: +\begin{codebox} +\cmd{usepackage}[colorlinks]\marg{hyperref} +\cmd{usepackage}\oarg{\opt{record},\opt{nostyles},\optval{stylemods}{bookindex},\optval{style}{bookindex}} + \marg{glossaries-extra} +\gls{GlsXtrLoadResources}\oarg{\resourceoptval{src}{myentries}} +\cbeg{document} +This document is only discussing \gls{glspl}\marg{courgette} (baby +\gls{glspl}\marg{marrow}, also called a \gls{gls}\marg{zucchini}), +\gls{glspl}\marg{pumpkin} and \gls{glspl}\marg{melon}. +\gls{printunsrtglossaries} +\cend{document} +\end{codebox} +In order to support letter \idxpl{group}, \app{bib2gls} needs to be +invoked with the \switch{group} switch. The result is: +\begin{resultbox} +\createexample*[arara={pdflatex,bib2gls: { group: on },pdflatex,pdfcrop}, + label={ex:recordedanddeps}, + title={Cross-references (\appfmt{bib2gls})}, + description={Example document illustrating the cross-referencing +fields with bib2gls and selection=recorded and deps}] +{% +\cbeg{filecontents*}{\cmd{jobname}.bib}^^J% +\% Encoding: UTF-8^^J% +@index{pumpkin, name = {pumpkin}}^^J% +@index{cucumber, name = {cucumber}}^^J% +@index{melon, name = {melon}}^^J% +@index{gourd, see = {pumpkin,cucumber,melon}, name = {gourd}}^^J% +@index{cucurbit, see = {gourd}, name = {cucurbit}}^^J% +@index{courgette, name = {courgette}}^^J% +@index{marrow, name = {marrow}, seealso = {courgette}}^^J% +@index{zucchini, name = {zucchini}, alias = {courgette}}^^J% +@index{broccoli, name = {broccoli}}^^J% +@index{cauliflower, name = {cauliflower}, seealso = {broccoli} +}^^J% +\cend{filecontents*}^^J% +\cmd{usepackage}[colorlinks]\marg{hyperref}^^J% +\cmd{usepackage}\oarg{record,nostyles,stylemods=bookindex,style=bookindex}\marg{glossaries-extra}^^J% +\gls{GlsXtrLoadResources}\oarg{src=\cmd{jobname}} +} +{ +This document is only discussing +\gls{glspl}\marg{courgette} (baby \gls{glspl}\marg{marrow}, +also called a \gls{gls}\marg{zucchini}), +\gls{glspl}\marg{pumpkin} and \gls{glspl}\marg{melon}.^^J% +\gls{printunsrtglossaries} +} +\end{resultbox} +This uses the default \resourceoptvalm{selection}{recorded and +deps}, which selects entries that have \records, +and their dependencies. Records correspond to the usual indexing +performed by the \idx{glslike}, \idx{glstextlike} or \idx{glsadd} +commands. With \app{bib2gls}, the cross-referencing fields don't +trigger an index but identify dependencies. + +Note that the above doesn't include the gourd entry (which +cross-references entries that have been indexed). The selection +criteria can be changed to also include unrecorded entries that cross-reference +selected entries. There are two options to choose from: +\resourceoptvalm{selection}{recorded and deps and see}, which will +apply to all cross-reference fields (\gloskey{see}, +\gloskey{seealso} and \gloskey{alias}, or +\resourceoptvalm{selection}{recorded and deps and see not also}, +which doesn't consider the \gloskey{seealso} field. + +Changing the \idxpl!{resourceopt} in the above example to: +\begin{codebox} +\gls{GlsXtrLoadResources}\oarg{\resourceoptval{src}{myentries}, + \resourceoptvalm{selection}{recorded and deps and see}} +\end{codebox} +results in: +\begin{resultbox} +\createexample*[arara={pdflatex,bib2gls: { group: on },pdflatex,pdfcrop}, + label={ex:recordedanddepsandsee}, + title={Cross-references (\appfmt{bib2gls} and + \optfmt{selection\dequals recorded and deps and see})}, + description={Example document illustrating the cross-referencing +fields with bib2gls and selection=recorded and deps and see}] +{% +\cbeg{filecontents*}{\cmd{jobname}.bib}^^J% +\% Encoding: UTF-8^^J% +@index{pumpkin, name = {pumpkin}}^^J% +@index{cucumber, name = {cucumber}}^^J% +@index{melon, name = {melon}}^^J% +@index{gourd, see = {pumpkin,cucumber,melon}, name = {gourd}}^^J% +@index{cucurbit, see = {gourd}, name = {cucurbit}}^^J% +@index{courgette, name = {courgette}}^^J% +@index{marrow, name = {marrow}, seealso = {courgette}}^^J% +@index{zucchini, name = {zucchini}, alias = {courgette}}^^J% +@index{broccoli, name = {broccoli}}^^J% +@index{cauliflower, name = {cauliflower}, seealso = {broccoli} +}^^J% +\cend{filecontents*}^^J% +\cmd{usepackage}[colorlinks]\marg{hyperref}^^J% +\cmd{usepackage}\oarg{record,nostyles,stylemods=bookindex,style=bookindex}\marg{glossaries-extra}^^J% +\gls{GlsXtrLoadResources}\oarg{src=\cmd{jobname},selection={recorded and deps and see}} +} +{ +This document is only discussing +\gls{glspl}\marg{courgette} (baby \gls{glspl}\marg{marrow}, +also called a \gls{gls}\marg{zucchini}), +\gls{glspl}\marg{pumpkin} and \gls{glspl}\marg{melon}.^^J% +\gls{printunsrtglossaries} +} +\end{resultbox} +This now includes the gourd entry because it cross-references +pumpkin and melon, which have been \recorded\ in the document. +The cucurbit entry is also included because it cross-references the +(now selected) gourd entry. Note that the cucumber entry has been +selected because the gourd entry depends on it. This means there are +no broken links in the glossary, but it looks a bit odd as the +cucumber entry has no \idx{locationlist}. As from \app{bib2gls} +v3.0, this can be removed with one of the cross-reference pruning +options, such as \resourceopt{prune-xr}. +For example: +\begin{codebox} +\gls{GlsXtrLoadResources}\oarg{\resourceoptval{src}{myentries}, + \resourceoptvalm{selection}{recorded and deps and see},\resourceopt{prune-xr}} +\end{codebox} +results in: +\begin{resultbox} +\createexample*[arara={pdflatex,bib2gls: { group: on },pdflatex,pdfcrop}, + label={ex:recordedanddepsandseeprune}, + title={Cross-references (\appfmt{bib2gls} and + \optfmt{selection\dequals recorded and deps and see}, \optfmt{prune-xr})}, + description={Example document illustrating the cross-referencing +fields with bib2gls and selection=recorded and deps and see and pruning}] +{% +\cbeg{filecontents*}{\cmd{jobname}.bib}^^J% +\% Encoding: UTF-8^^J% +@index{pumpkin, name = {pumpkin}}^^J% +@index{cucumber, name = {cucumber}}^^J% +@index{melon, name = {melon}}^^J% +@index{gourd, see = {pumpkin,cucumber,melon}, name = {gourd}}^^J% +@index{cucurbit, see = {gourd}, name = {cucurbit}}^^J% +@index{courgette, name = {courgette}}^^J% +@index{marrow, name = {marrow}, seealso = {courgette}}^^J% +@index{zucchini, name = {zucchini}, alias = {courgette}}^^J% +@index{broccoli, name = {broccoli}}^^J% +@index{cauliflower, name = {cauliflower}, seealso = {broccoli} +}^^J% +\cend{filecontents*}^^J% +\cmd{usepackage}[colorlinks]\marg{hyperref}^^J% +\cmd{usepackage}\oarg{record,nostyles,stylemods=bookindex,style=bookindex}\marg{glossaries-extra}^^J% +\gls{GlsXtrLoadResources}\oarg{src=\cmd{jobname},selection={recorded and deps and see},prune-xr} +} +{ +This document is only discussing +\gls{glspl}\marg{courgette} (baby \gls{glspl}\marg{marrow}, +also called a \gls{gls}\marg{zucchini}), +\gls{glspl}\marg{pumpkin} and \gls{glspl}\marg{melon}.^^J% +\gls{printunsrtglossaries} +} +\end{resultbox} +This has removed the unnecessary cucumber from the gourd's +\gloskey{see} list, and so cucumber doesn't get selected. + +\begin{information} +See the \app{bib2gls} user manual for further details on the +cross-reference selection and pruning options. +\end{information} + +\subsection{Accessing the Cross-Referencing Fields} +\label{sec:getsee} + +If you have switched off the indexing of the cross-reference +fields (with \optval{autoseeindex}{false}) or want to suppress the +\idxpl{locationlist}, then you can adjust the glossary style or +hooks to include the cross-references since they won't be shown +otherwise. + +\cmddef{glsxtrseelists} +If the entry given by \meta{entry-label} has the +\gloskey{see}, \gloskey{seealso} or \gloskey{alias} fields set, +this will display the cross reference +according to \gls{glsxtruseseeformat} (for \gloskey{see} and +\gloskey{alias}) or \gls{glsxtruseseealsoformat} (for +\gloskey{seealso}). If any of these fields are set, the list is +encapsulated with: +\cmddef{glsxtrseelistsencap} +This simply does a space followed by \meta{content}. If more than +one of the fields are set (not recommended), then they will be +displayed in the order: \gloskey{see}, \gloskey{seealso} and +\gloskey{alias}. The entire set will be encapsulated with +\gls{glsxtrseelistsencap} and each sub-list will be separated with: +\cmddef{glsxtrseelistsdelim} +which defaults to a comma followed by a space. + +\cmddef{glsxtrusesee} +If the entry given by \meta{entry-label} has the +\gloskey{see} field set, this will display the cross reference +according to \gls{glsxtruseseeformat}, otherwise this does nothing. +An error (or warning with \opteqvalref{undefaction}{warn}) will +occur if the entry hasn't been defined. + +\cmddef{glsxtrusealias} +As \gls{glsxtrusesee} but for the \gloskey{alias} field. + +\cmddef{glsxtruseseealso} +If the entry given by \meta{entry-label} has the +\gloskey{seealso} field set, this will display the cross reference +according to \gls{glsxtruseseealsoformat}, otherwise this does nothing. +An error (or warning with \opteqvalref{undefaction}{warn}) will +occur if the entry hasn't been defined. + +\cmddef{glsxtralias} +This expands to the value of the \gloskey{alias} field (which should +be a single entry label) or empty if the field isn't set. If the +entry isn't defined, this command will expand to \gls{relax} +(without any error or warning). If you want to first test if the +field is set, you can use \gls{glsxtrifhasfield}. + +\cmddef{glsxtrseealsolabels} +This expands to the value of the \gloskey{seealso} field (which +should be a comma-separated list of entry labels) or empty if the +field isn't set. If the entry isn't defined, this command will +expand to \gls{relax} (without any error or warning). If you want to +first test if the field is set, you can use \gls{glsxtrifhasfield}. + +\cmddef{glsxtruseseealsoformat} +This command is used to format a \qt{see also} cross-reference. +This is simply defined to do: +\begin{codebox*} +\gls{glsseeformat}\oarg{\gls{seealsoname}}\margm{csv-list}\margm{} +\end{codebox*} + +\subsection{Cross-Reference Indexing} +\label{sec:glssee} + +\begin{information} +If you are using \app{bib2gls}, see the \app{bib2gls} user manual +for information about the \resourceopt{selection}, +\resourceopt{see}, \resourceopt{seealso}, \resourceopt{alias}, +\resourceopt{alias-loc} options. +\end{information} + +The actual \idx{indexing} of the \gloskey{seealso} key is performed with: +\cmddef{glsxtrindexseealso} +which is analogous to \gls{glssee}. As with \gls{glssee}, this can +also be used explicitly. + +With \app{makeindex}, \gls{glsxtrindexseealso} simply does: +\begin{codebox*} +\gls{glssee}\oarg{\gls{seealsoname}}\margm{entry-label}\margm{xr-list} +\end{codebox*} +With \app{xindy}, \gls{glsxtrindexseealso} behaves in an analogous +way, using the appropriate cross-referencing markup. + +\cmddef{glsxtrsetaliasnoindex} +This hook is used within the \idx{glslike} and \idx{glstextlike} +commands to automatically switch off the \idx{indexing} for aliases. +(The hook is performed after the options set by +\gls{GlsXtrSetDefaultGlsOpts}.) + +By default, this hook just sets \glsoptval{noindex}{true}. If you would +like to add \locations\ to the aliased \idx{locationlist} then you +can redefine it to use: +\cmddef{glsxtrindexaliased} +For example: +\begin{codebox} +\cmd{renewcommand}\marg{\gls{glsxtrsetaliasnoindex}}\marg{\gls{glsxtrindexaliased}} +\end{codebox} +Note that this needs \glsoptval{noindex}{false} to ensure the +\idx{indexing} takes place so don't simply append \gls{glsxtrindexaliased} +to the definition of \gls{glsxtrsetaliasnoindex}. + +\begin{information} +Don't use the above hooks with \app{bib2gls} as this function is +disabled with \opteqvalref{record}{only} and +\opteqvalref{record}{nameref}. Use the \resourceopt{alias-loc} resource option instead. +\end{information} + +\cmddef{glsxtraddallcrossrefs} +This is used at the end of the document if +\optval{indexcrossrefs}{true} to automatically index any +cross-references (identified in the \gloskey{see}, \gloskey{seealso} +and \gloskey{alias} fields). +This command iterates over all entries in all glossaries and, if an entry has +been marked as used, does: +\cmddef{glsxtraddunusedxrefs} +which indexes any labels identified in the cross-reference fields of the entry +given by \meta{entry-label} that haven't been marked as used. + +This can be time consuming if there are a large number of +entries defined. If this is the case, you may want to consider +switching to \app{bib2gls} and use either +\resourceoptvalm{selection}{recorded and deps and see} or +\resourceoptvalm{selection}{recorded and deps and see not also}. + +There should be no need to use \gls{glsxtraddallcrossrefs} explicitly, but you +may want to redefine it to only iterate over specific glossaries. +The unused entries are indexed using the \encap{glsxtrunusedformat} +format. + +\cmddef{glsxtrunusedformat} +This ignores its argument (the \location) and just does \gls{unskip}. -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. +\section{First Use Flag} +\label{sec:glsunset} -\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} +Each entry has an associated \idx{firstuseflag} (a conditional or +boolean variable), which determines whether or not the entry has +been marked as \qt{used}. Unsetting this flag means that the entry +is marked as used. Resetting the flag means that the entry is marked +as unused. + +The \idx{glslike} commands (which are the principle method of +referencing an entry) all mark the entry as used after the +\idx{linktext} is displayed but before the \idx{postlinkhook} is +used. + +The purpose of this is to allow for additional information that +needs to be shown when a term first appears in a document. For +example, an abbreviation may need to have its full form shown on the +instance. However, there are some cases where that additional +information may need to be shown again or where the literal first +instance of the term may need to be in its terse form. For example, +if the term is used in the front matter. + +If any \idx{glslike} commands (which are robust) are used in section +headings or captions, they can end up in the table of contents or +corresponding \qt{list of \ldots} (such as the list of figures). +This can cause the \idx{firstuseflag} to be unset too soon. For +these situations, use the commands described in +\sectionref{sec:headtitle} instead. + +The base \sty{glossaries} package provides commands to explicitly +unset or reset the \idx{firstuseflag} either locally (confined to +the current scope) or globally. These commands are: +\gls{glsunset} (global unset), \gls{glslocalunset} (local unset), +\gls{glsreset} (global reset) and \gls{glslocalreset} (local reset). + +The \sty{glossaries-extra} package adds hooks to the above commands. +These do nothing by default, but are modified by \gls{glsenableentrycount} +and \gls{glsenableentryunitcount} to perform the count increment or +reset (see \sectionref{sec:entrycount}). + +\cmddef{glsxtrpostunset} +This hook is added to \gls{glsunset}. + +\cmddef{glsxtrpostlocalunset} +This hook is added to \gls{glslocalunset}. + +\cmddef{glsxtrpostreset} +This hook is added to \gls{glsreset}. + +\cmddef{glsxtrpostlocalreset} +This hook is added to \gls{glslocalreset}. + +The base package also provides commands to unset or reset +all entries or all entries within particular glossaries: +\gls{glsunsetall} and \gls{glsresetall}. For example, if you don't +want the \idx{firstuse} in the front matter, you can unset all +entries at the start of the front matter and reset them at the start +of the main matter. +\begin{codebox} +\cmd{frontmatter}\gls{glsunsetall} +\ldots +\cmd{mainmatter}\gls{glsresetall} +\end{codebox} + +With \sty{glossaries-extra} you can unset a specific subset of +entries. +\cmddef{glslocalunseteach} +Locally unsets each entry in the given comma-separated list of entry labels. +\cmddef{glslocalreseteach} +Locally resets each entry in the given comma-separated list of entry labels. + +You can test if an entry has been marked as used with \gls{ifglsused} +(but take care if you are using \app{bib2gls} or the +\optval{undefaction}{warn} option, see below). +This command allows the entry display style to vary the +\idx{linktext} according to whether or not the entry has been marked +as used. However, it can't be used within the \idx{postlinkhook} as +by that time, the \idx{firstuseflag} will have already been unset. + +\begin{information} +See the \sty{glossaries} user manual for further details of the +above commands. +\end{information} + +For example, in the following document the \qt{html} entry is first +used in the abstract, which shows both the long and the short form, +but it would be helpful for the full form to be reshown in the main +section about web pages. This is achieved by resetting the +\idx{firstuseflag}. +\begin{codebox} +\gls{newabbreviation}\marg{html}\marg{HTML}\marg{hypertext markup language} +\cbeg{document} + \cbeg{abstract} + This abstract mentions \gls{gls}\marg{html}. + \cend{abstract} + Some casual reference to \gls{gls}\marg{html}. + \cmd{section}\marg{Web Pages} + \gls{glsreset}\marg{html}This section is all about \gls{gls}\marg{html}. +\cend{document} +\end{codebox} +\begin{resultbox} +\createexample*[title={Resetting the first use flag (\cmd{glsreset})}, + label={ex:glsreset}, + description={Example document illustrating the use of \cmd{glsreset}}] +{\cmd{usepackage}\marg{glossaries-extra}^^J% + \gls{newabbreviation}\marg{html}\marg{HTML}\marg{hypertext markup language} +}{% + \cbeg{abstract}^^J + This abstract mentions \gls{gls}\marg{html}.^^J + \cend{abstract}^^J + Some casual reference to \gls{gls}\marg{html}.^^J + \cmd{section}\marg{Web Pages}^^J + \gls{glsreset}\marg{html}% + This section is all about \gls{gls}\marg{html}. +} +\end{resultbox} +In the above example, an alternative is to use \gls{glsxtrfull} +where you particularly want the full form, but some abbreviation +styles have a different expansion with the +\idxc{inlinefullform}{inline} \gls{glsxtrfull} form compared with +the \idx{firstuse} of \gls{gls}. + +The \sty{glossaries-extra} package provides the options +\glsopt{preunset} and \glsopt{prereset}, which can be used to unset +or reset the \idx{firstuseflag} before the \idx{linktext}. +This means that in the above example, the line: +\begin{codebox} + \gls{glsreset}\marg{html}This section is all about \gls{gls}\marg{html}. +\end{codebox} +can be replaced with: +\begin{codebox} +This section is all about \gls{gls}\oarg{\glsopt{prereset}}\marg{html}. +\end{codebox} + +As mentioned above, the \idx{firstuseflag} is unset before the +\idx{postlinkhook}, so \gls{ifglsused} isn't helpful in the +\idx{postlinkhook}. Instead, you can use: +\cmddef{glsxtrifwasfirstuse} +This command is initialised by the \idx{glslike} commands according +to the value of the \idx{firstuseflag} before the \idx{linktext}. +It's also initialised by the \idx{glstextlike} commands: not +according to the value of the \idx{firstuseflag} but according to +whether or not the \idx{glstextlike} command emulates \idx{firstuse}. + +For example, \gls{gls} will define \gls{glsxtrifwasfirstuse} to do +its first argument if the \idx{firstuseflag} indicates the entry +hasn't yet been used, otherwise it will define +\gls{glsxtrifwasfirstuse} to do its second argument. Whereas +\gls{glsfirst} will always define \gls{glsxtrifwasfirstuse} to do +its first argument (unless used with \glsopt{preunset}) and +\gls{glstext} will always define \gls{glsxtrifwasfirstuse} to do its +second argument (unless used with \glsopt{prereset}), regardless of +the state of the \idx{firstuseflag}. + +The \glsopt{preunset} and \glsopt{prereset} options will +additionally redefine \gls{glsxtrifwasfirstuse} to match the option. +See \sectionref{sec:postlinkhook} for further details about the +\idx{postlinkhook}. + +If you want to check if the calling command was both the +\idx{firstuse} and it was a \idx{glslike} command, you can use: +\gls{glsxtrifwasglslikeandfirstuse}. + +The unset function performed by the \idx{glslike} commands before +the \idx{postlinkhook} uses the global \gls{glsunset} by default. +If you want \gls{glslocalunset} instead, you can use the +\glsopt{local} option (provided by the base \sty{glossaries} +package) or \glsoptval{postunset}{local}. To prevent the +\idx{firstuseflag} from being unset after the \idx{linktext}, use +\glsoptval{postunset}{none}. + +\begin{codebox} +\gls{newabbreviation}\marg{html}\marg{HTML}\marg{hypertext markup language} +\cbeg{document} +\marg{\% local scope +\gls{gls}\oarg{\glsopt{local}}\marg{html}. Used? \gls{ifglsused}\marg{html}\marg{Yes}\marg{No}. +}\% end scope +\codepar +Used? \gls{ifglsused}\marg{html}\marg{Yes}\marg{No}. +\codepar +\gls{gls}\oarg{\glsoptval{postunset}{none}}\marg{html}. Used? \gls{ifglsused}\marg{html}\marg{Yes}\marg{No}. +\cend{document} +\end{codebox} +\begin{resultbox} +\createexample*[title={Local unset}, + label={ex:glslocalunset}, + description={Example document illustrating locally unsetting the +first use flag}] +{\cmd{usepackage}\marg{glossaries-extra}^^J% + \gls{newabbreviation}\marg{html}\marg{HTML}\marg{hypertext markup language} +}{% +\marg{\% local scope^^J +\gls{gls}\oarg{local}\marg{html}.^^J +Used? \gls{ifglsused}\marg{html}\marg{Yes}\marg{No}.^^J +}\% end scope^^J +\codepar +Used? \gls{ifglsused}\marg{html}\marg{Yes}\marg{No}. +\codepar +\gls{gls}\oarg{postunset=none}\marg{html}. +Used? \gls{ifglsused}\marg{html}\marg{Yes}\marg{No}. +} +\end{resultbox} -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{Glossaries} -\label{sec:glossaries} +If you are using the \optval{undefaction}{warn} option (which is +automatically implemented by the \opt{record} option), the +\idx{firstuseflag} is undefined and so is neither true nor false, in +which case \gls{ifglsused} will trigger an error or warning and do neither. +In this situation, you may need to use the following command +instead. -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 extra -keys: +\cmddef{GlsXtrIfUnusedOrUndefined} +This does \meta{true} if the entry hasn't been defined or hasn't been marked as +\glsdisp{firstuseflag}{used}, otherwise does \meta{true}. Note +that this command will generate an error or warning (according to +\opt{undefaction}) if the entry hasn't been defined, but will +still do \meta{true}. This is more useful than \gls{ifglsused} +with \app{bib2gls} where the entries are never defined on the +first \LaTeX\ run. + +\subsection{Buffering Unsets} +\label{sec:unsetbuffer} + +Sometimes commands like \gls{gls} are used in a context where +changing a boolean variable can cause things to go wrong. +The outer, middle and inner formatting (see \sectionref{sec:entryfmtmods}) +can be used to change the font for the \idx{linktext}, but it may be +that the \idx{glslike} command occurs within a block of text that +needs to be encapsulated by such a command. + +One example of this is using \idx{gls} in one of the commands +provided with the \sty{soul} package. For example: +\begin{codebox} +\gls{ul}\marg{Some text about \gls{gls}\marg{html}.} +\end{codebox} +This causes the confusing error: +\begin{transcript} +Glossary entry `\marg{html}' has not been defined. +\end{transcript} +The simplest workaround is to put \code{\gls{gls}\marg{html}} inside the +argument of \gls{mbox}. For example: +\begin{codebox} +\gls{ul}\marg{Some text about \gls{mbox}\marg{\gls{gls}\marg{html}}.} +\end{codebox} +This can work provided it's not the \idx{firstuse} of this entry. +It if is, then unsetting the \idx{firstuseflag} causes a problem +and results in the error: +\begin{transcript} +! Package soul Error: Reconstruction failed. +\end{transcript} +The \sty{glossaries-extra} package provides a way of temporarily +switching off \gls{glsunset} so that it just makes a note of the +entry's label but doesn't actually perform the change. +\cmddef{GlsXtrStartUnsetBuffering} +This starts the buffering. The unstarred version doesn't check for +duplicates, so the internal list may end up with multiple +occurrences of the same label. The starred version only adds a label +to the internal list if it's not already in it. +If you are using entry counting (see \sectionref{sec:entrycount}) +the unstarred version is preferable to ensure the entry count is +correct. -\begin{itemize} -\item \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. -\item -\gloskey[printglossary]{targetnameprefix}\texttt{=}\marg{prefix}. Another way -of avoiding duplicate target names is to set a prefix -used for the names. Unlike changing \cs{glolinkprefix} this doesn't affect -any hyperlinks (such as those created with \cs{gls}). \begin{important} -This doesn't include the navigation hyper group targets in styles such as -\glostyle{listhypergroup}. The link name for these is given by -\ics{glsnavhyperlinkname}. +Buffering only applies to the global \gls{glsunset} and does not +affect the local \gls{glslocalunset}. \end{important} -\item -\gloskey[printglossary]{prefix}\texttt{=}\marg{prefix}. If you do -actually want to locally change \cs{glolinkprefix}, you can use -the \gloskey{prefix} key instead. You need to use the matching -\gloskey[glslink]{prefix} key in commands like \cs{gls}. - -\item -\gloskey[printglossary]{label}\texttt{=}\marg{label}. Labels -the glossary with \texttt{\cs{label}\marg{label}} and also -defines \cs{@currentlabelname} to the glossary's TOC title -(to provide text for \cs{nameref}). You can also set the -label before the glossary using: -\begin{definition}[\DescribeMacro\glsxtrsetglossarylabel] -\cs{glsxtrsetglossarylabel}\marg{label} -\end{definition} -but take care of duplicate labels if it's not scoped. +The buffer can be locally cleared with: +\cmddef{GlsXtrClearUnsetBuffer} +This doesn't stop buffering. It will simply discard the labels that +have been buffered so far. -\item -\gloskey[printunsrtglossary]{groups}. This is a boolean key (new to -v1.44) designed for use with \cs{printunsrtglossary} (and other -\cs{printunsrt\ldots} variations). It has no -effect with \cs{printglossary} and \cs{printnoidxglossary}. - -If true (default), group formation (group header and group skip) -will be attempted if the \gloskey{group} key has been defined and set. Note -that some styles ignore the header and group skip commands so there -may not be a noticeable difference in those cases. If this key is -set to false, no group formation will occur so there won't be any -group markup to separate letter groups so there will be no visual -separation regardless of style or the group skip setting. +In order to restore the normal behaviour of \gls{glsunset}, the +buffering must be stopped or discarded. +\cmddef{GlsXtrStopUnsetBuffering} +This stops the buffering, restores \gls{glsunset}, and unsets all +the buffered labels. The starred form uses \gls{glslocalunset} to +unset the buffered labels. -\item -\gloskey[printunsrtglossary]{leveloffset}. This key (new to -v1.44) is designed for use with \cs{printunsrtglossary} (and other -\cs{printunsrt\ldots} variations). It has no -effect with \cs{printglossary} and \cs{printnoidxglossary}. - -The value may either be a simple integer \meta{n} to indicate assignment or in the form -\texttt{++\meta{n}} to indicate an increment. This will locally -assign or increment the level offset. The default value is~0. This -will cause entries to be displayed as though their hierarchical -level is $N$ more than it would normally be (where $N$ is the level -offset). For example, a top-level entry (that is, an entry without a -parent) would normally have a hierarchical level of~0. With a level -offset of~1, it would be treated by the glossary style as though it -was actually a level~1 entry. (Remember that some styles don't -support hierarchical glossaries.) - -Note that the group formation (if supported) will still occur -between entries that don't have a parent, regardless of the level -offset. This can cause odd results but can be switched off with -\gloskey[false]{groups}. See \href{https://dickimaw-books.com/gallery/index.php?label=bib2gls-inner}{Gallery: Inner or Nested -Glossaries} for an example. -\end{itemize} +Before you stop the unset buffering, you can iterate over the +current buffer. +\cmddef{GlsXtrForUnsetBufferedList} +This iterates over the currently buffered list of entry labels and +performs \code{\csfmt{\meta{handler-cs}}\margm{entry-label}} for each label, +where \meta{cs} is a control sequence that takes a single argument. +This is best used with the starred version of +\gls{GlsXtrStartUnsetBuffering}[*] to avoid duplicates. + +\cmddef{GlsXtrDiscardUnsetBuffering} +This discards the buffer and restores \gls{glsunset} to its normal +behaviour. + +It's possible to locally unset entries before use (analogous to +\glsoptval{preunset}{local}) if the entry has already been +encountered in the buffer. This will still be problematic for +situations where changing a conditional causes a problem, but may be +useful in some situations. This feature is enabled with: +\cmddef{GlsXtrUnsetBufferEnableRepeatLocal} +This may be placed before or after \gls{GlsXtrStartUnsetBuffering} +but the locally collected list of unused entries will be cleared at +the start of each instance of \gls{GlsXtrStartUnsetBuffering}. +It will also be cleared by \gls{GlsXtrClearUnsetBuffer}. +All entries that have been marked as unused can be reset with: +\cmddef{GlsXtrResetLocalBuffer} +This will perform a local reset on all the entries in the \qt{not +used} list and do \gls{GlsXtrClearUnsetBuffer}. + +This feature can be switched off with: +\cmddef{GlsXtrUnsetBufferDisableRepeatLocal} +It's disabled by default. + +The way this feature works is as follows (while buffering is active): +\begin{enumerate} +\item Each time an entry is referenced with a \idx{glslike} command, +the \gls{glsinitreunsets} hook checks if the current entry +(identified by \gls{glslabel}) has been added to the buffer. +(Bear in mind that the label is added to the buffer after the +\idx{linktext} when \gls{glsunset} is used.) + + \begin{enumerate} + \item If it has been added to the buffer, then this is an indication + that the entry has already been used within the buffer zone (that is, + an attempt has been made to globally unset the \idx{firstuseflag}). + A local unset is then performed, which is essentially equivalent to using the + \glsoptval{preunset}{local} option, so the reference will behave + like \idx{subsequentuse}. + + \item If it hasn't been added to the buffer, then this is an + indication that the entry hasn't already been used within the + buffer zone, but it may or may not have been used before the + buffering started. If the \idx{firstuseflag} indicates that the + entry hasn't been used, the entry's label will be added to the + \qt{not used} list. The reference will behave like \idx{firstuse}, + but the unset won't be performed afterwards (because buffering is + in progress). + \end{enumerate} + +\item The entries that are in the \qt{not used} list can be locally +reset and both the buffer and the \qt{not used} list can be cleared +with \gls{GlsXtrClearUnsetBuffer}. +\end{enumerate} +Note that this approach can't be used for situations where the +change in conditional causes a problem, but it can be used in +situations where the content of an environment or command is +repeatedly processed, which upsets the \idx{firstuseflag}. + +For example, consider the following \cls{beamer} document: +\begin{codebox} +\cmd{documentclass}\marg{beamer} +\cmd{usepackage}\marg{glossaries-extra} +\gls{newabbreviation}\marg{svm}\marg{SVM}\marg{support vector machine} +\gls{newabbreviation}\marg{html}\marg{HTML}\marg{hypertext markup language} +\cbeg{document} +\cbeg{frame} + \cmd{frametitle}\marg{Frame 1} + \cbeg{itemize} + \cmd{item} \gls{gls}\marg{html} and \gls{gls}\marg{html} + \cend{itemize} +\cend{frame} +\cbeg{frame} + \cmd{frametitle}\marg{Frame 2} + \cbeg{itemize} + \cmd{item}<+-> \gls{gls}\marg{svm} and \gls{gls}\marg{svm} + \cmd{item}<+-> \gls{gls}\marg{svm} and \gls{gls}\marg{html} + \cend{itemize} +\cend{frame} +\cmd{frame}\marg{\gls{printunsrtglossaries}} +\cend{document} +\end{codebox} +The first page isn't a problem as the frame doesn't have overlays. +The first reference of the \qt{html} entry shows the full form +and the next shows just the short form. The second page +(which is the first of the overlays of the second frame) correctly +shows the full form of the \qt{svm} entry for the first reference and +the short form for the second reference, but on the third page +(the second of the overlays) now has all instances of \qt{svm} showing as +\idx{subsequentuse} (just the short form). + +I could put \gls{glslocalresetall} at the start of the frame, but +that would reset the \qt{html} entry as well. Another workaround is +to locally reset the first \qt{svm} entry with +\glsopt{prereset}{local}, but that defeats the point of the +\idx{firstuseflag}, which is intended to keep track of whether or +not you have used an entry so that you don't have to. + +The frame can be placed inside a buffering zone: +\begin{codebox} +\gls{GlsXtrStartUnsetBuffering} +\cbeg{frame} + \cmd{frametitle}\marg{Frame 2} + \cbeg{itemize} + \cmd{item}<+-> \gls{gls}\marg{svm} and \gls{gls}\marg{svm} + \cmd{item}<+-> \gls{gls}\marg{svm} and \gls{gls}\marg{html} + \cend{itemize} +\cend{frame} +\gls{GlsXtrStopUnsetBuffering} +\end{codebox} +This ensures that the \idx{firstuseflag} isn't reset until after the +frame, but it means that all references to the \qt{svm} entry on +both the second and third page show the full form. + +The \qt{repeat local} function can be used so that repeated +references for the same entry can be locally unset before use. +This can be enabled with \gls{GlsXtrUnsetBufferEnableRepeatLocal} +which fixes the second page, but not the third page, which shows all +references to \qt{svm} as the short form. What's needed is to +locally reset and entries that are in the frame but haven't yet been +used (\qt{svm}, in this case) at the start of the frame with +\gls{GlsXtrResetLocalBuffer}: +\begin{codebox} +\gls{GlsXtrStartUnsetBuffering} +\gls{GlsXtrUnsetBufferEnableRepeatLocal} +\cbeg{frame} +\gls{GlsXtrResetLocalBuffer} + \cmd{frametitle}\marg{Frame 2} + \cbeg{itemize} + \cmd{item}<+-> \gls{gls}\marg{svm} and \gls{gls}\marg{svm} + \cmd{item}<+-> \gls{gls}\marg{svm} and \gls{gls}\marg{html} + \cend{itemize} +\cend{frame} +\gls{GlsXtrStopUnsetBuffering} +\end{codebox} +Note that on the first overlay, the buffer and \qt{not used} list +are both empty. On the second overlay, the buffer contains the +\qt{svm} and \qt{html} labels and the \qt{not used} list just contains +the \qt{svm} label. The reset performed by \gls{GlsXtrResetLocalBuffer} +will reset \qt{svm} and then clear both the buffer and the \qt{not +used} list. This means that the first \qt{svm} reference is once +again considered \idx{firstuse} and it will once again be added to +the \qt{not used} list (so that it would be reset again if there was +a third overlay). +\begin{resultbox} +\createexample* + [arara={pdflatex,pdflatex},class={beamer},pages={1,2,3,4}, + label={ex:unsetbeamer}, + title={Abbreviations with \clsfmt{beamer} (unset buffering)}, + description={An example document that uses beamer with buffering} + ] +{\cmd{usepackage}\marg{glossaries-extra}^^J% +\gls{newabbreviation}\marg{svm}\marg{SVM}\marg{support vector machine}^^J% +\gls{newabbreviation}\marg{html}\marg{HTML}\marg{hypertext markup language} +}% +{% +\cbeg{frame}^^J + \cmd{frametitle}\marg{Frame 1}^^J + \cbeg{itemize}^^J + \cmd{item} \gls{gls}\marg{html} and \gls{gls}\marg{html}^^J + \cend{itemize}^^J +\cend{frame}^^J% +\gls{GlsXtrStartUnsetBuffering}^^J% +\gls{GlsXtrUnsetBufferEnableRepeatLocal}^^J% +\cbeg{frame}^^J% +\gls{GlsXtrResetLocalBuffer}^^J + \cmd{frametitle}\marg{Frame 2}^^J + \cbeg{itemize}^^J + \cmd{item}<+-> \gls{gls}\marg{svm} and \gls{gls}\marg{svm}^^J + \cmd{item}<+-> \gls{gls}\marg{svm} and \gls{gls}\marg{html}^^J + \cend{itemize}^^J% +\cend{frame}^^J% +\gls{GlsXtrStopUnsetBuffering}^^J% +\cmd{frame}\marg{\gls{printunsrtglossaries}} +} +\end{resultbox} +This is quite cumbersome, but these commands could potentially be added to +hooks at the start and end of problematic environments (but the +buffering needs to be started and ended outside of the repeated +content). + +The following example uses \gls{mbox} to protect \gls{gls} within +the buffer zone: +\begin{codebox} +\cmd{documentclass}\marg{article} +\codepar +\cmd{usepackage}[T1]\marg{fontenc} +\cmd{usepackage}\marg{soul} +\cmd{usepackage}\marg{glossaries-extra} +\codepar +\gls{newabbreviation}\marg{html}\marg{HTML}\marg{hypertext markup language} +\codepar +\cbeg{document} +\gls{GlsXtrStartUnsetBuffering} +\gls{ul}\marg{Some text about \gls{mbox}\marg{\gls{gls}\marg{html}}. +Next use: \gls{mbox}\marg{\gls{gls}\marg{html}}.} +\gls{GlsXtrStopUnsetBuffering} +\codepar +Next use: \gls{gls}\marg{html}. +\cend{document} +\end{codebox} +This produces: +\begin{resultbox} +\createexample*[title={Buffering first use unsets with \cmd{mbox}}, + label={ex:bufferingmbox}, + description={Example document that uses buffering to defer +unsetting the first use flag unset in problematic contexts. The use +of box creates an overly long line}] +{% +\cmd{usepackage}[T1]\marg{fontenc}^^J% +\cmd{usepackage}\marg{soul}^^J% +\cmd{usepackage}\marg{glossaries-extra}^^J% +\codepar +\gls{newabbreviation}\marg{html}\marg{HTML}\marg{hypertext markup language} +} +{\gls{GlsXtrStartUnsetBuffering}^^J% +\gls{ul}\marg{Some text about \gls{mbox}\marg{\gls{gls}\marg{html}}.^^J% +Next use: \gls{mbox}\marg{\gls{gls}\marg{html}}.}^^J% +\gls{GlsXtrStopUnsetBuffering}^^J% +\codepar +Next use: \gls{gls}\marg{html}. +} +\end{resultbox} +Note that the use of \gls{mbox} prevents line-breaking and the +second instance of \code{\gls{gls}\marg{html}} is treated as +\idx{firstuse}. + +\begin{warning} +Note that since the change in the \idx{firstuseflag} now doesn't +occur until \gls{GlsXtrStopUnsetBuffering}, multiple references +of the same term within the buffering zone will always be +treated as \idx{firstuse} (if the term wasn't used before the +buffering started). +\end{warning} -\section{Glossary Style Modifications} -\label{sec:glosstylemods} +Other alternatives include using \gls{protect} and inner formatting +(see \sectionref{sec:innertextformat} for limitations) or middle +formatting (see \sectionref{sec:middleformat}) with +\gls{GlsXtrExpandedFmt} (which can't be used with fragile +\idx{linktext}). Both approaches are demonstrated in the following +example: +\begin{codebox} +\cmd{documentclass}\marg{article} +\codepar +\cmd{usepackage}[T1]\marg{fontenc} +\cmd{usepackage}\marg{soul} +\cmd{usepackage}\marg{glossaries-extra} +\codepar +\gls{newabbreviation}\marg{html}\marg{HTML}\marg{hypertext markup language} +\comment{custom command to expand content before using \gls{ul}:} +\cmd{newrobustcmd}\marg{\cmd{xpul}}[1]\marg{\gls{GlsXtrExpandedFmt}\marg{\gls{ul}}\marg{\#1}} +\codepar +\cbeg{document} +First approach (inner formatting): +\marg{\% scope + \cmd{renewcommand}\marg{\gls{glsxtrdefaultentrytextfmt}}[1]\marg{\gls{ul}\marg{\#1}}\% + \gls{ul}\marg{Some text about \gls{protect}\gls{gls}\marg{html}. + Next use: \gls{protect}\gls{gls}\marg{html}} +} +\codepar +Next use: \gls{gls}\marg{html}. +\codepar +Second approach (middle formatting with expanded link text): +\gls{glsresetall} +\marg{\% scope + \cmd{renewcommand}\marg{\gls{glsxtrabbreviationfont}}[1]\marg{\cmd{xpul}\marg{\#1}}\% + \cmd{renewcommand}\marg{\gls{glsxtrregularfont}}[1]\marg{\cmd{xpul}\marg{\#1}}\% + \gls{ul}\marg{Some text about \gls{protect}\gls{gls}\marg{html}. + Next use: \gls{gls}\marg{html}.} +} +\codepar +Next use: \gls{gls}\marg{html}. +\cend{document} +\end{codebox} +This produces: +\begin{resultbox} +\createexample*[label={ex:protectinnertextformat}, +title={Alternatives to buffering}, +description={Example document illustrating inner and middle +formatting alternatives to unset +buffering where entries are referenced within sensitive formatting +commands}] +{% + \cmd{usepackage}[T1]\marg{fontenc}^^J% + \cmd{usepackage}\marg{soul}^^J% + \cmd{usepackage}\marg{glossaries-extra}^^J% + \codepar + \gls{newabbreviation}\marg{html}\marg{HTML}\marg{hypertext markup language}^^J% + \% custom command to expand content before using \gls{ul}:^^J + \cmd{newrobustcmd}\marg{\cmd{xpul}}[1]\marg{\gls{GlsXtrExpandedFmt}\marg{\gls{ul}}\marg{\#1}} + \codepar +} +{% +First approach (inner formatting):^^J% +\marg{\% scope^^J + \cmd{renewcommand}\marg{\gls{glsxtrdefaultentrytextfmt}}[1]\marg{\gls{ul}\marg{\#1}}\%^^J + \gls{ul}\marg{Some text about \gls{protect}\gls{gls}\marg{html}.^^J + Next use: \gls{protect}\gls{gls}\marg{html}}^^J% +}^^J% +\codepar +Next use: \gls{gls}\marg{html}.^^J% +\codepar +Second approach (middle formatting with expanded link text):^^J% +\gls{glsresetall}^^J% +\marg{\% scope^^J + \cmd{renewcommand}\marg{\gls{glsxtrabbreviationfont}}[1]\marg{\cmd{xpul}\marg{\#1}}\%^^J + \cmd{renewcommand}\marg{\gls{glsxtrregularfont}}[1]\marg{\cmd{xpul}\marg{\#1}}\%^^J + \gls{ul}\marg{Some text about \gls{protect}\gls{gls}\marg{html}. + Next use: \gls{gls}\marg{html}.}^^J% +} +\codepar +Next use: \gls{gls}\marg{html}. +} +\end{resultbox} + +The change in the \idx{firstuseflag} isn't the only content within +the \idx{glslike} commands that can cause a problem. The +\idx{whatsit} caused by \idx{indexing} can also be problematic. +Buffering can also be used to help with that situation. Indexing can +be switched off at the start of the buffering and +\gls{GlsXtrForUnsetBufferedList} can be used to perform the indexing +outside of the problematic content. Note that this can cause a +problem if the \location\ changes (for example, if a page break occurs +within the buffering zone). + +Buffering can also be used to simply gather the labels that have +been referenced with a \idx{glslike} command in order to, for +example, display a \idx{mini-glossary} at the end of the block. See for +example, \gallerypage{minigloss}{Gallery: Mini-Glossary}. + +\section{Accessing Fields} +\label{sec:getfields} + +See \sectionref{sec:setfields} for setting fields after an entry has +been defined, \sectionref{sec:csvfields} for fields that contain +comma-separated lists or whose values may be contained within comma-separated lists, +\sectionref{sec:getsee} for cross-referencing fields (\gloskey{see}, +\gloskey{seealso} and \gloskey{alias}), +and \sectionref{sec:fieldconditionals} for testing +field values. See also the base \sty{glossaries} package's commands, +such as \gls{glsentryname} and \gls{glsletentryfield}. + +\cmddef{glsxtrusefield} +This expands to the value of the \idx{field} +(identified by its \idxc{internalfieldlabel}{internal label} +\meta{field-label}) for the entry identified by \meta{entry-label}. +Expands to \gls{relax} if the \idx{field} or entry are undefined. + +\cmddef{Glsxtrusefield} +This is like \gls{glsxtrusefield} but converts the first character +to \idx{uppercase} using \gls{makefirstuc} (provided by +\sty{mfirstuc}) which is robust. If \sty{hyperref} is loaded, +\code{\gls{Glsxtrusefield}\margm{entry-label}} will use the expandable: +\begin{compactcodebox} +\gls{MFUsentencecase}\marg{\gls{glsxtrusefield}\margm{entry-label}} +\end{compactcodebox} +in a PDF bookmark. + +\cmddef{GLSxtrusefield} +This is like \gls{glsxtrusefield} but converts the field value to +\idx{uppercase}. See \sectionref{sec:uppercase}. + +\cmddef{glsxtrfieldtitlecase} +This is like \gls{glsxtrusefield} but converts the field value to +\idx{titlecase}. This internally uses: +\cmddef{glsxtrfieldtitlecasecs} +This converts \meta{content} to \idx{titlecase} (expanding the first +token once). If \gls{glscapitalisewords} has been defined, that will +be used, otherwise \gls{capitalisewords} will be used. + +\cmddef{glsxtrentryparentname} +Expands to the entry's parent \gloskey{name} if defined. Expands to +nothing if the entry doesn't have a parent or if the entry isn't +defined. If you simply require the parent label then use +\gls{glsentryparent} or, to first test if the entry has a parent, +either use \gls{ifglshasparent} or use \gls{glsxtrifhasfield} with +the field label set to \code{parent}. + +\cmddef{glsxtrhiername} +Displays the hierarchical name for the given entry. The +cross-reference format \gls{glsseeitemformat} may be redefined to +use this command to show the hierarchy, if required. + +This command has a recursive definition. If the entry given by +\meta{entry-label} has a parent, then this command will do +\code{\gls{glsxtrhiername}\margm{parent-label}} for the entry's parent and +will then do the separator \gls{glsxtrhiernamesep}. + +Then, regardless of whether or not the entry has a parent, it will +do \code{\gls{glsfmttext}\margm{entry-label}}, if the entry is an +abbreviation (see \sectionref{sec:examplediffsabbrv}), or +\code{\gls{glsfmtname}\margm{entry-label}} otherwise. + +\begin{information} +If \sty{hyperref} is loaded, \gls{glsxtrhiername} will +behave as \gls{glsentryname} in a PDF bookmark. +\end{information} + +\cmddef{glsxtrhiernamesep} +Separator symbol (\glsxtrhiernamesep) used between each name in +commands like \gls{glsxtrhiername}. + +\cmddef{Glsxtrhiername} +As \gls{glsxtrhiername} but the first name in the list has its first character +converted to \idx{uppercase} using \gls{Glsfmttext} or +\gls{Glsfmtname} (\idx{sentencecase}). +If \sty{hyperref} is loaded, \gls{Glsxtrhiername} will expand to: +\begin{compactcodebox} +\gls{MFUsentencecase}\marg{\gls{glsentryname}\margm{entry-label}} +\end{compactcodebox} +in a PDF bookmark. The \gls{makefirstuc} mapping from +\gls{glsxtrhiername} to \gls{Glsxtrhiername} is set with +\gls{glsmfuaddmap}, if supported. + +\cmddef{GlsXtrhiername} +As \gls{glsxtrhiername} but each name in the list has its first character +converted to \idx{uppercase} using \gls{Glsfmttext} or \gls{Glsfmtname}. + +\cmddef{GLSxtrhiername} +As \gls{glsxtrhiername} but the first name in the list is +converted to \idx{uppercase} using \gls{GLSfmttext} or +\gls{GLSfmtname}. + +\cmddef{GLSXTRhiername} +As \gls{glsxtrhiername} but each name in the list is +converted to \idx{uppercase} using \gls{GLSfmttext} or +\gls{GLSfmtname} (\idx{allcaps}). + +\section{Encapsulation (Formatting) Based on Field Values} + +These commands assume that a given entry has a special purpose field +that's used to store information on how to format text. + +\subsection{Foreign Language Field} +\label{sec:foreignfield} + +\cmddef{GlsXtrForeignTextField} +This command should expand to the \idx{internalfieldlabel} used to store a +language tag (such as \code{en-GB} or \code{de-CH-1996}). The +default value is \code{userii} (which corresponds to the +\gloskey{user2} key). + +\cmddef{GlsXtrForeignText} +If the entry given by \meta{entry-label} has the field identified by +\gls{GlsXtrForeignTextField} set, then this command will encapsulate +\meta{text} according to the language tag stored in that field. + +This uses \sty{tracklang}['s] interface to determine the language +label that corresponds to the language tag. If the language label +can be determined, the \meta{text} will be encapsulated with +\gls{foreignlanguage} otherwise just \meta{text} is done. + +If \gls{foreignlanguage} isn't defined (that is, there's no language +support for the document), this command simply does \meta{text}. If +an old version of \sty{tracklang} is used, this command issues a +warning and just does \meta{text}. + +If \sty{tracklang} can't determine the corresponding language label +to use with \gls{foreignlanguage}, then a warning is issued with: +\cmddef{GlsXtrUnknownDialectWarning} +where \meta{locale} is the language tag supplied in the given field +value and \meta{root language} is the root language that +\sty{tracklang} has inferred from the tag. + +\begin{information} +\gls{GlsXtrForeignText} requires \sty{tracklang} v1.3.6+. +\end{information} -The \sty{glossaries-extra-stylemods} package (more conveniently -loaded through the \styfmt{glossaries-extra} -\pkgopt{stylemods} option) modifies some of the predefined -styles that are provided with the \styfmt{glossaries} package. -These modifications are described in more detail in -\sectionref{sec:stylemods}. - -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} -This uses a global assignment. If you need to scope the change -you can use -\begin{definition}[\DescribeMacro\glsxtrlocalsetgrouptitle] -\cs{glsxtrlocalsetgrouptitle}\marg{label}\marg{title} -\end{definition} - -\subsection{Style Hooks} -\label{sec:stylehooks} - -The commands \ics{glossentryname} and \ics{glossentrydesc} are -modified to take into account the \catattr{glossname}, -\catattr{glossnamefont}, \catattr{glossdesc} and \catattr{glossdescfont} -attributes (see \sectionref{sec:categories}). This means you can -make simple font or case-changing modifications to the name and description -without defining a new glossary style. +\begin{codebox} +\cmd{usepackage}[main=british,brazilian,ngerman]\marg{babel} +\cmd{usepackage}\marg{glossaries-extra} +\gls{setabbreviationstyle}\marg{\abbrstyle{long-short-user}} +\gls{newabbreviation} + \oarg{\gloskeyval{user1}{Associa\c{c}\~ao Brasileria de Normas T\'ecnicas}, + \gloskeyval{user2}{pt-BR} + } + \marg{abnt}\marg{ABNT}\marg{Brazilian National Standards Organization} +\codepar +\gls{newabbreviation} + \oarg{\gloskeyval{user1}{Deutsches Institut f\"ur Normung e.V.}, + \gloskeyval{user2}{de-DE-1996}} + \marg{din}\marg{DIN}\marg{German Institute for Standardization} +\codepar +\gls{newabbreviation}\marg{tug}\marg{TUG}\marg{\cmd{TeX}\cmd{ }User Group} +\codepar +\cmd{renewcommand}*\marg{\gls{glsxtruserparen}}[2]\marg{\% + \gls{glsxtrfullsep}\marg{\#2}\% + \gls{glsxtrparen} + \marg{\#1\% + \gls{ifglshasfield}\marg{\gls{glsxtruserfield}}\marg{\#2}\% + \marg{, \cmd{emph}\marg{\gls{GlsXtrForeignText}\marg{\#2}\marg{\gls{glscurrentfieldvalue}}}}\% + \marg{}\% + }\% +} +\codepar +\cbeg{document} +\gls{gls}\marg{abnt}, \gls{gls}\marg{din}, \gls{gls}\marg{tug}. +\gls{printunsrtglossaries} +\cend{document} +\end{codebox} +This produces: +\begin{resultbox} +\createexample*[title={Foreign language field encapsulation}, + label={ex:foreignlangfmt}, + description={Example document illustrating fields containing +different languages that need encapsulating with the relevant +language command}] +{% +\cmd{usepackage}[main=british,brazilian,ngerman]\marg{babel}^^J% +\cmd{usepackage}\marg{glossaries-extra}^^J% +\gls{setabbreviationstyle}\marg{long-short-user}^^J% +\gls{newabbreviation}^^J% + \oarg{\gloskeyval{user1}{Associa\c{c}\~ao Brasileria de Normas T\'ecnicas},^^J% + \gloskeyval{user2}{pt-BR}^^J% + }^^J% + \marg{abnt}\marg{ABNT}\marg{Brazilian National Standards Organization}^^J% +\codepar +\gls{newabbreviation}^^J% + \oarg{\gloskeyval{user1}{Deutsches Institut f\"ur Normung e.V.},^^J% + \gloskeyval{user2}{de-DE-1996}}^^J% + \marg{din}\marg{DIN}\marg{German Institute for Standardization}^^J% +\codepar +\gls{newabbreviation}\marg{tug}\marg{TUG}\marg{\cmd{TeX}\cmd{ }User Group}^^J% +\codepar +\cmd{renewcommand}*\marg{\gls{glsxtruserparen}}[2]\marg{\%^^J% + \gls{glsxtrfullsep}\marg{\#2}\%^^J% + \gls{glsxtrparen}^^J% + \marg{\#1\%^^J% + \gls{ifglshasfield}\marg{\gls{glsxtruserfield}}\marg{\#2}\%^^J% + \marg{, \cmd{emph}\marg{\gls{GlsXtrForeignText}\marg{\#2}\marg{\gls{glscurrentfieldvalue}}}}\%^^J% + \marg{}\%^^J% + }\%^^J% +} +} +{ +\gls{gls}\marg{abnt}, \gls{gls}\marg{din}, \gls{gls}\marg{tug}.^^J% +\gls{printunsrtglossaries} +} +\end{resultbox} + +\subsection{Associated Entry Format} +\label{sec:glsxtrfmt} + +An entry may have a particular formatting style associated with it +(rather than a more general category-wide format). This needs to be +provided by a text-block command that takes a single argument. The +name (without the leading backslash) should be stored in the field +identified by: +\cmddef{GlsXtrFmtField} +This command should expand to the \idx{internalfieldlabel} used to +store the formatting command's control sequence name. The default +value is \code{useri} (which corresponds to the \gloskey{user1} key). + +\cmddef{glsxtrfmt} +This command behaves like: +\begin{compactcodebox} +\gls{glslink}\oargm{options}\margm{entry-label}\marg{\meta{fmt-link-text}} +\end{compactcodebox} +where the \idx{linktext} \meta{fmt-link-text} is formatted according to: +\cmddef{glsxtrfmtdisplay} +The default definition simply does \code{\cmd{\meta{csname}}\margm{text}\meta{insert}} +where the control sequence name \meta{csname} is obtained from the +field given by \gls{GlsXtrFmtField}. If the field hasn't been set, +\gls{@firstofone} is used (which simply does its argument). +The unstarred version assumes an empty \meta{insert}. +The default \gls{glslink} options are given by \gls{GlsXtrFmtDefaultOptions}. + +\begin{information} +The \idx{postlinkhook} is suppressed with \gls{glsxtrfmt}. +\end{information} + +If you don't want the complexity of \gls{glslink}, a partially +expandable command is provided that may be used in section headings: +\cmddef{glsxtrentryfmt} +If \sty{hyperref} has been loaded, this will expand to: +\cmddef{glsxtrpdfentryfmt} +within the PDF bookmarks, which just does \meta{text}. Otherwise +\gls{glsxtrentryfmt} will format \meta{text} according to the +control sequence name identified in the field given by \gls{GlsXtrFmtField} (or +\code{@firstofone}, if not set). +For example: +\begin{codebox} +\cmd{documentclass}\marg{article} +\cmd{usepackage}[T1]\marg{fontenc} +\cmd{usepackage}\marg{amsmath} +\cmd{usepackage}[colorlinks]\marg{hyperref} +\cmd{usepackage}[\opt{postdot},\optval{style}{\glostyle{index}}]\marg{glossaries-extra} +\gls{makeglossaries} +\cmd{newcommand}*\marg{\cmd{mtx}}[1]\marg{\cmd{boldsymbol}\marg{\#1}} +\cmd{newcommand}*\marg{\cmd{mtxinv}}[1]\marg{\cmd{mtx}\marg{\#1}\cmd{sp}\marg{-1}} +\codepar +\gls{newglossaryentry}\marg{matrix}\marg{\% + \gloskeyval{name}{matrix}, + \gloskeyval{symbol}{\cmd{ensuremath}\marg{\cmd{mtx}\marg{M}}}, + \gloskeyval{plural}{matrices}, + \gloskeyval{user1}{mtx},\comment{corresponds to \cmd{mtx}} + \gloskeyval{description}{rectangular array of values} +} +\codepar +\gls{newglossaryentry}\marg{identitymatrix}\marg{\% + \gloskeyval{name}{identity matrix}, + \gloskeyval{symbol}{\cmd{ensuremath}\marg{\cmd{mtx}\marg{I}}}, + \gloskeyval{plural}{identity matrices}, + \gloskeyval{description}{a diagonal matrix with all diagonal + elements equal to 1 and all other elements equal to 0} +} +\codepar +\gls{newglossaryentry}\marg{matrixinv}\marg{\% + \gloskeyval{name}{matrix inverse}, + \gloskeyval{symbol}{\cmd{ensuremath}\marg{\cmd{mtxinv}\marg{M}}}, + \gloskeyval{user1}{mtxinv},\comment{corresponds to \cmd{mtxinv}} + \gloskeyval{description}{a square \gls{gls}\marg{matrix} such that + \$\cmd{mtx}\marg{M}\cmd{mtxinv}\marg{M}=\gls{glssymbol}\marg{identitymatrix}\$} +} +\cbeg{document} +A \gls{gls}\marg{matrix} is denoted \gls{glssymbol}\marg{matrix}. +The inverse is denoted \gls{glssymbol}\marg{matrixinv}. +\cmd{[} + \gls{glsxtrfmt}\marg{matrix}\marg{A} \gls{glsxtrfmt}\marg{matrixinv}\marg{A} + = \gls{glssymbol}\marg{identitymatrix} +\cmd{]} +Compare \$\gls{glsxtrfmt}\marg{matrix}\marg{A}[\_0]\$ +with \$\gls{glsxtrfmt*}\marg{matrix}\marg{A}[\_0]\$. +\cmd{printglossaries} +\cend{document} +\end{codebox} +This produces: +\begin{resultbox} +\createexample*[title={Storing a formatting command in a field}, + label={ex:glsxtrfmt}, +description={Example document that uses a field to store the +formatting command associated with the glossary entry}, +arara={pdflatex,makeglossaries,pdflatex,pdfcrop}] +{% +\cmd{usepackage}[T1]\marg{fontenc}^^J% +\cmd{usepackage}\marg{amsmath}^^J% +\cmd{usepackage}[colorlinks]\marg{hyperref}^^J% +\cmd{usepackage}[postdot,style=index]\marg{glossaries-extra}^^J% +\codepar +\gls{makeglossaries}^^J% +\codepar +\cmd{newcommand}*\marg{\cmd{mtx}}[1]\marg{\cmd{boldsymbol}\marg{\#1}}^^J% +\cmd{newcommand}*\marg{\cmd{mtxinv}}[1]\marg{\cmd{mtx}\marg{\#1}\cmd{sp}\marg{-1}}^^J% +\codepar +\gls{newglossaryentry}\marg{matrix}\marg{\%^^J% + \gloskeyval{name}{matrix},^^J% + \gloskeyval{symbol}{\cmd{ensuremath}\marg{\cmd{mtx}\marg{M}}},^^J% + \gloskeyval{plural}{matrices},^^J% + \gloskeyval{user1}{mtx},^^J% + \gloskeyval{description}{rectangular array of values}^^J% +}^^J% +\codepar +\gls{newglossaryentry}\marg{identitymatrix}\marg{\%^^J% + \gloskeyval{name}{identity matrix},^^J% + \gloskeyval{symbol}{\cmd{ensuremath}\marg{\cmd{mtx}\marg{I}}},^^J% + \gloskeyval{plural}{identity matrices},^^J% + \gloskeyval{description}{a diagonal matrix with all diagonal +elements equal to^^J% + 1 and all other elements equal to 0}^^J% +} +\codepar +\gls{newglossaryentry}\marg{matrixinv}\marg{\%^^J% + \gloskeyval{name}{matrix inverse},^^J% + \gloskeyval{symbol}{\cmd{ensuremath}\marg{\cmd{mtxinv}\marg{M}}},^^J% + \gloskeyval{user1}{mtxinv},^^J% + \gloskeyval{description}{a square \gls{gls}\marg{matrix} such +that^^J% + \string$\cmd{mtx}\marg{M}\cmd{mtxinv}\marg{M}=\gls{glssymbol}\marg{identitymatrix}\string$}^^J% +}^^J% +} +{% +A \gls{gls}\marg{matrix} is denoted \gls{glssymbol}\marg{matrix}.^^J% +The inverse is denoted \gls{glssymbol}\marg{matrixinv}.^^J% +\cmd{[}^^J% + \gls{glsxtrfmt}\marg{matrix}\marg{A}^^J% + \gls{glsxtrfmt}\marg{matrixinv}\marg{A}^^J% + =^^J% + \gls{glssymbol}\marg{identitymatrix}^^J% +\cmd{]}^^J% +Compare \string$\gls{glsxtrfmt}\marg{matrix}\marg{A}[\string_0]\string$^^J% +with \string$\gls{glsxtrfmt*}\marg{matrix}\marg{A}[\string_0]\string$. +\cmd{printglossaries} +} +\end{resultbox} +Note the difference between using \gls{glsxtrfmt*} vs \gls{glsxtrfmt}. -(New to version 1.42.) -The command \ics{glossentrysymbol} is modified to take into account -the \catattr{glosssymbolfont} attribute. Note that, unlike the above, there's -no corresponding attribute to change the case as it's usually not -appropriate to change the case of a symbol (and for some symbols, -such as pictographs, there's no concept of case). If -\ics{texorpdfstring} has been defined \ics{glossentrysymbol} will -be defined to do: -\begin{alltt} -\ics{texorpdfstring}\marg{\TeX\ code}\marg{PDF} -\end{alltt} -The \meta{\TeX\ code} part is robust and deals with the actual -typesetting of the symbol. The \meta{PDF} part is simply: -\begin{definition}[\DescribeMacro\glsentrypdfsymbol] -\cs{glsentrypdfsymbol}\marg{label} -\end{definition} -which is defined to just do \cs{glsentrysymbol}\marg{label}. The -chances are that the code in the \gloskey{symbol} key won't be valid -in the PDF bookmarks, so you can redefine \cs{glsentrypdfsymbol} to -use a more appropriate field. (If you do redefine this command, -remember that it needs to fully expand.) +There are also \idx{sentencecase} versions of the above commands: +\cmddef{Glsxtrfmt} +This is simply a shortcut for: +\begin{compactcodebox} +\gls{glsxtrfmt}\oargm{options}\margm{entry-label}\marg{\gls{glssentencecase}\margm{text}} +\end{compactcodebox} +Similarly for the starred form: +\cmddef{Glsxtrfmt*} +which is a shortcut for: +\begin{compactcodebox} +\gls{glsxtrfmt*}\oargm{options}\margm{entry-label}\marg{\gls{glssentencecase}\margm{text}}\oargm{insert} +\end{compactcodebox} + +\cmddef{Glsxtrentryfmt} +This is a shortcut for +\begin{compactcodebox} +\gls{glsxtrentryfmt}\margm{entry-label}\marg{\gls{glssentencecase}\margm{text}} +\end{compactcodebox} +but uses: +\cmddef{Glsxtrpdfentryfmt} +for the PDF bookmarks. This uses \gls{MFUsentencecase} to perform +the case-change, which is expandable. + +If you are writing \gls{glsxtrfmt} or \gls{glsxtrentryfmt} +explicitly in the document text, you can, of course, enter the +appropriate case in \meta{text} directly. The purpose of providing +the \idx{sentencecase} commands is to enable a mapping to be setup +with \gls{MFUaddmap} in the event that \gls{glsxtrfmt} or +\gls{glsxtrentryfmt} occur at the start of content, such as another +entry's description, that will have \idx{sentencecase} +automatically applied. This will require \sty{mfirstuc} v2.08+ to +support the mapping. See the \sty{mfirstuc} manual for further details. + + +\section{Comma-Separated Lists} +\label{sec:csvfields} + +These commands are for field values that are comma-separated +lists (for example, the field has been constructed with +\gls{glsxtrapptocsvfield}) or for testing if field values are +contained within comma-separated lists. + +\begin{information} +If you are using \app{bib2gls}, you can sort field values that +contain a comma-separated list of labels (such as the \gloskey{see} +or \gloskey{seealso} field) with the \resourceopt{sort-label-list} +option (provided \app{bib2gls} can access those fields). See the +\app{bib2gls} manual for further details. +\end{information} + +\cmddef{glsseelist} +This is provided by the base \sty{glossaries} package to format the +entry labels in \gloskey{see} cross-reference list. (It's used +internally by \gls{glsseeformat}, which adds the \emph{see} prefix.) It may also be +used for any comma-separated list of entry labels. Note that the +argument isn't expanded. If expansion is required, use: +\cmddef{glsxtrseelist} +This fully expands its argument and passes the result to +\gls{glsseelist}. +With just the base \sty{glossaries} package, each item is encapsulated with +\gls{glsseeitem}. +The \sty{glossaries-extra} package redefines \gls{glsseelist} to make it more +flexible and provides additional commands to further customize the +formatting. + +\cmddef{glsxtrtaggedlist} +This is a similar command that has an initial tag inserted before +the start of the list. If the list only contains one element, the +\meta{singular tag} is used. If the list contains more than one +element, the \meta{plural tag} is used. The separator between the +tag and the list is given by: +\cmddef{glsxtrtaggedlistsep} +The separators between the elements of the list and the formatting +of each list element is as for \gls{glsseelist} (see below). If the list is +empty, nothing is displayed. The \meta{label prefix} is inserted +before the current item in the list to form the entry label. + +\begin{warning} +Spaces in \meta{csv-list} are significant. Avoid unwanted leading or +trailing spaces and empty labels. +\end{warning} + +\cmddef{glsseeitemformat} +The base \sty{glossaries} package just uses \gls{glsentryname} or +\gls{glsentrytext} in this command. The \sty{glossaries-extra} package +redefines this so that it does: +\begin{codebox} +\gls{ifglshasshort}\margm{entry-label}\marg{\gls{glsfmttext}\margm{entry-label}} +\marg{\gls{glsfmtname}\margm{entry-label}} +\end{codebox} +Note that the use of \gls{glsfmttext} rather than \gls{glsentrytext} +allows the abbreviation style to be used. + +With \sty{glossaries-extra}, the first item in \gls{glsseelist} will be encapsulated +with: +\cmddef{glsseefirstitem} +The default definition is simply \code{\gls{glsseeitem}\margm{entry-label}} but +can be redefined, for example to convert the first character to +\idx{uppercase} if \idx{sentencecase} is required. + +\begin{information} +If the label corresponds to a multi-entry, \gls{mglsseefirstitem} +will be used instead (see \sectionref{sec:msee}). Similarly, +\gls{mglsseeitem} will be used instead of \gls{glsseeitem} for a +multi-entry label. +\end{information} -For example, if you are using \sty{glossaries-accsupp}, you could -use the \gloskey{symbolaccess} field: -\begin{verbatim} -\renewcommand{\glsentrypdfsymbol}[1]{\glsentrysymbolaccess{#1}} -\end{verbatim} -Alternatively, if you are using \gls{bib2gls} you can use the \TeX\ -parser library to interpret a copy of the \gloskey{symbol} field and -use that. For example, with the resource options: -\begin{verbatim} - replicate-fields={symbol=user1}, - interpret-fields={user1} -\end{verbatim} -This stores the interpreted value of the symbol in the -\gloskey{user1} field, so you can then do: -\begin{verbatim} -\renewcommand{\glsentrypdfsymbol}[1]{\glsentryuseri{#1}} -\end{verbatim} -(You may need \XeLaTeX\ or \LuaLaTeX\ with this method.) This allows -\cs{glossentrysymbol} to be used in a section heading with -standalone definitions. +\cmddef{glsseesep} +This is used between each entry in the list, except between the +final pair. -If you want to adapt a style to use another field instead -of \gloskey{name}, you can use -\begin{definition}[\DescribeMacro\glossentrynameother] -\cs{glossentrynameother}\marg{label}\marg{field} -\end{definition} -This behaves just like \cs{glossentryname} (that is, it obeys the -\catattr{glossname} attribute, uses either the \catattr{glossnamefont} -attribute or \cs{glsnamefont} to format the text, and uses the post-name hook) -but it uses the given \meta{field} instead of \gloskey{name}. The -\meta{field} argument must be the internal field name (for example -\texttt{desc} rather than \texttt{description}). See the key to -field mappings table in the \styfmt{glossaries} user manual. - -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. +\cmddef{glsseelastsep} +This is used between the penultimate and final item in the list. +The default definition is: +\begin{codebox} +\cmd{space}\gls{andname}\cmd{space} +\end{codebox} + +With \sty{glossaries-extra}, if there are at least three elements in +the list, the separator between the final two elements will be given by: +\cmddef{glsseelastoxfordsep} +This just defaults to \gls{glsseelastsep} but may be redefined to +include a comma, if preferred. + + +\cmddef{glsxtrforcsvfield} +This iterates over the comma-separated list stored in the given \idx{field} +(identified by its \idxc{internalfieldlabel}{internal label}) +for the entry identified by \meta{entry-label} and performs +\code{\meta{handler cs}\margm{element}} for each element of the +list. This command uses \gls{glsxtrifhasfield} so the complete +list can be obtained with \gls{glscurrentfieldvalue}. Does nothing +if the field hasn't been set or the entry hasn't been defined. The +unstarred version adds implicit grouping. The starred version +doesn't. + +It's possible to prematurely break the loop at the end of the +current iteration with: +\cmddef{glsxtrendfor} +If nested within another command that also uses \gls{@for}, use the +unstarred version to localise the break. This command is simply set +to \gls{@endfortrue}, which is provided by the \sty{xfor} package. + +\cmddef{glsxtrfieldformatcsvlist} +This formats the comma-separated list stored in the given \idx{field} +(identified by its \idxc{internalfieldlabel}{internal label}) +for the entry identified by \meta{entry-label} using \sty{datatool-base}['s] +\gls{DTLformatlist}. +This command uses \gls{glsxtrifhasfield} so the complete +list can be obtained with \gls{glscurrentfieldvalue}. +This adds implicit grouping. There is no starred version. + +The following demonstrates the difference between \gls{glsseelist} +(which specifically requires a list of labels) and \gls{glsxtrfieldformatcsvlist} +(which formats an arbitrary list): +\begin{codebox} +\cmd{usepackage}\oarg{colorlinks}\marg{hyperref} +\cmd{usepackage}\oarg{\optval{autoseeindex}{false}}\marg{glossaries-extra} +\gls{newglossaryentry}\marg{example}\marg{\gloskeyval{name}{example},\gloskeyval{description}{}, + \gloskeyval{see}{another1,another2}} +\gls{newglossaryentry}\marg{another1}\marg{\gloskeyval{name}{another one},\gloskeyval{description}{}} +\gls{newglossaryentry}\marg{another2}\marg{\gloskeyval{name}{another two},\gloskeyval{description}{}} +\cbeg{document} +\gls{glsxtrapptocsvfield}\marg{example}\marg{animals}\marg{duck} +\gls{glsxtrapptocsvfield}\marg{example}\marg{animals}\marg{albatross} +\gls{glsxtrapptocsvfield}\marg{example}\marg{animals}\marg{arara} +Animal list: \gls{glsxtrfieldformatcsvlist}\marg{example}\marg{animals} +\codepar +See list: \gls{glsxtrifhasfield}\marg{see}\marg{example} + \marg{\gls{glsxtrseelist}\marg{\gls{glscurrentfieldvalue}}}\marg{not set}. +\codepar +\gls{printunsrtglossaries} +\cend{document} +\end{codebox} +There's no \idx{indexing} in this document so I've used +\optval{autoseeindex}{false} to avoid an error. This means there's no cross-reference +list in the glossary but, as demonstrated, the \qt{see} list can be +reproduced in the document. The result is: +\begin{resultbox} +\createexample*[title={Formatting lists contained in field values}, + label={ex:fieldformatcsv}, +description={Example document that uses two different methods of +sorting fields that contain a comma-separated list}] +{% +\cmd{usepackage}\oarg{colorlinks}\marg{hyperref}^^J% +\cmd{usepackage}\oarg{autoseeindex=false}\marg{glossaries-extra}^^J% +\gls{newglossaryentry}\marg{example}\marg{name=example,description={},^^J% + see={another1,another2}}^^J% +\gls{newglossaryentry}\marg{another1}\marg{name={another one},description={}}^^J% +\gls{newglossaryentry}\marg{another2}\marg{name={another two},description={}}^^J% +} +{% +\gls{glsxtrapptocsvfield}\marg{example}\marg{animals}\marg{duck}^^J% +\gls{glsxtrapptocsvfield}\marg{example}\marg{animals}\marg{albatross}^^J% +\gls{glsxtrapptocsvfield}\marg{example}\marg{animals}\marg{arara}^^J% +Animal list: \gls{glsxtrfieldformatcsvlist}\marg{example}\marg{animals}.^^J% +\codepar +See list: \gls{glsxtrifhasfield}\marg{see}\marg{example}\marg{\gls{glsxtrseelist}\marg{\gls{glscurrentfieldvalue}}}\marg{not set}.^^J% +\codepar +\gls{printunsrtglossaries} +} +\end{resultbox} +This first constructs a comma-separated list in a custom \idx{internalfield} +with the label \code{animals}. There's no associated key that can be +used in \gls{newglossaryentry}. In this case, the \idx{field} could simply +be set in one command. For example: +\begin{codebox} +\gls{glsxtrdeffield}\marg{example}\marg{animals}\marg{duck,albatross,arara} +\end{codebox} +The main reason for providing \gls{glsxtrapptocsvfield} is for the +benefit of \app{bib2gls}, as it sometimes has to construct a field +value list while it's writing the \ext{glstex} file, but there may +be other uses in complex documents that construct field values +through some custom function. + +\cmddef{GlsXtrIfValueInFieldCsvList} +This does \meta{true} if the comma-separated list stored in the given \idx{field} +(identified by its \idxc{internalfieldlabel}{internal label}) +contains the given \meta{value} (using \gls{DTLifinlist} +provided by \sty{datatool-base}) or \meta{false} if the value isn't in the +list or if the field hasn't been set or the entry hasn't been +defined. The unstarred version adds implicit grouping. The starred +version doesn't. + +This command internally uses \gls{glsxtrifhasfield}, so take care if +it's nested. Within \meta{false}, you can test if \gls{glscurrentfieldvalue} +is empty or undefined. If it's defined but not empty, then the field +has been set but doesn't contain \meta{value}. + +\cmddef{GlsXtrIfFieldValueInCsvList} +This command is essentially the other way around to the above. +In this case, the comma-separated list is provided in the argument +\meta{csv-list} and the search value is the field's value. +This does \meta{true} if the value is found in \meta{csv-list} or +\meta{false} if the value isn't in \meta{csv-list} or the field +isn't set or the entry hasn't been defined. The unstarred version +adds implicit grouping. The starred version doesn't. +Again, this command internally uses \gls{glsxtrifhasfield}, so you +can test \gls{glscurrentfieldvalue} in \meta{false} to determine +whether or not the field has been set. + +\cmddef{xGlsXtrIfValueInFieldCsvList} +As \gls{GlsXtrIfValueInFieldCsvList} but fully expands \meta{value} +first. -\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} -For convenience, as from v1.31, you can use -\begin{definition}[\DescribeMacro\glsdefpostname] -\cs{glsdefpostname}\marg{category}\marg{definition} -\end{definition} -This is simply a shortcut for: -\begin{alltt} -\cs{csdef}\{glsxtrpostname\meta{category}\}\marg{definition} -\end{alltt} -Note that it doesn't check if the command has already been defined. +\section{List Fields} +\label{sec:listfields} -As from version 1.25, the post-name hook also does -\begin{definition}[\DescribeMacro\glsextrapostnamehook] -\cs{glsextrapostnamehook}\marg{label} -\end{definition} -(before \cs{glsxtrpostname}\meta{category}) -to allow for additional non-category related code. This does nothing -by default. +Comma-separated list fields are covered in +\sectionref{sec:csvfields}. The commands in this section are for +fields that store \sty{etoolbox} internal lists. Elements can be +appended to these fields using commands \gls{glsxtrfieldlistadd}, +described in \sectionref{sec:setfields}. The commands listed below +provide an easy interface to iterate over the field values. See the +\sty{etoolbox} documentation for further details about internal +lists. -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}. -For convenience, as from v1.31, you can use -\begin{definition}[\DescribeMacro\glsdefpostdesc] -\cs{glsdefpostdesc}\marg{category}\marg{definition} -\end{definition} -This is simply a shortcut for: -\begin{alltt} -\cs{csdef}\{glsxtrpostdesc\meta{category}\}\marg{definition} -\end{alltt} -Note that it doesn't check if the command has already been defined. +\cmddef{glsxtrfieldformatlist} +Formats the list using the same separators +as used by \sty{datatool}['s] \gls{DTLformatlist}. +This internally uses \sty{etoolbox}['s] \gls{forlistcsloop} with the +same handler macro as used with \gls{DTLformatlist}. + +\cmddef{glsxtrfielddolistloop} +This uses \sty{etoolbox}['s] \gls{dolistcsloop}, which uses the +command \csfmt{do} as the handler. + +\cmddef{glsxtrfieldforlistloop} +This uses \sty{etoolbox}['s] \gls{forlistcsloop}, which uses the +\meta{handler-cs} as the handler. + +\cmddef{glsxtrfieldifinlist} +This uses \sty{etoolbox}['s] \gls{ifinlistcs} to test if \meta{item} +is in the list. + +\cmddef{glsxtrfieldxifinlist} +This uses \sty{etoolbox}['s] \gls{xifinlistcs} to test if \meta{item} +is in the list. + +\section{Field Conditionals} +\label{sec:fieldconditionals} + +\cmddef{GlsXtrIfFieldUndef} +Tests if the given \idx{field} (identified by its +\idxc{internalfieldlabel}{internal label}) is undefined for the +entry given by \meta{entry-label}. Does \meta{true} if the entry +doesn't exists or if entry exists but the field hasn't been set. +Does \meta{false} if the field has been set, even if it has been set +to empty. Unlike \gls{glsxtrifhasfield} there is no grouping or +starred version and no assignment of \gls{glscurrentfieldvalue}. +This is simply a shortcut that internally uses +\sty{etoolbox}['s] \gls{ifcsundef}. The base \sty{glossaries} +package provides a similar command \gls{ifglsfieldvoid}, which +uses \sty{etoolbox}['s] \gls{ifcsvoid} instead. + +\cmddef{glsxtrifhasfield} +This tests if the entry given by \meta{entry-label} has the +\idx{field} identified by its \idxc{internalfieldlabel}{internal label} +\meta{field-label} set. This is like \gls{ifglshasfield} but +doesn't produce a warning if the entry or field doesn't exist. + +This command first assigns \gls{glscurrentfieldvalue} to the field +value. If this is defined and not empty, \meta{true} is done otherwise +\meta{false} is done. You can test \gls{glscurrentfieldvalue} within +\meta{false} to find out whether it's undefined or empty using +\sty{etoolbox}'s commands, such as \gls{ifundef} or +\gls{ifdefempty}. + +The unstarred version adds implicit grouping to make nesting easier. +The starred version doesn't (to make assignments easier). + +\begin{information} +If you are simply displaying the value of the field (for example, in +the \idx{postdeschook}) then use the unstarred version. If you are +making an assignment based on the value of the field, then use the +starred version. +\end{information} + +\cmddef{GlsXtrIfFieldCmpNum} +This command should only be used with fields that contain integer +values. It internally uses \gls{glsxtrifhasfield} (the starred or +unstarred version, to match the starred or unstarred version of +\gls{GlsXtrIfFieldEqStr}) and tests if \gls{glscurrentfieldvalue} +is equal to (\meta{op} is \code{=}), less than (\meta{op} is \code{<}) +or greater than (\meta{op} is \code{>}) the given number +\meta{number}. If the field is empty or undefined, \gls{glscurrentfieldvalue} +will be set to \code{0}. Remember that the unstarred version adds +implicit grouping. + +\cmddef{GlsXtrIfFieldEqNum} +This is a shortcut that uses \gls{GlsXtrIfFieldCmpNum} with +\meta{op} set to \code{=}. The unstarred version adds implicit +grouping. + +\cmddef{GlsXtrIfFieldNonZero} +This is a shortcut that uses \gls{GlsXtrIfFieldCmpNum} with +\meta{op} set to \code{=} and the final two arguments swapped. +(So it's true if the field value is not zero.) +The unstarred version adds implicit grouping. + +\cmddef{GlsXtrIfFieldEqStr} +This internally uses \gls{glsxtrifhasfield} (the starred or +unstarred version, to match the starred or unstarred version of +\gls{GlsXtrIfFieldEqStr}) and tests if \gls{glscurrentfieldvalue} +is equal to \meta{value}. Remember that the unstarred version adds +implicit grouping. + +\cmddef{GlsXtrIfFieldEqXpStr} +This is like \gls{GlsXtrIfFieldEqStr} but expands the string before +the comparison. This also has an starred version that doesn't add +implicit grouping. + +\cmddef{GlsXtrIfXpFieldEqXpStr} +This is like \gls{GlsXtrIfFieldEqStr} but expands both the field +value and the string before the comparison. This also has an starred +version that doesn't add implicit grouping. -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. +\chapter{Counting References} +\label{sec:countref} -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.) +There are three basic ways of counting entry references: +\begin{enumerate} +\item Counting the total number of times \gls{glsunset} is used +(\gls{glsreset} resets the count unless \gls{glsresetcurrcountfalse} +and is best avoided). This is provided by the base \sty{glossaries} +package and is intended for documents where the term should be +displayed differently if it's only been used a certain number of +times. The information has to be written to the \ext{aux} file so +that it's available on the next \LaTeX\ run. + +This method is extended by \sty{glossaries-extra} and is +described in \sectionref{sec:entrycount}. This method relies on the +document only using the \idx{glslike} commands and is +inappropriate with \app{bib2gls}. -\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} +\item Counting the total number of records. This method is +only available with \app{bib2gls} and is intended +for documents where the term should be displayed differently +if it's only been \recorded\ (\indexed) a certain number of times. +This is a more efficient method than entry counting. +See \sectionref{sec:recordcount} for further details. -\subsection{Number List} -\label{sec:glosstylenumlist} +\item Counting the number of times the \idx{glslike} or +\idx{glstextlike} commands are used. Unlike the other two methods, +this just provides a running total rather than the total from the +previous \LaTeX\ run. This method is intended to make it more +convenient to work with hooks like \gls{glslinkcheckfirsthyperhook}, +\gls{glslinkpostsetkeys} or \gls{glslinkpresetkeys}. +See \sectionref{sec:linkcount} for further details. +\end{enumerate} + +\section{Entry Counting (First Use Flag)} +\label{sec:entrycount} -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{information} +If you are using \app{bib2gls}, you need to use record +counting instead (see \sectionref{sec:recordcount}). +\end{information} + +Entry counting is provided by the base \sty{glossaries} package and +is enabled with \gls{glsenableentrycount}. +This keeps a count of the number of times an entry is marked as +used, which is done by hooking into the unset and reset commands +(see \sectionref{sec:glsunset}). The current running total can be +obtained with \gls{glsentrycurrcount}. The total from the end of the +previous \LaTeX\ run can be obtained with \gls{glsentryprevcount}. + +Since entry counting relies on the \idx{firstuseflag}, it doesn't +take the \idx{glstextlike} commands into account. + +\begin{warning} +Entry counting is incompatible with \opteqvalref{docdef}{true}. +\end{warning} + +The \sty{glossaries-extra} package modifies +\gls{glsenableentrycount} to allow for the \catattr{entrycount} +attribute. This means that you not only need to enable entry +counting with \gls{glsenableentrycount}, but you also need to set +the \catattr{entrycount} attribute (see below). + +Prior to v1.49, the associated counter was reset back to 0 when the +\idx{firstuseflag} is reset. This behaviour is now only implemented if the +following conditional is true: +\cmddef{ifglsresetcurrcount} +To (locally) change this conditional to true use: +\cmddef{glsresetcurrcounttrue} +To (locally) change this conditional to false use: +\cmddef{glsresetcurrcountfalse} +As from v1.49, the default is now false. Note that this conditional +is also available with \sty{glossaries} v4.50+. \begin{important} -If you want to suppress the \gls{numberlist} always use the -\pkgopt{nonumberlist} option instead of redefining -\cs{glossaryentrynumbers} to do nothing. +Remember that entry counting only counts the number of times an +entry is used by commands that change the \idx{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} -For example, to change the font for the entire -\gls{numberlist} redefine \cs{GlsXtrFormatLocationList} as -appropriate. Don't modify \cs{glossaryentrynumbers}. +With just the base \sty{glossaries} package, the associated entry +counting commands, such as \gls{cgls}, are only available when entry +counting has been activated with \gls{glsenableentrycount}. Whereas +with \sty{glossaries-extra}, those commands are always available but +behave in the same way as the corresponding \idx{glslike} commands +if entry counting hasn't been activated. The commands provided by +the \opt{shortcuts} options, such as \gls{ac} are defined to use +\gls{cgls} instead of \gls{gls} etc so you can use them either with +or without entry counting. + +In order to activate entry counting with \sty{glossaries-extra}, you +not only need to use \gls{glsenableentrycount} but also need to +specify the trigger value. + +\cmddef{GlsXtrEnableEntryCounting} +This command is provided as a shortcut to activate entry counting +and assign the trigger value. This command performs the following: +\begin{itemize} +\item enables entry counting with \gls{glsenableentrycount}; +\item redefines the \idx{glslike} commands to do the equivalent +\gls{cgls} commands (so you don't need to keep track of which +entries have entry counting enabled); +\item sets the \catattr{entrycount} attribute to \meta{trigger-value} +for all the supplied categories; +\item disables the unit counting command (which is incompatible). +\end{itemize} +If you want to have different trigger values for different +categories, you can set the \catattr{entrycount} attribute +afterwards for the other category. For example: +\begin{codebox} +\gls{GlsXtrEnableEntryCounting}\marg{\cat{abbreviation},\cat{acronym}}\marg{1} +\gls{glssetcategoryattribute}\marg{\cat{general}}\marg{2} +\end{codebox} +If you use \gls{GlsXtrEnableEntryCounting} multiple times, the +repeated instances will simply set the \catattr{entrycount} +attribute for the listed categories. So the above can also be written +as: +\begin{codebox} +\gls{GlsXtrEnableEntryCounting}\marg{\cat{abbreviation},\cat{acronym}}\marg{1} +\gls{GlsXtrEnableEntryCounting}\marg{\cat{general}}\marg{2} +\end{codebox} -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. +The commands like \gls{cgls} behave like the corresponding +\idx{glslike} command if the entry count at the end of the previous +run was more than a trigger value. With just the base +\sty{glossaries} package, this trigger value is 1. With +\sty{glossaries-extra} you can specify a different value. \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). +The appropriate trigger value must be set for the required category +or categories. \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}. - -\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. - -\subsection{The \headingsty{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} - -\paragraph{Inline Style} - -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 with the \idx{glslike} commands, the \gls{cgls} set of commands +may also be used with the star (\code{*}) or plus (\code{+}) modifiers or the +modifier given by \gls{GlsXtrSetAltModifier}. + +If the entry count at the end of the previous run doesn't exceed +the trigger value, the corresponding formatting command is used +instead. For example, \gls{cgls} will use \gls{cglsformat}. The +complete set of commands are: +\cmddef{cgls} +If the trigger value has been supplied for the entry's category +and is exceeded, this behaves like \gls{gls} otherwise it uses: +\cmddef{cglsformat} +This is redefined by \sty{glossaries-extra} to test whether or not +the entry has the \catattr{regular} attribute set or is an +abbreviation: +\begin{compactcodebox} +\cmd{renewcommand}*\marg{\gls{cglsformat}}[2]\marg{\% + \gls{glsifregular}\marg{\#1}\marg{\gls{glsentryfirst}\marg{\#1}}\% + \marg{\gls{ifglshaslong}\marg{\#1}\marg{\gls{glsentrylong}\marg{\#1}}\marg{\gls{glsentryfirst}\marg{\#1}}}\#2\% +} +\end{compactcodebox} +This show the first use value if the entry is regular otherwise it +will show the long form. The insert is appended at the end. + +\cmddef{cglspl} +If the trigger value has been supplied for the entry's category +and is exceeded, this behaves like \gls{glspl} otherwise it uses: +\cmddef{cglsplformat} +This is like \gls{cglsformat} but uses the plural commands. + +\cmddef{cGls} +If the trigger value has been supplied for the entry's category +and is exceeded, this behaves like \gls{Gls} otherwise it uses: +\cmddef{cGlsformat} +This is like \gls{cglsformat} but uses the \idx{sentencecase} +commands. -\paragraph{Tabular Styles} +\cmddef{cGlspl} +If the trigger value has been supplied for the entry's category +and is exceeded, this behaves like \gls{Glspl} otherwise it uses: +\cmddef{cGlsplformat} +This is like \gls{cglsformat} but uses the plural \idx{sentencecase} +commands. -The \env{tabular}-like styles, such as \glostyle{long} are -adjusted so that the \ics{ifglsnogroupskip} conditional (set with -\pkgopt{nogroupskip}) is moved outside of the definition of -\cs{glsgroupskip} to avoid problems that cause an \qt{Incomplete -\cs{iftrue}} error with \cs{printunsrtglossary} and -\cs{printnoidxglossary}. This means that if you want to change this -conditional using \cs{setupglossaries} or using the -\gloskey[printglossary]{nogroupskip} option in \cs{printglossary}, -\cs{printnoidxglossary} or \cs{printunsrtglossary}, you must also -reset the glossary style. - -As from version 1.21, the hard-coded \cs{space} before the -\gls{numberlist} in many of the predefined styles is replaced -with -\begin{definition}[\DescribeMacro\glsxtrprelocation] -\cs{glsxtrprelocation} -\end{definition} -This just defaults to \cs{space} but may be redefined as required. -For example: -\begin{verbatim} -\renewcommand{\glsxtrprelocation}{\dotfill} -\end{verbatim} - -\paragraph{List Styles} - -The \glostyle{list} styles use -\begin{definition}[\DescribeMacro\glslistprelocation] -\cs{glslistprelocation} -\end{definition} -(which defaults to \cs{glsxtrprelocation}) for top-level items and -\begin{definition}[\DescribeMacro\glslistchildprelocation] -\cs{glslistchildprelocation} -\end{definition} -(which defaults to \cs{glslistprelocation}) for child items. - -As from v1.31, the description (including the post-description hook) -is governed by: -\begin{definition}[\DescribeMacro\glslistdesc] -\cs{glslistdesc}\marg{label} -\end{definition} -for the \glostyle{list} and \glostyle{altlist} styles (but not the -\glostyle{listdotted} variations). +The \sty{glossaries-extra} package provides some additional +commands: + +\cmddef{cGLS} +If the trigger value has been supplied for the entry's category +and is exceeded, this behaves like \gls{GLS} otherwise it uses: +\cmddef{cGLSformat} +This simply uses \gls{cglsformat} converted to \idx{uppercase}. + +\cmddef{cGLSpl} +If the trigger value has been supplied for the entry's category +and is exceeded, this behaves like \gls{GLSpl} otherwise it uses: +\cmddef{cGLSplformat} +This simply uses \gls{cglsplformat} converted to \idx{uppercase}. + +The test to determine whether or not an entry trips the trigger +value is performed by: +\cmddef{glsxtrifcounttrigger} +This obtains the trigger value from the entry's \catattr{entrycount} +attribute. -As from v1.47, the item is governed by: -\begin{definition}[\DescribeMacro\glslistitem] -\cs{glslistitem}\marg{label} -\end{definition} -The \glostyle{altlist} styles use: -\begin{definition}[\DescribeMacro\glsaltlistitem] -\cs{glsaltlistitem}\marg{label} -\end{definition} -which internally uses \cs{glslistitem}. -The header item (for the list styles that should the group title) is governed by: -\begin{definition}[\DescribeMacro\glslistgroupheaderitem] -\cs{glslistgroupheaderitem}\marg{group-label}\marg{header code} -\end{definition} -This ignores the \meta{group-label} by default and simply places the -second argument in the optional argument of \cs{item}. The -\meta{header code} is the formatted group title, possibly including -a hypertarget. The spacing after the group item is given by: -\begin{definition}[\DescribeMacro\glslistgroupafterheader] -\cs{glslistgroupafterheader} -\end{definition} +\begin{important} +Since these commands require information from the previous \LaTeX\ +run, and extra \LaTeX\ call must be added to the build process +(before the relevant \idx{indexingapp}). +\end{important} -For just the \glostyle{list} style and its letter group variations -(not the \glostyle{altlist} or \glostyle{listdotted} variations) the -\gls{numberlist} for child entries is followed by -\begin{definition}[\DescribeMacro\glslistchildpostlocation] -\cs{glslistchildpostlocation} -\end{definition} -which defaults to a full stop. +For example, in the following document the trigger value is set to +1. The CSS entry is only used once (which doesn't exceed the +trigger). The HTML entry is used twice (which does exceed the +trigger). The sample entry is only used once, but entry counting +hasn't been enabled on its category (the default \cat{general}). + +\begin{codebox} +\cmd{usepackage}\oarg{colorlinks}\marg{hyperref} +\cmd{usepackage}\marg{glossaries-extra} +\gls{makeglossaries} +\gls{GlsXtrEnableEntryCounting}\marg{\cat{abbreviation}}\marg{1} +\gls{newabbreviation}\marg{css}\marg{CSS}\marg{cascading style sheet} +\gls{newabbreviation}\marg{html}\marg{HTML}\marg{hypertext markup language} +\gls{newglossaryentry}\marg{sample}\marg{\gloskeyval{name}{sample},\gloskeyval{description}{an example}} +\cbeg{document} +First use: \gls{gls}\marg{css}, \gls{gls}\marg{html} and \gls{gls}\marg{sample}. +Next use: \gls{gls}\marg{html}. +\gls{printglossaries} +\cend{document} +\end{codebox} +If the document is saved in a file called \filefmt{myDoc.tex} then +the build process is: +\begin{terminal} +pdflatex myDoc +pdflatex myDoc +makeglossaries myDoc +pdflatex myDoc +\end{terminal} +Note the second \LaTeX\ call before \app{makeglossaries}. The result +is shown below: +\begin{resultbox} +\createexample*[arara={pdflatex,pdflatex,makeglossaries,pdflatex,pdfcrop}, + label={ex:catentrycount}, + title={Entry counting according to category}, + description={Example document illustrating entry counting}] +{% +\cmd{usepackage}[colorlinks]\marg{hyperref}^^J% +\cmd{usepackage}\marg{glossaries-extra}^^J% +\gls{makeglossaries}^^J% +\gls{GlsXtrEnableEntryCounting}\marg{abbreviation}\marg{1}^^J% +\gls{newabbreviation}\marg{css}\marg{CSS}\marg{cascading style sheet}^^J% +\gls{newabbreviation}\marg{html}\marg{HTML}\marg{hypertext markup language}^^J% +\gls{newglossaryentry}\marg{sample}\marg{name={sample},description={an example}}^^J% +} +{% +First use: \gls{gls}\marg{css}, \gls{gls}\marg{html} and \gls{gls}\marg{sample}.^^J% +Next use: \gls{gls}\marg{html}.^^J% +\gls{printglossaries} +} +\end{resultbox} +Note that the CSS entry only shows the long form, doesn't appear in +the glossary and doesn't have a hyperlink. This is because the total +count from the previous \LaTeX\ run doesn't exceed the value (1, in +this case) that triggers the normal behaviour of \gls{gls}. The HTML +entry has a total count of 2 from the previous \LaTeX\ run, so it's +displayed as normal with the full form on \idx{firstuse} and has a +hyperlink to its entry in the glossary. + +The sample entry is only used once, but it has the default \cat{general} +category, which doesn't have the \catattr{entrycount} attribute set. + +Note that if the build process only had one \LaTeX\ call before +running \app{makeglossaries}, the HTML entry would also not appear +in the glossary. This is because on the first \LaTeX\ run, the total +from the previous run is 0 (because there's no information in the +\ext{aux} file). + +The \sty{glossaries-extra} package also provides the ability to +count per sectional unit instead: +\cmddef{glsenableentryunitcount} -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. +\begin{important} +It's not possible to enable both document-wide entry counting +(\gls{glsenableentrycount}) and unit entry counting +(\gls{glsenableentryunitcount}). +\end{important} -The separator between groups (if not \pkgopt{nogroupskip}) is now -given by: -\begin{definition}[\DescribeMacro\glslistgroupskip] -\cs{glslistgroupskip} -\end{definition} -This defaults to \cs{indexspace} with penalties to deter page -breaks. -This command isn't used if \pkgopt{nogroupskip} is set. - -The \sty{glossary-tree} package introduced new commands in -v4.22, \ics{glstreegroupheaderfmt} -and \ics{glstreenavigationfmt}, which are used to format -the letter group headings and the navigation elements for the -appropriate styles. These two new commands are defined in terms of -\ics{glstreenamefmt} since that was the command originally used -for the group headings and navigation. This now allows these -different elements to be defined independently, but the most common -redefinition is for \cs{glstreenamefmt} to remove the bold in the -name. If the bold is still required for the group heading and navigation -elements, then both other commands also need redefining. To simplify -matters, if \cs{glstreenamefmt} has been defined, as from v1.31 -\sty{glossaries-extra-stylemods} defines: -\begin{definition}[\DescribeMacro\glstreedefaultnamefmt] -\cs{glstreedefaultnamefmt}\marg{text} -\end{definition} -which simply does \cs{textbf}\marg{text} and redefines -\cs{glstreenamefmt}, \cs{glstreegroupheaderfmt} and -\cs{glstreenavigationfmt} all in terms of -\cs{glstreedefaultnamefmt}. - -This means that if you want to change -all three to use a particular style you only need to redefine -\cs{glstreedefaultnamefmt}, but if you only want to redefine -\cs{glstreenamefmt} without affecting the other two commands, then -you now can. +The unit entry counting provides separate totals for each section unit. As above, this +uses the \catattr{entrycount} attribute to provide the trigger value +but also requires the \catattr{unitcount} attribute, which should be +set to the name of the appropriate counter, such as \ctr{section} or +\ctr{chapter}. -The separator between groups without headers is given by: -\begin{definition}[\DescribeMacro\glstreegroupskip] -\cs{glstreegroupskip} -\end{definition} -This defaults to just \ics{indexspace} without penalties. This -command isn't used if \pkgopt{nogroupskip} is set. (The penalties -introduced in v1.41 were moved to \cs{glstreeheadergroupskip} in -v1.42 as they are inappropriate when there's no header.) +\begin{warning} +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{warning} -The separator between groups with headers is now given by (as from v1.42): -\begin{definition}[\DescribeMacro\glstreeheadergroupskip] -\cs{glstreegroupheaderskip} -\end{definition} -This defaults to \cs{glstreegroupskip} with penalties to deter page -breaks after the group heading. +As before, there is a command provided to enable the feature and set +the corresponding attributes at the same time: +\cmddef{GlsXtrEnableEntryUnitCounting} +This command performs the following: +\begin{itemize} +\item enables unit entry counting with \gls{glsenableentryunitcount}; +\item redefines the \idx{glslike} commands to do the equivalent +\gls{cgls} commands (so you don't need to keep track of which +entries have entry counting enabled); +\item sets the \catattr{entrycount} attribute to the supplied +trigger for all the supplied categories; +\item sets the \catattr{unitcount} attribute to the supplied +counter for all the supplied categories; +\item disables the document-wide counting command (which is incompatible). +\end{itemize} +If you use \gls{GlsXtrEnableEntryUnitCounting} multiple times, the +repeated instances will simply set the \catattr{entrycount} +and \catattr{unitcount} attributes for the listed categories. -The styles that display the group titles now use: -\begin{definition}[\DescribeMacro\glstreePreHeader] -\cs{glstreePreHeader}\marg{label}\marg{title} -\end{definition} -where \meta{label} is the group label and \meta{title} is the group -title. This does nothing by default -and is inserted before the group title. You can redefine it to add -the group title to the PDF bookmarks. For example, if the -glossary title uses \cs{chapter} then: -\begin{verbatim} -\renewcommand{\glstreePreHeader}[2]{% - \pdfbookmark[1]{#2}{\currentglossary.#1}% -} -\end{verbatim} -will insert section-level bookmarks. The use of \cs{currentglossary} -helps to provide unique bookmark labels in the event of multiple -glossaries. +The counter value is used as part of a label, which means +that \thecountername\ needs to be expandable. +Since \sty{hyperref} also has a similar requirement and provides +\theHcountername\ as an expandable alternative, +\sty{glossaries-extra} will use \theHcountername\ +if it exists otherwise it will use \thecountername. -The \sty{glossary-tree} package provides the commands -\begin{definition}[\DescribeMacro\glstreepredesc] -\cs{glstreepredesc} -\end{definition} -and -\begin{definition}[\DescribeMacro\glstreechildpredesc] -\cs{glstreechildpredesc} -\end{definition} -(which both default to a space) and uses them in the \glostyle{tree}-like -styles, but not for the \glostyle{alttree} style. The -\sty{glossaries-extra-stylemods} package modifies the -\glostyle{alttree} style so that it has equivalent hooks: -\begin{definition}[\DescribeMacro\glsalttreepredesc] -\cs{glsalttreepredesc} -\end{definition} -and -\begin{definition}[\DescribeMacro\glsalttreechildpredesc] -\cs{glsalttreechildpredesc} -\end{definition} -These do nothing by default. +The commands for accessing the totals, \gls{glsentrycurrcount} and +\gls{glsentryprevcount} have different definitions with unit entry +counting and will expand to the total for the current unit. +The overall totals can be obtained with additional commands: +\cmddef{glsentryprevtotalcount} +This expands to the overall total from the previous \LaTeX\ run. -The \glostyle{index}-like and \glostyle{tree}-like styles -insert the pre-\gls{numberlist} space with -\begin{definition}[\DescribeMacro\glstreeprelocation] -\cs{glstreeprelocation} -\end{definition} -(which defaults to \cs{glsxtrprelocation}) for top-level items and -\begin{definition}[\DescribeMacro\glstreechildprelocation] -\cs{glstreechildprelocation} -\end{definition} -(which defaults to \cs{glstreeprelocation}) for child items. - -As from version 1.31, the \styfmt{glossaries-extra-stylemods} -package also provides: -\begin{definition}[\DescribeMacro\glstreenonamedesc] -\cs{glstreenonamedesc}\marg{label} -\end{definition} -which is used by the \glostyle{treenoname} styles to display the -pre-description separator, the description and the post-description -hook. Similarly for the symbol: -\begin{definition}[\DescribeMacro\glstreenonamesymbol] -\cs{glstreenonamesymbol}\marg{label} -\end{definition} -The above are just used for top-level entries. Child entries don't -have the name or symbol displayed for the \glostyle{treenoname} -styles, so there's only a command for the child description: -\begin{definition}[\DescribeMacro\glstreenonamechilddesc] -\cs{glstreenonamechilddesc}\marg{label} -\end{definition} +\cmddef{glsentryprevmaxcount} +This expands to the maximum per-unit total from the previous \LaTeX\ run. -For the \glostyle{tree} styles (but not the \glostyle{treenoname} or -\glostyle{alttree} styles), the description is displayed using: -\begin{definition}[\DescribeMacro\glstreedesc] -\cs{glstreedesc}\marg{label} -\end{definition} -and the symbol with: -\begin{definition}[\DescribeMacro\glstreesymbol] -\cs{glstreesymbol}\marg{label} -\end{definition} -Again the above two commands are just for top-level entries. The -child entries use: -\begin{definition}[\DescribeMacro\glstreechilddesc] -\cs{glstreechilddesc}\marg{label} -\end{definition} -for the description and -\begin{definition}[\DescribeMacro\glstreechildsymbol] -\cs{glstreechildsymbol}\marg{label} -\end{definition} -for the symbol. -As from version 1.41, there are now wrapper commands for -\cs{glstreedesc} and \cs{glstreechilddesc} that check for -the description and symbol to determine what separator to use -before the page list. These are: -\begin{definition}[\DescribeMacro\glstreeDescLoc] -\cs{glstreeDescLoc}\marg{label}\marg{location} -\end{definition} -for top-level entries and -\begin{definition}[\DescribeMacro\glstreeChildDescLoc] -\cs{glstreeChildDescLoc}\marg{label}\marg{location} -\end{definition} -for sub-entries. - -If either the symbol or description is present these will use -\cs{glstreeprelocation} or \cs{glstreechildprelocation}, -respectively. Otherwise, both will use (from v1.42): -\begin{definition}[\DescribeMacro\glstreeNoDescSymbolPreLocation] -\cs{glstreeNoDescSymbolPreLocation} -\end{definition} -The default is a space. This means that you could have, say, a -comma followed by a space for terms that are simply an alias, but -just have a space for terms that have a description that ends with a -full stop (or that just have a symbol without a description) where -the comma would be inappropriate. +For example: +\begin{codebox} +\cmd{documentclass}\marg{article} +\cmd{usepackage}[colorlinks]\marg{hyperref} +\cmd{usepackage}\marg{glossaries-extra} +\codepar +\gls{GlsXtrEnableEntryUnitCounting}\marg{\cat{abbreviation}}\marg{2}\marg{section} +\codepar +\gls{makeglossaries} +\comment{\gloskeyval{category}{abbreviation}:} +\gls{newabbreviation}\marg{html}\marg{HTML}\marg{hypertext markup language} +\gls{newabbreviation}\marg{css}\marg{CSS}\marg{cascading style sheet} +\codepar +\comment{\gloskeyval{category}{general}:} +\gls{newglossaryentry}\marg{sample}\marg{\gloskeyval{name}{sample},\gloskeyval{description}{sample}} +\codepar +\cbeg{document} +\cmd{section}\marg{Sample} +\codepar +Used once: \gls{gls}\marg{html}. +\codepar +Used three times: \gls{gls}\marg{css} and \gls{gls}\marg{css} and \gls{gls}\marg{css}. +\codepar +Used once: \gls{gls}\marg{sample}. +\codepar +\cmd{section}\marg{Another Sample} +\codepar +Used once: \gls{gls}\marg{css}. +\codepar +Used twice: \gls{gls}\marg{html} and \gls{gls}\marg{html}. +\codepar +\gls{printglossaries} +\cend{document} +\end{codebox} +As before, if the document is in a file called \filefmt{myDoc.tex} +then the build process is: +\begin{terminal} +pdflatex myDoc +pdflatex myDoc +makeglossaries myDoc +pdflatex myDoc +\end{terminal} +The result is: +\begin{resultbox} +\createexample*[arara={pdflatex,pdflatex,makeglossaries,pdflatex,pdfcrop}, + label={ex:catunitentrycount}, + title={Entry unit counting (per section) according to category}, + description={Example document illustrating entry unit counting (per section)}] +{% +\cmd{usepackage}[colorlinks]\marg{hyperref}^^J% +\cmd{usepackage}\marg{glossaries-extra}^^J% +\gls{GlsXtrEnableEntryUnitCounting}\marg{abbreviation}\marg{2}\marg{section}^^J% +\gls{makeglossaries}^^J% +\% category=abbreviation:^^J% +\gls{newabbreviation}\marg{html}\marg{HTML}\marg{hypertext markup language}^^J% +\gls{newabbreviation}\marg{css}\marg{CSS}\marg{cascading style sheet}^^J% +\% category=general:^^J% +\gls{newglossaryentry}\marg{sample}\marg{name={sample},description={an example}}^^J% +} +{% +\cmd{section}\marg{Sample} +\codepar +Used once: \gls{gls}\marg{html}. +\codepar +Used three times: \gls{gls}\marg{css} and \gls{gls}\marg{css} and \gls{gls}\marg{css}. +\codepar +Used once: \gls{gls}\marg{sample}. +\codepar +\cmd{section}\marg{Another Sample} +\codepar +Used once: \gls{gls}\marg{css}. +\codepar +Used twice: \gls{gls}\marg{html} and \gls{gls}\marg{html}. +\codepar +\gls{printglossaries} +} +\end{resultbox} +In this document, the CSS entry is used three times in the +first section. This is more than the trigger value of 2, so +\code{\gls{gls}\marg{css}} is expanded on \idx{firstuse} with the short +form used on subsequent use, and the CSS entries in +that section are added to the glossary. In the second section, +the CSS entry is only used once, which trips the +suppression trigger, so in that section, the long form +is used and \code{\gls{gls}\marg{css}} doesn't get a line added to +the glossary file. -Note that version 1.42 has corrected an error that was introduced to -v1.41 that caused the name to run into the location list if there -was no symbol and no description. +The HTML entry is used a total of three times, but the +expansion and indexing suppression trigger is tripped +in both sections because the per-unit total (1 for the first +section and 2 for the second chapter) is less than or equal +to the trigger value. -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\gglssetwidest] -\cs{gglssetwidest}\oarg{level}\marg{name} -\end{definition} -(New to version 1.21.) -This is like \cs{glssetwidest} (provided by \sty{glossary-tree}) -but performs a global assignment. - -\begin{definition}[\DescribeMacro\eglssetwidest] -\cs{eglssetwidest}\oarg{level}\marg{name} -\end{definition} -This is like \cs{glssetwidest} -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 following only set the value if \meta{name} is wider than the -current value (new to version 1.23). Local update: -\begin{definition}[\DescribeMacro\glsupdatewidest] -\cs{glsupdatewidest}\oarg{level}\marg{name} -\end{definition} -Global update: -\begin{definition}[\DescribeMacro\gglsupdatewidest] -\cs{gglsupdatewidest}\oarg{level}\marg{name} -\end{definition} -Locale update (expands \meta{name}): -\begin{definition}[\DescribeMacro\eglsupdatewidest] -\cs{eglsupdatewidest}\oarg{level}\marg{name} -\end{definition} -Global update (expands \meta{name}): -\begin{definition}[\DescribeMacro\xglsupdatewidest] -\cs{xglsupdatewidest}\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. - -Note that if you are using \gls{bib2gls}, you can use the -resource option \texttt{set-widest} which will try to determine the -widest name of all the selected entries. This isn't guaranteed -to work as it may depend on fonts or commands that \gls{bib2gls} -can't replicate, but it should be suitable for names that just -consist of text, and can be more efficient than iterating over all -the defined entries using \TeX. +The sample entry has only been used once, but it doesn't +trip the indexing suppression because it's in the \cat{general} +category, which hasn't been listed in +\gls{GlsXtrEnableEntryUnitCounting}. -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.) +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 \gls{gls} by modifying the +\gls{glslinkcheckfirsthyperhook} +which is used at the end of the macro the determines whether +or not to suppress the hyperlink. -\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{codebox} +\cmd{documentclass}\marg{article} +\cmd{usepackage}[colorlinks]\marg{hyperref} +\cmd{usepackage}\marg{glossaries-extra} +\gls{makeglossaries} +\gls{GlsXtrEnableEntryUnitCounting}\marg{\cat{general}}\marg{0}\marg{page} +\gls{newglossaryentry}\marg{sample}\marg{\gloskeyval{name}{sample},\gloskeyval{description}{an example}} +\codepar +\cmd{renewcommand}*\marg{\gls{glslinkcheckfirsthyperhook}}\marg{\% + \cmd{ifnum}\gls{glsentrycurrcount}\gls{glslabel}>0 + \gls{setupglslink}\marg{hyper=false}\% + \cmd{fi} +} +\codepar +\cbeg{document} +\codepar +A \gls{gls}\marg{sample} entry. Next use: \gls{gls}\marg{sample}. +\codepar +\cmd{newpage} +Next page: \gls{gls}\marg{sample}. Again: \gls{gls}\marg{sample}. +\codepar +\gls{printglossaries} +\cend{document} +\end{codebox} +This only produces a hyperlink for the first instance of +\code{\gls{gls}\marg{sample}} on each page. +\begin{resultbox} +\createexample*[pages={1,2}, + label={ex:unitentrycounthyper}, + arara={pdflatex,pdflatex,makeglossaries,pdflatex,pdfcrop}, + title={Enabling unit counting to hook into hyperlink setting}, + description={Example document that demonstrates how to + automatically switch off the hyperlink using unit counting}] +{% +\cmd{usepackage}[colorlinks]\marg{hyperref}^^J% +\cmd{usepackage}\marg{glossaries-extra}^^J% +\codepar +\gls{makeglossaries}^^J% +\codepar +\gls{GlsXtrEnableEntryUnitCounting}\marg{general}\marg{0}\marg{page}^^J% +\codepar +\gls{newglossaryentry}\marg{sample}\marg{name={sample},description={an example}}^^J% +\codepar +\cmd{renewcommand}*\marg{\gls{glslinkcheckfirsthyperhook}}\marg{\%^^J + \cmd{ifnum}\gls{glsentrycurrcount}\gls{glslabel}>0^^J + \gls{setupglslink}\marg{hyper=false}\%^^J + \cmd{fi}^^J% +} +} +{A \gls{gls}\marg{sample} entry. Next use: \gls{gls}\marg{sample}. +\codepar +\cmd{newpage}^^J% +Next page: \gls{gls}\marg{sample}. Again: \gls{gls}\marg{sample}. +\codepar +\gls{printglossaries} +} +\end{resultbox} -\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. +The earlier warning about using the \ctr{page} counter still +applies. If the first instance of \gls{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. -\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. +\section{Link Counting} +\label{sec:linkcount} -\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. +As from version 1.26, an alternative method of entry counting +is to count the number of times the \idx{glslike} or +\idx{glstextlike} commands are used. (The \qt{link} in this method's +name refers to the use of the internal command \csfmt{@gls@link} +not to \gls{hyperlink} although \csfmt{@gls@link} may use +\gls{hyperlink} when displaying the \idx{linktext}.) -\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}. +To enable link counting use the preamble-only command: +\cmddef{GlsXtrEnableLinkCounting} +where \meta{categories} is a list of category labels. The optional +argument \meta{parent counter} may be used to identify a parent +counter (which must already be defined). If present, the associated +link counter will be reset when the parent counter is incremented. +This command automatically sets the \catattr{linkcount} attribute +for the given categories. If the optional argument is +present, it also sets the \catattr{linkcountmaster} attribute. -\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. +When enabled, the \idx{glslike} and \idx{glstextlike} commands +will increment the associated counter using +\cmddef{glsxtrinclinkcounter} +This just does +\code{\gls{stepcounter}\margm{counter}} by default but if you +need \gls{refstepcounter} instead, just redefine this command: +\begin{codebox} +\gls{renewcommand}*\marg{\gls{glsxtrinclinkcounter}}[1]\marg{\gls{refstepcounter}\marg{\#1}} +\end{codebox} + +You can access the internal count register using: +\cmddef{GlsXtrLinkCounterValue} +where \meta{label} is the entry's label. This will expand +to 0 if the register hasn't been defined. -\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. +It's also possible to access the display value +(\gls{thecounter}) using +\cmddef{GlsXtrTheLinkCounter} +(This will expand to 0 if the counter hasn't been defined.) -\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{important} +In order to conserve resources, the counter is only defined +when it first needs to be incremented so terms that have +been defined but haven't been used in the document +won't have the associated count register allocated. +\end{important} -\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. +You can test if the counter has been defined using: +\cmddef{GlsXtrIfLinkCounterDef} +This expands to \meta{true} if the link counter associated with the +entry identified by \meta{entry-label} has been defined, otherwise +expands to \meta{false}. -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. +The counter name can be obtained using +\cmddef{GlsXtrLinkCounterName} +This simply expands to the counter name associated with the +entry given by \meta{entry-label} without any check for +existence. For example, to change the display command +(\gls{thecounter}) using \sty{etoolbox}: +\begin{codebox} +\gls{csdef}\marg{the\gls{GlsXtrLinkCounterName}\marg{duck}}\% + \marg{\gls{Roman}\marg{\gls{GlsXtrLinkCounterName}\marg{duck}}} +\end{codebox} -There is now a user level command that performs the initialisation -for the \glostyle{alttree} style: -\begin{definition}[\DescribeMacro\glsxtralttreeInit] -\cs{glsxtralttreeInit} -\end{definition} +This is useful if you just want to change the display for +specific entries but isn't convenient if you want to change the +display for all entries. Instead, it's simpler to redefine +\gls{GlsXtrTheLinkCounter}. For example: +\begin{codebox} +\cmd{renewcommand}*\marg{\gls{GlsXtrTheLinkCounter}}[1]\marg{\% + \gls{GlsXtrIfLinkCounterDef}\marg{\#1}\% + \marg{\gls{Roman}\marg{\gls{GlsXtrLinkCounterName}\marg{\#1}}}\% + \marg{0}\% +} +\end{codebox} +In both cases, the redefinition should be implemented +after \gls{GlsXtrEnableLinkCounting}. -The paragraph indent for subsequent paragraphs in multi-paragraph -descriptions is provided by the length -\begin{definition}[\DescribeMacro\glsxtrAltTreeIndent] -\cs{glsxtrAltTreeIndent} -\end{definition} +Here's an example document that uses link counting to disable +the hyperlink after the first reference. This redefines +\gls{glslinkpresetkeys} (which is used by both \gls{gls} +and \gls{glstext}) instead of +\gls{glslinkcheckfirsthyperhook} (which is used by \gls{gls} +but not by \gls{glstext}). +\begin{codebox} +\cmd{documentclass}\marg{article} +\codepar +\cmd{usepackage}[colorlinks]\marg{hyperref} +\cmd{usepackage}\marg{glossaries-extra} +\codepar +\gls{makeglossaries} +\codepar +\cmd{renewcommand}*\marg{\gls{glslinkpresetkeys}}\marg{\% + \cmd{ifnum}\gls{GlsXtrLinkCounterValue}\marg{\gls{glslabel}}>1 + \gls{setupglslink}\marg{\glsoptval{hyper}{false}}\% + \cmd{fi} +} +\codepar +\gls{GlsXtrEnableLinkCounting}\marg{\cat{general}} +\codepar +\gls{newglossaryentry}\marg{sample1}\marg{\gloskeyval{name}{sample1},\gloskeyval{description}{an example}} +\gls{newglossaryentry}\marg{sample2}\marg{\gloskeyval{name}{sample2},\gloskeyval{description}{another example}} +\codepar +\gls{newabbreviation}\marg{ex}\marg{ex}\marg{example} +\codepar +\cbeg{document} +\cmd{section}\marg{Sample Section} +\codepar +\gls{Gls}\marg{sample1}, \gls{gls}\marg{sample2} and \gls{gls}\marg{ex}. +\gls{Glstext}\marg{sample1} and \gls{gls}\marg{ex} again. +\codepar +\cmd{section}\marg{Another Sample Section} +\codepar +\gls{Gls}\marg{sample1}, \gls{gls}\marg{sample2} and \gls{gls}\marg{ex}. +\codepar +\gls{printglossaries} +\cend{document} +\end{codebox} +The use of \gls{glslinkpresetkeys} +means that the options can override this. For example +\begin{codebox} +\gls{gls}\oarg{\glsoptval{hyper}{true}}\marg{sample1} +\end{codebox} +(or simply \code{\gls{gls}+\marg{sample1}}) +will override the \glsoptval{hyper}{false} setting in +\gls{glslinkpresetkeys}. If \gls{glslinkpostsetkeys} is used +instead, the \glsoptval{hyper}{false} setting will override +the setting provided in the optional argument. +The resulting document is shown below: +\begin{resultbox} +\createexample*[arara={pdflatex,makeglossaries,pdflatex,pdfcrop}, + label={ex:linkcount}, + title={Link counting used to selectively suppress hyperlinks}, +description={Example document that uses link counting to selectively suppress +hyperlinks}] +{% +\cmd{usepackage}[colorlinks]\marg{hyperref}^^J% +\cmd{usepackage}\marg{glossaries-extra} +\codepar +\gls{makeglossaries} +\codepar +\cmd{renewcommand}*\marg{\gls{glslinkpresetkeys}}\marg{\%^^J + \cmd{ifnum}\gls{GlsXtrLinkCounterValue}\marg{\gls{glslabel}}>1^^J + \gls{setupglslink}\marg{hyper=false}\%^^J% + \cmd{fi} +} +\codepar +\gls{GlsXtrEnableLinkCounting}\marg{general} +\codepar +\gls{newglossaryentry}\marg{sample1}\marg{\gloskeyval{name}{sample1},\gloskeyval{description}{an +example}}^^J% +\gls{newglossaryentry}\marg{sample2}\marg{\gloskeyval{name}{sample2},\gloskeyval{description}{another example}} +\codepar +\gls{newabbreviation}\marg{ex}\marg{ex}\marg{example} +\codepar +} +{\cmd{section}\marg{Sample Section}^^J% +\codepar +\gls{Gls}\marg{sample1}, \gls{gls}\marg{sample2} and \gls{gls}\marg{ex}.^^J% +\gls{Glstext}\marg{sample1} and \gls{gls}\marg{ex} again.^^J% +\codepar +\cmd{section}\marg{Another Sample Section}^^J% +\codepar +\gls{Gls}\marg{sample1}, \gls{gls}\marg{sample2} and \gls{gls}\marg{ex}.^^J% +\codepar +\gls{printglossaries} +} +\end{resultbox} -For additional commands that are available with the -\glostyle{alttree} style, see the documented code -(\nolinkurl{glossaries-extra-code.pdf}). See also -the accompanying sample files \nolinkurl{sample-alttree.tex}, -\nolinkurl{sample-alttree-sym.tex} and -\nolinkurl{sample-alttree-marginpar.tex}. +The \cat{abbreviation} category doesn't have the +\catattr{linkcount} attribute set (since it's not +listed in the argument of \gls{GlsXtrEnableLinkCounting}). This means that +\gls{GlsXtrLinkCounterValue} +always expands to 0 for the abbreviation (\code{ex}), so the +inequality test: +\begin{codebox} +\cmd{ifnum}\gls{GlsXtrLinkCounterValue}\marg{\gls{glslabel}}>1 +\end{codebox} +will always be false. This means that the abbreviation won't +have \glsoptval{hyper}{false} applied. If the test is changed to +\begin{codebox} +\cmd{ifnum}\gls{GlsXtrLinkCounterValue}\marg{\gls{glslabel}}=1 +\cmd{else} + \gls{setupglslink}\marg{\glsoptval{hyper}{false}}\% +\cmd{fi} +\end{codebox} +Then the abbreviation will always have \glsoptval{hyper}{false} +applied. -\chapter{New Glossary Styles} -\label{sec:newglossarystyles} +To reset the counter every section use the optional argument to set +the parent counter: +\begin{codebox} +\gls{GlsXtrEnableLinkCounting}\oarg{section}\marg{\cat{general}} +\end{codebox} -The \styfmt{glossaries-extra} package comes with some new styles. -The associated style package needs to be loaded. This can be done -with \cs{usepackage} but it's simpler to use the \pkgopt{stylemods} -option. -\section{\headingsty{glossary-bookindex} package} -\label{sec:bookindex} +\chapter{Multi (or Compound) Entries} +\label{sec:multientries} -As from v1.21, \styfmt{glossaries-extra} has a new supplementary -package \sty{glossary-bookindex} which provides the glossary style -\glostyle{bookindex}. This is very similar to the -\glostyle{mcolindexgroup} style but is designed for indexes, so by -default only the name and location list are displayed. You can -either load this package explicitly and then set the style: -\begin{verbatim} -\usepackage{glossaries-extra} -\usepackage{glossary-bookindex} -\setglossarystyle{bookindex} -\end{verbatim} -or use both the \pkgopt{stylemods} and \sty{style} options: -\begin{verbatim} -\usepackage[stylemods=bookindex,style=bookindex]{glossaries-extra} -\end{verbatim} -The \glostyle{bookindex} style only supports a maximum -hierarchical level of 2 (top-level, level~1 and level~2). It's -primarily designed for use with \gls{bib2gls}. It may be used with -other indexing options, but some features may not be present and -UTF-8 characters may cause a problem with non-Unicode engines in -letter group headings or PDF bookmarks. (\gls{bib2gls} uses numeric -identifies by default to avoid these problems. If numbers show up in -the group headings instead of the appropriate characters, check that -you have used the \pkgopt{record} package option.) - -The number of columns is given by -\begin{definition}[\DescribeMacro\glsxtrbookindexcols] -\cs{glsxtrbookindexcols} -\end{definition} -which defaults to 2. +Nested entries (where the entry definition references other entries) +are discussed in \sectionref{sec:nested}. This chapter deals with +occasions where a term or phrase may consist of multiple sub-terms +that are independently defined. (Examples in +\sectionref{sec:exskipfirstsuffix} and +\sectionref{sec:exskippostlink} provide workarounds for nested +entries.) -This style uses the \env{multicols} environment. If -the command -\begin{definition}[\DescribeMacro\glsxtrbookindexcolspread] -\cs{glsxtrbookindexcolspread} -\end{definition} -isn't empty then it's supplied as the optional argument -following \verb|\begin{multicols}|\marg{n}. You can switch from -\env{multicols} to \env{multicols*} by redefining -\begin{definition}[\DescribeMacro\glsxtrbookindexmulticolsenv] -\cs{glsxtrbookindexmulticolsenv} -\end{definition} -For example -\begin{verbatim} -\renewcommand{\glsxtrbookindexmulticolsenv}{multicols*} -\end{verbatim} - -Each top-level entry is displayed using -\begin{definition}[\DescribeMacro\glsxtrbookindexname] -\cs{glsxtrbookindexname}\marg{label} -\end{definition} -where the entry is identified by \meta{label}. This just -does \cs{glossentryname}\marg{label} by default. -For example, if you want the symbol to be included: -\begin{verbatim} -\renewcommand*{\glsxtrbookindexname}[1]{% - \glossentryname{#1}% - \ifglshassymbol{#1}{\space (\glossentrysymbol{#1})}{}% -} -\end{verbatim} -or if you want the description (if set): -\begin{verbatim} -\renewcommand*{\glsxtrbookindexname}[1]{% - \glossentryname{#1}% - \ifglshasdesc{#1}{\space \glossentrydesc{#1}\glspostdescription}{}% -} -\end{verbatim} -(which picks up the post-description hook). +For example, the names of bacteria, such as \emph{Clostridium +botulinum} and \emph{Clostridium perfringens}, are made up of the +genus (for example, \emph{Clostridium}) and the species +(for example, \emph{botulinum} or \emph{perfringens}). The genus is +often abbreviated after \gls{firstuse}. For example, \emph{C. +botulinum}. However, if the name is defined as a single term +consisting of both the genus and species then it's not possible to +apply the abbreviation when a different species with the same genus +is used. +Consider the following document: +\begin{codebox} +\cmd{documentclass}\marg{article} +\cmd{usepackage}\marg{glossaries-extra} +\gls{setabbreviationstyle}\marg{\abbrstyle{long-only-short-only}} +\gls{newabbreviation}\marg{cbot}\marg{C. botulinum}\marg{Clostridium botulinum} +\gls{newabbreviation}\marg{cperf}\marg{C. perfringens}\marg{Clostridium perfringens} +\cbeg{document} +\gls{gls}\marg{cbot}, \gls{gls}\marg{cbot}, \gls{gls}\marg{cperf}. +\cend{document} +\end{codebox} +The result is: +\begin{resultbox} +Clostridium botulinum, C. botulinum, Clostridium perfringens. +\end{resultbox} +However, it should more typically be: +\begin{resultbox} +Clostridium botulinum, C. botulinum, C. perfringens. +\end{resultbox} +In this case, the genus should actually be a separate definition: +\begin{codebox} +\cmd{documentclass}\marg{article} +\cmd{usepackage}\marg{glossaries-extra} +\gls{setabbreviationstyle}\marg{\abbrstyle{long-only-short-only}} +\gls{newabbreviation}\marg{clostridium}\marg{C.}\marg{Clostridium} +\gls{newglossaryentry}\marg{botulinum}\marg{\gloskeyval{name}{botulinum},\gloskeyval{description}{}} +\gls{newglossaryentry}\marg{perfringens}\marg{\gloskeyval{name}{perfringens},\gloskeyval{description}{}} +\cbeg{document} +\gls{gls}\marg{clostridium} \gls{gls}\marg{botulinum}, +\gls{gls}\marg{clostridium} \gls{gls}\marg{botulinum}, +\gls{gls}\marg{clostridium} \gls{gls}\marg{perfringens}. +\cend{document} +\end{codebox} -Alternatively you can use the \cs{glsxtrpostname\meta{category}} -hook to append information after the name according to the entry's -category. +This is quite awkward to write. This chapter describes how to +provide a shortcut for this kind of construct. Each term should be +defined as normal (as in the above example), and a \qt{multi-entry} +label is then defined with the list of labels of the entries that +need to be referenced. -Sub-entries are displayed using -\begin{definition}[\DescribeMacro\glsxtrbookindexsubname] -\cs{glsxtrbookindexsubname}\marg{label} -\end{definition} -which just defaults to \cs{glsxtrbookindexname}\marg{label}. - -The separator used before the location list for top-level -entries is given by -\begin{definition}[\DescribeMacro\glsxtrbookindexprelocation] -\cs{glsxtrbookindexprelocation}\marg{label} -\end{definition} -where \meta{label} is the entry's label. This checks if -the \texttt{location} field has been set. If it has, it -does -\begin{verbatim} -,\glsxtrprelocation -\end{verbatim} -otherwise it just does \cs{glsxtrprelocation} (which defaults -to \cs{space}). If you're not using -\gls{bib2gls}, the \gloskey{location} field won't be set. - -The separator used before the -location list for sub-entries is given by -\begin{definition}[\DescribeMacro\glsxtrbookindexsubprelocation] -\cs{glsxtrbookindexsubprelocation}\marg{label} -\end{definition} -which defaults to \cs{glsxtrbookindexprelocation}\marg{label}. +\cmddef{multiglossaryentry} +This defines a multi-entry set with the label +\meta{multi-label}, consisting of the entries whose labels are +listed in \meta{entry-label-list}, where the main entry (which must be +present in \meta{entry-label-list}) is identified by \meta{main-label}. +If \meta{main-label} is omitted, it's assumed to be the final label +in \meta{entry-label-list}. The main entry is described in more detail in +\sectionref{sec:mglsmain}. -The actual location list is encapsulated with: -\begin{definition}[\DescribeMacro\glsxtrbookindexlocation] -\cs{glsxtrbookindexlocation}\marg{label}\marg{location list} -\end{definition} -for top-level entries and -\begin{definition}[\DescribeMacro\glsxtrbookindexsublocation] -\cs{glsxtrbookindexsublocation}\marg{label}\marg{location list} -\end{definition} -for sub-entries. These both just do \meta{location list} by default. +\begin{important} +The entries in \meta{entry-label-list} must already be defined (using +commands like \gls{newglossaryentry} or \gls{newabbreviation}). +\end{important} -The separator used between a top-level parent and child entry is -given by -\begin{definition}[\DescribeMacro\glsxtrbookindexparentchildsep] -\cs{glsxtrbookindexparentchildsep} -\end{definition} -This defaults to \cs{nopagebreak}. +The \meta{options} are a comma-separated list of options to override +the current settings and are described in \sectionref{sec:multiglsoptions}. -The separator used between a sub-level parent and child entry is -given by -\begin{definition}[\DescribeMacro\glsxtrbookindexparentsubchildsep] -\cs{glsxtrbookindexparentsubchildsep} -\end{definition} -This defaults to \cs{glsxtrbookindexparentchildsep}. - -The separator between top-level entries is given by -\begin{definition}[\DescribeMacro\glsxtrbookindexbetween] -\cs{glsxtrbookindexbetween}\marg{label1}\marg{label2} -\end{definition} -This comes after the entry given by \meta{label1}, if the entry -has no children, or after the last descendent otherwise, -so it always comes immediately before the entry given -by \meta{label2} unless the entry occurs at the start of -a group. This does nothing by default. +The earlier example can now be modified to include the following: +\begin{codebox} +\gls{multiglossaryentry}\marg{cbot}\marg{clostridium,botulinum} +\gls{multiglossaryentry}\marg{cperf}\marg{clostridium,perfringens} +\end{codebox} +These commands must come after the \code{clostridium}, +\code{botulinum} and \code{perfringens} definitions. + +Once defined, a multi-entry set can be referenced in the document using commands like: +\cmddef{mgls} +This command essentially does \code{\gls{gls}\margm{label}} for each item in +the \meta{label list} (with separators, see +\sectionref{sec:mglssep}). If the final optional argument +\meta{insert} is provided, it will be applied to the final +(non-skipped) element in the list. So the document body in the +above example, can be rewritten as: +\begin{codebox} +\gls{mgls}\marg{cbot}, \gls{mgls}\marg{cbot}, \gls{mgls}\marg{cperf}. +\end{codebox} -The separator between two level~1 entries is given by -\begin{definition}[\DescribeMacro\glsxtrbookindexsubbetween] -\cs{glsxtrbookindexsubbetween}\marg{label1}\marg{label2} -\end{definition} +There are some variants of \gls{mgls} listed in \sectionref{sec:mglslike}. +The available \meta{options} are listed in \sectionref{sec:mglsopts}. They are +applied after the \gls{multiglossaryentry} options and will override +settings for the individual entries. -The separator between two level~2 entries is given by -\begin{definition}[\DescribeMacro\glsxtrbookindexsubsubbetween] -\cs{glsxtrbookindexsubsubbetween}\marg{label1}\marg{label2} -\end{definition} -At the end of each letter group, the following hooks -are done in order: -\begin{definition}[\DescribeMacro\glsxtrbookindexsubsubatendgroup] -\cs{glsxtrbookindexsubsubatendgroup}\marg{sub-sub-label} -\end{definition} -\begin{definition}[\DescribeMacro\glsxtrbookindexsubatendgroup] -\cs{glsxtrbookindexsubatendgroup}\marg{sub-label} -\end{definition} -\begin{definition}[\DescribeMacro\glsxtrbookindexatendgroup] -\cs{glsxtrbookindexatendgroup}\marg{label} -\end{definition} -where \meta{sub-sub-label} is the label of the last -level~2 entry, \meta{sub-label} is the label of the last -level~1 entry and \meta{label} is the label of the last -level~0 entry. - -For example, the resource option \texttt{seealso=omit} -instructs \gls{bib2gls} to omit the \texttt{seealso} cross-reference -from the location list. (The \texttt{see} cross-reference -will still be added unless you also have \texttt{see=omit}.) -The \texttt{seealso} cross-reference can instead be appended after -the child entries using: -\begin{verbatim} -\renewcommand{\glsxtrbookindexatendgroup}[1]{% - \glsxtrifhasfield{seealso}{#1}{\glstreesubitem\glsxtruseseealso{#1}}{}% -} -\renewcommand{\glsxtrbookindexbetween}[2]{% - \glsxtrbookindexatendgroup{#1}% -}% +\begin{important} +You can't use \meta{multi-label} in commands like \gls{gls} +as this label represents a set of entry labels not a single entry. +\end{important} -\renewcommand{\glsxtrbookindexsubatendgroup}[1]{% - \glsxtrifhasfield{seealso}{#1}{\glstreesubsubitem\glsxtruseseealso{#1}}{}% -} +The \gls{multiglossaryentry} command will generate an error if the label has already +been defined as a multi-entry. -\renewcommand{\glsxtrbookindexsubbetween}[2]{% - \glsxtrbookindexsubatendgroup{#1}% -} +\cmddef{providemultiglossaryentry} +This does nothing if a multi-entry set with the given label has +already been defined otherwise it will act like +\gls{multiglossaryentry}. Notes and associated commands applying to +\gls{multiglossaryentry} also apply to +\gls{providemultiglossaryentry} unless otherwise stated. -\renewcommand{\glsxtrbookindexsubsubatendgroup}[1]{% - \glsxtrifhasfield{seealso}{#1}% - {\glstreeitem\hspace*{40pt}\glsxtruseseealso{#1}}{}% -} +\begin{important} +\gls{multiglossaryentry} may be placed anywhere after the entries +listed in \meta{label list} have been defined. A multi-entry label can't be +referenced (with commands like \gls{mgls}) before it has been defined. +\end{important} -\renewcommand{\glsxtrbookindexsubsubbetween}[2]{% - \glsxtrbookindexsubsubatendgroup{#1}% -} -\end{verbatim} -This uses \cs{glstreesubitem} and \cs{glstreesubsubitem} -to indent the cross-reference according to the next level down, -so the cross-reference for a top-level entry is aligned with -the sub-entries, and a level~1 entry has its cross-reference -aligned with sub-sub-entries. In the event that a level~2 -entry has a cross-reference, this is indented a bit further -(but it won't be aligned with any deeper level as the -\glostyle{bookindex} style only supports a maximum of two -sub-levels). +There is limited support for \optval{docdef}{true}. The multi-entry +definition can be picked up from the \ext{aux} file on the next +run to allow cross-references in any glossaries that occur at the +start of the document. Any changes made with commands like +\gls{mglsSetMain} won't be carried over to the next run. -The \glostyle{bookindex} style uses group headings. (If you -use \gls{bib2gls} remember to invoke it with the \verb|--group| -or \verb|-g| switch.) The heading will use -\begin{definition}[\DescribeMacro\glsxtrbookindexbookmark] -\cs{glsxtrbookindexbookmark}\marg{group title}\marg{name} -\end{definition} -If \cs{pdfbookmark} has been defined, this will -use that command to bookmark the group title. If -\pkgopt[chapter]{section} is set (default if chapters are defined) -then this uses level~1 otherwise it uses level~2. You can -redefine this command if this isn't appropriate. -If \cs{pdfbookmark} hasn't been defined, this command does nothin. - -The group heading is formatted according to -\begin{definition}[\DescribeMacro\glsxtrbookindexformatheader] -\cs{glsxtrbookindexformatheader}\marg{group title} -\end{definition} -which is defined as -\begin{verbatim} -\newcommand*{\glsxtrbookindexformatheader}[1]{% - \par{\centering\glstreegroupheaderfmt{#1}\par}% -} -\end{verbatim} -where \cs{glstreegroupheaderfmt} is provided by the -\sty{glossary-tree} package, which is automatically loaded. -Note that the entry names aren't encapsulated with -\cs{glstreenamefmt}. +By default \gls{multiglossaryentry} will be localised to the current scope. +If you want to globally define a multi-entry you need to first +switch on global definitions with: +\cmddef{multiglossaryentryglobaltrue} +To switch back to local definitions use: +\cmddef{multiglossaryentryglobalfalse} +You can test if this setting is on with: +\cmddef{ifmultiglossaryentryglobal} -The \sty{glossary-bookindex} package provides some supplementary -commands that aren't used by default, but may be used when -adjusting the style. These commands should only be -used within one of the \cs{print\ldots glossary} commands. -(That is, they should only be used in glossary styles.) -\begin{definition}[\DescribeMacro\glsxtrbookindexmarkentry] -\cs{glsxtrbookindexmarkentry}\marg{label} -\end{definition} -This writes information to the \texttt{.aux} file that -can be read on the next run to obtain the first and last entry on -each page of the glossary. +If you want to change the multi-entry options (locally) you can use: +\cmddef{mglsSetOptions} +This removes the original options and replaces them with +\meta{new-options}. If you want to (locally) append to the +existing options, use: +\cmddef{mglsAddOptions} -You can display the first entry -associated with the current page using: -\begin{definition}[\DescribeMacro\glsxtrbookindexfirstmark] -\cs{glsxtrbookindexfirstmark} -\end{definition} -and the last entry associated with the current page -using: -\begin{definition}[\DescribeMacro\glsxtrbookindexlastmark] -\cs{glsxtrbookindexlastmark} -\end{definition} -These do nothing if there are no entries marked on the current page -(or if the document build isn't up to date). +Note that \gls{multiglossaryentry} doesn't make any adjustments to +the component entries. You will need to use the \gloskey{parent} key +when you define the entries if you want a hierarchical structure in +your \idx{glossary}. (See the example in \sectionref{sec:mglsexhier}.) -The entry is formatted using: -\begin{definition}[\DescribeMacro\glsxtrbookindexfirstmarkfmt] -\cs{glsxtrbookindexfirstmarkfmt}\marg{label} -\end{definition} -for the first instance and -\begin{definition}[\DescribeMacro\glsxtrbookindexlastmarkfmt] -\cs{glsxtrbookindexlastmarkfmt}\marg{label} -\end{definition} -for the last. +If you don't want the other elements in the glossary, you can +suppress the indexing with \mglsoptval{indexothers}{false} +(\sectionref{sec:multiglsoptionsindexing}) or put them in an ignored +glossary. For example: +\begin{codebox} +\gls{newignoredglossary}\marg{common} +\gls{newabbreviation}\oarg{\gloskeyval{type}{common}}\marg{clostridium}\marg{C.}\marg{Clostridium} +\end{codebox} -These commands are designed for use in page headers or footers -where the page number is stable. For example, \cs{glsxtrbookindexname} -can be redefined to mark the current entry: -\begin{verbatim} -\renewcommand{\glsxtrbookindexname}[1]{% - \glsxtrbookindexmarkentry{#1}% - \glossentryname{#1}% -} -\end{verbatim} -If you only want to mark the top-level entries, remember -to redefine \cs{glsxtrbookindexsubname} as it defaults -to \cs{glsxtrbookindexname}: -\begin{verbatim} -\renewcommand{\glsxtrbookindexsubname}[1]{% - \glossentryname{#1}% -} -\end{verbatim} +The \meta{multi-label} can't be used in commands like \gls{gls} since +the label refers to a set of entry labels not to an individual +entry. Similarly, an individual entry label can't be used in +commands like \gls{mgls}. It is possible (although potentially +confusing) to use the same label for a multi-entry as for an +individual entry (see the example in +\sectionref{sec:exskippostlink}). Context will determine which is +meant, except in the case of the cross-referencing fields +(\gloskey{see}, \gloskey{seealso} and \gloskey{alias}) where the +cross-referenced label will first be tested if it's a known +multi-entry label. -Then if you're using \sty{fancyhdr} you can set the page style -to show the first and last entry for the current page with: -\begin{verbatim} - \pagestyle{fancy}% - \lhead{\thepage}% - \lfoot{\glsxtrbookindexfirstmark}% - \cfoot{}% - \rfoot{\glsxtrbookindexlastmark}% -\end{verbatim} - -\section{\headingsty{glossary-longextra} package} -\label{sec:longextra} +If you don't want to have to keep track of which labels refer to +multi-entries and which refer to individual entries you can use: +\cmddef{GlsXtrMglsOrGls} +where \meta{mgls cs} is the \gls{mgls}-like command to use if +\meta{label} has been defined as a multi-entry and \meta{gls cs} is +the \idx{glslike} or \idx{glstextlike} command to use otherwise. +The \meta{modifier} may be omitted, otherwise it's the modifier +that may be used with \gls{mgls} or \gls{gls} (asterisk \code{*}, +plus \code{+} or the token identified with \gls{GlsXtrSetAltModifier}). The +modifier and remaining options are passed to the relevant command +(\meta{mgls cs} or \meta{gls cs}). -As from version 1.37, the \styfmt{glossaries-extra} package comes -with the supplementary package \sty{glossary-longextra} that -provides additional styles, listed below, that use the -\env{longtable} environment. If you know that your glossary won't -span more than a page and you need to use it in a context that's -incompatible with \env{longtable}, you can instead setup these styles -to use \env{tabular} instead. In order to do this you must use -\begin{definition}[\DescribeMacro\GlsLongExtraUseTabulartrue] -\cs{GlsLongExtraUseTabulartrue} -\end{definition} -\emph{before the style is set}. For example: -\begin{verbatim} -\GlsLongExtraUseTabulartrue -\setglossarystyle{long-name-desc} -\end{verbatim} -or -\begin{verbatim} -\GlsLongExtraUseTabulartrue -\printunsrtglossary[style={long-name-desc}] -\end{verbatim} -If you use this setting, you can change the default vertical -alignment with: -\begin{definition}[\DescribeMacro\glslongextraTabularVAlign] -\cs{glslongextraTabularVAlign} -\end{definition} -The default definition is \texttt{c}. - -The column titles are formatted according to: -\begin{definition}[\DescribeMacro\glslongextraHeaderFmt] -\cs{glslongextraHeaderFmt}\marg{text} -\end{definition} -which simply does \cs{textbf}\marg{text} by default. - -The name column has the title given by \ics{entryname} and -the column alignment is given by: -\begin{definition}[\DescribeMacro\glslongextraNameAlign] -\cs{glslongextraNameAlign} -\end{definition} -which expands to \texttt{l} (left) by default. - -The symbol column (where applicable) has the title given by -\ics{symbolname} and the column alignment is given by: -\begin{definition}[\DescribeMacro\glslongextraSymbolAlign] -\cs{glslongextraSymbolAlign} -\end{definition} -which expands to \texttt{c} (centred) by default. - -The location list column (where applicable) has the title given by -\ics{pagelistname} and the column alignment is given by: -\begin{definition}[\DescribeMacro\glslongextraLocationAlign] -\cs{glslongextraLocationAlign} -\end{definition} -which expands to -\begin{verbatim} ->{\raggedright}p{\glspagelistwidth} -\end{verbatim} -by default. (Ragged-right paragraph, \ics{glspagelistwidth} is -defined in \sty{glossary-long}, which is automatically loaded.) - -The description column has the title given by \ics{descriptionname} -and the column alignment is given by: -\begin{definition}[\DescribeMacro\glslongextraDescAlign] -\cs{glslongextraDescAlign} -\end{definition} -which expands to -\begin{verbatim} ->{\raggedright}p{\glsdescwidth} -\end{verbatim} -by default. (Ragged-right paragraph, \ics{glsdescwidth} is -defined in \sty{glossary-long}, which is automatically loaded.) - -Unlike the long styles provided by the base \styfmt{glossaries} -package, these new styles try to determine the value of -\cs{glsdescwidth} at the start of the glossary according to the -number of columns provided by the style. The calculations are -performed by the following commands: -\begin{definition}[\DescribeMacro\glslongextraSetDescWidth] -\cs{glslongextraSetDescWidth} -\end{definition} -This is used by the styles that have a name and description -column. The value of \cs{glsdescwidth} is computed as: -\[ - \cs{glsdescwidth} = \cs{linewidth} - 4\cs{tabcolsep} - W -\] -where $W$ is a guess at the width of the name column. This is first -set to the width of the name column header: -\begin{alltt} -\cs{settowidth}\marg{width}\{\cs{glslongextraHeaderFmt}\cs{entryname}\} -\end{alltt} -If any names in that column are larger than this, then you need -to specify the widest name using: -\begin{definition}[\DescribeMacro\glslongextraSetWidest] -\cs{glslongextraSetWidest}\marg{widest name} -\end{definition} -or -\begin{definition}[\DescribeMacro\glslongextraUpdateWidest] -\cs{glslongextraUpdateWidest}\marg{text} -\end{definition} -These work like the analogous commands \cs{glssetwidest} and -\cs{glsupdatewidest} provided with the \glostyle{alttree} style, but -in this case there's no hierarchy. The default widest name -is obtained from the \glostyle{alttree} top-level name if set, -otherwise it's empty, so you can use \gls{bib2gls}['s] -\texttt{set-widest} option. If you have the entry counter enabled, -you will need to include this with the name for the extra material to -be taken into account. - -The name isn't shown for child entries by default, but if -you change this and you want to use \gls{bib2gls}['s] -\texttt{set-widest} option (for \gls{bib2gls} v1.8+) then you need to -redefine: -\begin{definition}[\DescribeMacro\glslongextraUpdateWidestChild] -\cs{glslongextraUpdateWidestChild}\marg{level}\marg{text} -\end{definition} -This does nothing by default, but if you are including the child -names then you need to redefine this command: -\begin{verbatim} -\renewcommand{\glslongextraUpdateWidestChild}[2]{% - \glslongextraUpdateWidest{#2}% -} -\end{verbatim} - -If you prefer to set an explicit width for the description -column then you need to redefine \cs{glslongextraSetDescWidth}. For -example: -\begin{verbatim} -\renewcommand{\glslongextraSetDescWidth}{% - \setlength{\glsdescwidth}{0.6\linewidth}% -} -\end{verbatim} - -The styles that have a name, symbol and description, -\cs{glsdescwidth} is set with: -\begin{definition}[\DescribeMacro\glslongextraSymSetDescWidth] -\cs{glslongextraSymSetDescWidth} -\end{definition} -This first uses \cs{glslongextraSetDescWidth} and then subtracts -2\cs{tabcolsep} and the width of the symbol column header from -\cs{glsdescwidth}. This assumes that the symbol column header -is larger than any of the symbols. If this isn't appropriate -then you can redefine this command. For example: -\begin{verbatim} -\renewcommand{\glslongextraSymSetDescWidth}{% - \glslongextraSetDescWidth - \addtolength{\glsdescwidth}{-3cm}% -} -\end{verbatim} -or -\begin{verbatim} -\renewcommand{\glslongextraSymSetDescWidth}{% - \setlength{\glsdescwidth}{.5\linewidth}% -} -\end{verbatim} - -For the styles that have a name, description and location column, -\cs{glsdescwidth} is set using: -\begin{definition}[\DescribeMacro\glslongextraLocSetDescWidth] -\cs{glslongextraLocSetDescWidth} -\end{definition} -This uses \cs{glslongextraSetDescWidth} and then subtracts -2\cs{tabcolsep} and \cs{glspagelistwidth} from \cs{glsdescwidth}. -You can redefine this command to set both \cs{glsdescwidth} and -\cs{glspagelistwidth} if appropriate. - -For the styles that have a name, description, symbol and location -column, \cs{glsdescwidth} is set using: -\begin{definition}[\DescribeMacro\glslongextraSymLocSetDescWidth] -\cs{glslongextraSymLocSetDescWidth} -\end{definition} -This uses \cs{glslongextraSymSetDescWidth} and then subtracts -2\cs{tabcolsep} and \cs{glspagelistwidth} from -\cs{glsdescwidth}. Again, you can redefine this command -to explicitly set both lengths. - -In all cases, the top-level name is formatted according to: -\begin{definition}[\DescribeMacro\glslongextraNameFmt] -\cs{glslongextraNameFmt}\marg{label} -\end{definition} -This does -\begin{alltt} -\cs{glsentryitem}\marg{label}\cs{glstarget}\marg{label}\{\cs{glossentryname}\marg{label}\} -\end{alltt} -which includes the entry counter (if enabled), the target and the post-name link. - -The top-level description is formatted according to: -\begin{definition}[\DescribeMacro\glslongextraDescFmt] -\cs{glslongextraDescFmt}\marg{label} -\end{definition} -This does \cs{glossentrydesc}\marg{label} followed by the -post-description hook. - -The styles that have a symbol column format the symbol using: -\begin{definition}[\DescribeMacro\glslongextraSymbolFmt] -\cs{glslongextraSymbolFmt}\marg{label} -\end{definition} -This just does \cs{glossentrysymbol}\marg{label}. - -The styles that have a location list column format the list using: -\begin{definition}[\DescribeMacro\glslongextraLocationFmt] -\cs{glslongextraLocationFmt}\marg{label}\marg{locations} -\end{definition} -This just does \meta{locations} and ignores the label. - -The child entries have their name formatted according to: -\begin{definition}[\DescribeMacro\glslongextraSubNameFmt] -\cs{glslongextraSubNameFmt}\marg{level}\marg{label} -\end{definition} -where \meta{level} is the hierarchical level. This defaults to: -\begin{alltt} -\cs{glssubentryitem}\marg{label}\cs{glstarget}\marg{label}\{\cs{strut}\} -\end{alltt} -This includes the sub-entry counter (if enabled) and the target -but doesn't show the name. The child description is formatted according to: -\begin{definition}[\DescribeMacro\glslongextraSubDescFmt] -\cs{glslongextraSubDescFmt}\marg{level}\marg{label} -\end{definition} -which defaults to just \cs{glslongextraDescFmt}\marg{label} - -The child symbol is formatted (where appropriate) according to: -\begin{definition}[\DescribeMacro\glslongextraSubSymbolFmt] -\cs{glslongextraSubSymbolFmt}\marg{level}\marg{label} -\end{definition} -This just does \cs{glslongextraSymbolFmt}\marg{label} by default. - -The styles that have a location list column format the list for -child entries using: -\begin{definition}[\DescribeMacro\glslongextraLocationFmt] -\cs{glslongextraSubLocationFmt}\meta{level}\marg{label}\marg{locations} -\end{definition} -This just does \meta{locations} and ignores the level and label. - -The letter group headings are formatted according to: -\begin{definition}[\DescribeMacro\glslongextraGroupHeading] -\cs{glslongextraGroupHeading}\marg{n}\marg{label} -\end{definition} -which does nothing by default. The first argument \meta{n} is the -number of columns in the table. The second argument \meta{label} -is the group label (not the title, although they may happen -to be the same). - -This can be redefined to show the group heading. For example: -\begin{verbatim} -\renewcommand*{\glslongextraGroupHeading}[2]{% - \glsxtrgetgrouptitle{#2}{\thisgrptitle}% - \glslongextraHeaderFmt{\thisgrptitle}% - \tabularnewline - \noalign{\vskip\normalbaselineskip}% -} -\end{verbatim} -This ignores the first argument and just puts the group -title in the first column formatted according to -\cs{glslongextraHeaderFmt} (to match the column header). - -Remember that you can also adjust the styles through category -attributes. The name column's title is given by -\cs{entryname}, the description column's title is given by -\cs{descriptionname} and (where present) the symbol column's -title is given by \cs{symbolname}, as for the other long styles -that have headers. +You may prefer to define your own shortcut commands for common +combinations. For example, (assuming these commands haven't already +been defined by the \opt{shortcuts} option): +\begin{codebox} +\cmd{newcommand}\marg{\gls{ac}}\marg{\gls{GlsXtrMglsOrGls}\marg{\gls{mgls}}\marg{\gls{gls}}} +\cmd{newcommand}\marg{\gls{acp}}\marg{\gls{GlsXtrMglsOrGls}\marg{\gls{mglsmainpl}}\marg{\gls{glspl}}} +\cmd{newcommand}\marg{\gls{Ac}}\marg{\gls{GlsXtrMglsOrGls}\marg{\gls{Mgls}}\marg{\gls{Gls}}} +\cmd{newcommand}\marg{\gls{Acp}}\marg{\gls{GlsXtrMglsOrGls}\marg{\gls{Mglsmainpl}}\marg{\gls{Glspl}}} +\end{codebox} -\begin{description} -\item{\glostyle{long-name-desc}} This is like the -\glostyle{longragged-booktabs} style but doesn't show the location -list (regardless of the \pkgopt{nonumberlist} option). The name is -shown in the first column and the description in the second. - -The symbol is not displayed. The header -row is produced with: -\begin{definition}[\DescribeMacro\glslongextraNameDescHeader] -\cs{glslongextraNameDescHeader} -\end{definition} -This essentially uses the same code as for \glostyle{longragged-booktabs} -but makes it easier to adjust the header without having to define a -new style. This is defined as: -\begin{verbatim} -\glslongextraNameDescTabularHeader\endhead -\glslongextraNameDescTabularFooter\endfoot -\end{verbatim} -where: -\begin{definition}[\DescribeMacro\glslongextraNameDescTabularHeader] -\cs{glslongextraNameDescTabularHeader} -\end{definition} -sets up the header and -\begin{definition}[\DescribeMacro\glslongextraNameDescTabularFooter] -\cs{glslongextraNameDescTabularFooter} -\end{definition} -sets up the footer. If you have setup the \env{tabular} version -of this style then the above two commands are used at the -start and end of the \env{tabular} environment (and -\cs{glslongextraNameDescHeader} isn't used). - -For example, to simply remove the header and footer (for the default -\env{longtable} version of the style): -\begin{verbatim} -\renewcommand{\glslongextraNameDescHeader}{} -\end{verbatim} -Or to change the name alignment to centred: -\begin{verbatim} -\renewcommand{\glslongextraNameAlign}{c} -\end{verbatim} - -\item{\glostyle{long-name-desc-loc}} This is like the -\glostyle{long-name-desc} style but has a third column for the -location list. The \env{longtable} header is given by: -\begin{definition}[\DescribeMacro\glslongextraNameDescLocationHeader] -\cs{glslongextraNameDescLocationHeader} -\end{definition} -which similarly defined in terms of the commands used for the -\env{tabular} version: -\begin{definition}[\DescribeMacro\glslongextraNameDescLocationTabularHeader] -\cs{glslongextraNameDescLocationTabularHeader} -\end{definition} -and -\begin{definition}[\DescribeMacro\glslongextraNameDescLocationTabularFooter] -\cs{glslongextraNameDescLocationTabularFooter} -\end{definition} - -\item{\glostyle{long-desc-name}} This is like the -\glostyle{long-name-desc} style but swaps the columns. Note that -if the entry counter is displayed it will appear at the start -of the second column by default. The \env{longtable} header is formatted according -to: -\begin{definition}[\DescribeMacro\glslongextraDescNameHeader] -\cs{glslongextraDescNameHeader} -\end{definition} -which similarly defined in terms of the commands used for the -\env{tabular} version: -\begin{definition}[\DescribeMacro\glslongextraDescNameTabularHeader] -\cs{glslongextraDescNameTabularHeader} -\end{definition} -and -\begin{definition}[\DescribeMacro\glslongextraDescNameTabularFooter] -\cs{glslongextraDescNameTabularFooter} -\end{definition} - -\item{\glostyle{long-loc-desc-name}} This has three columns -containing the location list, description and name. The -\env{longtable} header -is formatted according to: -\begin{definition}[\DescribeMacro\glslongextraLocationDescNameHeader] -\cs{glslongextraLocationDescNameHeader} -\end{definition} -which similarly defined in terms of the commands used for the -\env{tabular} version: -\begin{definition}[\DescribeMacro\glslongextraLocationDescNameTabularHeader] -\cs{glslongextraLocationDescNameTabularHeader} -\end{definition} -and -\begin{definition}[\DescribeMacro\glslongextraLocationDescNameTabularFooter] -\cs{glslongextraLocationDescNameTabularFooter} -\end{definition} - -\item{\glostyle{long-name-desc-sym}} This is has three columns, with -the name in the first, the description in the second and the symbol -in the third. - -The \env{longtable} header row is produced with: -\begin{definition}[\DescribeMacro\glslongextraNameDescSymHeader] -\cs{glslongextraNameDescSymHeader} -\end{definition} -which similarly defined in terms of the commands used for the -\env{tabular} version: -\begin{definition}[\DescribeMacro\glslongextraNameDescSymTabularHeader] -\cs{glslongextraNameDescSymTabularHeader} -\end{definition} -and -\begin{definition}[\DescribeMacro\glslongextraNameDescSymTabularFooter] -\cs{glslongextraNameDescSymTabularFooter} -\end{definition} - -\item{\glostyle{long-name-desc-sym-loc}} This is has four columns, with -the name in the first, the description in the second, the symbol -in the third and the location list in the fourth. - -The \env{longtable} header row is produced with: -\begin{definition}[\DescribeMacro\glslongextraNameDescSymLocationHeader] -\cs{glslongextraNameDescSymLocationHeader} -\end{definition} -which similarly defined in terms of the commands used for the -\env{tabular} version: -\begin{definition}[\DescribeMacro\glslongextraNameDescSymLocationTabularHeader] -\cs{glslongextraNameDescSymLocationTabularHeader} -\end{definition} -and -\begin{definition}[\DescribeMacro\glslongextraNameDescSymLocationTabularFooter] -\cs{glslongextraNameDescSymLocationTabularFooter} -\end{definition} - -\item{\glostyle{long-name-sym-desc}} This is like the -\glostyle{long-name-desc-sym} but the second and third column are -swapped. The \env{longtable} header row is given by: -\begin{definition}[\DescribeMacro\glslongextraNameSymDescHeader] -\cs{glslongextraNameSymDescHeader} -\end{definition} -which similarly defined in terms of the commands used for the -\env{tabular} version: -\begin{definition}[\DescribeMacro\glslongextraNameSymDescTabularHeader] -\cs{glslongextraNameSymDescTabularHeader} -\end{definition} -and -\begin{definition}[\DescribeMacro\glslongextraNameSymDescTabularFooter] -\cs{glslongextraNameSymDescTabularFooter} -\end{definition} - -\item{\glostyle{long-name-sym-desc-loc}} This is like the -\glostyle{long-name-desc-sym-loc} but the second and third column are -swapped. The \env{longtable} header row is given by: -\begin{definition}[\DescribeMacro\glslongextraNameSymDescLocationHeader] -\cs{glslongextraNameSymDescLocationHeader} -\end{definition} -which similarly defined in terms of the commands used for the -\env{tabular} version: -\begin{definition}[\DescribeMacro\glslongextraNameSymDescLocationTabularHeader] -\cs{glslongextraNameSymDescLocationTabularHeader} -\end{definition} -and -\begin{definition}[\DescribeMacro\glslongextraNameSymDescLocationTabularFooter] -\cs{glslongextraNameSymDescLocationTabularFooter} -\end{definition} - -\item{\glostyle{long-sym-desc-name}} This has the symbol in the -first column, the description in the second and the name in the -third. The \env{longtable} header row is given by: -\begin{definition}[\DescribeMacro\glslongextraSymDescNameHeader] -\cs{glslongextraSymDescNameHeader} -\end{definition} -which similarly defined in terms of the commands used for the -\env{tabular} version: -\begin{definition}[\DescribeMacro\glslongextraSymDescNameTabularHeader] -\cs{glslongextraSymDescNameTabularHeader} -\end{definition} -and -\begin{definition}[\DescribeMacro\glslongextraSymDescNameTabularFooter] -\cs{glslongextraSymDescNameTabularFooter} -\end{definition} - -\item{\glostyle{long-loc-sym-desc-name}} This has the location list -in the first column, symbol in the -second column, the description in the third and the name in the -fourth. The \env{longtable} header row is given by: -\begin{definition}[\DescribeMacro\glslongextraLocationSymDescNameHeader] -\cs{glslongextraLocationSymDescNameHeader} -\end{definition} -which similarly defined in terms of the commands used for the -\env{tabular} version: -\begin{definition}[\DescribeMacro\glslongextraLocationSymDescNameTabularHeader] -\cs{glslongextraLocationSymDescNameTabularHeader} -\end{definition} -and -\begin{definition}[\DescribeMacro\glslongextraLocationSymDescNameTabularFooter] -\cs{glslongextraLocationSymDescNameTabularFooter} -\end{definition} - -\item{\glostyle{long-desc-sym-name}} This has the description in the -first column, the symbol in the second and the name in the -third. The \env{longtable} header row is given by: -\begin{definition}[\DescribeMacro\glslongextraDescSymNameHeader] -\cs{glslongextraDescSymNameHeader} -\end{definition} -which similarly defined in terms of the commands used for the -\env{tabular} version: -\begin{definition}[\DescribeMacro\glslongextraDescSymNameTabularHeader] -\cs{glslongextraDescSymNameTabularHeader} -\end{definition} -and -\begin{definition}[\DescribeMacro\glslongextraDescSymNameTabularFooter] -\cs{glslongextraDescSymNameTabularFooter} -\end{definition} - -\item{\glostyle{long-loc-desc-sym-name}} This has the location list -in the first column, the description in the -second column, the symbol in the third and the name in the -fourth. The \env{longtable} header row is given by: -\begin{definition}[\DescribeMacro\glslongextraLocationDescSymNameHeader] -\cs{glslongextraLocationDescSymNameHeader} -\end{definition} -which similarly defined in terms of the commands used for the -\env{tabular} version: -\begin{definition}[\DescribeMacro\glslongextraLocationDescSymNameTabularHeader] -\cs{glslongextraLocationDescSymNameTabularHeader} -\end{definition} -and -\begin{definition}[\DescribeMacro\glslongextraLocationDescSymNameTabularFooter] -\cs{glslongextraLocationDescSymNameTabularFooter} -\end{definition} +\section{Examples} +\label{sec:mglsexamples} + +\subsection{Example: Hierarchical} +\label{sec:mglsexhier} + +Bacteria names are represented by the genus (for example, +Clostridium) followed by the species (for example, botulinum). +This example has the genus as a parent of the species. +\begin{codebox} +\cmd{documentclass}\marg{article} +\codepar +\cmd{usepackage}[colorlinks]\marg{hyperref} +\cmd{usepackage}[\optval{stylemods}{bookindex},\optval{style}{\glostyle{bookindex}}]\marg{glossaries-extra} +\codepar +\gls{makeglossaries} +\codepar +\cmd{newcommand}\marg{\cmd{latinname}}[1]\marg{\cmd{emph}\marg{\#1}} +\gls{glssetcategoriesattributes} + \marg{genus,species}\marg{\catattr{textformat},\catattr{glossnamefont}}\marg{latinname} +\codepar +\gls{setabbreviationstyle}\oarg{genus}\marg{\abbrstyle{long-only-short-only-desc}} +\gls{newabbreviation} + \oarg{\gloskeyval{category}{genus},\gloskeyval{description}{}} + \marg{clostridium}\marg{C.}\marg{Clostridium} +\codepar +\gls{newglossaryentry}\marg{botulinum}\marg{\gloskeyval{name}{botulinum},\gloskeyval{category}{species}, + \gloskeyval{description}{},\gloskeyval{parent}{clostridium}} +\gls{newglossaryentry}\marg{perfringens}\marg{\gloskeyval{name}{perfringens}, + \gloskeyval{category}{species},\gloskeyval{description}{},\gloskeyval{parent}{clostridium}} +\gls{newglossaryentry}\marg{tetani}\marg{\gloskeyval{name}{tetani},\gloskeyval{category}{species}, + \gloskeyval{description}{},\gloskeyval{parent}{clostridium}} +\codepar +\gls{multiglossaryentry}\marg{cbot}\marg{clostridium,botulinum} +\gls{multiglossaryentry}\marg{cperf}\marg{clostridium,perfringens} +\gls{multiglossaryentry}\marg{ctet}\marg{clostridium,tetani} +\codepar +\gls{multiglossaryentrysetup}\marg{\mglsoptval{indexothers}{false},\mglsoptval{hyper}{allmain}} +\codepar +\cbeg{document} +First use: \gls{mgls}\marg{cbot}, \gls{mgls}\marg{cperf}, \gls{mgls}\marg{ctet}. +\codepar +Next use: \gls{mgls}\marg{cbot}, \gls{mgls}\marg{cperf}, \gls{mgls}\marg{ctet}. +\gls{printglossaries} +\cend{document} +\end{codebox} +This suppresses the indexing of the non-main elements (in this case, +the genus). However the genus is included in the glossary (without a +\gls{locationlist}) because it's the parent of the species (which are +indexed). +\begin{resultbox} +\createexample*[title={Multi-entries: hierarchical}, + label={ex:multientryhier}, + description={Example document with hierarchical multi-entries}, + arara={pdflatex,makeglossaries,pdflatex,pdfcrop}] +{\cmd{usepackage}[colorlinks]\marg{hyperref}^^J% +\cmd{usepackage}[stylemods=bookindex,style=bookindex]\marg{glossaries-extra}^^J% +\codepar +\gls{makeglossaries}^^J% +\codepar +\cmd{newcommand}\marg{\cmd{latinname}}[1]\marg{\cmd{emph}\marg{\#1}}^^J% +\gls{glssetcategoriesattributes}^^J + \marg{genus,species}\marg{textformat,glossnamefont}\marg{latinname}^^J% +\codepar +\gls{setabbreviationstyle}\oarg{genus}\marg{long-only-short-only-desc}^^J% +\gls{newabbreviation}^^J + \oarg{\gloskeyval{category}{genus},\gloskeyval{description}{}}^^J + \marg{clostridium}\marg{C.}\marg{Clostridium}^^J% +\codepar +\gls{newglossaryentry}\marg{botulinum}\marg{\gloskeyval{name}{botulinum},\gloskeyval{category}{species},^^J + \gloskeyval{description}{},\gloskeyval{parent}{clostridium}}^^J% +\gls{newglossaryentry}\marg{perfringens}\marg{\gloskeyval{name}{perfringens},\gloskeyval{category}{species},^^J + \gloskeyval{description}{},\gloskeyval{parent}{clostridium}}^^J% +\gls{newglossaryentry}\marg{tetani}\marg{\gloskeyval{name}{tetani},\gloskeyval{category}{species},^^J + \gloskeyval{description}{},\gloskeyval{parent}{clostridium}}^^J% +\codepar +\gls{multiglossaryentry}\marg{cbot}\marg{clostridium,botulinum}^^J% +\gls{multiglossaryentry}\marg{cperf}\marg{clostridium,perfringens}^^J% +\gls{multiglossaryentry}\marg{ctet}\marg{clostridium,tetani}^^J% +\codepar +\gls{multiglossaryentrysetup}\marg{indexothers=false,hyper=allmain} +} +{% +First use: +\gls{mgls}\marg{cbot}, \gls{mgls}\marg{cperf}, \gls{mgls}\marg{ctet}.^^J% +\codepar +Next use: +\gls{mgls}\marg{cbot}, \gls{mgls}\marg{cperf}, \gls{mgls}\marg{ctet}.^^J% +\gls{printglossaries} +} +\end{resultbox} -\end{description} +The \mglsoptval{hyper}{allmain} option makes the entire content of each +\gls{mgls} a hyperlink to the main entry in the glossary. -\section{\headingsty{glossary-topic} package} -\label{sec:topic} +\subsection{Example: Suffix} +\label{sec:mglsexsuffix} -As from version 1.40, the \styfmt{glossaries-extra} package comes -with the supplementary package \sty{glossary-topic} that -provides glossary styles designed for hierarchical glossaries -where the top-level entries are topic titles. This package -automatically loads the \sty{multicols} package. If the -\sty{glossary-tree} package is also loaded then commands like -\cs{glssetwidest} can be used on these styles in much the same way -as for the \glostyle{alttree} style. If a widest value isn't set -then these styles behave more like the \glostyle{tree} style. -\begin{description} -\item[\glostyle{topic}] This style is similar to the \glostyle{tree} -style but the indentation doesn't start until the second -sub-item level. The top-level entries have the name displayed -in a larger font with the description following in a new paragraph. -This style doesn't support the \pkgopt{nogroupskip} setting. +This example has a minor modification to the previous one. In this +case the multi-entries are defined with a suffix: +\begin{codebox} +\gls{multiglossaryentry}\oarg{\mglsoptval{firstsuffix}{botulism}}\marg{cbot}\marg{clostridium,botulinum} +\gls{multiglossaryentry}\oarg{\mglsoptval{firstsuffix}{gas gangrene}}\marg{cperf}\marg{clostridium,perfringens} +\gls{multiglossaryentry}\oarg{\mglsoptval{firstsuffix}{tetanus}}\marg{ctet}\marg{clostridium,tetani} +\end{codebox} +The rest of the document is as in \sectionref{sec:mglsexhier}. +\begin{resultbox} +\createexample*[title={Multi-entries: hierarchical with first-use suffix}, + label={ex:multientryhierfirstusesuffix}, + description={Example document with hierarchical multi-entries that +have a first-use suffix}, + arara={pdflatex,makeglossaries,pdflatex,pdfcrop}] +{\cmd{usepackage}[colorlinks]\marg{hyperref}^^J% +\cmd{usepackage}[stylemods=bookindex,style=bookindex]\marg{glossaries-extra}^^J% +\codepar +\gls{makeglossaries}^^J% +\codepar +\cmd{newcommand}\marg{\cmd{latinname}}[1]\marg{\cmd{emph}\marg{\#1}}^^J% +\gls{glssetcategoriesattributes}^^J + \marg{genus,species}\marg{textformat,glossnamefont}\marg{latinname}^^J% +\codepar +\gls{setabbreviationstyle}\oarg{genus}\marg{long-only-short-only-desc}^^J% +\gls{newabbreviation}^^J + \oarg{\gloskeyval{category}{genus},\gloskeyval{description}{}}^^J + \marg{clostridium}\marg{C.}\marg{Clostridium}^^J% +\codepar +\gls{newglossaryentry}\marg{botulinum}\marg{\gloskeyval{name}{botulinum},\gloskeyval{category}{species},^^J + \gloskeyval{description}{},\gloskeyval{parent}{clostridium}}^^J% +\gls{newglossaryentry}\marg{perfringens}\marg{\gloskeyval{name}{perfringens},\gloskeyval{category}{species},^^J + \gloskeyval{description}{},\gloskeyval{parent}{clostridium}}^^J% +\gls{newglossaryentry}\marg{tetani}\marg{\gloskeyval{name}{tetani},\gloskeyval{category}{species},^^J + \gloskeyval{description}{},\gloskeyval{parent}{clostridium}}^^J% +\codepar +\gls{multiglossaryentry}\oarg{firstsuffix=botulism}\marg{cbot}\marg{clostridium,botulinum}^^J% +\gls{multiglossaryentry}\oarg{firstsuffix=gas gangrene}\marg{cperf}\marg{clostridium,perfringens}^^J% +\gls{multiglossaryentry}\oarg{firstsuffix=tetanus}\marg{ctet}\marg{clostridium,tetani}^^J% +\codepar +\gls{multiglossaryentrysetup}\marg{indexothers=false,hyper=allmain} +} +{% +First use: +\gls{mgls}\marg{cbot}, \gls{mgls}\marg{cperf}, \gls{mgls}\marg{ctet}.^^J% +\codepar +Next use: +\gls{mgls}\marg{cbot}, \gls{mgls}\marg{cperf}, \gls{mgls}\marg{ctet}.^^J% +\gls{printglossaries} +} +\end{resultbox} -\item[\glostyle{topicmcols}] This style is like the \glostyle{topic} -style but the sub-entries are placed inside a \env{multicols} -environment. The environment name is supplied in the value of -the command: -\begin{definition}[\DescribeMacro\glstopicColsEnv] -\cs{glstopicColsEnv} -\end{definition} -You can change this to the starred form. For example: -\begin{verbatim} -\renewcommand{\glstopicColsEnv}{multicols*} -\end{verbatim} -The number of columns is given by the command: -\begin{definition}[\DescribeMacro\glstopicCols] -\cs{glstopicCols} -\end{definition} -The default value is 2. -\end{description} -Both styles use the following commands. -\begin{definition}[\DescribeMacro\glstopicParIndent] -\cs{glstopicParIndent} -\end{definition} -This command is a length that's used for the paragraph indentation -in any multi-paragraph description for top-level entries, but not -for the first paragraph (at the start of the description) which -isn't indented. +\subsection{Example: Category Suffix} +\label{sec:mglsexcatsuffix} -\begin{definition}[\DescribeMacro\glstopicSubIndent] -\cs{glstopicSubIndent} -\end{definition} -This command is a length that's used to calculate the hanging -indentation for sub-entries. The level~1 sub-entries don't indent -the name. Level~$n$ sub-entries have the name indented by -$(n-1)\times$\cs{glstopicSubIndent}. The hanging indent depends -on whether or not a widest name has been set for the level. +This is an alternative to the previous example. Instead of storing +the extra information in the \mglsopt{firstsuffix} key, the +information is stored in the \gloskey{user1} key of the last +element (the species). A category suffix is used to look up the +field and append it. +\begin{codebox} +\gls{newglossaryentry}\marg{botulinum}\marg{\gloskeyval{name}{botulinum},\gloskeyval{category}{species}, + \gloskeyval{user1}{botulism}, + \gloskeyval{description}{},\gloskeyval{parent}{clostridium}} +\gls{newglossaryentry}\marg{perfringens}\marg{\gloskeyval{name}{perfringens},\gloskeyval{category}{species}, + \gloskeyval{user1}{gas gangrene}, + \gloskeyval{description}{},\gloskeyval{parent}{clostridium}} +\gls{newglossaryentry}\marg{tetani}\marg{\gloskeyval{name}{tetani},\gloskeyval{category}{species}, + \gloskeyval{user1}{tetanus}, + \gloskeyval{description}{},\gloskeyval{parent}{clostridium}} +\codepar +\gls{mglsdefcategorysuffix}\marg{bacteria}\marg{\% + \gls{mglsisfirstuse} + \marg{\gls{glsxtrifhasfield}\marg{useri}\marg{\gls{mglslastelementlabel}}\marg{ (\gls{glscurrentfieldvalue})}{}}\% + \marg{}\% +} +\codepar +\gls{multiglossaryentry}\oarg{category=bacteria}\marg{cbot}\marg{clostridium,botulinum} +\gls{multiglossaryentry}\oarg{category=bacteria}\marg{cperf}\marg{clostridium,perfringens} +\gls{multiglossaryentry}\oarg{category=bacteria}\marg{ctet}\marg{clostridium,tetani} +\end{codebox} +The result is the same as the previous example. +\begin{resultbox} +\createexample*[title={Multi-entries: hierarchical with category suffix}, + label={ex:multientryhiercatsuffix}, + description={Example document with hierarchical multi-entries that +have a category suffix}, + arara={pdflatex,makeglossaries,pdflatex,pdfcrop}] +{\cmd{usepackage}[colorlinks]\marg{hyperref}^^J% +\cmd{usepackage}[stylemods=bookindex,style=bookindex]\marg{glossaries-extra}^^J% +\codepar +\gls{makeglossaries}^^J% +\codepar +\cmd{newcommand}\marg{\cmd{latinname}}[1]\marg{\cmd{emph}\marg{\#1}}^^J% +\gls{glssetcategoriesattributes}^^J + \marg{genus,species}\marg{textformat,glossnamefont}\marg{latinname}^^J% +\codepar +\gls{setabbreviationstyle}\oarg{genus}\marg{long-only-short-only-desc}^^J% +\gls{newabbreviation}^^J + \oarg{\gloskeyval{category}{genus},\gloskeyval{description}{}}^^J + \marg{clostridium}\marg{C.}\marg{Clostridium}^^J% +\codepar +\gls{newglossaryentry}\marg{botulinum}\marg{\gloskeyval{name}{botulinum},\gloskeyval{category}{species},^^J + \gloskeyval{user1}{botulism},^^J + \gloskeyval{description}{},\gloskeyval{parent}{clostridium}}^^J% +\gls{newglossaryentry}\marg{perfringens}\marg{\gloskeyval{name}{perfringens},\gloskeyval{category}{species},^^J + \gloskeyval{user1}{gas gangrene},^^J + \gloskeyval{description}{},\gloskeyval{parent}{clostridium}}^^J% +\gls{newglossaryentry}\marg{tetani}\marg{\gloskeyval{name}{tetani},\gloskeyval{category}{species},^^J + \gloskeyval{user1}{tetanus},^^J + \gloskeyval{description}{},\gloskeyval{parent}{clostridium}}^^J% +\codepar +\gls{mglsdefcategorysuffix}\marg{bacteria}\marg{\%^^J% + \gls{mglsisfirstuse}^^J + \marg{\gls{glsxtrifhasfield}\marg{useri}\marg{\gls{mglslastelementlabel}}\marg{ (\gls{glscurrentfieldvalue})}{}}\%^^J + \marg{}\%^^J% +} +\codepar +\gls{multiglossaryentry}\oarg{category=bacteria}\marg{cbot}\marg{clostridium,botulinum}^^J% +\gls{multiglossaryentry}\oarg{category=bacteria}\marg{cperf}\marg{clostridium,perfringens}^^J% +\gls{multiglossaryentry}\oarg{category=bacteria}\marg{ctet}\marg{clostridium,tetani}^^J% +\codepar +\gls{multiglossaryentrysetup}\marg{indexothers=false,hyper=allmain} +} +{% +First use: +\gls{mgls}\marg{cbot}, \gls{mgls}\marg{cperf}, \gls{mgls}\marg{ctet}.^^J% +\codepar +Next use: +\gls{mgls}\marg{cbot}, \gls{mgls}\marg{cperf}, \gls{mgls}\marg{ctet}.^^J% +\gls{printglossaries} +} +\end{resultbox} -As from v1.46, there is also a length for additional indentation -used in the second paragraph onwards for child entries with -multi-paragraph descriptions: -\begin{definition}[\DescribeMacro\glstopicSubItemParIndent] -\cs{glstopicSubItemParIndent} -\end{definition} -This is initialised to \ics{parindent} when \sty{glossary-topic} is -loaded. +\subsection{Example: Separators} +\label{sec:mglsexsep} -\begin{definition}[\DescribeMacro\glstopicInit] -\cs{glstopicInit} -\end{definition} -Hook used at the start of the glossary. Does nothing by default. +The first example (\sectionref{sec:mglsexhier}) can be modified so +that the species are also abbreviations. In this case, the +separators are modified to suppress the space (\gls{relax}) if both the genus and +species are abbreviated, or to use a \idx{nbsp} between +the genus short form (shown on subsequent use) and the species long +form (shown on \idx{firstuse}). If the genus is showing the long form +(\idx{firstuse}) then a normal space is used. -Although the styles don't support letter groups by default, if you -have many topics (top-level entries) and you feel that it would help -the reader to divide them up into headed letter groups, you can -redefine: -\begin{definition}[\DescribeMacro\glstopicGroupHeading] -\cs{glstopicGroupHeading}\marg{group label} -\end{definition} -This does nothing by default. If you want to redefine it, you can -fetch the title corresponding to the group label with -\cs{glsxtrgetgrouptitle}. For example: -\begin{verbatim} -\renewcommand*{\glstopicGroupHeading}[1]{% - \glsxtrgetgrouptitle{#1}{\thisgrptitle}% - \section*{\thisgrptitle}% -} -\end{verbatim} -Remember that if you use \gls{bib2gls}, you will need the -\verb|--group| (or \verb|-g|) switch to support this. - -\begin{definition}[\DescribeMacro\glstopicItem] -\cs{glstopicItem}\marg{label}\marg{location list} -\end{definition} -Used to format the name, symbol, description and location list -for the top-level entries. This starts with a paragraph break -followed by: -\begin{definition}[\DescribeMacro\glstopicPreSkip] -\cs{glstopicPreSkip} -\end{definition} -which defaults to \cs{medskip}. There is then a hook: -\begin{definition}[\DescribeMacro\glstopicMarker] -\cs{glstopicMarker}\marg{label} -\end{definition} -which does nothing by default, but may be redefined. For example, -to add a line to the table of contents. -The name and symbol are set in the -form of a title using: -\begin{definition}[\DescribeMacro\glstopicTitle] -\cs{glstopicTitle}\marg{label} -\end{definition} -This uses \cs{Glossentryname} which converts the first letter to -upper case. If there's a symbol, this is added in parentheses. -Both name and symbol (if present) are encapsulated by -\begin{definition}[\DescribeMacro\glstopicTitleFont] -\cs{glstopicTitleFont}\marg{text} -\end{definition} -This uses a bold, large font by default. +Note that the separator attributes apply to the category of the +element before the separator (not to the multi-entry category). +\begin{codebox} +\gls{glssetcategoryattribute}\marg{genus}\marg{\catattr{combinedfirstsepfirst}}\marg{\cmd{space}} +\gls{glssetcategoryattribute}\marg{genus}\marg{\catattr{combinedfirstsep}}\marg{\cmd{space}} +\gls{glssetcategoryattribute}\marg{genus}\marg{\catattr{combinedsepfirst}}\marg{\glssymbol{idx.nbsp}} +\gls{glssetcategoryattribute}\marg{genus}\marg{\catattr{combinedsep}}\marg{\gls{relax}} +\codepar +\gls{setabbreviationstyle}\oarg{species}\marg{\abbrstyle{long-only-short-only-desc}} +\codepar +\gls{newabbreviation}\oarg{\gloskeyval{category}{species}, + \gloskeyval{description}{},\gloskeyval{parent}{clostridium}}\marg{botulinum}\marg{bot.}\marg{botulinum} +\gls{newabbreviation}\oarg{\gloskeyval{category}{species}, + \gloskeyval{description}{},\gloskeyval{parent}{clostridium}}\marg{perfringens}\marg{per.}\marg{perfringens} +\gls{newabbreviation}\oarg{\gloskeyval{category}{species}, + \gloskeyval{description}{},\gloskeyval{parent}{clostridium}}\marg{tetani}\marg{tet.}\marg{tetani} +\end{codebox} +This will cause a double dot at the end of the second sentence, +which can be suppressed using the \catattr{discardperiod} and +\catattr{retainfirstuseperiod} attributes. +\begin{codebox} +\gls{glssetcategoriesattributes}\marg{species}\marg{\catattr{discardperiod},\catattr{retainfirstuseperiod}}\marg{true} +\end{codebox} +This works because the final element's \idx{postlinkhook} is transferred +to the multi-entry post-link hook, which can detect the sentence +terminating period. If the post-link hook settings are changed, for example, to +\code{\mglsoptval{postlinks}{all},\mglsoptval{mpostlink}{false}} then the feature +won't work as the final element's \idx{postlinkhook} can't detect the +period (because \gls{gls} is embedded too deeply inside the internal +workings of \gls{mgls}). +\begin{resultbox} +\createexample*[title={Multi-entries: separators}, + label={ex:multientrysep}, + description={Example document demonstrating multi-entry separators}, + arara={pdflatex,makeglossaries,pdflatex,pdfcrop}] +{\cmd{usepackage}[colorlinks]\marg{hyperref}^^J% +\cmd{usepackage}[stylemods=bookindex,style=bookindex]\marg{glossaries-extra} +\codepar +\gls{makeglossaries} +\codepar +\cmd{newcommand}\marg{\cmd{latinname}}[1]\marg{\cmd{emph}\marg{\#1}}^^J% +\gls{glssetcategoriesattributes}^^J + \marg{genus,species}\marg{textformat,glossnamefont}\marg{latinname}^^J% +\codepar +\% multi-entry category attributes:^^J% +\gls{glssetcategoryattribute}\marg{genus}\marg{combinedfirstsepfirst}\marg{\cmd{space}}^^J% +\gls{glssetcategoryattribute}\marg{genus}\marg{combinedfirstsep}\marg{\cmd{space}}^^J% +\gls{glssetcategoryattribute}\marg{genus}\marg{combinedsepfirst}\marg{\string~}^^J% +\gls{glssetcategoryattribute}\marg{genus}\marg{combinedsep}\marg{\gls{relax}}^^J% +\codepar +\gls{setabbreviationstyle}\oarg{genus}\marg{long-only-short-only-desc}^^J% +\gls{newabbreviation}^^J + \oarg{\gloskeyval{category}{genus},\gloskeyval{description}{}}^^J + \marg{clostridium}\marg{C.}\marg{Clostridium} +\codepar +\gls{setabbreviationstyle}\oarg{species}\marg{long-only-short-only-desc}^^J% +\codepar +\gls{newabbreviation}\oarg{\gloskeyval{category}{species},^^J + \gloskeyval{description}{},\gloskeyval{parent}{clostridium}}\marg{botulinum}\marg{bot.}\marg{botulinum}^^J% +\gls{newabbreviation}\oarg{\gloskeyval{category}{species},^^J + \gloskeyval{description}{},\gloskeyval{parent}{clostridium}}\marg{perfringens}\marg{per.}\marg{perfringens}^^J% +\gls{newabbreviation}\oarg{\gloskeyval{category}{species},^^J + \gloskeyval{description}{},\gloskeyval{parent}{clostridium}}\marg{tetani}\marg{tet.}\marg{tetani}^^J% +\gls{glssetcategoriesattributes}\marg{species}\marg{discardperiod,retainfirstuseperiod}\marg{true}^^J% +\codepar +\gls{multiglossaryentry}\marg{cbot}\marg{clostridium,botulinum}^^J% +\gls{multiglossaryentry}\marg{cperf}\marg{clostridium,perfringens}^^J% +\gls{multiglossaryentry}\marg{ctet}\marg{clostridium,tetani}^^J% +\codepar +\gls{multiglossaryentrysetup}\marg{indexothers=false,hyper=allmain} +} +{% +First use: +\gls{mgls}\marg{cbot}, \gls{mgls}\marg{cperf}, \gls{mgls}\marg{ctet}.^^J% +\codepar +Next use: +\gls{mgls}\marg{cbot}, \gls{mgls}\marg{cperf}, \gls{mgls}\marg{ctet}.^^J% +\gls{printglossaries} +} +\end{resultbox} -If the entry has the description key set (tested with -\cs{ifglshasdesc}) then a paragraph break is inserted followed by: -\begin{definition}[\DescribeMacro\glstopicMidSkip] -\cs{glstopicMidSkip} -\end{definition} -which defaults to \cs{smallskip}. This is followed by the -description which is formatted according to: -\begin{definition}[\DescribeMacro\glstopicDesc] -\cs{glstopicDesc}\marg{label} -\end{definition} -This just does \cs{Glossentrydesc}\marg{label} followed -by the post-description hook. - -A paragraph break followed by: -\begin{definition}[\DescribeMacro\glstopicPostSkip] -\cs{glstopicPostSkip} -\end{definition} -comes next regardless of whether or not the description was -displayed. This defaults to \cs{smallskip}. This is then followed -by: -\begin{definition}[\DescribeMacro\glstopicLoc] -\cs{glstopicLoc}\marg{label}\marg{location list} -\end{definition} -which may be used to display the location list, but does nothing by -default. +\subsection{Example: Skipping Elements (Fragment Element)} +\label{sec:exskipfirstsuffix} -The sub-entries first set up the paragraph and hanging indentations -using: -\begin{definition}[\DescribeMacro\glstopicAssignSubIndent] -\cs{glstopicAssignSubIndent}\marg{level} -\end{definition} -This uses: -\begin{definition}[\DescribeMacro\glstopicAssignWidest] -\cs{glstopicAssignWidest}\marg{level} -\end{definition} -to determine if a widest name has been set for the given level. +This example is an alternative way of dealing with nested links +(see \sectionref{sec:nested}). +\begin{codebox} +\cmd{documentclass}\marg{article} +\codepar +\cmd{usepackage}[colorlinks]\marg{hyperref} +\cmd{usepackage}[\opt{stylemods},\optval{style}{\glostyle{long}}]\marg{glossaries-extra} +\codepar +\gls{makeglossaries} +\codepar +\gls{setabbreviationstyle}\marg{\abbrstyle{long-short-sc}} +\gls{newabbreviation}\marg{ssi}\marg{ssi}\marg{server-side includes} +\gls{newabbreviation}\marg{html}\marg{html}\marg{hypertext markup language} +\codepar +\gls{setabbreviationstyle}\oarg{combinedabbrv}\marg{\abbrstyle{long-only-short-sc-only}} +\gls{newabbreviation} + \oarg{\gloskeyval{category}{combinedabbrv}, + \gloskeyval{description}{\gls{glsxtrshort}\marg{ssi} enabled \gls{glsxtrshort}\marg{html}}} + \marg{shtml-frag}\marg{shtml}\marg{enabled} +\codepar +\gls{glssetcategoryattribute}\marg{combinedabbrv}\marg{multioptions} + \marg{\mglsoptval{usedskipothers},\mglsoptval{firstsuffix}{\gls{glsxtrshort}\marg{\gls{mglslastmainlabel}}}} +\codepar +\gls{multiglossaryentry} + \oarg{\mglsoptval{category}{combinedabbrv}} + \marg{shtml}\oarg{shtml-frag}\marg{ssi,shtml-frag,html} +\codepar +\cbeg{document} +Individual elements first use: \gls{gls}\marg{ssi} and \gls{gls}{html}. +\codepar +Individual elements next use: \gls{gls}\marg{ssi} and \gls{gls}\marg{html}. +\codepar +Multi-entry first use: \gls{mgls}\marg{shtml}. +\codepar +Multi-entry next use: \gls{mgls}\marg{shtml}. +\codepar +Resetting all\gls{glsresetall}\gls{mglsreset}\marg{shtml}: +\codepar +Multi-entry first use: \gls{mgls}\marg{shtml}. +\codepar +Multi-entry next use: \gls{mgls}\marg{shtml}. +\codepar +Individual elements: \gls{gls}\marg{ssi} and \gls{gls}\marg{html}. +\gls{printglossaries} +\cend{document} +\end{codebox} -The sub-entry has its information displayed using: -\begin{definition}[\DescribeMacro\glstopicSubItem] -\cs{glstopicSubItem}\marg{level}\marg{label}\marg{location} -\end{definition} -This encapsulates the name with: -\begin{definition}[\DescribeMacro\glstopicSubNameFont] -\cs{glstopicSubNameFont}\marg{text} -\end{definition} -By default this just uses \cs{textbf}. This is followed by: -\begin{definition}[\DescribeMacro\glstopicSubItemSep] -\cs{glstopicSubItemSep} -\end{definition} -which defaults to \cs{quad}. The name and separator are -passed in the \meta{text} argument of: -\begin{definition}[\DescribeMacro\glstopicSubItemBox] -\cs{glstopicSubItemBox}\marg{level}\marg{text} -\end{definition} -If a widest name was set for the given level, this will -put \meta{text} inside a box of that width otherwise it just does -\meta{text}. +This uses the \catattr{multioptions} attribute to skip \qt{other} +elements on subsequent use. The problematic abbreviation (SHTML) is +defined as a fragment that simply expands to \qt{enabled} on first +use. Note that the description has to be supplied for the glossary. +The resulting document is shown below. +\begin{resultbox} +\createexample*[title={Multi-entries: skipping elements}, + label={ex:multientryskip}, + description={Example document demonstrating multi-entry sets with +elements skipped}, + arara={pdflatex,makeglossaries,pdflatex,pdfcrop}] +{\cmd{usepackage}[colorlinks]\marg{hyperref} +\cmd{usepackage}[stylemods,style=long]\marg{glossaries-extra} +\codepar +\gls{makeglossaries} +\codepar +\gls{setabbreviationstyle}\marg{long-short-sc} +\gls{newabbreviation}\marg{ssi}\marg{ssi}\marg{server-side includes} +\gls{newabbreviation}\marg{html}\marg{html}\marg{hypertext markup language} +\codepar +\gls{setabbreviationstyle}\oarg{combinedabbrv}\marg{long-only-short-sc-only} +\gls{newabbreviation} + \oarg{\gloskeyval{category}{combinedabbrv}, + \gloskeyval{description}{\gls{glsxtrshort}\marg{ssi} enabled \gls{glsxtrshort}\marg{html}}} + \marg{shtml-frag}\marg{shtml}\marg{enabled} +\codepar +\gls{glssetcategoryattribute}\marg{combinedabbrv}\marg{multioptions}^^J + \marg{usedskipothers,firstsuffix=\marg{\gls{glsxtrshort}\marg{\gls{mglslastmainlabel}}}}^^J% +\codepar +\gls{multiglossaryentry} + \oarg{category=combinedabbrv} + \marg{shtml}\oarg{shtml-frag}\marg{ssi,shtml-frag,html} +} +{Individual elements first use: \gls{gls}\marg{ssi} and \gls{gls}{html}. +\codepar +Individual elements next use: \gls{gls}\marg{ssi} and \gls{gls}\marg{html}. +\codepar +Multi-entry first use: \gls{mgls}\marg{shtml}. +\codepar +Multi-entry next use: \gls{mgls}\marg{shtml}. +\codepar +Resetting all\gls{glsresetall}\gls{mglsreset}\marg{shtml}: +\codepar +Multi-entry first use: \gls{mgls}\marg{shtml}. +\codepar +Multi-entry next use: \gls{mgls}\marg{shtml}. +\codepar +Individual elements: \gls{gls}\marg{ssi} and \gls{gls}\marg{html}. +\gls{printglossaries} +} +\end{resultbox} -This is followed by the symbol in parentheses if set. Then, if the -description is set, the description and post-description hook are -displayed followed by: -\begin{definition}[\DescribeMacro\glstopicSubPreLocSep] -\cs{glstopicSubPreLocSep} -\end{definition} -(This command isn't used if the description isn't set.) +The key difference here from the example using \gls{glsps} at the end +of \sectionref{sec:nested} is that the individual elements hyperlink +to their respective entries in the glossary on first use of \gls{mgls}. -Finally the location list is displayed using: -\begin{definition}[\DescribeMacro\glstopicSubLoc] -\cs{glstopicSubLoc}\marg{label}\marg{location} -\end{definition} -which just does \meta{location} by default. +The problem is that with the \optfmt{colorlinks} package option, +it's not obvious where the hyperlinks start and end. The suffix (\textsc{shtml}) +will hyperlink to the \qt{shtml} entry in the glossary, so the +\qt{enabled} hyperlink is redundant. The simplest fix for this is to +add \mglsoptval{hyper}{notmainfirst} to the option list, which will prevent +\qt{enabled} from being a hyperlink. -\chapter{Abbreviations} -\label{sec:abbreviations} +Another problem occurs where \gls{mgls} is used before the individual elements are +used, which leads to their full expansion with a confusing amount of +parentheses. A simple solution is to use the option +\mglsoptval{mglsopts}{unsetothers}, which will unset the other (not-main) +elements first. This can be localised with \mglsopt{presetlocal} but +\gls{gls} will then unset the \idx{firstuseflag} globally, which +means that the other elements won't show the full form when they are +first used on their on after \gls{mgls}. This can be switched to a +local unset with \mglsoptval{others}{local}. -The new abbreviation system provided by \styfmt{glossaries-extra} -is more flexible than the acronym handling provided by the -base \styfmt{glossaries} package. The \styfmt{glossaries-extra} -package modifies the underlying formatting used by -\cs{gls} (and its variants) so that terms that are recognised as -abbreviations can have their formatting dealt with by the style. You -therefore need to select an abbreviation style that ensures that -\cs{gls} (and its variants) displays the desired output. -See the file -\href{http://mirrors.ctan.org/macros/latex/contrib/glossaries-extra/samples/sample-abbr-styles.pdf}{sample-abbr-styles.pdf} -for samples of all provided abbreviation styles. +The complete set of options are now: +\begin{codebox} +\gls{glssetcategoryattribute}\marg{combinedabbrv}\marg{\catattr{multioptions}} + \marg{\% + \mglsoptval{hyper}{notmainfirst}, + \mglsoptval{mglsopts}{\mglsopt{presetlocal},\mglsopt{unsetothers},\mglsoptval{others}{local}}, + \mglsoptval{usedskipothers}, + \mglsoptval{firstsuffix}\marg{\gls{glsxtrshort}\marg{\gls{mglslastmainlabel}}} + } +\end{codebox} +\begin{resultbox} +\createexample*[title={Multi-entries: skipping elements (unsetting +others)}, + label={ex:multientryskipunsetothers}, + description={Example document demonstrating multi-entry sets with +elements skipped and unset}, + arara={pdflatex,makeglossaries,pdflatex,pdfcrop}] +{\cmd{usepackage}[colorlinks]\marg{hyperref}^^J% +\cmd{usepackage}[stylemods,style=long]\marg{glossaries-extra} +\codepar +\gls{makeglossaries}^^J% +\codepar +\gls{setabbreviationstyle}\marg{long-short-sc}^^J% +\gls{newabbreviation}\marg{ssi}\marg{ssi}\marg{server-side +includes}^^J% +\gls{newabbreviation}\marg{html}\marg{html}\marg{hypertext markup language} +\codepar +\gls{setabbreviationstyle}\oarg{combinedabbrv}\marg{long-only-short-sc-only}^^J% +\gls{newabbreviation}^^J + \oarg{\gloskeyval{category}{combinedabbrv},^^J + \gloskeyval{description}{\gls{glsxtrshort}\marg{ssi} enabled +\gls{glsxtrshort}\marg{html}}}^^J + \marg{shtml-frag}\marg{shtml}\marg{enabled} +\codepar +\gls{glssetcategoryattribute}\marg{combinedabbrv}\marg{\catattr{multioptions}}^^J +\marg{\%^^J + \mglsoptval{hyper}{notmainfirst},^^J + \mglsoptval{mglsopts}{\mglsopt{presetlocal},\mglsopt{unsetothers},\mglsoptval{others}{local}},^^J + \mglsoptval{usedskipothers},^^J + \mglsoptval{firstsuffix}\marg{\gls{glsxtrshort}\marg{\gls{mglslastmainlabel}}}^^J% +}^^J% +\codepar +\gls{multiglossaryentry}^^J + \oarg{category=combinedabbrv}^^J + \marg{shtml}\oarg{shtml-frag}\marg{ssi,shtml-frag,html} +} +{Individual elements first use: \gls{gls}\marg{ssi} and \gls{gls}{html}. +\codepar +Individual elements next use: \gls{gls}\marg{ssi} and \gls{gls}\marg{html}. +\codepar +Multi-entry first use: \gls{mgls}\marg{shtml}. +\codepar +Multi-entry next use: \gls{mgls}\marg{shtml}. +\codepar +Resetting all\gls{glsresetall}\gls{mglsreset}\marg{shtml}: +\codepar +Multi-entry first use: \gls{mgls}\marg{shtml}. +\codepar +Multi-entry next use: \gls{mgls}\marg{shtml}. +\codepar +Individual elements: \gls{gls}\marg{ssi} and +\gls{gls}\marg{html}.^^J% +\gls{printglossaries} +} +\end{resultbox} -\begin{important} -Don't use \ics{glsfirst}, \ics{Glsfirst} or \ics{GLSfirst} with -abbreviations as they aren't flexible enough to handle some -abbreviation styles and unexpected results may occur. (To a lesser -degree, this also applies to \ics{glstext} etc.) Use commands -like \cs{glsfmttext}, \cs{glsfmtshort} or \cs{glsfmtlong} in section headings or -captions instead of \cs{gls}. If you don't want the full form to -show on first use of \cs{gls} use one of the \qt{nolong} or -\qt{noshort} styles. -\end{important} +This method still has two main drawbacks: the description must be +added manually and the long form can't be accessed with +\gls{glsxtrlong}. The next example provides an alternative approach. -This lack of flexibility in \cs{glsfirst} can be demonstrated with -the following document: -\begin{verbatim} -\documentclass{article} +\subsection{Example: Skipping Elements (Prefix and Post-Link Hooks)} +\label{sec:exskippostlink} -\usepackage{glossaries-extra} -\setabbreviationstyle{footnote} -\newabbreviation{ex}{EX}{Example} +This is a modified version of the previous example. In this case, +the main element isn't a fragment and also happens to have the same +label as the multi-entry set. (\code{\gls{mgls}\marg{shtml}} references the +multi-entry label and \code{\gls{gls}\marg{shtml}} references the individual +entry.) -\begin{document} -Compare \gls{ex}['s] with \glsfirst{ex}['s]. -\end{document} -\end{verbatim} -The \gls{firstuse} \cs{gls} has the footnote marker after the -inserted material \qt{EX's\textsuperscript{1}} but \cs{glsfirst} has -it before the inserted material \qt{EX\textsuperscript{1}'s} which -is inappropriate. Note that if the style is changed to -\abbrstyle{postfootnote}, the footnote marker appears after the -inserted material as \ics{footnote} is in the post-link hook. - -There are some instances where \cs{glstext} can be useful. It's used -internally by \ics{glsfmttext}, which in turn is used by -\ics{glsseelistformat} if the entry has a short form. If -\cs{glsfmtshort} is used, this enforces the short form, but if -\cs{glsfmttext} is used, then the long form will be used for the -\qt{noshort} styles, which is more appropriate. In this particular -situation, there's no need to worry about inserted material as the -final optional argument isn't supported by \cs{glsfmttext}. - -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. +In this case, the nested parts are marked up with custom commands: +\begin{codebox} +\cmd{newrobustcmd}\marg{\cmd{combinedpre}}[1]\marg{\gls{glsps}\marg{\#1}} +\cmd{newrobustcmd}\marg{\cmd{combinedpost}}[1]\marg{\gls{glsps}\marg{\#1}} +\codepar +\gls{newabbreviation}\marg{shtml}\marg{shtml} +\marg{\marg{}\cmd{combinedpre}\marg{ssi} enabled \cmd{combinedpost}\marg{html}} +\end{codebox} -See \sectionref{sec:nested} regarding the pitfalls of using -commands like \ics{gls} or \ics{glsxtrshort} within -\meta{short} or \meta{long}. +This means that it's no longer necessary to manually insert the +description and the long form can be accessed as usual with +\code{\gls{glsxtrshort}\marg{shtml}}. Note that it is necessary to define +the custom commands robustly otherwise they will need to be +protected against premature expansion: +\begin{codebox} +\cmd{newcommand}\marg{\cmd{combinedpre}}[1]\marg{\gls{glsps}\marg{\#1}} +\cmd{newcommand}\marg{\cmd{combinedpost}}[1]\marg{\gls{glsps}\marg{\#1}} +\codepar +\gls{newabbreviation}\marg{shtml}\marg{shtml} +\marg{\marg{}\gls{protect}\cmd{combinedpre}\marg{ssi} enabled \gls{protect}\cmd{combinedpost}\marg{html}} +\end{codebox} +In both cases, an initial empty group is added to guard +against any \idx{sentencecase} commands, such as \gls{Glsxtrlong}. -\begin{important} -Make sure that you set the category attributes before defining new -abbreviations or they may not be correctly applied. -\end{important} +The abbreviations all use the \abbrstyle{long-postshort-sc-user} +style, which places the short form in the post-link hook on +\idx{firstuse}. The \gls{gls} \idx{postlinkhook} for the main element +can be transferred to the \gls{mgls} post-link using: +\begin{codebox} +\mglsoptval{mpostlinkelement}{main} +\end{codebox} +All elements have their individual post-link hooks suppressed by default. +As in the previous example, the other elements can be skipped on +subsequent use: +\begin{codebox} +\mglsopt{usedskipothers} +\end{codebox} -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 way the abbreviations are displayed by commands like \cs{gls} -varies according to the abbreviation style. The styles are set -according to the entry's category so, unlike the base -\styfmt{glossaries} package, you can have different abbreviation -styles within the same glossary. - -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}. - -You can apply the formatting command used for the short form -to some arbitrary text using -\begin{definition}[\DescribeMacro\glsuseabbrvfont] -\cs{glsuseabbrvfont}\marg{text}\marg{category} -\end{definition} -where \meta{category} is the category label that identifies -the abbreviation style. Similarly for the formatting command -use by the long form: -\begin{definition}[\DescribeMacro\glsuselongfont] -\cs{glsuselongfont}\marg{text}\marg{category} -\end{definition} - -You can't use the acronym commands provided by the base package with -the new abbreviations provided by the \styfmt{glossaries-extra} -package. The style commands that replace \cs{setacronymstyle}, -\cs{acrshort} etc are described in \sectionref{sec:abbrstyle}. -The \pkgopt{acronymlists} package option and associated commands -aren't supported. The \ics{forallacronyms} command, which iterates -over all acronym lists, should be replaced with: -\begin{definition}[\DescribeMacro\forallabbreviationlists] -\cs{forallabbreviationlists}\marg{cs}\marg{body} -\end{definition} +Within \gls{mgls}, the nested content needs to be suppressed, which +can be done by redefining the custom commands. This can be done in +the multi-entry prefix. Since the entire content of \gls{mgls} (except for the +final multi-entry post-link hook) occurs inside a group, this +redefinition will be localised. -\section{Tagging Initials} -\label{sec:tagging} +The complete document is as follows: +\begin{codebox} +\cmd{documentclass}\marg{article} +\codepar +\cmd{usepackage}[colorlinks]\marg{hyperref} +\cmd{usepackage}[\opt{stylemods},\optval{style}{\glostyle{long}}]\marg{glossaries-extra} +\codepar +\gls{makeglossaries} +\codepar +\gls{setabbreviationstyle}\marg{\abbrstyle{long-postshort-sc-user}} +\codepar +\gls{newabbreviation}\marg{ssi}\marg{ssi}\marg{server-side includes} +\gls{newabbreviation}\marg{html}\marg{html}\marg{hypertext markup language} +\codepar +\cmd{newrobustcmd}\marg{\cmd{combinedpre}}[1]\marg{\gls{glsps}\marg{\#1}} +\cmd{newrobustcmd}\marg{\cmd{combinedpost}}[1]\marg{\gls{glsps}\marg{\#1}} +\codepar +\cmd{newabbreviation}\marg{shtml}\marg{shtml} +\marg{\marg{}\cmd{combinedpre}\marg{ssi} enabled \cmd{combinedpost}\marg{html}} +\codepar +\gls{glssetcategoryattribute}\marg{combinedabbrv}\marg{\catattr{multioptions}} + \marg{\% + \mglsoptval{mpostlinkelement}{main}, + \mglsopt{usedskipothers} + } +\codepar +\gls{multiglossaryentry} + \oarg{\mglsoptval{category}{combinedabbrv}} + \marg{shtml}\oarg{shtml}\marg{ssi,shtml,html} +\codepar +\gls{mglsdefcategoryprefix}\marg{combinedabbrv}\marg{\% + \cmd{renewcommand}\marg{\cmd{combinedpre}}[1]\marg{\cmd{ignorespaces}}\% + \cmd{renewcommand}\marg{\cmd{combinedpost}}[1]\marg{\gls{unskip}}\% +} +\codepar +\cbeg{document} +Individual elements first use: \gls{gls}\marg{ssi} and \gls{gls}\marg{html}. +\codepar +Individual elements next use: \gls{gls}\marg{ssi} and \gls{gls}\marg{html}. +\codepar +Multi-entry first use: \gls{mgls}\marg{shtml}. +\codepar +Multi-entry next use: \gls{mgls}\marg{shtml}. +\codepar +Individual entry first use: \gls{gls}\marg{shtml}. +\codepar +Resetting all\gls{glsresetall}\gls{mglsresetall}: +\codepar +Multi-entry first use: \gls{mgls}\marg{shtml}. +\codepar +Multi-entry next use: \gls{mgls}\marg{shtml}. +\codepar +Individual elements: \gls{gls}\marg{ssi} and \gls{gls}\marg{html}. +\codepar +Resetting all\gls{glsresetall}\gls{mglsresetall}: +\codepar +Individual entry first use: \gls{gls}\marg{shtml}. +\codepar +Multi-entry first use: \gls{mgls}\marg{shtml}. (Wrong!) +\codepar +\gls{printglossaries} +\cend{document} +\end{codebox} +This now produces: +\begin{resultbox} +\createexample*[title={Multi-entries: skipping elements (prefix and +post-link hooks)}, + label={ex:multientryskipprefixpostlink}, + description={Example document demonstrating multi-entry sets with +elements skipped and prefix and post-link hooks}, + arara={pdflatex,makeglossaries,pdflatex,pdfcrop}] +{\cmd{usepackage}[colorlinks]\marg{hyperref}^^J% +\cmd{usepackage}[stylemods,style=long]\marg{glossaries-extra}^^J% +\codepar +\gls{makeglossaries}^^J% +\codepar +\gls{setabbreviationstyle}\marg{long-postshort-sc-user}^^J% +\codepar +\gls{newabbreviation}\marg{ssi}\marg{ssi}\marg{server-side +includes}^^J% +\gls{newabbreviation}\marg{html}\marg{html}\marg{hypertext markup +language}^^J% +\codepar +\cmd{newrobustcmd}\marg{\cmd{combinedpre}}[1]\marg{\gls{glsps}\marg{\#1}}^^J% +\cmd{newrobustcmd}\marg{\cmd{combinedpost}}[1]\marg{\gls{glsps}\marg{\#1}}^^J% +\codepar +\cmd{newabbreviation}\marg{shtml}\marg{shtml}^^J% +\marg{\marg{}\cmd{combinedpre}\marg{ssi} enabled +\cmd{combinedpost}\marg{html}}^^J% +\codepar +\gls{glssetcategoryattribute}\marg{combinedabbrv}\marg{multioptions}^^J + \marg{\%^^J + mpostlinkelement=main,^^J + usedskipothers^^J + }^^J% +\codepar +\gls{multiglossaryentry}^^J + \oarg{category=combinedabbrv}^^J + \marg{shtml}\oarg{shtml}\marg{ssi,shtml,html}^^J% +\codepar +\gls{mglsdefcategoryprefix}\marg{combinedabbrv}\marg{\%^^J + \cmd{renewcommand}\marg{\cmd{combinedpre}}[1]\marg{\cmd{ignorespaces}}\%^^J + \cmd{renewcommand}\marg{\cmd{combinedpost}}[1]\marg{\gls{unskip}}\%^^J% +} +} +{% +Individual elements first use: \gls{gls}\marg{ssi} and \gls{gls}\marg{html}.^^J% +\codepar +Individual elements next use: \gls{gls}\marg{ssi} and +\gls{gls}\marg{html}.^^J% +\codepar +Multi-entry first use: \gls{mgls}\marg{shtml}.^^J% +\codepar +Multi-entry next use: \gls{mgls}\marg{shtml}.^^J% +\codepar +Individual entry first use: \gls{gls}\marg{shtml}.^^J% +\codepar +Resetting all\gls{glsresetall}\gls{mglsresetall}:^^J% +\codepar +Multi-entry first use: \gls{mgls}\marg{shtml}.^^J% +\codepar +Multi-entry next use: \gls{mgls}\marg{shtml}.^^J% +\codepar +Individual elements: \gls{gls}\marg{ssi} and +\gls{gls}\marg{html}.^^J% +\codepar +Resetting all\gls{glsresetall}\gls{mglsresetall}:^^J% +\codepar +Individual entry first use: \gls{gls}\marg{shtml}.^^J% +\codepar +Multi-entry first use: \gls{mgls}\marg{shtml}. (Wrong!)^^J% +\codepar +\gls{printglossaries} +} +\end{resultbox} +Note the last two paragraphs, which highlights what happens if +\code{\gls{gls}\marg{shtml}} is used before \code{\gls{mgls}\marg{shtml}} when neither +of the other elements (\code{ssi} and \code{html}) have been +used. The final instance of \gls{mgls} has produced the wrong result. +This is because it's the first use of the multi-entry \code{shtml} but +not the first use of the individual entry \code{shtml}. -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. +One way around this is to modify the prefix to ensure that the main +element's \idx{firstuseflag} matches the multi-entry's first use +flag: +\begin{codebox} +\gls{mglsdefcategoryprefix}\marg{combinedabbrv}\marg{\% + \cmd{renewcommand}\marg{\cmd{combinedpre}}[1]\marg{\cmd{ignorespaces}}\% + \cmd{renewcommand}\marg{\cmd{combinedpost}}[1]\marg{\gls{unskip}}\% + \gls{mglsisfirstuse} + \marg{\gls{glslocalreset}\marg{\gls{mglscurrentmainlabel}}}\% + \marg{\gls{glslocalunset}\marg{\gls{mglscurrentmainlabel}}}\% +} +\end{codebox} -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 \opteqvalref{showtargets}{annoteleft} option can be used to mark up +the links with the targets. For example, the first instance of +\code{\gls{mgls}\marg{shtml}} will show as: +\begin{resultbox} +\newcommand{\markup}[2]{% +\glsshowtargetfonttext{[#1]}% +\glsxtrshowtargetsymbolleft#2\glsxtrshowtargetsymbolright}% +Multi-entry first use: \markup{glo:ssi}{\textsc{ssi}} +\markup{glo:shtml}{enabled} +\markup{glo:html}{\textsc{html}} (\textsc{shtml}). +\end{resultbox} +Each entry has an individual hyperlink to its own glossary item, +which may be confusing. This can be made clearer by suppressing the +main element link on first use with: +\begin{codebox} +\mglsoptval{hyper}{notmainfirst} +\end{codebox} +(as in the previous example), and adjusting the abbreviation style +so that the parenthetical content in the post-link hook has a +hyperlink: +\begin{codebox} +\cmd{renewcommand}*\marg{\gls{glsxtruserparen}}[2]\marg{\% + \gls{glsxtrfullsep}\marg{\#2}\% + \gls{glsxtrparen} + \marg{\gls{glshyperlink}\oarg{\#1}\marg{\#2}\% + \gls{ifglshasfield}\marg{\gls{glsxtruserfield}}\marg{\#2}\marg{, \gls{glscurrentfieldvalue}}\marg{}\% + }\% +} +\end{codebox} -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 remaining problem is how to deal with the possibility that +\code{\gls{mgls}\marg{shtml}} may come before the \idx{firstuse} of the other +elements. For example: +\begin{codebox} +Multi-entry first use: \gls{mgls}\marg{shtml}. +\codepar +Individual elements: \gls{gls}{ssi} and \gls{gls}\marg{html}. +\end{codebox} +This leads to: +\begin{resultbox} +Multi-entry first use: server-side includes enabled hypertext markup +language (\textsc{shtml}). -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. +Individual elements: \textsc{ssi} and \textsc{html}. +\end{resultbox} -The accompanying sample file \nolinkurl{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} +This means that the abbreviations \textsc{ssi} and \textsc{html} +aren't explained in the document text. One way around this is to +only locally unset the other element \idxpl{firstuseflag}: +\begin{codebox} +\gls{glssetcategoryattribute}\marg{combinedabbrv}\marg{\catattr{multioptions}} + \marg{\% + \mglsoptval{hyper}{notmainfirst}, + \mglsoptval{mpostlinkelement}{main}, + \mglsoptval{usedskipothers}, + \mglsoptval{mglsopts}{\mglsoptval{others}{local}} + } +\end{codebox} +With the above setting, the following: +\begin{codebox} +\gls{glsresetall}\gls{mglsresetall} +\codepar +Multi-entry first use: \gls{mgls}\marg{shtml}. +\codepar +Multi-entry next use: \gls{mgls}\marg{shtml}. +\codepar +Individual elements: \gls{gls}\marg{ssi} and \gls{gls}\marg{html}. +\end{codebox} +will now produce: +\begin{resultbox} +Multi-entry first use: server-side includes enabled hypertext markup +language (\textsc{shtml}). -\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. +Multi-entry next use: \textsc{shtml}. -\section{Abbreviation Styles} -\label{sec:abbrstyle} +Individual elements: server-side includes (\textsc{ssi}) and +hypertext markup language (\textsc{html}). +\end{resultbox} -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}. +\section{Main and Other Elements} +\label{sec:mglsmain} -\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} +The list of labels provided in the final argument of +\gls{multiglossaryentry} consists of a main element and all the other +elements. If the main element isn't identified in the optional +argument, it's assumed to be the final element in the list. -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}.) +The main element allows you to determine which target to use if you +want the entire content of \gls{mgls} to be a single hyperlink. You +can also use the settings described in \sectionref{sec:multiglsoptions} +to only index the main element. -\begin{important} -In general, it's best not to use commands like \ics{glsfirst} -for abbreviations, especially if you use the \meta{insert} -optional argument. Use either \cs{gls} (possibly with a reset) -or \cs{glsxtrfull}. -\end{important} +You can change the main element using: +\gls{mglsSetMain} +The new main label provided in the second argument must be in the +list corresponding to \meta{multi-label}. This change is locally +applied to the current scope. Note that if you are using +\app{bib2gls}, this change in the document can't be detected. -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. +The main element can also be used to identify which element should +be displayed in the plural with \gls{mglsmainpl}. For example: +\begin{codebox} +\gls{newglossaryentry}\marg{great}\marg{\gloskeyval{name}{great},\gloskeyval{description}{}} +\gls{newglossaryentry}\marg{little}\marg{\gloskeyval{name}{little},\gloskeyval{description}{}} +\gls{newglossaryentry}\marg{grebe}\marg{\gloskeyval{name}{grebe},\gloskeyval{description}{}} +\codepar +\gls{multiglossaryentry}\marg{greatgrebe}\marg{great,grebe} +\gls{multiglossaryentry}\marg{littlegrebe}\marg{little,grebe} +\end{codebox} +In the above, two multi-entries are defined: \code{greatgrebe} and +\code{littlegrebe}. In both cases the main element is +\code{grebe} (the last element). Using \gls{mglspl} will show the +plural for all elements, but using \gls{mglsmainpl} will only use the +plural for the main element (grebe). For example: +\begin{codebox} +Plural all: \gls{mglspl}\marg{greatgrebe}, \gls{mglspl}\marg{littlegrebe}. +Plural main: \gls{mglsmainpl}\marg{greatgrebe}, \gls{mglsmainpl}\marg{littlegrebe}. +\end{codebox} +produces: +\begin{resultbox} +Plural all: greats grebes, littles grebes. +Plural main: great grebes, little grebes. +\end{resultbox} -\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} +\section{Prefixes and Suffixes} +\label{sec:mglsfixes} -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} +A multi-entry may have associated prefixes and suffixes. These are +scoped and are placed outside of the hyperlinks and encapsulating +commands. They are not affected by case-changing commands, such as \gls{Mgls}. +If you want a prefix to obey case-changing, use the \gls{mpgls}-like +commands instead (\sectionref{sec:mpgls}). -\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} +The prefix is inserted with: +\cmddef{mglsprefix} +The default definition is: +\begin{compactcodebox} +\cmd{newcommand}*\marg{\gls{mglsprefix}}\marg{\% + \gls{ifdefempty}\gls{mglscurrentcategory} + \marg{\gls{mglscurrentprefix}}\% + \marg{\% + \gls{mglshascategoryprefix}\marg{\gls{mglscurrentcategory}}\% + \marg{\gls{mglsusecategoryprefix}\marg{\gls{mglscurrentcategory}}}\% + \marg{\gls{mglscurrentprefix}}\% + }\% +} +\end{compactcodebox} +This will insert the current prefix unless there is prefix command +associated with the current category. -\section{Shortcut Commands} -\label{sec:abbrshortcuts} +The suffix is inserted with: +\cmddef{mglssuffix} +This command is defined as follows: +\begin{compactcodebox} +\cmd{newcommand}*\marg{\gls{mglssuffix}}\marg{\% + \gls{ifdefempty}\gls{mglscurrentcategory} + \marg{\gls{ifdefempty}{\gls{mglscurrentsuffix}}\marg{}\marg{\cmd{space}(\gls{mglscurrentsuffix})}}\% + \marg{\% + \gls{mglshascategorysuffix}\marg{\gls{mglscurrentcategory}}\% + \marg{\gls{mglsusecategorysuffix}\marg{\gls{mglscurrentcategory}}}\% + \marg{\gls{ifdefempty}\marg{\gls{mglscurrentsuffix}}\marg{}\marg{\cmd{space}(\gls{mglscurrentsuffix})}}\% + }\% +} +\end{compactcodebox} +If there is a suffix associated with the current category, that will +be used, otherwise if the current suffix isn't empty this +inserts a space followed by the current suffix in parentheses. +You can access the label of the last (non-skipped) element with +\gls{mglslastelementlabel}. -The abbreviation shortcut commands can be enabled using -the \pkgopt[abbreviations]{shortcuts} package option -(or \pkgopt[abbr]{shortcuts}) or \pkgopt[ac]{shortcuts}. -(You can use both settings at the same time.) -The provided shortcut commands listed in -\tableref{tab:abbrshortcuts}. +Note that in both cases the category corresponds to the multi-entry +category (see \sectionref{sec:multiglscategory}). -\begin{table}[htbp] -\caption{Abbreviation Shortcut Commands} -\label{tab:abbrshortcuts} -\centering -\begin{tabular}{lll} -\bfseries Shortcut & -\bfseries Shortcut & -\bfseries Equivalent Command\\ -\bfseries (\pkgopt[abbreviations]{shortcuts}) & -\bfseries (\pkgopt[ac]{shortcuts})\\ -\ics{ab} & \ics{ac} & \ics{cgls}\\ -\ics{abp} & \ics{acp} & \ics{cglspl}\\ -\ics{as} & \ics{acs} & \ics{glsxtrshort}\\ -\ics{asp} & \ics{acsp} & \ics{glsxtrshortpl}\\ -\ics{al} & \ics{acl} & \ics{glsxtrlong}\\ -\ics{alp} & \ics{aclp} & \ics{glsxtrlongpl}\\ -\ics{af} & \ics{acf} & \ics{glsxtrfull}\\ -\ics{afp} & \ics{acfp} & \ics{glsxtrfullpl}\\ -\ics{Ab} & \ics{Ac} & \ics{cgls}\\ -\ics{Abp} & \ics{Acp} & \ics{cglspl}\\ -\ics{As} & \ics{Acs} & \ics{Glsxtrshort}\\ -\ics{Asp} & \ics{Acsp} & \ics{Glsxtrshortpl}\\ -\ics{Al} & \ics{Acl} & \ics{Glsxtrlong}\\ -\ics{Alp} & \ics{Aclp} & \ics{Glsxtrlongpl}\\ -\ics{Af} & \ics{Acf} & \ics{Glsxtrfull}\\ -\ics{Afp} & \ics{Acfp} & \ics{Glsxtrfullpl}\\ -\ics{AB} & \ics{AC} & \ics{cGLS}\\ -\ics{ABP} & \ics{ACP} & \ics{cGLSpl}\\ -\ics{AS} & \ics{ACS} & \ics{GLSxtrshort}\\ -\ics{ASP} & \ics{ACSP} & \ics{GLSxtrshortpl}\\ -\ics{AL} & \ics{ACL} & \ics{GLSxtrlong}\\ -\ics{ALP} & \ics{ACLP} & \ics{GLSxtrlongpl}\\ -\ics{AF} & \ics{ACF} & \ics{GLSxtrfull}\\ -\ics{AFP} & \ics{ACFP} & \ics{GLSxtrfullpl}\\ -\ics{newabbr} & \ics{newabbr} & \ics{newabbreviation} -\end{tabular} -\end{table} +To define a category-dependent prefix, use: +\cmddef{mglsdefcategoryprefix} +You can reference the current prefix with \gls{mglscurrentprefix} +within \meta{definition}. -\section{Predefined Abbreviation Styles} -\label{sec:predefabbrvstyles} +To define a category-dependent suffix, use: +\cmddef{mglsdefcategorysuffix} +You can reference the current suffix with \gls{mglscurrentsuffix} +within \meta{definition}. -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 default definition of \gls{mglsprefix} tests if there is a +category prefix using: +\cmddef{mglshascategoryprefix} +This does \meta{true} if a prefix has been assigned to the given +category, otherwise it does \meta{false}. -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). +If you need to obtain the prefix for a particular category, you can +use: +\cmddef{mglsusecategoryprefix} +This expands to the prefix, if set, for the given category or to nothing otherwise. + +The default definition of \gls{mglssuffix} tests if there is a +category suffix using: +\cmddef{mglshascategorysuffix} +This does \meta{true} if a suffix has been assigned to the given +category, otherwise it does \meta{false}. -The sample file \nolinkurl{sample-abbr-styles.tex} demonstrates all -predefined styles described here. +If you need to obtain the suffix for a particular category, you can +use: +\cmddef{mglsusecategorysuffix} +This expands to the suffix, if set, for the given category or to nothing otherwise. + +The current prefix \gls{mglscurrentprefix} and \gls{mglscurrentsuffix} +are obtained as follows: +\begin{itemize} +\item if this is the first use of the multi-entry +(\sectionref{sec:mglsfirstuse}) then the \meta{prefix} is set to the +value of the \mglsopt{firstprefix} option and the \meta{suffix} is +set to the value of the \mglsopt{firstsuffix} option; +\item otherwise the \meta{prefix} is set to the +value of the \mglsopt{usedprefix} option and the \meta{suffix} is +set to the value of the \mglsopt{usedsuffix} option. +\end{itemize} \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. +The prefix and suffix (if set) are placed outside of the hyperlink +and text formatting encapsulator. They are not affected by +case-changing commands such as \gls{Mgls} or \gls{MGLS}. \end{important} -Many of the styles have helper commands in the form -\cs{glsxtr...name} and \cs{glsxtr...sort} that are expanded within the -\gloskey{name} and \gloskey{sort} fields when the abbreviation is defined. -These commands may use the helper token registers available within -\cs{newabbreviation}, such as \ics{glsshorttok}. The contents of a -register can be accessed with \ics{the}\meta{register}. It's essential that -these expand when the abbreviation is defined so don't hide them behind no-expandable content if you -redefine these helper commands. - -The parenthetical styles, such as \abbrstyle{long-short}, -use -\begin{definition}[\DescribeMacro\glsxtrparen] -\cs{glsxtrparen}\marg{text} -\end{definition} -to set the parenthetical material. This just puts parentheses around -the text: (\meta{text}). - -The basic abbreviation styles, such as \abbrstyle{long-short} -and \abbrstyle{short-long} use -\begin{definition}[\DescribeMacro\glsabbrvdefaultfont] -\cs{glsabbrvdefaultfont}\marg{text} -\end{definition} -for the short form. This just does \meta{text} by default. -(That is, no font change is applied.) On first use, -\begin{definition}[\DescribeMacro\glsfirstabbrvdefaultfont] -\cs{glsfirstabbrvdefaultfont}\marg{text} -\end{definition} -is used instead. By default, this just does -\cs{glsabbrvdefaultfont}. The long form is formatted according to -\begin{definition}[\DescribeMacro\glslongdefaultfont] -\cs{glslongdefaultfont}\marg{text} -\end{definition} -which again just does \meta{text} (no font change). On first use, -\begin{definition}[\DescribeMacro\glsfirstlongdefaultfont] -\cs{glsfirstlongdefaultfont}\marg{text} -\end{definition} -is used instead. This just does \cs{glslongdefaultfont}. -The plural suffix used for the short form is given by -\begin{definition}[\DescribeMacro\glsxtrabbrvpluralsuffix] -\cs{glsxtrabbrvpluralsuffix} -\end{definition} -which defaults to \ics{glspluralsuffix}. - -The small-cap styles, such as \abbrstyle{long-short-sc} -and \abbrstyle{short-sc-long}, use -\begin{definition}[\DescribeMacro\glsabbrvscfont] -\cs{glsabbrvscfont}\marg{text} -\end{definition} -which uses \cs{textsc}.\footnote{For compatibility with earlier -versions, \cs{glsabbrvscfont} is defined to \cs{glsxtrscfont}, -which is defined to use \cs{textsc}. Direct use of -\cs{glsxtrscfont} is now deprecated. Likewise for similar commands.} -On first use -\begin{definition}[\DescribeMacro\glsabbrvdefaultfont] -\cs{glsfirstabbrvscfont}\marg{text} -\end{definition} -is used instead. This uses \cs{glsabbrvscfont} by default. -So redefine, \cs{glsabbrvscfont} to change first and subsequent uses or -\cs{glsfirstabbrvscfont} to change just the first use. - -The long form for the small-cap styles uses \cs{glslongdefaultfont} -or \cs{glsfirstlongdefaultfont}, as with the basic style. -The suffix is given by -\begin{definition}[\DescribeMacro\glsxtrscsuffix] -\cs{glsxtrscsuffix} -\end{definition} -This is defined as -\begin{verbatim} -\newcommand*{\glsxtrscsuffix}{\glstextup{\glsxtrabbrvpluralsuffix}} -\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.) - -The small styles, such as \abbrstyle{long-short-sm} -and \abbrstyle{short-sm-long}, use -\begin{definition}[\DescribeMacro\glsabbrvsmfont] -\cs{glsabbrvsmfont}\marg{text} -\end{definition} -which uses \cs{textsmaller}. (This requires the \sty{relsizes} -package, which isn't loaded by \styfmt{glossaries-extra}, so must be -loaded explicitly.) -On first use -\begin{definition}[\DescribeMacro\glsfirstabbrvsmfont] -\cs{glsfirstabbrvsmfont}\marg{text} -\end{definition} -is used instead. This uses \cs{glsabbrvsmfont} by default. - -The long form for the smaller styles uses \cs{glslongdefaultfont} -or \cs{glsfirstlongdefaultfont}, as with the basic style. -The suffix is given by -\begin{definition}[\DescribeMacro\glsxtrsmsuffix] -\cs{glsxtrsmsuffix} -\end{definition} -which defaults to just \cs{glsxtrabbrvpluralsuffix}. - -The \qt{short-em} (emphasize short) styles, such as -\abbrstyle{long-short-em} or \abbrstyle{short-em-long}, use -\begin{definition}[\DescribeMacro\glsabbrvemfont] -\cs{glsabbrvemfont}\marg{text} -\end{definition} -On first use -\begin{definition}[\DescribeMacro\glsfirstabbrvemfont] -\cs{glsfirstabbrvemfont}\marg{text} -\end{definition} -is used instead. This uses \cs{glsabbrvemfont} by default. -The suffix is given by -\begin{definition}[\DescribeMacro\glsxtremsuffix] -\cs{glsxtremsuffix} -\end{definition} -which defaults to just \cs{glsxtrabbrvpluralsuffix}. -The long form is as for the basic style unless the style -is a \qt{long-em} style. - -The \qt{long-em} (emphasize long) styles, such as -\abbrstyle{long-em-short-em} or \abbrstyle{short-em-long-em}, 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}. - -The user styles have similar commands: -\begin{definition}[\DescribeMacro\glsabbrvuserfont] -\cs{glsabbrvuserfont}\marg{text} -\end{definition} -for the short form, -\begin{definition}[\DescribeMacro\glsfirstabbrvuserfont] -\cs{glsfirstabbrvuserfont}\marg{text} -\end{definition} -for the first use short form, -\begin{definition}[\DescribeMacro\glslonguserfont] -\cs{glslonguserfont}\marg{text} -\end{definition} -for the long form, -\begin{definition}[\DescribeMacro\glsfirstlonguserfont] -\cs{glsfirstlonguserfont}\marg{text} -\end{definition} -for the first use long form, and -\begin{definition}[\DescribeMacro\glsxtrusersuffix] -\cs{glsxtrusersuffix} -\end{definition} -for the short plural suffix. - -Similarly for the hyphen styles: -\begin{definition}[\DescribeMacro\glsabbrvhyphenfont] -\cs{glsabbrvhyphenfont}\marg{text} -\end{definition} -for the short form, -\begin{definition}[\DescribeMacro\glsfirstabbrvhyphenfont] -\cs{glsfirstabbrvhyphenfont}\marg{text} -\end{definition} -for the first use short form, -\begin{definition}[\DescribeMacro\glslonghyphenfont] -\cs{glslonghyphenfont}\marg{text} -\end{definition} -for the long form, -\begin{definition}[\DescribeMacro\glsfirstlonghyphenfont] -\cs{glsfirstlonghyphenfont}\marg{text} -\end{definition} -for the first use long form, and -\begin{definition}[\DescribeMacro\glsxtrhyphensuffix] -\cs{glsxtrhyphensuffix} -\end{definition} -for the short plural suffix. - -Similarly for the \qt{only} styles, such as -\abbrstyle{long-only-short-only}: -\begin{definition}[\DescribeMacro\glsabbrvonlyfont] -\cs{glsabbrvonlyfont}\marg{text} -\end{definition} -for the short form, -\begin{definition}[\DescribeMacro\glsfirstabbrvonlyfont] -\cs{glsfirstabbrvonlyfont}\marg{text} -\end{definition} -for the first use short form, -\begin{definition}[\DescribeMacro\glslongonlyfont] -\cs{glslongonlyfont}\marg{text} -\end{definition} -for the long form, -\begin{definition}[\DescribeMacro\glsfirstlongonlyfont] -\cs{glsfirstlongonlyfont}\marg{text} -\end{definition} -for the first use long form, and -\begin{definition}[\DescribeMacro\glsxtronlysuffix] -\cs{glsxtronlysuffix} -\end{definition} -for the short plural suffix. - -The \qt{short-sc-only} styles, such as -\abbrstyle{long-only-short-sc-only}: -\begin{definition}[\DescribeMacro\glsabbrvsconlyfont] -\cs{glsabbrvsconlyfont}\marg{text} -\end{definition} -for the short form (which uses \ics{glsabbrvscfont}), and -\begin{definition}[\DescribeMacro\glsfirstabbrvsconlyfont] -\cs{glsfirstabbrvsconlyfont}\marg{text} -\end{definition} -which uses \ics{glsabbrvsconlyfont}. -The short plural suffix is obtained from: -\begin{definition}[\DescribeMacro\glsxtrsconlysuffix] -\cs{glsxtrsconlysuffix} -\end{definition} -This uses \ics{glsxtrscsuffix}. For other font types, use the -one of \qt{short-only} styles and redefine \cs{glsabbrvonlyfont} as -required. (The smallcaps style is a special case as its plural suffix is -awkward.) - -The \qt{postshort-sc-user} styles, such as -\abbrstyle{long-postshort-sc-user}: -\begin{definition}[\DescribeMacro\glsabbrvscuserfont] -\cs{glsabbrvscuserfont}\marg{text} -\end{definition} -for the short form (which uses \ics{glsabbrvscfont}), and -\begin{definition}[\DescribeMacro\glsfirstabbrvscuserfont] -\cs{glsfirstabbrvscuserfont}\marg{text} -\end{definition} -which uses \ics{glsabbrvscuserfont}. -The short plural suffix is obtained from: -\begin{definition}[\DescribeMacro\glsxtrscusersuffix] -\cs{glsxtrscusersuffix} -\end{definition} -This uses \ics{glsxtrscsuffix}. - -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). - -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{glsabbrvscfont} to -convert its argument to lowercase. For example: -\begin{verbatim} -\renewcommand*{\glsabbrvscfont}[1]{\textsc{\MakeLowercase{#1}}} -\end{verbatim} - -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 case: -\begin{verbatim} -\renewcommand*{\glsabbrvscfont}[1]{\textsc{\MakeTextLowercase{#1}}} -\renewcommand*{\glsabbrvsmfont}[1]{\textsmaller{\MakeTextUppercase{#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} +For example: +\begin{codebox} +\gls{setabbreviationstyle}\marg{\abbrstyle{long-only-short-only}} +\gls{newabbreviation}\marg{clostridium}\marg{C.}\marg{Clostridium} +\gls{newglossaryentry}\marg{botulinum}\marg{\gloskeyval{name}{botulinum},\gloskeyval{description}{}} +\codepar +\gls{multiglossaryentry}\oarg{\mglsoptval{firstsuffix}{botulism}} + \marg{cbot}\marg{clostridium,botulinum} +\end{codebox} +On first use, this produces (assuming the \qt{clostridum} element +hasn't been used previously): +\begin{resultbox} +Clostridium botulinum (botulism). +\end{resultbox} +On subsequent use, this produces: +\begin{resultbox} +C. botulinum. +\end{resultbox} -The new naming scheme for abbreviation styles is as follows: -\begin{itemize} -\item -\meta{field1}[\texttt{-}\meta{modifier1}]\texttt{-}[post]\meta{field2}[\texttt{-}\meta{modifier2}][\texttt{-user}] +\section{Separators} +\label{sec:mglssep} -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{field1} or \meta{field2} starts -with \qt{no} then that element is omitted from the display style (no -parenthetical part) but is included in the inline style. +The separators between each instance of \gls{gls} are given by the +following commands, which all take two arguments. The first argument +is the label of the previous element. The second argument is the +label of the following element. +\cmddef{glscombinedsep} +This is inserted between two entries that have both been marked as used. +The default definition is: +\begin{codebox} +\cmd{newcommand}*\marg{\gls{glscombinedsep}}[2]\marg{\% + \gls{glshasattribute}\marg{\#1}\marg{\catattr{combinedsep}}\% + \marg{\gls{glsgetattribute}\marg{\#1}\marg{\catattr{combinedsep}}}\% + \marg{ }% +} +\end{codebox} +This will use the \catattr{combinedsep} attribute for the +\meta{prev label}'s category, if set. Otherwise this just does a +space. Note that this ignores the second argument. -If the \texttt{-}\meta{modifier} part is present, then the field has -a font changing command applied to it. The special modifier -\texttt{-only} indicates that field is only present according to -whether or not the entry has been used. +\cmddef{glscombinedfirstsep} +This is inserted between two entries where only the next entry has +been marked as used. The default definition is: +\begin{codebox} +\cmd{newcommand}*\marg{\gls{glscombinedfirstsep}}[2]\marg{\% + \gls{glshasattribute}\marg{\#1}\marg{\catattr{combinedfirstsep}}\% + \marg{\gls{glsgetattribute}\marg{\#1}\marg{\catattr{combinedfirstsep}}}\% + \marg{\gls{glscombinedsep}\marg{\#1}\marg{\#2}}\% +} +\end{codebox} +This will use the \catattr{combinedfirstsep} attribute for +\meta{prev label}'s category, if set. If that attribute isn't set, +\gls{glscombinedsep} is used. -If \texttt{post} is present then \meta{field2} is -placed after the \gls{linktext} using the post-link hook. +\cmddef{glscombinedsepfirst} +This is inserted between two entries where only the previous entry has +been marked as used. The default definition is: +\begin{codebox} +\cmd{newcommand}*\marg{\gls{glscombinedsepfirst}}[2]\marg{\% + \gls{glshasattribute}\marg{\#1}\marg{\catattr{combinedsepfirst}}\% + \marg{\gls{glsgetattribute}\marg{\#1}\marg{\catattr{combinedsepfirst}}}\% + \marg{\gls{glscombinedsep}\marg{\#1}\marg{\#2}}\% +} +\end{codebox} +This will use the \catattr{combinedsepfirst} attribute for +\meta{prev label}'s category, if set. If that attribute isn't set, +\gls{glscombinedsep} is used. -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.) +\cmddef{glscombinedfirstsepfirst} +This is inserted between two entries where both have +been marked as used. The default definition is: +\begin{codebox} +\cmd{newcommand}*\marg{\gls{glscombinedfirstsepfirst}}[2]\marg{\% + \gls{glshasattribute}\marg{\#1}\marg{\catattr{combinedfirstsepfirst}}\% + \marg{\gls{glsgetattribute}\marg{\#1}\marg{\catattr{combinedfirstsepfirst}}}\% + \marg{\gls{glscombinedsep}\marg{\#1}\marg{\#2}}\% +} +\end{codebox} +This will use the \catattr{combinedfirstsepfirst} attribute for +\meta{prev label}'s category, if set. If that attribute isn't set, +\gls{glscombinedsep} is used. -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}). +These commands may be redefined as required. +For example, to have no space between two elements that have both +been marked as used and are both abbreviations (disregarding +category attributes): +\begin{codebox} +\cmd{renewcommand}*\marg{\gls{glscombinedfirstsepfirst}}[2]\marg{\% + \gls{ifglshasshort}\marg{\#1}\marg{\gls{ifglshasshort}\marg{\#2}\marg{}\marg{\cmd{space}}}\marg{\cmd{space}}\% +} +\end{codebox} - \item\abbrstyle{long-hyphen-postshort-hyphen}: the short -form and the inserted material (provided by the final optional -argument of commands like \cs{gls}) is moved to the post-link hook. -The long form is formatted according to \cs{glslonghyphenfont} -(or \cs{glsfirstlonghyphenfont} on first use). -The short form is formatted according to \cs{glsabbrvhyphenfont} -(or \cs{glsfirstabbrvhyphenfont} on first use). - \end{itemize} +There are some commands for redefining the above separators to +common combinations. -\item \meta{style}\texttt{-noreg} +\cmddef{glssetcombinedsepabbrvnbsp} +This does the following: +\begin{codebox} +\cmd{renewcommand}*\marg{\gls{glscombinedsep}}[2]\marg{\% + \gls{glshasattribute}\marg{\#1}\marg{\catattr{combinedsep}}\% + \marg{\gls{glsgetattribute}\marg{\#1}\marg{\catattr{combinedsep}}}\% + \marg{\gls{ifglshasshort}\marg{\#1}\marg{\glssymbol{idx.nbsp}}\marg{ }}\% +}\% +\cmd{renewcommand}*\marg{\gls{glscombinedsepfirst}}[2]\marg{\% + \gls{glshasattribute}\marg{\#1}\marg{\catattr{combinedsepfirst}}\% + \marg{\gls{glsgetattribute}\marg{\#1}\marg{\catattr{combinedsepfirst}}}\% + \marg{\gls{ifglshasshort}\marg{\#1}\marg{\glssymbol{idx.nbsp}}\marg{ }}\% +}\% +\cmd{renewcommand}*\marg{\gls{glscombinedfirstsep}}[2]\marg{\% + \gls{glshasattribute}\marg{\#1}\marg{\catattr{combinedfirstsep}}\% + \marg{\gls{glsgetattribute}\marg{\#1}\marg{\catattr{combinedfirstsep}}}\% + \marg{ }\% +}\% +\cmd{renewcommand}*\marg{\gls{glscombinedfirstsepfirst}}[2]\marg{\% + \gls{glshasattribute}\marg{\#1}\marg{\catattr{combinedfirstsepfirst}}\% + \marg{\gls{glsgetattribute}\marg{\#1}\marg{\catattr{combinedfirstsepfirst}}}\% + \marg{ }\% +} +\end{codebox} +This uses a \idx{nbsp} following an abbreviation +(that has already been marked as used). Note that if the associated +attributes are set the commands will behave according to the +attribute. -Some styles set the \catattr{regular} attribute. In some cases, -there's a version of the style that doesn't set this attribute. -For example, \abbrstyle{long-em-noshort-em} sets the -\catattr{regular} attribute. The -\abbrstyle{long-em-noshort-em-noreg} style is a minor variation -that style that doesn't set the attribute. +\cmddef{glssetcombinedsepabbrvnone} +\begin{codebox} +\cmd{renewcommand}*\marg{\gls{glscombinedsep}}[2]\marg{\% + \gls{glshasattribute}\marg{\#1}\marg{\catattr{combinedsep}}\% + \marg{\gls{glsgetattribute}\marg{\#1}\marg{\catattr{combinedsep}}}\% + \marg{\gls{ifglshasshort}\marg{\#1}\marg{}\marg{\gls{ifglshasshort}\marg{\#2}\marg{}\marg{ }}}\% +}\% +\cmd{renewcommand}*\marg{\gls{glscombinedsepfirst}}[2]\marg{\% + \gls{glshasattribute}\marg{\#1}\marg{\catattr{combinedsepfirst}}\% + \marg{\gls{glsgetattribute}\marg{\#1}\marg{\catattr{combinedsepfirst}}}\% + \marg{\gls{ifglshasshort}\marg{\#1}\marg{}\marg{ }}\% +}\% +\cmd{renewcommand}*\marg{\gls{glscombinedfirstsep}}[2]\marg{\% + \gls{glshasattribute}\marg{\#1}\marg{\catattr{combinedfirstsep}}\% + \marg{\gls{glsgetattribute}\marg{\#1}\marg{\catattr{combinedfirstsep}}}\% + \marg{\gls{ifglshasshort}\marg{\#2}\marg{}\marg{ }}\% +}\% +\cmd{renewcommand}*\marg{\gls{glscombinedfirstsepfirst}}[2]\marg{\% + \gls{glshasattribute}\marg{\#1}\marg{\catattr{combinedfirstsepfirst}}\% + \marg{\gls{glsgetattribute}\marg{\#1}\marg{\catattr{combinedfirstsepfirst}}}\% + \marg{ }\% +} +\end{codebox} +This does nothing if either element are abbreviations that have already been +used. Note that if the associated attributes are set the commands +will behave according to the attribute. -There are a few \qt{noshort} styles, such as -\abbrstyle{long-hyphen-noshort-noreg}, that have -\qt{-noreg} version without a regular version. This is because the -style won't work properly with the \catattr{regular} set, but the -naming scheme is maintained for consistency with the other -\qt{noshort} styles. +\cmddef{glssetcombinedsepnarrow} +This is rather more complicated as it measures a field value and +uses \meta{narrow-sep} if the width is less than \meta{width}. +The field value is determined as follows: +\begin{itemize} +\item on \idx{firstuse} the +\gloskey{long} field is used if it is set otherwise the +\gloskey{first} field is used; -\item -\meta{field1}[\texttt{-}\meta{modifier1}]\texttt{-}[\texttt{post}]\texttt{footnote} +\item otherwise the +\gloskey{short} field is used if it is set otherwise the +\gloskey{text} field is used; +\end{itemize} -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. +Note that this doesn't take into account fonts, hooks, abbreviation +styles or plural forms (e.g.\ \gls{mglspl}) or other field references +(e.g.\ \gls{mglsname}). If the associated attributes are set the commands +will behave according to the attribute. -If \texttt{-}\meta{modifier1} is present, \meta{field1} has a -font-changing command applied to it. +\section{\glsfmtname{mgls} Element Hooks} +\label{sec:mglselementhooks} -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} +The \gls{mgls}-like commands use the following hooks: +\cmddef{mglselementprehook} +This is done before each (non-skipped) element. (Default does nothing.) -\begin{important} -Take care with the footnote styles. Remember that there are some -situations where \ics{footnote} doesn't work. -\end{important} +\cmddef{mglselementposthook} +This is done after each (non-skipped) element. (Default does nothing.) +Note that this is different from the normal entry post-link hook +\gls{glspostlinkhook}. If the individual entry post-link hook is enabled (see the +\mglsopt{postlinks} key in \sectionref{sec:multiglsoptions}), this will go before +\gls{mglselementposthook}. -\item \meta{style}\texttt{-desc} +The definitions of the following commands are scoped within the +\gls{mgls}-like commands so they can't be accessed elsewhere +(including in the post-link hook, see +\sectionref{sec:mglspostlinkhook}). They +may be used in the above hooks or in the separator commands (described in +\sectionref{sec:mglssep}) or in the command used to encapsulate the +entire content. They can also be used in the post-link hook (see +\sectionref{sec:entryfmtmods}) to determine if an entry is being +used within a \gls{mgls}-like command. -Like \meta{style} but the \gloskey{description} key must be provided -when defining abbreviations with this style. +\cmddef{mglscurrentmultilabel} +Expands to the multi-entry label. -Examples: -\begin{itemize} +\cmddef{mglscurrentmainlabel} +Expands to the label of the main element. -\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} +\cmddef{mglscurrentlist} +Expands to the complete comma-separated list of elements. -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} +\cmddef{mglscurrentoptions} +Expands to the options used when the multi-entry was defined. This +doesn't include options set with \gls{multiglossaryentrysetup} +or those passed to \gls{mgls} (or whichever variant is being used). -The following abbreviation styles set the \catattr{regular} -attribute to \qt{true} for all categories that have abbreviations -defined with any of these styles. +\cmddef{mglscurrentcategory} +Expands to the multi-entry category current in effect. -\begin{description} -\item[\abbrstyledef{short-nolong}] -This only displays the short form on \gls{firstuse}. The \gloskey{name} -is set to the short form through the command -\begin{definition}[\DescribeMacro\glsxtrshortnolongname] -\cs{glsxtrshortnolongname} -\end{definition} -(Similarly for the other -\texttt{short}\meta{modifier}\texttt{-nolong}\meta{modifier} styles, -unless indicated otherwise.) -This command is expanded as the entry is defined, so any -redefinition must be done before \cs{newabbreviation} (or -\cs{newacronym}) for it to take effect. Make sure to \cs{protect} -any formatting commands (or anything else that shouldn't be expanded). - -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[\abbrstyledef{short}] A synonym for \abbrstyle{short-nolong}. - -\item[\abbrstyledef{nolong-short}] Like \abbrstyle{short-nolong} -but the inline full form displays -\meta{long} (\meta{short}). - -\item[\abbrstyledef{short-sc-nolong}] -Like \abbrstyle{short-nolong} but redefines \cs{glsabbrvfont} to -use \ics{glsabbrvscfont} (which defaults to \cs{textsc}). - -\item[\abbrstyledef{short-sc}] A synonym for \abbrstyle{short-sc-nolong} - -\item[\abbrstyledef{nolong-short-sc}] Like \abbrstyle{short-sc-nolong} -but the inline full form displays -\meta{long} (\meta{short}). The name is still obtained from -\cs{glsxtrshortnolongname} (similarly for the other styles in the -form \texttt{nolong}\meta{modifier}\texttt{-short}\meta{modifier} -unless indicated otherwise). - -\item[\abbrstyledef{short-sm-nolong}] -Like \abbrstyle{short-nolong} but redefines \cs{glsabbrvfont} to -use \ics{glsabbrvsmfont} (which defaults to \cs{textsmaller}). - -\item[\abbrstyledef{short-sm}] A synonym for \abbrstyle{short-sm-nolong}. - -\item[\abbrstyledef{nolong-short-sm}] Like \abbrstyle{short-sm-nolong} -but the inline full form displays -\meta{long} (\meta{short}). - -\item[\abbrstyledef{short-em-nolong}] -Like \abbrstyle{short-nolong} but redefines \cs{glsabbrvfont} to -use \ics{glsabbrvemfont}. - -\item[\abbrstyledef{short-em}] A synonym for \abbrstyle{short-em-nolong} - -\item[\abbrstyledef{nolong-short-em}] Like \abbrstyle{short-em-nolong} -but the inline full form displays -\meta{long} (\meta{short}). - -\item[\abbrstyledef{short-nolong-desc}] -Like the \abbrstyle{short-nolong} style, but the \gloskey{name} is set to -the full form obtained by expanding -\begin{definition}[\DescribeMacro\glsxtrshortdescname] -\cs{glsxtrshortdescname} -\end{definition} -(Similarly for the other -\texttt{short}\meta{modifier}\texttt{-nolong}\meta{modifier}\texttt{-desc} -styles, unless indicated otherwise.) This command is expanded when the entry is defined, so -\cs{protect} fragile and formatting commands and only redefine this -command before \cs{newabbreviation} (or \cs{newacronym}). - -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[\abbrstyledef{short-desc}] A synonym for -\abbrstyle{short-nolong-desc}. - -\item[\abbrstyledef{short-sc-nolong-desc}] -Like \abbrstyle{short-nolong} but redefines \cs{glsabbrvfont} to -use \ics{glsabbrvscfont} (which defaults to \cs{textsc}). - -\item[\abbrstyledef{short-sc-desc}] A synonym for -\abbrstyle{short-sc-nolong-desc}. - -\item[\abbrstyledef{short-sm-nolong-desc}] -Like \abbrstyle{short-nolong-desc} but redefines \cs{glsabbrvfont} to -use \ics{glsabbrvsmfont} (which defaults to \cs{textsmaller}). - -\item[\abbrstyledef{short-sm-desc}] A synonym for -\abbrstyle{short-sm-nolong-desc}. - -\item[\abbrstyledef{short-em-nolong-desc}] -Like \abbrstyle{short-nolong-desc} but redefines \cs{glsabbrvfont} to -use \ics{glsabbrvemfont}. - -\item[\abbrstyledef{short-em-desc}] A synonym for -\abbrstyle{short-em-nolong-desc}. - -\item[\abbrstyledef{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{sort} key are set to the long form. -The \gloskey{name} key is also set to the long form, but this is -done by expanding -\begin{definition}[\DescribeMacro\glsxtrlongnoshortdescname] -\cs{glsxtrlongnoshortdescname} -\end{definition} -(Similarly for the other -\texttt{long}\meta{modifier}\texttt{-noshort}\meta{modifier}\texttt{-desc} -styles, unless indicated otherwise.) This command should only be redefined before abbreviations -are defined, and any fragile or formatting commands within it need protecting. - -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[\abbrstyledef{long-desc}] A synonym for -\abbrstyle{long-noshort-desc}. - -\item[\abbrstyledef{long-noshort-sc-desc}] -Like the \abbrstyle{long-noshort-desc} style but the short form (accessed -through commands like \ics{glsxtrshort}) use \ics{glsabbrvscfont}. -(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[\abbrstyledef{long-noshort-sm-desc}] -Like \abbrstyle{long-noshort-desc} but redefines \cs{glsabbrvfont} to -use \ics{glsabbrvsmfont}. -(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[\abbrstyledef{long-noshort-em-desc}] -Like \abbrstyle{long-noshort-desc} but redefines \cs{glsabbrvfont} to -use \ics{glsabbrvemfont}. 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[\abbrstyledef{long-em-noshort-em-desc}] -New to version 1.04, like \abbrstyle{long-noshort-desc} but redefines -\cs{glsabbrvfont} to use \ics{glsabbrvemfont}. The long form uses -\ics{glsfirstlongemfont} and \ics{glslongemfont}. - -\item[\abbrstyledef{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{sort} key is set to the short form. The \gloskey{name} -key is also set to the short form, but this is done by expanding -\begin{definition}[\DescribeMacro\glsxtrlongnoshortname] -\cs{glsxtrlongnoshortname} -\end{definition} -(Similarly for other -\texttt{long}\meta{modifier}\texttt{-noshort}\meta{modifier} styles, -unless indicated otherwise.) -This command should only be redefined before abbreviations are -defined, and fragile or formatting commands should be protected. - -The \gloskey{description} is set to the long form. - -\item[\abbrstyledef{long}] A synonym for \abbrstyle{long-noshort} - -\item[\abbrstyledef{long-noshort-sc}] -Like the \abbrstyle{long-noshort} style but the short form (accessed -through commands like \ics{glsxtrshort}) use \ics{glsabbrvscfont}. -(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[\abbrstyledef{long-noshort-sm}] -Like \abbrstyle{long-noshort} but redefines \cs{glsabbrvfont} to -use \ics{glsabbrvsmfont}. -(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[\abbrstyledef{long-noshort-em}] -This style is like \abbrstyle{long-noshort} but redefines \cs{glsabbrvfont} to -use \ics{glsabbrvemfont}. 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[\abbrstyledef{long-em-noshort-em}] -New to version 1.04, this style is like \abbrstyle{long-noshort} but redefines \cs{glsabbrvfont} to -use \ics{glsabbrvemfont}, \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}. -The related style \abbrstyledef{long-em-noshort-em-noreg} -doesn't set the \catattr{regular} attribute. +\cmddef{glsxtrcurrentmglscsname} +Expands to the control sequence name of the calling command (for +example, \code{mgls} or \code{mglspl}). -\end{description} +To test if the current multi-entry is the first use: +\cmddef{mglsisfirstuse} +This does \meta{true} if this is the first use otherwise it does +\meta{false}. Note that this applies to the multi-entry first use +flag not the \idxpl{firstuseflag} of the individual elements. -\subsection{Predefined Abbreviation Styles that Don't Set the Regular -Attribute} -\label{sec:predefnonregabbrvstyles} +At each iteration of the loop over the element list, the following +commands are set, which can be accessed in hooks such as +\gls{mglselementprehook} or in hooks used by the underlying \gls{gls} +etc commands. For example, if \gls{mglscurrentlabel} is defined then +\gls{gls} is being used inside \gls{mgls}. -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. +\cmddef{mglscurrentlabel} +Expands to the current element label. -\begin{description} -\item[\abbrstyledef{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{sort} key is set to the short form. The \gloskey{name} is -also set to the short form through -\begin{definition}[\DescribeMacro\glsxtrlongshortname] -\cs{glsxtrlongshortname} -\end{definition} -(Similarly for other -\texttt{long}\meta{modifier}\texttt{-short}\meta{modifier} styles, -unless indicated otherwise.) -Any redefinition of this command must come before the abbreviations -are defined as it expands on definition. Make sure you protect -any commands that shouldn't be expanded. The long form can be -referenced with \cs{the}\cs{glslongtok} and the short form -can be referenced with \cs{the}\cs{glsshorttok}. - -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[\abbrstyledef{long-short-sc}] -Like \abbrstyle{long-short} but redefines \cs{glsabbrvfont} to -use \ics{glsabbrvscfont}. - -\item[\abbrstyledef{long-short-sm}] -Like \abbrstyle{long-short} but redefines \cs{glsabbrvfont} to -use \ics{glsabbrvsmfont}. - -\item[\abbrstyledef{long-short-em}] -Like \abbrstyle{long-short} but redefines \cs{glsabbrvfont} to -use \ics{glsabbrvemfont}. - -\item[\abbrstyledef{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[\abbrstyledef{long-only-short-only}] -New to version 1.17, this style only shows the long form -on first use and only shows the short form on subsequent use. -The inline full form \cs{glsxtrfull} shows the long form -followed by the short form in parentheses. The \gloskey{name} -field is obtained from -\begin{definition}[\DescribeMacro\glsxtronlyname] -\cs{glsxtronlyname} -\end{definition} -Any redefinition of this command must come before the abbreviations -are defined as it expands on definition. Make sure you protect -any commands that shouldn't be expanded. The long form can be -referenced with \cs{the}\cs{glslongtok} and the short form -can be referenced with \cs{the}\cs{glsshorttok}. - -\item[\abbrstyledef{long-only-short-sc-only}] - -New to version 1.48, this is like \abbrstyle{long-only-short-only} but -uses smallcaps for the short form. The name is obtained from: -\begin{definition}[\DescribeMacro\glsxtrsconlyname] -\cs{glsxtrsconlyname} -\end{definition} - -\item[\abbrstyledef{long-only-short-only-desc}] -New to version 1.17, this style is like -\abbrstyle{long-only-short-only} but the user must supply the -description. The \gloskey{name} field is obtained from -\begin{definition}[\DescribeMacro\glsxtronlydescname] -\cs{glsxtronlydescname} -\end{definition} -The sort value is obtained from: -\begin{definition}[\DescribeMacro\glsxtronlydescsort] -\cs{glsxtronlydescsort} -\end{definition} - -Any redefinition of these commands must come before the abbreviations -are defined as it expands on definition. Make sure you protect -any commands that shouldn't be expanded. The long form can be -referenced with \cs{the}\cs{glslongtok} and the short form -can be referenced with \cs{the}\cs{glsshorttok}. - - -\item[\abbrstyledef{long-only-short-sc-only-desc}] -New to version 1.48, this style is like -\abbrstyle{long-only-short-only-desc} but it uses smallcaps for the -short form. The name is obtained from: -\begin{definition}[\DescribeMacro\glsxtrsconlydescname] -\cs{glsxtrsconlydescname} -\end{definition} -This defaults to \cs{glsxtronlydescname}. - -The sort value is obtained from: -\begin{definition}[\DescribeMacro\glsxtrsconlydescsort] -\cs{glsxtrsconlydescsort} -\end{definition} -This defaults to \cs{glsxtronlydescsort}. - -\item[\abbrstyledef{long-em-noshort-em-noreg}] -New to version 1.17, this style is like -\abbrstyle{long-em-noshort-em} but -doesn't set the \catattr{regular} attribute. - -\item[\abbrstyledef{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 -(using \ics{glsxtrparen}). -The \gloskey{description} is set to -\begin{definition}[\DescribeMacro\glsuserdescription] -\cs{glsuserdescription}\marg{long}\marg{label} -\end{definition} -The default definition ignores the \meta{label} and encapsulates -\meta{long} with \cs{glslonguserfont}. - -The \gloskey{name} is obtained by expanding -\cs{glsxtrlongshortname} (see above). -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. +\cmddef{mglselementindex} +This is a count register that is set to the element index. -For example: -\begin{verbatim} -\setabbreviationstyle[acronym]{long-short-user} +\cmddef{mglscurrentprefix} +Expands to the current multi-entry prefix. -\newacronym{tug}{TUG}{\TeX\ User Group} +\cmddef{mglscurrentsuffix} +Expands to the current multi-entry suffix. -\newacronym - [user1={German Speaking \TeX\ User Group}] - {dante}{DANTE}{Deutschsprachige Anwendervereinigung \TeX\ e.V} +\cmddef{mglsiflast} +If this is the last iteration, does \meta{true} otherwise does +\meta{false}. This takes the skip options into account, so the last +iteration may not necessarily be when the element index is equal to +the total number of elements. -\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} +\section{Post-Link Hook} +\label{sec:mglspostlinkhook} -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]{\glsabbrvscfont{#1}} -\renewcommand{\glsxtrusersuffix}{\glsxtrscsuffix} -\end{verbatim} - -\item[\abbrstyledef{long-noshort-noreg}] -This style is like \abbrstyle{long-noshort} but it doesn't -set the \catattr{regular} attribute. - -\item[\abbrstyledef{long-noshort-desc-noreg}] -This style is like \abbrstyle{long-noshort-desc} but it doesn't -set the \catattr{regular} attribute. - -\item[\abbrstyledef{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}. The \gloskey{name} -field is obtained from -\begin{definition}[\DescribeMacro\glsxtrlongshortdescname] -\cs{glsxtrlongshortdescname} -\end{definition} -(Similarly for other -\texttt{long}\meta{modifier}\texttt{-short}\meta{modifier}\texttt{-desc} -styles, unless indicated otherwise.) -Any redefinition of this command must come before the abbreviations -are defined as it expands on definition. Make sure you protect -any commands that shouldn't be expanded. The long form can be -referenced with \cs{the}\cs{glslongtok} and the short form -can be referenced with \cs{the}\cs{glsshorttok}. - -\item[\abbrstyledef{long-short-sc-desc}] -Like \abbrstyle{long-short-desc} but redefines \cs{glsabbrvfont} to -use \ics{glsabbrvscfont}. - -\item[\abbrstyledef{long-short-sm-desc}] -Like \abbrstyle{long-short-desc} but redefines \cs{glsabbrvfont} to -use \ics{glsabbrvsmfont}. - -\item[\abbrstyledef{long-short-em-desc}] -Like \abbrstyle{long-short-desc} but redefines \cs{glsabbrvfont} to -use \ics{glsabbrvemfont}. - -\item[\abbrstyledef{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[\abbrstyledef{long-em-noshort-em-desc-noreg}] -New to version 1.17, this style is like -\abbrstyle{long-em-noshort-em-desc} but -doesn't set the \catattr{regular} attribute. - - -\item[\abbrstyledef{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 -obtained from -\begin{definition}[\DescribeMacro\glsxtrlongshortuserdescname] -\cs{glsxtrlongshortuserdescname} -\end{definition} -Again, this should only be redefined before \cs{newabbreviation} (or -\cs{newacronym}), and fragile and formatting commands need protecting. - -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[\abbrstyledef{short-nolong-noreg}] -This is like \abbrstyle{short-nolong} but doesn't set the -\catattr{regular} attribute. - -\item[\abbrstyledef{nolong-short-noreg}] -This is like \abbrstyle{nolong-short} but doesn't set the -\catattr{regular} attribute. - -\item[\abbrstyledef{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. - -The \gloskey{name} field is obtained from -\begin{definition}[\DescribeMacro\glsxtrshortlongname] -\cs{glsxtrshortlongname} -\end{definition} -(Similarly for other -\texttt{short}\meta{modifier}\texttt{-long}\meta{modifier} styles, -unless indicated otherwise.) -Any redefinition of this command must come before the abbreviations -are defined as it expands on definition. Make sure you protect -any commands that shouldn't be expanded. The long form can be -referenced with \cs{the}\cs{glslongtok} and the short form -can be referenced with \cs{the}\cs{glsshorttok}. - - -\item[\abbrstyledef{short-sc-long}] -Like \abbrstyle{short-long} but redefines \cs{glsabbrvfont} to -use \ics{glsabbrvscfont}. - -\item[\abbrstyledef{short-sm-long}] -Like \abbrstyle{short-long} but redefines \cs{glsabbrvfont} to -use \ics{glsabbrvsmfont}. - -\item[\abbrstyledef{short-em-long}] -Like \abbrstyle{short-long} but redefines \cs{glsabbrvfont} to -use \ics{glsabbrvemfont}. - -\item[\abbrstyledef{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[\abbrstyledef{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. The \gloskey{name} field is -obtained by expanding -\begin{definition}[\DescribeMacro\glsxtrshortlongname] -\cs{glsxtrshortlongname} -\end{definition} -Again, this should only be redefined before \cs{newabbreviation} (or -\cs{newacronym}) and commands that should be expanded need to be -protected. The \gloskey{description} is set to -\cs{glsuserdescription}\marg{long}\marg{label}. - -\item[\abbrstyledef{short-nolong-desc-noreg}] -This style is like \abbrstyle{short-nolong-desc} but it doesn't -set the \catattr{regular} attribute. - -\item[\abbrstyledef{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}. The \gloskey{name} -field is obtained from -\begin{definition}[\DescribeMacro\glsxtrshortlongdescname] -\cs{glsxtrshortlongdescname} -\end{definition} -(Similarly for other -\texttt{short}\meta{modifier}\texttt{-long}\meta{modifier}\texttt{-desc} -styles, unless indicated otherwise.) -Any redefinition of this command must come before the abbreviations -are defined as it expands on definition. Make sure you protect -any commands that shouldn't be expanded. The long form can be -referenced with \cs{the}\cs{glslongtok} and the short form -can be referenced with \cs{the}\cs{glsshorttok}. - -\item[\abbrstyledef{short-sc-long-desc}] -Like \abbrstyle{short-long-desc} but redefines \cs{glsabbrvfont} to -use \ics{glsabbrvscfont}. - -\item[\abbrstyledef{short-sm-long-desc}] -Like \abbrstyle{short-long-desc} but redefines \cs{glsabbrvfont} to -use \ics{glsabbrvsmfont}. - -\item[\abbrstyledef{short-em-long-desc}] -Like \abbrstyle{short-long-desc} but redefines \cs{glsabbrvfont} to -use \ics{glsabbrvemfont}. - -\item[\abbrstyledef{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[\abbrstyledef{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}, but the \gloskey{name} key is -obtained from -\begin{definition}[\DescribeMacro\glsxtrshortlonguserdescname] -\cs{glsxtrshortlonguserdescname} -\end{definition} -Again, this should only be redefined before \cs{newabbreviation} (or -\cs{newacronym}), and fragile and formatting commands need protecting. - -The \gloskey{description} key must be -supplied in the optional argument of \cs{newabbreviation} -(or \cs{newacronym}). - -\item[\abbrstyledef{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. The -\gloskey{name} key is obtained by expanding: -\begin{definition}[\DescribeMacro\glsxtrfootnotename] -\cs{glsxtrfootnotename} -\end{definition} -(Similarly for other -\texttt{short\meta{modifier}-\meta{modifier}footnote} styles, unless -indicated otherwise.) Again, this command should only be redefined -before \cs{newabbreviation} (or \cs{newacronym}), and fragile or -formatting commands should be protected from expansion. - -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[\abbrstyledef{footnote}] A synonym for -\abbrstyle{short-footnote}. - -\item[\abbrstyledef{short-sc-footnote}] -Like \abbrstyle{short-footnote} but redefines \cs{glsabbrvfont} to -use \ics{glsabbrvscfont}. -(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[\abbrstyledef{short-sc-footnote}] -Like \abbrstyle{short-footnote} but redefines \cs{glsabbrvfont} to -use \ics{glsabbrvsmfont}. -(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[\abbrstyledef{short-em-footnote}] -Like \abbrstyle{short-footnote} but redefines \cs{glsabbrvfont} to -use \ics{glsabbrvemfont}. -(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[\abbrstyledef{short-footnote-desc}] -(New to v1.42.) -This is similar to \abbrstyle{short-footnote}, but the -\gloskey{description} must be supplied by the user. -The \gloskey{name} field is obtained from: -\begin{definition}[\DescribeMacro\glsxtrfootnotedescname] -\cs{glsxtrfootnotedescname} -\end{definition} -which defaults to \meta{short} followed by \meta{long} in -parentheses, and the \gloskey{sort} field is obtained from: -\begin{definition}[\DescribeMacro\glsxtrfootnotedescsort] -\cs{glsxtrfootnotedescsort} -\end{definition} -which defaults to just the short form. (Similarly for other -\texttt{short}\meta{modifier}\texttt{-[post]footnote}\texttt{-desc} -styles, unless indicated otherwise.) - -Any redefinition of these commands must come before the abbreviations -are defined as it expands on definition. Make sure you protect -any commands that shouldn't be expanded. The long form can be -referenced with \cs{the}\cs{glslongtok} and the short form -can be referenced with \cs{the}\cs{glsshorttok}. - -\item[\abbrstyledef{footnote-desc}] -A synonym for \abbrstyle{short-footnote-desc}. +There is a hook that occurs at the end the \gls{mgls}-like commands +according to the \mglsopt{mpostlink} setting (see +\sectionref{sec:multiglsoptions}). The hook used depends on the +\mglsopt{mpostlinkelement} option. +These hooks can't access the commands described in \sectionref{sec:mglselementhooks} +as the hook occurs outside of the scope in which they are defined. -\item[\abbrstyledef{short-sc-footnote-desc}] -Like \abbrstyle{short-footnote-desc} but redefines \cs{glsabbrvfont} to -use \ics{glsabbrvscfont}. - -\item[\abbrstyledef{short-sm-footnote-desc}] -Like \abbrstyle{short-footnote-desc} but redefines \cs{glsabbrvfont} to -use \ics{glsabbrvsmfont}. - -\item[\abbrstyledef{short-em-footnote-desc}] -Like \abbrstyle{short-footnote-desc} but redefines \cs{glsabbrvfont} to -use \ics{glsabbrvemfont}. - -\item[\abbrstyledef{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 its variants) -so that it fakes non-\gls{firstuse}. (Otherwise the footnote would -appear after the inline form.) - -\item[\abbrstyledef{postfootnote}] A synonym for -\abbrstyle{short-postfootnote}. +The \mglsoptval{mpostlinkelement}{custom} option uses: +\cmddef{mglscustompostlinkhook} +This does nothing by default. -\item[\abbrstyledef{short-sc-postfootnote}] -Like \abbrstyle{short-postfootnote} but redefines \cs{glsabbrvfont} to -use \ics{glsabbrvscfont}. -(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[\abbrstyledef{short-sm-postfootnote}] -Like \abbrstyle{short-postfootnote} but redefines \cs{glsabbrvfont} to -use \ics{glsabbrvsmfont}. -(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[\abbrstyledef{short-em-postfootnote}] -Like \abbrstyle{short-postfootnote} but redefines \cs{glsabbrvfont} to -use \ics{glsabbrvemfont}. -(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[\abbrstyledef{short-postfootnote-desc}] -(New to v1.42.) -This is similar to \abbrstyle{short-postfootnote}, but the -\gloskey{description} must be supplied by the user. The -\gloskey{name} and \gloskey{sort} are set as for -\abbrstyle{short-footnote-desc}. - -\item[\abbrstyledef{postfootnote-desc}] -A synonym for \abbrstyle{short-postfootnote-desc}. +The \mglsoptval{mpostlinkelement}{last} option uses: +\cmddef{mglslastelementpostlinkhook} +which emulates the post-link hook of the last element. -\item[\abbrstyledef{short-sc-postfootnote-desc}] -Like \abbrstyle{short-postfootnote-desc} but redefines \cs{glsabbrvfont} to -use \ics{glsabbrvscfont}. - -\item[\abbrstyledef{short-sm-postfootnote-desc}] -Like \abbrstyle{short-postfootnote-desc} but redefines \cs{glsabbrvfont} to -use \ics{glsabbrvsmfont}. - -\item[\abbrstyledef{short-em-postfootnote-desc}] -Like \abbrstyle{short-postfootnote-desc} but redefines \cs{glsabbrvfont} to -use \ics{glsabbrvemfont}. - -\item[\abbrstyledef{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. The \gloskey{name} key is obtained -from \cs{glsxtrshortlongname}. - -\item[\abbrstyledef{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. The \gloskey{name} is obtained from -\cs{glsxtrshortlonguserdescname}. - -\item[\abbrstyledef{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[\abbrstyledef{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. The \gloskey{name} is obtained from -\cs{glsxtrlongshortuserdescname}. - -\item[\abbrstyledef{long-postshort-sc-user}] -This style (new to v1.48) is like \abbrstyle{long-postshort-user} -but uses smallcaps for the short form. - -\item[\abbrstyledef{long-postshort-sc-user-desc}] -This style (new to v1.48) is like \abbrstyle{long-postshort-user-desc} -but uses smallcaps for the short form. - -\item[\abbrstyledef{long-hyphen-short-hyphen}] -This style (new to v1.17) is designed to work with the \catattr{markwords} -category attribute. The full form is formatted using -\begin{definition}[\DescribeMacro\glsxtrlonghyphenshort] -\cs{glsxtrlonghyphenshort}\marg{label}\marg{long}\marg{short}\marg{insert} -\end{definition} -where \meta{insert} is the inserted material -provided in the final optional argument of commands like -\cs{insert}. If \meta{insert} start with a hyphen, then this -locally redefines \ics{glsxtrwordsep} to a hyphen, which means that -if the \catattr{markwords} attribute is set then the long form -will become hyphenated. (If this attribute isn't set, there's -no alteration to the way the long form is displayed.) -The \gloskey{name} key is obtained from \cs{glsxtrlongshortname}. - -Unlike the other \meta{long} (\meta{short}) type of styles, -such as \abbrstyle{long-short}, this style -also repeats the insertion in the parenthetical part, so that the -first use form is: -\begin{quote} -\cs{glsfirstlonghyphenfont}\marg{long}\meta{insert} -(\cs{glsfirstabbrvhyphenfont}\marg{short}\meta{insert}) -\end{quote} -The space before the parenthetical material is actually given by -\cs{glsxtrfullsep}\marg{label} which defaults to a space. -The \meta{insert} may be moved into the formatting commands -according to the conditional \cs{ifglsxtrinsertinside}. - -For example, if \texttt{ip} is defined using: -\begin{verbatim} -\glssetcategoryattribute{english}{markwords}{true} -\setabbreviationstyle[english]{long-hyphen-short-hyphen} -\newabbreviation[category=english]{ip}{IP}{Internet Protocol} -\end{verbatim} -then -\begin{verbatim} -\gls{ip}[-Adressen] -\end{verbatim} -will do -\begin{quote} -Internet-Protocol-Adressen (IP-Adressen) -\end{quote} -on first use, whereas -\begin{verbatim} -\gls{ip}[ Address] -\end{verbatim} -will do -\begin{quote} -Internet Protocol Address (IP Address) -\end{quote} -on first use. +The \mglsoptval{mpostlinkelement}{main} option uses: +\cmddef{mglslastmainpostlinkhook} +which emulates the post-link hook of the main element. -\begin{important} -Note that the hyphenation isn't applied when using commands like -\cs{glsxtrlong}. This means that -\begin{verbatim} -\glsxtrlong{ip}[-Adressen] -\end{verbatim} -will do -\begin{quote} -Internet Protocol-Adressen -\end{quote} -\end{important} +The default settings \code{\mglsoptval{postlinks}{none}, +\mglsoptval{mpostlink}{true}, \mglsoptval{mpostlinkelement}{last}} will +suppress the individual element \idxpl{postlinkhook} +(\gls{glspostlinkhook}) and do the multi-entry post-link hook for +the last element (\gls{mglslastelementpostlinkhook}). -If the \catattr{markwords} attribute hadn't been set, then the -first use of -\begin{verbatim} -\gls{ip}[-Adressen] -\end{verbatim} -would do -\begin{quote} -Internet Protocol-Adressen (IP-Adressen) -\end{quote} -instead. +If you have the final element's \idx{postlinkhook} enabled and the +multi-entry post-link hook enabled (for example, +\code{\mglsoptval{postlinks}{all}, \mglsoptval{mpostlink}{true}, +\mglsoptval{mpostlinkelement}{last}}), the final element's +\idx{postlinkhook} will be done twice. Similarly for the main element with +\code{\mglsoptval{postlinks}{all}, \mglsoptval{mpostlink}{true}, +\mglsoptval{mpostlinkelement}{main}}. -\begin{important} -If the inserted material \meta{insert} is likely to contain commands like -\cs{gls}, then use \abbrstyle{long-hyphen-postshort-hyphen} -instead to avoid nested links. -\end{important} +The following commands are available for use in these hooks and may +also be used in the definition of \gls{mglssuffix}. -If you want the short version in small-caps, you can -just redefine \cs{glsabbrvhyphenfont} and \cs{glsxtrhyphensuffix} -to use the small-caps versions. For example: -\begin{verbatim} -\renewcommand{\glsabbrvhyphenfont}{\glsabbrvscfont} -\renewcommand{\glsxtrhyphensuffix}{\glsxtrscsuffix} -\end{verbatim} -Similarly for other font-changing variations. - -\item[\abbrstyledef{long-hyphen-noshort-desc-noreg}] -New to version 1.17, this style is like -\abbrstyle{long-hyphen-short-hyphen-desc} except that the -parenthetical part is omitted and the long form is displayed -on subsequent use. The short form can be accessed -with \cs{glsxtrshort} but just uses the default abbreviation font. -There's no regular version of this style as the regular form -doesn't have the flexibility to deal with the hyphen switch. -The \gloskey{name} is obtained from \cs{glsxtrlongnoshortdescname}. - -\item[\abbrstyledef{long-hyphen-noshort-noreg}] -New to version 1.17, this style is like -\abbrstyle{long-hyphen-noshort-desc-noreg} but the -name is set to the short form and the description is set to the long -form. - -\item[\abbrstyledef{long-hyphen-short-hyphen-desc}] - -New to version 1.17. -This is similar to \abbrstyle{long-hyphen-short-hyphen} but the user -supplies the description. The \gloskey{name} is obtained from -\cs{glsxtrlongshortdescname}. - -\item[\abbrstyledef{long-hyphen-postshort-hyphen}] - -New to version 1.17. -This is similar to \abbrstyle{long-hyphen-short-hyphen} but the -inserted and parenthetical material are moved to the post-link hook. -On first use, \cs{gls}\marg{label}\oarg{insert} will do -\begin{display} -\cs{glsxtrlonghyphen}\marg{long}\marg{label}\marg{insert}\cs{glsxtrposthyphenshort}\marg{label}\meta{insert} -\end{display} -where -\begin{definition}[\DescribeMacro\glsxtrposthyphenshort] -\cs{glsxtrposthyphenshort}\marg{label}\meta{insert} -\end{definition} -is in the post-link hook. This uses the format: -\begin{display} -\meta{insert} (\cs{glsfirstabbrvhyphenfont}\marg{short}\meta{isnert}) -\end{display} +\cmddef{mglslastmultilabel} +Expands to the multi-entry label. -\begin{important} -The singular short form is always used here, even with \cs{glspl}. -(Unlike \abbrstyle{long-hyphen-long-hyphen}.) -\end{important} +\cmddef{mglslastcategory} +Expands to the multi-entry category (see +\sectionref{sec:multiglscategory}). This will be empty if no +category was assigned. -The part in the link-text on first use: -\begin{definition}[\DescribeMacro\glsxtrlonghyphen] -\cs{glsxtrlonghyphen}\marg{long}\marg{label}\marg{insert} -\end{definition} -checks if \meta{insert} starts with a hyphen. If it does, then -\cs{glsxtrwordsep} is locally redefined to a hyphen. This command -only uses \meta{insert} to test if it starts with a hyphen. -The actual insertion code isn't typeset until the post-link -hook and it's also localised, which means that you can use -commands like \cs{gls} in \meta{insert} for this style without -causing nested hyperlinks, but only for commands like \cs{gls}. +\cmddef{mglswasfirstuse} +If that was the first use of the multi-entry (see \sectionref{sec:mglsfirstuse}) +this does \meta{true} otherwise it does \meta{false}. -\begin{important} -Don't use \cs{gls} in the \meta{insert} part for commands -like \cs{glsxtrfull}, \cs{glsxtrshort} or \cs{glsxtrlong}. -\end{important} +\subsection{Last Element} +\label{sec:mglspostlinkhooklastelement} +The following commands relate to the last element. -The inline full display format used by commands like \cs{glsxtrfull} -behaves differently to the first use of \cs{gls} with this style. -It's better to use \cs{glsreset}\marg{label}\cs{gls}\marg{label} -if you want to ensure the full format. +\cmddef{mglslastelementlabel} +Expands to the label of the last non-skipped element. If all +elements were skipped or if the multi-entry wasn't defined, this +will be empty. -\item[\abbrstyledef{long-hyphen-postshort-hyphen-desc}] +Test if the last element was skipped: +\cmddef{mglsiflastelementskipped} +If the last element was skipped this does \meta{true} otherwise it +does \meta{false}. +If all elements were skipped or if the multi-entry wasn't defined, +this will do \meta{true}. -New to version 1.17. -This is similar to \abbrstyle{long-hyphen-postshort-hyphen} but the -user supplies the description. The \gloskey{name} is obtained from -\cs{glsxtrlongshortdescname}. +Test if the last element was its first use: +\cmddef{mglsiflastelementwasfirstuse} +If the last non-skipped element was used for the first time this +does \meta{true} otherwise it does \meta{false}. (Corresponds to +\gls{glsxtrifwasfirstuse}.) +If all elements were skipped or if the multi-entry wasn't defined, +this will do \meta{true}. +Test if the last element was plural: +\cmddef{mglsiflastelementwasplural} +If the last non-skipped element had the plural form displayed, this +does \meta{true} otherwise it does \meta{false}. (Corresponds to +\gls{glsifplural}.) +If all elements were skipped or if the multi-entry wasn't defined, +this will do \meta{false}. -\item[\abbrstyledef{short-hyphen-long-hyphen}] -This style (new to v1.17) is like -\abbrstyle{long-hyphen-short-hyphen}, except that the short form -is displayed first followed by the long form in parentheses. The full form is formatted using -\begin{definition}[\DescribeMacro\glsxtrshorthyphenlong] -\cs{glsxtrshorthyphenlong}\marg{label}\marg{short}\marg{long}\marg{insert} -\end{definition} -which behaves in an analogous way to \cs{glsxtrlonghyphenshort}. -The \gloskey{name} is obtained from \cs{glsxtrshortlongname}. +Test if the last element was had any case-changing applied: +\cmddef{mglsiflastelementcapscase} +Corresponds to \gls{glscapscase} of the last non-skipped element. +If all elements were skipped or if the multi-entry wasn't defined, +this will do \meta{no-change}. -\item[\abbrstyledef{short-hyphen-long-hyphen-desc}] +\subsection{Main Element} +\label{sec:mglspostlinkhookmainelement} +The following commands relate to the main element. -New to version 1.17. -This is similar to \abbrstyle{short-hyphen-long-hyphen} but the -user supplies the description. -The \gloskey{name} is obtained from \cs{glsxtrshortlongdescname}. +\cmddef{mglslastmainlabel} +Expands to the label of the main element from the multi-entry that +was just referenced. If the main element was skipped or if the multi-entry +wasn't defined, this will be empty. If this is the same as +\gls{mglslastelementlabel} then the main element was the last +element. -\item[\abbrstyledef{short-hyphen-postlong-hyphen}] -This style (new to v1.17) is like -\abbrstyle{long-hyphen-postshort-hyphen}, but the -short form is displayed first followed by the long form in -parentheses. -On first use, \cs{gls}\marg{label}\oarg{insert} will do -\begin{display} -\cs{glsxtrshorthyphen}\marg{short}\marg{label}\marg{insert}\cs{glsxtrposthyphenlong}\marg{label}\meta{insert} -\end{display} -where -\begin{definition}[\DescribeMacro\glsxtrposthyphenlong] -\cs{glsxtrposthyphenlong}\marg{label}\meta{insert} -\end{definition} -is in the post-link hook. These commands behave in an analogous -manner to those used with \abbrstyle{long-hyphen-postshort-hyphen}. -The \gloskey{name} is obtained from \cs{glsxtrshortlongname}. +Test if the main element was skipped: +\cmddef{mglsiflastmainskipped} +If the main element from the multi-entry that was just referenced +was skipped this does \meta{true} otherwise it does \meta{false}. +If the multi-entry wasn't defined, this will do \meta{true}. -\begin{important} -Don't use \cs{gls} in the \meta{insert} part for commands -like \cs{glsxtrfull}, \cs{glsxtrshort} or \cs{glsxtrlong}. -\end{important} +Test if the main element was its first use: +\cmddef{mglsiflastmainwasfirstuse} +If the main element was used for the first time this +does \meta{true} otherwise it does \meta{false}. (Corresponds to +\gls{glsxtrifwasfirstuse}.) +If the main element was skipped or if the multi-entry wasn't defined, +this will do \meta{true}. -The inline full display format used by commands like \cs{glsxtrfull} -behaves differently to the first use of \cs{gls} with this style. -It's better to use \cs{glsreset}\marg{label}\cs{gls}\marg{label} -if you want to ensure the full format. +Test if the main element was plural: +\cmddef{mglsiflastmainwasplural} +If the main element from the multi-entry that was just referenced +had its plural form displayed this does \meta{true} otherwise it +does \meta{false}. (Corresponds to \gls{glsifplural}.) If the main +element was skipped or if the multi-entry wasn't defined, this will +do \meta{false}. -\item[\abbrstyledef{short-hyphen-postlong-hyphen-desc}] +Test if the main element was had any case-changing applied: +\cmddef{mglsiflastmaincapscase} +Corresponds to \gls{glscapscase} of the main element from the +multi-entry that was just referenced. If the main element was +skipped or if the multi-entry wasn't defined, this will do +\meta{no-change}. -New to version 1.17. -This is similar to \abbrstyle{short-hyphen-postlong-hyphen} but the -user supplies the description. The \gloskey{name} is obtained from -\cs{glsxtrshortlongdescname}. +\section{Multi-Entry First Use} +\label{sec:mglsfirstuse} -\end{description} +Each multi-entry set has an associated first use flag. This is +independent of the \idx{firstuseflag} associated with the individual +entries that make up the set. As with the \idx{glslike} commands, +\gls{mgls} unsets this flag. Unlike the \idx{glstextlike} commands, all +the commands described in \sectionref{sec:mglslike} (including +commands like \gls{mglsname}) unset this flag, even if the elements +use commands like \gls{glsname} that don't unset the entry's +\idx{firstuseflag}. -\section{Defining New Abbreviation Styles} -\label{sec:newabbrvstyle} +You can determine whether or not a multi-entry set has been +marked as used with: +\cmddef{ifmglsused} +This does \meta{true} if the given multi-entry has been marked +as used, otherwise it does \meta{false}. -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} +You can (globally) unset the flag (mark the set as having been referenced) +with: +\cmddef{mglsunset} +or reset it with: +\cmddef{mglsreset} +There are also local versions of these commands: +\cmddef{mglslocalunset} +which locally unsets the flag and +\cmddef{mglslocalreset} +which locally resets the flag. -\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} +It's also possible to unset or reset all multi-entries. +\cmddef{mglsunsetall} +Unsets all multi-entries. -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}. +\cmddef{mglsresetall} +Resets all multi-entries. \begin{important} -\cs{CustomAbbreviationFields} is expanded by \cs{newabbreviation} -so take care to protect commands that shouldn't be expanded. +Note that unsetting or resetting any of the individual element +\idxpl{firstuseflag} doesn't affect the multi-entry flag. +Similarly, unsetting or resetting the multi-entry flag doesn't +affect the \idxpl{firstuseflag} of the individual elements. \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}% - \glsxtrparen{\protect\glsfirstabbrvfont{\the\glsshorttok}}},% - firstplural={\protect\glsfirstlongfont{\the\glslongpltok}% - \protect\glsxtrfullsep{\the\glslabeltok}% - \glsxtrparen{\protect\glsfirstabbrvfont{\the\glsshortpltok}}},% - plural={\protect\glsabbrvfont{\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 basic styles, such as \abbrstyle{long-short}, use commands like -\cs{glsabbrvfont} (which are redefined whenever the style formatting -is set) within \cs{CustomAbbreviationFields}. Other styles, such as -\abbrstyle{long-em-short-em} directly use their own custom commands, -such as \cs{glsabbrvemfont}. With these styles, commands like -\cs{glsabbrvfont} still need to be defined as appropriate in the -\meta{fmts} argument even if they're not used within -\cs{CustomAbbreviationFields}. - -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}.) - -The short or long values may be modified by attributes (such as -\catattr{markwords}). The above registers reflect the modification. -If you want to access the original (unmodified) short or long form -(as provided in the final two arguments of \cs{newabbreviation}), -then use the commands: -\begin{definition}[\DescribeMacro\glsxtrorgshort] -\cs{glsxtrorgshort} -\end{definition} -for the short form and -\begin{definition}[\DescribeMacro\glsxtrorglong] -\cs{glsxtrorglong} -\end{definition} -for the long form. (These may be useful for the \gloskey{sort} key -to avoid any formatting that may be added by the attribute setting.) - -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{long-noshort-sc-desc} style simply does -\begin{verbatim} -\GlsXtrUseAbbrStyleSetup{long-noshort-desc} -\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} - -(New to version 1.17.) -You can also modify the way the subsequent use is formatted by -redefining the following four commands, but these won't be used for -abbreviations with the \catattr{regular} attribute set. If the style -doesn't redefine these commands, the default values are used. - -Singular with no case-change: -\begin{definition}[\DescribeMacro\glsxtrsubsequentfmt] -\cs{glsxtrsubsequentfmt}\marg{label}\marg{insert} -\end{definition} - -Singular with first letter upper case: -\begin{definition}[\DescribeMacro\Glsxtrsubsequentfmt] -\cs{Glsxtrsubsequentfmt}\marg{label}\marg{insert} -\end{definition} - -Plural with no case-change: -\begin{definition}[\DescribeMacro\glsxtrsubsequentplfmt] -\cs{glsxtrsubsequentplfmt}\marg{label}\marg{insert} -\end{definition} - -Plural with first letter upper case: -\begin{definition}[\DescribeMacro\Glsxtrsubsequentplfmt] -\cs{Glsxtrsubsequentplfmt}\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}{\glsxtrabbrvpluralsuffix}% - \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}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - \glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstlongfont{\glsaccesslong{##1}}}% - }% - \renewcommand*{\glsxtrfullplformat}[2]{% - \glsfirstabbrvfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - \glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstlongfont{\glsaccesslongpl{##1}}}% - }% - \renewcommand*{\Glsxtrfullformat}[2]{% - \glsfirstabbrvfont{\Glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstlongfont{\glsaccesslong{##1}}}% - }% - \renewcommand*{\Glsxtrfullplformat}[2]{% - \glsfirstabbrvfont{\Glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\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{long-short-desc} style has the -following in \meta{fmts}: -\begin{verbatim} - \GlsXtrUseAbbrStyleFmts{long-short}% -\end{verbatim} - -Here's an example of an abbreviation style that's based on -\abbrstyle{long-short} that displays the short form within -\cs{textsf}: -\begin{verbatim} -\newabbreviationstyle -{custom-sf}% label -{% setup - \GlsXtrUseAbbrStyleSetup{short-long}% -}% -{% fmts - \GlsXtrUseAbbrStyleFmts{short-long}% - \renewcommand*{\glsabbrvfont}[1]{\textsf{##1}}% -} -\end{verbatim} -Note that this wouldn't work if it was instead based on one of the -modified versions such as \abbrstyle{short-sc-long} as they -explicitly use their own formatting commands, such as -\cs{glsabbrvemfont}. The base styles, such as \abbrstyle{short-long}, -use the more generic \cs{glsabbrvfont} etc which makes them easier -to adapt than the modified styles. - -For further details, see the \qt{Abbreviations} section in the documented code -(\nolinkurl{glossaries-extra-code.pdf}). - -\chapter{Entries in Sectioning Titles, Headers, Captions and Contents} -\label{sec:headtitle} +\section{Multi-Entry Category} +\label{sec:multiglscategory} -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). +A multi-entry set may have an associated category set using the +\mglsopt{category} key described in \sectionref{sec:multiglsoptions}. +This isn't set by default, but if it is set the category may have +attributes set in the usual way. The multi-entry category is +independent of the individual entry categories. The following +attribute is recognised by commands like \gls{mgls}: -\section{Simplistic Approach} -\label{sec:simplisticapproach} +\optiondef{catattr.multioptions} +The value are the default options to apply to any +multi-entry set with the given category. These can be overridden +by the first optional argument of \gls{multiglossaryentry} or by the +\mglsopt{setup} key in the first optional argument of commands like +\gls{mgls}. -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} and \cs{@starttoc}. If you don't like this -change, you can restore their former definitions using -\begin{definition}[\DescribeMacro\glsxtrRevertMarks] -\cs{glsxtrRevertMarks} -\end{definition} -If you only want to restore \cs{@starttoc} you can use: -\begin{definition}[\DescribeMacro\glsxtrRevertTocMarks] -\cs{glsxtrRevertTocMarks} -\end{definition} -If you restore the header or table of contents commands, 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} -Alternatively, you need to find a way to insert \cs{glsxtrmarkhook} and -\cs{@glsxtrinmark} at the start of the header or table of contents -either scoped or afterwards cancelled with \cs{@glsxtrnotinmark} and -\cs{glsxtrrestoremarkhook}. - -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. - -\section{New Commands Designed for Chapter/Section Headings} -\label{sec:headingcommands} +\optiondef{catattr.combinedfirstsep} +The separator to use for \gls{glscombinedfirstsep}. -The commands listed below are designed for use in chapter or section -headings. There are still limitations, but they provide a better -solution. They 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. If the required field contains -non-expandable (robust or fragile) commands that cause a problem for -the bookmarks then \ics{texorpdfstring} will be needed as -appropriate in that field. (Take care if the field has its value -expanded before being assigned.) - -These commands essentially behave as though you have used -\cs{glsxtrshort}, \cs{glstext} etc 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. +\optiondef{catattr.combinedfirstsepfirst} +The separator to use for \gls{glscombinedfirstsepfirst}. -\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} +\optiondef{catattr.combinedsepfirst} +The separator to use for \gls{glscombinedsepfirst}. -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.) - -All caps singular short form: -\begin{definition}[\DescribeMacro\GLSfmtshort] -\cs{GLSfmtshort}\marg{label} -\end{definition} -(No case-change applied to PDF bookmarks.) - -All caps 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.) - -All caps singular long form: -\begin{definition}[\DescribeMacro\GLSfmtlong] -\cs{GLSfmtlong}\marg{label} -\end{definition} -(No case-change applied to PDF bookmarks.) - -All caps 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}. The PDF version has to be a simple -fully expandable command, so one of two commands that are unrelated to the style -is used instead: -\begin{definition}[\DescribeMacro\glspdffmtfull] -\cs{glspdffmtfull}\marg{label} -\end{definition} -for the singular form or: -\begin{definition}[\DescribeMacro\glspdffmtfullpl] -\cs{glspdffmtfullpl}\marg{label} -\end{definition} -for the full form. These simply do the long form followed by the -short form in parentheses. - -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.) - -All caps singular full form: -\begin{definition}[\DescribeMacro\GLSfmtfull] -\cs{GLSfmtfull}\marg{label} -\end{definition} -(No case-change applied to PDF bookmarks.) - -All caps 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.) - -All caps: -\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} -First letter upper case: -\begin{definition}[\DescribeMacro\Glsfmtplural] -\cs{Glsfmtplural}\marg{label} -\end{definition} -and all caps: -\begin{definition}[\DescribeMacro\GLSfmtplural] -\cs{GLSfmtplural}\marg{label} -\end{definition} - -Likewise for the value of the -\gloskey{name} field: -\begin{definition}[\DescribeMacro\glsfmtname] -\cs{glsfmtname}\marg{label} -\end{definition} - -First letter converted to upper case: -\begin{definition}[\DescribeMacro\Glsfmtname] -\cs{Glsfmtname}\marg{label} -\end{definition} -(No case-change applied to PDF bookmarks.) - -All caps: -\begin{definition}[\DescribeMacro\GLSfmtname] -\cs{GLSfmtname}\marg{label} -\end{definition} -(No case-change applied to PDF bookmarks.) - -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.) - -All caps: -\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} -First letter upper case: -\begin{definition}[\DescribeMacro\Glsfmtfirstpl] -\cs{Glsfmtfirstpl}\marg{label} -\end{definition} -and all caps: -\begin{definition}[\DescribeMacro\GLSfmtfirstpl] -\cs{GLSfmtfirstpl}\marg{label} -\end{definition} +\optiondef{catattr.combinedsep} +The separator to use for \gls{glscombinedsep}. -\chapter{Multi (or Compound) Entries} -\label{sec:multientries} -Nested entries (where the entry definition references other entries) -are discussed in \sectionref{sec:nested}. This chapter deals with -occasions where a term or phrase may consist of multiple sub-terms -that are independently defined. (Examples in -\sectionref{sec:exskipfirstsuffix} and -\sectionref{sec:exskippostlink} provide workarounds for nested -entries.) +Note that you can't access the category or its attributes via the +multi-entry label (for example, with \gls{glshasattribute}). If you +need to access the current multi-entry's category within any of the +\gls{mgls}-like hooks (\sectionref{sec:mglselementhooks}), you can +obtain the category with \gls{mglscurrentcategory} and use commands +like \gls{glshascategoryattribute}. -For example, the names of bacteria, such as \emph{Clostridium -botulinum} and \emph{Clostridium perfringens}, are made up of the -genus (for example, \emph{Clostridium}) and the species -(for example, \emph{botulinum} or \emph{perfringens}). The genus is -often abbreviated after \gls{firstuse}. For example, \emph{C. -botulinum}. However, if the name is defined as a single term -consisting of both the genus and species then it's not possible to -apply the abbreviation when a different species with the same genus -is used. +\section{Multi-Entry Settings} +\label{sec:multiglsoptions} -Consider the following document: -\begin{verbatim} -\documentclass{article} -\usepackage{glossaries-extra} -\setabbreviationstyle{long-only-short-only} -\newabbreviation{cbot}{C. botulinum}{Clostridium botulinum} -\newabbreviation{cperf}{C. perfringens}{Clostridium perfringens} -\begin{document} -\gls{cbot}, \gls{cbot}, \gls{cperf}. -\end{document} -\end{verbatim} -The result is: -\begin{display} -Clostridium botulinum, C. botulinum, Clostridium perfringens. -\end{display} -However, it should more typically be: -\begin{display} -Clostridium botulinum, C. botulinum, C. perfringens. -\end{display} -In this case, the genus should actually be a separate definition: -\begin{verbatim} -\documentclass{article} -\usepackage{glossaries-extra} -\setabbreviationstyle{long-only-short-only} -\newabbreviation{clostridium}{C.}{Clostridium} -\newglossaryentry{botulinum}{name={botulinum},description={}} -\newglossaryentry{perfringens}{name=perfringens,description={}} -\begin{document} -\gls{clostridium} \gls{botulinum}, -\gls{clostridium} \gls{botulinum}, -\gls{clostridium} \gls{perfringens}. -\end{document} -\end{verbatim} -This is quite awkward to write. This chapter describes how to -provide a shortcut for this kind of construct. Each term should be -defined as normal (as in the above example), and a \qt{multi-entry} -label is then defined with the list of labels of the entries that -need to be referenced. This is done with the command: -\begin{definition}[\DescribeMacro\multiglossaryentry] -\cs{multiglossaryentry}\oarg{options}\marg{multi-label}\oarg{main -label}\marg{label list} -\end{definition} -where \meta{multi-label} is the new label and \meta{label list} is -the list of labels (corresponding to entries that have already been -defined). - -The \meta{main label} may be omitted, in which case the -main label will be assumed to be the final element in \meta{label -list}. If \meta{main label} is present, it must -also be listed in \meta{label list}. This is described in more -detail in \sectionref{sec:mglsmain}. +The settings that govern all multi-entries can be set using: +\cmddef{multiglossaryentrysetup} +The \meta{options} are the same as for \gls{multiglossaryentry}. -The \meta{options} are a comma-separated list of options to override -the current settings and are described in \sectionref{sec:multiglsoptions}. +Whenever the \gls{mgls}-like commands are used, options are applied in the +following order: +\begin{enumerate} +\item general options identified by \gls{multiglossaryentrysetup}; -The earlier example can now be modified to include the following: -\begin{verbatim} -\multiglossaryentry{cbot}{clostridium,botulinum} -\multiglossaryentry{cperf}{clostridium,perfringens} -\end{verbatim} -These commands must come after the definitions of \texttt{clostridium}, -\texttt{botulinum} and \texttt{perfringens}. - -Once defined, a multi-entry set can be referenced using commands like: -\begin{definition}[\DescribeMacro\mgls] -\cs{mgls}\oarg{options}\marg{multi-label}\oarg{insert} -\end{definition} -This command essentially does \cs{gls}\marg{label} for each item in -the \meta{label list} (with separators, see -\sectionref{sec:mglssep}). If the final optional argument -\meta{insert} is provided, it will be applied to the final -(non-skipped) element in the list. So the document body in the -above example, can be rewritten as: -\begin{verbatim} -\mgls{cbot}, \mgls{cbot}, \mgls{cperf}. -\end{verbatim} +\item the category key is assigned if it's in the general options, +\gls{multiglossaryentry} or \mglsopt{setup} key; -There are some variants of \cs{mgls} listed in \sectionref{sec:mglslike}. -The available \meta{options} are listed in \sectionref{sec:mglsopts}. They are -applied after the \cs{multiglossaryentry} options and will override -settings for the individual entries. +\item \catattr{multioptions} category attribute (if set); -\begin{important} -You can't use \meta{multi-label} in commands like \cs{gls} -as this label represents a set of entry labels not a single entry. -\end{important} +\item any options provided in the first optional argument of +\gls{multiglossaryentry}; -The \cs{multiglossaryentry} command will generate an error if the label has already -been defined as a multi-entry. To do nothing if a multi-entry already exists, -use: -\begin{definition}[\DescribeMacro\providemultiglossaryentry] -\cs{providemultiglossaryentry}\oarg{options}\marg{multi-label}\oarg{main -label}\marg{label list} -\end{definition} -Notes and associated commands applying to \cs{multiglossaryentry} -also apply to \cs{providemultiglossaryentry} unless otherwise -stated. +\item any options provided in the \mglsopt{setup} key in the first +optional argument of the \gls{mgls}-like command. +\end{enumerate} -\begin{important} -\cs{multiglossaryentry} may be placed anywhere after the \meta{label -list} entries have been defined. A multi-entry label can't be -referenced (with commands like \cs{mgls}) before it has been defined. -\end{important} +These options are described below. -There is limited support for \pkgopt[true]{docdef}. The multi-entry -definition can be picked up from the \filetype{aux} file on the next -run to allow cross-references in any glossaries that occur at the -start of the document. Any changes made with commands like -\cs{mglsSetMain} won't be carried over to the next run. +\subsection{Indexing} +\label{sec:multiglsoptionsindexing} -By default \cs{multiglossaryentry} will be localised to the current scope. -If you want to globally define a multi-entry you need to first -switch on global definitions with: -\begin{definition}[\DescribeMacro\multiglossaryentryglobaltrue] -\cs{multiglossaryentryglobaltrue} -\end{definition} -To switch back to local definitions use: -\begin{definition}[\DescribeMacro\multiglossaryentryglobalfalse] -\cs{multiglossaryentryglobalfalse} -\end{definition} +\optiondef{mglsopt.indexmain} +This setting may take one of the following values: +\begin{description} + \item[\optfmt{false}] don't index the main entry; + \item[\optfmt{true}] index the main entry; + \item[\optfmt{first}] only index the main entry if it's the +\idx{firstuse} (of the main entry). +\end{description} -If you want to change the multi-entry options (locally) you can use: -\begin{definition}[\DescribeMacro\mglsSetOptions] -\cs{mglsSetOptions}\marg{multi-label}\marg{new-options} -\end{definition} -This removes the original options. If you want to (locally) append to the -existing options, use: -\begin{definition}[\DescribeMacro\mglsSetOptions] -\cs{mglsAddOptions}\marg{multi-label}\marg{new-options} -\end{definition} +\optiondef{mglsopt.indexothers} +This setting may take one of the following values: +\begin{description} + \item[\optfmt{false}] don't index the other entries; + \item[\optfmt{true}] index the other entries; + \item[\optfmt{first}] only index the other entries if +it's the \idx{firstuse} (of the non-main entry). +\end{description} -Note that \cs{multiglossaryentry} doesn't make any adjustments to -the component entries. You will need to use the \gloskey{parent} key -when you define the entries if you want a hierarchical structure in -your glossary. (See the example in \sectionref{sec:mglsexhier}.) +\subsection{Location Formats (Encaps)} +\label{sec:multiglsoptionsencap} -If you don't want the other elements in the glossary, you can -suppress the indexing with \optfmt{indexothers=false} -(\sectionref{sec:multiglsoptionsindexing}) or put them in an ignored -glossary. For example: -\begin{verbatim} -\newignoredglossary{common} -\newabbreviation[type=common]{clostridium}{C.}{Clostridium} -\end{verbatim} +\optiondef{mglsopt.encapmain} +This setting value should be the value to +pass to \glsopt{format} option (\idx{locationencap}) for the main entry. -The \meta{multi-label} can't be used in commands like \cs{gls} since -the label refers to a set of entry labels not to an individual -entry. Similarly, an individual entry label can't be used in -commands like \cs{mgls}. It is possible (although potentially -confusing) to use the same label for a multi-entry as for an -individual entry (see the example in -\sectionref{sec:exskippostlink}). Context will determine which is -meant, except in the case of the cross-referencing fields -(\gloskey{see}, \gloskey{seealso} and \gloskey{alias}) where the -cross-referenced label will first be tested if it's a known -multi-entry label. +\optiondef{mglsopt.encapothers} +This setting value should be the value to pass to \glsopt{format} +option (\idx{locationencap}) for the other (not main) entries. -If you don't want to have to keep track of which labels refer to -multi-entries and which refer to individual entries you can use: -\begin{definition}[\DescribeMacro\GlsXtrMglsOrGls] -\cs{GlsXtrMglsOrGls}\marg{mgls cs}\marg{gls -cs}\meta{modifier}\oarg{options}\marg{label}\oarg{insert} -\end{definition} -where \meta{mgls cs} is the \cs{mgls}-like command to use if -\meta{label} has been defined as a multi-entry and \meta{gls cs} is -the \cs{gls}-like command to use otherwise. The \meta{modifier} may -be omitted, otherwise it is the modifier that may be used with -\cs{mgls} or \cs{gls} (\texttt{*}, \texttt{+} or the character -identified with \ics{GlsXtrSetAltModifier}). The modifier and remaining -options are passed to the relevant command (\meta{mgls cs} or -\meta{gls cs}). +\subsection{Post-Link Hooks} +\label{sec:multiglsoptionspostlink} -You may prefer to define your own shortcut commands for common -combinations. For example: -\begin{verbatim} -\newcommand{\ac}{\GlsXtrMglsOrGls{\mgls}{\gls}} -\newcommand{\acpl}{\GlsXtrMglsOrGls{\mglsmainpl}{\glspl}} -\newcommand{\Ac}{\GlsXtrMglsOrGls{\Mgls}{\Gls}} -\newcommand{\Acpl}{\GlsXtrMglsOrGls{\Mglsmainpl}{\Glspl}} -\end{verbatim} +\optiondef{mglsopt.postlinks} +This setting determines whether or not to enable the individual +element's \idx{postlinkhook}. The value may be one of: +\begin{description} +\item[\optfmt{none}] suppress the \idx{postlinkhook} for all elements; +\item[\optfmt{all}] don't suppress the \idx{postlinkhook} for all elements; +\item[\optfmt{notlast}] only suppress the \idx{postlinkhook} for the +last element; +\item[\optfmt{mainnotlast}] suppress the \idx{postlinkhook} for all +\qt{other} (not main) elements and for the last element (so only the +main element will have its \idx{postlinkhook} as long as it's not the +last element); +\item[\optfmt{mainonly}] suppress the \idx{postlinkhook} for all +\qt{other} (not main) elements; +\item[\optfmt{othernotlast}] suppress the \idx{postlinkhook} for the +main element and for the last element (so only the other elements +will have their \idx{postlinkhook} as long as the element isn't the last +one); +\item[\optfmt{otheronly}] suppress the \idx{postlinkhook} for the main element. +\end{description} -\section{Examples} -\label{sec:mglsexamples} +\optiondef{mglsopt.mpostlink} +This setting determines whether or not to enable the multi-entry +post-link hook (see \sectionref{sec:mglspostlinkhook}). The value +may be one of: +\begin{description} + \item[\optfmt{false}] suppress the multi-entry post-link hook; + \item[\optfmt{true}] enable the multi-entry post-link hook; + \item[\optfmt{firstonly}] enable the multi-entry post-link hook + only for the \idx{mfirstuse} of the multi-entry; + \item[\optfmt{usedonly}] enable the multi-entry post-link hook + only for the \idx{msubsequentuse} of the multi-entry. +\end{description} -\subsection{Example: Hierarchical} -\label{sec:mglsexhier} +\optiondef{mglsopt.mpostlinkelement} +This setting indicates which +post-link hook should be used if the multi-entry post-link hook has +been enabled. Allowed values: +\begin{description} + \item[\optfmt{last}] use \gls{mglslastelementpostlinkhook} (that +is, use the \idx{postlinkhook} for the last element); + \item[\optfmt{main}] use \gls{mglslastmainpostlinkhook} (that +is, use the \idx{postlinkhook} for the main element); + \item[\optfmt{custom}] use \gls{mglscustompostlinkhook}. +\end{description} -Bacteria names are represented by the genus (for example, -Clostridium) followed by the species (for example, botulinum). -This example has the genus as a parent of the species. -\begin{verbatim} -\documentclass{article} +\begin{warning} +Some combinations may cause a repeated hook. +\end{warning} -\usepackage[colorlinks]{hyperref} -\usepackage[stylemods=bookindex,style=bookindex]{glossaries-extra} +\subsection{Prefixes and Suffixes} +\label{sec:multiglsoptionsfixes} -\makeglossaries +See \sectionref{sec:mglsfixes} for more information on prefixes and +suffixes. Note that the prefixes and suffixes are not affected by +case-changing commands such as \gls{Mgls} or \gls{MGLS}. +If you want a prefix to obey case-changing, use the \gls{mpgls}-like +commands instead (see \sectionref{sec:mpgls}). -\newcommand{\latinname}[1]{\emph{#1}} -\glssetcategoriesattributes - {genus,species}{textformat,glossnamefont}{latinname} +\optiondef{mglsopt.firstprefix} +The prefix to use on \idx{mfirstuse} of the multi-entry. -\setabbreviationstyle[genus]{long-only-short-only-desc} -\newabbreviation - [category=genus,description={}] - {clostridium}{C.}{Clostridium} +\optiondef{mglsopt.usedprefix} +The prefix to use on \idx{msubsequentuse} of the multi-entry. -\newglossaryentry{botulinum}{name=botulinum,category=species, - description={},parent=clostridium} -\newglossaryentry{perfringens}{name=perfringens,category=species, - description={},parent=clostridium} -\newglossaryentry{tetani}{name=tetani,category=species, - description={},parent=clostridium} +\optiondef{mglsopt.firstsuffix} +The suffix to use on \idx{mfirstuse} of the multi-entry. -\multiglossaryentry{cbot}{clostridium,botulinum} -\multiglossaryentry{cperf}{clostridium,perfringens} -\multiglossaryentry{ctet}{clostridium,tetani} +\optiondef{mglsopt.usedsuffix} +The suffix to use on \idx{msubsequentuse} of the multi-entry. -\multiglossaryentrysetup{indexothers=false,hyper=allmain} +\subsection{Skipping Elements} +\label{sec:multiglsoptionsskip} -\begin{document} -First use: -\mgls{cbot}, \mgls{cperf}, \mgls{ctet}. +\begin{information} +The skip options apply to the multi-entry first use flag not the +individual element first use. See \sectionref{sec:mglsfirstuse}. +\end{information} -Next use: -\mgls{cbot}, \mgls{cperf}, \mgls{ctet}. -\printglossaries -\end{document} -\end{verbatim} -This suppresses the indexing of the non-main elements (in this case, -the genus). However the genus is included in the glossary (without a -\gls{numberlist}) because it's the parent of the species (which are -indexed). +\optiondef{mglsopt.firstskipmain} +If \optfmt{true}, the main element will be omitted on (multi-entry) +\idx{mfirstuse}. -The \optfmt{hyper=allmain} option makes the entire content of each -\cs{mgls} a hyperlink to the main entry in the glossary. The -resulting document text (before the glossary) is: -\begin{quote} -First use: -\emph{Clostridium botulinum}, \emph{C. perfringens}, \emph{C. tetani}. +\optiondef{mglsopt.firstskipothers} +If \optfmt{true}, the other (non-main) elements will be omitted on +(multi-entry) \idx{mfirstuse}. -Next use: -\emph{C. botulinum}, \emph{C. perfringens}, \emph{C. tetani}. -\end{quote} +\optiondef{mglsopt.usedskipmain} +If \optfmt{true}, the main element will be omitted on (multi-entry) +\idx{msubsequentuse}. -\subsection{Example: Suffix} -\label{sec:mglsexsuffix} +\optiondef{mglsopt.usedskipothers} +If \optfmt{true}, the other (non-main) elements will be omitted on +(multi-entry) \idx{msubsequentuse}. -This example has a minor modification to the previous one. In this -case the multi-entries are defined with a suffix: -\begin{verbatim} -\multiglossaryentry[firstsuffix=botulism]{cbot}{clostridium,botulinum} -\multiglossaryentry[firstsuffix={gas gangrene}]{cperf}{clostridium,perfringens} -\multiglossaryentry[firstsuffix=tetanus]{ctet}{clostridium,tetani} -\end{verbatim} -The rest of the document is as in \sectionref{sec:mglsexhier}. -The document text is now: -\begin{quote} -First use: -\emph{Clostridium botulinum} (botulism), \emph{C. perfringens} (gas -gangrene), \emph{C. tetani} (tetanus). +Note that it is technically possible to set the skip options so that +both the main and the other elements are skipped. However, by +default, this will generate a warning and only the final optional +argument (the \meta{insert}) will be displayed. There won't be a +loop over all elements so the commands set at each iteration, such +as \gls{mglscurrentlabel}, won't be defined. -Next use: -\emph{C. botulinum}, \emph{C. perfringens}, \emph{C. tetani}. -\end{quote} +The warning and the insertion of the \meta{insert} is done by: +\cmddef{glsxtrmglsWarnAllSkipped} +where \meta{message} is the warning message and \meta{cs} is the +control sequence that encapsulates the entire content (including +hyperlink and the \mglsopt{textformat} setting, if enabled). -\subsection{Example: Category Suffix} -\label{sec:mglsexcatsuffix} +If, for some particular reason, you want this scenario, you can +redefine this command to omit the warning. -This is an alternative to the previous example. Instead of storing -the extra information in the \optfmt{firstsuffix} key, the -information is stored in the \gloskey{user1} key of the last -element (the species). A category suffix is used to look up the -field and append it. -\begin{verbatim} -\newglossaryentry{botulinum}{name=botulinum,category=species, - user1={botulism}, - description={},parent=clostridium} -\newglossaryentry{perfringens}{name=perfringens,category=species, - user1={gas gangrene}, - description={},parent=clostridium} -\newglossaryentry{tetani}{name=tetani,category=species, - user1={tetanus}, - description={},parent=clostridium} - -\mglsdefcategorysuffix{bacteria}{% - \mglsisfirstuse - {\glsxtrifhasfield{useri}{\mglslastelementlabel}{ (\glscurrentfieldvalue)}{}}% - {}% -} - -\multiglossaryentry[category=bacteria]{cbot}{clostridium,botulinum} -\multiglossaryentry[category=bacteria]{cperf}{clostridium,perfringens} -\multiglossaryentry[category=bacteria]{ctet}{clostridium,tetani} -\end{verbatim} -The result is the same as the previous example. +\subsection{General} +\label{sec:multiglsoptionsgeneral} -\subsection{Example: Separators} -\label{sec:mglsexsep} +\optiondef{mglsopt.multi.hyper} +This setting may take one of the following values: +\begin{description} + \item[\optfmt{none}] no hyperlinks; + \item[\optfmt{allmain}] encapsulate the entire content with + a single hyperlink to the main entry's target; + \item[\optfmt{mainonly}] only hyperlink the main entry; + \item[\optfmt{individual}] hyperlink each entry individually; + \item[\optfmt{otheronly}] only hyperlink the other entries; + \item[\optfmt{notmainfirst}] don't hyperlink the main entry on + \idxn{mfirstuse}; + \item[\optfmt{nototherfirst}] don't hyperlink the other entries on + \idxn{mfirstuse}; + \item[\optfmt{notfirst}] don't hyperlink any entries on + \idxn{mfirstuse}. +\end{description} -The first example (\sectionref{sec:mglsexhier}) can be modified so -that the species are also abbreviations. In this case, the -separators are modified to suppress the space (\cs{relax}) if both the genus and -species are abbreviated, or to use a non-breaking space \verb|~| between -the genus short form (shown on subsequent use) and the species long -form (shown on first use). If the genus is showing the long form -(first use) then a normal space is used. +\optiondef{mglsopt.textformat} +This setting value should be the control sequence name (without the +leading backslash) of the command used to encapsulate the entire +content. -Note that the separator attributes apply to the category of the -element before the separator (not to the multi-entry category). -\begin{verbatim} -\glssetcategoryattribute{genus}{combinedfirstsepfirst}{\space} -\glssetcategoryattribute{genus}{combinedfirstsep}{\space} -\glssetcategoryattribute{genus}{combinedsepfirst}{~} -\glssetcategoryattribute{genus}{combinedsep}{\relax} - -\setabbreviationstyle[species]{long-only-short-only-desc} - -\newabbreviation[category=species, - description={},parent=clostridium]{botulinum}{bot.}{botulinum} -\newabbreviation[category=species, - description={},parent=clostridium]{perfringens}{per.}{perfringens} -\newabbreviation[,category=species, - description={},parent=clostridium]{tetani}{tet.}{tetani} -\end{verbatim} -This will cause a double dot at the end of the second sentence, -which can be suppressed using the \catattr{discardperiod} and -\catattr{retainfirstuseperiod} attributes. -\begin{verbatim} -\glssetcategoriesattributes{species}{discardperiod,retainfirstuseperiod}{true} -\end{verbatim} -This works because the final element's post-link hook is transferred -to the multi-entry post-link hook, which can detect the sentence -terminating period. If the post-link hook settings are changed, for -example, to \optfmt{postlinks=all,mpostlink=false} then the feature -won't work as the final element's post-link hook can't detect the -period (because \cs{gls} is embedded too deeply inside the internal -workings of \cs{mgls}). +\optiondef{mglsopt.category} +The category to apply to the multi-entry. This is independent of the +categories of each of the elements. The default is no category. See +\sectionref{sec:multiglscategory}. -The result is: -\begin{quote} -First use: Clostridium botulinum, C.~perfringens, C.~tetani. +\optiondef{mglsopt.mglsopts} +Default options to pass to commands like \gls{mgls}. +Note that \mglsopt{setup} can't be used within this value. -Next use: C.bot., C.per., C.tet. -\end{quote} +\section{\glsfmtname{mgls} Options} +\label{sec:mglsopts} -\subsection{Example: Skipping Elements (Fragment Element)} -\label{sec:exskipfirstsuffix} +The \meta{options} for \gls{mgls} (and similar commands) are listed below. +Any additional options provided will be appended to the \mglsopt{all} +value. For example: +\begin{codebox} +\gls{mgls}\oarg{\glsoptval{counter}{chapter}}\marg{cbot} +\end{codebox} +is equivalent to: +\begin{codebox} +\gls{mgls}\oarg{\mglsoptval{all}{\glsoptval{counter}{chapter}}}\marg{cbot} +\end{codebox} +Whereas: +\begin{codebox} +\gls{mgls}\oarg{\glsoptval{counter}{chapter},\mglsoptval{all}{\glsoptval{counter}{section}}}\marg{cbot} +\end{codebox} +is treated as: +\begin{codebox} +\gls{mgls}\oarg{\mglsoptval{all}{\glsoptval{counter}{section},\glsoptval{counter}{chapter}}}\marg{cbot} +\end{codebox} +which has the same effect as: +\begin{codebox} +\gls{mgls}\oarg{\mglsoptval{all}{\glsoptval{counter}{chapter}}}\marg{cbot} +\end{codebox} + +\begin{information} +The descriptions below reference \gls{gls} which is used internally +by \gls{mgls}. Replace this with \gls{glspl} etc as applicable for the +variants, such as \gls{mglspl}. +\end{information} + +\optiondef{mglsopt.setup} +The value should be a list of any options that can be passed to +\gls{multiglossaryentrysetup}. These options will override any +conflicting options that were supplied to \gls{multiglossaryentry} +or \gls{multiglossaryentrysetup}. Note that \mglsopt{mglsopts} can't be +used within this value. -This example is an alternative way of dealing with nested links -(see \sectionref{sec:nested}). -\begin{verbatim} -\documentclass{article} +\optiondef{mglsopt.all} +The value should be a list of any options that can be passed to +\gls{gls}. These options will be passed to each instance of +\gls{gls} and will override any conflicting setting in +\mglsopt{setup}. + +\optiondef{mglsopt.main} +The value should be a list of any options that +can be passed to \gls{gls}. These options will be passed to the +instance of \gls{gls} used for the main label and will override any +conflicting setting in \mglsopt{all}. + +\optiondef{mglsopt.others} +The value should be a list of any options that +can be passed to \gls{gls}. These options will be passed to each +instance of \gls{gls} used for the other (not main) labels and will +override any conflicting setting in \mglsopt{all}. + +\optiondef{mglsopt.hyper} +A boolean option to determine whether or not to use hyperlinks (if +supported). This may cause a conflict with other options, but is +essentially provided to allow the starred version of \gls{mgls} to +switch off all hyperlinks. + +\optiondef{mglsopt.multiunset} +This only applies to the \idx{mfirstuseflag}, described in +\sectionref{sec:mglsfirstuse}, not the \idxpl{firstuseflag} of the +elements. The value may be one of: +\begin{description} +\item \optfmt{global} globally unset the flag; +\item \optfmt{local} locally unset the flag; +\item \optfmt{none} don't unset the flag. +\end{description} -\usepackage[colorlinks]{hyperref} -\usepackage[stylemods,style=long]{glossaries-extra} +\optiondef{mglsopt.presetlocal} +A boolean option that governs whether or not the following options +should have a local or global effect. + +\optiondef{mglsopt.resetall} +A boolean option to determine whether or not to reset all elements +\emph{before} using \gls{gls}. This option refers to the individual +entry's \idx{firstuseflag} not the \idx{mfirstuseflag}. +(This is similar to passing \glsopt{prereset} to each \gls{gls} but +it's also applied to any skipped elements.) + +\optiondef{mglsopt.resetmain} +A boolean option to determine whether or not +to reset the main entry's \idx{firstuseflag} \emph{before} using +\gls{gls}. + +\optiondef{mglsopt.resetothers} +A boolean option to determine whether or not to reset the +\idx{firstuseflag} of all the other (not main) elements +\emph{before} using \gls{gls}. + +\optiondef{mglsopt.unsetall} +A boolean option to determine whether or not to unset all elements +\emph{before} using \gls{gls}. This option refers to the individual +entry's \idx{firstuseflag} not the \idx{mfirstuseflag}. +(This is similar to passing \glsopt{preunset} to each \gls{gls} but +it's also applied to any skipped elements.) + +\optiondef{mglsopt.unsetmain} +A boolean option to determine whether or not +to unset the main entry's \idx{firstuseflag} \emph{before} using +\gls{gls}. + +\optiondef{mglsopt.unsetothers} +A boolean option to determine whether or not to unset the +\idx{firstuseflag} of all the other (not main) elements +\emph{before} using \gls{gls}. -\makeglossaries +The \optfmt{reset\ldots} options all use: +\cmddef{mglselementreset} +The \optfmt{unset\ldots} options all use: +\cmddef{mglselementunset} +These take the \mglsopt{presetlocal} into account. -\setabbreviationstyle{long-short-sc} -\newabbreviation{ssi}{ssi}{server-side includes} -\newabbreviation{html}{html}{hypertext markup language} +An alternative way of resetting the other elements is to use: +\cmddef{mglsunsetothers} +or for a local reset: +\cmddef{mglslocalunsetothers} -\setabbreviationstyle[combinedabbrv]{long-only-short-sc-only} -\newabbreviation - [category=combinedabbrv, - description={\glsxtrshort{ssi} enabled \glsxtrshort{html}}] - {shtml-frag}{shtml}{enabled} +\section{Variants of \glsfmtname{mgls}} +\label{sec:mglslike} -\glssetcategoryattribute{combinedabbrv}{multioptions} - {usedskipothers,firstsuffix={\glsxtrshort{\mglslastmainlabel}}} +The commands listed in this section all behave like \gls{mgls}. These +(including \gls{mgls} itself) are collectively referred to as the +\gls{mgls}-like commands. All commands unset the \idx{mfirstuseflag} +(unless the \mglsoptval{multiunset}{none} option is applied). Only +those commands that use the \idx{glslike} commands (such as \gls{gls} +or \gls{glspl}) will unset the individual entry's \idx{firstuseflag}. -\multiglossaryentry - [category={combinedabbrv}] - {shtml}[shtml-frag]{ssi,shtml-frag,html} +\subsection{\glsfmtname{gls}-like} +\label{sec:mglsbasic} -\begin{document} -Individual elements first use: \gls{ssi} and \gls{html}. +\cmddef{mglspl} +This uses \gls{glspl} instead of \gls{gls} for each entry. -Individual elements next use: \gls{ssi} and \gls{html}. +\cmddef{mglsmainpl} +This uses \gls{glspl} instead of \gls{gls} for the main entry and +\gls{gls} for all the other entries. -Multi-entry first use: \mgls{shtml}. +\cmddef{Mgls} +This uses \gls{Gls} for the first entry and \gls{gls} for the other +entries. -Multi-entry next use: \mgls{shtml}. +\cmddef{MGls} +This uses \gls{Gls} for all entries. -Resetting all\glsresetall\mglsreset{shtml}: +\cmddef{Mglspl} +This uses \gls{Glspl} for the first entry and \gls{glspl} for the +remaining entries. -Multi-entry first use: \mgls{shtml}. +\cmddef{Mglsmainpl} +The first entry uses the appropriate \idx{sentencecase} command. The +plural form is used for the main entry. So, if the first entry is +also the main entry, \gls{Glspl} is used, otherwise \gls{Gls} is +used. For the remaining entries, \gls{glspl} will be used if the +entry is the main one, otherwise \gls{gls} will be used. -Multi-entry next use: \mgls{shtml}. +\cmddef{MGlspl} +This uses \gls{Glspl} for all entries. -Individual elements: \gls{ssi} and \gls{html}. -\printglossaries -\end{document} -\end{verbatim} -This uses the \catattr{multioptions} attribute to skip \qt{other} -elements on subsequent use. The problematic abbreviation (SHTML) is -defined as a fragment that simply expands to \qt{enabled} on first -use. Note that the description has to be supplied for the glossary. +\cmddef{MGlsmainpl} +This uses \gls{Glspl} for the main entry and \gls{Gls} for the other entries. -The above produces (underlining added to mark the hyperlinks): -\begin{quote} -Individual elements first use: \uline{server-side includes (\textsc{ssi})} and -\uline{hypertext markup language (\textsc{html})}. +\cmddef{MGLS} +This uses \gls{GLS} for all entries. -Individual elements next use: \uline{\textsc{ssi}} and -\uline{\textsc{html}}. +\cmddef{MGLSpl} +This uses \gls{GLSpl} instead of \gls{gls} for each entry. -Multi-entry first use: \uline{\textsc{ssi}} \uline{enabled} -\uline{\textsc{html}} (\uline{\textsc{shtml}}). +\cmddef{MGLSmainpl} +This uses \gls{GLSpl} for the main entry and \gls{GLS} for the others. -Multi-entry next use: \uline{\textsc{shtml}}. +\subsection{Abbreviations} +\label{sec:mglsabbrv} -Resetting all: +\cmddef{mglsshort} +This will use \gls{glsxtrshort} for any entries that have the +\gloskey{short} field set and will use \gls{glstext} otherwise. -Multi-entry first use: \uline{server-side includes (\textsc{ssi})} -\uline{enabled} \uline{hypertext markup language (\textsc{html})} -(\uline{\textsc{shtml}}). +\cmddef{mglslong} +This will use \gls{glsxtrlong} for any entries that have the +\gloskey{long} field set and will use \gls{glstext} otherwise. -Multi-entry next use: \uline{\textsc{shtml}}. +\cmddef{mglsfull} +This will use \gls{glsxtrfull} for any entries that have the +\gloskey{short} field set and will use \gls{glsfirst} otherwise. -Individual elements: \uline{\textsc{ssi}} and \uline{\textsc{html}}. -\end{quote} -The key difference here from the example using \cs{glsps} at the end -of \sectionref{sec:nested} is that the individual elements hyperlink -to their respective entries in the glossary on first use of \cs{mgls}. +\cmddef{Mglsshort} +As \gls{mglsshort} but \idx{sentencecase} for the first entry. -The problem is that with the \pkgopt{colorlinks} package option, -it's not obvious where the hyperlinks start and end. The suffix (\textsc{shtml}) -will hyperlink to the \qt{shtml} entry in the glossary, so the -\qt{enabled} hyperlink is redundant. The simplest fix for this is to -add \optfmt{hyper=notmainfirst} to the option list, which will prevent -\qt{enabled} from being a hyperlink. +\cmddef{Mglslong} +As \gls{mglslong} but \idx{sentencecase} for the first entry. -Another problem occurs where \cs{mgls} is used before the individual elements are -used, which leads to their full expansion with a confusing amount of -parentheses. A simple solution is to use the option -\optfmt{mglsopts=unsetothers}, which will unset the other (not-main) -elements first. This can be localised with \optfmt{presetlocal} but -\cs{gls} will then unset the \gls{firstuseflag} globally, which -means that the other elements won't show the full form when they are -first used on their on after \cs{mgls}. This can be switched to a -local unset with \optfmt{others={local}}. +\cmddef{Mglsfull} +As \gls{mglsfull} but \idx{sentencecase} for the first entry. -The complete set of options are now: -\begin{verbatim} -\glssetcategoryattribute{combinedabbrv}{multioptions} - {% - hyper=notmainfirst, - mglsopts={presetlocal,unsetothers,others={local}}, - usedskipothers, - firstsuffix={\glsxtrshort{\mglslastmainlabel}} - } -\end{verbatim} -This now produces (underlining added to mark the hyperlinks): -\begin{quote} -Individual elements first use: \uline{server-side includes (\textsc{ssi})} and -\uline{hypertext markup language (\textsc{html})}. +\subsection{Other Fields} +\label{sec:mglsotherfields} -Individual elements next use: \uline{\textsc{ssi}} and -\uline{\textsc{html}}. +\cmddef{mglsname} +This uses \gls{glsname} for each entry. -Multi-entry first use: \uline{\textsc{ssi}} \uline{enabled} -\uline{\textsc{html}} (\uline{\textsc{shtml}}). +\cmddef{Mglsname} +This uses \gls{Glsname} for the first entry and \gls{glsname} for +the remaining entries. -Multi-entry next use: \uline{\textsc{shtml}}. +\cmddef{MGlsname} +This uses \gls{Glsname} for each entry. -Resetting all: +\cmddef{mglssymbol} +This uses \gls{glssymbol} for each entry if the \gloskey{symbol} +field has been set, otherwise it uses \gls{gls}. -Multi-entry first use: \uline{\textsc{ssi}} -\uline{enabled} \uline{\textsc{html}} -(\uline{\textsc{shtml}}). +\cmddef{MGlssymbol} +This uses \gls{glssymbol} if the \gloskey{symbol} field has been set +otherwise it uses \gls{Gls} for each element. (Note that no +\idx{casechange} is applied to the symbol as this usually isn't appropriate.) -Multi-entry next use: \uline{\textsc{shtml}}. +\cmddef{Mglssymbol} +As \gls{MGlssymbol}, but \gls{Gls} is only used for the first element (if it +doesn't have the \gloskey{symbol} field set). -Individual elements: \uline{server-side includes (\textsc{ssi})} -and \uline{hypertext markup language (\textsc{html})}. -\end{quote} -This method still has two main drawbacks: the description must be -added manually and the long form can't be accessed with -\cs{glsxtrlong}. The next example provides an alternative approach. +\cmddef{mglsusefield} +If the field given by \gls{mglsfield} exists for an element, +\gls{glsdisp} will be used for that element, with the \idx{linktext} +obtained from the field value (followed by the \meta{insert}), +otherwise \gls{gls} will be used. -\subsection{Example: Skipping Elements (Prefix and Post-Link Hooks)} -\label{sec:exskippostlink} +\cmddef{mglsfield} +This command expands to the \idx{internalfieldlabel} required by +\gls{mglsusefield}. The default value is \code{useri}, which +corresponds to the \gloskey{user1} key. -This is a modified version of the previous example. In this case, -the main element isn't a fragment and also happens to have the same -label as the multi-entry set. (\verb|\mgls{shtml}| references the -multi-entry label and \verb|\gls{shtml}| references the individual -entry.) +\cmddef{Mglsusefield} +As \gls{mglsusefield} but \idx{sentencecase} for the first +element. -In this case, the nested parts are marked up with custom commands: -\begin{verbatim} -\newrobustcmd{\combinedpre}[1]{\glsps{#1}} -\newrobustcmd{\combinedpost}[1]{\glsps{#1}} +\cmddef{MGlsusefield} +As \gls{mglsusefield} but \idx{sentencecase} for each +element. -\newabbreviation{shtml}{shtml} -{{}\combinedpre{ssi} enabled \combinedpost{html}} -\end{verbatim} -This means that it's no longer necessary to manually insert the -description and the long form can be accessed as usual with -\cs{glsxtrshort}\verb|{shtml}|. Note that it is necessary to define -the custom commands robustly otherwise they will need to be -protected against premature expansion: -\begin{verbatim} -\newcommand{\combinedpre}[1]{\glsps{#1}} -\newcommand{\combinedpost}[1]{\glsps{#1}} +You can use the pre-element hook \gls{mglselementprehook} to locally +redefine \gls{mglsfield}. Examples: +\begin{enumerate} +\item if the multi-category is \qt{sample} then use the +\gloskey{user2} field otherwise use the \gloskey{user1} field: +\begin{codebox} +\cmd{renewcommand}\marg{\gls{mglselementprehook}}\marg{\% + \cmd{ifdefstring}\marg{\gls{mglscurrentcategory}}\marg{sample}\% + \marg{\cmd{renewcommand}\marg{\gls{mglsfield}}\marg{userii}}\% + \marg{\cmd{renewcommand}\marg{\gls{mglsfield}}\marg{useri}}\% +} +\end{codebox} -\newabbreviation{shtml}{shtml} -{{}\protect\combinedpre{ssi} enabled \protect\combinedpost{html}} -\end{verbatim} -In both cases, an initial empty group is added to guard -against any first letter uppercase commands, such as \cs{Glsxtrlong}. +\item if the element's category is \qt{sample} then use the +\gloskey{user2} field otherwise use the \gloskey{user1} field: +\begin{codebox} +\cmd{renewcommand}\marg{\gls{mglselementprehook}}\marg{\% + \gls{glsifcategory}\marg{\gls{mglscurrentlabel}}\marg{sample}\% + \marg{\cmd{renewcommand}\marg{\gls{mglsfield}}\marg{userii}}\% + \marg{\cmd{renewcommand}\marg{\gls{mglsfield}}\marg{useri}}\% +} +\end{codebox} -The abbreviations all use the \abbrstyle{long-postshort-sc-user} -style, which places the short form in the post-link hook on -\gls{firstuse}. The \cs{gls} post-link hook for the main element -can be transferred to the \cs{mgls} post-link using: -\begin{verbatim} -mpostlinkelement=main -\end{verbatim} -All elements have their individual post-link hooks suppressed by default. -As in the previous example, the other elements can be skipped on -subsequent use: -\begin{verbatim} -usedskipothers -\end{verbatim} -Within \cs{mgls}, the nested content needs to be suppressed, which -can be done by redefining the custom commands. This can be done in -the multi-entry prefix. Since the entire content of \cs{mgls} (except for the -final multi-entry post-link hook) occurs inside a group, this -redefinition will be localised. +\item if either the multi-entry's category or the element's category +has the custom attribute \qt{mglsfield} set then use it otherwise use +the \gloskey{user1} field: +\begin{codebox} +\cmd{renewcommand}\marg{\gls{mglselementprehook}}\marg{\% + \gls{glshascategoryattribute}\marg{\gls{mglscurrentcategory}}\marg{mglsfield}\% + \marg{\cmd{renewcommand}\marg{\gls{mglsfield}}\marg{\gls{glsgetcategoryattribute}\marg{\gls{mglscurrentcategory}}\marg{mglsfield}}}\% + \marg{\% + \gls{glshasattribute}\marg{\gls{mglscurrentlabel}}\marg{mglsfield}\% + \marg{\cmd{renewcommand}\marg{\gls{mglsfield}}\marg{\gls{glsgetattribute}\marg{\gls{mglscurrentlabel}}\marg{mglsfield}}}\% + \marg{\cmd{renewcommand}\marg{\gls{mglsfield}}\marg{useri}}\% + }\% +} +\end{codebox} +\end{enumerate} -The complete document is as follows: -\begin{verbatim} -\documentclass{article} +\subsection{Support for \glsfmtname{pkg.glossaries-prefix} (\glsfmtname{pgls})} +\label{sec:mpgls} -\usepackage[colorlinks]{hyperref} -\usepackage[stylemods,style=long]{glossaries-extra} +If you load the \sty{glossaries-prefix} package (either after +\sty{glossaries-extra}) or with the \opt{prefix} package +option, then the following commands will use one of the +\gls{pgls}-like commands provided by that package. (See the +\sty{glossaries} user manual for further details.) -\makeglossaries +If the \sty{glossaries-prefix} package hasn't been loaded then +\gls{gls} (or analogous case-changing variant) will be used instead +and a warning is issued with: +\cmddef{mpglsWarning} +This may be redefined to do nothing to remove the warning. -\setabbreviationstyle{long-postshort-sc-user} +\cmddef{mpgls} +Uses \gls{pgls} for the first element and \gls{gls} for the remaining +elements. -\newabbreviation{ssi}{ssi}{server-side includes} -\newabbreviation{html}{html}{hypertext markup language} +\cmddef{mpglspl} +Uses \gls{pglspl} for the first element and \gls{glspl} for the remaining +elements. -\newrobustcmd{\combinedpre}[1]{\glsps{#1}} -\newrobustcmd{\combinedpost}[1]{\glsps{#1}} +\cmddef{mpglsmainpl} +Only uses the plural form for the main element. The first element +uses the prefixing command (\gls{pgls} or \gls{pglspl}, depending on +whether the first element is the main element). -\newabbreviation{shtml}{shtml} -{{}\combinedpre{ssi} enabled \combinedpost{html}} +\cmddef{Mpgls} +Uses \gls{Pgls} for the first element and \gls{gls} for the remaining +elements. -\glssetcategoryattribute{combinedabbrv}{multioptions} - {% - mpostlinkelement=main, - usedskipothers - } +\cmddef{Mpglsmainpl} +Only uses the plural form for the main element. The first element +uses the \idx{sentencecase} prefixing command (\gls{Pgls} or +\gls{Pglspl}, depending on whether the first element is the main +element). -\multiglossaryentry - [category={combinedabbrv}] - {shtml}[shtml]{ssi,shtml,html} +\cmddef{MPGls} +Uses \gls{Pgls} for the first element and \gls{Gls} for the remaining +elements. -\mglsdefcategoryprefix{combinedabbrv}{% - \renewcommand{\combinedpre}[1]{\ignorespaces}% - \renewcommand{\combinedpost}[1]{\unskip}% -} +\cmddef{MPGlspl} +Uses \gls{Pglspl} for the first element and \gls{Glspl} for the remaining +elements. -\begin{document} -Individual elements first use: \gls{ssi} and \gls{html}. +\cmddef{MPGlsmainpl} +Only uses the plural form for the main element. The first element +uses the prefixing command (\gls{Pgls} or \gls{Pglspl}, depending on +whether the first element is the main element). All elements are +use \idx{sentencecase}. -Individual elements next use: \gls{ssi} and \gls{html}. +\cmddef{MPGLS} +Uses \gls{PGLS} for the first element and \gls{GLS} for the remaining +elements. -Multi-entry first use: \mgls{shtml}. +\cmddef{MPGLSpl} +Uses \gls{PGLSpl} for the first element and \gls{GLSpl} for the remaining +elements. -Multi-entry next use: \mgls{shtml}. +\cmddef{MPGLSmainpl} +Only uses the plural form for the main element. All elements are +converted to \idx{allcaps}. The first element uses the prefixing command +(\gls{PGLS} or \gls{PGLSpl}, depending on whether the first element is +the main element). -Individual entry first use: \gls{shtml}. +\section{Cross-References} +\label{sec:msee} -Resetting all\glsresetall\mglsresetall: +Multi-entry labels may be used in the cross-referencing keys +\gloskey{see} and \gloskey{seealso}. The formatting command will +use: +\cmddef{mglsseefirstitem} +for the first item in the list (if it's a multi-entry) and +\cmddef{mglsseeitem} +for any subsequent items that are multi-entries. The default +definition of \gls{mglsseeitem} is: +\begin{compactcodebox} +\cmd{newcommand}*\marg{\gls{mglsseeitem}}[1]\marg{\% + \gls{mglsname}\oarg{\mglsoptval{all}{noindex},\mglsoptvalm{setup}{hyper=allmain}}\marg{\#1}\% +} +\end{compactcodebox} +This switches off indexing, sets the hyperlink to encompass the +entire multi-entry content and uses the \gloskey{name} field. +The default definition of \gls{mglsseefirstitem} is simply +\gls{mglsseeitem}. -Multi-entry first use: \mgls{shtml}. +For example, to use the \gloskey{short} or \gloskey{text} fields: +\begin{compactcodebox} +\cmd{renewcommand}*\marg{\gls{mglsseeitem}}[1]\marg{\% + \gls{mglsshort}\oarg{\mglsoptval{all}{noindex},\mglsoptvalm{setup}{hyper=allmain}}\marg{\#1}\% +} +\end{compactcodebox} -Multi-entry next use: \mgls{shtml}. +A multi-entry label may also be used in the \gloskey{alias} key. The +hyperlink target will be the target for the main entry. For example: +\begin{codebox} +\gls{multiglossaryentry}\marg{cbot}\marg{clostridium,botulinum} +\gls{newglossaryentry}\marg{botox}\marg{\gloskeyval{name}{botox},\gloskeyval{description}{},\gloskeyval{alias}{cbot}} +\end{codebox} +In this case \code{\gls{gls}\marg{botox}} will hyperlink to the +\code{botulinum} target. -Individual elements: \gls{ssi} and \gls{html}. +\begin{important} +Any multi-entries used in the cross-referencing keys must be defined +before the glossary is displayed. There is some support for +\optval{docdef}{true} but not for the other \opt{docdef} settings. +\end{important} -Resetting all\glsresetall\mglsresetall: +\section{Additional Commands} +\label{sec:multiextras} -Individual entry first use: \gls{shtml}. +You can test if a label represents a multi-entry using: +\cmddef{glsxtrifmulti} +This does \meta{true} if a multi-entry has been defined with +the label \meta{multi-label} otherwise it does \meta{false}. -Multi-entry first use: \mgls{shtml}. (Wrong!) +\cmddef{glsxtrmultimain} +Expands to the main entry label for the multi-entry identified by +\meta{multi-label} or nothing if not defined. -\printglossaries -\end{document} -\end{verbatim} -This now produces (underlining added to mark the hyperlinks): -\begin{quote} -Individual elements first use: \uline{server-side includes} -(\textsc{ssi}) and \uline{hypertext markup language} (\textsc{html}). +\cmddef{glsxtrmultilist} +Expands to the list of element labels for the multi-entry identified by +\meta{multi-label} or nothing if not defined. -Individual elements next use: \uline{\textsc{ssi}} and -\uline{\textsc{html}}. +\cmddef{mglsforelements} +Iterates over all the list of element labels for the multi-entry identified by +\meta{multi-label}. This defines \meta{cs} to the current element label on each +iteration of the loop, which can be used to reference the label in +\meta{body}. This internally uses \gls{@for} (patched by the +\sty{xfor} package, which allows the loop to be broken). -Multi-entry first use: \uline{\textsc{ssi}} \uline{enabled} -\uline{\textsc{html}} (\textsc{shtml}). +\cmddef{mglsforotherelements} +As \gls{mglsforelements} but skips the main entry label. -Multi-entry next use: \uline{\textsc{shtml}}. +\cmddef{glsxtrmultitotalelements} +Expands to the total number of elements in the given multi-entry or nothing if +\meta{multi-label} hasn't been defined. -Individual entry first use: \uline{\textsc{shtml}}. +\cmddef{glsxtrmultimainindex} +Expands to the index of the main element in the given multi-entry or nothing if +\meta{multi-label} hasn't been defined. Indexing starts from 1 for the first +element. -Resetting all: +\cmddef{glsxtrmultilastotherindex} +Expands to the index of the final non-main element in the given +multi-entry or nothing if \meta{multi-label} hasn't been defined. -Multi-entry first use: \uline{server-side includes} \uline{enabled} -\uline{hypertext markup language} (\textsc{shtml}). +The \gls{multiglossaryentry} command will write the label information +to the \ext{aux} file using: +\cmddef{writemultiglossentry} +This is will write the following line to the \ext+{aux} file: +\cmddef{@glsxtr@multientry} +This is provided to support \optval{docdef}{true} and also +for the benefit of any tools that require the +information (such as \app{bib2gls} or autocompletion tools). +If it's not required and causes too much clutter, it can +be disabled by redefining \gls{writemultiglossentry} to do nothing. -Multi-entry next use: \uline{\textsc{shtml}}. +\section{\glsfmtname{app.bib2gls}} +\label{sec:mbib2gls} -Individual elements: \uline{\textsc{ssi}} and \uline{\textsc{html}}. +In the \app{bib2gls} v2.9+ user manual, these multi-entry sets are +referred to as \qt{compound entries} or \qt{compound sets} to +differentiate them from \app{bib2gls}['s] multi-entry types (such as +\atentry{dualentry}). -Resetting all: +Each instance of one of the \gls{mgls}-like commands is written to +the \ext{aux} file and so can be picked up by \app{bib2gls} +(at least version 2.9). The \idx{resourceopt} can be used to +determine whether or not to consider the other (non-main) elements +to be dependent on the main element. -Individual entry first use: \uline{\textsc{ssi}} \uline{enabled} -\uline{\textsc{html}} (\textsc{shtml}). +With \app{bib2gls}, you can either define the compound entries in +the document with \gls{multiglossaryentry} (or +\gls{providemultiglossaryentry}) or you can use the \atentry{compoundset} +entry type in a \ext{bib} file. Whichever method you use, +remember that the entries that form the elements of the set must be +defined first. See the \app{bib2gls} manual (v2.9+) for further details. -Multi-entry first use: \uline{server-side includes} -\uline{\textsc{shtml}} \uline{hypertext markup language}. (Wrong!) -\end{quote} -Note the last two paragraphs, which highlights what happens if -\verb|\gls{shtml}| is used before \verb|\mgls{shtml}| when neither -of the other elements (\texttt{ssi} and \texttt{html}) have been -used. The final instance of \cs{mgls} has produced the wrong result. -This is because it's the first use of the multi-entry \texttt{shtml} but -not the first use of the individual entry \texttt{shtml}. +You can use the resource option \resourceopt{compound-adjust-name} +to replace the \gloskey{name} field of the main entry to: +\cmddef{glsxtrmultientryadjustedname} +where \meta{multi-label} is the label identifying the compound set, +\meta{name} was the value of the \gloskey{name} before adjustment, +\meta{sublist1} is the sub-list of other element labels +before the main element (empty if the main element is the first +element in the list), and \meta{sublist2} is the sub-list of +other elements after the main element (empty if the main label is +the final element). -One way around this is to modify the prefix to ensure that the main -element's \gls{firstuseflag} matches the multi-entry's first use -flag: -\begin{verbatim} -\mglsdefcategoryprefix{combinedabbrv}{% - \renewcommand{\combinedpre}[1]{\ignorespaces}% - \renewcommand{\combinedpost}[1]{\unskip}% - \mglsisfirstuse - {\glslocalreset{\mglscurrentmainlabel}}% - {\glslocalunset{\mglscurrentmainlabel}}% -} -\end{verbatim} +This command is defined in \sty{glossaries-extra-bib2gls}, which is +automatically loaded with \opteqvalref{record}{only} and +\opteqvalref{record}{nameref}. Case-changing versions of this command are +also available. -The \pkgopt[annoteleft]{showtargets} option can be used to mark up -the links with the targets. For example, the first instance of -\verb|\mgls{shtml}| will show as: -\begin{quote} -\newcommand{\markup}[2]{% -{\glsshowtargetfont[#1]}% -\glsxtrshowtargetsymbolleft#2\glsxtrshowtargetsymbolright}% -Multi-entry first use: \markup{glo:ssi}{\textsc{ssi}} -\markup{glo:shtml}{enabled} -\markup{glo:html}{\textsc{html}} (\textsc{shtml}). -\end{quote} -Each entry has an individual hyperlink to its own glossary item, -which may be confusing. This can be made clearer by suppressing the -main element link on first use with: -\begin{verbatim} -hyper=notmainfirst -\end{verbatim} -(as in the previous example), and adjusting the abbreviation style -so that the parenthetical content in the post-link hook has a -hyperlink: -\begin{verbatim} -\renewcommand*{\glsxtruserparen}[2]{% - \glsxtrfullsep{#2}% - \glsxtrparen - {\glshyperlink[#1]{#2}% - \ifglshasfield{\glsxtruserfield}{#2}{, \glscurrentfieldvalue}{}% - }% -} -\end{verbatim} +\cmddef{Glsxtrmultientryadjustedname} +This is a \idx{sentencecase} version of +\gls{glsxtrmultientryadjustedname}. -The remaining problem is how to deal with the possibility that -\verb|\mgls{shtml}| may come before the \gls{firstuse} of the other -elements. For example: -\begin{verbatim} -Multi-entry first use: \mgls{shtml}. +\cmddef{GlsXtrmultientryadjustedname} +This is a \idx{titlecase} version of +\gls{glsxtrmultientryadjustedname}. -Individual elements: \gls{ssi} and \gls{html}. -\end{verbatim} -This leads to: -\begin{quote} -Multi-entry first use: server-side includes enabled hypertext markup -language (\textsc{shtml}). +\cmddef{GLSxtrmultientryadjustedname} +This is an \idx{allcaps} version of +\gls{glsxtrmultientryadjustedname}. -Individual elements: \textsc{ssi} and \textsc{html}. -\end{quote} -This means that the abbreviations \textsc{ssi} and \textsc{html} -aren't explained in the document text. One way around this is to -only locally unset the other element \glspl{firstuseflag}: -\begin{verbatim} -\glssetcategoryattribute{combinedabbrv}{multioptions} - {% - hyper=notmainfirst, - mpostlinkelement=main, - usedskipothers, - mglsopts={others={local}} - } -\end{verbatim} -With the above setting, the following: -\begin{verbatim} -\glsresetall\mglsresetall +Note that the above commands don't take the prefix or suffix into +account (see \sectionref{sec:mglsfixes}). -Multi-entry first use: \mgls{shtml}. +The separator between each element in the sub-lists is produced +with: +\cmddef{glsxtrmultientryadjustednamesep} +The default definition just uses \gls{glscombinedfirstsepfirst}. -Multi-entry next use: \mgls{shtml}. +The separator between the last element of \meta{sublist1} and the +main element is produced with: +\cmddef{glsxtrmultientryadjustednamepresep} +Similarly for the separator between the main element and the first +element of \meta{sublist2}: +\cmddef{glsxtrmultientryadjustednamepostsep} +These both default to \gls{glsxtrmultientryadjustednamesep}. -Individual elements: \gls{ssi} and \gls{html}. -\end{verbatim} -will now produce: -\begin{quote} -Multi-entry first use: server-side includes enabled hypertext markup -language (\textsc{shtml}). +The \meta{name} is encapsulated with: +\cmddef{glsxtrmultientryadjustednamefmt} +This just does its argument by default. +If \meta{sublist1} is empty for the \idx{sentencecase} +version, then \meta{name} is encapsulated with: +\cmddef{Glsxtrmultientryadjustednamefmt} +This does \gls{makefirstuc}\marg{text} by default. +For the \idx{titlecase} version, the name is encapsulated with: +\cmddef{GlsXtrmultientryadjustednamefmt} +This uses \gls{glscapitalisewords}, if defined, or \gls{capitalisewords} otherwise. +The \idx{allcaps} version uses: +\cmddef{GLSxtrmultientryadjustednamefmt} +This uses \gls{mfirstucMakeUppercase} by default. -Multi-entry next use: \textsc{shtml}. +Each element label in the sub-lists is encapsulated with: +\cmddef{glsxtrmultientryadjustednameother} +This does \code{\gls{glsentryname}\margm{label}} by default. +For the \idx{sentencecase} version (where +\meta{sublist1} isn't empty), then the element label is encapsulated +with: +\cmddef{Glsxtrmultientryadjustednameother} +This does \code{\gls{Glsentryname}\margm{label}} by default. +The \idx{titlecase} version uses: +\cmddef{GlsXtrmultientryadjustednameother} +This does \code{\gls{glsentrytitlecase}\margm{label}\marg{name}} by +default. The \idx{allcaps} version uses: +\cmddef{GLSxtrmultientryadjustednameother} +This is defined as: +\begin{compactcodebox} +\cmd{newcommand}*\marg{\gls{GLSxtrmultientryadjustednameother}}[1]\marg{\% + \gls{mfirstucMakeUppercase}\marg{\gls{glsentryname}\marg{\#1}}} +\end{compactcodebox} -Individual elements: server-side includes (\textsc{ssi}) and -hypertext markup language (\textsc{html}). -\end{quote} +\chapter{Defining and Displaying Glossaries} +\label{sec:glossaries} -\section{Main and Other Elements} -\label{sec:mglsmain} +As with the base \sty{glossaries} package, you need to establish the +indexing method in the preamble and use the appropriate +\csmetafmt{print}{\ldots}{glossary} command. For example, to use the +\qt{noidx} method you need \gls{makenoidxglossaries} in the preamble +and \gls{printnoidxglossary} in the document. Whereas if you want to +use \app{makeindex} or \app{xindy}, you need \gls{makeglossaries} in +the preamble and \gls{printglossary} in the document. The +\sty{glossaries-extra} package provides a hybrid approach: +\cmddef{makeglossaries} +If the optional argument is present, then \meta{types} should be a +comma-separated list of \idx{glossary} labels that should be +processed by \app{makeindex} or \app{xindy} as per the normal +behaviour of \gls{makeglossaries}. Any non-\idxpl{ignoredglossary} +that are not listed in \meta{types} should be treated as though +\gls{makenoidxglossaries} was used. This means that the +\idxpl{glossary} listed in \meta{types} should be displayed using +\gls{printglossary} and the other (non-\idxpl{ignoredglossary}) +should be displayed with \gls{printnoidxglossary}. See +\file{sample-mixedsort.tex} for an example. + +If the optional argument is omitted, it will be treated as per the +original \gls{makeglossaries} provided by the base \sty{glossaries} +package. If the optional argument is present, +\gls{glsindexingsetting} will be set to \code{makeindex-noidx} or +\code{xindy-noidx}, depending on whether \app{makeindex} or +\app{xindy} should be used. + +\begin{information} +\Idxpl{glossary} can't be defined after \gls{makeglossaries}. This +ensures that all the required \idx{indexing} files are opened. +If you're not using \gls{makeglossaries}, \idxpl{glossary} need to +be defined before any entries that should belong to them are +defined. +\end{information} + +The base \sty{glossaries} package provides \gls{newignoredglossary} +to define an \idx{ignoredglossary} that doesn't have any associated +\idx{indexing} files. This will automatically switch off hyperlinks +for any entries assigned to the \idx{glossary} (since there will be +no target). With \sty{glossaries-extra}, it's possible to have +targets without using the \idx{indexing} methods provided by the +base package. For example, it's possible to have standalone entries +(see \sectionref{sec:glossentry}) or targets can be created with +\gls{printunsrtglossary}, so \sty{glossaries-extra} provides a +starred version. +\cmddef{newignoredglossary*} +This behaves like the unstarred version but doesn't disable +hyperlinks. The \idx{glossary} will still be omitted by iterative +commands, such as \gls{printunsrtglossaries}, and can't be used with +\gls{printglossary} or \gls{printnoidxglossary}. If you use an +\idx{ignoredglossary} with \gls{printunsrtglossary}, you will need +to use the \printglossopt{title} option to override the default +title, if required. + +\cmddef{provideignoredglossary} +This is like \gls{newignoredglossary} but does nothing if the +\idx{glossary} has already been defined. + +With the \idx{indexing} options provided by the base +\sty{glossaries} package, if you want a term to appear in more than +one \idx{glossary}, it's necessary to define a duplicate entry with +a different label. With the \idx{unsrtfam}, the same entry can +appear in multiple \idxpl{glossary}. This can be done by simply +copying the entry's label to the required \idx{glossary} using: +\cmddef{glsxtrcopytoglossary} +This just adds the label to the target \idx{glossary}['s] internal +comma-separated list that commands like \gls{printunsrtglossary} +iterate over. The unstarred version locally adds the label. The +starred version performs a global change. + +\begin{warning} +\gls{glsxtrcopytoglossary} is not compatible with \opteqvalref{docdef}{true}. +\end{warning} + +Note that the \gloskey{type} field will still be set to the original +\idx{glossary}. This is considered the entry's primary glossary. +There's no field that keeps track of the additional \idxpl{glossary} +the entry has been copied to. + +If used with \gls{printglossary} or \gls{printnoidxglossary}, the +entry will only be \indexed\ for its primary \idx{glossary}. It +won't show up in the other \idxpl{glossary}, but will be found when +using an iterative command, such as \gls{glsaddall}, over the target +\idx{glossary}. + +The base \sty{glossaries} package provides \gls{forallglossaries} to +iterate over a list of \idxpl{glossary} labels (all +non-\idxpl{ignoredglossary} by default). This can also be used with +\sty{glossaries-extra} but \gls{forallacronyms} is only for +\idxpl{glossary} that have been declared as lists of acronyms, so +it's inappropriate with the \sty{glossaries-extra} package. Instead, +you can use the analogous command: +\cmddef{forallabbreviationlists} +Each instance of \gls{newabbreviation} will add the abbreviation's +associated \idx{glossary} (identified by the \gloskey{type} key) to +the internal list of labels (if not already added). Note that this +won't take into account any \idxpl{glossary} that had +abbreviations copied or moved to it. + +\section{Entry Page Reference} +\label{sec:glspageref} + +The base \sty{glossaries} package provides \gls{glsrefentry}, which +uses \gls{ref} to reference the entry's associated counter +(enabled with \opt{entrycounter} or \opt{subentrycounter}, not the +\idx{locationcounter}). The +\sty{glossaries-extra} package additionally provides: +\cmddef{glsxtrpageref} +This works in the same way but uses \gls{pageref} instead of +\gls{ref}. As with \gls{glsrefentry}, if the corresponding counter +has not been enabled, this just does \code{\gls{gls}\margm{entry-label}}. + +\section{Glossary Preamble} +\label{sec:glospreamble} + +The base package provides \gls{glossarypreamble}, which is used at +the start of the \idx{glossary}. By default, this will use the preamble +associated with the current \idx{glossary}. If you redefine +\gls{glossarypreamble}, this will set the preamble for all +glossaries. To set the preamble for a particular glossary, you can +use \gls{setglossarypreamble}. With \sty{glossaries-extra}, you can +additionally append to an existing preamble using: +\cmddef{apptoglossarypreamble} +This (locally) appends \meta{text} to the preamble for the +\idx{glossary} identified by \meta{type}. If \meta{type} is omitted, +\gls{glsdefaulttype} is assumed. + +\cmddef{pretoglossarypreamble} +This (locally) prepends \meta{text} to the preamble for the +\idx{glossary} identified by \meta{type}. If \meta{type} is omitted, +\gls{glsdefaulttype} is assumed. + +\section{Options} +\label{sec:printglossopts} + +In addition to the \idxc{printglossopt}{options} available with +\gls{printglossary}, the following options are also provided. Some +of these listed here are specific to \gls{printunsrtglossary} and +\env{printunsrtglossarywrap}. Options provided by the base package +that aren't available for the \idx{unsrtfam} are identified below. + +\optiondef{printgloss.sort} +This option is only available for \gls{printnoidxglossary}. The +\gls{printunsrtglossary} and \gls{printunsrtinnerglossary} commands +simply iterate over the \idx{glossary}['s] internal list in the +order in which the entries have been added to that \idx{glossary}. +If you are using \app{bib2gls}, use the \resourceopt{sort} resource +option instead. + +\optiondef{printgloss.title} +This option is provided by the base \sty{glossaries} package to +override the default title for the \idx{glossary}. This option +is also available for \gls{printunsrtglossary} and +\env{printunsrtglossarywrap} but not for +\gls{printunsrtinnerglossary}. + +\optiondef{printgloss.toctitle} +This option is provided by the base \sty{glossaries} package to +override the default table of contents title for the \idx{glossary}. This option +is also available for \gls{printunsrtglossary} and +\env{printunsrtglossarywrap} but not for +\gls{printunsrtinnerglossary}. + +\optiondef{printgloss.numberedsection} +This option is provided by the base \sty{glossaries} package to +indicate whether or not the section header used at the start of the +\idx{glossary} should be numbered rather than unnumbered (and +whether or not to automatically label the glossary with +\code{\gls+{label}\marg{\gls{glsautoprefix}\meta{glossary-type}}}). The +\opt{numberedsection} package option will change the default setting +to match. This option is not available for +\gls{printunsrtinnerglossary}. + +\optiondef{printgloss.style} +This option is provided by the base \sty{glossaries} package to +set the \idx{glossarystyle}. This option is not +available for \gls{printunsrtinnerglossary}. + +\optiondef{printgloss.label} +This option is provided by \sty{glossaries-extra} to add +\code{\gls+{label}\margm{label}} after the section header. This is +essentially like \optval{numberedsection}{nameref} but you supply +the label. This option is not available for +\gls{printunsrtinnerglossary}. Alternatively, you can use: +\cmddef*{glsxtrsetglossarylabel} This will need to be scoped or +changed between \idxpl{glossary} or use a command in \meta{label} +that expands differently for each \idx{glossary} to avoid duplicate +labels. -The list of labels provided in the final argument of -\cs{multiglossaryentry} consists of a main element and all the other -elements. If the main element isn't identified in the optional -argument, it's assumed to be the final element in the list. +\optiondef{printgloss.leveloffset} +This option sets or increments the \idx{hierarchicallevel} offset. If +\meta{offset} starts with \code{++} then the current offset is +incremented by the given amount otherwise the current offset is +set to \meta{offset}. For example, an entry with a normal +\gls{hierarchicallevel} of 1 will be treated as though it has +\gls{hierarchicallevel} $1+\meta{offset}$. Note that the +\idx{glossarystyle} may not support the resulting +\idx{hierarchicallevel}. This option is only available for the +\idx{unsrtfam} and the \env{printunsrtglossarywrap} +environment. See \sectionref{sec:printunsrtinner} for an example. + +\optiondef{printgloss.flatten} +Treats all entries as though they have the same +\idx{hierarchicallevel} (the value of \printglossopt{leveloffset}). This option is only available for the +\idx{unsrtfam} and the \env{printunsrtglossarywrap} +environment. Unlike the \resourceopt{flatten} resource option, this +option doesn't actually remove the \gloskey{parent} field. + +\optiondef{printgloss.groups} +This option is only applicable to the \idx{unsrtfam} and +\env{printunsrtglossarywrap}. If set to false, it will prevent +\idxpl{group} from being formed. If true (the default), \idxpl{group} will only be +formed if they are supported. See \sectionref{sec:printunsrt} +for further details. -The main element allows you to determine which target to use if you -want the entire content of \cs{mgls} to be a single hyperlink. You -can also use the settings described in \sectionref{sec:multiglsoptions} -to only index the main element. +\optiondef{printgloss.prefix} +This option is provided by \sty{glossaries-extra} and simply +redefines \gls{glolinkprefix} to expand to \meta{prefix}. If +hyperlinks are supported and the \idx{glossarystyle} uses +\gls{glstarget} to create the entry's hypertarget, the target name +is obtained from \code{\gls{glolinkprefix}\meta{entry-label}}. If +you are displaying multiple \idxpl{glossary} with shared entries (for +example, using the \resourceopt{secondary} resource option with +\app{bib2gls}), then changing the prefix can avoid duplicate targets. + +Note that this option will also affect the targets used by the +\idx{glslike} and \idx{glstextlike} commands. This means that if you +have, for example, \gls{gls} in the description of an entry, then +its hyperlink will go to that entry's item in the current +\idx{glossary}. Whereas referencing that entry outside of the +\idx{glossary} will hyperlink to the \idx{glossary} that uses the prefix +matching the setting at that point in the document. +For example: +\begin{codebox} +\cmd{usepackage}\oarg{colorlinks}\marg{hyperref} +\cmd{usepackage}\oarg{\optval{showtargets}{annoteleft},\optval{style}{\glostyle{tree}}}\marg{glossaries-extra} +\gls{newglossaryentry}\marg{sample}\marg{\gloskeyval{name}{sample}, + \gloskeyval{description}{an example description that references \gls{gls}\marg{another}}} +\gls{newglossaryentry}\marg{another}\marg{\gloskeyval{name}{another}, + \gloskeyval{description}{some other example description that references \gls{gls}\marg{sample}}} +\cbeg{document} +Link to glossary 1: \gls{gls}\marg{sample}. +\codepar +Link to glossary 2: \gls{gls}\oarg{\glsoptval{prefix}{other-}}\marg{sample}. +\gls{printunsrtglossary} +\gls{printunsrtglossary}\oarg{\printglossoptval{prefix}{other-}} +\cend{document} +\end{codebox} +This uses the \opt{showtargets} package option to show the target +names to the left of the hyperlink or hypertarget. +The result is: +\begin{resultbox} +\createexample*[title={Changing the target prefix}, + label={ex:targetprefixes}, +description={Example document that illustrates two glossaries with +different target prefixes}] +{\cmd{usepackage}\oarg{colorlinks}\marg{hyperref}^^J% +\cmd{usepackage}\oarg{\optval{showtargets}{annoteleft},\optval{style}{\glostyle{tree}}}\marg{glossaries-extra}^^J% +\gls{newglossaryentry}\marg{sample}\marg{\gloskeyval{name}{sample},^^J + \gloskeyval{description}{an example description that references \gls{gls}\marg{another}}}^^J% +\gls{newglossaryentry}\marg{another}\marg{\gloskeyval{name}{another},^^J + \gloskeyval{description}{some other example description that references \gls{gls}\marg{sample}}} +}{Link to glossary 1: \gls{gls}\marg{sample}. +\codepar +Link to glossary 2: \gls{gls}\oarg{\glsoptval{prefix}{other-}}\marg{sample}.^^J% +\gls{printunsrtglossary}^^J% +\gls{printunsrtglossary}\oarg{\printglossoptval{prefix}{other-}} +} +\end{resultbox} +Within the main part of the document, the first reference to +\qt{sample} has a hyperlink to the first \idx{glossary} (with the target +\code{glo:sample}, which uses the default prefix), and the second +reference has a hyperlink to the second \idx{glossary} (with the +target \code{other-sample}). + +Within the \idxpl{glossary}, the \gls{gls} references use the +current \idx{glossary} prefix, so the target is in the same +\idx{glossary}. + +\optiondef{printgloss.targetnameprefix} +This is similar to the previous option but only affects the prefix +for the entry item's target and doesn't change the prefix for any +references contained within the \idx{glossary}. This \emph{prepends} the +given prefix to the default prefix. + +If the above example is modified to: +\begin{codebox} +Link to glossary 1: \gls{gls}\marg{sample}. +\codepar +Link to glossary 2: \gls{gls}\oarg{\glsoptval{prefix}{other-glo:}}\marg{sample}. +\gls{printunsrtglossary} +\gls{printunsrtglossary}\oarg{\printglossoptval{targetnameprefix}{other-}} +\end{codebox} +Then the result will be: +\begin{resultbox} +\createexample*[title={Prepending to the target prefix for just the entry +item}, + label={ex:targetprefixname}, +description={Example document that illustrates two glossaries with +different target prefixes using targetprefixname}] +{\cmd{usepackage}\oarg{colorlinks}\marg{hyperref}^^J% +\cmd{usepackage}\oarg{\optval{showtargets}{annoteleft},\optval{style}{\glostyle{tree}}}\marg{glossaries-extra}^^J% +\gls{newglossaryentry}\marg{sample}\marg{\gloskeyval{name}{sample},^^J + \gloskeyval{description}{an example description that references \gls{gls}\marg{another}}}^^J% +\gls{newglossaryentry}\marg{another}\marg{\gloskeyval{name}{another},^^J + \gloskeyval{description}{some other example description that references \gls{gls}\marg{sample}}} +}{Link to glossary 1: \gls{gls}\marg{sample}. +\codepar +Link to glossary 2: \gls{gls}\oarg{\glsoptval{prefix}{other-glo:}}\marg{sample}.^^J% +\gls{printunsrtglossary}^^J% +\gls{printunsrtglossary}\oarg{\printglossoptval{targetnameprefix}{other-}} +} +\end{resultbox} -You can change the main element using: -\begin{definition}[\DescribeMacro\mglsSetMain] -\cs{mglsSetMain}\marg{multi-label}\marg{new-main-label} -\end{definition} -The new main label provided in the second argument must be in the -list corresponding to \meta{multi-label}. This change is locally -applied to the current scope. Note that if you are using -\gls{bib2gls}, this change in the document can't be detected. +Note that this has prepended \code{other-} to the existing +\code{glo:}\ prefix. This is why the \glsopt{prefix} option in +the second \gls{gls} reference had to be changed to match the +appropriate hypertarget name. The \gls{gls} +references in the second \idx{glossary} now point to the relevant +line in the first \idx{glossary}. -The main element can also be used to identify which element should -be displayed in the plural with \cs{mglsmainpl}. For example: -\begin{verbatim} -\newglossaryentry{great}{name={great},description={}} -\newglossaryentry{little}{name={little},description={}} -\newglossaryentry{grebe}{name={grebe},description={}} - -\multiglossaryentry{greatgrebe}{great,grebe} -\multiglossaryentry{littlegrebe}{little,grebe} -\end{verbatim} -In the above, two multi-entries are defined: \texttt{greatgrebe} and -\texttt{littlegrebe}. In both cases the main element is -\texttt{grebe} (the last element). Using \cs{mglspl} will show the -plural for all elements, but using \cs{mglsmainpl} will only use the -plural for the main element (grebe). For example: -\begin{verbatim} -Plural all: \mglspl{greatgrebe}, \mglspl{littlegrebe}. -Plural main: \mglsmainpl{greatgrebe}, \mglsmainpl{littlegrebe}. -\end{verbatim} -produces: -\begin{display} -Plural all: greats grebes, littles grebes. -Plural main: great grebes, little grebes. -\end{display} +It's possible to combine \printglossopt{targetnameprefix} with +\printglossoptvalm{prefix}{} but that will also affect the \gls{gls} +references within the \idx{glossary}. -\section{Prefixes and Suffixes} -\label{sec:mglsfixes} +\optiondef{printgloss.target} +This is a boolean option that can be used to switch off the +automatic creation of the entry hypertargets but still allows +hyperlinks within the \idx{glossary}. This can be used to prevent +duplicate destinations for secondary \idxpl{glossary}. -A multi-entry may have associated prefixes and suffixes. These are -scoped and are placed outside of the hyperlinks and encapsulating -commands. They are not affected by case-changing commands, such as -\cs{Mgls}. -If you want a prefix to obey case-changing, use the \cs{mpgls}-like -commands instead (\sectionref{sec:mpgls}). +\optiondef{printgloss.preamble} +Redefines \gls{glossarypreamble} to \meta{text}. -The prefix is inserted with: -\begin{definition}[\DescribeMacro\mglsprefix] -\cs{mglsprefix} -\end{definition} -The default definition is: -\begin{verbatim} -\newcommand*{\mglsprefix}{% - \ifdefempty\mglscurrentcategory - {\mglscurrentprefix}% - {% - \mglshascategoryprefix{\mglscurrentcategory}% - {\mglsusecategoryprefix{\mglscurrentcategory}}% - {\mglscurrentprefix}% - }% -} -\end{verbatim} -This will insert the current prefix unless there is prefix command -associated with the current category. +\optiondef{printgloss.postamble} +Redefines \gls{glossarypostamble} to \meta{text}. -The suffix is inserted with: -\begin{definition}[\DescribeMacro\mglssuffix] -\cs{mglssuffix} -\end{definition} -The command is defined as follows: -\begin{verbatim} -\newcommand*{\mglssuffix}{% - \ifdefempty\mglscurrentcategory - {\ifdefempty{\mglscurrentsuffix}{}{\space(\mglscurrentsuffix)}}% - {% - \mglshascategorysuffix{\mglscurrentcategory}% - {\mglsusecategorysuffix{\mglscurrentcategory}}% - {\ifdefempty{\mglscurrentsuffix}{}{\space(\mglscurrentsuffix)}}% - }% -} -\end{verbatim} -If there is a suffix associated with the current category, that will -be used, otherwise if the current suffix isn't empty this -inserts a space followed by the current suffix in parentheses. -You can access the label of the last (non-skipped) element with -\ics{mglslastelementlabel}. +\section{Displaying a Glossary Without Sorting or Indexing} +\label{sec:printunsrt} -Note that in both cases the category corresponds to the multi-entry -category (see \sectionref{sec:multiglscategory}). +The base \sty{glossaries} package provides two ways of displaying a +\idx{glossary}, depending on the \idx{indexing} option: +\gls{printglossary} (used with \gls{makeglossaries}) or +\gls{printnoidxglossary} (used with \gls{makenoidxglossaries}). -To define a category-dependent prefix, use: -\begin{definition}[\DescribeMacro\mglsdefcategoryprefix] -\cs{mglsdefcategoryprefix}\marg{category}\marg{definition} -\end{definition} -You can reference the current prefix with \cs{mglscurrentprefix}. +The \sty{glossaries-extra} package provides an alternative that +doesn't require sorting or \idx{indexing}. +\cmddef{printunsrtglossary} +This behaves in a similar way to \gls{printnoidxglossary}, but it +always lists all the defined entries for the given glossary in the +order in which they were added to the glossary. Unlike +\gls{printglossary}, you may use \gls{printunsrtglossary} with an +\idx{ignoredglossary}. -To define a category-dependent suffix, use: -\begin{definition}[\DescribeMacro\mglsdefcategorysuffix] -\cs{mglsdefcategorysuffix}\marg{category}\marg{definition} -\end{definition} -You can reference the current suffix with \cs{mglscurrentsuffix}. +\begin{important} +The \idx{unsrtfam} and \env{printunsrtglossarywrap} are not intended +for use with \gls{makeglossaries} and \gls{makenoidxglossaries}. +Mixing these different methods can result in unexpected behaviour. +\end{important} -The default definition of \cs{mglsprefix} tests if there is a -category prefix using: -\begin{definition}[\DescribeMacro\mglshascategoryprefix] -\cs{glshascategoryprefix}\marg{category}\marg{true}\marg{false} -\end{definition} -The category prefix is used with: -\begin{definition}[\DescribeMacro\mglsusecategoryprefix] -\cs{glsusecategoryprefix}\marg{category} -\end{definition} - -The default definition of \cs{mglssuffix} tests if there is a -category suffix using: -\begin{definition}[\DescribeMacro\mglshascategorysuffix] -\cs{glshascategorysuffix}\marg{category}\marg{true}\marg{false} -\end{definition} -The category suffix is used with: -\begin{definition}[\DescribeMacro\mglsusecategorysuffix] -\cs{glsusecategorysuffix}\marg{category} -\end{definition} - -The current prefix \cs{mglscurrentprefix} and \cs{mglscurrentsuffix} -are obtained as follows: -\begin{itemize} -\item if this is the first use of the multi-entry -(\sectionref{sec:mglsfirstuse}) then the \meta{prefix} is set to the -value of the \optfmt{firstprefix} option and the \meta{suffix} is -set to the value of the \optfmt{firstsuffix} option; -\item otherwise the \meta{prefix} is set to the -value of the \optfmt{usedprefix} option and the \meta{suffix} is -set to the value of the \optfmt{usedsuffix} option. -\end{itemize} +There is also a starred version which has a mandatory argument: +\cmddef{printunsrtglossary*} +This is equivalent to: +\begin{compactcodebox} +\cmd{begingroup} + \meta{init-code}\gls{printunsrtglossary}\oargm{options} +\cmd{endgroup} +\end{compactcodebox} +There's no significant difference between doing: +\begin{compactcodebox} +\marg{\meta{init-code}\gls{printunsrtglossary}\oargm{options}} +\end{compactcodebox} +and +\begin{compactcodebox} +\gls{printunsrtglossary*}\oargm{options}\margm{init-code} +\end{compactcodebox} +Note that unlike \gls{glossarypreamble}, the supplied \meta{init-code} is +done before the \idx{glossary} header. \begin{important} -The prefix and suffix (if set) are placed outside of the hyperlink -and text formatting encapsulator. They are not affected by -case-changing commands such as \cs{Mgls} or \cs{MGLS}. +If you want to use one of the \env{tabular}-like +styles with \gls{printunsrtglossary}, make sure you load +\sty{glossaries-extra-stylemods} which modifies +the definition of \gls{glsgroupskip} to avoid the +\qt{Incomplete \csfmt{iftrue}} error that may otherwise occur. \end{important} -For example: -\begin{verbatim} -\setabbreviationstyle{long-only-short-only} -\newabbreviation{clostridium}{C.}{Clostridium} -\newglossaryentry{botulinum}{name=botulinum,description={}} - -\multiglossaryentry[firstsuffix=botulism] - {cbot}{clostridium,botulinum} -\end{verbatim} -On first use, this produces (assuming the \qt{clostridum} element -hasn't been used previously): -\begin{quote} -Clostridium botulinum (botulism). -\end{quote} -On subsequent use, this produces: -\begin{quote} -C. botulinum. -\end{quote} +As with \gls{printglossary} and \gls{printnoidxglossary}, there is +also a command to print all non-\idxpl{ignoredglossary} in the order +in which they were defined: +\cmddef{printunsrtglossaries} -\section{Separators} -\label{sec:mglssep} +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 \idx{locationlist} in this case, as that has to be +set by a post-processor such as \app{bib2gls} (see +\sectionref{sec:bib2gls}). -The separators between each instance of \cs{gls} are given by the -following commands, which all take two arguments. The first argument -is the label of the previous element. The second argument is the -label of the following element. -\begin{definition}[\DescribeMacro\glscombinedsep] -\cs{glscombinedsep}\marg{prev label}\marg{next label} -\end{definition} -This is inserted between two entries that have both been marked as used. -The default definition is: -\begin{verbatim} -\newcommand*{\glscombinedsep}[2]{% - \glshasattribute{#1}{combinedsep}% - {\glsgetattribute{#1}{combinedsep}}% - { }% +\begin{warning} +No attempt is made to gather hierarchical elements. +If child entries aren't defined immediately after their parent +entry, they won't be together in the \idx{glossary} when using +\gls{printunsrtglossary}. +\end{warning} + +The way that \gls{printunsrtglossary} basically works is to iterate +over every label in the \idx{glossary}['s] internal label list +and format each entry according to the way the \idx{glossarystyle} +would normally format the entry's \idx{hierarchicallevel} (described +in more detail in \sectionref{sec:printunsrtadvanced}). +If a change in letter group is detected, the letter group heading +and group skip will be inserted. + +A label is appended to the \idx{glossary}['s] internal label list +whenever an entry is defined. This means that the list will normally +be in order of definition, but it's also possible to copy an entry's +label to another \idx{glossary}['s] internal label list using +\gls{glsxtrcopytoglossary}, which can be used to provide a different +order. +A simple example: +\begin{codebox} +\cmd{documentclass}\marg{article} +\cmd{usepackage}\oarg{\optval{style}{\glostyle{treegroup}}}\marg{glossaries-extra} +\gls{newglossaryentry}\marg{ant}\marg{\gloskeyval{name}{ant},\gloskeyval{description}{}} +\gls{newglossaryentry}\marg{gazelle}\marg{\gloskeyval{name}{gazelle},\gloskeyval{description}{}} +\cbeg{document} +\gls{printunsrtglossary} +\cend{document} +\end{codebox} +The document build only requires one \LaTeX\ call in this case. +\begin{resultbox} +\createexample*[title={Displaying unsorted glossaries}, + label={ex:printunsrt}, +description={Example document that doesn't require any external indexing}] +{\cmd{usepackage}\oarg{\optval{style}{\glostyle{treegroup}}}\marg{glossaries-extra}^^J% +\gls{newglossaryentry}\marg{ant}\marg{\gloskeyval{name}{ant},\gloskeyval{description}{}}^^J% +\gls{newglossaryentry}\marg{gazelle}\marg{\gloskeyval{name}{gazelle},\gloskeyval{description}{}}^^J% +}{\gls{printunsrtglossary}} +\end{resultbox} +Note the difference if the \opt{stylemods} option is used: +\begin{codebox} +\cmd{usepackage}\oarg{\opt{stylemods},\optval{style}{\glostyle{treegroup}}}\marg{glossaries-extra} +\end{codebox} +\begin{resultbox} +\createexample*[title={Displaying unsorted glossaries with \optfmt{stylemods}}, + label={ex:printunsrtstylemods}, +description={Example document that doesn't require any external +indexing using the stylemods option}] +{\cmd{usepackage}\oarg{\opt{stylemods},\optval{style}{\glostyle{treegroup}}}\marg{glossaries-extra}^^J% +\gls{newglossaryentry}\marg{ant}\marg{\gloskeyval{name}{ant},\gloskeyval{description}{}}^^J% +\gls{newglossaryentry}\marg{gazelle}\marg{\gloskeyval{name}{gazelle},\gloskeyval{description}{}}^^J% +}{\gls{printunsrtglossary}} +\end{resultbox} +In this case, the \idx{group} headings are now numbers instead of +letters. The styles provided with \sty{glossaries-extra} and those +modified by \sty{glossaries-extra-stylemods} are designed to assist integration +with \app{bib2gls}. Without these modifications, +\gls{printunsrtglossary} behaves like the less sophisticated +\gls{printnoidxglossary} which checks if the label is an integer +less than 256 and uses \gls{char} to create the title (if no title +has been provided). + +If you really want to use \gls{printunsrtglossary} without +\app{bib2gls} and you want letter \idxpl{group} with +\opt{stylemods} without having to define all the titles, you can use: +\cmddef{glsxtrnoidxgroups} +which will switch over to using the group titling method used with +\gls{printnoidxglossary} (which only supports \idx{ascii}). This +command is only available with \opteqvalref{record}{off} and can't +be used with \gls{makeglossaries}. + +If, conversely, you don't want any \idxpl{group} formed, regardless +of the \idx{glossarystyle}, you can disable them with +\printglossoptval{groups}{false}. +The above example can be modified so that the document contains: +\begin{codebox} +\gls{printunsrtglossary}\oarg{\printglossoptvalm{title}{Glossary 1}} +\gls{glsxtrnoidxgroups} +\gls{printunsrtglossary}\oarg{\printglossoptvalm{title}{Glossary 2}} +\gls{printunsrtglossary}\oarg{\printglossoptval{groups}{false},\printglossoptvalm{title}{Glossary 3}} +\gls{printunsrtglossary}\oarg{\printglossoptval{style}{tree},\printglossopt{nogroupskip},\printglossoptvalm{title}{Glossary 4}} +\end{codebox} +This repeats the same \idx{glossary}. The first is the same as the +previous example. The second is the same as the example that didn't +use \opt{stylemods}. The final two \idxpl{glossary} have the +\idxpl{group} suppressed. Using \printglossoptval{groups}{false} +(Glossary~3) is more efficient than using +\printglossopt{nogroupskip} and switching to a style that doesn't +show the header (Glossary~4). + +I've also switched to two column mode to display the result in a +more compact form. The first two glossaries are shown on the left +and the last two are on the right: +\begin{resultbox} +\createexample*[title={Displaying unsorted glossaries with different +group settings}, + label={ex:printunsrtgroup}, +description={Example document that doesn't require any external +indexing with different group settings}] +{\cmd{usepackage}\oarg{\opt{stylemods},\optval{style}{\glostyle{treegroup}}}\marg{glossaries-extra}^^J% +\gls{newglossaryentry}\marg{ant}\marg{\gloskeyval{name}{ant},\gloskeyval{description}{}}^^J% +\gls{newglossaryentry}\marg{gazelle}\marg{\gloskeyval{name}{gazelle},\gloskeyval{description}{}}^^J% +}{\cmd{twocolumn}\gls{printunsrtglossary}\oarg{title=\marg{Glossary 1}}^^J% +\gls{glsxtrnoidxgroups}^^J% +\gls{printunsrtglossary}\oarg{title=\marg{Glossary 2}}^^J% +\cmd{newpage} +\gls{printunsrtglossary}\oarg{\printglossoptval{groups}{false},title=\marg{Glossary 3}}^^J% +\gls{printunsrtglossary}\oarg{\printglossoptval{style}{tree},\printglossopt{nogroupskip},title=\marg{Glossary 4}} +} +\end{resultbox} + +The \idx{unsrtfam} were designed for use with \app{bib2gls}, +which uses more complex alphanumeric \idx{group} labels to allow for greater +customization and to avoid conflict where there are multiple +\idxpl{glossary} or \idxpl{hierarchicallevel} with potentially the +same letter \idxpl{group}. + +The way that \app{bib2gls} works is to select entries from a +\ext{bib} file, according to the document requirements, sort the +entries, and then write the entry definitions +(with commands like \gls{longnewglossaryentry*} or +\gls{newabbreviation}) in the \ext{glstex} in the desired order, +which is then input by \gls{GlsXtrLoadResources}. +This means that \gls{printunsrtglossary} will display the +entries in that order since, from \sty{glossaries-extra}['s] point +of view, that's the order of definition. + +While it is possible to use \gls{printunsrtglossary} without +\app{bib2gls}, as in the above example, for long or complex +\idxpl{glossary} it's better to use \app{bib2gls} which can +automatically assign appropriate titles to the \idxpl{group}. + +\Idxpl{group} and hierarchy are discussed in more detail in +\sectionref{sec:printunsrtgroups}. See +\sectionref{sec:printunsrtlocations} for \idxpl{locationlist} and +\sectionref{sec:printunsrtinner}. Advanced commands and further +detail about the way \gls{printunsrtglossary} works are covered in +\sectionref{sec:printunsrtadvanced}. + +\subsection{Groups and Hierarchy} +\label{sec:printunsrtgroups} + +\begin{information} +See \gallerypage{logicaldivisions}{Gallery: Logical Glossary Divisions +(type vs group vs parent)} for the difference between the +\gloskey{group}, \gloskey{type} and \gloskey{parent} fields. +\end{information} + +Here's a longer example that uses \opt{stylemods} to +automatically load \sty{glossary-bookindex}: +\begin{codebox} +\cmd{documentclass}\marg{article} +\cmd{usepackage}\oarg{\optval{stylemods}{bookindex},\optval{style}{\glostyle{bookindex}}}\marg{glossaries-extra} +\gls{newglossaryentry}\marg{waterfowl}\marg{\gloskeyval{name}{waterfowl},\gloskeyval{description}{}} +\gls{newglossaryentry}\marg{ant}\marg{\gloskeyval{name}{ant},\gloskeyval{description}{}} +\gls{newglossaryentry}\marg{adder}\marg{\gloskeyval{name}{adder},\gloskeyval{description}{}} +\gls{newglossaryentry}\marg{duck}\marg{\gloskeyval{name}{duck},\gloskeyval{parent}{waterfowl}, + \gloskeyval{description}{}} +\gls{newglossaryentry}\marg{zebra}\marg{\gloskeyval{name}{zebra},\gloskeyval{description}{}} +\gls{newglossaryentry}\marg{aardvark}\marg{\gloskeyval{name}{aardvark},\gloskeyval{description}{}} +\gls{newglossaryentry}\marg{gazelle}\marg{\gloskeyval{name}{gazelle},\gloskeyval{description}{}} +\gls{newglossaryentry}\marg{mallard}\marg{\gloskeyval{name}{mallard},\gloskeyval{parent}{duck}, + \gloskeyval{description}{}} +\codepar +\gls{newglossary*}\marg{another}\marg{Another Glossary} +\gls{glsxtrcopytoglossary}\marg{mallard}\marg{another} +\gls{glsxtrcopytoglossary}\marg{aardvark}\marg{another} +\gls{glsxtrcopytoglossary}\marg{zebra}\marg{another} +\gls{glsxtrcopytoglossary}\marg{ant}\marg{another} +\gls{glsxtrcopytoglossary}\marg{duck}\marg{another} +\cbeg{document} +\gls{printunsrtglossary} +\gls{printunsrtglossary}\oarg{\printglossoptval{type}{another}} +\cend{document} +\end{codebox} +Unlike the previous examples that defined the entries in +alphabetical order, this example hasn't used any logical order. +Note, in particular, that the child entries \qt{duck} and +\qt{mallard} (which have the \gloskey{parent} key set) have not been +defined immediately after their parent. + +The first \gls{printunsrtglossary} has the default +\printglossoptval{type}{main} and lists all entries defined in the +\code{main} \idx{glossary}, in the order in which they were defined. The +second \gls{printunsrtglossary} lists all entries in the custom +\code{another} \idx{glossary} and is in the order in which the +entries were copied to that \idx{glossary}. + +The document build again simply requires one \LaTeX\ call. The +result is shown in \exampleref{ex:unsrtcopygrp}. +\begin{resultbox}[float] +\createexample*[label={ex:unsrtcopygrp}, +title={Displaying unsorted glossaries with a copied list}, +description={Example document that doesn't require any external +indexing that copies entries to another glossary. Entries are listed +in order of definition with child entries indented, that results in a +confusing list}] +{\cmd{usepackage}\oarg{\optval{stylemods}{bookindex},\optval{style}{\glostyle{bookindex}}}\marg{glossaries-extra}^^J% +\gls{newglossaryentry}\marg{waterfowl}\marg{\gloskeyval{name}{waterfowl},\gloskeyval{description}{}}^^J% +\gls{newglossaryentry}\marg{ant}\marg{\gloskeyval{name}{ant},\gloskeyval{description}{}}^^J% +\gls{newglossaryentry}\marg{adder}\marg{\gloskeyval{name}{adder},\gloskeyval{description}{}}^^J% +\gls{newglossaryentry}\marg{duck}\marg{\gloskeyval{name}{duck},\gloskeyval{parent}{waterfowl},\gloskeyval{description}{}}^^J% +\gls{newglossaryentry}\marg{zebra}\marg{\gloskeyval{name}{zebra},\gloskeyval{description}{}}^^J% +\gls{newglossaryentry}\marg{aardvark}\marg{\gloskeyval{name}{aardvark},\gloskeyval{description}{}}^^J% +\gls{newglossaryentry}\marg{gazelle}\marg{\gloskeyval{name}{gazelle},\gloskeyval{description}{}}^^J% +\gls{newglossaryentry}\marg{mallard}\marg{\gloskeyval{name}{mallard},\gloskeyval{parent}{duck},\gloskeyval{description}{}}^^J% +\codepar +\gls{newglossary*}\marg{another}\marg{Another Glossary}^^J% +\gls{glsxtrcopytoglossary}\marg{mallard}\marg{another}^^J% +\gls{glsxtrcopytoglossary}\marg{aardvark}\marg{another}^^J% +\gls{glsxtrcopytoglossary}\marg{zebra}\marg{another}^^J% +\gls{glsxtrcopytoglossary}\marg{ant}\marg{another}^^J% +\gls{glsxtrcopytoglossary}\marg{duck}\marg{another} +}{\gls{printunsrtglossary}^^J% +\gls{printunsrtglossary}\oarg{\printglossoptval{type}{another}} +} +\end{resultbox} + +There are some oddities in both lists. It's the \idx{glossarystyle} +that determines the formatting of the entries according to the +entry's \gls{hierarchicallevel}, but it looks strange for the duck +and mallard entries to be indented when they don't follow after +their parent entry. + +As the internal loop within \gls{printunsrtglossary} iterates over +each entry, it tries to determine which \idxc{group}{letter group} +the entry belongs to. If it's different from the \idx{group} for the +previous entry (in the same hierarchical level), a \idx{group} header is +added (which may or may not be displayed, depending on the +\idx{glossarystyle}). This means than an unordered list of entries, such as in the +above example, may contain repeated headers. + +The way that the \idx{group} is determined depends on whether or not +the \gloskey{group} key has been defined. If it isn't defined (the +default), then the \idx{group} label is obtained from the +\idx{uppercase} character code of the first token of the +\gloskey{sort} key. If the token doesn't have an \idx{uppercase} +character code (indicating that it's not a letter) or if the sort +value is empty then the label will be set to \code{glssymbols} +(which corresponds to the symbol \idx{group}). This is the same way +that \gls{printnoidxglossary} inserts \idxpl{group}. + +Remember that if the \gloskey{sort} key hasn't been set, it will be +assigned automatically to the same value as the \gloskey{name} key +(or with \optval{sort}{use} or \optval{sort}{def} to a numerical +value). The \gloskey{sort} key will be empty if you use +\optval{sort}{clear}. The \optval{sort}{none} setting simply skips +the pre-processing of the \gloskey{sort} key (such as sanitizing). + +For example, the ant entry doesn't explicitly use the \gloskey{sort} +key, so the sort value is obtained from the \gloskey{name} key, +which is set to \code{ant}. The first token is \qt{a}, which is a +letter. The \idx{group}['s] label is obtained from the letter's +\idx{uppercase} character decimal code (65). There's no associated +title (which can be assigned with \gls{glsxtrsetgrouptitle}), so the +title is simply \qt{65} (with \opt{stylemods}, see earlier) or +\qt{A} (without \opt{stylemods} or with \gls{glsxtrnoidxgroups}). + +The ant entry is followed by \qt{adder}. The same process determines +that the \qt{adder} \idx{group} label is also 65. There's no +change in the \idx{group} label from the previous entry (ant) so no +header is inserted. + +By default, this \idx{group} check is omitted for child entries, which is +why no group header is inserted before duck or mallard. So the next +entry to be checked for a \idx{group} is the zebra entry, which has +the group label 90 (the decimal code for \qt{Z}). Again there's no +title associated with that label so the title is simply the label. + +The zebra entry is followed by aardvark which, following the same +process, has the \idx{group} label 65. This is different from +the previous group label (90) so a group header is inserted. +This is why there are two \qt{90} letter \idxpl{group}. + +\begin{important} +The \idx{unsrtfam} don't order the entries. +\end{important} + +If the \gloskey{group} key has been defined (which is the case with +\opteqvalref{record}{only} and \opteqvalref{record}{nameref}) then +the \idx{group} \emph{label} is obtained from the \gloskey{group} +field. If the \gloskey{group} field is defined but empty then the +entry will belong to the empty group. The value of the +\gloskey{sort} field is now irrelevant. + +So, simply adding the \opt{record} option to the above example document will +cause the group headers to disappear. This is because the +\gloskey{group} key will now be defined but is empty for each entry. +Even with a style like \glostyle{bookindex}, there won't be any +\idx{group} headers. + +Provided the \gloskey{group} key has been defined, the field used to +store the \idx{group} label is given by: +\cmddef{glsxtrgroupfield} +This expands to \code{group}, by default. However it's possible to +use a different field in which to store the group label, in which +case \gls{glsxtrgroupfield} will need to be redefined. +For example: +\begin{codebox} +\marg{\gls{renewcommand}\marg{\gls{glsxtrgroupfield}}\marg{othergroup}\gls{printunsrtglossary}} +\end{codebox} +or +\begin{codebox} +\gls{printunsrtglossary*}\marg{\gls{renewcommand}\marg{\gls{glsxtrgroupfield}}\marg{othergroup}} +\end{codebox} +(but this still requires the \gloskey{group} key to be defined, even +if it's not being used to store the \idx{group} label). With +\app{bib2gls}, the \resourceopt{secondary} resource option (combined with +\switch{group}) will store the \idx{group} label obtained from the +secondary sort in the \glosfield{secondarygroup} field and adds the redefinition of +\gls{glsxtrgroupfield} to the associated \idx{glossary} preamble. +This prevents it from clashing with the \gloskey{group} field in +the event that the secondary sort method has produced a different +set of \idxpl{group} (which is likely). + +The follow example document uses \opt{record} to create the +\gloskey{group} key and assigns \idx{group} labels with associated +titles. Note that the \glosfield{secondarygroup} field doesn't have +an associated key, so it needs to be set with a field assignment +command, such as \gls{GlsXtrSetField}. +\newcommand*{\examplegroupsdefs}{% +\gls{glsxtrsetgrouptitle}\marg{group1label}\marg{Group 1}\newline +\gls{glsxtrsetgrouptitle}\marg{group2label}\marg{Group 2}\newline +\gls{glsxtrsetgrouptitle}\marg{group3label}\marg{Group 3}\newline +\gls{glsxtrsetgrouptitle}\marg{group4label}\marg{Group 4}\newline +\codepar +\gls{newglossaryentry}\marg{waterfowl}\marg{\gloskeyval{name}{waterfowl},\gloskeyval{description}{},\newline\space + \gloskeyval{group}{group1label}}\newline +\gls{newglossaryentry}\marg{ant}\marg{\gloskeyval{name}{ant},\gloskeyval{description}{},\newline\space + \gloskeyval{group}{group1label}}\newline +\gls{GlsXtrSetField}\marg{ant}\marg{\glosfield{secondarygroup}}\marg{group4label}\newline +\gls{newglossaryentry}\marg{adder}\marg{\gloskeyval{name}{adder},\gloskeyval{description}{},\newline\space + \gloskeyval{group}{group2label}}\newline +\gls{newglossaryentry}\marg{duck}\marg{\gloskeyval{name}{duck},\gloskeyval{parent}{waterfowl},\newline\space + \gloskeyval{description}{},\gloskeyval{group}{group4label}}\newline +\gls{GlsXtrSetField}\marg{duck}\marg{\glosfield{secondarygroup}}\marg{group2label}\newline +\gls{newglossaryentry}\marg{zebra}\marg{\gloskeyval{name}{zebra},\gloskeyval{description}{},\newline\space + \gloskeyval{group}{group2label}}\newline +\gls{GlsXtrSetField}\marg{zebra}\marg{\glosfield{secondarygroup}}\marg{group3label}\newline +\gls{newglossaryentry}\marg{aardvark}\marg{\gloskeyval{name}{aardvark},\gloskeyval{description}{},\newline\space + \gloskeyval{group}{group2label}}\newline +\gls{GlsXtrSetField}\marg{aardvark}\marg{\glosfield{secondarygroup}}\marg{group1label}\newline +\gls{newglossaryentry}\marg{gazelle}\marg{\gloskeyval{name}{gazelle},\gloskeyval{description}{},\newline\space + \gloskeyval{group}{group1label}}\newline +\gls{newglossaryentry}\marg{mallard}\marg{\gloskeyval{name}{mallard},\gloskeyval{parent}{duck},\newline\space + \gloskeyval{description}{},\gloskeyval{group}{group2label}} +\gls{GlsXtrSetField}\marg{mallard}\marg{\glosfield{secondarygroup}}\marg{group3label}\newline +\codepar +\gls{newglossary*}\marg{another}\marg{Another Glossary}\newline +\gls{glsxtrcopytoglossary}\marg{mallard}\marg{another}\newline +\gls{glsxtrcopytoglossary}\marg{aardvark}\marg{another}\newline +\gls{glsxtrcopytoglossary}\marg{zebra}\marg{another}\newline +\gls{glsxtrcopytoglossary}\marg{ant}\marg{another}\newline +\gls{glsxtrcopytoglossary}\marg{duck}\marg{another}\newline +\gls{setglossarypreamble}\oarg{another}\marg{\cmd{renewcommand}\marg{\gls{glsxtrgroupfield}}\marg{secondarygroup}} +} +\begin{codebox} +\cmd{documentclass}\marg{article} +\cmd{usepackage}\oarg{\opt{record},\optval{stylemods}{bookindex},\optval{style}{\glostyle{bookindex}}}\marg{glossaries-extra} +\codepar +\examplegroupsdefs +\cbeg{document} +\gls{printunsrtglossary} +\gls{printunsrtglossary}\oarg{\printglossoptval{type}{another}} +\cend{document} +\end{codebox} +This is essentially mimicking the way that the +\resourceopt{secondary} resource option sets the +\glosfield{secondarygroup} field and adds the redefinition of +\gls{glsxtrgroupfield} to the secondary \idx{glossary}['s] preamble. +(Although in this case, there's no logical order.) +The result is shown in \exampleref{ex:unsrtcustomgrp}. +\begin{resultbox}[float] +\createexample*[label={ex:unsrtcustomgrp}, +title={Displaying unsorted glossaries with custom groups}, +description={Example document that doesn't require any external +indexing and has the group labels explicitly set}] +{\cmd{usepackage}\oarg{\opt{record},\optval{stylemods}{bookindex},\optval{style}{\glostyle{bookindex}}}\marg{glossaries-extra}^^J% +\codepar +\examplegroupsdefs +}{\gls{printunsrtglossary}^^J% +\gls{printunsrtglossary}\oarg{\printglossoptval{type}{another}} +} +\end{resultbox} + +Note that even though the duck and mallard entries have the +\gloskey{group} and \glosfield{secondarygroup} fields set, there's +no group title for them in either \idx{glossary} because they are +child entries. + +\cmddef{glsxtraddgroup} +This command will perform \meta{code} if the entry identified by +\meta{entry-label} should have \idx{group} support (provided the +\gloskey{group} field has been set). The default +definition is: +\begin{compactcodebox} +\cmd{newcommand}*\marg{\gls{glsxtraddgroup}}[2]\marg{\% + \gls{ifglsxtrprintglossflatten} + \#2\% + \cmd{else} + \gls{ifglshasparent}\marg{\#1}\marg{}\marg{\#2}\% + \cmd{fi} } -\end{verbatim} -This will use the \catattr{combinedsep} attribute for the -\meta{prev label}'s category, if set. Otherwise this just does a -space. Note that this ignores the second argument. +\end{compactcodebox} +This means that only entries that don't have a parent (with +\printglossoptval{flatten}{false}) or any entry +(with \printglossoptval{flatten}{true}) will have the +\idx{group} check performed. With \app{bib2gls}, the +\resourceopt{group-level} will redefine \gls{glsxtraddgroup} to +always do \meta{code}, which means that all entries will have the +\idx{group} check performed. -\begin{definition}[\DescribeMacro\glscombinedfirstsep] -\cs{glscombinedfirstsep}\marg{prev label}\marg{next label} -\end{definition} -This is inserted between two entries where only the next entry has -been marked as used. The default definition is: -\begin{verbatim} -\newcommand*{\glscombinedfirstsep}[2]{% - \glshasattribute{#1}{combinedfirstsep}% - {\glsgetattribute{#1}{combinedfirstsep}}% - {\glscombinedsep{#1}{#2}}% -} -\end{verbatim} -This will use the \catattr{combinedfirstsep} attribute for -\meta{prev label}'s category, if set. If that attribute isn't set, -\cs{glscombinedsep} is used. +\begin{important} +If no group label has been provided no header will be added. +\end{important} -\begin{definition}[\DescribeMacro\glscombinedsepfirst] -\cs{glscombinedsepfirst}\marg{prev label}\marg{next label} -\end{definition} -This is inserted between two entries where only the previous entry has -been marked as used. The default definition is: -\begin{verbatim} -\newcommand*{\glscombinedsepfirst}[2]{% - \glshasattribute{#1}{combinedsepfirst}% - {\glsgetattribute{#1}{combinedsepfirst}}% - {\glscombinedsep{#1}{#2}}% +The above document can be modified to show the sub-\idx{group} +headings: +\begin{codebox} +\cmd{renewcommand}*\marg{\gls{glsxtraddgroup}}[2]\marg{\#2} +\gls{printunsrtglossary} +\cmd{renewcommand}*\marg{\gls{glsxtraddgroup}}[2]\marg{\% + \cmd{ifnum}\gls{glscurrententrylevel}<2 \#2\cmd{fi}} +\gls{printunsrtglossary}\oarg{\printglossoptval{type}{another}} +\end{codebox} +The result is shown in \exampleref{ex:unsrtcustomsubgrp}. +\begin{resultbox}[float] +\createexample*[label={ex:unsrtcustomsubgrp}, +title={Displaying unsorted glossaries with custom groups and sub-group headings}, +description={Example document that doesn't require any external +indexing and has the group labels explicitly set with sub-group +headings}] +{\cmd{usepackage}\oarg{\opt{record},\optval{stylemods}{bookindex},\optval{style}{\glostyle{bookindex}}}\marg{glossaries-extra}^^J% +\codepar +\examplegroupsdefs +}{\cmd{renewcommand}*\marg{\gls{glsxtraddgroup}}[2]\marg{\#2}^^J% +\gls{printunsrtglossary}^^J% +\cmd{renewcommand}*\marg{\gls{glsxtraddgroup}}[2]\marg{\%^^J + \cmd{ifnum}\gls{glscurrententrylevel}<2 \#2\cmd{fi}^^J% +}^^J% +\gls{printunsrtglossary}\oarg{\printglossoptval{type}{another}} } -\end{verbatim} -This will use the \catattr{combinedsepfirst} attribute for -\meta{prev label}'s category, if set. If that attribute isn't set, -\cs{glscombinedsep} is used. - -\begin{definition}[\DescribeMacro\glscombinedfirstsepfirst] -\cs{glscombinedfirstsepfirst}\marg{prev label}\marg{next label} -\end{definition} -This is inserted between two entries where both have -been marked as used. The default definition is: -\begin{verbatim} -\newcommand*{\glscombinedfirstsepfirst}[2]{% - \glshasattribute{#1}{combinedfirstsepfirst}% - {\glsgetattribute{#1}{combinedfirstsepfirst}}% - {\glscombinedsep{#1}{#2}}% +\end{resultbox} + +Note that the mallard entry (which has \idx{hierarchicallevel}~2) has its +group shown in the first \idx{glossary} (where the group is formed +for all levels) but not in the second \idx{glossary} (where the +redefinition of \gls{glsxtraddgroup} restricts \idx{group} formation to +just level~0 and level~1). + +There's a small visual distinction between the \idx{group} titles in +different \idxpl{hierarchicallevel} in the above. The top-level +(level~0) groups have the title centred, whereas the sub-groups have +their titles indented by the same amount as the corresponding +sub-entries. This is due to the \idx{glossarystyle}. Other styles +may use the same formatting for all \idxpl{hierarchicallevel}. + +The \idxpl{glossarystyle} provided with \sty{glossaries-extra} and +the base styles patched by \sty{glossaries-extra-stylemods} all +redefine: +\cmddef{glssubgroupheading} +to format the sub-group headings in a manner applicable to the style. +For example, styles that don't show sub-entry names typically +redefine this command to do nothing. + +A default definition that simply does +\code{\gls{glsgroupheading}\margm{group-label}} is automatically +initialised by \gls{setglossarystyle} (via +\gls{glsxtrpreglossarystyle}) to allow for styles that don't +redefine this command. The first two arguments refer to the +\idx{hierarchicallevel}, where \meta{previous level} is the level of +the previous \idx{group} and \meta{level} is the level of this new +sub-\idx{group}. The \meta{parent-label} is the label of the current +entry's parent, where the current entry is the first entry of the +sub-\idx{group} that immediately follows the heading. + +The \glostyle{bookindex} style defines \gls{glssubgroupheading} to +use the style's associated command +\gls{glsxtrbookindexformatsubheader}. This can be redefined as +required. For example, the following uses the parent entry's +hierarchical information: +\begin{codebox} +\cmd{renewcommand}*\marg{\gls{glsxtrbookindexformatsubheader}}[5]\marg{\% + \cmd{ifnum}\#2>1\gls{relax} + \gls{glstreesubsubitem}\gls{glstreegroupheaderfmt}\marg{\gls{GlsXtrhiername}\marg{\#3} / \#5}\% + \cmd{else} + \gls{glstreesubitem}\gls{glstreegroupheaderfmt}\marg{\gls{GlsXtrhiername}\marg{\#3} / \#5}\% + \cmd{fi} } -\end{verbatim} -This will use the \catattr{combinedfirstsepfirst} attribute for -\meta{prev label}'s category, if set. If that attribute isn't set, -\cs{glscombinedsep} is used. - -These commands may be redefined as required. -For example, to have no space between two elements that have both -been marked as used and are both abbreviations (disregarding -category attributes): -\begin{verbatim} -\renewcommand*{\glscombinedfirstsepfirst}[2]{% - \ifglshasshort{#1}{\ifglshasshort{#2}{}{\space}}{\space}% +\end{codebox} + +The above examples are contrived and demonstrate the need to define +entries in a sensible order to achieve a sensible \idx{glossary} +with \gls{printunsrtglossary}. If you want to use this approach to +display a \idx{glossary}, you would need to make sure that you +take care with the order that you define entries. This can be quite +tedious for a large number of entries. + +To switch to \app{bib2gls}, the entry data needs to be provided in a +\ext{bib} file. For example, the file \filefmt{animalfamilies.bib} might +contain: +\newcommand*{\examplegroupsbibdefs}{% +\atentry{index}\marg{waterfowl,\gloskeyval{user1}{Anseriformes}}\newline +\atentry{index}\marg{ant,\gloskeyval{user1}{Formicidae}}\newline +\atentry{index}\marg{adder,\gloskeyval{user1}{Vipera berus}}\newline +\atentry{index}\marg{duck,\gloskeyval{parent}{waterfowl},\gloskeyval{user1}{Anatidae}}\newline +\atentry{index}\marg{zebra,\gloskeyval{user1}{Hippotigris}}\newline +\atentry{index}\marg{aardvark,\gloskeyval{user1}{Orycteropus +afer}}\newline +\atentry{index}\marg{gazelle,\gloskeyval{user1}{Gazella}}\newline +\atentry{index}\marg{mallard,\gloskeyval{parent}{duck},\gloskeyval{user1}{Anas platyrhynchos}} +} +\begin{codebox} +\examplegroupsbibdefs +\end{codebox} +I've included some additional information stored in the +\gloskey{user1} field that wasn't in the earlier examples. The +document needs to use the \opt{record} option and +\gls{GlsXtrLoadResources} in order for it to work properly with +\app{bib2gls}: +\begin{codebox} +\cmd{usepackage}\oarg{\opt{record},\optval{stylemods}{bookindex},\optval{style}{bookindex}} + \marg{glossaries-extra} +\gls{newglossary*}\marg{another}\marg{Another Glossary} +\gls{GlsXtrLoadResources}\oarg{\resourceoptval{selection}{all},\comment{select all entries} + \resourceoptvalm{src}{animalfamilies},\comment{identify bib file(s)} + \resourceoptval{sort}{en-GB},\comment{sort method} + \resourceoptvalm{secondary}{la:user1:another}\comment{sort again and copy to `another'} +} +\gls{glsdefpostname}\marg{\cat{index}}\marg{ + (\cmd{emph}\marg{\gls{glsentryuseri}\marg{\gls{glscurrententrylabel}}})} +\cbeg{document} +\gls{printunsrtglossary} +\gls{printunsrtglossary}\oarg{\printglossoptval{type}{another}} +\cend{document} +\end{codebox} +If this code is saved in the file \filefmt{myDoc.tex} then the build +process is now: +\begin{terminal} +pdflatex myDoc +bib2gls \switch{group} myDoc +pdflatex myDoc +\end{terminal} +The \switch{group} (or \switch{g}) switch is important as it +instructs \app{bib2gls} to set the \gloskey{group} field for the +primary sort and the \glosfield{secondarygroup} for the secondary +sort. The primary sort will sort entries according to \code{en-GB} +(British English). This can simply be set to \code{en} without a +region. The secondary sort will resort the entries, but this time +according to \code{la} (Latin) using the \gloskey{user1} key as the +sort value. The entry labels will then be copied to the custom +\code{another} glossary. + +The \ext{glstex} file created by \app{bib2gls} (which will then be +input by \gls{GlsXtrLoadResources} on the subsequent \LaTeX\ run) +essentially contains the following code: +\begin{codebox} +\gls{glsxtrsetgrouptitle}\marg{6881280}\marg{W} +\gls{glsxtrsetgrouptitle}\marg{5832704}\marg{G} +\gls{glsxtrsetgrouptitle}\marg{5373952}\marg{A} +\gls{glsxtrsetgrouptitle}\marg{7077888}\marg{Z} +\gls{glsxtrsetgrouptitle}\marg{another5373952}\marg{A} +\gls{glsxtrsetgrouptitle}\marg{another5767168}\marg{F} +\gls{glsxtrsetgrouptitle}\marg{another6356992}\marg{O} +\gls{glsxtrsetgrouptitle}\marg{another5898240}\marg{H} +\gls{glsxtrsetgrouptitle}\marg{another6815744}\marg{V} +\gls{glsxtrsetgrouptitle}\marg{another5832704}\marg{G} +\codepar +\gls{longnewglossaryentry*}\marg{aardvark}\marg{\gloskeyval{name}{aardvark}, + \gloskeyval{user1}{Orycteropus afer},\gloskeyval{group}{5373952}}\marg{} +\gls{longnewglossaryentry*}\marg{adder}\marg{\gloskeyval{name}{adder}, + \gloskeyval{user1}{Vipera berus},\gloskeyval{group}{5373952}}\marg{} +\gls{longnewglossaryentry*}\marg{ant}\marg{\gloskeyval{name}{ant}, + \gloskeyval{user1}{Formicidae},\gloskeyval{group}{5373952}}\marg{} +\gls{longnewglossaryentry*}\marg{gazelle}\marg{\gloskeyval{name}{gazelle}, + \gloskeyval{user1}{Gazella},\gloskeyval{group}{5832704}}\marg{} +\gls{longnewglossaryentry*}\marg{waterfowl}\marg{\gloskeyval{name}{waterfowl}, + \gloskeyval{user1}{Anseriformes},\gloskeyval{group}{6881280}}\marg{} +\gls{longnewglossaryentry*}\marg{duck}\marg{\gloskeyval{name}{duck}, + \gloskeyval{parent}{waterfowl},\gloskeyval{user1}{Anatidae},\gloskeyval{group}{}}\marg{} +\gls{longnewglossaryentry*}\marg{mallard}\marg{\gloskeyval{name}{mallard}, + \gloskeyval{parent}{duck},\gloskeyval{user1}{Anas platyrhynchos},\gloskeyval{group}{}}\marg{} +\gls{longnewglossaryentry*}\marg{zebra}\marg{\gloskeyval{name}{zebra}, + \gloskeyval{user1}{Hippotigris},\gloskeyval{group}{7077888}}\marg{} +\codepar +\gls{apptoglossarypreamble}\oarg{another} + \marg{\cmd{renewcommand}\marg{\gls{glsxtrgroupfield}}\marg{\glosfield{secondarygroup}}} +\gls{glsxtrcopytoglossary}\marg{waterfowl}\marg{another} +\gls{GlsXtrSetField}\marg{waterfowl}\marg{\glosfield{secondarygroup}}\marg{another5373952} +\gls{glsxtrcopytoglossary}\marg{duck}\marg{another} +\gls{glsxtrcopytoglossary}\marg{mallard}\marg{another} +\gls{glsxtrcopytoglossary}\marg{ant}\marg{another} +\gls{GlsXtrSetField}\marg{ant}\marg{\glosfield{secondarygroup}}\marg{another5767168} +\gls{glsxtrcopytoglossary}\marg{gazelle}\marg{another} +\gls{GlsXtrSetField}\marg{gazelle}\marg{\glosfield{secondarygroup}}\marg{another5832704} +\gls{glsxtrcopytoglossary}\marg{zebra}\marg{another} +\gls{GlsXtrSetField}\marg{zebra}\marg{\glosfield{secondarygroup}}\marg{another5898240} +\gls{glsxtrcopytoglossary}\marg{aardvark}\marg{another} +\gls{GlsXtrSetField}\marg{aardvark}\marg{\glosfield{secondarygroup}}\marg{another6356992} +\gls{glsxtrcopytoglossary}\marg{adder}\marg{another} +\gls{GlsXtrSetField}\marg{adder}\marg{\glosfield{secondarygroup}}\marg{another6815744} +\end{codebox} + +It's more complicated than this as helper commands are provided to +make it easier to customize and the entries will all have +\gloskeyval{category}{index} since they were defined with +\atentry{index}, but this is basically like the preamble in the +earlier examples, except that the ordering and \idxpl{group} are +more logical. The result is shown in \exampleref{ex:bib2glsgrp}. + +\begin{resultbox}[float] +\createexample*[label={ex:bib2glsgrp}, +arara={pdflatex,bib2gls: { group: on },pdflatex,pdfcrop}, +title={Displaying sorted glossaries with groups using \appfmt{bib2gls}}, +description={Example document that uses bib2gls to created a two +differently sorted lists with the same entries}] +{\cbeg{filecontents*}{animalfamilies.bib}^^J% +\examplegroupsbibdefs^^J% +\cend{filecontents*}^^J% +\cmd{usepackage}\oarg{\opt{record},\optval{stylemods}{bookindex},\optval{style}{bookindex}}\marg{glossaries-extra}^^J% +\gls{newglossary*}\marg{another}\marg{Another Glossary}^^J% +\gls{GlsXtrLoadResources}\oarg{\resourceoptval{selection}{all},\comment{select all entries} + \resourceoptvalm{src}{animalfamilies},\comment{identify bib file(s)} + \resourceoptval{sort}{en-GB},\comment{sort method} + \resourceoptvalm{secondary}{la:user1:another}\comment{sort again and copy to `another'} +}^^J% +\gls{glsdefpostname}\marg{index}\marg{ ^^J + (\cmd{emph}\marg{\gls{glsentryuseri}\marg{\gls{glscurrententrylabel}}})} +}{\gls{printunsrtglossary}^^J% +\gls{printunsrtglossary}\oarg{\printglossoptval{type}{another}} +} +\end{resultbox} + +Note that the \gloskey{group} and \glosfield{secondarygroup} fields +haven't been set for the child entries (duck and mallard). This is +the default behaviour and it means that regardless of the definition +you provide for \gls{glsxtraddgroup}, sub-groups won't be displayed. +If you want those fields set for child entries, you need to use the +\resourceopt{group-level} resource option. For example: +\begin{codebox} +\gls{GlsXtrLoadResources}\oarg{\resourceoptval{selection}{all},\comment{select all entries} + \strong{\resourceoptvalm{group-level}{<=1},\comment{\idxc{hierarchicallevel}{level}~0 and 1}} + \resourceoptvalm{src}{animalfamilies},\comment{identify bib file(s)} + \resourceoptval{sort}{en-GB},\comment{sort method} + \resourceoptvalm{secondary}{la:user1:another}\comment{sort again and copy} } -\end{verbatim} +\end{codebox} + +This will add support for level~0 (no parent) and level~1 (parent +but no grandparent) entries. Deeper levels won't have support. +The \switch{group} switch is still required. + +\subsection{Location Lists} +\label{sec:printunsrtlocations} + +The \idx{unsrtfam} check for the existence of the \gloskey{location} +and \glosfield{loclist} keys. These are both defined by the \opt{record} +option. (The \glosfield{loclist} field is also used by +\gls{makenoidxglossaries} but isn't defined as a key.) + +The \gloskey{location} field (if set) should contain the formatted +\idx{locationlist}. This is checked first and used if not empty. +Otherwise the \glosfield{loclist} field (if set) is used, but that +will use the same method as \gls{printnoidxglossary} to format, +which doesn't compact consecutive locations. + +It's possible to choose a different field for the formatted +\idx{locationlist} by redefining: +\cmddef{GlsXtrLocationField} +This should expand to the \idx{internalfieldlabel}. If the field is +not the default \gloskey{location} then the test for +\glosfield{loclist} is omitted. + +Whichever field is used, the formatted \idx{locationlist} is passed +to the appropriate \idx{glossarystyle} command (\gls{glossentry} or +\gls{subglossentry}) encapsulated with \gls{glossaryentrynumbers}. + +If there's no location field or if the tested fields are empty, then +an empty argument (with no \gls{glossaryentrynumbers} encapsulator) +is passed to the \idx{glossarystyle} command. In this case, the +\opt{nonumberlist} option is redundant as there's no +\idx{locationlist} to suppress. + +\subsection{Advanced Commands} +\label{sec:printunsrtadvanced} + +To provide a better understanding of how filtered and inner glossaries work, it’s +useful to understand the difference between \gls{printglossary} (used +with \app{makeindex} and \app{xindy}) and \gls{printunsrtglossary} (used with +\app{bib2gls}). + +In the first case, \app{makeindex} or \app{xindy} is used to create a file that +contains content in the form: +\begin{codebox} +\gls{glossarysection}\oarg{\gls{glossarytoctitle}}\marg{\gls{glossarytitle}}\comment{} +\gls{glossarypreamble} +\cbeg{\env{theglossary}}\gls{glossaryheader} +\meta{content} +\cend{\env{theglossary}}\gls{glossarypostamble} +\end{codebox} +where \meta{content} contains lines such as: +\begin{codebox} +\gls{glsgroupheading}\margm{group label}\gls{relax} \gls{glsresetentrylist} +\gls{glossentry}\margm{entry label}\margm{location list}\comment{} +\gls{subglossentry}\margm{level}\margm{entry label}\margm{location list}\comment{} +\end{codebox} + +The \idx{group} headings (see \sectionref{sec:printunsrtgroups}) are +typeset using \gls{glsgroupheading}. +Top-level entries are typeset with \gls{glossentry} and child +entries are typeset with \gls{subglossentry} where \meta{level} indicates the +\idx{hierarchicallevel}. Both \app{makeindex} and \app{xindy} order the items so that +the child entries are placed immediately after the corresponding +parent entry. + +The \gls{printglossary} command essentially does: +\begin{codebox} +\meta{Set default title and style.} +\cmd{bgroup} + \meta{Initial setup.} + \meta{Input the file created by \app{makeindex} or \app{xindy}.} +\cmd{egroup} +\end{codebox} + +The initial setup part sets the \idx{glossarystyle} (which +determines the definitions of \env{theglossary}, +\gls{glossaryheader}, \gls{glsgroupheading}, \gls{glossentry} and +\gls{subglossentry}), assigns the title (\gls{glossarytitle} and +\gls{glossarytoctitle}) and defines \gls{currentglossary}. (There is +some other stuff done both before and after the file is input, but +that's not relevant here.) + +In the case of \app{bib2gls}, there isn't a glossary file to input. +Instead, \app{bib2gls} is used to create a file that contains the +entry definitions, which is input in the document preamble (via +\gls{GlsXtrLoadResources}). The entries are defined in the required +order and use internal \idxpl{field} to store the indexing +information (such as the \idx{group} label and +\idxpl{locationlist}). Now \gls{printunsrtglossary} is used to +display the glossary, which essentially does: +\begin{codebox} +\meta{Set default title and style.} +\cmd{bgroup} + \meta{Initial setup.} + \gls{glossarysection}\oarg{\gls{glossarytoctitle}}\marg{\gls{glossarytitle}}\comment{} + \gls{glossarypreamble} + \meta{Construct internal control sequence containing glossary content.} + \meta{Expand internal control sequence.} + \gls{glossarypostamble} +\cmd{egroup} +\end{codebox} + +The \meta{initial setup} is the same as for \gls{printglossary}. The key +difference here is that there's no file containing the typeset +\idx{glossary} that can be simply input. Instead it's necessary to iterate +over the \idx{glossary}['s] internal label list. Some of the +\idxpl{glossarystyle} use a \env{tabular}-like +environment (such as \env{longtable}, which is used by the +\glostyle{long} styles). +It's always problematic having a loop inside a \env{tabular} context so +\gls{printunsrtglossary} by-passes the problem by moving the loop outside +of the \env{theglossary} environment. The command iterates over all +entry labels (in the order in which they were added to the +\idx{glossary}) and constructs an internal control sequence +(\inlineglsdef{@glsxtr@doglossary}), which ends up +containing: +\begin{codebox} +\cbeg{\env{theglossary}}\gls{glossaryheader}\gls{glsresetentrylist} +\meta{content} +\cend{\env{theglossary}} +\end{codebox} + +The \meta{content} in this case is different as it doesn't +explicitly contain \gls{glossentry} and \gls{subglossentry} but +instead uses an internal handler that just takes the entry label as +the argument. The \code{\gls{glsgroupheading}\margm{group label}} +command is inserted whenever a top-level entry has the group field +set to a label that's different to the previous top-level entry’s +group field (and, if supported, sub-groups are similarly inserted +with \gls{glssubgroupheading}, see +\sectionref{sec:printunsrtgroups}). So the content is in the form: +\begin{codebox} +\gls{glsgroupheading}\margm{group label}\comment{} +\cmd{\meta{internal cs handler}}\margm{entry label}\comment{} +\cmd{\meta{internal cs handler}}\margm{entry label}\comment{} +\ldots +\gls{glsgroupheading}\margm{group label}\comment{} +\cmd{\meta{internal cs handler}}\margm{entry label}\comment{} +\cmd{\meta{internal cs handler}}\margm{entry label}\comment{} +\ldots +\end{codebox} + +There are hooks and commands available for use within those +hooks that may be adjusted to customize the way the \idx{glossary} +is displayed. These are described below. + +At each iteration (while the \idx{glossary} content is being +constructed), the following steps are performed: +\begin{enumerate} +\item Store the current entry label in \gls{glscurrententrylabel}. +\item If \gls{glscurrententrylabel} is empty, skip this iteration. +\item Define placeholder commands: +\cmddef{glscurrententrylevel} +This is set to the current entry's \idx{hierarchicallevel} (taking +\printglossopt{leveloffset} and \printglossopt{flatten} options +into account); +\cmddef{glscurrenttoplevelentry} +This is set to the current entry label if \gls{glscurrententrylevel} +is 0 (that is, it expands to the most recent top-level entry, +allowing for \printglossopt{flatten} and \printglossopt{leveloffset}); +\cmddef{glscurrentrootentry} +This is set to the current entry label if +\printglossoptval{flatten}{true} or if the current entry doesn't have +a parent (that is, it expands to the most recent top-level entry, +allowing for \printglossopt{flatten} but not \printglossopt{leveloffset}). +\item Perform the entry process hook: +\cmddef{printunsrtglossaryentryprocesshook} +This does nothing by default. Within the definition of this hook, +you may use: +\cmddef{printunsrtglossaryskipentry} +This will cause the remainder of the current iteration to be +skipped, which will prevent the current entry from being shown in +the \idx{glossary}. +\item If \printglossoptval{groups}{true}, use \gls{glsxtraddgroup} +(see \sectionref{sec:printunsrtgroups}) to append the top-level group heading +(\gls{glsgroupheading}) or the sub-group heading +(\gls{glssubgroupheading}) to \gls{@glsxtr@doglossary}. +\item Append +\code{\cmd{\meta{internal cs handler}}\margm{entry label}} to \gls{@glsxtr@doglossary}. +\end{enumerate} -There are some commands for redefining the above separators to -common combinations. +\begin{warning} +The placeholders \gls{glscurrenttoplevelentry} and +\gls{glscurrentrootentry} may not be an ancestor of the current +entry. For example, if the \idx{glossary} doesn't have child entries +immediately following their parent entry. +\end{warning} + +Once the \idx{glossary} construction (\gls{@glsxtr@doglossary}) has been completed, the +following hook is performed: +\cmddef{printunsrtglossarypredoglossary} +This does nothing by default. You can redefine this to show the +definition of \gls{@glsxtr@doglossary} for debugging purposes: +\begin{codebox} +\cmd{renewcommand}\marg{\gls{printunsrtglossarypredoglossary}}\marg{\comment{} + \cmd{csshow}\marg{@glsxtr@doglossary}} +\end{codebox} +This will interrupt the \LaTeX\ run and display the definition in the +transcript. + +The handler command \code{\cmd{\meta{internal cs handler}}} performs +the following: +\begin{codebox} +\cmd{protected@xdef}\gls{glscurrententrylabel}\margm{entry-label}\comment{} +\gls{printunsrtglossaryhandler}\gls{glscurrententrylabel} +\end{codebox} +This stores the entry's label in \gls{glscurrententrylabel} (which +allows it to be referenced in style hooks, such as the +\idx{postnamehook} or \idx{postdeschook}). Note that it uses a +global definition to avoid scoping issues caused with +\env{tabular}-like styles. The main handling of the +entry is performed by: +\cmddef{printunsrtglossaryhandler} +This is simply defined to use: +\cmddef{glsxtrunsrtdo} +This displays the entry according to the current +\idx{glossarystyle}, taking the \idx{hierarchicallevel} into account +(as given by \gls{glscurrententrylevel}). + +The following are additional commands that may be useful in the +above hooks. +\cmddef{glsxtriflabelinlist} +Does \meta{true} if the given label is in the given comma-separated +list of labels, otherwise does \meta{false}. The label and list are fully +expanded. + +\cmddef{ifglsxtrprintglossflatten} +This conditional is set by the \printglossopt{flatten} option and +can be used to test if the option has been set. + +For example, the following skips all entries that have the +\gloskey{category} set to \cat{symbol}: +\begin{codebox} +\cmd{usepackage}\oarg{\optval{style}{index}}\marg{glossaries-extra} +\gls{newglossaryentry}\marg{ant}\marg{\gloskeyval{name}{ant},\gloskeyval{description}{}} +\gls{newglossaryentry}\marg{pi}\marg{\gloskeyval{name}{\cmd{ensuremath}\marg{\cmd{pi}}},\gloskeyval{description}{}, + \gloskeyval{category}{symbol}} +\gls{newglossaryentry}\marg{aardvark}\marg{\gloskeyval{name}{aardvark},\gloskeyval{description}{}} +\gls{newglossaryentry}\marg{alpha}\marg{\gloskeyval{name}{\cmd{ensuremath}\marg{\cmd{alpha}}},\gloskeyval{description}{}, + \gloskeyval{category}{symbol}} +\cbeg{document} +\cmd{renewcommand}\marg{\gls{printunsrtglossaryentryprocesshook}}\oarg{1}\marg{\% + \gls{glsifcategory}\marg{\#1}\marg{symbol}\% + \marg{\gls{printunsrtglossaryskipentry}}\% + \marg{}\% +} +\gls{printunsrtglossary} +\cend{document} +\end{codebox} +\begin{resultbox} +\createexample*[title={Filtering by category}, + label={ex:filterbycat}, +description={Example document that displays a glossary with entries +filtered by category}] +{\cmd{usepackage}\oarg{\optval{style}{index}}\marg{glossaries-extra}^^J +\gls{newglossaryentry}\marg{ant}\marg{\gloskeyval{name}{ant},\gloskeyval{description}{}}^^J +\gls{newglossaryentry}\marg{pi}\marg{\gloskeyval{name}{\cmd{ensuremath}\marg{\cmd{pi}}},\gloskeyval{description}{},^^J + \gloskeyval{category}{symbol}}^^J% +\gls{newglossaryentry}\marg{aardvark}\marg{\gloskeyval{name}{aardvark},\gloskeyval{description}{}} +}{\cmd{renewcommand}\marg{\gls{printunsrtglossaryentryprocesshook}}\oarg{1}\marg{\%^^J + \gls{glsifcategory}\marg{\#1}\marg{symbol}\%^^J + \marg{\gls{printunsrtglossaryskipentry}}\%^^J + \marg{}\%^^J +}^^J% +\gls{printunsrtglossary} +} +\end{resultbox} -\begin{definition}[\DescribeMacro\glssetcombinedsepabbrvnbsp] -\cs{glssetcombinedsepabbrvnbsp} -\end{definition} -This does the following: -\begin{verbatim} -\renewcommand*{\glscombinedsep}[2]{% - \glshasattribute{#1}{combinedsep}% - {\glsgetattribute{#1}{combinedsep}}% - {\ifhasshort{#1}{~}{ }}% -}% -\renewcommand*{\glscombinedsepfirst}[2]{% - \glshasattribute{##1}{combinedsepfirst}% - {\glsgetattribute{##1}{combinedsepfirst}}% - {\ifhasshort{#1}{~}{ }}% -}% -\renewcommand*{\glscombinedfirstsep}[2]{% - \glshasattribute{#1}{combinedfirstsep}% - {\glsgetattribute{#1}{combinedfirstsep}}% - { }% -}% -\renewcommand*{\glscombinedfirstsepfirst}[2]{% - \glshasattribute{##1}{combinedfirstsepfirst}% - {\glsgetattribute{##1}{combinedfirstsepfirst}}% - { }% -}% -\end{verbatim} -This uses a non-breakable space \verb|~| following an abbreviation -(that has already been marked as used). Note that if the associated -attributes are set the commands will behave according to the -attribute. +\subsubsection{Inner Glossaries} +\label{sec:printunsrtinner} -\begin{definition}[\DescribeMacro\glssetcombinedsepabbrvnone] -\cs{glssetcombinedsepabbrvnone} -\end{definition} -This does the following: -\begin{verbatim} -\renewcommand*{\glscombinedsep}[2]{% - \glshasattribute{#1}{combinedsep}% - {\glsgetattribute{#1}{combinedsep}}% - {\ifhasshort{#1}{}{\ifhasshort{#2}{}{ }}}% -}% -\renewcommand*{\glscombinedsepfirst}[2]{% - \glshasattribute{#1}{combinedsepfirst}% - {\glsgetattribute{#1}{combinedsepfirst}}% - {\ifhasshort{#1}{}{ }}% -}% -\renewcommand*{\glscombinedfirstsep}[2]{% - \glshasattribute{##1}{combinedfirstsep}% - {\glsgetattribute{##1}{combinedfirstsep}}% - {\ifhasshort{##2}{}{ }}% -}% -\renewcommand*{\glscombinedfirstsepfirst}[2]{% - \glshasattribute{##1}{combinedfirstsepfirst}% - {\glsgetattribute{##1}{combinedfirstsepfirst}}% - { }% +\begin{information} +See also \gallerypage{bib2gls-inner}{Gallery: Inner or Nested Glossaries}. +\end{information} + +It's possible you may want to combine multiple \idxpl{glossary} +sequentially, as sub-blocks of a single list. The inner part of +\gls{printunsrtglossary} can be created with: +\cmddef{printunsrtinnerglossary} +This can't be used on its own, as it only forms a fragment. It +doesn't include the section header, style +initialisation, preamble, \env{theglossary} environment, header and +postamble. + +As with \gls{printunsrtglossary}, \gls{printunsrtinnerglossary} +constructs an internal control sequence containing the content, but +it adds scoping to localise the effects of any supplied options. So +it essentially does: +\begin{codebox} +\cmd{begingroup} + \meta{Initial setup (process options).} + \meta{pre-code} + \meta{Construct internal control sequence containing glossary content.} + \meta{Expand internal control sequence.} + \meta{post-code} +\cmd{endgroup} +\end{codebox} + +There are two ways this command may be used. +\envdef{printunsrtglossarywrap} +The \env{printunsrtglossarywrap} environment takes one optional +argument that uses the same keys as \gls{printunsrtglossary} (see +\sectionref{sec:printglossopts}). Note that in this case the +\printglossopt{type} key simply provides a title (if one has been assigned to that +\idx{glossary}). It doesn't indicate the content. There's no point +using both \printglossopt{type} and \printglossopt{title}. + +The start of the environment sets up the glossary style and does the header: +\begin{codebox} +\meta{Set default title and style.} +\meta{Initial setup.} +\gls{glossarysection}\oarg{\gls{glossarytoctitle}}\marg{\gls{glossarytitle}}\comment{} +\gls{glossarypreamble} +\cbeg{\env{theglossary}}\gls{glossaryheader}\gls{glsresetentrylist} +\end{codebox} +The end of this wrapper environment ends \env{theglossary} and does the postamble: +\begin{codebox} +\cend{\env{theglossary}}\gls{glossarypostamble} +\end{codebox} + +For example, the following has two \idxpl{glossary} but displays +them as inner \idxpl{glossary}: +\begin{codebox} +\gls{newglossaryentry}\marg{ant}\marg{\gloskeyval{name}{ant},\gloskeyval{description}{}} +\gls{newglossaryentry}\marg{bee}\marg{\gloskeyval{name}{bee},\gloskeyval{description}{}} +\gls{newignoredglossary*}\marg{other} +\gls{newglossaryentry}\marg{duck}\marg{\gloskeyval{name}{duck},\gloskeyval{description}{}} +\gls{newglossaryentry}\marg{goose}\marg{\gloskeyval{name}{goose},\gloskeyval{description}{}} +\cbeg{document} +\cbeg{\env{printunsrtglossarywrap}}\oarg{\printglossoptval{style}{index}} +\gls{glstreeitem} First Glossary +\gls{printunsrtinnerglossary}\oarg{\printglossoptval{leveloffset}{1}}\marg{}\marg{} +\gls{glstreeitem} Second Glossary +\gls{printunsrtinnerglossary}\oarg{\printglossoptval{type}{other},\printglossoptval{leveloffset}{1}}\marg{}\marg{} +\cend{\env{printunsrtglossarywrap}} +\cend{document} +\end{codebox} +\begin{resultbox} +\createexample*[title={Inner glossaries using \envfmt{printunsrtglossarywrap}}, + label={ex:unsrtwrap}, +description={Example document illustrating two inner glossaries offset +by 1 level}] +{\cmd{usepackage}\marg{glossaries-extra}^^J% +\gls{newglossaryentry}\marg{ant}\marg{\gloskeyval{name}{ant},\gloskeyval{description}{}}^^J% +\gls{newglossaryentry}\marg{bee}\marg{\gloskeyval{name}{bee},\gloskeyval{description}{}}^^J% +\gls{newignoredglossary*}\marg{other}^^J% +\gls{newglossaryentry}\marg{duck}\marg{\gloskeyval{type}{other},\gloskeyval{name}{duck},\gloskeyval{description}{}}^^J% +\gls{newglossaryentry}\marg{goose}\marg{\gloskeyval{type}{other},\gloskeyval{name}{goose},\gloskeyval{description}{}} +}{\cbeg{\env{printunsrtglossarywrap}}\oarg{\printglossoptval{style}{index}}^^J% +\gls{glstreeitem} First Glossary^^J% +\gls{printunsrtinnerglossary}\oarg{\printglossoptval{leveloffset}{1}}\marg{}\marg{}^^J% +\gls{glstreeitem} Second Glossary^^J% +\gls{printunsrtinnerglossary}\oarg{\printglossoptval{type}{other},\printglossoptval{leveloffset}{1}}\marg{}\marg{}^^J% +\cend{\env{printunsrtglossarywrap}} +} +\end{resultbox} + +The other way that \gls{printunsrtinnerglossary} can be used is +within \gls{printunsrtglossary}. +The handler function described in \sectionref{sec:printunsrtadvanced} that's used to +process each entry to be displayed in the \idx{glossary}, is +defined as: +\begin{codebox} +\cmd{newcommand}\marg{\gls{printunsrtglossaryhandler}}[1]\marg{\gls{glsxtrunsrtdo}\marg{\#1}} +\end{codebox} + +It's possible to redefine this so that it also displays an inner +glossary. The following example has the terms \qt{pictograph} and +\qt{Greek symbol} in the \code{main} glossary. Two +\idxpl{ignoredglossary} are created (which don't require a title) +where the \idx{glossary} label matches an entry label in the +\code{main} \idx{glossary}. +\begin{codebox} +\cmd{usepackage}\marg{fontawesome} +\cmd{usepackage}\oarg{\optval{style}{\glostyle{tree}}}\marg{glossaries-extra} +\gls{newglossaryentry}\marg{pictograph}\marg{\gloskeyval{name}{pictograph}, + \gloskeyval{description}{picture or symbol representing a word or +phrase}} +\gls{newglossaryentry}\marg{mathgreek}\marg{\gloskeyval{name}{Greek symbol}, + \gloskeyval{description}{mathematical constants or functions}} +\gls{newignoredglossary*}\marg{pictograph} +\gls{newignoredglossary*}\marg{mathgreek} +\gls{newglossaryentry}\marg{cut}\marg{\gloskeyval{type}{pictograph}, + \gloskeyval{name}{\cmd{faCut}}, + \gloskeyval{description}{cut}} +\gls{newglossaryentry}{paste}\marg{\gloskeyval{type}{pictograph}, +\gloskeyval{name}{\cmd{faPaste}}, + \gloskeyval{description}{paste}} +\gls{newglossaryentry}\marg{alpha}\marg{\gloskeyval{type}{mathgreek}, + \gloskeyval{name}{\cmd{ensuremath}\marg{\cmd{alpha}}}, + \gloskeyval{description}{alpha}} +\gls{newglossaryentry}\marg{beta}\marg{\gloskeyval{type}{mathgreek}, + \gloskeyval{name}{\cmd{ensuremath}\marg{\cmd{beta}}}, + \gloskeyval{description}{beta}} +\cbeg{document} +\cmd{newcommand}\marg{\cmd{nestedhandler}}[1]\marg{\% + \gls{glsxtrunsrtdo}\marg{\#1}\% + \gls{ifglossaryexists}*\marg{\#1}\% + \marg{\% + \gls{printunsrtinnerglossary}\oarg{\printglossoptvalm{type}{\#1},\printglossoptvalm{leveloffset}{++1}, + \printglossoptval{groups}{false}}\marg{}\marg{}\% + }\% + {}\% +} +\gls{printunsrtglossary*}\marg{\cmd{let}\gls{printunsrtglossaryhandler}\cmd{nestedhandler}} +\cend{document} +\end{codebox} + +This creates a custom command \csfmt{nestedhandler} that can be used as the handler to +create nested \idxpl{glossary}. After each item in the glossary, if +the entry's label matches the label of a defined glossary, that +glossary is displayed with its \idx{hierarchicallevel} incremented +by 1, which creates the illusion of child entries. The resulting +document is shown in \exampleref{ex:nested}. + +\begin{resultbox} +\createexample*[label={ex:nested}, + title={Nested glossaries}, + description={Example document with a glossary that has inner glossaries}] +{% +\cmd{usepackage}\marg{fontawesome}^^J% +\cmd{usepackage}\oarg{\optval{style}{\glostyle{tree}}}\marg{glossaries-extra}^^J% +\gls{newglossaryentry}\marg{pictograph}\marg{\gloskeyval{name}{pictograph},^^J + \gloskeyval{description}{picture or symbol representing a word or +phrase}}^^J% +\gls{newglossaryentry}\marg{mathgreek}\marg{\gloskeyval{name}{Greek +symbol},^^J + \gloskeyval{description}{mathematical constants or functions}}^^J% +\gls{newignoredglossary*}\marg{pictograph}^^J% +\gls{newignoredglossary*}\marg{mathgreek}^^J% +\gls{newglossaryentry}\marg{cut}\marg{\gloskeyval{type}{pictograph},^^J + \gloskeyval{name}{\cmd{faCut}},^^J + \gloskeyval{description}{cut}}^^J% +\gls{newglossaryentry}{paste}\marg{\gloskeyval{type}{pictograph},^^J +\gloskeyval{name}{\cmd{faPaste}}, + \gloskeyval{description}{paste}}^^J% +\gls{newglossaryentry}\marg{alpha}\marg{\gloskeyval{type}{mathgreek},^^J + \gloskeyval{name}{\cmd{ensuremath}\marg{\cmd{alpha}}},^^J + \gloskeyval{description}{alpha}}^^J% +\gls{newglossaryentry}\marg{beta}\marg{\gloskeyval{type}{mathgreek},^^J + \gloskeyval{name}{\cmd{ensuremath}\marg{\cmd{beta}}},^^J + \gloskeyval{description}{beta}} +}{% +\cmd{newcommand}\marg{\cmd{nestedhandler}}[1]\marg{\%^^J + \gls{glsxtrunsrtdo}\marg{\#1}\%^^J + \gls{ifglossaryexists}*\marg{\#1}\%^^J + \marg{\%^^J + \gls{printunsrtinnerglossary}\oarg{\printglossoptvalm{type}{\#1},\printglossoptvalm{leveloffset}{++1},\printglossoptval{groups}{false}}\marg{}\marg{}\%^^J + }\%^^J + {}\%^^J% +}^^J% +\gls{printunsrtglossary*}\marg{\cmd{let}\gls{printunsrtglossaryhandler}\cmd{nestedhandler}} +} +\end{resultbox} + +\subsubsection{Per-Unit Glossaries} +\label{sec:printunsrtunit} + +If you are using \app{bib2gls} then it's possible to only list +entries that match a particular counter value. For example, you may +want a \idx{mini-glossary} at the start of a section that only lists the +entries that have been \recorded\ in that section. This can be done +by using the handler to skip entries that don't have a matching +record. It can also be implemented with record counting, as shown in +\exampleref{ex:recordcountminigloss} in \sectionref{sec:recordcount}. + +It's also possible to make each \idx{indexing} instance automatically +make a note of a particular counter using: +\cmddef{GlsXtrRecordCounter} +(This doesn't correspond to a \app{bib2gls} \record. That's dealt +with by the indexing that comes first.) + +This command may only be used in the preamble (with \opt{record}) and indicates that +whenever an entry is indexed, the following line should be added to +the \ext+{aux} file: +\cmddef{glsxtr@counterrecord} +where \meta{value} is given by \gls{thecounter}. +On the next \LaTeX\ run, this information is picked up from the +\ext{aux} file and the information is added to the +\glosfield{record.counter} field (stored as an \sty{etoolbox} +internal list). This internal command is only used in the \ext{aux} +file and has a user-level hook: +\cmddef{glsxtrAddCounterRecordHook} +This does nothing by default. If you want to redefined this, the +redefinition must be placed in the document preamble before the +\ext{aux} file is input. + +There are two ways of skipping an entry. The first is to redefine +\gls{printunsrtglossaryentryprocesshook} to perform the test and use +\gls{printunsrtglossaryskipentry} to skip an unwanted entry (as +illustrated earlier). The second is to perform the test in +\gls{printunsrtglossaryhandler}. The first method is the better +option for large lists that may contain group headers. The example +below uses the second method. + +The file \filefmt{myentries.bib} contains the following: +\newcommand{\printunitexamplebib}{% +\atentry{symbol}\marg{pi,\gloskeyval{name}{\cmd{ensuremath}\marg{\cmd{pi}}},\newline + \gloskeyval{description}{ratio of the length of the circumference + of a circle to its diameter}}\newline +\atentry{symbol}\marg{root2,\gloskeyval{name}{\cmd{ensuremath}\marg{\cmd{surd}2}},\newline + \gloskeyval{description}{Pythagoras' constant}}\newline +\atentry{symbol}\marg{zeta3,\gloskeyval{name}{\cmd{ensuremath}\marg{\cmd{zeta}(3)}},\newline + \gloskeyval{description}{Ap\cmd{'}ery's constant}}\newline +\atentry{symbol}\marg{zero,\gloskeyval{name}{0},\newline + \gloskeyval{description}{nothing or nil}}\newline +\atentry{symbol}\marg{one,\gloskeyval{name}{1},\newline + \gloskeyval{description}{single entity, unity}} +} +\begin{codebox} +\printunitexamplebib +\end{codebox} +The document redefines the handler to only show entries in the current section: +\begin{codebox} +\cmd{usepackage}\oarg{\opt{record},\opt{stylemods},\optval{style}{index}}\marg{glossaries-extra} +\gls{GlsXtrRecordCounter}\marg{\ctr{section}} +\gls{GlsXtrLoadResources}\oarg{\resourceoptvalm{src}{myentries}} +\cbeg{document} +\cmd{renewcommand}\marg{\gls{printunsrtglossaryhandler}}[1]\marg{\% + \gls{glsxtrfieldxifinlist}\marg{\#1}\marg{record.section}\marg{\thecounter{section}} + \marg{\gls{glsxtrunsrtdo}\marg{\#1}}\% + \marg{}\% +} +\cmd{section}\marg{Sample} +\gls{printunsrtglossary} +This section discusses \gls{gls}\marg{pi}, \gls{gls}\marg{root2} and +\gls{gls}\marg{zeta3}. +\codepar +\cmd{section}\marg{Another Sample} +\gls{printunsrtglossary} +This section discusses \gls{gls}\marg{one}, \gls{gls}\marg{pi} and +\gls{gls}\marg{zero}. +\cend{document} +\end{codebox} +If the document is saved in the file \filefmt{myDoc.tex} then the +build process is: +\begin{terminal} +pdflatex myDoc +bib2gls myDoc +pdflatex myDoc +\end{terminal} +The first \LaTeX\ run adds the \records\ to the \ext{aux} file for +\app{bib2gls} to pick up, but also adds the +\gls{glsxtr@counterrecord} lines (which \app{bib2gls} ignores) that +setup the +\glslink{opt.glosfield.record.counter}{\fieldfmt{record.section}} +list field for the given entry. + +This means that \gls{glsxtrfieldxifinlist} can be used to determine +whether or not the current section number (\thecounter{section}) is in +the list. If it is, then the entry is displayed in the current +\idx{glossarystyle} using the default \gls{glsxtrunsrtdo}. Otherwise +nothing is displayed. + +The following command is provided that performs something similar: +\cmddef{printunsrtglossaryunit} +This is equivalent to: +\begin{compactcodebox} +\gls{printunsrtglossary*}\oarg{\printglossoptval{type}{\gls{glsdefaulttype}},\#1}\marg{\comment{} + \gls{printunsrtglossaryunitsetup}\marg{\#2}\comment{} }% -\end{verbatim} -This does nothing if either element are abbreviations that have already been -used. Note that if the associated attributes are set the commands -will behave according to the attribute. - -\begin{definition}[\DescribeMacro\glssetcombinedsepnarrow] -\cs{glssetcombinedsepnarrow}\marg{width}\marg{narrow sep} -\end{definition} -This is rather more complicated as it measures a field value and -uses \meta{narrow sep} if the width is less than \meta{width}. -The field value is determined as follows: -\begin{itemize} -\item on \gls{firstuse} the -\gloskey{long} field is used if it is set otherwise the -\gloskey{first} field is used; - -\item otherwise the -\gloskey{short} field is used if it is set otherwise the -\gloskey{text} field is used; -\end{itemize} - -Note that this doesn't take into account fonts, hooks, abbreviation -styles or plural forms (e.g.\ \cs{mglspl}) or other field references -(e.g.\ \cs{mglsname}). If the associated attributes are set the commands -will behave according to the attribute. +\end{compactcodebox} +This initialises the hook via: +\cmddef{printunsrtglossaryunitsetup} +This is essentially does: +\begin{compactcodebox} +\comment{redefine handler to only show entries with a match:} +\cmd{renewcommand}\marg{\gls{printunsrtglossaryhandler}}[1]\marg{\comment{} + \gls{glsxtrfieldxifinlist}\marg{\#1}\marg{record.\meta{counter-name}}\marg{\thecountername} + \marg{\gls{glsxtrunsrtdo}\marg{\#1}}\comment{} + \marg{}\comment{} +}\comment{} +\meta{assign target name prefixes (see below)} +\comment{suppress section header:} +\cmd{renewcommand}*\marg{\gls{glossarysection}}[2][]\marg{}\comment{} +\comment{append vertical space after the glossary:} +\cmd{appto}\gls{glossarypostamble}\marg{\gls{printunsrtglossaryunitpostskip}}\comment{} +\end{compactcodebox} +This is more complicated than the original example as it also +suppresses the glossary section header and modifies the target name +prefix. Additionally, the following is appended to the end of the \idx{glossary}: +\cmddef{printunsrtglossaryunitpostskip} +This simply does: +\begin{compactcodebox} +\gls{glspar}\cmd{medskip}\gls{glspar} +\end{compactcodebox} +which creates a small vertical space. The target name prefix +(\printglossopt{targetnameprefix}) is assigned as follows. If +\theHcountername\ has been defined, the prefix is: +\begin{compactcodebox} +record.\meta{counter-name}.\theHcountername.\gls{@gobble} +\end{compactcodebox} +otherwise the prefix is: +\begin{compactcodebox} +record.\meta{counter-name}.\thecountername.\gls{@gobble} +\end{compactcodebox} +The use of \gls{@gobble} at the end discards \gls{glolinkprefix}. + +The above example can be rewritten using +\gls{printunsrtglossaryunit}. I've added +\resourceopt{symbol-sort-fallback} to sort by the description and a +full glossary at the end of the document. +\begin{codebox} +\cmd{usepackage}\oarg{\opt{record},\opt{stylemods},\optval{style}{index}}\marg{glossaries-extra} +\gls{GlsXtrRecordCounter}\marg{\ctr{section}} +\gls{GlsXtrLoadResources}\oarg{\resourceoptvalm{src}{myentries}, + \resourceoptval{symbol-sort-fallback}{\gloskey{description}} +} +\cbeg{document} +\cmd{section}\marg{Sample} +\gls{printunsrtglossaryunit}\marg{\ctr{section}} +This section discusses \gls{gls}\marg{pi}, \gls{gls}\marg{root2} and +\gls{gls}\marg{zeta3}. +\codepar +\cmd{section}\marg{Another Sample} +\gls{printunsrtglossaryunit}\marg{\ctr{section}} +This section discusses \gls{gls}\marg{one}, \gls{gls}\marg{pi} and +\gls{gls}\marg{zero}. +\codepar +\gls{printunsrtglossaries} +\cend{document} +\end{codebox} +The build process is the same as before: +\begin{terminal} +pdflatex myDoc +bib2gls myDoc +pdflatex myDoc +\end{terminal} +The resulting document is shown in \exampleref{ex:minigloss}. Note +that all glossaries show the \idxpl{locationlist}, which all contain +the page number~1, since the example document is only one page long. + +\begin{resultbox}[float] +\createexample*[label={ex:minigloss}, + title={Sub-glossary for a given counter value}, + description={Example document demonstrating a mini-glossary that +only shows entries recorded in the current section}, + arara={pdflatex,bib2gls,pdflatex,pdfcrop} +] +{\cbeg{filecontents*}\marg{\cmd{jobname}.bib}^^J% +\printunitexamplebib^^J% +\cend{filecontents*}^^J% +\cmd{usepackage}\oarg{\opt{record},\opt{stylemods},\optval{style}{index}}\marg{glossaries-extra}^^J +\gls{GlsXtrRecordCounter}\marg{\ctr{section}}^^J +\gls{GlsXtrLoadResources}\oarg{\resourceoptvalm{src}{\cmd{jobname}},^^J + \resourceoptval{symbol-sort-fallback}{\gloskey{description}}^^J% +} +}{\cmd{section}\marg{Sample}^^J% +\gls{printunsrtglossaryunit}\marg{section}^^J% +This section discusses \gls{gls}\marg{pi}, \gls{gls}\marg{root2} and +\gls{gls}\marg{zeta3}. +\codepar +\cmd{section}\marg{Another Sample}^^J% +\gls{printunsrtglossaryunit}\marg{section}^^J% +This section discusses \gls{gls}\marg{one}, \gls{gls}\marg{pi} and +\gls{gls}\marg{zero}. +\codepar +\gls{printunsrtglossaries} +} +\end{resultbox} + +Other variations include creating a secondary \idx{glossary} that's +ordered differently for the \idxpl{mini-glossary}. For example: +\begin{codebox} +\gls{newignoredglossary*}\marg{glossary2} +\gls{GlsXtrLoadResources}\oarg{\resourceoptvalm{src}{\cmd{jobname}}, + \resourceoptval{symbol-sort-fallback}{\gloskey{description}}, + \resourceoptval{secondary}{use:glossary2} +} +\end{codebox} +This orders the secondary glossary according to use (the first +record for the entire document not for the given unit). +The \idxpl{mini-glossary} will then need the \printglossopt{type} option: +\begin{codebox} +\gls{printunsrtglossaryunit}\oarg{\printglossoptval{type}{glossary2}}\marg{\ctr{section}} +\end{codebox} + +There is an alternative method that ensures the +\idxpl{mini-glossary} are ordered by use +within the section. This can be done by redefining +\gls{glsxtrAddCounterRecordHook} to create a \idx{glossary} for each +unit (instead of using a secondary \idx{glossary}): +\begin{codebox} +\cmd{renewcommand}\marg{\gls{glsxtrAddCounterRecordHook}}[3]\marg{\comment{} + \gls{provideignoredglossary}\marg{\#2.\#3}\comment{} + \gls{glsxtrcopytoglossary}*\marg{\#1}\marg{\#2.\#3}\comment{} +} +\end{codebox} +(Remember this needs to be done in the preamble, before the +\ext{aux} file is input.) + +This creates a \idx{glossary} with the label +\code{\meta{counter}.\meta{value}}, if it's not already defined, and +adds the entry's label to it. This means that this \idx{glossary} +will only contain the entries for the matching \meta{counter} and +\meta{value}, and the entry labels are in the order they were added +to the \ext{aux} file. + +The \idx{glossary} needs to be set appropriately. For example: +\begin{codebox} +\gls{printunsrtglossaryunit}\oarg{\printglossoptval{type}{section.\thecounter{section}}}\marg{\ctr{section}} +\end{codebox} +There's now no filtering required, but \gls{printunsrtglossaryunit} +is still useful as it automatically suppresses the section header, +alters the hyperlink prefix and adds extra spacing after the +glossary. However, if you prefer, you can simply do something like: +\begin{codebox} +\gls{printunsrtglossary*}\oarg{\printglossoptval{type}{section.\thecounter{section}}, + \printglossoptval{target}{false}} +{\cmd{renewcommand}*\marg{\gls{glossarysection}}[2][]\marg{}} +\gls{printunsrtglossaryunitpostskip} +\end{codebox} +This is done in \exampleref{ex:minigloss2}. + +\begin{resultbox}[float] +\createexample*[label={ex:minigloss2}, + title={Sub-glossary for a given counter value ordered by use in the section}, + description={Example document demonstrating a mini-glossary that +only shows entries recorded in the current section in the order they +were recorded in that section}, + arara={pdflatex,bib2gls,pdflatex,pdfcrop} +] +{\cbeg{filecontents*}\marg{\cmd{jobname}.bib}^^J% +\printunitexamplebib^^J% +\cend{filecontents*}^^J% +\cmd{usepackage}\oarg{\opt{record},\opt{stylemods},\optval{style}{index}}\marg{glossaries-extra}^^J +\gls{GlsXtrRecordCounter}\marg{\ctr{section}}^^J +\gls{GlsXtrLoadResources}\oarg{\resourceoptvalm{src}{\cmd{jobname}},^^J + \resourceoptval{symbol-sort-fallback}{\gloskey{description}}^^J% +} +\codepar +\cmd{renewcommand}\marg{\gls{glsxtrAddCounterRecordHook}}[3]\marg{\%^^J + \gls{provideignoredglossary}\marg{\#2.\#3}\%^^J + \gls{glsxtrcopytoglossary}*\marg{\#1}\marg{\#2.\#3}\%^^J% +} +\codepar +\cmd{newcommand}\marg{\cmd{minigloss}}\marg{\%^^J + \gls{printunsrtglossary*}\oarg{\printglossoptval{type}{section.\cmd{thesection}},^^J + \printglossoptval{target}{false}}^^J + {\cmd{renewcommand}*\marg{\gls{glossarysection}}[2][]\marg{}}^^J + \gls{printunsrtglossaryunitpostskip}^^J% +} +}{\cmd{section}\marg{Sample}^^J% +\cmd{minigloss}^^J% +This section discusses \gls{gls}\marg{pi}, \gls{gls}\marg{root2} and +\gls{gls}\marg{zeta3}. +\codepar +\cmd{section}\marg{Another Sample}^^J% +\cmd{minigloss}^^J% +This section discusses \gls{gls}\marg{one}, \gls{gls}\marg{pi} and +\gls{gls}\marg{zero}. +\codepar +\gls{printunsrtglossaries} +} +\end{resultbox} -\section{\headingcs{mgls} Element Hooks} -\label{sec:mglselementhooks} +\section{Standalone Entry Items} +\label{sec:glossentry} -The \cs{mgls}-like commands use the following hooks: -\begin{definition}[\DescribeMacro\mglselementprehook] -\cs{mglselementprehook} -\end{definition} -This is done before each (non-skipped) element. (Default does nothing.) -\begin{definition}[\DescribeMacro\mglselementposthook] -\cs{mglselementposthook} -\end{definition} -This is done after each (non-skipped) element. (Default does nothing.) -Note that this is different from the normal entry post-link hook -\ics{glspostlinkhook}. If the individual entry post-link hook is enabled (see the -\optfmt{postlinks} key in \sectionref{sec:multiglsoptions}), this will go before -\cs{mglselementposthook}. +It may be that you don't want a list but would rather display +entry details throughout the document. You can simply +do \gls{glsentryname} followed by \gls{glsentrydesc}. +(Remember that if you don't want a sorted list, use +\optval{sort}{none} or \optval{sort}{clear} to skip the preprocessing of the +\gloskey{sort} field.) +For example, in the preamble provide a custom command to display the +entry's name and description: +\begin{codebox} +\cmd{newcommand}\marg{\cmd{displayterm}}[1]\marg{\% + \cmd{par}\cmd{medskip}\cmd{par}\cmd{noindent} + Definition: \gls{glsentryname}\marg{\#1}.\cmd{par} + \gls{glsentrydesc}\marg{\#1} + \cmd{par}\cmd{medskip} +} +\end{codebox} +define your entries, for example: +\begin{codebox} +\gls{newglossaryentry}\marg{function}\marg{\gloskeyval{name}{function}, + \gloskeyval{description}{a relation or expression involving variables} +} +\end{codebox} +and then later in the text: +\begin{codebox} +\cmd{displayterm}\marg{function} +\end{codebox} -The definitions of the following commands are scoped within the -\cs{mgls}-like commands so they can't be accessed elsewhere -(including in the post-link hook, see -\sectionref{sec:mglspostlinkhook}). They -may be used in the above hooks or in the separator commands (described in -\sectionref{sec:mglssep}) or in the command used to encapsulate the -entire content. They can also be used in the post-link hook (see -\sectionref{sec:entryfmtmods}) to determine if an entry is being -used within a \cs{mgls}-like command. - -The multi-entry label is stored in: -\begin{definition}[\DescribeMacro\mglscurrentmultilabel] -\cs{mglscurrentmultilabel} -\end{definition} - -The label of the main element: -\begin{definition}[\DescribeMacro\mglscurrentmainlabel] -\cs{mglscurrentmainlabel} -\end{definition} - -The complete comma-separated list of elements: -\begin{definition}[\DescribeMacro\mglscurrentlist] -\cs{mglscurrentlist} -\end{definition} - -Multi-entry options: -\begin{definition}[\DescribeMacro\mglscurrentoptions] -\cs{mglscurrentoptions} -\end{definition} -These are the options that were used when defining the multi-entry. This -doesn't include options set with \cs{multiglossaryentrysetup} -or those passed to \cs{mgls} (or whichever variant is being used). - -The current multi-entry category in effect is stored in: -\begin{definition}[\DescribeMacro\mglscurrentcategory] -\cs{mglscurrentcategory} -\end{definition} - -The calling command control sequence name (e.g.\ \qt{mgls} or \qt{mglspl}) -can be obtained with: -\begin{definition}[\DescribeMacro\glsxtrcurrentmglscsname] -\cs{glsxtrcurrentmglscsname} -\end{definition} +However, if may be that you want to use \sty{hyperref} and +have commands like \gls{gls} link back to the place where +the term is described. Instead of using \gls{glsentryname} +use: +\cmddef{glsxtrglossentry} +where \meta{entry-label} is the entry's label. -To test if the current multi-entry is the first use: -\begin{definition}[\DescribeMacro\mglsisfirstuse] -\cs{mglsisfirstuse}\marg{true}\marg{false} -\end{definition} -This does \meta{true} if this is the first use otherwise it does -\meta{false}. Note that this -applies to the multi-entry first use flag not the -\glspl{firstuseflag} of the individual elements. +This is designed to behave much like the way the name is displayed +in the glossary. It performs the following: +\begin{itemize} +\item Defines \gls{glscurrententrylabel} to the entry's label. +This is usually done at the start of the glossary style commands +\gls{glossentry} and \gls{subglossentry} and may be used by hooks, +such as the \idx{postnamehook}. Here the definition is localised +so that it's only available for use in \gls{glossentryname}. -At each iteration of the loop over the element list, the following -commands are set, which can be accessed in hooks such as -\cs{mglselementprehook} or in hooks used by the underlying \cs{gls} -etc commands. For example, if \cs{mglscurrentlabel} is defined then -\cs{gls} is being used inside \cs{mgls}. - -The current element label: -\begin{definition}[\DescribeMacro\mglscurrentlabel] -\cs{mglscurrentlabel} -\end{definition} - -This is a count register that is set to the element index: -\begin{definition}[\DescribeMacro\mglselementindex] -\cs{mglselementindex} -\end{definition} - -The current multi-entry prefix: -\begin{definition}[\DescribeMacro\mglscurrentprefix] -\cs{mglscurrentprefix} -\end{definition} - -The current multi-entry suffix: -\begin{definition}[\DescribeMacro\mglscurrentsuffix] -\cs{mglscurrentsuffix} -\end{definition} - -\begin{definition}[\DescribeMacro\mglsiflast] -\cs{mglsiflast}\marg{true}\marg{false} -\end{definition} -If this is the last iteration, does \meta{true} otherwise does -\meta{false}. This takes the skip options into account, so the last -iteration may not necessarily be when the element index is equal to -the total number of elements. +\item Defines \gls{currentglossary} to the entry's glossary type. +This is usually done at the start of commands like +\gls{printglossary} and may be used by style hooks. +Here the definition is localised so that it's only available for use +in \gls{glsentryitem} and \gls{glssubentryitem}. The value is obtained +by fully expanding: +\cmddef{GlsXtrStandaloneGlossaryType} +which defaults to the value of the \gloskey{type} field for the +current entry. -\section{Post-Link Hook} -\label{sec:mglspostlinkhook} +\item Increments and display the entry counters +if the \opt{entrycounter} or \opt{subentrycounter} +package options are set. If the entry doesn't have a parent, then +this does: +\begin{compactcodebox} +\gls{glsentryitem}\margm{entry-label} +\end{compactcodebox} +otherwise it does: +\cmddef{GlsXtrStandaloneSubEntryItem} +which defaults to \code{\gls{glssubentryitem}\margm{entry-label}} if the entry +has a parent but not a grandparent. -There is a hook that occurs at the end the \cs{mgls}-like commands -according to the \optfmt{mpostlink} setting (see -\sectionref{sec:multiglsoptions}). The hook used depends on the -\optfmt{mpostlinkelement} option. -These hooks can't access the commands described in \sectionref{sec:mglselementhooks} -as the hook occurs outside of the scope in which they are defined. +This reflects the behaviour of the predefined hierarchical styles. +A bug in pre-version~1.31 used \gls{glsentryitem} for all child levels, +which doesn't match the hierarchical glossary styles. If you want to +restore this behaviour, just do: +\begin{codebox} +\cmd{renewcommand}*\marg{\gls{GlsXtrStandaloneSubEntryItem}}[1]\marg{\comment{} + \gls{glssubentryitem}\marg{\#1}} +\end{codebox} -The \optfmt{mpostlinkelement=custom} option uses: -\begin{definition}[\DescribeMacro\mglscustompostlinkhook] -\cs{mglscustompostlinkhook} -\end{definition} -This does nothing by default. +\item Sets the hyper-target if supported (using \gls{glstarget}) +and displays the entry name using: +\cmddef{GlsXtrStandaloneEntryName} +which uses +\code{\gls{glstarget}\margm{entry-label}\marg{\gls{glossentryname}\margm{entry-label}}} +by default. +Remember that \gls{glossentryname} uses \gls{glsnamefont} or picks up +the style from category attributes such as +\catattr{glossnamefont}. +\end{itemize} +If you have used \gls{nopostdesc} or \gls{glsxtrnopostpunc} +in any of your description fields, you can use: +\cmddef{glsxtractivatenopost} +to make these commands behave as they normally do within a glossary. +This needs to be placed before: +\begin{compactcodebox} +\gls{glossentrydesc}\margm{entry-label}\gls{glspostdescription} +\end{compactcodebox} +and scoped. Note that \gls{glsnonextpages} and \gls{glsnextpages} have no +effect outside of the glossary and are not intended for use in a +standalone context. -The \optfmt{mpostlinkelement=last} option uses: -\begin{definition}[\DescribeMacro\mglslastelementpostlinkhook] -\cs{mglslastelementpostlinkhook} -\end{definition} -which emulates the post-link hook of the last element. +It's also possible to select a different field (rather than +using \gloskey{name}): +\cmddef{glsxtrglossentryother} +The \meta{field-label} must be given using its +\idx{internalfieldlabel}. The \meta{header} argument is the code to +pass to the third argument of \gls{glsxtrtitleorpdforheading}. It +may be left empty in which case the default is determined as +follows: +\begin{itemize} +\item If \csfmt{glsxtrhead\meta{field-label}} is defined (see +\sectionref{sec:headingsadvanced}), then \meta{header} +is \csfmt{glsxtrhead\meta{field-label}}\marg{entry-label}. -The \optfmt{mpostlinkelement=main} option uses: -\begin{definition}[\DescribeMacro\mglslastmainpostlinkhook] -\cs{mglslastmainpostlinkhook} -\end{definition} -which emulates the post-link hook of the main element. +\item Otherwise \meta{header} is simply the field value. +\end{itemize} +The \gls{glsxtrglossentryother} command internally uses +\cmddef{GlsXtrStandaloneEntryOther} +instead of \gls{GlsXtrStandaloneEntryName}, which uses +\code{\gls{glossentrynameother}\margm{entry-label}\marg{field-label}} instead of +\code{\gls{glossentryname}\margm{entry-label}}. -The default settings -\optfmt{postlinks=none,mpostlink=true,mpostlinkelementlast} will -suppress the individual element post-link hooks -(\ics{glspostlinkhook}) and do the multi-entry post-link hook for -the last element (\cs{mglslastelementpostlinkhook}). +If you have loaded the \sty{glossaries-accsupp} package (through the \opt{accsupp} +option) then accessibility support will be provided if +there's a corresponding command: +\begin{compactcodebox} +\cmd{gls\meta{field-label}accessdisplay}\margm{text}\margm{entry-label} +\end{compactcodebox} +(for example, \gls{glssymbolaccessdisplay}). -If you have the final element's post-link hook enabled and the -multi-entry post-link hook enabled (for example, -\optfmt{postlinks=all, mpostlink=true, mpostlinkelement=last}), the -final element's post-link hook will be done twice. Similarly for the -main element with -\optfmt{postlinks=all, mpostlink=true, mpostlinkelement=main}. +This means that my custom command can be changed to: +\begin{codebox} +\cmd{newcommand}\marg{\cmd{displayterm}}[1]\marg{\% + \cmd{par}\cmd{medskip}\cmd{par}\cmd{noindent} + Definition: \gls{glsxtrglossentry}\marg{\#1}.\cmd{par} + \gls{glsentrydesc}\marg{\#1} + \cmd{par}\cmd{medskip} +} +\end{codebox} +If I want numbered definitions, then I can use the +package options \opt{entrycounter} or \opt{subentrycounter} +and remove the colon: +\begin{codebox} +\cmd{newcommand}\marg{\cmd{displayterm}}[1]\marg{\% + \cmd{par}\cmd{medskip}\cmd{par}\cmd{noindent} + Definition \gls{glsxtrglossentry}\marg{\#1}.\cmd{par} + \gls{glsentrydesc}\marg{\#1} + \cmd{par}\cmd{medskip} +} +\end{codebox} +The counter label uses a dot after the number by default +but this can be changed to a colon: +\begin{codebox} +\cmd{renewcommand}*\marg{\gls{glsentrycounterlabel}}\marg{\gls{theglossaryentry}:\cmd{space}} +\end{codebox} +It's now possible to not only use \gls{gls} to link back to the +definition but also use \gls{glsrefentry} to reference +the counter and \gls{glsxtrpageref} to reference the page number. -The following commands are available for use in these hooks and may -also be used in \ics{mglssuffix}. - -The multi-entry label: -\begin{definition}[\DescribeMacro\mglslastmultilabel] -\cs{mglslastmultilabel} -\end{definition} - -The multi-entry category (\sectionref{sec:multiglscategory}): -\begin{definition}[\DescribeMacro\mglslastcategory] -\cs{mglslastcategory} -\end{definition} -This will be empty if no category was assigned. - -\begin{definition}[\DescribeMacro\mglswasfirstuse] -\cs{mglswasfirstuse}\marg{true}\marg{false} -\end{definition} -If that was the first use of the multi-entry (\sectionref{sec:mglsfirstuse}) -this does \meta{true} otherwise it does \meta{false}. +If I want the description to behave more like it does +in a glossary in need to make the following modification: +\begin{codebox} +\cmd{newcommand}\marg{\cmd{displayterm}}[1]\marg{\% + \cmd{par}\cmd{medskip}\cmd{par}\cmd{noindent} + Definition \gls{glsxtrglossentry}\marg{\#1}.\cmd{par} + \cmd{begingroup} + \gls{glsxtractivatenopost} + \gls{glossentrydesc}\marg{\#1}\gls{glspostdescription} + \cmd{endgroup} + \cmd{par}\cmd{medskip} +} +\end{codebox} +(Note the grouping to localise \gls{glsxtractivatenopost}.) -\subsection{Last Element} -\label{sec:mglspostlinkhooklastelement} -The following commands relate to the last element. +You can also use \gls{glsxtrglossentry} within section headings. +For example: +\begin{codebox} +\cmd{section}\marg{\gls{glsxtrglossentry}\marg{function}} +\end{codebox} + +If \gls{glsxtrglossentry} occurs in a section title and +\sty{hyperref} has been loaded, then \gls{glsxtrglossentry} +will expand in the PDF bookmark as: +\cmddef{GlsXtrStandaloneEntryPdfName} +This defaults to \code{\gls{glsentryname}\margm{entry-label}} +The page headers and table of contents will use +\cmddef{GlsXtrStandaloneEntryHeadName} +which defaults to \code{\gls{glsxtrheadname}\margm{entry-label}}. +For example, to ensure that the name is displayed in +\idx{sentencecase} in the title, PDF bookmarks and heading: +\begin{codebox} +\gls{glssetcategoryattribute}\marg{\cat{general}}\marg{\catattr{glossname}}\marg{firstuc} +\cmd{renewcommand}\marg{\gls{GlsXtrStandaloneEntryPdfName}}[1]\marg{\gls{Glsentryname}\marg{\#1}} +\cmd{renewcommand}\marg{\gls{GlsXtrStandaloneEntryHeadName}}[1]\marg{\gls{Glsentryname}\marg{\#1}} +\end{codebox} +Note that this requires \sty{glossaries} v4.50+ to ensure that +\gls{Glsentryname} expands. An alternative is to use +\gls{Glsxtrusefield}. + +If \gls{glsxtrglossentryother} occurs in a section title and +\sty{hyperref} has been loaded, then \gls{glsxtrglossentryother} +will expand in the PDF bookmark as: +\cmddef{GlsXtrStandaloneEntryPdfOther} +This defaults to the value of the given field. +The page headers and table of contents will use the \meta{header} +argument, if not empty, otherwise it will use: +\cmddef{GlsXtrStandaloneEntryHeadOther} +This does \csfmt{glsxtrhead\meta{field-label}}, if it exists, or +otherwise it just does the value of the given field (which can be +obtained with \gls{glsxtrusefield}). + +If you're using a page style or table of contents that doesn't use +\gls{markright} or \gls{markboth} or \gls{@starttoc} then you need +to insert \gls{glsxtrmarkhook} and \gls{@glsxtrinmark} at the start +of the header or table of contents either scoped or afterwards +cancelled with \gls{@glsxtrnotinmark} and +\gls{glsxtrrestoremarkhook}, see \sectionref{sec:headingsadvanced}. -The label of the last non-skipped element: -\begin{definition}[\DescribeMacro\mglslastelementlabel] -\cs{mglslastelementlabel} -\end{definition} -If all elements were skipped or if the multi-entry wasn't defined, -this will be empty. +\section{Glossary Style Modifications} +\label{sec:glosstylemods} -Test if the last element was skipped: -\begin{definition}[\DescribeMacro\mglsiflastelementskipped] -\cs{mglsiflastelementskipped}\marg{true}\marg{false} -\end{definition} -If the last element was skipped this does \meta{true} otherwise it -does \meta{false}. -If all elements were skipped or if the multi-entry wasn't defined, -this will do \meta{true}. +The \sty{glossaries-extra} package redefines \gls{setglossarystyle}, +and it now includes a hook that's performed before the style is set: +\cmddef{glsxtrpreglossarystyle} +This allows for new style commands that aren't provided by the base +\sty{glossaries} package to be initialised in the +event that a style that doesn't redefine them is used. The default +definition is: +\begin{compactcodebox} +\cmd{newcommand}\marg{\gls{glsxtrpreglossarystyle}}\marg{\comment{} + \cmd{renewcommand}*\marg{\gls{glssubgroupheading}}[4]\marg{\gls{glsgroupheading}\marg{\#\#4}}\comment{} +} +\end{compactcodebox} +If you prefer a different default, you can redefine this command as +appropriate. -Test if the last element was its first use: -\begin{definition}[\DescribeMacro\mglsiflastelementwasfirstuse] -\cs{mglsiflastelementwasfirstuse}\marg{true}\marg{false} -\end{definition} -If the last non-skipped element was used for the first time this -does \meta{true} otherwise it does \meta{false}. (Corresponds to -\cs{glsxtrifwasfirstuse}.) -If all elements were skipped or if the multi-entry wasn't defined, -this will do \meta{true}. +The commands \gls{glossentryname} and \gls{glossentrydesc} are +modified to take into account the \catattr{glossname}, +\catattr{glossnamefont}, \catattr{glossdesc} and \catattr{glossdescfont} +attributes (see \sectionref{sec:categories}). This means you can +make simple font or case-changing modifications to the name and description +without defining a new glossary style. -Test if the last element was plural: -\begin{definition}[\DescribeMacro\mglsiflastelementwasplural] -\cs{mglsiflastelementwasplural}\marg{true}\marg{false} -\end{definition} -If the last non-skipped element had the plural form displayed, this -does \meta{true} otherwise it does \meta{false}. (Corresponds to -\cs{glsifplural}.) -If all elements were skipped or if the multi-entry wasn't defined, -this will do \meta{false}. +The command \gls{glossentrysymbol} is modified to take into account +the \catattr{glosssymbolfont} attribute. Note that, unlike the above, there's +no corresponding attribute to change the case as it's usually not +appropriate to change the case of a symbol (and for some symbols, +such as pictographs, there's no concept of case). If +\gls{texorpdfstring} has been defined \gls{glossentrysymbol} will +be defined to do: +\begin{codebox} +\gls{texorpdfstring}\margm{\TeX\ code}\margm{PDF} +\end{codebox} +The \meta{\TeX\ code} part is robust and deals with the actual +typesetting of the symbol. The \meta{PDF} part is simply: +\cmddef{glsentrypdfsymbol} +which is defined to just do \code{\gls{glsentrysymbol}\margm{entry-label}}. The +chances are that the code in the \gloskey{symbol} key won't be valid +in the PDF bookmarks, so you can redefine \gls{glsentrypdfsymbol} to +use a more appropriate field. (If you do redefine this command, +remember that it needs to fully expand.) -Test if the last element was had any case-changing applied: -\begin{definition}[\DescribeMacro\mglsiflastelementcapscase] -\cs{mglsiflastelementcapscase}\marg{no-change}\marg{firstuc}\marg{all caps} -\end{definition} -Corresponds to \cs{glscapscase} of the last non-skipped element. -If all elements were skipped or if the multi-entry wasn't defined, -this will do \meta{no-change}. +For example, if you are using \sty{glossaries-accsupp}, you could +use the \gloskey{symbolaccess} field: +\begin{codebox} +\cmd{renewcommand}\marg{\gls{glsentrypdfsymbol}}[1]\marg{\comment{} + \gls{glsentrysymbolaccess}\marg{\#1}} +\end{codebox} +Alternatively, if you are using \app{bib2gls} you can use the \TeX\ +parser library to interpret a copy of the \gloskey{symbol} field and +use that. For example, with the \idxpl{resourceopt}: +\begin{codebox} +\resourceoptvalm{replicate-fields}{\gloskey{symbol}=\gloskey{user1}}, +\resourceoptval{interpret-fields}{\gloskey{user1}} +\end{codebox} +This copies the value of the \gloskey{symbol} field to the +\gloskey{user1} field (\resourceopt{replicate-fields}) and then +replaces the value of the \gloskey{user1} field with its interpreted +value (\resourceopt{interpret-fields}). + +This means you can then do: +\begin{codebox} +\cmd{renewcommand}\marg{\gls{glsentrypdfsymbol}}[1]\marg{\comment{} + \gls{glsentryuseri}\marg{\#1}} +\end{codebox} +(You may need \XeLaTeX\ or \LuaLaTeX\ with this method.) This allows +\gls{glossentrysymbol} to be used in a section heading with +standalone definitions. See the \app{bib2gls} manual for further +details about the \TeX\ interpreter. -\subsection{Main Element} -\label{sec:mglspostlinkhookmainelement} -The following commands relate to the main element. +If you want to adapt a style to use another field instead +of \gloskey{name}, you can use: +\cmddef{glossentrynameother} +This behaves just like \gls{glossentryname} (that is, it obeys the +\catattr{glossname} attribute, uses either the +\catattr{glossnamefont} attribute or \gls{glsnamefont} to format the +text, and uses the \idx{postnamehook}) but the text is obtained from +the field given \meta{field-label} instead of \gloskey{name}. The +\meta{field-label} argument must be the \idx{internalfieldlabel} (for +example \code{desc} rather than \code{description}). + +\subsection{Post-Name Hooks} +\label{sec:postnamehooks} + +The \sty{glossaries-extra} package adds a hook to +\gls{glossentryname} and \gls{Glossentryname} (which is used in \idxpl{glossarystyle} +to display the entry's name): +\cmddef{glsxtrpostnamehook} +This is the main \idx{postnamehook}, which implements additional +hooks to allow for customisation. By default, \gls{glsxtrpostnamehook} +checks the \catattr{indexname} attribute. +If the attribute exists for the category to which the entry belongs, +then the name is automatically indexed using: +\begin{compactcodebox} +\gls{glsxtrdoautoindexname}\margm{entry-label}\marg{\catattr{indexname}} +\end{compactcodebox} +See \sectionref{sec:autoindex} for further details. -The label of the main element from the multi-entry that was just -referenced: -\begin{definition}[\DescribeMacro\mglslastmainlabel] -\cs{mglslastmainlabel} -\end{definition} -If the main element was skipped or if the multi-entry -wasn't defined, this will be empty. If this is the same as -\cs{mglslastelementlabel} then the main element was the last -element. +The post-name hook \gls{glsxtrpostnamehook} will also use: +\cmddef{glsxtrpostnamecategory} +if it exists. +You can use \gls{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: +\begin{codebox} +\cmd{newcommand}*\marg{\cmd{glsxtrpostnamesymbol}}\marg{\cmd{space} + (\gls{glsentrysymbol}\marg{\gls{glscurrententrylabel}})} +\end{codebox} +For convenience, you can use: +\cmddef{glsdefpostname} +This is simply a shortcut for: +\begin{compactcodebox} +\gls{csdef}\marg{\gls{glsxtrpostnamecategory}}\margm{definition} +\end{compactcodebox} +Note that it doesn't check if the command has already been defined. -Test if the main element was skipped: -\begin{definition}[\DescribeMacro\mglsiflastmainskipped] -\cs{mglsiflastmainskipped}\marg{true}\marg{false} -\end{definition} -If the main element from the multi-entry that was just referenced -was skipped this does \meta{true} otherwise it does \meta{false}. -If the multi-entry wasn't defined, this will do \meta{true}. +The \idx{postnamehook} also does: +\cmddef{glsextrapostnamehook} +(before \gls{glsxtrpostnamecategory}) to allow for additional +non-category related code. This does nothing by default. + +\subsection{Post-Description Hooks} +\label{sec:postdeschooks} + +The \sty{glossaries} package provides the hook +\gls{glspostdescription}, which is placed after the description in +some of the predefined styles. The \sty{glossaries-extra-stylemods} +package modifies the predefined styles to ensure that they all use +this hook. This provides a convenient way to make slight +adjustments, such as appending content after the description, +without having to define a custom glossary style. + +The \sty{glossaries-extra} package redefines +\gls{glspostdescription} so that it includes the following hook: + +\cmddef{glsxtrpostdescription} +This new hook simply performs the \idx{catpostdeschook}: +\begin{codebox} +\cmd{newcommand}*\marg{\gls{glsxtrpostdescription}}\marg{\comment{} + \cmd{csuse}\marg{glsxtrpostdesc\gls{glscategory}\marg{\gls{glscurrententrylabel}}}\comment{} +} +\end{codebox} + +\begin{information} +The punctuation that is automatically inserted with \opt{postdot} or +\opt{postpunc} is placed after \gls{glsxtrpostdescription}, not +before. +\end{information} + +If you want to modify the hook for all entries (without affecting +the \opt{postpunc} or \opt{postdot} options), then redefine +\gls{glsxtrpostdescription}. +If you want to adjust this hook according to the entry's category, +then you can simply redefine the \idx{catpostdeschook}. +\cmddef{glsxtrpostdesccategory} +Some common \idxpl{catpostdeschook} are provided: +\cmddef*{glsxtrpostdescgeneral} +The \idx{postdeschook} for the \cat{general} category. + +\cmddef*{glsxtrpostdescterm} +The \idx{postdeschook} for the \cat{term} category. + +\cmddef*{glsxtrpostdescacronym} +The \idx{postdeschook} for the \cat{acronym} category. + +\cmddef*{glsxtrpostdescabbreviation} +The \idx{postdeschook} for the \cat{abbreviation} category. + +The above all do nothing by default. You can redefine them with +\gls{renewcommand} or use: +\cmddef{glsdefpostdesc} +This will define (or redefine) \gls{glsxtrpostdesccategory}. +The package options \opt{symbols}, \opt{numbers} and \opt{index} +provide corresponding \idxpl{catpostdeschook}. + +You can reference the current entry within these hooks using +\gls{glscurrententrylabel}, which is defined within the +\idx{glossary} (any of the \csfmt{print\ldots glossary} commands) +and also within the standalone commands, such as +\gls{glsxtrglossentry}. + +\cmddef{glsxtrnopostpunc} +Suppresses the post-description punctuation that is automatically +inserted by package options \opt{postdot} or \opt{postpunc}. + +The \sty{glossaries} package provides \gls{nopostdesc}, which may be +used in the \gloskey{description} to suppress the \idx{postdeschook} +for that entry. This suppresses both the post-description +punctuation and the additional \gls{glsxtrpostdescription} hook. +If you only want to suppress to punctuation, then use +\gls{glsxtrnopostpunc} instead. + +\begin{information} +The \idxpl{postdeschook} are implemented by \gls{glspostdescription} +within the glossary style. If this command isn't used in the style, +then the additional hooks won't be available. +\end{information} + +\cmddef{glsxtrrestorepostpunc} +If this command is placed in the definition of +\gls{glsxtrpostdescription} or added to the \idx{catpostlinkhook}, +then it will counter-act any use of \gls{glsxtrnopostpunc} to +restore the post-description punctuation. -Test if the main element was its first use: -\begin{definition}[\DescribeMacro\mglsiflastmainwasfirstuse] -\cs{mglsiflastmainwasfirstuse}\marg{true}\marg{false} -\end{definition} -If the main element was used for the first time this -does \meta{true} otherwise it does \meta{false}. (Corresponds to -\cs{glsxtrifwasfirstuse}.) -If the main element was skipped or if the multi-entry wasn't defined, -this will do \meta{true}. +These commands have no effect outside of the glossary (except with +standalone entries that use \gls{glsxtractivatenopost} and +\gls{glspostdescription}, see \sectionref{sec:glossentry}). -Test if the main element was plural: -\begin{definition}[\DescribeMacro\mglsiflastmainwasplural] -\cs{mglsiflastmainwasplural}\marg{true}\marg{false} -\end{definition} -If the main element from the multi-entry that was just referenced -had its plural form displayed this does \meta{true} otherwise it -does \meta{false}. (Corresponds to \cs{glsifplural}.) If the main -element was skipped or if the multi-entry wasn't defined, this will -do \meta{false}. +\subsection{Number (Location) List} +\label{sec:glosstylenumlist} -Test if the main element was had any case-changing applied: -\begin{definition}[\DescribeMacro\mglsiflastmaincapscase] -\cs{mglsiflastmaincapscase}\marg{no-change}\marg{firstuc}\marg{all caps} -\end{definition} -Corresponds to \cs{glscapscase} of the main element from the -multi-entry that was just referenced. If the main element was -skipped or if the multi-entry wasn't defined, this will do -\meta{no-change}. +The \idx{locationlist} is now placed inside the argument of: +\cmddef{GlsXtrFormatLocationList} +This is internally used by \gls{glossaryentrynumbers}. The +\opt{nonumberlist} option redefines \gls{glossaryentrynumbers} so that it +doesn't display the \idx{numberlist}, but it still saves the +\idx{numberlist} in case it's required. The desired font formatting +for the \idx{locationlist} can now more easily be set by redefining +\gls{GlsXtrFormatLocationList}, without interfering with +\gls{glossaryentrynumbers}. -\section{Multi-Entry First Use} -\label{sec:mglsfirstuse} +\begin{important} +If you want to suppress the \idx{numberlist} always use the +\opt{nonumberlist} option instead of redefining +\gls{glossaryentrynumbers} to do nothing. +\end{important} -Each multi-entry set has an associated first use flag. This is -independent of the \gls{firstuseflag} associated with the individual -entries that make up the set. As with the \cs{gls}-like commands, -\cs{mgls} unsets this flag. Unlike the \cs{glstext}-like commands, all -the commands described in \sectionref{sec:mglslike} (including -commands like \cs{mglsname}) unset this flag, even if the elements -use commands like \cs{glsname} that don't unset the entry's -\gls{firstuseflag}. +Note that if you are using the \idx{unsrtfam} the \idx{locationlist} +will only be present if the appropriate field has been set (see +\sectionref{sec:printunsrtlocations}). There's no need to save +locations with \app{bib2gls} or with \gls{printnoidxglossary} +because this is performed automatically (unlike \gls{printglossary} +where the trick with \gls{glossaryentrynumbers} is required to +capture the \idx{locationlist}). -You can determine whether or not a multi-entry set has been -marked as used with: -\begin{definition}[\DescribeMacro\ifmglsused] -\cs{ifmglsused}\marg{multi-label}\marg{true}\marg{false} -\end{definition} -You can (globally) unset the flag (mark the set as having been referenced) -with: -\begin{definition}[\DescribeMacro\mglsunset] -\cs{mglsunset}\marg{multi-label} -\end{definition} -or reset it with: -\begin{definition}[\DescribeMacro\mglsreset] -\cs{mglsreset}\marg{multi-label} -\end{definition} -There are also local versions of these commands: -\begin{definition}[\DescribeMacro\mglslocalunset] -\cs{mglslocalunset}\marg{multi-label} -\end{definition} -and -\begin{definition}[\DescribeMacro\mglslocalreset] -\cs{mglslocalreset}\marg{multi-label} -\end{definition} - -To unset all multi-entries: -\begin{definition}[\DescribeMacro\mglsunsetall] -\cs{mglsunsetall} -\end{definition} -To reset all multi-entries: -\begin{definition}[\DescribeMacro\mglsresetall] -\cs{mglsresetall} -\end{definition} +Sometimes users like to insert \qt{page} or \qt{pages} in front of +the \idx{locationlist}. This is quite fiddly to do with the base +\sty{glossaries} package, but \sty{glossaries-extra} +provides a way of doing this. First you need to enable this +option and specify the text to display using: +\cmddef{GlsXtrEnablePreLocationTag} +where \meta{page tag} is the text to display if the \idx{locationlist} only +contains a single location and \meta{pages tag} is the text to display +otherwise. For example: +\begin{codebox} +\gls{GlsXtrEnablePreLocationTag}\marg{Page: }\marg{Pages: } +\end{codebox} +An extra run is required when using this command. -Note that unsetting or resetting any of the individual element -\glspl{firstuseflag} doesn't affect the multi-entry flag. -Similarly, unsetting or resetting the multi-entry flag doesn't -affect the \glspl{firstuseflag} of the individual elements. +\begin{important} +Use \encap{glsignore} not \encap{@gobble} as the format if you +want to suppress the page number (and only index the entry once). +\end{important} -\section{Multi-Entry Category} -\label{sec:multiglscategory} +See the accompanying sample file \file{sample-pages.tex} for an +example. + +\begin{information} +Note that \app{bib2gls} the \resourceopt{loc-prefix} resource option +inserts a prefix at the start of non-empty location lists, which +can be used as an alternative to \gls{GlsXtrEnablePreLocationTag}. +There is also a corresponding \resourceopt{loc-suffix} option to +provide a suffix. +\end{information} + +\Idxpl{locationlist} displayed with \gls{printnoidxglossary} +internally use: +\gls{glsnoidxdisplayloc} +This command is provided by \sty{glossaries}, but is modified by +\sty{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. -A multi-entry set may have an associated category set using the -\optfmt{category} key described in \sectionref{sec:multiglsoptions}. -This isn't set by default, but if it is set the category may have -attributes set in the usual way. The multi-entry category is -independent of the individual entry categories. The following -attribute is recognised by commands like \cs{mgls}: +If the range identifiers aren't present, this just uses +\cmddef{glsxtrdisplaysingleloc} +otherwise it uses +\cmddef{glsxtrdisplaystartloc} +for the start of a range (where the identifier has been stripped +from \meta{format}) or +\cmddef{glsxtrdisplayendloc} +for the end of a range (where the identifier has been stripped +from \meta{format}). -\begin{description} +By default the start range command saves the format in: +\cmddef{glsxtrlocrangefmt} +and does: +\begin{compactcodebox} +\gls{glsxtrdisplaysingleloc}\margm{format}\margm{location} +\end{compactcodebox} +(If the format is empty, it will be replaced with \code{glsnumberformat}.) -\item[\catattrdef{multioptions}] default options to apply to any -multi-entry set with the given category. These can be overridden -by the first optional argument of \cs{multiglossaryentry} or by the -\optfmt{setup} key in the first optional argument of commands like -\cs{mgls}. +The end command checks that the format matches the start of the +range, does: +\cmddef{glsxtrdisplayendlochook} +(which does nothing by default), followed by: +\begin{compactcodebox} +\gls{glsxtrdisplaysingleloc}\margm{format}\margm{location} +\end{compactcodebox} +and then sets \gls{glsxtrlocrangefmt} to empty. -\end{description} -Note that you can't access the category or its attributes via the -multi-entry label (for example, with \cs{glshasattribute}). If you -need to access the current multi-entry's category within any of the -\cs{mgls}-like hooks (\sectionref{sec:mglselementhooks}), you can -obtain the category with \cs{mglscurrentcategory} and use commands -like \cs{glshascategoryattribute}. +This means that the list +\begin{codebox} +\gls{glsnoidxdisplayloc}\marg{}\marg{page}\marg{(textbf}\marg{1}, +\gls{glsnoidxdisplayloc}\marg{}\marg{page}\marg{textbf}\marg{1}, +\gls{glsnoidxdisplayloc}\marg{}\marg{page}\marg{)textbf}\marg{1}. +\end{codebox} +doesn't display any differently from +\begin{codebox} +\gls{glsnoidxdisplayloc}\marg{}\marg{page}\marg{textbf}\marg{1}, +\gls{glsnoidxdisplayloc}\marg{}\marg{page}\marg{textbf}\marg{1}, +\gls{glsnoidxdisplayloc}\marg{}\marg{page}\marg{textbf}\marg{1}. +\end{codebox} +but it does make it easier to define your own custom list handler +that can accommodate the ranges. -\section{Multi-Entry Settings} -\label{sec:multiglsoptions} +\subsection{Indexing Groups} +\label{sec:glosgroups} + +The letter or symbol or number \idxpl{group} are a by-product of the +\idx{indexingapp}. These are usually determined during the sorting +according to the first (significant) character of the sort value. If +the first character is an alphabetical character, the group is a +letter group, with the group label the same as the letter. If the +sort value is numeric, the group is a number group, with the label +\code{glsnumbers}, otherwise the group is a symbol group with the label +\code{glssymbols}. + +\begin{information} +For the \idx{unsrtfam}, see \sectionref{sec:printunsrtgroups} for +more details about how \idx{group} headers are inserted into the +\idx{glossary}. Only those commands are able to support +sub-\idxpl{group}. +\end{information} + +With \app{xindy}, the number group is automatically provided with +the \optval{xindy}{glsnumbers} package option. It can be suppressed +with \optval{xindy}{\marg{glsnumbers=false}} (see the base +\sty{glossaries} user manual for further details). + +With \app{bib2gls}, group formation requires \switch{group} (or +\switch{g}). This setting is off by default to allow for a +faster process where no groups are required. When this setting is +on, there are additional groups, depending on the sort method. For +example, if you use a date-time sort method, then you will have +date-time groups. + +\begin{warning} +Take care not to confusion \idxpl{group} with hierarchy. +See \gallerypage{logicaldivisions}{Gallery: Logical Glossary Divisions +(type vs group vs parent)} for the difference between the +\gloskey{group}, \gloskey{type} and \gloskey{parent} fields. +\end{warning} + +The base \sty{glossaries} package provides a simplistic way of +assigning a title to a group to allow for the use of language-sensitive +commands \gls{glssymbolsgroupname} and \gls{glsnumbersgroupname}, +which correspond to the \code{glssymbols} and \code{glsnumbers} +groups. The more flexible groups that can be created with +\app{bib2gls} require a better approach that is less likely to cause +a conflict. + +\cmddef{glsxtrsetgrouptitle} +Globally assigns the given title \meta{group-title} to the group identified +by \meta{group-label}. This command is used implicitly within the +\ext{glstex} file to assign titles to groups obtained by \app{bib2gls}. +Judicious definitions of the helper commands provided by +\app{bib2gls} can provide a more flexible way of assigning groups. + +\cmddef{glsxtrlocalsetgrouptitle} +As above but the assignment is local. + +\cmddef{glsxtrgetgrouptitle} +Obtains the title corresponding to the group identified by +\meta{group-label} and stores the result in \meta{cs}. This command +first checks if a title has been assigned by +\gls{glsxtrgetgrouptitle} and then, for compatibility with the base +\sty{glossaries} package, it will test for the existence of +\csfmt{\meta{group-label}groupname} if \meta{group-label} is +\code{glssymbols} or \code{glsnumbers} or a single character. +If no title is obtained from any of these tests, then the title will +be assumed to be the same as the label. + +\begin{information} +The \gls{printnoidxglossary} command has a slightly different +method, which uses the character code so it's not suitable with +\idx{utf8}. In general, \gls{printnoidxglossary} is best avoided, +where possible, and is inappropriate for locale-sensitive sorting. +\end{information} + +\subsection{\stytext{glossaries-extra-stylemods}} +\label{sec:stylemods} -The settings that govern all multi-entries can be set using: -\begin{definition}[\DescribeMacro\multiglossaryentrysetup] -\cs{multiglossaryentrysetup}\marg{options} -\end{definition} -The \meta{options} are the same as for \cs{multiglossaryentry}. -Options may also be set according to the multi-entry category -attribute \catattr{multioptions}. - -Whenever the \cs{mgls}-like commands are used, options are applied in the -following order: -\begin{enumerate} -\item general options identified by \cs{multiglossaryentrysetup}; +The \sty{glossaries-extra-stylemods} package (more conveniently +loaded through the \sty{glossaries-extra} +\opt{stylemods} option) modifies some of the predefined +styles that are provided with the \sty{glossaries} package. -\item the category key is assigned if it's in the general options, -\cs{multiglossaryentry} or \optfmt{setup} key; +\begin{important} +Any styles loaded after \sty{glossaries-extra-stylemods} won't be +patched. +\end{important} -\item \catattr{multioptions} category attribute (if set); +The \opt{stylemods} option may be provided without a value, in which +case all currently defined styles will be patched. Alternatively, +you can supply a comma-separated list as the value, which indicates +that, for each \meta{element} in the list, the package +\styfmt{glossary\dhyphen\meta{element}} should be loaded and, if +it's a package provided with the base \sty{glossaries} package, +patched. For example: +\begin{compactcodebox} +\cmd{usepackage}\marg{glossaries-extra} +\cmd{usepackage}\marg{glossary-longragged} +\cmd{usepackage}\marg{glossary-mcols} +\cmd{usepackage}\marg{glossaries-extra-stylemods} +\gls{setglossarystyle}\marg{\glostyle{mcolindex}} +\end{compactcodebox} +is equivalent to: +\begin{compactcodebox} +\cmd{usepackage}\oarg{\optvalm{stylemods}{longragged,mcols},\optval{style}{\glostyle{mcolindex}}}\marg{glossaries-extra} +\end{compactcodebox} +You may prefer to combine \optval{stylemods} with \opt{nostyles} to +reduce the overhead of loading unnecessary packages. + +The \sty{glossaries-extra-stylemods} package adjusts the predefined +styles so that they all use \gls{glspostdescription} and replaces +any hard-coded space before the \idx{locationlist} with +\cmddef{glsxtrprelocation} +You can therefore redefine that command in +combination with \opt{postpunc} to alter the separator before the +\idx{locationlist}. For example, to have a comma followed by +\gls{hfil}: +\begin{codebox} +\cmd{usepackage}[\opteqvalref{postpunc}{comma},\opt{stylemods}]\marg{glossaries-extra} +\cmd{renewcommand}\marg{\gls{glsxtrprelocation}}\marg{\gls{hfil}} +\end{codebox} + +\begin{warning} +Be careful with doing this as it will look odd if the \gls{locationlist} is +missing. +\end{warning} + +With \app{bib2gls} you can instead redefine \gls{glsxtrprelocation} +to do nothing and set the location prefixes with \resourceopt{loc-prefix} +which will only apply if the entry has a \gls{locationlist}. +Alternatively, you could redefine \gls{glsxtrprelocation} to check +if the \gloskey{location} field is set. + +\subsubsection{Inline Style} +\label{sec:stylemodsinline} + +The patched \glostyle{inline} style is dealt with slightly +differently. The original definition provided by the +\sty{glossary-inline} package uses \gls{glspostdescription} at the +end of the glossary (not after each entry description) within the +definition of \gls{glspostinline}. The style modification changes +this so that \gls{glspostinline} just does a full stop followed by +space factor adjustment, and the description +\gls{glsinlinedescformat} and sub-entry description formats +\gls{glsinlinesubdescformat} are redefined to include +\gls{glsxtrpostdescription} (not \gls{glspostdescription}). This means +that the modified \glostyle{inline} style isn't affected by the +\opt{nopostdot} option, but the \idx{catpostdeschook} +can still be used. -\item any options provided in the first optional argument of -\cs{multiglossaryentry}; +\subsubsection{Tabular Styles} +\label{sec:stylemodstab} -\item any options provided in the \optfmt{setup} key in the first -optional argument of the \cs{mgls}-like command. -\end{enumerate} +The \env{tabular}-like styles, such as \glostyle{long} are +adjusted so that the \gls{ifglsnogroupskip} conditional (set with +\opt{nogroupskip}) is moved outside of the definition of +\gls{glsgroupskip} to avoid problems that cause an \qt{Incomplete +\csfmt{iftrue}} error with \gls{printunsrtglossary} and +\gls{printnoidxglossary}. This means that if you want to change this +conditional using \gls{setupglossaries} or using the +\printglossopt{nogroupskip} option in \gls{printglossary}, +\gls{printnoidxglossary} or \gls{printunsrtglossary}, you must also +reset the \idx{glossarystyle}. + +\subsubsection{List Styles} +\label{sec:stylemodslist} + +The \glostyle{list} styles use: +\cmddef{glslistprelocation} +(which defaults to \gls{glsxtrprelocation}) for top-level items and: +\cmddef{glslistchildprelocation} +(which defaults to \gls{glslistprelocation}) for child items. + +The description (including the post-description hook) +is governed by: +\cmddef{glslistdesc} +for the \glostyle{list} and \glostyle{altlist} styles (but not the +\glostyle{listdotted} variations). -These options are described below. +The hard-coded \code{\gls{item}\oargm{target and name}} is replaced +with: +\cmddef{glslistitem} +The \glostyle{altlist} styles use: +\cmddef{glsaltlistitem} +which internally uses \gls{glslistitem}. +The header item (for the list styles that should the group title, +such as \glostyle{listgroup}) is governed by: +\cmddef{glslistgroupheaderitem} +This ignores the \meta{group-label} by default and simply places the +second argument in the optional argument of \gls{item}. The +\meta{header code} is the formatted group title, possibly including +a hypertarget. The spacing after the group item is given by: +\cmddef{glslistgroupafterheader} -\subsection{Indexing} -\label{sec:multiglsoptionsindexing} +For just the \glostyle{list} style and its letter group variations +(not the \glostyle{altlist} or \glostyle{listdotted} variations) the +\idx{locationlist} for child entries is followed by: +\cmddef{glslistchildpostlocation} +which defaults to a \idx{fullstop}. -\begin{description} -\item[\optfmt{indexmain}] This setting may take one of the following -values: - \begin{description} - \item[\optfmt{false}] don't index the main entry; - \item[\optfmt{true}] index the main entry; - \item[\optfmt{first}] only index the main entry if it's the first -use (of the main entry). - \end{description} - The default is \optfmt{true}. - -\item[\optfmt{indexothers}] This setting may take one of the following -values: - \begin{description} - \item[\optfmt{false}] don't index the other entries; - \item[\optfmt{true}] index the other entries; - \item[\optfmt{first}] only index the other entries if -it's the first use (of the non-main entry). - \end{description} - The default is \optfmt{first}. -\end{description} +The default value of \gls{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 +\gls{hsize} isn't set until the start of the document. -\subsection{Location Formats (Encaps)} -\label{sec:multiglsoptionsencap} +The separator between groups (if not \opt{nogroupskip}) is now +given by: +\cmddef{glslistgroupskip} +This defaults to \gls{indexspace} with penalties to deter page +breaks. This command isn't used if \opt{nogroupskip} is set. + +\subsubsection{Tree Styles} +\label{sec:stylemodstree} + +The group headings for styles like \glostyle{treegroup} are +formatted with: +\cmddef{glstreegroupheaderfmt} +The navigation elements for styles like \glostyle{treehypergroup} is +formatted with: +\cmddef{glstreenavigationfmt} +The above two commands are defined in terms of \gls{glstreenamefmt}, +since that was the command originally used +for the group headings and navigation. This now allows these +different elements to be defined independently, but the most common +redefinition is for \gls{glstreenamefmt} to remove the bold in the +name. If the bold is still required for the group heading and navigation +elements, then both other commands also need redefining. To simplify +matters, all three commands have been defined to use: +\cmddef{glstreedefaultnamefmt} +This simply does \code{\gls+{textbf}\margm{text}}. -\begin{description} -\item[\optfmt{encapmain}] This setting value should be the value to - pass to \gloskey[glslink]{format} for the main entry. (The location - encapsulator.) The default is \texttt{glsnumberformat}. +This means that if you want to change all three to use a particular +style you only need to redefine \gls{glstreedefaultnamefmt}, but if +you only want to redefine \gls{glstreenamefmt} without affecting the +other two commands, then you now can. -\item[\optfmt{encapothers}] This setting value should be the value to - pass to \gloskey[glslink]{format} for the other (not main) entries. (The location - encapsulator.) The default is \texttt{glsnumberformat}. -\end{description} +The separator between groups without headers is given by: +\cmddef{glstreegroupskip} +This defaults to just \gls{indexspace} without penalties. This +command isn't used if \opt{nogroupskip} is set. (The penalties +introduced in v1.41 were moved to \gls{glstreegroupheaderskip} in +v1.42 as they are inappropriate when there's no header.) -\subsection{Post-Link Hooks} -\label{sec:multiglsoptionspostlink} +The separator between groups with headers is now given by: +\cmddef{glstreegroupheaderskip} +This defaults to \gls{glstreegroupskip} with penalties to deter page +breaks after the group heading. -\begin{description} -\item[\optfmt{postlinks}] This setting determines whether or not to -enable the individual element's post-link hook -(\ics{glspostlinkhook}). The value may be one of: -\begin{description} -\item[\optfmt{none}] suppress the post-link hook for all elements; -\item[\optfmt{all}] don't suppress the post-link hook for all elements; -\item[\optfmt{notlast}] only suppress the post-link hook for the -last element; -\item[\optfmt{mainnotlast}] suppress the post-link hook for all -\qt{other} (not main) elements and for the last element (so only the -main element will have its post-link hook as long as it's not the -last element); -\item[\optfmt{mainonly}] suppress the post-link hook for all -\qt{other} (not main) elements; -\item[\optfmt{othernotlast}] suppress the post-link hook for the -main element and for the last element (so only the other elements -will have their post-link hook as long as the element isn't the last -one); -\item[\optfmt{otheronly}] suppress the post-link hook for the main element. -\end{description} -The default is \optfmt{postlinks=none}. - -\item[\optfmt{mpostlink}] This setting determines whether or not to -enable the multi-entry post-link hook -(\sectionref{sec:mglspostlinkhook}). The value may be one of: - \begin{description} - \item[\optfmt{false}] suppress the multi-entry post-link hook; - \item[\optfmt{true}] enable the multi-entry post-link hook; - \item[\optfmt{firstonly}] enable the multi-entry post-link hook - only for the first use of the multi-entry; - \item[\optfmt{usedonly}] enable the multi-entry post-link hook - only for the subsequent (not first) use of the multi-entry. - \end{description} -The default is \optfmt{mpostlink=true}. If the value is omitted, -\optfmt{true} is assumed. - -\item[\optfmt{mpostlinkelement}] This setting indicates which -post-link hook should be used if the multi-entry post-link hook has -been enabled. Allowed values: - \begin{description} - \item[\optfmt{last}] use \ics{mglslastelementpostlinkhook} (that -is, use the post-link hook for the last element); - \item[\optfmt{main}] use \ics{mglslastmainpostlinkhook} (that -is, use the post-link hook for the main element); - \item[\optfmt{custom}] use \ics{mglslastcustompostlinkhook}. - \end{description} -\end{description} -Note that some combinations may cause a repeated hook. +The styles that display the \idx{group} titles now use: +\cmddef{glstreePreHeader} +This does nothing by default and is inserted before the group title. +You can redefine it to add the group title to the PDF bookmarks. For +example, if the \idx{glossary} title uses \gls{chapter} then: +\begin{codebox} +\cmd{renewcommand}\marg{\gls{glstreePreHeader}}[2]\marg{\comment{} + \gls{pdfbookmark}\oarg{1}\marg{\#2}\marg{\gls{currentglossary}.\#1}\comment{} +} +\end{codebox} +will insert section-level bookmarks. The use of \gls{currentglossary} +helps to provide unique bookmark labels in the event of multiple +glossaries. -\subsection{Prefixes and Suffixes} -\label{sec:multiglsoptionsfixes} +The \sty{glossary-tree} package provides the commands +\cmddef{glstreepredesc} +and +\cmddef{glstreechildpredesc} +(which both default to a space) and uses them in the \glostyle{tree}-like +styles, but not for the \glostyle{alttree} style. The +\sty{glossaries-extra-stylemods} package modifies the +\glostyle{alttree} style so that it has equivalent hooks: +\cmddef{glsalttreepredesc} +and +\cmddef{glsalttreechildpredesc} +These do nothing by default. -See \sectionref{sec:mglsfixes} for more information on prefixes and -suffixes. Note that the prefixes and suffixes are not affected by -case-changing commands such as \cs{Mgls} or \cs{MGLS}. -If you want a prefix to obey case-changing, use the \cs{mpgls}-like -commands instead (\sectionref{sec:mpgls}). +The \glostyle{index}-like and \glostyle{tree}-like styles +insert the pre-\idx{locationlist} space with: +\cmddef{glstreeprelocation} +(which defaults to \gls{glsxtrprelocation}) for top-level items and +\cmddef{glstreechildprelocation} +(which defaults to \gls{glstreeprelocation}) for child items. + +The styles like \glostyle{treenoname} use: +\cmddef{glstreenonamedesc} +to display the +pre-description separator, the description and the post-description +hook. Similarly for the symbol: +\cmddef{glstreenonamesymbol} +The above are just used for top-level entries. Child entries don't +have the name or symbol displayed for the \glostyle{treenoname} +styles, so there's only a command for the child description: +\cmddef{glstreenonamechilddesc} -\begin{description} +For the \glostyle{tree} styles (but not the \glostyle{treenoname} or +\glostyle{alttree} styles), the description is displayed using: +\cmddef{glstreedesc} +and the symbol with: +\cmddef{glstreesymbol} +Again the above two commands are just for top-level entries. The +child entries use: +\cmddef{glstreechilddesc} +for the description and +\cmddef{glstreechildsymbol} +for the symbol. +There are now wrapper commands for +\gls{glstreedesc} and \gls{glstreechilddesc} that check for +the description and symbol to determine what separator to use +before the page list: +\cmddef{glstreeDescLoc} +for top-level entries and +\cmddef{glstreeChildDescLoc} +for sub-entries. -\item[firstprefix] The prefix to use on first use of the -multi-entry. +If either the symbol or description is present these will use +\gls{glstreeprelocation} or \gls{glstreechildprelocation}, +respectively. Otherwise, both will use: +\cmddef{glstreeNoDescSymbolPreLocation} +The default is a space. This means that you could have, say, a +comma followed by a space for terms that are simply an alias, but +just have a space for terms that have a description that ends with a +full stop (or that just have a symbol without a description) where +the comma would be inappropriate. -\item[usedprefix] The prefix to use on subsequent use of the -multi-entry. +\begin{information} +Version 1.42 has corrected an error that was introduced to +v1.41 that caused the name to run into the location list if there +was no symbol and no description. +\end{information} -\item[firstsuffix] The suffix to use on first use of the -multi-entry. +There are 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 \opt{notree} or \opt{nostyles} option has been used +when loading \sty{glossaries}. -\item[usedsuffix] The suffix to use on subsequent use of the -multi-entry. -\end{description} +\cmddef{gglssetwidest} +This is like \gls{glssetwidest} but performs a global assignment. -\subsection{Skipping Elements} -\label{sec:multiglsoptionsskip} +\cmddef{eglssetwidest} +This is like \gls{glssetwidest} but expands \meta{name}. -\begin{description} +\cmddef{xglssetwidest} +This is like \gls{eglssetwidest} but performs a global assignment. -\item[\optfmt{firstskipmain}] This is a boolean setting. If -\optfmt{true}, the main element will be omitted on (multi-entry) first use. +The following only set the value if \meta{name} is wider than the +current value. Local update: +\cmddef{glsupdatewidest} +Global update: +\cmddef{gglsupdatewidest} +Locale update (expands \meta{name}): +\cmddef{eglsupdatewidest} +Global update (expands \meta{name}): +\cmddef{xglsupdatewidest} + +The widest entry value can later be retrieved using: +\cmddef{glsgetwidestname} +which expands to the widest top-level name and: +\cmddef{glsgetwidestsubname} +expands to either the widest name for the given +\idx{hierarchicallevel} or to the widest top-level name, if no +widest name set for \meta{level}. + +Note that if you are using \app{bib2gls}, you can use the +resource option \resourceopt{set-widest} which will try to determine the +widest name of all the selected entries. This isn't guaranteed +to work as it may depend on fonts or commands that \app{bib2gls} +can't replicate, but it should be suitable for names that just +consist of text, and can be more efficient than iterating over all +the defined entries using \TeX. -\item[\optfmt{firstskipothers}] This is a boolean setting. If -\optfmt{true}, the other (non-main) elements will be omitted on -(multi-entry) first use. +The command \gls{glsfindwidesttoplevelname} provided by +\sty{glossary-tree} has a CamelCase synonym: +\cmddef{glsFindWidestTopLevelName} +Similar commands are also provided. If the optional \meta{glossary +labels} is omitted, the list of all non-\idxpl{ignoredglossary} is +assumed. +\cmddef{glsFindWidestUsedTopLevelName} +This has an additional check that the entry has been \idxc{firstuseflag}{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.) -\item[\optfmt{usedskipmain}] This is a boolean setting. If -\optfmt{true}, the main element will be omitted on (multi-entry) subsequent use. +\cmddef{glsFindWidestUsedAnyName} +This is like the previous command but if doesn't check the +\gloskey{parent} key. This is useful if all +\idxpl{hierarchicallevel} should have the same width for the name. -\item[\optfmt{usedskipothers}] This is a boolean setting. If -\optfmt{true}, the other (non-main) elements will be omitted on -(multi-entry) subsequent use. +\cmddef{glsFindWidestAnyName} +This is like the previous command but doesn't check if the entry +has been used. -\end{description} -The skip options apply to the multi-entry first use flag not the -individual element first use. See \sectionref{sec:mglsfirstuse}. +\cmddef{glsFindWidestUsedLevelTwo} +This is like \gls{glsFindWidestUsedTopLevelName} but also sets +the first two sub-levels as well. Any entry that has a +great-grandparent is ignored. -Note that it is technically possible to set the skip options so that -both the main and the other elements are skipped. However, by -default, this will generate a warning and only the final optional -argument (the \meta{insert}) will be displayed. There won't be a -loop over all elements so the commands set at each iteration, such -as \cs{mglscurrentlabel}, won't be defined. +\cmddef{glsFindWidestLevelTwo} +This is like the previous command but doesn't check if the entry has +been used. -The warning and the -insertion of the \meta{insert} is done by: -\begin{definition}[\DescribeMacro\glsxtrmglsWarnAllSkipped] -\cs{glsxtrmglsWarnAllSkipped}\marg{message}\marg{insert}\marg{cs} -\end{definition} -where \meta{message} is the warning message and \meta{cs} is the -control sequence that encapsulates the entire content (including -hyperlink and the \optfmt{textformat} setting, if enabled). +\cmddef{glsFindWidestUsedAnyNameSymbol} +This is like \gls{glsFindWidestUsedAnyName} but also measures the +symbol. The length of the widest symbol is stored in +\meta{register}. -If, for some particular reason, you want this scenario, you can -redefine this command to omit the warning. +\cmddef{glsFindWidestAnyNameSymbol} +This is like the previous command but it doesn't check if the entry +has been used. -\subsection{General} -\label{sec:multiglsoptionsgeneral} +\cmddef{glsFindWidestUsedAnyNameSymbolLocation} +This is like \gls{glsFindWidestUsedAnyNameSymbol} but also +measures the \idx{locationlist}. This requires +\gls{glsentrynumberlist}. +The length of the widest symbol is stored in \meta{register1} +and the length of the widest \idx{locationlist} is stored in +\meta{register2}. -\begin{description} -\item[\optfmt{hyper}] This setting may take one of the following -values: - \begin{description} - \item[\optfmt{none}] no hyperlinks; - \item[\optfmt{allmain}] encapsulate the entire content with - a single hyperlink to the main entry's target; - \item[\optfmt{mainonly}] only hyperlink the main entry; - \item[\optfmt{individual}] hyperlink each entry individually; - \item[\optfmt{otheronly}] only hyperlink the other entries; - \item[\optfmt{notmainfirst}] don't hyperlink the main entry on - multi-entry first use; - \item[\optfmt{nototherfirst}] don't hyperlink the other entries on - multi-entry first use; - \item[\optfmt{notfirst}] don't hyperlink any entries on - multi-entry first use. - \end{description} - The default is \optfmt{individual}. +\cmddef{glsFindWidestAnyNameSymbolLocation} +This is like the previous command but it doesn't check if the entry +has been used. -\item[\optfmt{textformat}] This setting value should be the control -sequence name (without the leading backslash) of the command used to -encapsulate the entire content. The default is \texttt{@firstofone}. +\cmddef{glsFindWidestUsedAnyNameLocation} +This is like \gls{glsFindWidestUsedAnyNameSymbolLocation} but doesn't +measure the symbol. The length of the widest \idx{locationlist} +is stored in \meta{register}. -\item[\optfmt{category}] The category to apply to the -multi-entry. This is independent of the categories of each of the elements. -The default is no category. See \sectionref{sec:multiglscategory}. +\cmddef{glsFindWidestAnyNameLocation} +This is like the previous command but doesn't check if the entry has +been used. -\item[\optfmt{mglsopts}] Default options to pass to \cs{mgls}. -Note that \optfmt{setup} can't be used within this value. +The layout of the symbol, description and \idx{locationlist} +is governed by: +\cmddef{glsxtralttreeSymbolDescLocation} +for top-level entries and +\cmddef{glsxtralttreeSubSymbolDescLocation} +for sub-entries. -\end{description} +There is now a user level command that performs the initialisation +for the \glostyle{alttree} style: +\cmddef{glsxtralttreeInit} +The paragraph indent for subsequent paragraphs in multi-paragraph +descriptions is provided by the length: +\cmddef{glsxtrAltTreeIndent} -\section{\headingcs{mgls} Options} -\label{sec:mglsopts} +For additional commands that are available with the +\glostyle{alttree} style, see the documented code +(\filefmt{glossaries-extra-code.pdf}). See also +the accompanying sample files \file{sample-alttree.tex}, +\file{sample-alttree-sym.tex} and +\file{sample-alttree-marginpar.tex}. -The \meta{options} for \cs{mgls} (and similar commands) are listed below. -Any additional options provided will be appended to the \optfmt{all} -value. For example: -\begin{verbatim} -\mgls[counter=chapter]{cbot} -\end{verbatim} -is equivalent to: -\begin{verbatim} -\mgls[all={counter=chapter}]{cbot} -\end{verbatim} -Whereas: -\begin{verbatim} -\mgls[counter=chapter,all={counter=section}]{cbot} -\end{verbatim} -is treated as: -\begin{verbatim} -\mgls[all={counter=section,counter=chapter}]{cbot} -\end{verbatim} -which has the same effect as: -\begin{verbatim} -\mgls[all={counter=chapter}]{cbot} -\end{verbatim} -(The descriptions below reference \cs{gls} which is used internally -by \cs{mgls}. Replace this with \cs{glspl} etc as applicable for the -variants, such as \cs{mglspl}.) +\section{New Glossary Styles} +\label{sec:newglossarystyles} -\begin{description} -\item[\optfmt{setup}] The value should be a list of any options that -can be passed to \cs{multiglossaryentrysetup}. These options will -override any conflicting options that were supplied to \cs{multiglossaryentry} -or \cs{multiglossaryentrysetup}. Note that \optfmt{mgls} can't be -used within this value. +The \sty{glossaries-extra} package comes with some new styles. +The associated style package needs to be loaded. This can be done +with \csfmt{usepackage} but it's simpler to use the \opt{stylemods} +option. For example: +\begin{codebox} +\cmd{usepackage}\oarg{\optval{stylemods}{bookindex},\optval{style}{bookindex}}\marg{glossaries-extra} +\end{codebox} +If you don't require any of the base styles, use \opt{nostyles} (but +note that some style packages automatically load another style +package if it the style builds on an existing one). + +\subsection{\stytext{glossary-bookindex} package} +\label{sec:bookindex} -\item[\optfmt{all}] The value should be a list of any options that -can be passed to \cs{gls}. These options will be passed to each -instance of \cs{gls} and will override any conflicting setting in -\optfmt{setup}. - -\item[\optfmt{main}] The value should be a list of any options that -can be passed to \cs{gls}. These options will be passed to the -instance of \cs{gls} used for the main label and will override any -conflicting setting in \optfmt{all}. - -\item[\optfmt{others}] The value should be a list of any options that -can be passed to \cs{gls}. These options will be passed to each -instance of \cs{gls} used for the other (not main) labels and will -override any conflicting setting in \optfmt{all}. - -\item[\optfmt{hyper}] a boolean option to determine whether or not -to use hyperlinks (if supported). This may cause a conflict with -other options, but is essentially provided to allow the starred -version of \cs{mgls} to switch off all hyperlinks. - -\item[\optfmt{multiunset}] This only applies to the multi-entry -first use flag, described in \sectionref{sec:mglsfirstuse}, not the -\glspl{firstuseflag} of the elements. The value may be one of: -\begin{description} -\item \optfmt{global} globally unset the flag (default); -\item \optfmt{local} locally unset the flag; -\item \optfmt{none} don't unset the flag. -\end{description} +\glsaddeach[format=(]{opt.glostyle.bookindex,pkg.glossary-bookindex}% +The \inlineglsdef{pkg.glossary-bookindex} package provides the glossary style +\inlineglsdef{opt.glostyle.bookindex}. This is very similar to the +\glostyle{mcolindexgroup} style but is designed for indexes, so by +default only the name and location list are displayed. This style is +demonstrated in \exampleref{ex:bookindex} (using \app{bib2gls}). +Note that some entries don't have \idxpl{locationlist} because they +weren't \recorded\ in the document, but were included as +dependencies. See \sectionref{sec:seenoindex} for dealing with +cross-references that may not be required. + +\begin{resultbox}[float] +\createexample*[label={ex:bookindex}, +arara={pdflatex,bib2gls: { group: on },pdflatex,pdfcrop}, +title={The \optfmt{bookindex} style}, + description={Example document demonstrating the bookindex style}] +{\cmd{usepackage}\oarg{record,nostyles,stylemods=bookindex,style=bookindex}\marg{glossaries-extra}^^J% +\gls{GlsXtrLoadResources}\oarg{src=example-glossaries-xr,^^J + selection=\marg{recorded and deps and see not also}^^J% +} +} +{\gls{glsaddeach}\marg{lorem,amet,adipiscing,placerat,arcu,vulputate}^^J% +\gls{glsaddeach}\oarg{thevalue=2}\marg{arcu,consectetuer,donec,augue}^^J% +\gls{glsaddeach}\oarg{thevalue=3}\marg{arcu,lorem,nulla}^^J% +\gls{printunsrtglossary} +} +\end{resultbox} -\item[\optfmt{presetlocal}] a boolean option that governs whether or -not the following options should have a local or global effect. -The default is \optfmt{presetlocal=false} (global). - -\item[\optfmt{resetall}] a boolean option to determine whether or not -to reset all entries in \meta{label list} \emph{before} using \cs{gls}. -This option refers to the individual entry's \gls{firstuseflag} not -the multi-set flag. - -\item[\optfmt{resetmain}] a boolean option to determine whether or not -to reset the main entry \emph{before} using \cs{gls}. -This option refers to the individual entry's \gls{firstuseflag} not -the multi-set flag. - -\item[\optfmt{resetothers}] a boolean option to determine whether or not -to reset the other (not main) entries \emph{before} using \cs{gls}. -This option refers to the individual entry's \gls{firstuseflag} not -the multi-set flag. - -\item[\optfmt{unsetall}] a boolean option to determine whether or not -to unset all entries in \meta{label list} \emph{before} using \cs{gls}. -This option refers to the individual entry's \gls{firstuseflag} not -the multi-set flag. - -\item[\optfmt{unsetmain}] a boolean option to determine whether or not -to unset the main entry \emph{before} using \cs{gls}. -This option refers to the individual entry's \gls{firstuseflag} not -the multi-set flag. - -\item[\optfmt{unsetothers}] a boolean option to determine whether or not -to unset the other (not main) entries \emph{before} using \cs{gls}. -This option refers to the individual entry's \gls{firstuseflag} not -the multi-set flag. -\end{description} -The \optfmt{reset\ldots} options all use: -\begin{definition}[\DescribeMacro\mglselementreset] -\cs{mglselementreset}\marg{label} -\end{definition} -The \optfmt{unset\ldots} options all use: -\begin{definition}[\DescribeMacro\mglselementunset] -\cs{mglselementunset}\marg{label} -\end{definition} -These take the \optfmt{presetlocal} into account. +The \glostyle{bookindex} style only supports a maximum +\idx{hierarchicallevel} of 2 (top-level, level~1 and level~2). It's +primarily designed for use with \app{bib2gls}. It may be used with +other indexing options, but some features may not be present and +\idx{utf8} characters may cause a problem with non-Unicode engines in +letter group headings or PDF bookmarks. (\app{bib2gls} uses numeric +identifies by default to avoid these problems, see \sectionref{sec:printunsrtgroups}.) -An alternative way of resetting the other elements is to use: -\begin{definition}[\DescribeMacro\mglsunsetothers] -\cs{mglsunsetothers}\marg{multi-label} -\end{definition} -or for a local reset: -\begin{definition}[\DescribeMacro\mglslocalunsetothers] -\cs{mglslocalunsetothers}\marg{multi-label} -\end{definition} +The number of columns is given by: +\cmddef{glsxtrbookindexcols} +which defaults to 2. -\section{Variants of \headingcs{mgls}} -\label{sec:mglslike} +This style uses the \env{multicols} environment. If +the command: +\cmddef{glsxtrbookindexcolspread} +isn't empty then it's supplied as the optional argument +following \code{\cbeg{multicols}\margm{n}}. You can switch from +\env{multicols} to \env{multicols*} by redefining: +\cmddef{glsxtrbookindexmulticolsenv} +For example: +\begin{codebox} +\cmd{renewcommand}\marg{\gls{glsxtrbookindexmulticolsenv}}\marg{multicols*} +\end{codebox} -The commands listed in this section all behave like \cs{mgls}. These -(including \cs{mgls} itself) are collectively referred to as the -\cs{mgls}-like commands. All commands unset the multi-entry first -use flag (unless the \optfmt{multiunset=none} option is applied). Only -those commands that use the \cs{gls}-like commands (such as \cs{gls} -or \cs{glspl}) will unset the individual entry \gls{firstuseflag}. +Each top-level entry is displayed using: +\cmddef{glsxtrbookindexname} +This just does \code{\gls{glossentryname}\margm{entry-label}} by default. +For example, if you want the symbol to be included: +\begin{codebox} +\cmd{renewcommand}*\marg{\gls{glsxtrbookindexname}}[1]\marg{\comment{} + \gls{glossentryname}\marg{\#1}\comment{} + \gls{ifglshassymbol}\marg{\#1}\marg{\cmd{space} (\gls{glossentrysymbol}\marg{\#1})}\marg{}\comment{} +} +\end{codebox} +or if you want the description (if set): +\begin{codebox} +\cmd{renewcommand}*\marg{\gls{glsxtrbookindexname}}[1]\marg{\comment{} + \gls{glossentryname}\marg{\#1}\comment{} + \gls{ifglshasdesc}\marg{\#1}\marg{\cmd{space} \gls{glossentrydesc}\marg{\#1}\gls{glspostdescription}}{}\comment{} +} +\end{codebox} +(which picks up the \idx{postdeschook}). -\subsection{\headingcs{gls}-like} -\label{sec:mglsbasic} +Alternatively you can use the \gls{glsxtrpostnamecategory} +hook to append information after the name according to the entry's +category. -\begin{definition}[\DescribeMacro\mglspl] -\cs{mglspl}\oarg{options}\marg{multi-label}\oarg{insert} -\end{definition} -This uses \cs{glspl} instead of \cs{gls} for each entry. - -\begin{definition}[\DescribeMacro\mglsmainpl] -\cs{mglsmainpl}\oarg{options}\marg{multi-label}\oarg{insert} -\end{definition} -This uses \cs{glspl} instead of \cs{gls} for the main entry and -\cs{gls} for all the other entries. - -\begin{definition}[\DescribeMacro\Mgls] -\cs{Mgls}\oarg{options}\marg{multi-label}\oarg{insert} -\end{definition} -This uses \cs{Gls} for the first entry and \cs{gls} for the other -entries. +Sub-entries are displayed using: +\cmddef{glsxtrbookindexsubname} +which just defaults to \code{\gls{glsxtrbookindexname}\margm{entry-label}}. + +The separator used before the \idx{locationlist} for top-level +entries is given by: +\cmddef{glsxtrbookindexprelocation} +where \meta{entry-label} is the entry's label. This checks if +the \gloskey{location} field has been set. If it has, it +does: +\begin{codebox} +,\gls{glsxtrprelocation} +\end{codebox} +otherwise it just does \gls{glsxtrprelocation} (which defaults to +\csfmt{space}) with no comma. If you're using \app{bib2gls} +with \resourceoptval{save-locations}{false}, the +\gloskey{location} field won't be set. + +The separator used before the \idx{locationlist} for sub-entries is given by: +\cmddef{glsxtrbookindexsubprelocation} +which defaults to \code{\gls{glsxtrbookindexprelocation}\marg{entry-label}}. -\begin{definition}[\DescribeMacro\MGls] -\cs{MGls}\oarg{options}\marg{multi-label}\oarg{insert} -\end{definition} -This uses \cs{Gls} for all entries. +The actual location list is encapsulated with: +\cmddef{glsxtrbookindexlocation} +for top-level entries and: +\cmddef{glsxtrbookindexsublocation} +for sub-entries. These both just do \meta{location list} by default. -\begin{definition}[\DescribeMacro\Mglspl] -\cs{Mglspl}\oarg{options}\marg{multi-label}\oarg{insert} -\end{definition} -This uses \cs{Glspl} for the first entry and \cs{glspl} for the other -entries. +The separator used between a top-level parent and child entry is +given by: +\cmddef{glsxtrbookindexparentchildsep} +This defaults to \csfmt{nopagebreak}. -\begin{definition}[\DescribeMacro\Mglsmainpl] -\cs{Mglsmainpl}\oarg{options}\marg{multi-label}\oarg{insert} -\end{definition} -The first entry starts with an upper case. The plural form is used -for the main entry. - -\begin{definition}[\DescribeMacro\MGlspl] -\cs{MGlspl}\oarg{options}\marg{multi-label}\oarg{insert} -\end{definition} -This uses \cs{Glspl} for all entries. - -\begin{definition}[\DescribeMacro\MGlsmainpl] -\cs{MGlsmainpl}\oarg{options}\marg{multi-label}\oarg{insert} -\end{definition} -This uses \cs{Glspl} for the main entry and \cs{Gls} for all other entries. - -\begin{definition}[\DescribeMacro\MGLS] -\cs{MGLS}\oarg{options}\marg{multi-label}\oarg{insert} -\end{definition} -This uses \cs{GLS} instead of \cs{gls} for each entry. - -\begin{definition}[\DescribeMacro\MGLSpl] -\cs{MGLSpl}\oarg{options}\marg{multi-label}\oarg{insert} -\end{definition} -This uses \cs{GLSpl} instead of \cs{gls} for each entry. - -\begin{definition}[\DescribeMacro\MGLSmainpl] -\cs{MGLSmainpl}\oarg{options}\marg{multi-label}\oarg{insert} -\end{definition} -This uses all caps for all entries and \cs{GLSpl} for the main -entry. +The separator used between a sub-level parent and child entry is +given by: +\cmddef{glsxtrbookindexparentsubchildsep} +This defaults to \gls{glsxtrbookindexparentchildsep}. -\subsection{Abbreviations} -\label{sec:mglsabbrv} +The separator between top-level entries is given by: +\cmddef{glsxtrbookindexbetween} +This comes after the entry given by \meta{entry1-label}, if the entry +has no children, or after the last descendent otherwise, +so it always comes immediately before the entry given +by \meta{entry2-label} unless the entry occurs at the start of +a group. This does nothing by default. -\begin{definition}[\DescribeMacro\mglsshort] -\cs{mglsshort}\oarg{options}\marg{multi-label}\oarg{insert} -\end{definition} -This will use \cs{glsxtrshort} for any entries that have the -\gloskey{short} key set and will use \cs{glstext} otherwise. - -\begin{definition}[\DescribeMacro\mglslong] -\cs{mglslong}\oarg{options}\marg{multi-label}\oarg{insert} -\end{definition} -This will use \cs{glsxtrlong} for any entries that have the -\gloskey{long} key set and will use \cs{glstext} otherwise. - -\begin{definition}[\DescribeMacro\mglsfull] -\cs{mglsfull}\oarg{options}\marg{multi-label}\oarg{insert} -\end{definition} -This will use \cs{glsxtrfull} for any entries that have the -\gloskey{short} key set and will use \cs{glsfirst} otherwise. - -\begin{definition}[\DescribeMacro\Mglsshort] -\cs{Mglsshort}\oarg{options}\marg{multi-label}\oarg{insert} -\end{definition} -As \cs{mglsshort} but with an initial capital on the first entry. - -\begin{definition}[\DescribeMacro\Mglslong] -\cs{Mglslong}\oarg{options}\marg{multi-label}\oarg{insert} -\end{definition} -As \cs{mglslong} but with an initial capital on the first entry. - -\begin{definition}[\DescribeMacro\Mglsfull] -\cs{Mglsfull}\oarg{options}\marg{multi-label}\oarg{insert} -\end{definition} -As \cs{mglsfull} but with an initial capital on the first entry. +The separator between two level~1 entries is given by: +\cmddef{glsxtrbookindexsubbetween} -\subsection{Other Fields} -\label{sec:mglsotherfields} +The separator between two level~2 entries is given by: +\cmddef{glsxtrbookindexsubsubbetween} -\begin{definition}[\DescribeMacro\mglsname] -\cs{mglsname}\oarg{options}\marg{multi-label}\oarg{insert} -\end{definition} -This uses \cs{glsname} instead of \cs{gls} for each entry. - -\begin{definition}[\DescribeMacro\MGlsname] -\cs{MGlsname}\oarg{options}\marg{multi-label}\oarg{insert} -\end{definition} -This uses \cs{Glsname} instead of \cs{gls} for each entry. - -\begin{definition}[\DescribeMacro\Mglsname] -\cs{Mglsname}\oarg{options}\marg{multi-label}\oarg{insert} -\end{definition} -This uses \cs{Glsname} instead of \cs{gls} for the first entry and -\cs{glsname} for all the other entries. - -\begin{definition}[\DescribeMacro\mglssymbol] -\cs{mglssymbol}\oarg{options}\marg{multi-label}\oarg{insert} -\end{definition} -This uses \cs{glssymbol} if the \gloskey{symbol} key has been set -otherwise it uses \cs{gls} for each element. - -\begin{definition}[\DescribeMacro\MGlssymbol] -\cs{MGlssymbol}\oarg{options}\marg{multi-label}\oarg{insert} -\end{definition} -This uses \cs{glssymbol} if the \gloskey{symbol} key has been set -otherwise it uses \cs{Gls} for each element. (Note that no case -change is applied to the symbol as this usually isn't appropriate.) - -\begin{definition}[\DescribeMacro\Mglssymbol] -\cs{Mglssymbol}\oarg{options}\marg{multi-label}\oarg{insert} -\end{definition} -As above, but \cs{Gls} is only used for the first element (if it -doesn't have the \gloskey{symbol} key set). - -\begin{definition}[\DescribeMacro\mglsusefield] -\cs{mglsusefield}\oarg{options}\marg{multi-label}\oarg{insert} -\end{definition} -Use \texttt{\cs{glsdisp}\marg{label}\glsopenbrace\meta{field -value}\meta{insert}\glsclosebrace} if the field given by: -\begin{definition}[\DescribeMacro\mglsfield] -\cs{mglsfield} -\end{definition} -exists, otherwise use \cs{gls}. By default, this is \texttt{useri} -(corresponding to the \gloskey{user1} key). If you redefine -\cs{mglsfield}, you will need to use the internal name. - -\begin{definition}[\DescribeMacro\Mglsusefield] -\cs{Mglsusefield}\oarg{options}\marg{multi-label}\oarg{insert} -\end{definition} -As \cs{mglsusefield} but the first element starts with an initial -uppercase. - -\begin{definition}[\DescribeMacro\MGlsusefield] -\cs{MGlsusefield}\oarg{options}\marg{multi-label}\oarg{insert} -\end{definition} -As \cs{mglsusefield} but each element starts with an initial -uppercase. - -You can use the pre-element hook \cs{mglselementprehook} to locally -redefine \cs{mglsfirst}. Examples: -\begin{enumerate} -\item if the multi-category is \qt{sample} then use the -\gloskey{user2} field otherwise use the \gloskey{user1} field: -\begin{verbatim} -\renewcommand{\mglselementprehook}{% - \ifdefstring{\mglscurrentcategory}{sample}% - {\renewcommand{\mglsfield}{userii}}% - {\renewcommand{\mglsfield}{useri}}% +At the end of each letter \idx{group}, the following hooks +are done in order: +\cmddef{glsxtrbookindexsubsubatendgroup} +where \meta{entry-label} is the label of the last level~2 entry +\cmddef{glsxtrbookindexsubatendgroup} +where \meta{entry-label} is the label of the last level~1 entry +\cmddef{glsxtrbookindexatendgroup} +where \meta{entry-label} is the label of the last level~0 entry. + +For example, the resource option \resourceoptval{seealso}{omit} +instructs \app{bib2gls} to omit the \gloskey{seealso} cross-reference +from the \idx{locationlist}. (The \gloskey{see} cross-reference +will still be added unless you also have \resourceoptval{see}{omit}.) +The \gloskey{seealso} cross-reference can instead be appended after +the child entries using: +\begin{codebox} +\cmd{renewcommand}\marg{\gls{glsxtrbookindexatendgroup}}[1]\marg{\comment{} + \gls{glsxtrifhasfield}\marg{\gloskey{seealso}}\marg{\#1}\comment{} + \marg{\gls{glstreesubitem}\gls{glsxtruseseealso}\marg{\#1}}\marg{}\comment{} } -\end{verbatim} - -\item if the element's category is \qt{sample} then use the -\gloskey{user2} field otherwise use the \gloskey{user1} field: -\begin{verbatim} -\renewcommand{\mglselementprehook}{% - \glsifcategory{\mglscurrentlabel}{sample}% - {\renewcommand{\mglsfield}{userii}}% - {\renewcommand{\mglsfield}{useri}}% +\cmd{renewcommand}\marg{\gls{glsxtrbookindexbetween}}[2]\marg{\comment{} + \gls{glsxtrbookindexatendgroup}\marg{\#1}\comment{} +}% +\codepar +\cmd{renewcommand}\marg{\gls{glsxtrbookindexsubatendgroup}}[1]\marg{\comment{} + \gls{glsxtrifhasfield}\marg{\gloskey{seealso}}\marg{\#1}\comment{} + \marg{\gls{glstreesubsubitem}\gls{glsxtruseseealso}\marg{\#1}}\marg{}\comment{} } -\end{verbatim} - -\item if either the multi-entry's category or the element's category -has the custom attribute \qt{mglsfield} set then use it otherwise use -the \gloskey{user1} field: -\begin{verbatim} -\renewcommand{\mglselementprehook}{% - \glshascategoryattribute{\mglscurrentcategory}{mglsfield}% - {\renewcommand{\mglsfield}{\glsgetcategoryattribute{\mglscurrentcategory}{mglsfield}}}% - {% - \glshasattribute{\mglscurrentlabel}{mglsfield}% - {\renewcommand{\mglsfield}{\glsgetattribute{\mglscurrentlabel}{mglsfield}}}% - {\renewcommand{\mglsfield}{useri}}% - }% +\codepar +\cmd{renewcommand}\marg{\gls{glsxtrbookindexsubbetween}}[2]\marg{\comment{} + \gls{glsxtrbookindexsubatendgroup}\marg{\#1}\comment{} } -\end{verbatim} -\end{enumerate} - -\subsection{Support for \headingsty{glossaries-prefix} (\headingcs{pgls})} -\label{sec:mpgls} +\codepar +\cmd{renewcommand}\marg{\gls{glsxtrbookindexsubsubatendgroup}}[1]\marg{\comment{} + \gls{glsxtrifhasfield}\marg{\gloskey{seealso}}\marg{\#1}\comment{} + \marg{\gls{glstreeitem}\cmd{hspace}*\marg{40pt}\gls{glsxtruseseealso}\marg{\#1}}\marg{}\comment{} +} +\codepar +\cmd{renewcommand}\marg{\gls{glsxtrbookindexsubsubbetween}}[2]\marg{\comment{} + \gls{glsxtrbookindexsubsubatendgroup}\marg{\#1}\comment{} +} +\end{codebox} +This uses \gls{glstreesubitem} and \gls{glstreesubsubitem} +to indent the cross-reference according to the next level down, +so the cross-reference for a top-level entry is aligned with +the sub-entries, and a level~1 entry has its cross-reference +aligned with sub-sub-entries. In the event that a level~2 +entry has a cross-reference, this is indented a bit further +(but it won't be aligned with any deeper level as the +\glostyle{bookindex} style only supports a maximum of two +sub-levels). -If you load the \sty{glossaries-prefix} package (either after -\styfmt{glossaries-extra}) or with the \pkgopt{prefix} package -option, then the following commands will use one of the -\cs{pgls}-like commands provided by that package. (See the -\styfmt{glossaries} user manual for further details.) - -If the \styfmt{glossaries-prefix} package hasn't been loaded then -\cs{gls} (or analogous case-changing variant) will be used instead -and a warning is issued. The warning can be removed by redefining -the following to do nothing: -\begin{definition}[\DescribeMacro\mpglsWarning] -\cs{mpglsWarning} -\end{definition} - -\begin{definition}[\DescribeMacro\mpgls] -\cs{mpgls}\oarg{options}\marg{multi-label}\oarg{insert} -\end{definition} -Uses \cs{pgls} for the first element and \cs{gls} for the remaining -elements. +The \glostyle{bookindex} style uses group headings. (If you +use \app{bib2gls} remember to invoke it with the \switch{group} +or \switch{g} switch, see \sectionref{sec:printunsrtgroups}.) The heading will use: +\cmddef{glsxtrbookindexbookmark} +If \gls{pdfbookmark} has been defined, this will +use that command to bookmark the group title. If +\optval{section}{chapter} is set (default if chapters are defined) +then this uses level~1 otherwise it uses level~2. You can +redefine this command if this isn't appropriate. +If \gls{pdfbookmark} hasn't been defined, this command does nothing. -\begin{definition}[\DescribeMacro\mpglspl] -\cs{mpglspl}\oarg{options}\marg{multi-label}\oarg{insert} -\end{definition} -Uses \cs{pglspl} for the first element and \cs{glspl} for the remaining -elements. +The group heading is formatted according to: +\cmddef{glsxtrbookindexformatheader} +which is defined as: +\begin{codebox} +\cmd{newcommand}*\marg{\gls{glsxtrbookindexformatheader}}[1]\marg{\comment{} + \cmd{par}\marg{\cmd{centering}\gls{glstreegroupheaderfmt}\marg{\#1}\cmd{par}}\comment{} +} +\end{codebox} +where \gls{glstreegroupheaderfmt} is provided by the +\sty{glossary-tree} package, which is automatically loaded. +Note that the entry names aren't encapsulated with +\gls{glstreenamefmt}. -\begin{definition}[\DescribeMacro\mpglsmainpl] -\cs{mpglsmainpl}\oarg{options}\marg{multi-label}\oarg{insert} -\end{definition} -Only uses the plural form for the main element. The first element -uses the prefixing command (\cs{pgls} or \cs{pglspl}, depending on -whether the first element is the main element). +The skip after a \idx{group} header is given by: +\cmddef{glsxtrbookindexpregroupskip} +The argument is the skip that would normally be inserted if there +wasn't a group header. -\begin{definition}[\DescribeMacro\Mpgls] -\cs{Mpgls}\oarg{options}\marg{multi-label}\oarg{insert} -\end{definition} -Uses \cs{Pgls} for the first element and \cs{gls} for the remaining -elements. +The \sty{glossary-bookindex} package provides some supplementary +commands that aren't used by default, but may be used when +adjusting the style. These commands should only be +used within one of the \csfmt{print\ldots glossary} commands. +(That is, they should only be used in \idxpl{glossarystyle} or in +hooks.) +\cmddef{glsxtrbookindexmarkentry} +This writes information to the \ext{aux} file that +can be read on the next run to obtain the first and last entry on +each page of the glossary. -\begin{definition}[\DescribeMacro\Mpglsmainpl] -\cs{Mpglsmainpl}\oarg{options}\marg{multi-label}\oarg{insert} -\end{definition} -Only uses the plural form for the main element. The first element -uses the first-letter uppercase prefixing command -(\cs{Pgls} or \cs{Pglspl}, depending on whether the first element is -the main element). +You can display the first entry associated with the current page using: +\cmddef{glsxtrbookindexfirstmark} +and the last entry associated with the current page using: +\cmddef{glsxtrbookindexlastmark} +These do nothing if there are no entries marked on the current page +(or if the document build isn't up to date). -\begin{definition}[\DescribeMacro\MPGls] -\cs{MPGls}\oarg{options}\marg{multi-label}\oarg{insert} -\end{definition} -Uses \cs{Pgls} for the first element and \cs{Gls} for the remaining -elements. +The entry is formatted using: +\cmddef{glsxtrbookindexfirstmarkfmt} +for the first instance and +\cmddef{glsxtrbookindexlastmarkfmt} +for the last. -\begin{definition}[\DescribeMacro\MPGlspl] -\cs{MPGlspl}\oarg{options}\marg{multi-label}\oarg{insert} -\end{definition} -Uses \cs{Pglspl} for the first element and \cs{Glspl} for the remaining -elements. +These commands are designed for use in page headers or footers +where the page number is stable. For example, \gls{glsxtrbookindexname} +can be redefined to mark the current entry: +\begin{codebox} +\cmd{renewcommand}\marg{\gls{glsxtrbookindexname}}[1]\marg{\comment{} + \gls{glsxtrbookindexmarkentry}\marg{\#1}\comment{} + \gls{glossentryname}\marg{\#1}\comment{} +} +\end{codebox} +If you only want to mark the top-level entries, remember +to redefine \gls{glsxtrbookindexsubname} as it defaults +to \gls{glsxtrbookindexname}: +\begin{codebox} +\gls{renewcommand}\marg{\gls{glsxtrbookindexsubname}}[1]\marg{\comment{} + \gls{glossentryname}\marg{\#1}\comment{} +} +\end{codebox} -\begin{definition}[\DescribeMacro\MPGlsmainpl] -\cs{MPGlsmainpl}\oarg{options}\marg{multi-label}\oarg{insert} -\end{definition} -Only uses the plural form for the main element. The first element -uses the prefixing command (\cs{Pgls} or \cs{Pglspl}, depending on -whether the first element is the main element). All elements are -converted to first letter uppercase. +Then if you're using \sty{fancyhdr} you can set the page style +to show the first and last entry for the current page with: +\begin{codebox} +\cmd{pagestyle}\marg{fancy}\comment{} +\cmd{lhead}\marg{\gls{thepage}}\comment{} +\cmd{lfoot}\marg{\gls{glsxtrbookindexfirstmark}}\comment{} +\cmd{cfoot}\marg{}\comment{} +\cmd{rfoot}\marg{\gls{glsxtrbookindexlastmark}}\comment{} +\end{codebox} +\glsaddeach[format=)]{opt.glostyle.bookindex,pkg.glossary-bookindex}% + +\subsection{\stytext{glossary-longextra} package} +\label{sec:longextra} -\begin{definition}[\DescribeMacro\MPGLS] -\cs{MPGLS}\oarg{options}\marg{multi-label}\oarg{insert} -\end{definition} -Uses \cs{PGLS} for the first element and \cs{GLS} for the remaining -elements. +\glsadd[format=(]{pkg.glossary-longextra}% +The \inlineglsdef{pkg.glossary-longextra} package provides additional +\env{tabular}-like styles similar to those provided by +\sty{glossary-longbooktabs} (which is automatically loaded). These don't support +\idxpl{hierarchicallevel} except for homographs (level~1 entries +with the same name as their parent). -\begin{definition}[\DescribeMacro\MPGLSpl] -\cs{MPGLSpl}\oarg{options}\marg{multi-label}\oarg{insert} -\end{definition} -Uses \cs{PGLSpl} for the first element and \cs{GLSpl} for the remaining -elements. +By default, these styles use the +\env{longtable} environment, but if you know that your \idx{glossary} won't +span more than a page and you need to use it in a context that's +incompatible with \env{longtable}, you can instead setup these styles +to use \env{tabular} instead. In order to do this you must use: +\cmddef{GlsLongExtraUseTabulartrue} +\emph{before the style is set}. If you later want to switch back to +using \env{longtable} for another \idx{glossary}, use: +\cmddef{GlsLongExtraUseTabularfalse} +(or scope \gls{GlsLongExtraUseTabulartrue}). Again, the style must +be set after this change to the conditional is implemented. You can +test this setting with: +\cmddef{ifGlsLongExtraUseTabular} -\begin{definition}[\DescribeMacro\MPGLSmainpl] -\cs{MPGLSmainpl}\oarg{options}\marg{multi-label}\oarg{insert} -\end{definition} -Only uses the plural form for the main element. All elements are -converted to uppercase. The first element uses the prefixing command -(\cs{PGLS} or \cs{PGLSpl}, depending on whether the first element is -the main element). +For example: +\begin{codebox} +\gls{GlsLongExtraUseTabulartrue} +\gls{setglossarystyle}\marg{\glostyle{long-name-desc}} +\end{codebox} +or +\begin{codebox} +\gls{GlsLongExtraUseTabulartrue} +\gls{printunsrtglossary}\oarg{\printglossoptval{style}{\glostyle{long-name-desc}}} +\end{codebox} +If you switch to \env{tabular}, the default vertical +alignment is obtained from: +\cmddef{glslongextraTabularVAlign} +This should expand to one of: \code{c} (centred), \code{t} (top) or +\code{b} (bottom). The default is \code{c}. + +For either \env{tabular} or \env{longtable}, the column titles are +formatted according to: +\cmddef{glslongextraHeaderFmt} +which simply does \code{\cmd{textbf}\margm{text}} by default. +As with the \glostyle{long}-like styles, the header text for the +columns are given by the language-sensitive commands: +\gls{entryname}, \gls{descriptionname}, \gls{symbolname} and +\gls{pagelistname}. + +Most styles show the \gloskey{name} which, as with other predefined +styles, also includes the entry item number (if \opt{entrycounter} is +on) and hypertarget anchor. These are all performed for top-level +entries with: +\cmddef{glslongextraNameFmt} +This uses \gls{glossentryname}, so it supports the +\idx{postnamehook} and associated attributes. Child entries are +displayed with: +\cmddef{glslongextraSubNameFmt} +This includes the sub-entry item number (if \opt{subentrycounter} is +on) and the hypertarget anchor. The actual name isn't shown by +default. -\section{Cross-References} -\label{sec:msee} +The horizontal alignment for the name column is obtained with: +\cmddef{glslongextraNameAlign} +This expands to \code{l} by default. -Multi-entry labels may be used in the cross-referencing keys -\gloskey{see} and \gloskey{seealso}. The formatting command will -use: -\begin{definition}[\DescribeMacro\mglsseefirstitem] -\cs{mglsseefirstitem}\marg{label} -\end{definition} -for the first item in the list (if it's a multi-entry) and -\begin{definition}[\DescribeMacro\mglsseeitem] -\cs{mglsseeitem}\marg{label} -\end{definition} -for any subsequent items that are multi-entries. The default -definition of \cs{mglsseeitem} is: -\begin{verbatim} -\newcommand*{\mglsseeitem}[1]{% - \mglsname[all={noindex},setup={hyper=allmain}]{#1}% -} -\end{verbatim} -This switches off indexing, sets the hyperlink to encompass the -entire multi-entry content and uses the \gloskey{name} field. -The default definition of \cs{mglsseefirstitem} is simply -\cs{mglsseeitem}. +For styles that show the \gloskey{description}, that's formatted +with: +\cmddef{glslongextraDescFmt} +for top-level entries, which uses \gls{glossentrydesc} and the +\idx{postdeschook}, and +\cmddef{glslongextraSubDescFmt} +for child entries (which just uses \gls{glslongextraDescFmt}). + +The horizontal alignment for the description column is obtained with: +\cmddef{glslongextraDescAlign} +This expands to +\code{>\marg{\cmd{raggedright}}p\marg{\gls{glsdescwidth}}} by default. +This means ragged-right paragraph style with width given by +\gls{glsdescwidth}. +(See the documentation for the \sty{array} package for information +about this alignment syntax.) If a widest name has been set, +\gls{glsdescwidth} will be calculated according to the best fit for +the given style. + +If you are using \app{bib2gls}, you may be able to use the +\resourceopt{set-widest} option, otherwise to set the widest name, use: +\cmddef{glslongextraSetWidest} +If you have already used \gls{glssetwidest} provided with the \glostyle{alttree} +style, the default widest name will be obtained from that, but note +that only level~0 is supported for the \sty{glossary-longextra} +styles. + +You can update the widest name with: +\cmddef{glslongextraUpdateWidest} +This is like \gls{glslongextraSetWidest} but will only set the new +value if it's wider than the current widest name. + +Although these styles don't support hierarchy, the following is +provided for child entries: +\cmddef{glslongextraUpdateWidestChild} +This does nothing by default. If \gls{glslongextraSubNameFmt} is +redefined to show the child name, then the above command will need +to be redefined to use \gls{glslongextraUpdateWidest}. + +For styles that show the \idx{locationlist}, that's formatted +with: +\cmddef{glslongextraLocationFmt} +for top-level entries. Child \idxpl{locationlist} are formatted +with: +\cmddef{glslongextraSubLocationFmt} +Both of these simply do the \meta{location list} argument. + +The horizontal alignment for the \idx{locationlist} column is obtained with: +\cmddef{glslongextraLocationAlign} +This expands to +\code{>\marg{\cmd{raggedright}}p\marg{\gls{glspagelistwidth}}} by default. +This means ragged-right paragraph style with width given by +\gls{glspagelistwidth}. + +For styles that show the \gloskey{symbol} (in addition to the +\gloskey{name}), that's formatted with: +\cmddef{glslongextraSymbolFmt} +for top-level entries. This simply uses \gls{glossentrysymbol}. +Child entries use: +\cmddef{glslongextraSubSymbolFmt} +which uses \gls{glslongextraSymbolFmt}. + +The horizontal alignment for the symbol column (except for the +\glostyle{long-sym-desc} and \glostyle{long-desc-sym} styles) is obtained with: +\cmddef{glslongextraSymbolAlign} +This expands to \code{c} by default. + +Top-level \idx{group} headings are formatted with: +\cmddef{glslongextraGroupHeading} +The first argument is the total number of columns in the table. For +example, 2 for the \glostyle{long-name-desc} style or 3 for the +\glostyle{long-name-sym-desc} style. The second argument is the +\idx{group}['s] label (not the title). This command does nothing by +default. (If you are using \app{bib2gls}, remember that you need to +use the \switch{group} or \switch{g} switch to support +\idxpl{group}.) + +Sub-level \idxpl{group} are only supported with the \idx{unsrtfam} +(see \sectionref{sec:printunsrtgroups}). When they are supported, +the heading will be formatted with: +\cmddef{glslongextraSubGroupHeading} + +The styles are sub-divided below into the set of elements that are shown in each +column, which may consist of: \gloskey{name}, \gloskey{symbol}, +\gloskey{description} or \idx{locationlist}. There will be +blank cells if any of the corresponding fields have not been set or +if the \idx{locationlist} has been suppressed. + +\subsubsection{Name and Description Only} +\label{sec:longextranamedesc} + +These styles don't display the symbol or \idx{locationlist}, +regardless of whether or not they have been set. In each case, the +style starts with: +\cmddef{glslongextraSetDescWidth} +which updates \gls{glsdescwidth} according to the widest name, +identified with \gls{glslongextraSetWidest}. The column header +text is also taken into account. If a widest name hasn't been set +and the column header is shorter than one or more names, the +description column may be too wide. +The value of \gls{glsdescwidth} is calculated as +$\gls{linewidth}-4\gls{tabcolsep}-W$, where $W$ is the width of +the widest name. + +If you want to set \gls{glsdescwidth} to a specific value, then redefine +\gls{glslongextraSetDescWidth} with the desired length assignment. + +\optiondef{glostyle.long-name-desc} +This has two columns: the name on the left and the description on +the right. +The table header is given by: +\cmddef{glslongextraNameDescTabularHeader} +which shows the column headers with horizontal rules. +The table footer is given by: +\cmddef{glslongextraNameDescTabularFooter} +which just does a horizontal rule. +With \env{longtable}, the table header and footer are set with: +\cmddef{glslongextraNameDescHeader} +which uses the above header and footer commands. + +\optiondef{glostyle.long-desc-name} +This has two columns: the name on the right and the description on +the left. +The table header is given by: +\cmddef{glslongextraDescNameTabularHeader} +which shows the column headers with horizontal rules. +The table footer is given by: +\cmddef{glslongextraDescNameTabularFooter} +which just does a horizontal rule. +With \env{longtable}, the table header and footer are set with: +\cmddef{glslongextraDescNameHeader} +which uses the above header and footer commands. + +\subsubsection{Name, Symbol and Description Only} +\label{sec:longextranamesymdesc} + +These styles don't show the \idx{locationlist}. In each case, the +style starts with: +\cmddef{glslongextraSymSetDescWidth} +which updates \gls{glsdescwidth} according to the widest name, +identified with \gls{glslongextraSetWidest}. This starts by +calculating \gls{glsdescwidth} with \gls{glslongextraSetDescWidth} +and then subtracts the width of the symbol column header text (which +is assumed to be the widest text in that column). + +If you want to set \gls{glsdescwidth} to a specific value, then redefine +\gls{glslongextraSymSetDescWidth} with the desired length assignment. + +\optiondef{glostyle.long-name-desc-sym} +This has three columns: the name on the left, the description in the +middle and the symbol on the right. +The table header is given by: +\cmddef{glslongextraNameDescSymTabularHeader} +which shows the column headers with horizontal rules. +The table footer is given by: +\cmddef{glslongextraNameDescSymTabularFooter} +which just does a horizontal rule. +With \env{longtable}, the table header and footer are set with: +\cmddef{glslongextraNameDescSymHeader} +which uses the above header and footer commands. + +\optiondef{glostyle.long-name-sym-desc} +This has three columns: the name on the left, the symbol in the +middle and the description on the right. +The table header is given by: +\cmddef{glslongextraNameSymDescTabularHeader} +which shows the column headers with horizontal rules. +The table footer is given by: +\cmddef{glslongextraNameSymDescTabularFooter} +which just does a horizontal rule. +With \env{longtable}, the table header and footer are set with: +\cmddef{glslongextraNameSymDescHeader} +which uses the above header and footer commands. + +\optiondef{glostyle.long-sym-desc-name} +This has three columns: the name on the right, the description in the +middle and the symbol on the left. +The table header is given by: +\cmddef{glslongextraSymDescNameTabularHeader} +which shows the column headers with horizontal rules. +The table footer is given by: +\cmddef{glslongextraSymDescNameTabularFooter} +which just does a horizontal rule. +With \env{longtable}, the table header and footer are set with: +\cmddef{glslongextraSymDescNameHeader} +which uses the above header and footer commands. + +\optiondef{glostyle.long-desc-sym-name} +This has three columns: the name on the right, the symbol in the +middle and the description on the left. +The table header is given by: +\cmddef{glslongextraDescSymNameTabularHeader} +which shows the column headers with horizontal rules. +The table footer is given by: +\cmddef{glslongextraDescSymNameTabularFooter} +which just does a horizontal rule. +With \env{longtable}, the table header and footer are set with: +\cmddef{glslongextraDescSymNameHeader} +which uses the above header and footer commands. + +\subsubsection{Name, Description and Location Only} +\label{sec:longextranamedescloc} + +These styles don't display the symbol, regardless of whether or not +the \gloskey{symbol} field has been set. In each case, the +style starts with: +\cmddef{glslongextraLocSetDescWidth} +which updates \gls{glsdescwidth} according to the widest name, +identified with \gls{glslongextraSetWidest}. This starts by +calculating \gls{glsdescwidth} with \gls{glslongextraSetDescWidth} +and then subtracts $2\gls{tabcolsep}-\gls{glspagelistwidth}$. + +If you want to set \gls{glsdescwidth} to a specific value, then redefine +\gls{glslongextraLocSetDescWidth} with the desired length assignment. + + +\optiondef{glostyle.long-name-desc-loc} +This has three columns: the name on the left, the description in the +middle and the \idx{locationlist} on the right. +The table header is given by: +\cmddef{glslongextraNameDescLocationTabularHeader} +which shows the column headers with horizontal rules. +The table footer is given by: +\cmddef{glslongextraNameDescLocationTabularFooter} +which just does a horizontal rule. +With \env{longtable}, the table header and footer are set with: +\cmddef{glslongextraNameDescLocationHeader} +which uses the above header and footer commands. + +\optiondef{glostyle.long-loc-desc-name} +This has three columns: the name on the right, the description in the +middle and the \idx{locationlist} on the left. +The table header is given by: +\cmddef{glslongextraLocationDescNameTabularHeader} +which shows the column headers with horizontal rules. +The table footer is given by: +\cmddef{glslongextraLocationDescNameTabularFooter} +which just does a horizontal rule. +With \env{longtable}, the table header and footer are set with: +\cmddef{glslongextraLocationDescNameHeader} +which uses the above header and footer commands. + +\subsubsection{Name, Description, Symbol and Location} +\label{sec:longextranamedescsymloc} + +These styles show the name, description, symbol and +\idx{locationlist}. In each case, the +style starts with: +\cmddef{glslongextraSymLocSetDescWidth} +which updates \gls{glsdescwidth} according to the widest name, +identified with \gls{glslongextraSetWidest}. This starts by +calculating \gls{glsdescwidth} with \gls{glslongextraSymSetDescWidth} +and then subtracts $2\gls{tabcolsep}-\gls{glspagelistwidth}$. + +If you want to set \gls{glsdescwidth} to a specific value, then redefine +\gls{glslongextraSymLocSetDescWidth} with the desired length assignment. + + +\optiondef{glostyle.long-name-desc-sym-loc} +This has four columns, from left to right: the name, description, +symbol and the \idx{locationlist}. +The table header is given by: +\cmddef{glslongextraNameDescSymLocationTabularHeader} +which shows the column headers with horizontal rules. +The table footer is given by: +\cmddef{glslongextraNameDescSymLocationTabularFooter} +which just does a horizontal rule. +With \env{longtable}, the table header and footer are set with: +\cmddef{glslongextraNameDescSymLocationHeader} +which uses the above header and footer commands. + +\optiondef{glostyle.long-name-sym-desc-loc} +This has four columns, from left to right: the name, +symbol, description and the \idx{locationlist}. +The table header is given by: +\cmddef{glslongextraNameSymDescLocationTabularHeader} +which shows the column headers with horizontal rules. +The table footer is given by: +\cmddef{glslongextraNameSymDescLocationTabularFooter} +which just does a horizontal rule. +With \env{longtable}, the table header and footer are set with: +\cmddef{glslongextraNameSymDescLocationHeader} +which uses the above header and footer commands. + +\optiondef{glostyle.long-loc-sym-desc-name} +This has four columns, from left to right: the \idx{locationlist}, +symbol, description and the name. +The table header is given by: +\cmddef{glslongextraLocationSymDescNameTabularHeader} +which shows the column headers with horizontal rules. +The table footer is given by: +\cmddef{glslongextraLocationSymDescNameTabularFooter} +which just does a horizontal rule. +With \env{longtable}, the table header and footer are set with: +\cmddef{glslongextraLocationSymDescNameHeader} +which uses the above header and footer commands. + +\optiondef{glostyle.long-loc-desc-sym-name} +This has four columns, from left to right: the \idx{locationlist}, +description, symbol and the name. +The table header is given by: +\cmddef{glslongextraLocationDescSymNameTabularHeader} +which shows the column headers with horizontal rules. +The table footer is given by: +\cmddef{glslongextraLocationDescSymNameTabularFooter} +which just does a horizontal rule. +With \env{longtable}, the table header and footer are set with: +\cmddef{glslongextraLocationDescSymNameHeader} +which uses the above header and footer commands. + +\subsubsection{Symbol and Description Only} +\label{sec:longextrasymdesc} + +These are two-column styles designed to show only the symbol and +description. However, if the \gloskey{symbol} isn't set then the +name will be used instead. If this occurs, you may need to change +the width of the description column. + +The horizontal alignment for the symbol column is obtained with: +\cmddef{glslongextraSymbolNameAlign} +which expands to \code{l} by default. Note that this is different +from the alignment used for styles like +\glostyle{long-name-sym-desc}. + +These styles have the entry item number (if \opt{entrycounter} is +on) and the hypertarget anchor (if enabled) in the symbol column +since there's no name shown (unless the symbol is missing). +These are all performed by for +top-level entries by: +\cmddef{glslongextraSymbolTargetFmt} +The symbol is formatted according to \gls{glslongextraSymbolFmt}. +Child entries use: +\cmddef{glslongextraSubSymbolTargetFmt} +Unlike \gls{glslongextraSubNameFmt} this shows the field value +(formatted with \gls{glslongextraSymbolFmt}). + +The following commands use the above if the \gloskey{symbol} field +is set, otherwise they show the name. + +\cmddef{glslongextraSymbolOrName} +Shows the symbol, if set, or the name otherwise, with the target. +Child entries use: +\cmddef{glslongextraSubSymbolOrName} +Shows the symbol with \gls{glslongextraSubSymbolTargetFmt}, if set, +or the name otherwise, with the target. + +In each case, the style starts with: +\cmddef{glslongextraSymNoNameSetDescWidth} +which calculates \gls{glsdescwidth} as +$\gls{linewidth}-4\gls{tabcolsep}-W$, where $W$ is the +width of the symbol column header. Note that this assumes the +content of the symbol column isn't wider than the column header. + +If you want to set \gls{glsdescwidth} to a specific value, then redefine +\gls{glslongextraSymNoNameSetDescWidth} with the desired length assignment. + + +\optiondef{glostyle.long-sym-desc} +The symbol is in the left column (or the name, if the symbol isn't +set). The description is in the right. +The \idx{locationlist} isn't shown. +The table header is given by: +\cmddef{glslongextraSymDescTabularHeader} +which shows the column headers with horizontal rules. +The table footer is given by: +\cmddef{glslongextraSymDescTabularFooter} +which just does a horizontal rule. +With \env{longtable}, the table header and footer are set with: +\cmddef{glslongextraSymDescHeader} +which uses the above header and footer commands. + +\optiondef{glostyle.long-desc-sym} +The symbol is in the right column (or the name, if the symbol isn't +set). The description is in the left. +The \idx{locationlist} isn't shown. +The table header is given by: +\cmddef{glslongextraDescSymTabularHeader} +which shows the column headers with horizontal rules. +The table footer is given by: +\cmddef{glslongextraDescSymTabularFooter} +which just does a horizontal rule. +With \env{longtable}, the table header and footer are set with: +\cmddef{glslongextraDescSymHeader} +which uses the above header and footer commands. + +\subsubsection{Abbreviations Only} +\label{sec:longextraabbr} + +These styles are designed for abbreviations. They display the short +and long forms, rather than the name and description, although these +may happen to match. They are primarily intended for +\idxpl{mini-glossary} or similar summary lists. + +Although these styles don't show the name or description, they still +use some of the name and description settings provided by +\sty{glossary-longextra}. +The column for the short form uses the same alignment as for the +name columns (\gls{glslongextraNameAlign}). The column for the +long form uses the same alignment as for the description columns +(\gls{glslongextraDescAlign}) and has the width set to \gls{glsdescwidth}. +However, the name and description formatting commands or attributes +(such as \gls{glsnamefont}, \catattr{glossnamefont} or +\catattr{glossname}) aren't used as the formatting is left to the +abbreviation style. + +If the \gloskey{short} field hasn't been set, the short column will +show the name instead, and if the \gloskey{long} field hasn't been +set, the long column will show the description instead (using the +same commands as for styles like \glostyle{long-name-desc}, which do +use the associated formatting commands and attributes). + +These styles use the following commands: +\cmddef{glslongextraShortHeader} +The header for the column showing the short form. This is defined as: +\begin{compactcodebox} +\cmd{newcommand}\marg{\gls{glslongextraShortHeader}}\marg{\gls{entryname}} +\end{compactcodebox} + +\cmddef{glslongextraLongHeader} +The header for the column showing the long form. This is defined as: +\begin{compactcodebox} +\cmd{newcommand}\marg{\gls{glslongextraLongHeader}}\marg{\gls{descriptionname}} +\end{compactcodebox} + +\cmddef{glslongextraShortTargetFmt} +This governs the way that the short form should be displayed, +including the target. This is defined as: +\begin{compactcodebox} +\cmd{newcommand}\marg{\gls{glslongextraShortTargetFmt}}[1]\marg{\comment{} + \gls{glsentryitem}\marg{\#1}\gls{glstarget}\marg{\#1}\marg{\marg{\gls{glsxtrshort}\oarg{\glsopt{noindex},\glsoptval{hyper}{false}}\marg{\#1}}}\comment{} + \gls{glsxtrpostnamehook}\marg{\#1}% +} +\end{compactcodebox} +Note that the \idx{postnamehook} is included. + +\cmddef{glslongextraLongFmt} +This governs the way that the long form should be displayed. This is defined as: +\begin{compactcodebox} +\cmd{newcommand}\marg{\gls{glslongextraLongFmt}}[1]\marg{\comment{} + \marg{\gls{glsxtrlong}\oarg{\glsopt{noindex},\glsopt{hyper}{false}}\marg{\#1}}\gls{glspostdescription} +} +\end{compactcodebox} +Note that the \idx{postdeschook} is included. + +\cmddef{glslongextraSubShortTargetFmt} +This governs the way that the short form for child entries should be +displayed, including the target. This is defined as: +\begin{compactcodebox} +\cmd{newcommand}\marg{\gls{glslongextraSubShortTargetFmt}}[2]\marg{\comment{} + \gls{glssubentryitem}\marg{\#2}\gls{glstarget}\marg{\#2}\marg{\marg{\gls{glsxtrshort}\oarg{\glsopt{noindex},\glsoptval{hyper}{false}}\marg{\#2}}}\comment{} + \gls{glsxtrpostnamehook}\marg{\#2}% +} +\end{compactcodebox} + +\cmddef{glslongextraSubLongFmt} +This governs the way that the long form for child entries should be +displayed. This is defined as: +\begin{compactcodebox} +\cmd{newcommand}\marg{\gls{glslongextraSubLongFmt}}[2]\marg{\gls{glslongextraLongFmt}\marg{\#2}} +\end{compactcodebox} + +\cmddef{glslongextraShortNoNameSetDescWidth} +This is used to compute the value of \gls{glsdescwidth} and assumes +that none of the short forms are wider than +\gls{glslongextraShortHeader}. + +\optiondef{glostyle.abbr-short-long} +A two column style. +The short form is in the left column. The long form is in the right. +The \idx{locationlist} isn't shown. + +The table header is given by: +\cmddef{glslongextraShortLongTabularHeader} +which shows the column headers with horizontal rules. + +The table footer is given by: +\cmddef{glslongextraShortLongTabularFooter} +which just does a horizontal rule. +With \env{longtable}, the table header and footer are set with: +\cmddef{glslongextraShortLongHeader} +which uses the above header and footer commands. + +\optiondef{glostyle.abbr-long-short} +A two column style. +The short form is in the right column. The long form is in the left. +The \idx{locationlist} isn't shown. + +The table header is given by: +\cmddef{glslongextraLongShortTabularHeader} +which shows the column headers with horizontal rules. + +The table footer is given by: +\cmddef{glslongextraLongShortTabularFooter} +which just does a horizontal rule. +With \env{longtable}, the table header and footer are set with: +\cmddef{glslongextraLongShortHeader} +which uses the above header and footer commands. + +\glsadd[format=)]{pkg.glossary-longextra}% + +\subsection{\stytext{glossary-topic} package} +\label{sec:topic} -For example, to use the \gloskey{short} or \gloskey{text} fields: -\begin{verbatim} -\renewcommand*{\mglsseeitem}[1]{% - \mglsshort[all={noindex},setup={hyper=allmain}]{#1}% -} -\end{verbatim} +\glsadd[format=(]{pkg.glossary-topic}% +The \inlineglsdef{pkg.glossary-topic} package provides glossary +styles designed for hierarchical \idxpl{glossary} where the top-level +entries are topic titles. This package automatically loads the +\sty{multicol} package. If the \sty{glossary-tree} package is also +loaded then commands like \gls{glssetwidest} can be used on these +styles in much the same way as for the \glostyle{alttree} style. If +a widest value isn't set then these styles behave more like the +\glostyle{tree} style. + +This package provides styles designed for \idxpl{glossary} that are lists +of topics. That is, the top-level entries are considered topic +titles (which may or may not have an associated symbol or +description) and the sub-entries are items within that topic. By +default the \idx{locationlist} isn't shown for the top-level entries but is +shown after the description for sub-entries (unless suppressed with +\opt{nonumberlist} or \resourceoptval{save-locations}{false}). + +The following styles are provided: +\optiondef*{glostyle.topic} +This style is similar to the \glostyle{tree} +style but the indentation doesn't start until the second +sub-item level. The top-level entries have the name displayed +in a larger font with the description following in a new paragraph +(see \exampleref{ex:topicstyle}). +This style doesn't support the \opt{nogroupskip} setting. + +\newcommand{\topicexampledefs}{% +\gls{newglossaryentry}\marg{pictograph}\marg{\gloskeyval{name}{pictograph},^^J + \gloskeyval{description}{picture or symbol representing a word or +phrase}}^^J% +\gls{newglossaryentry}\marg{copy}\marg{\gloskeyval{parent}{pictograph},^^J + \gloskeyval{name}{\cmd{faCopy}},^^J + \gloskeyval{description}{copy}}^^J% +\gls{newglossaryentry}\marg{cut}\marg{\gloskeyval{parent}{pictograph},^^J + \gloskeyval{name}{\cmd{faCut}},^^J + \gloskeyval{description}{cut}}^^J% +\gls{newglossaryentry}{edit}\marg{\gloskeyval{parent}{pictograph},^^J +\gloskeyval{name}{\cmd{faEdit}}, + \gloskeyval{description}{edit}} +\gls{newglossaryentry}{paste}\marg{\gloskeyval{parent}{pictograph},^^J +\gloskeyval{name}{\cmd{faPaste}}, + \gloskeyval{description}{paste}} +\codepar +\gls{newglossaryentry}\marg{symbols}\marg{\gloskeyval{name}{Symbols},^^J + \gloskeyval{description}{mathematical constants or functions}}^^J% +\gls{newglossaryentry}\marg{constant}\marg{\gloskeyval{parent}{symbols},^^J + \gloskeyval{name}{constant},^^J + \gloskeyval{description}{a fixed quantity or numerical value}}^^J% +\gls{newglossaryentry}\marg{pi}\marg{\gloskeyval{parent}{constant},^^J + \gloskeyval{name}{\cmd{ensuremath}\marg{\cmd{pi}}},^^J + \gloskeyval{description}{ratio of the length of the circumference + of a circle to its diameter}}^^J% +\gls{newglossaryentry}\marg{root2}\marg{\gloskeyval{parent}{constant},^^J + \gloskeyval{name}{\cmd{ensuremath}\marg{\cmd{surd}2}},^^J + \gloskeyval{description}{Pythagoras' constant}}^^J% +\gls{newglossaryentry}\marg{function}\marg{\gloskeyval{parent}{symbols},^^J + \gloskeyval{name}{function},^^J + \gloskeyval{description}{a rule that assigns a value to every +element of the domain}}^^J% +\gls{newglossaryentry}\marg{cosx}\marg{\gloskeyval{parent}{function},^^J + \gloskeyval{name}{\cmd{ensuremath}\marg{\cmd{cos}(x)}},^^J + \gloskeyval{description}{cosine}}^^J% +\gls{newglossaryentry}\marg{lnx}\marg{\gloskeyval{parent}{function},^^J + \gloskeyval{name}{\cmd{ensuremath}\marg{\cmd{ln}(x)}},^^J + \gloskeyval{description}{natural logarithm}}^^J% +\gls{newglossaryentry}\marg{parameter}\marg{\gloskeyval{parent}{symbols},^^J + \gloskeyval{name}{parameter},^^J + \gloskeyval{description}{a constant or variable that distinguishes +a specific form}}^^J% +\gls{newglossaryentry}\marg{x}\marg{\gloskeyval{parent}{parameter},^^J + \gloskeyval{name}{\cmd{ensuremath}\marg{x}},^^J + \gloskeyval{description}{the abscissa value}}^^J% +\gls{newglossaryentry}\marg{y}\marg{\gloskeyval{parent}{parameter},^^J + \gloskeyval{name}{\cmd{ensuremath}\marg{y}},^^J + \gloskeyval{description}{the ordinate value}} +\gls{newglossaryentry}\marg{z}\marg{\gloskeyval{parent}{parameter},^^J + \gloskeyval{name}{\cmd{ensuremath}\marg{z}},^^J + \gloskeyval{description}{the applicate value}} +} +\begin{resultbox}[float] +\createexample*[label={ex:topicstyle}, + title={The \optfmt{topic} style}, + description={Example document demonstrating the topic style}] +{% +\cmd{usepackage}\marg{fontawesome}^^J% +\cmd{usepackage}\oarg{\opt{postdot},\optval{stylemods}{topic},\optval{style}{\glostyle{topic}}}\marg{glossaries-extra}^^J% +\topicexampledefs +} +{\gls{printunsrtglossaries}} +\end{resultbox} -A multi-entry label may also be used in the \gloskey{alias} key. The -hyperlink target will be the target for the main entry. For example: -\begin{verbatim} -\multiglossaryentry{cbot}{clostridium,botulinum} -\newglossaryentry{botox}{name=botox,description={},alias={cbot}} -\end{verbatim} -In this case \verb|\gls{botox}| will hyperlink to the -\texttt{botulinum} target. +\optiondef*{glostyle.topicmcols} +This style is like the \glostyle{topic} +style but the sub-entries are placed inside a \env{multicols} +environment (unlike styles such as \glostyle{mcoltree} where the +entire glossary content is within a single \env{multicols} +environment). The environment name is supplied in the value of +the command: +\cmddef{glstopicColsEnv} +This defaults to \code{multicols}. You can change this to the +starred form. For example: +\begin{codebox} +\cmd{renewcommand}\marg{\gls{glstopicColsEnv}}\marg{multicols*} +\end{codebox} +The number of columns is given by the command: +\cmddef{glstopicCols} +This expands to 2, by default. This style is demonstrated in +\exampleref*{ex:topicmcolsstyle}. + +\begin{resultbox}[float] +\createexample*[label={ex:topicmcolsstyle}, + title={The \optfmt{topicmcols} style}, + description={Example document demonstrating the topicmcols style}] +{% +\cmd{usepackage}\marg{fontawesome}^^J% +\cmd{usepackage}\oarg{\opt{postdot},\optval{stylemods}{topic},\optval{style}{\glostyle{topicmcols}}}\marg{glossaries-extra}^^J% +\topicexampledefs +} +{\gls{printunsrtglossaries}} +\end{resultbox} + + +Both styles can have a widest name set like the \glostyle{alttree} +style, using the commands provided by \sty{glossary-tree} and +\sty{glossaries-extra-stylemods} or with the +\resourceopt{set-widest} resource option. If a widest name is set, +then the sub-entry names will be placed in a box of the given width +otherwise they won't be placed in a box. In +\exampleref{ex:topicmcolsstylewidest}, the widest names have been +set for level~1 and level~2 using: +\begin{codebox} +\gls{glssetwidest}\oarg{1}\marg{parameter} +\gls{glssetwidest}\oarg{2}\marg{\gls{glsentryname}\marg{cosine}} +\end{codebox} +Note that this doesn't change the indentation at the start of the +level~2 items to match the width of the level~1 widest name. + +\begin{resultbox}[float] +\createexample*[label={ex:topicmcolsstylewidest}, + title={The \optfmt{topicmcols} style with the widest name set}, + description={Example document demonstrating the topicmcols style}] +{% +\cmd{usepackage}\marg{fontawesome}^^J% +\cmd{usepackage}\oarg{\opt{postdot},\optval{stylemods}{topic},\optval{style}{\glostyle{topicmcols}}}\marg{glossaries-extra}^^J% +\topicexampledefs^^J% +\gls{glssetwidest}\oarg{1}\marg{parameter}^^J% +\gls{glssetwidest}\oarg{2}\marg{\gls{glsentryname}\marg{cosine}} +} +{\gls{printunsrtglossaries}} +\end{resultbox} -\begin{important} -Any multi-entries used in the cross-referencing keys must be defined -before the glossary is displayed. There is some support for -\pkgopt[true]{docdef} but not for the other \pkgopt{docdef} settings. -\end{important} -\section{Additional Commands} -\label{sec:multiextras} +Both of the above styles use the following commands. +\cmddef{glstopicParIndent} +This command is a length that's used for the paragraph indentation +in any multi-paragraph description for top-level entries, but not +for the first paragraph (at the start of the description) which +isn't indented. -You can test if a label represents a multi-entry using: -\begin{definition}[\DescribeMacro\glsxtrifmulti] -\cs{glsxtrifmulti}\marg{label}\marg{true}\marg{false} -\end{definition} -The following command will expand to the main entry label for -the given multi-entry label: -\begin{definition}[\DescribeMacro\glsxtrmultimain] -\cs{glsxtrmultimain}\marg{multi-label} -\end{definition} -This will expand to nothing if the supplied \meta{multi-label} -hasn't been defined as a multi-entry. Similarly, for the complete -label list: -\begin{definition}[\DescribeMacro\glsxtrmultilist] -\cs{glsxtrmultilist}\marg{multi-label} -\end{definition} - -To iterate over all the list of all elements: -\begin{definition}[\DescribeMacro\mglsforelements] -\cs{mglsforelements}\marg{multi-label}\marg{cs}\marg{body} -\end{definition} -This defines \meta{cs} to the current element label on each -iteration of the loop, which can be used to reference the label in -\meta{body}. This internally uses \cs{@for} (patched by the -\sty{xfor} package). - -There is a similar command that skips the main element: -\begin{definition}[\DescribeMacro\mglsforotherelements] -\cs{mglsforotherelements}\marg{multi-label}\marg{cs}\marg{body} -\end{definition} - -The total number of elements can be obtained with: -\begin{definition}[\DescribeMacro\glsxtrmultitotalelements] -\cs{glsxtrmultitotalelements}\marg{multi-label} -\end{definition} -This expands to the number, if \meta{multi-label} is defined, -otherwise expands to nothing. - -The index of the main element can be obtained with: -\begin{definition}[\DescribeMacro\glsxtrmultimainindex] -\cs{glsxtrmultimainindex}\marg{multi-label} -\end{definition} -This expands to the index, if \meta{multi-label} is defined, -otherwise expands to nothing. Indexing starts from 1 for the first -element. The index of the final non-main element can be obtained -with: -\begin{definition}[\DescribeMacro\glsxtrmultilastotherindex] -\cs{glsxtrmultilastotherindex}\marg{multi-label} -\end{definition} - -The \cs{multiglossaryentry} command will write the label information -to the \filetype{aux} file using: -\begin{definition}[\DescribeMacro\writemultiglossentry] -\cs{writemultiglossentry}\marg{options}\marg{multi-label}\marg{main-label}\marg{list} -\end{definition} -This is will write the following line to the \filetype{aux} file: -\begin{definition} -\cs{@glsxtr@multientry}\marg{options}\marg{multi-label}\marg{main-label}\marg{list} -\end{definition} -This is provided to support \pkgopt[true]{docdef} and also -for the benefit of any tools that require the -information (such as \gls{bib2gls} or autocompletion tools). -If it's not required and causes too much clutter, it can -be disabled by redefining \cs{writemultiglossentry} to do nothing. +\cmddef{glstopicSubIndent} +This command is a length that's used to calculate the hanging +indentation for sub-entries. The level~1 sub-entries don't indent +the name. Level~$n$ sub-entries have the name indented by +$(n-1)\times\gls{glstopicSubIndent}$. The hanging indent depends +on whether or not a widest name has been set for the level. -\section{\headingapp{bib2gls}} -\label{sec:mbib2gls} +There is also a length for additional indentation +used in the second paragraph onwards for child entries with +multi-paragraph descriptions: +\cmddef{glstopicSubItemParIndent} +This is initialised to \gls{parindent} when \sty{glossary-topic} is +loaded. -In the \gls{bib2gls} v2.9+ user manual, these multi-entry sets are -referred to as \qt{compound entries} or \qt{compound sets} to -differentiate them from \gls{bib2gls}['s] multi-entry types (such as -\texttt{@dualentry}). +\cmddef{glstopicInit} +This hook is used at the start of the glossary. It does nothing by +default. -Each instance of one of the \cs{mgls}-like commands is written to -the \filetype{aux} file and so can be picked up by \gls{bib2gls} -(at least version 2.9). The resource options can be used to -determine whether or not to consider the other (non-main) elements -to be dependent on the main element. +Although the styles don't support letter \idxpl{group} by default, if you +have many topics (top-level entries) and you feel that it would help +the reader to divide them up into headed letter groups, you can +redefine: +\cmddef{glstopicGroupHeading} +This does nothing by default. If you want to redefine it, you can +fetch the title corresponding to the group label with +\gls{glsxtrgetgrouptitle}. For example: +\begin{codebox} +\cmd{renewcommand}*\marg{\gls{glstopicGroupHeading}}[1]\marg{\comment{} + \gls{glsxtrgetgrouptitle}\marg{\#1}\marg{\cmd{thisgrptitle}}\comment{} + \cmd{section}*\marg{\cmd{thisgrptitle}}\comment{} +} +\end{codebox} +Remember that if you are using \app{bib2gls}, you will need the +\switch{group} or \switch{g} switch to support \idxpl{group} (see +\sectionref{sec:printunsrtgroups}). + +Sub-\idxpl{group} are only +available with \app{bib2gls} and the \resourceopt{group-level} +option. If they are supported, sub-group headings are formatted +according to: +\cmddef{glstopicSubGroupHeading} +This formats the sub-group heading. Note that unlike +\gls{glstopicGroupHeading} this command does actually format the +sub-group heading by default. This means that it you use +\resourceoptval{group-level}{all}, the top-level groups won't be +displayed, but the sub-groups will be. + +Top-level entries are formatted according to: +\cmddef{glstopicItem} +This formats the name and (if provided) the symbol. The description +(if set) will follow in a new paragraph. At the start of +\gls{glstopicItem}, a vertical space is added with: +\cmddef{glstopicPreSkip} +which defaults to \csfmt{medskip}. There is then a hook: +\cmddef{glstopicMarker} +which does nothing by default, but may be redefined. For example, +to add a line to the table of contents. +The name and symbol are set in the form of a title using: +\cmddef{glstopicTitle} +This uses \gls{Glossentryname} which uses \idx{sentencecase}. +If there's a symbol, this is added in parentheses. +Both name and symbol (if present) are encapsulated by: +\cmddef{glstopicTitleFont} +This uses a bold, large font by default. -With \gls{bib2gls}, you can either define the compound entries in -the document with \cs{multiglossaryentry} (or -\cs{providemultiglossaryentry}) or you can use the \texttt{@compoundset} -entry type in a \filetype{bib} file. Whichever method you use, -remember that the entries that form the elements of the set must be -defined first. See the \gls{bib2gls} manual (v2.9+) for further details. +If the entry has the description key set (tested with +\gls{ifglshasdesc}) then a paragraph break is inserted followed by: +\cmddef{glstopicMidSkip} +which defaults to \csfmt{smallskip}. This is followed by the +description which is formatted according to: +\cmddef{glstopicDesc} +This just does \code{\gls{Glossentrydesc}\marg{entry-label}} followed +by the \idx{postdeschook}. +There is then a paragraph break followed by: +\cmddef{glstopicPostSkip} +regardless of whether or not the description was +displayed. This defaults to \csfmt{smallskip}. This is then followed +by: +\cmddef{glstopicLoc} +which may be used to display the \idx{locationlist}, but does nothing by +default. -You can use the resource option \optfmt{compound-adjust-name} -to replace the \gloskey{name} field of the main entry to: -\begin{definition}[\DescribeMacro\glsxtrmultientryadjustedname] -\cs{glsxtrmultientryadjustedname}\marg{sublist1}\marg{name}\marg{sublist2}\marg{label} -\end{definition} -where \meta{label} is the label identifying the compound set, -\meta{name} was the value of the \gloskey{name} before adjustment, -\meta{sublist1} is the sub-list of other element labels -before the main element (empty if the main element is the first -element in the list), and \meta{sublist2} is the sub-list of -other elements after the main element (empty if the main label is -the final element). +The sub-entries first set up the paragraph and hanging indentations +using: +\cmddef{glstopicAssignSubIndent} +This uses: +\cmddef{glstopicAssignWidest} +to determine if a widest name has been set for the given level. -This command is defined in \sty{glossaries-extra-bib2gls}, which is -automatically loaded with \pkgopt[only]{record} and -\pkgopt[nameref]{record}. Case-changing versions of this command are -also available. First letter uppercase: -\begin{definition}[\DescribeMacro\Glsxtrmultientryadjustedname] -\cs{Glsxtrmultientryadjustedname}\marg{sublist1}\marg{name}\marg{sublist2}\marg{label} -\end{definition} -Title case: -\begin{definition}[\DescribeMacro\GlsXtrmultientryadjustedname] -\cs{GlsXtrmultientryadjustedname}\marg{sublist1}\marg{name}\marg{sublist2}\marg{label} -\end{definition} -All uppercase: -\begin{definition}[\DescribeMacro\GLSxtrmultientryadjustedname] -\cs{GLSxtrmultientryadjustedname}\marg{sublist1}\marg{name}\marg{sublist2}\marg{label} -\end{definition} - -Note that this command doesn't take the prefix or suffix into -account (see \sectionref{sec:mglsfixes}). +The sub-entry has its information displayed using: +\cmddef{glstopicSubItem} +This encapsulates the name with: +\cmddef{glstopicSubNameFont} +By default this just uses \csfmt{textbf}. This is followed by: +\cmddef{glstopicSubItemSep} +which defaults to \csfmt{quad}. The name and separator are +passed in the \meta{text} argument of: +\cmddef{glstopicSubItemBox} +If a widest name was set for the given level, this will +put \meta{text} inside a box of that width otherwise it just does +\meta{text}. -The separator between each element in the sub-lists is produced -with: -\begin{definition}[\DescribeMacro\glsxtrmultientryadjustednamesep] -\cs{glsxtrmultientryadjustednamesep}\marg{pre label}\marg{post label} -\end{definition} -The default definition just uses \cs{glscombinedfirstsepfirst}. +This is followed by the symbol in parentheses if set. Then, if the +description is set, the description and \idx{postdeschook} are +displayed followed by: +\cmddef{glstopicSubPreLocSep} +(This command isn't used if the description isn't set.) -The separator between the last element of \meta{sublist1} and the -main element is produced with: -\begin{definition}[\DescribeMacro\glsxtrmultientryadjustednamepresep] -\cs{glsxtrmultientryadjustednamepresep}\marg{pre label}\marg{post label} -\end{definition} -Similarly for the separator between the main element and the first -element of \meta{sublist2}: -\begin{definition}[\DescribeMacro\glsxtrmultientryadjustednamepostsep] -\cs{glsxtrmultientryadjustednamepostsep}\marg{pre label}\marg{post label} -\end{definition} -These both default to \cs{glsxtrmultientryadjustednamesep}. +Finally the location list is displayed using: +\cmddef{glstopicSubLoc} +which just does \meta{location} by default. +\glsadd[format=)]{pkg.glossary-topic}% + +\subsection{\stytext{glossary-table} package} +\label{sec:table} + +\glsadd[format=(]{pkg.glossary-table}% +The \inlineglsdef{pkg.glossary-table} package is new to version 1.49 +and is still experimental. It automatically loads +\sty{glossary-longbooktabs}. + +It doesn't provide any general purpose +styles, but instead provides one highly customized style +\inlineglsdef{opt.glostyle.table} designed to +work with a supplied command: +\cmddef{printunsrttable} +The aim of this command is to show the glossary as a +\env{longtable}, where the caption is what would normally be the +glossary header (\printglossopt{title}). What's normally the +table of contents title (\printglossopt{toctitle}) will be +added to the list of tables instead. + +This internally uses \gls{printunsrtglossary} with the style set to +\glostyle{table} and is intended for use with \app{bib2gls}. +It supports up to 1 \idx{hierarchicallevel}, but you will need the +\resourceopt{save-child-count} resource option if you want the +level~1 sub-entries to show. Deeper level entries are omitted. +If you want any additional filtering, you can redefine: +\cmddef*{glstableiffilter} +This command should do \meta{true} if the entry identified by +\meta{entry-label} should be skipped, otherwise it should do +\meta{false}. For example, the following will filter entries that +have the category set to \cat{general}: +\begin{codebox} +\cmd{renewcommand}\marg{\gls{glstableiffilter}}[1]{\comment{} + \gls{glsifcategory}\marg{\#1}\marg{general}} +\end{codebox} +Note that if this command is redefined to do neither \meta{true} nor +\meta{false} or does both, it will interfere with the width +calculations if \glstableopt{par} isn't set to the default +\glstableoptval{par}{false}. + +Styles like \gloskey{long} create a \env{longtable} with one entry +per row. The \glostyle{table} style allows multiple entries per row. +A \qt{block} indicates a block of columns used to format one entry. One row of +the table contains multiple blocks. + +An extra field may be added with the \glstableopt{other} +key. If this value is empty, then no extra field will be added. +Block styles that show the description will put this other field in +before the description, in the same column as the description. +Block styles that don't show the description, will put the other +field after the name, in the same column as the name. +Some block styles, such as \glstableblockstyle{symbol-name} +and \glstableblockstyle{symbol-other} put +the other field in its own column. + +The optional argument may have the options that can typically be +passed to \gls{printunsrtglossary}, except that the +\printglossopt{nogroupskip}, +\printglossopt{nonumberlist} and \printglossopt{style} options won't +have an effect. If you want the \idx{locationlist}, it can simply be +obtained from the \gloskey{location} field in the appropriate style hook. + +Additionally, the following options may also be used. + +\optiondef{printunsrttab.blocks} +The value is the number of blocks in the table. +The total number of columns in the table will be this value +multiplied by the number of columns per block, which is determined +by the block style. For example, the \glstableblockstyle{name-desc} +has two columns, so if there are three blocks then there will be a +total of six columns. + +\optiondef{printunsrttab.header} +A boolean option to determine whether or not to show the header row. +The header text is produced with one of the following commands: +\cmddef*{glstablenameheader} +Expands to the header for the name column. Just uses \gls{entryname} +by default. -The \meta{name} is encapsulated with: -\begin{definition}[\DescribeMacro\glsxtrmultientryadjustednamefmt] -\cs{glsxtrmultientryadjustednamefmt}\marg{text} -\end{definition} -This just does its argument by default. -If \meta{sublist1} is empty for the first letter upper case -version, then \meta{name} is encapsulated with: -\begin{definition}[\DescribeMacro\Glsxtrmultientryadjustednamefmt] -\cs{Glsxtrmultientryadjustednamefmt}\marg{text} -\end{definition} -This does \ics{makefirstuc}\marg{text} by default. -For the title case version, the name is encapsulated with: -\begin{definition}[\DescribeMacro\GlsXtrmultientryadjustednamefmt] -\cs{GlsXtrmultientryadjustednamefmt}\marg{text} -\end{definition} -This uses \cs{glscapitalisewords} (provided by \styfmt{glossaries} -v4.48+) if defined or \cs{capitalisewords} otherwise. -The all uppercase version uses: -\begin{definition}[\DescribeMacro\GLSxtrmultientryadjustednamefmt] -\cs{GLSxtrmultientryadjustednamefmt}\marg{text} -\end{definition} -This uses \cs{mfirstucMakeUppercase} by default. +\cmddef*{glstabledescheader} +Expands to the header for the description column for block styles +like \glstableblockstyle{name-desc} and +\glstableblockstyle{name-symbol-desc}. Just uses +\gls{descriptionname} by default. -Each element label in the sub-lists is encapsulated with: -\begin{definition}[\DescribeMacro\glsxtrmultientryadjustednameother] -\cs{glsxtrmultientryadjustednameother}\marg{label} -\end{definition} -This does \cs{glsentryname}\marg{label} by default. -For the first letter uppercase version (where -\meta{sublist1} isn't empty), then the element label is encapsulated -with: -\begin{definition}[\DescribeMacro\Glsxtrmultientryadjustednameother] -\cs{Glsxtrmultientryadjustednameother}\marg{label} -\end{definition} -This does \cs{Glsentryname}\marg{label} by default. -The title case version uses: -\begin{definition}[\DescribeMacro\GlsXtrmultientryadjustednameother] -\cs{GlsXtrmultientryadjustednameother}\marg{label} -\end{definition} -This does \ics{glsentrytitlecase}\marg{label}\verb|{name}| by +\cmddef*{glstablesymbolheader} +Expands to the header for the symbol column for block styles like +\glstableblockstyle{name-symbol} and +\glstableblockstyle{name-symbol-desc}. Just uses \gls{symbolname} by default. -The all uppercase version uses: -\begin{definition}[\DescribeMacro\GLSxtrmultientryadjustednameother] -\cs{GLSxtrmultientryadjustednameother}\marg{label} -\end{definition} -This is defined as: -\begin{verbatim} -\newcommand*{\GLSxtrmultientryadjustednameother}[1]{% - \mfirstucMakeUppercase{\glsentryname{#1}}} -\end{verbatim} - -\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.) +\cmddef*{glstableotherheader} +Expands to the header for the other column. The default definition +applies \gls{MFUsentencecase} to the other field label. + +\optiondef{printunsrttab.rules} +A boolean option to determine whether or not to show the horizontal +rules (provided by \sty{booktabs}). If used with +\glstableoptval{header}{true}, there will be a rule above and below +the header row. If used with +\glstableoptval{header}{false}, there will only be one rule at the +top of the table. In both cases, there will be a rule at the bottom +of the table. + +\optiondef{printunsrttab.blocksep} +The value is inserted into the alignment specifier list between +blocks. For example, the default value of the pipe character will +insert a vertical line. Set this value to empty to remove it. + +\optiondef{printunsrttab.par} +Indicates whether or not the columns should be paragraphs. The value +may be one of: \optfmt{false}, \optfmt{justified} or +\optfmt{ragged}. The default \glstableoptval{par}{false} will just +use one of the column specifiers \code{l}, \code{r} or \code{c}. +The other values will use the \code{p} specifier, in which case +the column widths will be calculated. + +\optiondef{printunsrttab.other} +This should be set to the \idx{internalfieldlabel} of the other +field or to empty if no other field should be included. + +\optiondef{printunsrttab.init} +The \meta{code} will be added shortly before +\gls{printunsrtglossary} is called and any local changes will be +scoped. + +\optiondef{printunsrttab.block-style} +The block style, which may be one of the following: + +\glstableblockstyledef{name-desc} +Blocks have two columns with the name in the first column of the +block and the description in the second. This is the default style. + +\glstableblockstyledef{desc-name} +Blocks have two columns with the description in the first column of the +block and the name in the second. + +\glstableblockstyledef{name-symbol} +Blocks have two columns with the name in the first column of the +block and the symbol in the second. + +\glstableblockstyledef{symbol-name} +Blocks have two columns with the symbol in the first column of the +block and the name in the second. + +\glstableblockstyledef{name-symbol-desc} +Blocks have three columns with the name in the first column of the +block, the symbol in the second, and the description in the third. + +\glstableblockstyledef{name-desc-symbol} +Blocks have three columns with the name in the first column of the +block, the description in the second, and the symbol in the third. + +\glstableblockstyledef{name} +Blocks have one column with the name followed by the symbol and +description in parentheses, if they have been set. + +\glstableblockstyledef{name-other} +This is like \glstableblockstyle{name-desc} but puts the other field +in the second column. The description and symbol aren't shown. +Note that you will need to set the \glstableopt{other} key to the +required field, otherwise you will end up with an empty column. + +\glstableblockstyledef{other-name} +This is like \glstableblockstyle{desc-name} but puts the other field +in the second column. The description and symbol aren't shown. +Note that you will need to set the \glstableopt{other} key to the +required field, otherwise you will end up with an empty column. + +\glstableblockstyledef{symbol-other} +This is like \glstableblockstyle{name-other} but shows the +symbol instead of the name. + +\glstableblockstyledef{other-symbol} +This is like \glstableblockstyle{other-name} but shows the +symbol instead of the name. + +The block styles alter the way the \glostyle{table} style sets up +the \env{longtable} environment and the way that the entries are +formatted. The top level \idx{glossarystyle} command +\gls{glossentry} is defined to do the block according to the +designated block style and then it will follow the block with the +child entries, if the \glosfield{childlist} field has been set. + +\begin{information} +The \gls{subglossentry} command is redefined to do nothing, but it +won't be used as the child entries are all filtered out. If you +don't use the \resourceopt{save-child-count} resource option, no +child entries will be shown. There's no recursive descent down the +\idxpl{hierarchicallevel}. +\end{information} + +This means that the child entries will be listed at the end of the +last column in the block. This can make the column quite wide. +The child names aren't displayed by default but supports the +\opt{subentrycounter} option. The child entries are +listed in a \env{tabular} environment, which means they are +contained in the same row as their parent and can't be broken across +a page. + +\begin{warning} +The remaining commands are undocumented as they are liable to +change. +\end{warning} + +The following example uses the \glstableblockstyle{name} block style, +which only has one column per block. The name is followed by the +description in parentheses (if set), which is then followed by the +child list. I redefined \gls{glsnamefont} to make the name appear in +bold, to highlight it. +I've used the \glstableoptval{par}{ragged} option, +otherwise the table will be too wide to fit the page. +\begin{codebox} +\cmd{usepackage} + [\opt{record},\optval{stylemods}{table},\opt{subentrycounter}] + \marg{glossaries-extra} +\codepar +\gls{GlsXtrLoadResources}\oarg{ + \comment{entries in \file{example-glossaries-childnoname.bib}:} + \resourceoptval{src}{example-glossaries-childnoname}, + \resourceoptval{selection}{all}, + \resourceoptval{save-child-count}} +\cbeg{document} +\gls{printunsrttable} + \oarg{ + \glstableoptval{block-style}{name},\glstableoptval{par}{ragged}, + \printglossoptvalm{preamble}{Some preamble text}, + \printglossoptvalm{postamble}{Some postamble text}, + \glstableoptvalm{init}{\comment{} + \cmd{let}\gls{glsnamefont}\cmd{textbf} + \cmd{def}\gls{glstablenameheader}\marg{Summary}\comment{} + } + } +\cend{document} +\end{codebox} +This creates a table with two entries per row. +\begin{resultbox} +\createexample*[label={ex:table}, +title={Two entries per row with \cmd{printunsrttable}}, +description={Example document with a tabular glossary with two +entries per row. The child list is in the same cell as the parent.}, +arara={pdflatex,bib2gls,pdflatex,pdfcrop} +] +{% +\cmd{usepackage}[record,stylemods=table,subentrycounter]\marg{glossaries-extra} +\codepar +\gls{GlsXtrLoadResources}\oarg{^^J + \comment{entries in example-glossaries-childnoname.bib:} + \resourceoptval{src}{example-glossaries-childnoname},^^J + \resourceoptval{selection}{all},^^J + \resourceoptval{save-child-count}}^^J% +} +{% +\gls{printunsrttable}^^J% + \oarg{^^J + block-style=name,par=ragged,^^J + preamble=\marg{Some preamble text},^^J + postamble=\marg{Some postamble text},^^J + init=\marg{\comment{} + \cmd{let}\gls{glsnamefont}\cmd{textbf} + \cmd{def}\gls{glstablenameheader}\marg{Summary}\comment{} + }^^J% + } +} +\end{resultbox} +Note that each row is as deep as the entry with the most children. +So where a row has one column with two children and another with +seven, the row is deep enough to accommodate the seven child +entries, which leaves a gap below the smaller list of two children. -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}. +\glsadd[format=)]{pkg.glossary-table}% -For multi-entry categories, see \sectionref{sec:multiglscategory}. +\chapter{Accessibility Support} +\label{sec:accsupp} -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. +The \sty{glossaries} package comes with a supplementary package +\sty{glossaries-accsupp} that helps provide accessibility support. +The \sty{glossaries-extra} package provides additional support, but +only if the \sty{glossaries-accsupp} package has already been loaded +when the relevant commands are defined. The best and simplest way to do this +is through the \opt{accsupp} package option. + +See the \ctanmirrornofn{macros/latex/contrib/glossaries/glossaries-user.html\#sec:accsupp}{\qt{Accessibility +Support}} chapter in the \sty{glossaries} user +guide for further information about \sty{glossaries-accsupp}. + +\section{Abbreviations} +\label{sec:accessabbr} + +The accessibility fields relating to abbreviations are +\gloskey{shortaccess}, \gloskey{shortpluralaccess}, +\gloskey{longaccess} and \gloskey{longpluralaccess}. These provide +the replacement text for the corresponding \gloskey{short}, +\gloskey{shortplural}, \gloskey{long} and \gloskey{longplural} +fields. The \gloskey{access} field provides the replacement text for +the \gloskey{name} field. + +Some of these accessibility fields are automatically assigned by +\gls{newabbreviation} if they haven't been set. + +\cmddef{glsxtrassignactualsetup} +This command is used to locally redefine common formatting commands +so that they can be stripped to obtain only the text. You can add +additional commands with \gls{appto}. For example, the following +eccentric example has some strange styling in the abbreviation: +\begin{codebox} +\gls{newabbreviation}\marg{foo}\marg{f\gls+{textsuperscript}\marg{o}\gls+{textsubscript}\marg{o}}\marg{furry old otters} +\end{codebox} +If an accessibility field is being automatically assigned with text +obtained from the short value, then the subscript and superscript +commands will need to be stripped. These need to be locally +redefined to just do their arguments: +\begin{codebox} +\gls{appto}\gls{glsxtrassignactualsetup}\marg{\% + \gls+{letcs}\marg{\gls{textsuperscript}}\marg{@firstofone}\% + \gls{letcs}\marg{\gls{textsubscript}}\marg{@firstofone}\% +} +\end{codebox} + +The attributes that specifically relate to accessibility in +abbreviations are listed below. The \qt{actual short value} means +the value obtained from the \gloskey{short} value after any markup +commands have have locally redefined using +\gls{glsxtrassignactualsetup}. The actual short value may then be +modified by these attributes. Similarly, for the \qt{actual long value}. + +Finally, if \gloskey{shortaccess} hasn't already been set, it will be set to: +\begin{codebox} +\gls{glsdefaultshortaccess}\margm{actual long}\margm{actual short} +\end{codebox} +(with \gls{glsdefaultshortaccess} expanded). This command is +provided by \sty{glossaries-accsupp} and is defined to do just +\margm{actual long}. It was redefined by \sty{glossaries-extra} +v1.42 to do \code{\margm{actual long} (\margm{actual short})}, but +has been reverted back to its original definition in v1.49. + +\optiondef{catattr.accessinsertdots} +If the \gloskey{shortaccess} key hasn't been set then this +attribute will be checked. If true, the actual short value +will have dots inserted (as per \catattr{insertdots}). Note that if +this attribute hasn't been set but \catattr{insertdots} is true (and the +\gloskey{shortaccess} key hasn't been set), then the actual short value +will also have dots inserted. + +\optiondef{catattr.accessaposplural} +If the \gloskey{shortpluralaccess} key hasn't been set then this +attribute will be checked. If true, the actual short plural value +will have the apostrophe suffix (similar to \catattr{aposplural} but +using \gls{glsxtrabbrvpluralsuffix} instead of +\gls{abbrvpluralsuffix}). Note that if this attribute hasn't been +set but \catattr{aposplural} is true (and the +\gloskey{shortpluralaccess} key hasn't been set), then the actual +short plural value will also have the apostrophe suffix. + +\optiondef{catattr.accessnoshortplural} +If the \gloskey{shortpluralaccess} key hasn't been set and the +\catattr{accessaposplural} attribute hasn't been set, then this +attribute will be checked. If true, the actual short plural value +will be the same as the singular (as \catattr{noshortplural}). Note +that if this attribute hasn't been set but \catattr{noshortplural} +is true (and the \gloskey{shortpluralaccess} key hasn't been set), then +the actual short plural value will also be the singular form. + +\optiondef{catattr.nameshortaccess} +If the \gloskey{access} key hasn't been set and this attribute is +true, then the \gloskey{access} field will be set to the same as the +\gloskey{shortaccess}. + +\optiondef{catattr.textshortaccess} +If the \gloskey{textaccess} key hasn't been set and this attribute is +true, then the \gloskey{textaccess} field will be set to the same as the +\gloskey{shortaccess}. Additionally, if the \gloskey{pluralaccess} +key hasn't been set, then it will be set to the same as the +\gloskey{shortpluralaccess} value. + +\optiondef{catattr.firstshortaccess} +If the \gloskey{firstaccess} key hasn't been set and this attribute is +true, then the \gloskey{firstaccess} field will be set to the same as the +\gloskey{shortaccess}. Additionally, if the \gloskey{firstpluralaccess} +key hasn't been set, then it will be set to the same as the +\gloskey{shortpluralaccess} value. + +\section{Accessibility Wrappers} +\label{sec:glsaccessfield} + +The glossary style commands such as \gls{glossentryname} +incorporate accessibility support by using the +\csfmt{glsaccess\meta{field}} commands instead of the corresponding +\csfmt{glsentry\meta{field}} commands. + +If the \sty{glossaries-accsupp} package hasn't been loaded or if the +relevant accessibility field hasn't been set, these commands +simply do the corresponding \csfmt{glsentry\meta{field}} command. + +\cmddef{glsaccessname} +This shows the \gloskey{name} field encapsulated with +\gls{glsnameaccessdisplay} or just +\gls{glsentryname}\margm{entry-label}. + +\cmddef{Glsaccessname} +As above but \idx{sentencecase}. + +\cmddef{GLSaccessname} +As above but \idx{allcaps}. + +\cmddef{glsaccesstext} +This shows the \gloskey{text} field encapsulated with +\gls{glstextaccessdisplay} or just +\gls{glsentrytext}\margm{entry-label}. + +\cmddef{Glsaccesstext} +As above but \idx{sentencecase}. + +\cmddef{GLSaccesstext} +As above but \idx{allcaps}. + +\cmddef{glsaccessplural} +This shows the \gloskey{plural} field encapsulated with +\gls{glspluralaccessdisplay} or just +\gls{glsentryplural}\margm{entry-label}. + +\cmddef{Glsaccessplural} +As above but \idx{sentencecase}. + +\cmddef{GLSaccessplural} +As above but \idx{allcaps}. + +\cmddef{glsaccessfirst} +This shows the \gloskey{first} field encapsulated with +\gls{glsfirstaccessdisplay} or just +\gls{glsentryfirst}\margm{entry-label}. + +\cmddef{Glsaccessfirst} +As above but \idx{sentencecase}. + +\cmddef{GLSaccessfirst} +As above but \idx{allcaps}. + +\cmddef{glsaccessfirstplural} +This shows the \gloskey{firstplural} field encapsulated with +\gls{glsfirstpluralaccessdisplay} or just +\gls{glsentryfirstplural}\margm{entry-label}. + +\cmddef{Glsaccessfirstplural} +As above but \idx{sentencecase}. + +\cmddef{GLSaccessfirstplural} +As above but \idx{allcaps}. -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: +\cmddef{glsaccesssymbol} +This shows the \gloskey{symbol} field encapsulated with +\gls{glssymbolaccessdisplay} or just +\gls{glsentrysymbol}\margm{entry-label}. -\begin{description} +\cmddef{Glsaccesssymbol} +As above but \idx{sentencecase}. -\item[\catattrdef{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 like \cs{glsfirst} to ignore the -\catattr{nohyperfirst} attribute then just redefine -\begin{definition}[\DescribeMacro\glsxtrchecknohyperfirst] -\cs{glsxtrchecknohyperfirst}\marg{label} -\end{definition} -to do nothing. - -\item[\catattrdef{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[\catattrdef{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[\catattrdef{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[\catattrdef{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.) This attribute is only applicable to entries -defined using \cs{newabbreviation} (or \cs{newacronym} if it's using -\cs{newabbreviation}.) This attribute -doesn't apply to the accessibility fields. +\cmddef{GLSaccesssymbol} +As above but \idx{allcaps}. -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. +\cmddef{glsaccesssymbolplural} +This shows the \gloskey{symbolplural} field encapsulated with +\gls{glssymbolpluralaccessdisplay} or just +\gls{glsentrysymbolplural}\margm{entry-label}. -\item[\catattrdef{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}. This attribute is only applicable to entries -defined using \cs{newabbreviation} (or \cs{newacronym} if it's using -\cs{newabbreviation}.) - -\item[\catattrdef{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. This attribute is only applicable to entries -defined using \cs{newabbreviation} (or \cs{newacronym} if it's using -\cs{newabbreviation}.) This attribute doesn't apply to the -accessibility fields. +\cmddef{Glsaccesssymbolplural} +As above but \idx{sentencecase}. -\item[\catattrdef{markwords}] If this attribute is set to \qt{true} -any entry defined using \ics{newabbreviation} will automatically -have spaces in the long form replaced with -\begin{definition}[\DescribeMacro\glsxtrwordsep] -\cs{glsxtrwordsep} -\end{definition} -and each word is encapsulated with -\begin{definition}[\DescribeMacro\glsxtrword] -\cs{glsxtrword}\marg{word} -\end{definition} -For example: -\begin{verbatim} -\glssetcategoryattribute{abbreviation}{markwords}{true} -\newabbreviation{ip}{IP}{Internet Protocol} -\end{verbatim} -is essentially the same as -\begin{verbatim} -\newabbreviation{ip}{IP} -{\glsxtrword{Internet}\glsxtrwordsep\glsxtrword{Protocol}} -\end{verbatim} -The \qt{hyphen} styles, such as -\abbrstyle{long-hyphen-short-hyphen}, take advantage of this -markup. If the inserted material (provided in the final argument -of commands like \ics{gls}) starts with a hyphen then -\cs{glsxtrwordsep} is locally redefined to a hyphen. (The default -value is a space). Note that this only applies to commands -like \cs{gls} and not like \cs{glsxtrlong}. You can provide your own -localised switch, if required. For example: -\begin{verbatim} -\newcommand{\hyplong}[2][]{% - {\def\glsxtrwordsep{-}\glsxtrlong[#1]{#2}}} -\end{verbatim} +\cmddef{GLSaccesssymbolplural} +As above but \idx{allcaps}. -This setting will also adjust the long plural. This attribute is only applicable to entries -defined using \cs{newabbreviation} (or \cs{newacronym} if it's using -\cs{newabbreviation}.) +\cmddef{glsaccessdesc} +This shows the \gloskey{description} field encapsulated with +\gls{glsdescriptionaccessdisplay} or just +\gls{glsentrydesc}\margm{entry-label}. -\begin{important} -This setting may result in the -\cs{glsxtrword} and \cs{glsxtrwordsep} markup ending up in the -\gloskey{sort} field, depending on the style in use. -\end{important} +\cmddef{Glsaccessdesc} +As above but \idx{sentencecase}. -\item[\catattrdef{markshortwords}] This is similar to -\catattr{markwords} but applies to the short form. (Only useful for -abbreviations that contain spaces.) This attribute is only applicable to entries -defined using \cs{newabbreviation} (or \cs{newacronym} if it's using -\cs{newabbreviation}.) +\cmddef{GLSaccessdesc} +As above but \idx{allcaps}. -This setting will only adjust the short plural if the -\gloskey{shortplural} key isn't used. This setting will -take precedence over \catattr{insertdots}. +\cmddef{glsaccessdescplural} +This shows the \gloskey{descriptionplural} field encapsulated with +\gls{glsdescriptionpluralaccessdisplay} or just +\gls{glsentrydescplural}\margm{entry-label}. -\begin{important} -This setting may result in the -\cs{glsxtrword} and \cs{glsxtrwordsep} markup ending up in the -\gloskey{sort} field, depending on the style in use. -\end{important} +\cmddef{Glsaccessdescplural} +As above but \idx{sentencecase}. -\item[\catattrdef{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. \emph{This setting is incompatible -with \catattr{markshortwords}.} This attribute is only applicable to entries -defined using \cs{newabbreviation} (or \cs{newacronym} if it's using -\cs{newabbreviation}.) +\cmddef{GLSaccessdescplural} +As above but \idx{allcaps}. -\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} +\cmddef{glsaccessshort} +This shows the \gloskey{short} field encapsulated with +\gls{glsshortaccessdisplay} or just +\gls{glsentryshort}\margm{entry-label}. -This attribute is best used with the \catattr{discardperiod} -attribute set to \qt{true}. +\cmddef{Glsaccessshort} +As above but \idx{sentencecase}. -\item[\catattrdef{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. This setting overrides -\catattr{noshortplural}. This attribute is only applicable to entries -defined using \cs{newabbreviation} (or \cs{newacronym} if it's using -\cs{newabbreviation}.) Check with your supervisor, publisher or -editor if you want to use this attribute as this -usage is controversial. +\cmddef{GLSaccessshort} +As above but \idx{allcaps}. +\cmddef{glsaccessshortpl} +This shows the \gloskey{shortplural} field encapsulated with +\gls{glsshortpluralaccessdisplay} or just +\gls{glsentryshortpl}\margm{entry-label}. -\item[\catattrdef{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{This setting is incompatible with \catattr{aposplural}.} This attribute is only applicable to entries -defined using \cs{newabbreviation} (or \cs{newacronym} if it's using -\cs{newabbreviation}.) +\cmddef{Glsaccessshortpl} +As above but \idx{sentencecase}. -\item[\catattrdef{headuc}] If this attribute is set to \qt{true}, -commands like \ics{glsfmtshort} will use the upper case version -in the page headers. +\cmddef{GLSaccessshortpl} +As above but \idx{allcaps}. -\item[\catattrdef{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}). +\cmddef{glsaccesslong} +This shows the \gloskey{long} field encapsulated with +\gls{glslongaccessdisplay} or just +\gls{glsentrylong}\margm{entry-label}. -\item[\catattrdef{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[\catattrdef{linkcount}] This attribute is set to -\texttt{true} by \ics{GlsXtrEnableLinkCounting} (see -\sectionref{sec:linkcount}). +\cmddef{Glsaccesslong} +As above but \idx{sentencecase}. -\item[\catattrdef{linkcountmaster}] This attribute is set to -the name of the master counter by \ics{GlsXtrEnableLinkCounting} -if the optional argument is provided (see -\sectionref{sec:linkcount}). +\cmddef{GLSaccesslong} +As above but \idx{allcaps}. -\item[\catattrdef{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}). +\cmddef{glsaccesslongpl} +This shows the \gloskey{longplural} field encapsulated with +\gls{glslongpluralaccessdisplay} or just +\gls{glsentrylongpl}\margm{entry-label}. -\item \texttt{title}: the description will be used in the argument -of the title casing command. If you have at least -\styfmt{glossaries} v4.48, the title casing is indirectly performed -by \cs{glscapitalisewords}, which defaults to \ics{capitalisewords} -(provided by \sty{mfirstuc}). You can either redefine -\cs{glscapitalisewords} if you want the change to also affect -\ics{glsentrytitlecase} or if you only want the change to apply to -the attribute case-changing then 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}.) +\cmddef{Glsaccesslongpl} +As above but \idx{sentencecase}. -\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[\catattrdef{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[\catattrdef{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[\catattrdef{indexname}] If set, the \cs{glsxtrpostnamehook} hook -used at the end of \ics{glossentryname} -will index the entry using \ics{index}. See -\sectionref{sec:autoindex} for further details. +\cmddef{GLSaccesslongpl} +As above but \idx{allcaps}. -\item[\catattrdef{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. +\cmddef{glsaccessuseri} +This shows the \gloskey{user1} field encapsulated with +\gls{glsuseriaccessdisplay} or just +\gls{glsentryuseri}\margm{entry-label}. -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}. +\cmddef{Glsaccessuseri} +As above but \idx{sentencecase}. -\item[\catattrdef{glosssymbolfont}] (New to version 1.42.) -This is similar to \catattr{glossnamefont} and -\catattr{glossdescfont} but is used by \ics{glossentrysymbol}. +\cmddef{GLSaccessuseri} +As above but \idx{allcaps}. -\item[\catattrdef{textformat}] (New to version 1.21.) -Commands like \cs{gls} and \cs{glstext} have the link text -encapsulated in the argument of \cs{glstextformat} by default. If -this attribute is set, the control sequence given by the attribute -value will be used instead. As with the above, the attribute value -should be the name (without the leading backslash) of a command that -takes a single argument (the link text). Remember that the -abbreviation styles may apply an additional font change. +\cmddef{glsaccessuserii} +This shows the \gloskey{user2} field encapsulated with +\gls{glsuseriiaccessdisplay} or just +\gls{glsentryuserii}\margm{entry-label}. -\item[\catattrdef{hyperoutside}] (New to v1.21.) The attribute value -may be \texttt{false}, \texttt{true} or unset. If unset, -\texttt{true} is assumed. This indicates the default setting -of the \gloskey[glslink]{hyperoutside} key, described in -\sectionref{sec:wrglossary}. +\cmddef{Glsaccessuserii} +As above but \idx{sentencecase}. -\item[\catattrdef{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. +\cmddef{GLSaccessuserii} +As above but \idx{allcaps}. -\item[\catattrdef{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. +\cmddef{glsaccessuseriii} +This shows the \gloskey{user3} field encapsulated with +\gls{glsuseriiiaccessdisplay} or just +\gls{glsentryuseriii}\margm{entry-label}. -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. +\cmddef{Glsaccessuseriii} +As above but \idx{sentencecase}. -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.) +\cmddef{GLSaccessuseriii} +As above but \idx{allcaps}. -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. +\cmddef{glsaccessuseriv} +This shows the \gloskey{user4} field encapsulated with +\gls{glsuserivaccessdisplay} or just +\gls{glsentryuseriv}\margm{entry-label}. -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} +\cmddef{Glsaccessuseriv} +As above but \idx{sentencecase}. -\glssetcategoryattribute{external}{targeturl}{master-doc.pdf} -\glssetcategoryattribute{general}{targetname}{\glolinkprefix\glslabel} +\cmddef{GLSaccessuseriv} +As above but \idx{allcaps}. -\newglossaryentry{sample}{name={sample},description={local example}} +\cmddef{glsaccessuserv} +This shows the \gloskey{user5} field encapsulated with +\gls{glsuservaccessdisplay} or just +\gls{glsentryuserv}\margm{entry-label}. -\newglossaryentry{sample2}{name={sample2}, - type=external, - category=external, - description={external example}} -\end{verbatim} +\cmddef{Glsaccessuserv} +As above but \idx{sentencecase}. -\item[\catattrdef{externallocation}] The value should be the -file name of the target document when manually indexing an -external location (see \sectionref{sec:wrglossary}). In general, -it's better to use \gls{bib2gls} v1.7+ which can handle multiple -external sources and doesn't require this attribute. +\cmddef{GLSaccessuserv} +As above but \idx{allcaps}. -\end{description} +\cmddef{glsaccessuservi} +This shows the \gloskey{user6} field encapsulated with +\gls{glsuserviaccessdisplay} or just +\gls{glsentryuservi}\margm{entry-label}. -If a term is defined using \ics{newabbreviation} and accessibility -support has been supplied via the \pkgopt{accsupp} package option -then the following attributes are also available. If -\gloskey{shortaccess} isn't set its value will be obtained from: -\begin{definition}[\DescribeMacro\glsdefaultshortaccess] -\cs{glsdefaultshortaccess}\marg{short}\marg{long} -\end{definition} -This is defined by \sty{glossaries-accsupp} to just do \meta{long} -but \sty{glossaries-extra} redefines it to do \meta{long} -(\meta{short}). The \catattr{accessinsertdots}, -\catattr{accessaposplural} and \catattr{accessnoshortplural} -attributes below refer to the \meta{short} form that's passed to -this command. - -The following attributes are only applicable to entries -defined using \cs{newabbreviation} (or \cs{newacronym} if it's using -\cs{newabbreviation}). They have no effect if the \pkgopt{accsupp} -package option hasn't been used. +\cmddef{Glsaccessuservi} +As above but \idx{sentencecase}. -\begin{description} -\item[\catattrdef{accessinsertdots}] If this attribute is set to -\qt{true} and the \sty{glossaries-accsupp} package has been loaded -(with the \pkgopt{accsupp} option), then this behaves like -\catattr{insertdots} but for the \meta{short} part used in the \gloskey{shortaccess} field instead -of the \gloskey{short} field. -This setting will be overridden by an explicit use of -the \gloskey{shortaccess} key in the optional argument -of \cs{newabbreviation} (or \cs{newacronym}). - -\item[\catattrdef{accessaposplural}] This boolean attribute overrides -\catattr{aposplural} for the \gloskey{shortpluralaccess} key. -Has no effect if there's no accessibility support or if -the \gloskey{shortaccess} key hasn't been set or if the -\gloskey{shortpluralaccess} key is explicitly set. If -the \catattr{aposplural} is set and this attribute isn't set -and the \gloskey{shortaccess} key is set, then the -\catattr{aposplural} setting governs the default -\gloskey{shortpluralaccess} setting. If you want -\catattr{aposplural} but don't want it applied to the accessibility -support, set the \catattr{accessaposplural} attribute to \qt{false}. This attribute is only applicable to entries -defined using \cs{newabbreviation} (or \cs{newacronym} if it's using -\cs{newabbreviation}.) - -\item[\catattrdef{accessnoshortplural}] This boolean attribute overrides -\catattr{noshortplural} for the \gloskey{shortpluralaccess} key. -The same conditions apply as for \catattr{accessaposplural}. This attribute is only applicable to entries -defined using \cs{newabbreviation} (or \cs{newacronym} if it's using -\cs{newabbreviation}.) - -\item[\catattrdef{nameshortaccess}] If this attribute is set to -\qt{true}, the \gloskey{access} field (used for the \gloskey{name} -field's accessibility support) automatically assigned if it's not -provided. - -\item[\catattrdef{textshortaccess}] Like \gloskey{nameshortaccess} -but applies to the \gloskey{textaccess} field automatically assigned if it's not -provided. - -\item[\catattrdef{firstshortaccess}] Like \gloskey{nameshortaccess} -but applies to the \gloskey{firstaccess} field automatically assigned if it's not -provided. - -\item[\catattrdef{combinedfirstsep}] The separator to use for -\ics{glscombinefirstsep}. - -\item[\catattrdef{combinedfirstsepfirst}] The separator to use for -\ics{glscombinedfirstsepfirst}. - -\item[\catattrdef{combinedsepfirst}] The separator to use for -\ics{glscombinesepfirst}. - -\item[\catattrdef{combinedsep}] The separator to use for -\ics{glscombinedsep}. +\cmddef{GLSaccessuservi} +As above but \idx{allcaps}. -\end{description} +\section{Inner Formatting Wrappers} +\label{sec:glsaccessfmtfield} -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. \emph{This will be localised to the -current scope.} If you want a global definition use the following -command instead. - -If you want to apply the same attribute to multiple categories then -use: -\begin{definition}[\DescribeMacro\glssetcategoriesattribute] -\cs{glssetcategoriesattribute}\marg{category-label list}\marg{attribute-label}\marg{value} -\end{definition} -\emph{This has a global effect.} - -If you also want to set multiple attributes to the same value, then -you can use: -\begin{definition}[\DescribeMacro\glssetcategoriesattributes] -\cs{glssetcategoriesattributes}\marg{category-label list}\marg{attribute-label list}\marg{value} -\end{definition} -\emph{This has a global effect.} +These \csfmt{glsaccessfmt\meta{field}} commands are similar to the +corresponding \csfmt{glsaccess\meta{field}} commands described +above, but they format the field value using \gls{glsfmtfield}, +\gls{Glsfmtfield} or \gls{GLSfmtfield} with the +supplied \meta{cs} encapsulating command. -For example: -\begin{verbatim} -\newcommand{\latinname}[1]{\emph{#1}} -\glssetcategoriesattributes{genus,species}{textformat,glossnamefont}{latinname} -\end{verbatim} - -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} -This internally uses \cs{glssetcategoryattribute} so it has a local -effect. - -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. - -The above use local assignments so they can be placed inside a group -to limit their definition. As from v1.47, the value can be unset using: -\begin{definition}[\DescribeMacro\glsunsetcategoryattribute] -\cs{glsunsetcategoryattribute}\marg{category-label}\marg{attribute-label} -\end{definition} - -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. +The default entry display style \gls{glsgenentryfmt}, and the predefined abbreviation +styles all incorporate accessibility support by using these commands +in order to support the \idx{innerformatting}. -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}. +\cmddef{glsaccessfmtname} +This shows the \gloskey{name} field formatted with \meta{cs} and, if +accessibility support provided, encapsulated with +\gls{glsnameaccessdisplay}. -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. +\cmddef{Glsaccessfmtname} +As above but \idx{sentencecase}. -\chapter{Counting References} -\label{sec:countref} +\cmddef{GLSaccessfmtname} +As above but \idx{allcaps}. -There are three basic ways of counting entry references: -\begin{enumerate} -\item Counting the total number of times \cs{glsunset} is used -(\cs{glsreset} resets the count and is best avoided). -This is provided by the base \styfmt{glossaries} package and is -intended for documents where the term should be displayed -differently if it's only been used a certain number of times. -The information has to be written to the \texttt{.aux} file -so that it's available on the next \LaTeX\ run. +\cmddef{glsaccessfmttext} +This shows the \gloskey{text} field formatted with \meta{cs} and, if +accessibility support provided, encapsulated with +\gls{glstextaccessdisplay}. -This method is extended by \styfmt{glossaries-extra} and is -described in \sectionref{sec:entrycount}. +\cmddef{Glsaccessfmttext} +As above but \idx{sentencecase}. -\item Counting the total number of records. This method is -only available with \gls{bib2gls} and is intended -for documents where the term should be displayed differently -if it's only been recorded (indexed) a certain number of times. -See \sectionref{sec:recordcount} for further details. +\cmddef{GLSaccessfmttext} +As above but \idx{allcaps}. -\item Counting the number of times the \cs{gls}-like or -\cs{glstext}-like commands are used. (That is, those commands -that internally use \cs{@gls@link}.) Unlike the other two methods, -this just provides a running total rather than the total from the -previous \LaTeX\ run. This method is intended to make it more -convenient to work with hooks like \cs{glslinkcheckfirsthyperhook}, -\cs{glslinkpostsetkeys} or \cs{glslinkpresetkeys}. -See \sectionref{sec:linkcount} for further details. -\end{enumerate} +\cmddef{glsaccessfmtplural} +This shows the \gloskey{plural} field formatted with \meta{cs} and, if +accessibility support provided, encapsulated with +\gls{glspluralaccessdisplay}. -\section{Entry Counting (First Use Flag)} -\label{sec:entrycount} +\cmddef{Glsaccessfmtplural} +As above but \idx{sentencecase}. -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}). +\cmddef{GLSaccessfmtplural} +As above but \idx{allcaps}. -\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} +\cmddef{glsaccessfmtfirst} +This shows the \gloskey{first} field formatted with \meta{cs} and, if +accessibility support provided, encapsulated with +\gls{glsfirstaccessdisplay}. -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}). The acronym shortcut -\ics{ac} uses \cs{cgls} if it's been defined with -\pkgopt[ac]{shortcuts} (or \pkgopt[all]{shortcuts}) -but uses \cs{gls} if it's been defined with -\pkgopt[acronyms]{shortcuts} (or \pkgopt[acro]{shortcuts}). - -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. +\cmddef{Glsaccessfmtfirst} +As above but \idx{sentencecase}. -Just using \styfmt{glossaries}: -\begin{verbatim} -\documentclass{article} +\cmddef{GLSaccessfmtfirst} +As above but \idx{allcaps}. -\usepackage{glossaries} +\cmddef{glsaccessfmtfirstplural} +This shows the \gloskey{firstplural} field formatted with \meta{cs} and, if +accessibility support provided, encapsulated with +\gls{glsfirstpluralaccessdisplay}. -\makeglossaries +\cmddef{Glsaccessfmtfirstplural} +As above but \idx{sentencecase}. -\glsenableentrycount +\cmddef{GLSaccessfmtfirstplural} +As above but \idx{allcaps}. -\newacronym{html}{HTML}{hypertext markup language} -\newacronym{xml}{XML}{extensible markup language} +\cmddef{glsaccessfmtsymbol} +This shows the \gloskey{symbol} field formatted with \meta{cs} and, if +accessibility support provided, encapsulated with +\gls{glssymbolaccessdisplay}. -\begin{document} +\cmddef{Glsaccessfmtsymbol} +As above but \idx{sentencecase}. -Used once: \cgls{html}. +\cmddef{GLSaccessfmtsymbol} +As above but \idx{allcaps}. -Used twice: \cgls{xml} and \cgls{xml}. +\cmddef{glsaccessfmtsymbolplural} +This shows the \gloskey{symbolplural} field formatted with \meta{cs} and, if +accessibility support provided, encapsulated with +\gls{glssymbolpluralaccessdisplay}. -\printglossaries +\cmddef{Glsaccessfmtsymbolplural} +As above but \idx{sentencecase}. -\end{document} -\end{verbatim} +\cmddef{GLSaccessfmtsymbolplural} +As above but \idx{allcaps}. -If you switch to \styfmt{glossaries-extra} you must set the -\catattr{entrycount} attribute: -\begin{verbatim} -\documentclass{article} +\cmddef{glsaccessfmtdesc} +This shows the \gloskey{description} field formatted with \meta{cs} and, if +accessibility support provided, encapsulated with +\gls{glsdescriptionaccessdisplay}. -\usepackage{glossaries-extra} +\cmddef{Glsaccessfmtdesc} +As above but \idx{sentencecase}. -\makeglossaries +\cmddef{GLSaccessfmtdesc} +As above but \idx{allcaps}. -\glsenableentrycount +\cmddef{glsaccessfmtdescplural} +This shows the \gloskey{descriptionplural} field formatted with \meta{cs} and, if +accessibility support provided, encapsulated with +\gls{glsdescriptionpluralaccessdisplay}. -\glssetcategoryattribute{abbreviation}{entrycount}{1} +\cmddef{Glsaccessfmtdescplural} +As above but \idx{sentencecase}. -\newabbreviation{html}{HTML}{hypertext markup language} -\newabbreviation{xml}{XML}{extensible markup language} +\cmddef{GLSaccessfmtdescplural} +As above but \idx{allcaps}. -\begin{document} +\cmddef{glsaccessfmtshort} +This shows the \gloskey{short} field formatted with \meta{cs} and, if +accessibility support provided, encapsulated with +\gls{glsshortaccessdisplay}. -Used once: \cgls{html}. +\cmddef{Glsaccessfmtshort} +As above but \idx{sentencecase}. -Used twice: \cgls{xml} and \cgls{xml}. +\cmddef{GLSaccessfmtshort} +As above but \idx{allcaps}. -\printglossaries +\cmddef{glsaccessfmtshortpl} +This shows the \gloskey{shortplural} field formatted with \meta{cs} and, if +accessibility support provided, encapsulated with +\gls{glsshortpluralaccessdisplay}. -\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}). +\cmddef{Glsaccessfmtshortpl} +As above but \idx{sentencecase}. -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. +\cmddef{GLSaccessfmtshortpl} +As above but \idx{allcaps}. -The above example document can then become: -\begin{verbatim} -\documentclass{article} +\cmddef{glsaccessfmtlong} +This shows the \gloskey{long} field formatted with \meta{cs} and, if +accessibility support provided, encapsulated with +\gls{glslongaccessdisplay}. -\usepackage{glossaries-extra} +\cmddef{Glsaccessfmtlong} +As above but \idx{sentencecase}. -\makeglossaries +\cmddef{GLSaccessfmtlong} +As above but \idx{allcaps}. -\GlsXtrEnableEntryCounting{abbreviation}{1} +\cmddef{glsaccessfmtlongpl} +This shows the \gloskey{longplural} field formatted with \meta{cs} and, if +accessibility support provided, encapsulated with +\gls{glslongpluralaccessdisplay}. -\newabbreviation{html}{HTML}{hypertext markup language} -\newabbreviation{xml}{XML}{extensible markup language} +\cmddef{Glsaccessfmtlongpl} +As above but \idx{sentencecase}. -\begin{document} +\cmddef{GLSaccessfmtlongpl} +As above but \idx{allcaps}. -Used once: \gls{html}. +\cmddef{glsaccessfmtuseri} +This shows the \gloskey{user1} field formatted with \meta{cs} and, if +accessibility support provided, encapsulated with +\gls{glsuseriaccessdisplay}. -Used twice: \gls{xml} and \gls{xml}. +\cmddef{Glsaccessfmtuseri} +As above but \idx{sentencecase}. -\printglossaries +\cmddef{GLSaccessfmtuseri} +As above but \idx{allcaps}. -\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. +\cmddef{glsaccessfmtuserii} +This shows the \gloskey{user2} field formatted with \meta{cs} and, if +accessibility support provided, encapsulated with +\gls{glsuseriiaccessdisplay}. -\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} +\cmddef{Glsaccessfmtuserii} +As above but \idx{sentencecase}. -Note that you can't use both the document-wide counting and -the per-unit counting in the same document. +\cmddef{GLSaccessfmtuserii} +As above but \idx{allcaps}. -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}} +\cmddef{glsaccessfmtuseriii} +This shows the \gloskey{user3} field formatted with \meta{cs} and, if +accessibility support provided, encapsulated with +\gls{glsuseriiiaccessdisplay}. -\begin{document} -\chapter{Sample} +\cmddef{Glsaccessfmtuseriii} +As above but \idx{sentencecase}. -Used once: \gls{html}. +\cmddef{GLSaccessfmtuseriii} +As above but \idx{allcaps}. -Used three times: \gls{css} and \gls{css} and \gls{css}. +\cmddef{glsaccessfmtuseriv} +This shows the \gloskey{user4} field formatted with \meta{cs} and, if +accessibility support provided, encapsulated with +\gls{glsuserivaccessdisplay}. -Used once: \gls{sample}. +\cmddef{Glsaccessfmtuseriv} +As above but \idx{sentencecase}. -\chapter{Another Sample} +\cmddef{GLSaccessfmtuseriv} +As above but \idx{allcaps}. -Used once: \gls{css}. +\cmddef{glsaccessfmtuserv} +This shows the \gloskey{user5} field formatted with \meta{cs} and, if +accessibility support provided, encapsulated with +\gls{glsuservaccessdisplay}. -Used twice: \gls{html} and \gls{html}. +\cmddef{Glsaccessfmtuserv} +As above but \idx{sentencecase}. -\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. +\cmddef{GLSaccessfmtuserv} +As above but \idx{allcaps}. -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. +\cmddef{glsaccessfmtuservi} +This shows the \gloskey{user6} field formatted with \meta{cs} and, if +accessibility support provided, encapsulated with +\gls{glsuserviaccessdisplay}. -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}. +\cmddef{Glsaccessfmtuservi} +As above but \idx{sentencecase}. -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. +\cmddef{GLSaccessfmtuservi} +As above but \idx{allcaps}. -\begin{verbatim} -\documentclass{article} +\chapter{Categories} +\label{sec:categories} -\usepackage[colorlinks]{hyperref} -\usepackage{glossaries-extra} +\begin{information} +For multi-entry categories, see \sectionref{sec:multiglscategory}. +\end{information} -\makeglossaries +Each entry defined by \gls{newglossaryentry} (or commands that +internally use it such as \gls{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.) -\GlsXtrEnableEntryUnitCounting{general}{0}{page} +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}. -\newglossaryentry{sample}{name={sample},description={an example}} +\cmddef{glscategory} +Expands to the category of the given entry or does nothing if the +entry doesn't exist (analogous to \gls{glsentryname}). -\renewcommand*{\glslinkcheckfirsthyperhook}{% - \ifnum\glsentrycurrcount\glslabel>0 - \setkeys{glslink}{hyper=false}% - \fi -} +\cmddef{glsifcategory} +Tests if the entry given by \meta{entry-label} has the +\gloskey{category} set to \meta{category}. -\begin{document} +An entry may have its \gloskey{category} field changed using +commands such as \gls{GlsXtrSetField} (see +\sectionref{sec:setfields}). In addition, the following commands are +provided to batch set the \gloskey{category} for a collection of +entries. -A \gls{sample} entry. -Next use: \gls{sample}. +\cmddef{glsxtrsetcategory} +Globally sets the \gloskey{category} field to the fully expanded \meta{category-label} +for each entry listed in \meta{entry-labels}. -\newpage +\cmddef{glsxtrsetcategoryforall} +Globally sets the \gloskey{category} field to the fully +expanded \meta{category-label} for each entry belonging to the +\idxpl{glossary} listed in \meta{glossary-labels}. -Next page: \gls{sample}. -Again: \gls{sample}. +There are also some iterative commands available: -\printglossaries +\cmddef{glsforeachincategory} +This iterates through all entries in the \idxpl{glossary} 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. -\end{document} -\end{verbatim} -This only produces a hyperlink for the first instance of -\verb|\gls{sample}| on each page. +\cmddef{glsforeachwithattribute} +This iterates over all entries in the given list of \idxpl{glossary} +that have a category with the given \meta{attribute-label} set to +\meta{attribute-value} and performs \meta{body} at each iteration. +If \meta{glossary-types} is omitted, the list of all non-\idxpl{ignoredglossary} +is assumed. The remaining arguments are as for +\gls{glsforeachincategory}. -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. +\section{Known Categories} +\label{sec:knowncategories} -\section{Link Counting} -\label{sec:linkcount} +These are the category labels that are set or referenced by +\sty{glossaries-extra}. -As from version 1.26, an alternative method of entry counting -is to count the number of times the \cs{gls}-like or -\cs{glstext}-like commands are used. (The \qt{link} in this method's -name refers to the use of the internal command \cs{@gls@link} -not to \cs{hyperlink} although \cs{@gls@link} may use -\cs{hyperlink} when displaying the \gls{linktext}.) +\optiondef{cat.general} +The default category assumed by \gls{newglossaryentry}. -To enable link counting use the preamble-only command: -\begin{definition}[\DescribeMacro\GlsXtrEnableLinkCounting] -\cs{GlsXtrEnableLinkCounting}\oarg{master counter}\marg{categories} -\end{definition} -where \meta{categories} is a list of category labels. The optional -argument \meta{master counter} may be used to identify a master -counter (which must be defined). If present, the associated -link counter will be reset when the master counter is incremented. -This command automatically sets the \catattr{linkcount} attribute -for the given categories. If the optional argument is -present, it also sets the \catattr{linkcountmaster} attribute. +\optiondef{cat.abbreviation} +The default category assumed by \gls{newabbreviation}. -When enabled, commands like \cs{gls} and \cs{glstext} -increment the associated counter using -\begin{definition}[\DescribeMacro\glsxtrinclinkcounter] -\cs{glsxtrinclinkcounter}\marg{counter name} -\end{definition} -This just does -\texttt{\cs{stepcounter}\marg{counter name}} by default but if you -need \cs{refstepcounter} instead, just redefine this command: -\begin{verbatim} -\renewcommand*{\glsxtrinclinkcounter}[1]{\refstepcounter{#1}} -\end{verbatim} - -You can access the internal count register using -\begin{definition}[\DescribeMacro\GlsXtrLinkCounterValue] -\cs{GlsXtrLinkCounterValue}\marg{label} -\end{definition} -where \meta{label} is the entry's label. This will expand -to 0 if the counter hasn't been defined. +\optiondef{cat.acronym} +The default category assumed by \gls{newacronym}. -It's also possible to access the display value -(\cs{the}\meta{counter}) using -\begin{definition}[\DescribeMacro\GlsXtrTheLinkCounter] -\cs{GlsXtrTheLinkCounter}\marg{counter} -\end{definition} -(This will expand to 0 if the counter hasn't been defined.) +\optiondef{cat.index} +The default category assumed by \gls{newterm}. -\begin{important} -In order to conserve resources, the counter is only defined -when it first needs to be incremented so terms that have -been defined but haven't been used in the document -won't have the associated count register allocated. -\end{important} +\optiondef{cat.symbol} +The default category assumed by \gls{glsxtrnewsymbol}. -You can test if the counter has been defined using: -\begin{definition}[\DescribeMacro\GlsXtrIfLinkCounterDef] -\cs{GlsXtrIfLinkCounterDef}\marg{label}\marg{true}\marg{false} -\end{definition} -where \meta{label} is the entry's label. - -The counter name can be obtained using -\begin{definition}[\DescribeMacro\GlsXtrLinkCounterName] -\cs{GlsXtrLinkCounterName}\marg{label} -\end{definition} -This simply expands to the counter name associated with the -entry given by \meta{label} without any check for -existence. For example, to change the display command -(\cs{the}\meta{counter}) using \sty{etoolbox}: -\begin{verbatim} -\csdef{the\GlsXtrLinkCounterName{duck}}{\Roman{\GlsXtrLinkCounterName{duck}}} -\end{verbatim} -This is useful if you just want to change the display for -specific entries but isn't convenient if you want to change the -display for all entries. Instead, it's simpler to redefine -\cs{GlsXtrTheLinkCounter}. For example: -\begin{verbatim} -\renewcommand*{\GlsXtrTheLinkCounter}[1]{% - \GlsXtrIfLinkCounterDef{#1}% - {\Roman{\GlsXtrLinkCounterName{#1}}}% - {0}% -} -\end{verbatim} -In both cases, the redefinition should be implemented -after \cs{GlsXtrEnableLinkCounting}. +\optiondef{cat.number} +The default category assumed by \gls{glsxtrnewnumber}. -Here's an example document that uses link counting to disable -the hyperlink after the first reference. This redefines -\ics{glslinkpresetkeys} (which is used by both \cs{gls} -and \cs{glstext}) instead of -\cs{glslinkcheckfirsthyperhook} (which is used by \cs{gls} -but not by \cs{glstext}). +\section{Attributes} +\label{sec:attributes} -\begin{verbatim} -\documentclass{article} +Each category may have a set of attributes, where each attribute has +an associated value for its given category. An entry's attribute set +corresponds to the attributes associated with the entry's category. -\usepackage[colorlinks]{hyperref} -\usepackage{glossaries-extra} +As with the category, the attribute name is also a label. You can +provide your own custom attributes, which you can set and access +with the commands described in \sectionref{sec:attributecmds}. -\makeglossaries +\subsection{Known Attributes} +\label{sec:knownattributes} -\renewcommand*{\glslinkpresetkeys}{% - \ifnum\GlsXtrLinkCounterValue{\glslabel}>1 - \setkeys{glslink}{hyper=false}% - \fi -} +This section lists attributes that \sty{glossaries-extra} sets or +accesses. If an attribute hasn't been set, a default is assumed. +For boolean attributes, the test may simply be to determine if the +attribute has been set to \code{true}, in which case any other value +or a missing value will be interpreted as false. Conversely, the +test may be to determine if the attribute has been set to +\code{false}, in which case any other value or a missing value will +be interpreted as true. -\GlsXtrEnableLinkCounting{general} +\begin{information} +See \sectionref{sec:multiglscategory} for attributes relating to +multi-entry categories. +\end{information} -\newglossaryentry{sample1}{name={sample1},description={an example}} -\newglossaryentry{sample2}{name={sample2},description={another example}} +\subsubsection{Abbreviation Attributes} +\label{sec:abbrattr} -\newabbreviation{ex}{ex}{example} +See \sectionref{sec:accessabbr} for abbreviation accessibility attributes. -\begin{document} +\optiondef{catattr.regular} +This attribute indicates whether or not an entry should be +considered a regular entry. This enables \gls{glsentryfmt} to +determine whether to use \gls{glsgenentryfmt} or +\gls{glsxtrgenabbrvfmt}. -\section{Sample Section} +The \cat{general} and \cat{acronym} categories have the +\catattr{regular} attribute automatically set to \code{true}. +Some abbreviation styles change this value. -\Gls{sample1}, \gls{sample2} and \gls{ex}. -\Glstext{sample1} and \gls{ex} again. +\optiondef{catattr.discardperiod} +If set to \qt{true}, the \idx{postlinkhook} will discard a +\idx{fullstop} that follows \emph{non-plural} commands like +\gls{gls} or \gls{glstext}(see \sectionref{sec:postlinkhook}). -\section{Another Sample Section} +\begin{information} +This attribute doesn't apply to the accessibility fields. +See \sectionref{sec:accessabbr} for attributes related to +accessibility support for abbreviations. +\end{information} -\Gls{sample1}, \gls{sample2} and \gls{ex}. +Note that this can cause a problem if you access a field that +doesn't end with a full stop. For example: +\begin{codebox} +\gls{newabbreviation} + \oarg{\gloskeyval{user1}{German Speaking \cmd{TeX}\cmd{ }User Group}} + \marg{dante}\marg{DANTE e.V.}\marg{Deutschsprachige Anwendervereinigung + \cmd{TeX}\cmd{ }e.V.} +\end{codebox} +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{codebox} +\gls{glsuseri}\marg{dante}\oarg{.} +\end{codebox} +This will bring the punctuation character inside the \idx{linktext} +and it won't be discarded. -\printglossaries +\optiondef{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 +\gls{glspl} or \gls{glsplural}. + +\optiondef{catattr.retainfirstuseperiod} +If this attribute is set to \qt{true} then the discard is determined +by \gls{glsxtrdiscardperiodretainfirstuse}, regardless of the +\catattr{discardperiod} or \catattr{pluraldiscardperiod} attributes. +This is useful for \meta{short} (\meta{long}) abbreviation styles +where only the short form has a trailing \idx{fullstop}. + +\begin{information} +This attribute doesn't apply to the accessibility fields. +See \sectionref{sec:accessabbr} for attributes related to +accessibility support for abbreviations. +\end{information} + +\optiondef{catattr.markwords} +If this attribute is set to \qt{true} +any entry defined using \gls{newabbreviation} will automatically +have spaces in the long form replaced with: +\cmddef{glsxtrwordsep} +and each word is encapsulated with: +\cmddef{glsxtrword} +For example: +\begin{codebox} +\gls{glssetcategoryattribute}\marg{\cat{abbreviation}}\marg{\catattr{markwords}}\marg{true} +\gls{newabbreviation}\marg{ip}\marg{IP}\marg{Internet Protocol} +\end{codebox} +is essentially the same as +\begin{codebox} +\gls{newabbreviation}\marg{ip}\marg{IP} +\marg{\gls{glsxtrword}\marg{Internet}\gls{glsxtrwordsep}\gls{glsxtrword}\marg{Protocol}} +\end{codebox} +The \qt{hyphen} styles, such as +\abbrstyle{long-hyphen-short-hyphen}, take advantage of this +markup. If the inserted material (provided in the final argument +of \idx{glslike} commands) starts with a hyphen then +\gls{glsxtrwordsep} is locally redefined to a hyphen. (The default +value is a space). Note that this only applies to commands +like \gls{gls} and not like \gls{glsxtrlong}. You can provide your own +localised switch, if required. For example: +\begin{codebox} +\cmd{newcommand}\marg{\cmd{hyplong}}[2][]\marg{\% + \marg{\cmd{def}\gls{glsxtrwordsep}\marg{-}\gls{glsxtrlong}\oarg{\#1}\marg{\#2}}} +\end{codebox} -\end{document} -\end{verbatim} -The use of \ics{glslinkpresetkeys} -means that the options can override this. For example -\begin{verbatim} -\gls[hyper=true]{sample1} -\end{verbatim} -will override the \texttt{hyper=false} setting in -\ics{glslinkpresetkeys}. If \ics{glslinkpostsetkeys} is used -instead, the \texttt{hyper=false} setting will override -the setting provided in the optional argument. +This setting will also adjust the long plural. This attribute is +only applicable to entries defined using \gls{newabbreviation} (or +\gls{newacronym} if it's using \gls{newabbreviation}.) -The \category{abbreviation} category doesn't have the -\catattr{linkcount} attribute set (since it's not -listed in the argument of \cs{GlsXtrEnableLinkCounting}). This means that -\cs{GlsXtrLinkCounterValue} -always expands to 0 for the abbreviation (\texttt{ex}), so the -inequality test -\begin{verbatim} -\ifnum\GlsXtrLinkCounterValue{\glslabel}>1 -\end{verbatim} -will always be false. This means that the abbreviation won't -have \texttt{hyper=false} applied. If the test is changed to -\begin{verbatim} -\ifnum\GlsXtrLinkCounterValue{\glslabel}=1 -\else - \setkeys{glslink}{hyper=false}% -\fi -\end{verbatim} -Then the abbreviation will always have \texttt{hyper=false} -applied. +\begin{important} +This setting may result in the \gls{glsxtrword} and +\gls{glsxtrwordsep} markup ending up in the \gloskey{sort} field, +depending on the style in use. +\end{important} -To reset the counter every section use the optional argument to set -the master counter: -\begin{verbatim} -\GlsXtrEnableLinkCounting[section]{general} -\end{verbatim} +\optiondef{catattr.markshortwords} +This is similar to +\catattr{markwords} but applies to the short form. (Only useful for +abbreviations that contain spaces.) This attribute is only applicable to entries +defined using \gls{newabbreviation} (or \gls{newacronym} if it's using +\gls{newabbreviation}.) -\chapter{Auto-Indexing} -\label{sec:autoindex} +This setting will only adjust the short plural if the +\gloskey{shortplural} key isn't used. This setting will +take precedence over \catattr{insertdots}. -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{important} +This setting may result in the +\gls{glsxtrword} and \gls{glsxtrwordsep} markup ending up in the +\gloskey{sort} field, depending on the style in use. +\end{important} + +\optiondef{catattr.insertdots} +If this attribute is set to \qt{true} +any entry defined using \gls{newabbreviation} will automatically +have \idxpl{fullstop} 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 \gls{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. \emph{This setting is incompatible +with \catattr{markshortwords}.} This attribute is only applicable to entries +defined using \gls{newabbreviation} (or \gls{newacronym} if it's using +\gls{newabbreviation}.) \begin{important} -The auto-indexing is designed for \gls{makeindex} syntax. If you've -used the \pkgopt{xindy} package option, the automatic escaping of -\gls{xindy} special characters in the \gloskey{sort} field may -result in an incorrect sort value for the \cs{index} command used by -the auto-indexing. Note also that \app{texindy} has a fixed set of -special characters (corresponding to \gls{makeindex}['s] defaults) -that can't be customized. You may want to consider using \gls{bib2gls} and -its dual entries as an alternative approach. +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} -\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. +This attribute is best used with the \catattr{discardperiod} +attribute set to \qt{true}. -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}. As from v1.16, there are -user-level commands available to change the sort and actual -value used by the automated index. +\optiondef{catattr.aposplural} +If this attribute is set to \qt{true}, +\gls{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. This setting overrides +\catattr{noshortplural}. This attribute is only applicable to entries +defined using \gls{newabbreviation} (or \gls{newacronym} if it's using +\gls{newabbreviation}.) Check with your supervisor, publisher or +editor if you want to use this attribute as this +usage is controversial. -The actual value is given by -\begin{definition}[\DescribeMacro\glsxtrautoindexentry] -\cs{glsxtrautoindexentry}\marg{label} -\end{definition} -where \meta{label} is the entry's label. The default definition -is: -\begin{verbatim} -\newcommand*{\glsxtrautoindexentry}[1]{\string\glsentryname{#1}} -\end{verbatim} -Note the use of \cs{string} to prevent \cs{glsentryname} from -being expanded as it's written to the index file. +\optiondef{catattr.noshortplural} +If this attribute is set to +\qt{true}, \gls{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{This setting is incompatible with \catattr{aposplural}.} This attribute is only applicable to entries +defined using \gls{newabbreviation} (or \gls{newacronym} if it's using +\gls{newabbreviation}.) + +\optiondef{catattr.tagging} +If this attribute is set to \qt{true}, +the tagging command defined by \gls{GlsXtrEnableInitialTagging} +will be activated to use \gls{glsxtrtagfont} in the glossary +(see \sectionref{sec:tagging}) + +\subsubsection{Attributes that Alter \glsfmttext{glslink} Options} +\label{sec:glsoptsattr} + +\optiondef{catattr.nohyperfirst} +When used with the \idx{glslike} commands, if this attribute is set +to \code{true}, this will automatically suppress the hyperlink on +\idx{firstuse}. + +\begin{information} +This settings can be overridden by explicitly setting +the \glsopt{hyper} key on or off in the optional argument of +the \idx{glslike} command. +\end{information} + +As from version 1.07, \gls{glsfirst}, +\gls{Glsfirst}, \gls{GLSfirst} and their plural versions (which should ideally +behave in a similar way to the \idx{firstuse} of \gls{gls} or +\gls{glspl}) now honour +this attribute (but not the package-wide \optval{hyperfirst}{false} +option, which matches the behaviour of \sty{glossaries}). If you +want commands like \gls{glsfirst} to ignore the +\catattr{nohyperfirst} attribute then just redefine +\gls{glsxtrchecknohyperfirst} to do nothing. + +\optiondef{catattr.nohypernext} +If set to \code{true}, this will automatically set +\glsoptval{hyper}{false} on \idx{subsequentuse} when using the \idx{glslike} commands. + +\optiondef{catattr.nohyper} +If set to \code{true}, this will automatically set +\glsoptval{hyper}{false} when using the \idx{glslike} or +\idx{glstextlike} commands. + +\optiondef{catattr.indexonlyfirst} +This is similar to the \opt{indexonlyfirst} package option but only +for entries that have a category with this attribute set to +\qt{true}. + +\optiondef{catattr.wrgloss} +When using the \idx{glslike} or \idx{glstextlike} commands, this +will automatically set \glsoptval{wrgloss}{after} it this attribute +is set to \qt{after}. + +\optiondef{catattr.textformat} +The \idx{glslike} and \idx{glstextlike} commands have the +\idx{linktext} encapsulated in the argument of \gls{glstextformat} by default +(the outer formatting, see \sectionref{sec:glstextformat}). If +the \catattr{textformat} attribute is set, the control sequence given by the attribute +value will be used instead. The attribute value +should be the name (without the leading backslash) of a command that +takes a single argument (the \idx{linktext}). Remember that the +abbreviation styles may apply an additional font change. -The sort value is assigned using: -\begin{definition}[\DescribeMacro\glsxtrautoindexassignsort] -\cs{glsxtrautoindexassignsort}\marg{cs}\marg{label} -\end{definition} -where \meta{label} is the entry label and \meta{cs} is the command -which needs to be set to the sort value. The default definition is: -\begin{verbatim} -\newcommand*{\glsxtrautoindexassignsort}[2]{% - \glsletentryfield{#1}{#2}{sort}% -} -\end{verbatim} -After this macro is called, \meta{cs} is then processed to escape -any of \app{makeindex}'s special characters. Note that this -escaping is only performed on the sort not on the actual value. -The escaping of the sort value is performed by -\begin{definition}[\DescribeMacro\glsxtrautoindexesc] -\cs{glsxtrautoindexesc} -\end{definition} -You can redefine this to do nothing if you want to omit the -escaping. You may want to consider providing another field to obtain -the appropriate sort value if the one provided in the \gloskey{sort} -field isn't suitable (because it may already have had special -characters escaped or it may be a numeric value in the case of -sort by use or definition). +\optiondef{catattr.hyperoutside} +This boolean attribute may be \code{false}, \code{true} or unset. If unset, +\code{true} is assumed. This indicates the default setting +of the \glsopt{hyperoutside} option, described in +\sectionref{sec:glsopts}. + +\subsubsection{Glossary Attributes} +\label{sec:glossattr} + +\optiondef{catattr.glossdesc} +This attribute is checked by the \gls{glossentrydesc} to determine +whether or not to apply any \idx{casechange}. The value may be one +of: +\begin{deflist} +\itemtitle{\optfmt{firstuc}} +\begin{itemdesc} +Applies \idx+{sentencecase}. That is, the first letter of the +description will be converted to \idx{uppercase} (using \gls{Glsentrydesc}). +\end{itemdesc} + +\itemtitle{\optfmt{title}} +\begin{itemdesc} +Applies \idx+{titlecase}. +If you have at least \sty{glossaries} v4.48, the title casing is indirectly performed +by \gls{glscapitalisewords}, which defaults to \gls{capitalisewords} +(provided by \sty{mfirstuc}). You can either redefine +\gls{glscapitalisewords} if you want the change to also affect +\gls{glsentrytitlecase} or if you only want the change to apply to +the attribute case-changing then redefine +\gls{glsxtrfieldtitlecasecs}. For example: +\begin{codebox} +\cmd{newcommand}*\marg{\gls{glsxtrfieldtitlecasecs}}[1]\marg{\gls{xcapitalisefmtwords}*\marg{\#1}} +\end{codebox} +(Note that the argument to \gls{glsxtrfieldtitlecasecs} +will be a control sequence whose replacement text is the +entry's description, which is why \gls{xcapitalisefmtwords} +is needed instead of \gls{capitalisefmtwords}.) + +\begin{warning} +If an error occurs with this setting, try redefining +\gls{glsxtrfieldtitlecasecs} as shown above. +\end{warning} +\end{itemdesc} + +\end{deflist} +Any other values of this attribute are ignored. Remember +that there are design limitations for both the \idx{sentencecase} and the +\idx{titlecase} commands. See the \sty{mfirstuc} user manual for further details. + +\begin{information} +If you are using \app{bib2gls}, you can use the +\resourceopt{description-case-change} setting instead. +\end{information} + +\optiondef{catattr.glossdescfont} +If set, the value should be the name of a control sequence (without +the leading backslash) that takes one argument. This control +sequence will be applied by \gls{glossentrydesc} to the description text. For example: +\begin{codebox} +\gls{glssetcategoryattribute}\marg{\cat{general}}\marg{\catattr{glossdescfont}}\marg{emph} +\end{codebox} + +\optiondef{catattr.glossname} +As \catattr{glossdesc} but applies to \gls{glossentryname}. +Additionally, if this attribute is set to \qt{uc} the name is +converted to \idx{allcaps}. + +\begin{information} +If you are using \app{bib2gls}, you can use the +\resourceopt{name-case-change} setting instead. +\end{information} + +\optiondef{catattr.indexname} +If set, the \idx{postnamehook} will index the entry using +\gls{index}. See \sectionref{sec:autoindex} for further details. + +\optiondef{catattr.glossnamefont} +As \catattr{glossdescfont} but applies to \gls{glossentryname}. +Note that this overrides \gls{glsnamefont} which will only +be used if this attribute hasn't been set. + +Remember that \idxpl{glossarystyle} may additionally apply a font change, +such as the list styles which put the name in the optional argument +of \gls{item}. + +\optiondef{catattr.glosssymbolfont} +This is similar to \catattr{glossnamefont} and +\catattr{glossdescfont} but is used by \gls{glossentrysymbol}. + + +\subsubsection{Other Attributes} +\label{sec:otherattr} + +\optiondef{catattr.headuc} +If this attribute is set to \qt{true}, +commands like \gls{glsfmtshort} will use the upper case version +in the page headers. + +\optiondef{catattr.entrycount} +The value of this attribute (if set) must be an integer and is used +in combination with \gls{glsenableentrycount} +(see \sectionref{sec:entrycount}). Leave blank or undefined +for categories that shouldn't have this facility enabled. The +value of this attribute is used by \gls{glsxtrifcounttrigger} +to determine how commands such as \gls{cgls} should behave. + +\optiondef{catattr.linkcount} +This attribute is set to +\code{true} by \gls{GlsXtrEnableLinkCounting} (see +\sectionref{sec:linkcount}). + +\optiondef{catattr.linkcountmaster} +This attribute is set by \gls{GlsXtrEnableLinkCounting} to +the name of the counter that requires the link counter to be added +to its reset list (see \sectionref{sec:linkcount}). + +\optiondef{catattr.dualindex} +If this attribute is set, whenever a glossary entry +has information written to the external glossary file +through commands like \gls{gls} and \gls{glsadd}, a~corresponding +line will be written to the indexing file using \gls{index}. +The value may be \code{true} to simply enable this feature or the +value may be the encap to use with \gls{index}. See +\sectionref{sec:autoindex} for further details. + +\optiondef{catattr.targeturl} +If set, the hyperlink generated by commands like \gls{gls} will be +set to the URL provided by this attribute's value. For example: +\begin{codebox} +\gls{glssetcategoryattribute}\marg{\cat{general}}\marg{\catattr{targeturl}}\marg{master-doc.pdf} +\end{codebox} +(See also the accompanying sample file +\file{sample-external.tex}.) If the URL contains awkward +characters (such as \verb|%| or \verb|~|) remember that the base +\sty{glossaries} package provides commands like +\gls{glspercentchar} and \gls{glstildechar} that expand to literal +characters. + +\optiondef{catattr.targetname} +If you want to a named anchor within the target URL (notionally +adding \code{\#\meta{name}} to the URL), then you also +need to set \catattr{targetname} to the anchor \meta{name}. You may +use \gls{glslabel} within \meta{name} which is set by commands +like \gls{gls} to the entry's label. + +All the predefined \idxpl{glossarystyle} start each entry +listing with \gls{glstarget} which sets the anchor to +\code{\gls{glolinkprefix}\gls{glslabel}}, so if you want entries to link +to glossaries in the URL given by \catattr{targeturl}, you +can just do: +\begin{codebox} +\gls{glssetcategoryattribute}\marg{\cat{general}}\marg{\catattr{targetname}}\marg{\gls{glolinkprefix}\gls{glslabel}} +\end{codebox} +(If the target document changed \gls{glolinkprefix} then you will +need to adjust the above as appropriate.) -The command used to perform the actual indexing is: -\begin{definition}[\DescribeMacro\glsxtrautoindex] -\cs{glsxtrautoindex}\marg{text} -\end{definition} -This just does \cs{index}\marg{text} by default. +\optiondef{catattr.targetcategory} +If the anchor is in the form \code{\meta{name1}.\meta{name2}} +then use \catattr{targetname} for the \meta{name2} part and +\catattr{targetcategory} for the \meta{name1} part. -\begin{important} -The entry's \gloskey{parent} field isn't referenced in this -automated indexing. -\end{important} +For example: +\begin{codebox} +\gls{glssetcategoryattribute}\marg{\cat{general}}\marg{\catattr{targeturl}}\marg{master-doc.pdf} +\gls{glssetcategoryattribute}\marg{\cat{general}}\marg{\catattr{targetcategory}}\marg{page} +\gls{glssetcategoryattribute}\marg{\cat{general}}\marg{\catattr{targetname}}\marg{7} +\end{codebox} +will cause all link text for \cat{general} entries to +link to \filefmt{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 \gls{newignoredglossary*} +for the external list. For example: +\begin{codebox} +\gls{newignoredglossary*}\marg{external} +\codepar +\gls{glssetcategoryattribute}\marg{external}\marg{\catattr{targeturl}}\marg{master-doc.pdf} +\gls{glssetcategoryattribute}\marg{\cat{general}}\marg{\catattr{targetname}}\marg{\gls{glolinkprefix}\gls{glslabel}} +\codepar +\gls{newglossaryentry}\marg{sample}\marg{\gloskeyval{name}{sample},\gloskeyval{description}{local example}} +\codepar +\gls{newglossaryentry}\marg{sample2}\marg{\gloskeyval{name}{sample2}, + \gloskeyval{type}{external}, + \gloskeyval{category}{external}, + \gloskeyval{description}{external example}} +\end{codebox} + +\optiondef{catattr.externallocation} +The value should be the file name of the target document when +manually indexing an external location with \glsopt{thevalue}. In +general, it's better to use \app{bib2gls} v1.7+ which can handle +multiple external sources and doesn't require this attribute. + +\subsection{Accessing and Setting Attributes} +\label{sec:attributecmds} + +Attributes can be set using the following commands: + +\cmddef{glssetcategoryattribute} +Locally sets the given attribute to \meta{value} for the given +category. -For example, to index the value of the \gloskey{first} key, -instead of the \gloskey{name} key: -\begin{verbatim} -\renewcommand*{\glsxtrautoindexentry}[1]{\string\glsentryfirst{#1}} -\end{verbatim} -and if the sort value also needs to be set to the \gloskey{long} -field, if present, otherwise the \gloskey{sort} field: -\begin{verbatim} -\renewcommand*{\glsxtrautoindexassignsort}[2]{% - \ifglshaslong{#2}% - {\glsletentryfield{#1}{#2}{long}}% - {\glsletentryfield{#1}{#2}{sort}}% -} -\end{verbatim} +\cmddef{glssetcategoriesattribute} +Globally sets the given attribute to \meta{value} for all the +categories in the comma-separated list \meta{category list}. -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. +\cmddef{glssetcategoryattributes} +Globally sets each attribute in the comma separated +\meta{attribute list} to \meta{value} for the given \meta{category}. -\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} +\cmddef{glssetcategoriesattributes} +Globally sets each attribute in the comma separated +\meta{attribute list} to \meta{value} for each +category in the comma-separated list \meta{category list}. -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. +\cmddef{glssetattribute} +Locally sets the given attribute to \meta{value} for the +category associated with the entry identified by +\meta{entry-label}. This command can't be used to assign an +attribute for a multi-entry category. -\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} +\cmddef{glssetregularcategory} +A shortcut that sets the \catattr{regular} attribute to \code{true} +for the given category using \gls{glssetcategoryattribute}. -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). +An attribute can be locally unset using: +\cmddef{glsunsetcategoryattribute} -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} +Attribute values can be obtained with the following commands: -\begin{definition}[\DescribeMacro\GlsXtrSetActualChar] -\cs{GlsXtrSetActualChar}\marg{char} -\end{definition} -Set the actual character to \meta{char}. +\cmddef{glsgetcategoryattribute} +Expands to the value of the given attribute for the given +category. Expands to nothing if the attribute hasn't been set. -\begin{definition}[\DescribeMacro\GlsXtrSetLevelChar] -\cs{GlsXtrSetLevelChar}\marg{char} -\end{definition} -Set the level character to \meta{char}. +\cmddef{glsgetattribute} +Expands to the value of the given attribute for the category +associated with the entry identified by \meta{entry-label}. Expands +to nothing if the attribute hasn't been set. This command can't be +used to assign an attribute for a multi-entry category. -\begin{definition}[\DescribeMacro\GlsXtrSetEscChar] -\cs{GlsXtrSetEscChar}\marg{char} -\end{definition} -Set the escape (quote) character to \meta{char}. +Attributes can be tested with the following commands. -\begin{definition}[\DescribeMacro\GlsXtrSetEncapChar] -\cs{GlsXtrSetEncapChar}\marg{char} -\end{definition} -Set the encap character to \meta{char}. +\cmddef{glshascategoryattribute} +This uses \sty{etoolbox}['s] \gls{ifcsvoid} and does \meta{true} if +the attribute has been set and isn't blank and isn't \gls{relax} +otherwise it does \meta{false}. + +\cmddef{glshasattribute} +As \gls{glshascategoryattribute} but the category is obtained from +the given entry. This command can't be used to test an attribute +associated with a multi-entry category. + +\cmddef{glsifcategoryattribute} +This tests if the given attribute for the given category is set and +equal to \meta{value}. If true, \meta{true} is done. If the +attribute isn't set or is set but isn't equal to \meta{value}, +\meta{false} is done. + +For example: +\begin{codebox} +\gls{glsifcategoryattribute}\marg{\cat{general}}\marg{\catattr{nohyper}}\marg{true}\marg{NO HYPER}\marg{HYPER} +\end{codebox} +This does \qt{NO HYPER} if the \cat{general} category has the +\catattr{nohyper} attribute set to \code{true} otherwise if +does \qt{HYPER}. -\chapter{\headingapp{bib2gls}: Managing Reference Databases} -\label{sec:bib2gls} - -There is a new command line application called -\gls{bib2gls}, which works in much the same way as -a combination of \appfmt{bibtex} and -\appfmt{makeindex}\slash\appfmt{xindy}. -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. (You can convert an -existing \texttt{.tex} file containing glossary definitions to a -\texttt{.bib} file using \app{convertgls2bib}, supplied with -\gls{bib2gls}.) +\cmddef{glsifattribute} +As \gls{glsifcategoryattribute} but the category is obtained from +the given entry. This command can't be used to test an attribute +associated with a multi-entry category. + +\cmddef{glsifregularcategory} +A shortcut that tests if the given category has the +\catattr{regular} attribute set to \code{true}. + +\cmddef{glsifnotregularcategory} +A shortcut that tests if the given category has the +\catattr{regular} attribute set to \code{false}. + +\begin{warning} +If the \catattr{regular} attribute hasn't been set, both +\gls{glsifregularcategory} and \gls{glsifnotregularcategory} will do +\meta{false}. The choice of command needs to be determined by what +outcome should occur if the attribute hasn't been set. +\end{warning} + +\cmddef{glsifregular} +As \gls{glsifregularcategory} but the category is obtained from +the given entry. This command can't be used to test an attribute +associated with a multi-entry category. + +\cmddef{glsifnotregular} +As \gls{glsifnotregularcategory} but the category is obtained from +the given entry. This command can't be used to test an attribute +associated with a multi-entry category. + +\cmddef{glsifcategoryattributetrue} +Expands to \meta{true} if the attribute is \code{true} and +\meta{false} otherwise. Expands to \meta{false} if there's no such +attribute for the given category. + +\cmddef{glsifattributetrue} +As \gls{glsifcategoryattributetrue} but the category is obtained from +the given entry. Expands to \meta{false} if the entry isn't defined. +This command can't be used to test an attribute +associated with a multi-entry category. + +\cmddef{glsifcategoryattributehasitem} +Does \meta{true} if the category has the attribute (whose +value is a comma-separated list) contains the given item and \meta{false} +otherwise. Does \meta{false} if there's +no such attribute for the given category. The item and list are +expanded and passed to \sty{datatool}['s] \gls{DTLifinlist} to +perform the test. + + +\chapter{\apptext{bib2gls}: Managing Reference Databases} +\label{sec:bib2gls}\glsadd[format=(]{app.bib2gls} + +The command line application \app{bib2gls} performs two functions in +one: +\begin{itemize} +\item selects entries according to \records\ found in the \ext+{aux} file +(similar to \BibTeX), +\item hierarchically sorts entries and collates \idxpl{locationlist} +(similar to \app{makeindex} or \app{xindy}). +\end{itemize} +Instead of storing all your entry definitions in a \ext+{tex} and +loading them using \gls{input} or \gls{loadglsentries}, the entries +can instead be stored in a \ext+{bib} file and \app{bib2gls} can +selectively write the appropriate commands to a \ext+{glstex} +file which is loaded using \gls{GlsXtrLoadResources}. + +This means that you can use a reference managing system 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 \ext{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. (You can convert an existing \ext{tex} file +containing glossary definitions to a \ext{bib} file using +\app{convertgls2bib}, supplied with \app{bib2gls}.) There are some new commands and options added to -\styfmt{glossaries-extra} to help assist the integration of -\gls{bib2gls} into the document build process. +\sty{glossaries-extra} to help assist the integration of +\app{bib2gls} into the document build process. -This chapter just provides a general overview of \gls{bib2gls}. +This chapter just provides a general overview of \app{bib2gls}. The full details and some sample documents are provided -in the \gls{bib2gls} \href{http://mirrors.ctan.org/support/bib2gls/bib2gls.pdf}{manual}. - -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[hybrid]{record} and continue to use \cs{makeglossaries} -and \cs{printglossary} (or \cs{printglossaries}), but you also need -to instruct \gls{bib2gls} to omit sorting to save time and -to prevent the \gloskey{sort} key from being set. - -The \texttt{.glstex} file created by \gls{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 (recommended over the above) that sets \meta{filename} to use \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.} - -Since the \texttt{.glstex} file 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 the entries are -undefined at this point. Once \gls{bib2gls} has created the -\texttt{.glstex} file the references should be resolved. +in the \app{bib2gls} \ctansupportmirror{bib2gls/bib2gls.pdf}{manual} +\texdocref{bib2gls} + +\hypertarget{examplebib}{}An example of the contents of \ext{bib} file that stores +glossary entries that can be extracted with \app{bib2gls} called, +say, \filefmt{terms.bib}: +\newcommand{\termsbibcontent}{% +\atentry{entry}\marg{bird,\newline\space + \gloskeyval{name}{bird},\newline\space + \gloskeyval{description}{feathered animal},\newline\space + \gloskeyval{see}{[see also]duck,goose}\newline +} +\codepar +\atentry{entry}\marg{duck,\newline\space + \gloskeyval{name}{duck},\newline\space + \gloskeyval{description}{a waterbird with short legs}\newline +} +\codepar +\atentry{entry}\marg{goose,\newline\space + \gloskey{name}=\glsquote{goose},\newline\space + \gloskey{plural}=\glsquote{geese},\newline\space + \gloskeyval{description}{a waterbird with a long neck}\newline +}% +}% +\begin{codebox} +\termsbibcontent +\end{codebox}% +The following provides some abbreviations in a file called, +say, \filefmt{abbrvs.bib}: +\newcommand{\abbrvsbibcontent}{% +\atentry{string}\marg{ssi=\marg{server-side includes}}\newline +\atentry{string}\marg{html=\marg{hypertext markup language}} +\codepar +\atentry{abbreviation}\marg{shtml,\newline\space + \gloskey{short}=\glsquote{shtml},\newline\space + \gloskey{long}= ssi \# \glsquote{ enabled } \# html,\newline\space + \gloskeyval{description}{a combination of \gls{gls}\marg{html} and +\gls{gls}\marg{ssi}}\newline +} +\codepar +\atentry{abbreviation}\marg{html,\newline\space + \gloskey{short} =\glsquote{html},\newline\space + \gloskey{long} = html,\newline\space + \gloskeyval{description}{a markup language for creating web +pages}\newline +} +\codepar +\atentry{abbreviation}\marg{ssi,\newline\space + \gloskey{short}=\glsquote{ssi},\newline\space + \gloskey{long} = ssi,\newline\space + \gloskeyval{description}{a simple interpreted server-side +scripting language}\newline +}% +\codepar +\atentry{abbreviation}\marg{xml,\newline\space + \gloskey{short}=\marg{xml}, + \gloskey{long}=\marg{extensible markup language}, + \gloskey{description}=\marg{a simple text-base format for + representing structured information} +}% +}% +\begin{codebox} +\abbrvsbibcontent +\end{codebox}% +The above defines \ext{bib} strings (with \atentry{string}) and uses +string concatenation (with \code{\#}), which is a \BibTeX\ +feature. Another supported \ext{bib} feature is \atentry{preamble}, +which may be used to provide command definitions. + +Here are some symbols in a file called, +say, \filefmt{symbols.bib}: +\newcommand{\symbolsbibcontent}{% +\atentry{preamble}\marg{\glsquote{\cmd{providecommand}\marg{\cmd{mtx}}[1]\marg{\cmd{boldsymbol}\marg{\#1}}}} +\codepar +\atentry{symbol}\marg{M,\newline\space + \gloskeyval{name}{\cmd{ensuremath}\marg{\cmd{mtx}\marg{M}}},\newline\space + \gloskeyval{description}{a matrix}\newline +} +\codepar +\atentry{symbol}\marg{v,\newline\space + \gloskeyval{name}{\cmd{ensuremath}\marg{\cmd{vec}\marg{v}}},\newline\space + \gloskeyval{description}{a vector}\newline +} +\codepar +\atentry{symbol}\marg{S,\newline\space + \gloskeyval{name}{\cmd{ensuremath}\marg{\cmd{mathcal}\marg{S}}},\newline\space + \gloskeyval{description}{a set}\newline +}% +} +\begin{codebox} +\symbolsbibcontent +\end{codebox}% + +To ensure that \app{bib2gls} can find out which entries have been +used in the document, you need the \opt{record} package option: +\begin{codebox} +\cmd{usepackage}\oarg{\opt{record}}\marg{glossaries-extra} +\end{codebox} +If you are using \sty{hyperref}, you may prefer to use +\opteqvalref{record}{nameref}. + +The \ext{glstex} file created by \app{bib2gls} is loaded using: +\cmddef{glsxtrresourcefile} +where \meta{basename} is the basename (without the extension) of the +\ext{glstex} file. This command will redefine \gls{glsindexingsetting} +to \code{bib2gls} (or \code{bib2gls-xindy} or +\code{bib2gls-makeindex} if \opteqvalref{record}{hybrid}). +There's a shortcut version: +\cmddef{GlsXtrLoadResources} +This internally uses \gls{glsxtrresourcefile} and sets the +\meta{basename} to \gls{jobname} in the first instance and to +\code{\gls{jobname}-\meta{n}} on subsequent instances (where +\meta{n} is incremented at the end of every \gls{GlsXtrLoadResources}). +For example: +\begin{codebox} +\cmd{usepackage}\oarg{record}\marg{glossaries-extra} +\gls{GlsXtrLoadResources}\oarg{\resourceoptvalm{src}{terms,moreterms}} +\gls{GlsXtrLoadResources}\oarg{\resourceoptvalm{src}{symbols,constants}} +\gls{GlsXtrLoadResources}\oarg{\resourceoptvalm{src}{abbreviations}} +\end{codebox} +is equivalent to: +\begin{codebox} +\cmd{usepackage}\oarg{record}\marg{glossaries-extra} +\gls{glsxtrresourcefile}\oarg{\resourceoptvalm{src}{terms,moreterms}}\marg{\gls{jobname}} +\gls{glsxtrresourcefile}\oarg{\resourceoptvalm{src}{symbols,constants}}\marg{\gls{jobname}-1} +\gls{glsxtrresourcefile}\oarg{\resourceoptvalm{src}{abbreviations}}\marg{\gls{jobname}-2} +\end{codebox} +If required, the value of \meta{n} is stored in the count register: +\cmddef{glsxtrresourcecount} +although there should be little need to use this. + +\begin{information} +Since \gls{GlsXtrLoadResources} is more convenient to use than +\gls{glsxtrresourcefile}, all examples use +\gls{GlsXtrLoadResources}. +\end{information} + +The \gls{glsxtrresourcefile} command writes the following to +the \ext{aux} file: +\cmddef{glsxtr@resource} +and will input \metafilefmt{}{filename}{.glstex} if it exists. +(Version 1.08 assumed \metafilefmt{}{filename}{.tex} but that's +potentially dangerous if, for example, \meta{filename} happens to be +the same as \gls{jobname}. The \ext+{glstex} extension was enforced +by version 1.11.) + +If you are using or developing a build system that needs to know +which applications to run as part of the document build, you can +search the \ext{aux} for for instances of \gls{glsxtr@resource}. For +example, using \app{arara}: +\begin{codebox} +\% arara: bib2gls if found("aux", "glsxtr@resource") +\end{codebox} + +Since the \ext{glstex} file won't exist on the first \LaTeX\ run, the +\opt{record} package option additionally switches on +\opteqvalref{undefaction}{warn}. Any use of commands like \gls{gls} or +\gls{glstext} will produce \idx{unknowntag} in the document, since the entries are +undefined at this point. Once \app{bib2gls} has created the +\ext{glstex} file the references should be resolved. This may cause a shift in the locations if the actual text produced once the entry is defined is significantly larger than the -placeholder ?? (as this can alter the page breaking). +placeholder \idx{unknowntag} (as this can alter the page breaking). + +Note that as from v1.12, \gls{glsxtrresourcefile} temporarily +switches the category code of \code{@} to 11 (letter) while it +reads the file to allow for any internal commands. + +\begin{information} +The package options \opteqvalref{record}{only} and +\opteqvalref{record}{nameref} automatically load +\sty{glossaries-extra-bib2gls}, which provides additional commands +that are useful with \app{bib2gls}. Since they cover sorting and +\idxpl{locationlist}, they're not relevant with the +\opteqvalref{record}{hybrid} option. +\end{information} + +These commands are provided by \sty{glossaries-extra} +for use with \app{bib2gls}. + +The information provided with \gls{GlsXtrLoadResources} +is written to the \ext{aux} file using: +\begin{compactcodebox} +\cmd{protected@write}\cmd{@auxout}\marg{\gls{glsxtrresourceinit}}\margm{information} +\end{compactcodebox} +where \meta{information} is the information to pass to +\app{bib2gls}. The command in the second argument: +\cmddef{glsxtrresourceinit} +may be used to temporarily redefine commands before the +information is written to the file. This does nothing +by default, but may be redefined to allow the use of +short commands for convenience. For example, with: +\begin{codebox} +\cmd{renewcommand}\marg{\gls{glsxtrresourceinit}}\marg{\cmd{let}\gls{u}\gls{glshex}} +\end{codebox} +you can just use, for example, \code{\gls{u} E6} instead of +\code{\gls{string}\gls{u}E6} in the custom rule. This redefinition of \gls{u} +is scoped so its original definition is restored after the write operation. + +\cmddef{glsxtrMFUsave} +If you have \sty{mfirstuc} v2.08+, this command will be used on the +first instance of \gls{glsxtrresourcefile}, and will add +\gls{MFUsave} to the begin document hook and then disable itself. +This is provided to help \app{bib2gls} v3.0+ pick up any of +\sty{mfirstuc}['s] exclusions, blockers and mappings to assist with +its \idx{sentencecase} function. The assumption is that all +exclusions, blockers and mappings will be set up in the preamble. If +there are any within the \env{document} environment that you want +\app{bib2gls} to be aware of, redefine this command to do nothing +before the first instance of \gls{glsxtrresourcefile} (or +\gls{GlsXtrLoadResources}) and use \gls{MFUsaveatend} instead. -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. +If you have multiple resource commands and you want a default set of +options you can supply them in the definition of: +\cmddef{GlsXtrDefaultResourceOptions} +For example: +\begin{codebox} +\cmd{renewcommand}\marg{\gls{GlsXtrDefaultResourceOptions}}\marg{\resourceoptval{selection}{all}} +\end{codebox} +This should be done before the resource commands to which the +options should apply. + +\section{Indexing (Recording)} +\label{sec:bib2glsindexing} + +As with \app{makeindex} and \app{xindy}, the \idx{glslike} and +\idx{glstextlike} commands automatically index, but the underlying +\idx{indexing} mechanism is more like that used with +\gls{makenoidxglossaries}. Each indexing instance creates a \record\ +in the \ext+{aux} file, which \app{bib2gls} can then pick up when it +parses the \ext{aux} file. Each record has an associated format (the +\idx{locationencap}) which can be set with the \glsopt{format} key +and an associated \idx{locationcounter} (as with the other indexing +methods). + +The formatted \idx{locationlist} is stored in the \gloskey{location} +field (unless \resourceoptval{save-locations}{false}). Additionally, +the individual locations are stored in the \glosfield{loclist} field as +an \sty{etoolbox} internal list (as with \gls{makenoidxglossaries}). +This may be used to pick out individual locations to avoid the +complexity of parsing the formatted list. + +See the \app{bib2gls} manual for information on how to separate the +\idx{locationlist} into groups associated with different counters. \section{Selection} \label{sec:bib2glsselection} -The default behaviour is for \gls{bib2gls} to select all entries -that have a record in the \texttt{.aux} file, and any dependent -entries (including parent and cross-references). The -\texttt{glsignore} format (for example, -\verb|\gls[format=glsignore]{duck}|) is recognised by \gls{bib2gls} -as a special ignored record. This means that it will match -the selection criteria but the record won't be added to -the location list. This means that you won't get spurious -commas in the location list (as can happen with the other indexing +The default behaviour is for \app{bib2gls} to select all entries +that have a \record\ in the \ext{aux} file, and any dependent +entries (including parent and cross-references). The +\code{glsignore} format (for example, +\code{\gls{gls}\oarg{\glsoptval{format}{glsignore}}\marg{duck}}) is +recognised by \app{bib2gls} as a special +\idxc{ignoredlocation}{ignored record}. This means that it will +match the selection criteria but the record won't be added to the +location list. This means that you won't get spurious commas in the +\idx{locationlist} (as can happen with the other \idx{indexing} methods), so you can do, for example, -\begin{verbatim} -\GlsXtrSetDefaultNumberFormat{glsignore} -\end{verbatim} +\begin{codebox} +\gls{GlsXtrSetDefaultNumberFormat}\marg{glsignore} +\end{codebox} at the start of the front matter and -\begin{verbatim} -\GlsXtrSetDefaultNumberFormat{glsnumberformat} -\end{verbatim} +\begin{codebox} +\gls{GlsXtrSetDefaultNumberFormat}\marg{glsnumberformat} +\end{codebox} at the start of the main matter to prevent any records in the -front matter from occurring in the location lists. - -\begin{important} -Note that commands like \cs{glsaddall} and \cs{glsaddallunused} don't work with \gls{bib2gls} as the command -has to iterate over the internal lists of defined entry labels, which will be empty on the first -run and on subsequent runs will only contain those entries that have -been selected by \gls{bib2gls}. -\end{important} - -If you want to add all -entries to the glossary, you need to tell \gls{bib2gls} this in the -options list. For example: -\begin{verbatim} -\GlsXtrLoadResources[src={terms},selection={all}] -\end{verbatim} -This will add all entries, regardless of whether or not they -have any records in the \texttt{.aux} file. Those that don't -have any records will have an empty location list. -See the \gls{bib2gls} user manual for more details of this option. +front matter from occurring in the \idxpl{locationlist}. + +\begin{warning} +Commands like \gls{glsaddall} and \gls{glsaddallunused} don't work +with \app{bib2gls} as the command has to iterate over each +\idx{glossary}['s] internal lists of defined entry labels, which +will be empty on the first run and on subsequent runs will only +contain those entries that have been selected by \app{bib2gls}. +Use \resourceoptval{selection}{all} to select all entries instead. +\end{warning} + +The \resourceopt{selection} option indicates which entries should be +selected from the \ext{bib} files (listed in \resourceopt{src}). +For example, \resourceoptval{selection}{all} indicates to select all +entries, regardless of whether or not the entries have been +referenced in the document. This will lead to empty +\idxpl{locationlist} for some (or all) entries. +The default setting is \resourceoptval{selection}{recorded and +deps}, which indicates to select all entries that have \records\ and +any dependent entries. See the \app{bib2gls} user manual for more +details of this option. \section{Sorting and Displaying the Glossary} \label{sec:bib2glssortprint} -There are many sorting options provided by \gls{bib2gls}. +With \app{makeindex} and \app{xindy}, the terms (read from the +associated input file) are sorted and the code to typeset the +\idx{glossary} is written to an output file, which is then input by +\gls{printglossary}. With \app{bib2gls}, the entries supplied in the +\ext{bib} files are sorted and the entry definition code +(\gls{longnewglossaryentry} or \gls{newabbreviation}) is written to +the \ext{glstex} file in the order obtained by sorting. This means +that the \idx{glossary}['s] internal list is in the required order, +so the \idx{glossary} can be displayed with +\gls{printunsrtglossary} (see \sectionref{sec:printunsrt}). + +The \idx{indexing} information, such as the \idx{locationlist} or +letter groups, is stored in fields such as \gloskey{location} or +\gloskey{group} (where applicable), so the information can be +included by \gls{printunsrtglossary}, but it means that the +information is also available for use elsewhere in the document (so +the \opt{savenumberlist} package option provided by \sty{glossaries} +is redundant). + +There are many sorting options provided by \app{bib2gls}. The default is to sort according to the system locale. If the document has a language setting, you can use -\texttt{sort=doc} to instruct \gls{bib2gls} to sort according to -that. (The language tag obtained from \sty{tracklang}'s -interface is written to the \texttt{.aux} file.) For a multilingual +\resourceoptval{sort}{doc} to instruct \app{bib2gls} to sort according to +that. (The language tag obtained from \sty{tracklang}['s] +interface is written to the \ext{aux} file.) For a multilingual document you need to explicitly set the locale using a well-formed language tag. For example: -\begin{verbatim} -\GlsXtrLoadResources[ - src=terms, % data in terms.bib - sort=de-DE-1996 % sort according to this locale -] -\end{verbatim} -The locale-sensitive sort methods usually ignore most +\begin{codebox} +\gls{GlsXtrLoadResources}\oarg{ + \resourceoptval{src}{terms}, \comment{ data in terms.bib} + \resourceoptval{sort}{de-DE-1996} \comment{ sort according to this locale} +} +\end{codebox} +The locale-sensitive sort methods usually ignore most punctuation so for lists of symbols you may find it more appropriate to use one of the letter-base sort methods that sort according to the Unicode value of each character. Alternatively you can provide a custom rule. -See the \gls{bib2gls} manual for full details of all the available +See the \app{bib2gls} manual for full details of all the available sort methods. -Since the \texttt{.glstex} file only defines those references -required -within the document (selected according to the \texttt{selection} -option) and the definitions have been written in the -order corresponding to \gls{bib2gls}['s] 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} +Suppose the \ext{bib} examples shown \hyperlink{examplebib}{earlier} +have been stored in the files \filefmt{terms.bib}, +\filefmt{abbrvs.bib} and \filefmt{symbols.bib} which may either be in +the current directory or on \TeX's path. Then the document might +look like: +\begin{codebox} +\cmd{documentclass}\marg{article} +\codepar +\cmd{usepackage}\oarg{record}\marg{glossaries-extra} +\codepar +\gls{setabbreviationstyle}\marg{\abbrstyle{long-short-sc-desc}} +\codepar +\gls{GlsXtrLoadResources}\oarg{\resourceoptval{src}{terms,abbrvs,symbols}} +\codepar +\cbeg{document} +\gls{gls}\marg{bird} +\codepar +\gls{gls}\marg{shtml} +\codepar +\gls{gls}\marg{M} +\codepar +\gls{gls}\marg{printunsrtglossaries} +\cend{document} +\end{codebox} The document build process (assuming the document is called -\texttt{mydoc}) is: -\begin{verbatim} +\filefmt{mydoc}) is: +\begin{terminal} pdflatex mydoc bib2gls mydoc pdflatex mydoc -\end{verbatim} +\end{terminal} +\begin{resultbox} +\createexample*[ + label={ex:bib2gls}, +title={Using \appfmt{bib2gls}: one resource set}, +description={Example document using bib2gls with one resource set}, +arara={pdflatex,bib2gls,pdflatex,pdfcrop} +] +{\cbeg{filecontents*}{terms.bib}^^J% +\termsbibcontent^^J% +\cend{filecontents*}^^J% +\cbeg{filecontents*}{abbrvs.bib}^^J% +\abbrvsbibcontent^^J% +\cend{filecontents*}^^J% +\cbeg{filecontents*}{symbols.bib}^^J% +\symbolsbibcontent^^J% +\cend{filecontents*}^^J% +\cmd{usepackage}\oarg{record}\marg{glossaries-extra} +\codepar +\gls{setabbreviationstyle}\marg{long-short-sc-desc} +\codepar +\gls{GlsXtrLoadResources}\oarg{src=\marg{terms,abbrvs,symbols}} +\codepar +} +{\gls{gls}\marg{bird} +\codepar +\gls{gls}\marg{shtml} +\codepar +\gls{gls}\marg{M} +\codepar +\gls{printunsrtglossaries} +} +\end{resultbox} 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} +\code{bird}, \code{duck}, \code{goose}, +\code{html}, \code{M}, \code{shtml} and \code{ssi} (in that +order). The \code{bird}, \code{shtml} and \code{M} entries +were added because \app{bib2gls} detected (from the \ext{aux} file) that they had been used in the document. The other entries -were added because \gls{bib2gls} detected (from the \texttt{.bib} +were added because \app{bib2gls} detected (from the \ext{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. +\code{duck} and \code{goose}, they are in the \gloskey{see} +field for \code{bird}. In the case of \code{ssi} and +\code{html}, they are referenced in the \gloskey{description} +field of \code{shtml}. These cross-referenced entries won't have a +\idx{locationlist} when the \idx{glossary} is first displayed, but depending on +how they are referenced, they may pick up a \idx{locationlist} on the +next document build. The \code{xml} entry isn't required at all, and +so hasn't been defined (from LaTeX's point of view). 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] - -\GlsXtrLoadResources - [src={abbrvs},sort={letter-nocase},type=abbreviations] - -\GlsXtrLoadResources - [src={symbols},sort={use},type={symbols}] - -\begin{document} -\gls{bird} - -\gls{shtml} - -\gls{M} - -\printunsrtglossaries -\end{document} -\end{verbatim} - -Or you can have multiple instance of \cs{GlsXtrLoadResources} -with the same \texttt{type}, which will produce a glossary -with ordered sub-blocks. For example: -\begin{verbatim} -\documentclass{article} - -\usepackage[record,style=indexgroup]{glossaries-extra} - -\setabbreviationstyle{long-short-desc} - -\GlsXtrLoadResources - [src={abbrvs},sort={letter-nocase},type=main, - group={Abbreviations}] - -\GlsXtrLoadResources - [src={symbols},sort={use},type=main, - group={Symbols}] - -\GlsXtrLoadResources[src={terms},sort={en-GB},type=main] - -\begin{document} -\gls{bird} - -\gls{shtml} - -\gls{M} +\begin{codebox} +\cmd{usepackage}\oarg{\opt{record},\opt{abbreviations},\opt{symbols}}\marg{glossaries-extra} +\codepar +\gls{setabbreviationstyle}\marg{\abbrstyle{long-short-sc-desc}} +\codepar +\gls{GlsXtrLoadResources}\oarg{\resourceoptval{src}{terms},\resourceoptval{sort}{en-GB},\resourceoptval{type}{main}} +\codepar +\gls{GlsXtrLoadResources} + \oarg{\resourceoptval{src}{abbrvs},\resourceoptval{sort}{letter-nocase},\resourceoptval{type}{abbreviations}} +\codepar +\gls{GlsXtrLoadResources} + \oarg{\resourceoptval{src}{symbols},\resourceoptval{sort}{use},\resourceoptval{type}{symbols}} +\codepar +\cbeg{document} +\gls{gls}\marg{bird} +\codepar +\gls{gls}\marg{shtml} +\codepar +\gls{gls}\marg{M} +\codepar +\gls{printunsrtglossaries} +\cend{document} +\end{codebox} + +\begin{resultbox} +\createexample* +[title={Using \appfmt{bib2gls}: multiple resource sets}, + label={ex:bib2glsmultiresources}, +description={Example document using bib2gls with multiple resource sets}, +arara={pdflatex,bib2gls,pdflatex,pdfcrop} +] +{\cbeg{filecontents*}{terms.bib}^^J% +\termsbibcontent +\cend{filecontents*}^^J% +\cbeg{filecontents*}{abbrvs.bib}^^J% +\abbrvsbibcontent +\cend{filecontents*}^^J% +\cbeg{filecontents*}{symbols.bib}^^J% +\symbolsbibcontent^^J% +\cend{filecontents*}^^J% +\cmd{usepackage}\oarg{record,abbreviations,symbols}\marg{glossaries-extra} +\codepar +\gls{setabbreviationstyle}\marg{long-short-sc-desc} +\codepar +\gls{GlsXtrLoadResources}\oarg{src=terms,sort=en-GB,type=main} +\codepar +\gls{GlsXtrLoadResources} + \oarg{src=abbrvs,sort=letter-nocase,type=abbreviations} +\codepar +\gls{GlsXtrLoadResources} + \oarg{src=symbols,sort=use,type=symbols} +} +{\gls{gls}\marg{bird} +\codepar +\gls{gls}\marg{shtml} +\codepar +\gls{gls}\marg{M} +\codepar +\gls{printunsrtglossaries} +} +\end{resultbox} + + +Or you can have multiple instance of \gls{GlsXtrLoadResources} +with the same \resourceopt{type}, which will produce a +\idx{glossary} with ordered sub-blocks. For example: +\begin{codebox} +\cmd{usepackage}\oarg{\opt{record},\optval{style}{\glostyle{indexgroup}}}\marg{glossaries-extra} +\codepar +\gls{setabbreviationstyle}\marg{\abbrstyle{long-short-sc-desc}} +\codepar +\gls{GlsXtrLoadResources} + \oarg{\resourceoptval{src}{abbrvs},\resourceoptval{sort}{letter-nocase},\resourceoptval{type}{main}, + \resourceoptval{group}{abbreviations}} +\gls{glsxtrsetgrouptitle}\marg{abbreviations}\marg{Abbreviations} +\codepar +\gls{GlsXtrLoadResources} + \oarg{\resourceoptval{src}{symbols},\resourceoptval{sort}{use},\resourceoptval{type}{main}, + \resourceoptval{group}{symbols}} +\gls{glsxtrsetgrouptitle}\marg{symbols}\marg{Abbreviations} +\codepar +\gls{GlsXtrLoadResources}\oarg{\resourceoptval{src}{terms},\resourceoptval{sort}{en-GB},\resourceoptval{type}{main}} +\codepar +\cbeg{document} +\gls{gls}\marg{bird} +\codepar +\gls{gls}\marg{shtml} +\codepar +\gls{gls}\marg{M} +\codepar +\gls{printunsrtglossaries} +\cend{document} +\end{codebox} +This sets the \gloskey{group} field for each resource set to the +label given by the \resourceopt{group} resource option. -\printunsrtglossaries -\end{document} -\end{verbatim} This will result in a glossary where the first group has -the title \qt{Abbreviations}, the second group has the -title \qt{Symbols} and then follow the usual letter groups. -Note that for this example to work, you must run \gls{bib2gls} -with the \verb|--group| (or \verb|-g|) switch. For example, -if the document is called \texttt{myDoc.tex}: -\begin{verbatim} +the label \code{abbreviations} and title \qt{Abbreviations}, the second group has the +label \code{symbols} and title \qt{Symbols} and then follow the usual letter groups. +Note that for this example to work, you must run \app{bib2gls} +with the \switch{group} (or \switch{g}) switch. For example, +if the document is called \filefmt{myDoc.tex}: +\begin{terminal} pdflatex myDoc -bib2gls -g myDoc +bib2gls \switch{g} myDoc pdflatex myDoc -\end{verbatim} -The value of the \gloskey{group} field must always be a label. You -can set the corresponding title with \cs{glsxtrsetgrouptitle} +\end{terminal} +\begin{resultbox} +\createexample*[title={Using \appfmt{bib2gls}: sub-blocks}, + label={ex:bib2glssubblocks}, +description={Example document using bib2gls with multiple resource +sets for a single glossary to create a glossary with sub-blocks}, +arara={pdflatex,bib2gls: { group: on },pdflatex,pdfcrop} +] +{\cbeg{filecontents*}{terms.bib}^^J% +\termsbibcontent +\cend{filecontents*}^^J% +\cbeg{filecontents*}{abbrvs.bib}^^J% +\abbrvsbibcontent +\cend{filecontents*}^^J% +\cbeg{filecontents*}{symbols.bib}^^J% +\symbolsbibcontent^^J% +\cend{filecontents*}^^J% +\cmd{usepackage}\oarg{record,style=indexgroup}\marg{glossaries-extra} +\codepar +\gls{setabbreviationstyle}\marg{long-short-sc-desc} +\codepar +\gls{GlsXtrLoadResources}^^J + \oarg{src={abbrvs},sort=letter-nocase,type=main,^^J + group={abbreviations}}^^J% +\gls{glsxtrsetgrouptitle}\marg{abbreviations}\marg{Abbreviations} +\codepar +\gls{GlsXtrLoadResources}^^J + \oarg{src={symbols},sort=use,type=main,group=symbols}^^J% +\gls{glsxtrsetgrouptitle}\marg{symbols}\marg{Abbreviations} +\codepar +\gls{GlsXtrLoadResources}\oarg{src={terms},sort=en-GB,type=main} +} +{\gls{gls}\marg{bird} +\codepar +\gls{gls}\marg{shtml} +\codepar +\gls{gls}\marg{M} +\codepar +\gls{printunsrtglossaries} +} +\end{resultbox} + +\begin{important} +The value of the \gloskey{group} field must always be a label (so +avoid special characters). You +can set the corresponding title with \code{glsxtrsetgrouptitle} (see \sectionref{sec:glosstylemods}). If no title is set then the label is used as the group title. +\end{important} You can provide your own custom sort rule. For example, if you are using \XeLaTeX\ or \LuaLaTeX: -\begin{alltt} -\cs{GlsXtrLoadResources}[ - src=terms, % entries in terms.bib - sort=custom, % custom sort rule - sort-rule=\{% required with sort=custom - < \ae;\AE\ < a;\'a;\aa;\"a,\"A;\'A;\AA;\"A < b,B +\begin{codebox} +\gls{GlsXtrLoadResources}\oarg{ + \resourceoptvalm{src}{terms}, \comment{entries in terms.bib} + \resourceoptval{sort}{custom}, \comment{custom sort rule} + \resourceoptvalm{sort-rule}{\comment{required with sort=custom} + < \ae;\AE\ < a;\'a;\aa;\"a,\"A;\'A;\AA;\"A < b,B < c;\'c,C;\'C < d,D < e;\'e,E;\'E < f,F < g,G - < h,H < i;\'i,I;\'I < j,J < l;\l,L;\L < m,M < n,N - < o;\"o;\o,O;\"O;\O\ < p,P < q,Q < r,R < s;\'s,S;\'S + < h,H < i;\'i,I;\'I < j,J < l;\l,L;\L < m,M < n,N + < o;\"o;\o,O;\"O;\O\ < p,P < q,Q < r,R < s;\'s,S;\'S < t,T < u;\'u,U;\'U < v,V < w,W < x,X < y,Y < - z;\.z,Z;\.Z - \} -] -\end{alltt} -Remember that if you are using \sty{inputenc} then extended -characters, such as \'e or \o, are active and will expand when -written to the \texttt{.aux} file. So with PDF\LaTeX\ the -above would have to be changed to protect against expansion. -Some of the options, including \texttt{sort-rule}, + z;\.z,Z;\.Z + } +} +\end{codebox} + +\begin{warning} +With old versions of the \LaTeX\ kernel, \idx{utf8} characters, +such as \'e or \o, will expand when written to the \ext{aux} file. +\end{warning} + +Some of the options, including \resourceopt{sort-rule}, allow Unicode characters to be indicated in the format -\cs{u}\meta{hex} (or \cs{u}~\meta{hex}) \textbf{in the \texttt{.aux} file}. \gls{bib2gls} +\gls{u}\meta{hex} (or \gls{u}~\meta{hex}). \app{bib2gls} will recognise this as the character -given by the hexadecimal value \meta{hex}. The \cs{u} also needs -protection from expansion, so with a non-Unicode aware -engine, the character \ae\ needs to be written as -\texttt{\cs{string}\cs{u}E6} and so on. This is quite cumbersome, -but you can use the shortcut \texttt{\ics{glshex} E6} instead, so -the above needs to be written as: -\begin{alltt} -\cs{GlsXtrLoadResources}[ - src=terms, % entries in terms.bib - sort=custom, % custom sort rule - sort-rule=\{% required with sort=custom - < \cs{glshex} E6;\cs{glshex} C6 - < a;\cs{glshex} E1;\cs{glshex} E5,\cs{glshex} E4,A;\cs{glshex} C1;\cs{glshex} C5;\cs{glshex} C4 - < b,B < c;\cs{glshex} 0107,C;\cs{glshex} 0106 < d,D - < e;\cs{glshex} E9,E;\cs{glshex} C9 < f,F < g,G - < h,H < i;\cs{glshex} ED,I;\cs{glshex} CD < j,J - < l;\cs{glshex} 0142,L;\cs{glshex} 0141 < m,M < n,N - < o;\cs{glshex} F6;\cs{glshex} F8,O;\cs{glshex} D6;\cs{glshex} D8 - < p,P < q,Q < r,R < s;\cs{glshex} 013F,S;\cs{glshex} 015A - < t,T < u;\cs{glshex} FA,U;\cs{glshex} DA < v,V < w,W < x,X < y,Y - < z;\cs{glshex} 017C,Z;\cs{glshex} 017B - \}] -\end{alltt} - -\section{The \headingsty{glossaries-extra-bib2gls} package} -\label{sec:bib2glssty} - -The package option \pkgopt[only]{record} (or simply \pkgopt{record}) -automatically loads the supplementary package -\sty{glossaries-extra-bib2gls}, which provides some commands -that are specific to \gls{bib2gls}. The package isn't -loaded by \pkgopt[hybrid]{record} as that option is intended -for sorting with \gls{makeindex} or \gls{xindy} and it is expected -that the sorting will be switched off (with the resource option -\texttt{sort=none}). +given by the hexadecimal value \meta{hex}. -If \sty{glossaries-extra-bib2gls} is loaded via the -\pkgopt{record} package option then the check for associated -language resource files (see \sectionref{sec:lang}) will also -search for the existence of -\texttt{glossariesxtr-}\meta{script}\texttt{.ldf} for each -document dialect (where \meta{script} is the four letter -script identifier, such as \texttt{Latn}). - -This package provides some shortcut commands that use -\ics{printunsrtglossary} if the relevant package option has defined -the associated glossary: \ics{printunsrtabbreviations}, -\ics{printunsrtacronyms}, \ics{printunsrtsymbols}, -\ics{printunsrtnumbers} and \ics{printunsrtindex}. - -The \pkgopt{savenumberlist} package option doesn't have any effect -with \gls{bib2gls}. The location lists are saved by default, so -\sty{glossaries-extra-bib2gls} patches \ics{glsentrynumberlist} and -\ics{glsdisplaynumberlist} to work with the \gloskey{location} field - -\begin{definition}[\DescribeMacro\glsxtrprovidecommand] -\cs{glsxtrprovidecommand}\marg{cs}\oarg{n}\oarg{default}\marg{definition} -\end{definition} -This command is intended for use in \texttt{@preamble}. -It's simply defined to \cs{providecommand} in -\sty{glossaries-extra-bib2gls} but \gls{bib2gls}['s] interpreter -treats it as \cs{renewcommand}. This means that you can -override \gls{bib2gls}['s] internal definition of a command -without overriding the command definition in the document -(if it's already defined before the resource file is input). -For example -\begin{verbatim} -@preamble{"\glsxtrprovidecommand{\int}{integral}"} -\end{verbatim} -This will force \gls{bib2gls} to treat \cs{int} as the word -\qt{integral} to assist sorting but if this preamble code is written -to the \texttt{.glstex} file (as it is by default) then it won't -override the current definition (provided by the kernel or redefined -by a package). +\begin{important} +The \meta{options} provided to \gls{GlsXtrLoadResources} will expand +as they are written to the \ext{aux} file (unless protected). This +includes \gls{u}, so with a non-Unicode aware engine or where the +document source is required to be \idx{ascii}, the character \ae\ +needs to be written as \code{\gls{string}\gls{u} E6} and so on. +Alternatively, use the shortcut \code{\gls{string}\gls{u} E6}. +\end{important} -The helper commands in the resource files are defined using -\cs{providecommand}. For many of them, if you want to provide an -alternative definition then you need to define the command before -the resource file is loaded. There are a few that may be redefined -afterwards but if you use \cs{renewcommand} then you will get an -error on the first \LaTeX\ run when the \texttt{.glstex} file -doesn't exist. In this case, you may prefer to use: -\begin{definition}[\DescribeMacro\glsrenewcommand] -\cs{glsrenewcommand}\marg{cs}\oarg{n}\oarg{default}\marg{definition} -\end{definition} -This behaves like \cs{renewcommand} but only generates a warning -rather than an error if the command isn't already defined so it -won't interrupt the document build. +For example, the above can be rewritten as: +\begin{codebox} +\gls{GlsXtrLoadResources}\oarg{ + \resourceoptvalm{src}{terms}, \comment{entries in terms.bib} + \resourceoptval{sort}{custom}, \comment{custom sort rule} + \resourceoptvalm{sort-rule}{\comment{required with sort=custom} + < \gls{glshex} E6;\gls{glshex} C6 + < a;\gls{glshex} E1;\gls{glshex} E5,\gls{glshex} E4,A;\gls{glshex} C1;\gls{glshex} C5;\gls{glshex} C4 + < b,B < c;\gls{glshex} 0107,C;\gls{glshex} 0106 < d,D + < e;\gls{glshex} E9,E;\gls{glshex} C9 < f,F < g,G + < h,H < i;\gls{glshex} ED,I;\gls{glshex} CD < j,J + < l;\gls{glshex} 0142,L;\gls{glshex} 0141 < m,M < n,N + < o;\gls{glshex} F6;\gls{glshex} F8,O;\gls{glshex} D6;\gls{glshex} D8 + < p,P < q,Q < r,R < s;\gls{glshex} 013F,S;\gls{glshex} 015A + < t,T < u;\gls{glshex} FA,U;\gls{glshex} DA < v,V < w,W < x,X < y,Y + < z;\gls{glshex} 017C,Z;\gls{glshex} 017B + } +} +\end{codebox} -\begin{definition}[\DescribeMacro\GlsXtrIndexCounterLink] -\cs{GlsXtrIndexCounterLink}\marg{text}\marg{label} -\end{definition} -If the \ics{hyperref} command has been defined (that is, -\sty{hyperref} has been loaded before \styfmt{glossaries-extra}) -then this command checks for the existence of the -\texttt{indexcounter} field. If this field is set for the entry -given by \meta{label}, this command does -\cs{hyperref}\texttt{[wrglossary.\meta{value}]\marg{text}}, where -\meta{value} is the value of the \texttt{indexcounter} field. If the -field isn't set or if \cs{hyperref} hasn't been defined, this just -does \meta{text}. This command is provided for use with the -\pkgopt{indexcounter} package option combined with \gls{bib2gls}['s] -\texttt{save-index-counter} resource option. See the \gls{bib2gls} -manual for further details (at least version 1.4). - -If you use the \texttt{set-widest} resource option, \gls{bib2gls} -v1.8+ will now use: -\begin{definition}[\DescribeMacro\glsxtrSetWidest] -\cs{glsxtrSetWidest}\marg{type}\marg{level}\marg{text} -\end{definition} -(if it has been defined) to set the widest name for the given -glossary type and level. This allows for both the \glostyle{alttree} -style and the styles provided by \sty{glossary-longextra}, which -need to know the widest name. - -If \gls{bib2gls} can't determine the widest name (typically because -the name field consists of commands that aren't recognised by the -interpreter) then \gls{bib2gls} v1.8+ will now use: -\begin{definition}[\DescribeMacro\glsxtrSetWidestFallback] -\cs{glsxtrSetWidestFallback}\marg{max depth}\marg{list} -\end{definition} -(if defined). Currently the maximum hierarchical depth \meta{max -depth} may only be 0 or 2. This command requires commands provided -by the \sty{glossaries-extra-stylemods} package with the -\glostyle{alttree} style enabled. In this case, it may be simpler -to just use \ics{glssetwidest}. +\section{Record Counting} +\label{sec:recordcount} -\subsection{Supplemental Locations} -\label{sec:supplocations} +As from version 1.1 of \app{bib2gls}, you can save the total +record count for each entry by invoking \app{bib2gls} +with the \switch{record-count} or \switch{record-count-unit} +switches. These options will ensure that when each entry +is written to the \ext{glstex} file \app{bib2gls} will +additionally set the following internal fields for that entry: +\begin{itemize} +\item \glosfield{recordcount}: set to the total +number of \records\ found for the entry; +\item \glosfield{recordcount.counter}: set to the total +number of \records\ found for the entry for the given counter. +\end{itemize} +If \switch{record-count-unit} is used then additionally: +\begin{itemize} +\item \glosfield{recordcount.counter.location}: set to the total +number of \records\ found for the entry for the given counter with the +given location. +\end{itemize} +Only use the unit counting option if the locations don't contain any special +characters. With \sty{hyperref} use \theHcountername\ rather than +\thecountername. Otherwise, if you really need unit counting with locations +that may contain formatting commands, then you can try redefining: +\cmddef{glsxtrdetoklocation} +so that it detokenizes \meta{location} but take care when +using \gls{GlsXtrLocationRecordCount} with commands like +\gls{thepage} as they can end up becoming detokenized too early. + +Note that the record count includes \locations\ that \app{bib2gls} +discards, such as \idxc{ignoredlocation}{ignored records}, duplicates and partial +duplicates (unless you filter them out with +\switch{record-count-rule}). It doesn't include cross-reference records. For +example, suppose a document has an entry with the label \code{bird} +that is \recorded\ (\indexed) as follows: +\begin{description} +\item[Page 1] two (2) instances of \code{\gls{gls}\marg{bird}}; +\item[Page 2] one (1) instance of \code{\gls{gls}\marg{bird}}; +\item[Page 3] four (4) instances of \code{\gls{gls}\marg{bird}}; +\item[Section 3] one (1) instance of +\code{\gls{gls}\oarg{\glsoptval{counter}{section}}\marg{bird}}. +\end{description} -\begin{definition}[\DescribeMacro\glsxtrdisplaysupploc] -\cs{glsxtrdisplaysupploc}\marg{prefix}\marg{counter}\marg{format}\marg{src}\marg{location} -\end{definition} -This is used by \gls{bib2gls} version 1.7+ for supplemental -locations, instead of using \cs{glsxtrsupphypernumber} with the -\catattr{externallocation} attribute. This command sets up the -location counter and prefix (used in the formation of hyperlinks) -and then uses -\begin{definition}[\DescribeMacro\glsxtrmultisupplocation] -\cs{glsxtrmultisupplocation}\marg{location}\marg{src}\marg{format} -\end{definition} -to format the actual location (with an external hyperlink, if -supported). +Then the total record count (stored in +the \glosfield{recordcount} field) is $2+1+4+1=8$, the total for the +\ctr{page} counter (stored in the +\glosfielddisp{recordcount.counter}{recordcount.page} field) is +$2+1+4=7$, and the total for the \ctr{section} counter (stored in +the \glosfielddisp{recordcount.counter}{recordcount.section} field) +is~1. -\subsection{Nameref Record} -\label{sec:recordnameref} +With the unit counting on as well, the following fields are assigned: +\begin{itemize} +\item \glosfielddisp{recordcount.counter.location}{recordcount.page.1} is +set to 2; +\item \glosfielddisp{recordcount.counter.location}{recordcount.page.2} is +set to 1; +\item \glosfielddisp{recordcount.counter.location}{recordcount.page.3} is +set to 4; +\item \glosfielddisp{recordcount.counter.location}{recordcount.section.3} +is set to~1. +\end{itemize} -Normally locations are recorded in the \texttt{.aux} file -in the form: -\begin{definition} -\cs{glsxtr@record}\marg{label}\marg{prefix}\marg{counter}\marg{format}\marg{location} -\end{definition} -The \pkgopt[nameref]{record} option, which requires at least -\gls{bib2gls} v1.8, instead uses: -\begin{definition} -\cs{glsxtr@record@nameref}\marg{label}\marg{prefix}\marg{counter}\marg{format}\marg{location}\marg{title}\marg{href}\marg{hcounter} -\end{definition} -where \meta{title} is obtained from \cs{@currentlabelname} -and \meta{href} is obtained from \cs{@currentHref}. These -commands require \sty{hyperref}. If they are undefined, -\meta{title} and \meta{href} will be left empty and \gls{bib2gls} -will treat it as a regular record. +You can access these fields using the following commands which +will expand to the field value if set or to 0 if unset: +\cmddef{GlsXtrTotalRecordCount} +This expands to the total record count for the entry given by +\meta{label}. For example: +\begin{codebox} +\gls{GlsXtrTotalRecordCount}\marg{bird} +\end{codebox} +expands to 8. -\begin{important} -Be careful with this option as \meta{href} will globally change on every -instance of \cs{refstepcounter} but \meta{title} won't necessarily -change. It can therefore cause unexpected behaviour. -\end{important} +\cmddef{GlsXtrRecordCount} +This expands to the \idxc{locationcounter}{counter} total for the entry given by +\meta{entry-label} where \meta{counter} is the counter name. +For example: +\begin{codebox} +\gls{GlsXtrRecordCount}\marg{bird}\marg{\ctr{page}} +\end{codebox} +expands to 7 and +\begin{codebox} +\gls{GlsXtrRecordCount}\marg{bird}\marg{\ctr{section}} +\end{codebox} +expands to 1. -The final argument \meta{hcounter} is obtained from -\cs{theH}\meta{counter} which provides the partial target name associated -with the indexing counter. With the original -\gls{makeindex}\slash \gls{xindy} approach, it's not possible to -include this information in the location, so the base -\sty{glossaries} package attempts to derive a prefix from which the -\meta{hcounter} value can be reconstituted by appending the prefix. -Unfortunately, not all definitions of \cs{theH}\meta{counter} are in -the form \meta{prefix}\cs{the}\meta{counter} (most notably the -\ctr{equation} counter with chapters) so this can fail. +\cmddef{GlsXtrLocationRecordCount} +This expands to the total for the given \location. For example +\begin{codebox} +\gls{GlsXtrLocationRecordCount}\marg{bird}\marg{\ctr{page}}\marg{3} +\end{codebox} +expands to 4. Be careful about using \gls{thepage} in the +\meta{location} part. Remember that due to \TeX's asynchronous +output routine, \gls{thepage} may not be correct. -Since \gls{bib2gls} is customized specifically for use with -\styfmt{glossaries-extra}, it's now possible to save -\meta{hcounter}, so the \pkgopt[nameref]{record} option does this. -By providing both \meta{href} and \meta{hcounter}, you can determine -which target you would rather use. The default is to use -\meta{hcounter}, which will take you to the place where the -corresponding counter was incremented with \cs{refstepcounter}. -However, you may choose to switch to using the \meta{href} target, -which will take you to the nearest target before the indexing took -place. +There are commands analogous to the entry counting commands like +\gls{cgls} and \gls{cglsformat} that are triggered by the record count. +These are listed below. The test to determine if the entry's record count +exceeds the trigger value (which should be stored in the +\catattr{recordcount} attribute) is obtained with: +\cmddef{glsxtrifrecordtrigger} +If the \catattr{recordcount} attribute is set and \meta{total} +exceeds the value given by the \catattr{recordcount} attribute, then +this does \meta{true} otherwise it does \meta{false}. The +\meta{total} is given by: +\cmddef{glsxtrrecordtriggervalue} +This should expand to the record count value that needs testing. The +default definition is: +\begin{compactcodebox} +\cmd{newcommand}*\marg{\gls{glsxtrrecordtriggervalue}}[1]\marg{\% + \gls{GlsXtrTotalRecordCount}\marg{\#1}\% +} +\end{compactcodebox} +This command may be redefined as appropriate. For example, it may be +redefined to use \gls{GlsXtrRecordCount} for a particular +\idx{locationcounter} or to use \gls{GlsXtrLocationRecordCount} for +a particular location. + +The \catattr{recordcount} attribute may be set with +\gls{glssetcategoryattribute} or can be set for each listed category +with: +\cmddef{GlsXtrSetRecordCountAttribute} +The value must be an integer. + +Commands like \gls{rgls} behave slightly differently to \gls{cgls}. +It's necessary for the command to add a \record\ to the \ext{aux} +file in order for the entry to be selected and for the record count +to be correct on the next \app{bib2gls}+\LaTeX\ run (for the default +\resourceoptvalm{selection}{recorded and deps}). The trigger record +is created with \glsoptval{format}{glstriggerrecordformat}, +which \app{bib2gls} v1.1+ recognises as a special type of +\idx{ignoredlocation} format. This corresponds to the command: +\cmddef{glstriggerrecordformat} +As with \gls{glsignore}, this command does nothing and is considered +an ignored record (so it won't appear in the \idx{locationlist}), +but it indicates to \app{bib2gls} that the entry must be selected +and, if the \resourceopt{trigger-type} option has been set, the +entry will be assigned to the \resourceopt{trigger-type} glossary. + +For example, to assign the entry to an \idx{ignoredglossary}: +\begin{codebox} +\gls{newignoredglossary}\marg{ignored} +\gls{GlsXtrLoadResources}\oarg{\resourceoptval{trigger-type}{ignored}} +\end{codebox} +This ensures that the entry is defined but it won't show up the +normal glossary. + +\begin{information} +The \idx{postlinkhook} won't be implemented if the record trigger is +tripped. (That is, if the \gls{rglsformat}-like command is used instead of +the \idx{glslike} command.) +\end{information} + +\cmddef{rgls} +If the value has been supplied by the \catattr{recordcount} +attribute and is exceeded, this behaves like \gls{gls} otherwise it +creates a trigger record and uses: +\cmddef{rglsformat} +This has the same definition as \gls{cglsformat}. + +\cmddef{rglspl} +If the value has been supplied by the \catattr{recordcount} +attribute and is exceeded, this behaves like \gls{glspl} otherwise +it creates a trigger record and uses: +\cmddef{rglsplformat} +which uses the appropriate plural fields. + +\cmddef{rGls} +If the value has been supplied by the \catattr{recordcount} +attribute and is exceeded, this behaves like \gls{Gls} otherwise it +creates a trigger record and uses: +\cmddef{rGlsformat} +which performs the appropriate case-change. + +\cmddef{rGlspl} +If the value has been supplied by the \catattr{recordcount} +attribute and is exceeded, this behaves like \gls{Glspl} otherwise +it creates a trigger record and uses: +\cmddef{rGlsplformat} +which uses the appropriate plural fields and case-change. + +\cmddef{rGLS} +If the value has been supplied by the \catattr{recordcount} +attribute and is exceeded, this behaves like \gls{GLS} otherwise it +creates a trigger record and uses: +\cmddef{rGLSformat} +which performs the appropriate case-change. + +\cmddef{rGLSpl} +If the value has been supplied by the \catattr{recordcount} +attribute and is exceeded, this behaves like \gls{GLSpl} otherwise +it creates a trigger record and uses: +\cmddef{rGLSplformat} +which uses the appropriate plural fields and case-change. + +To make it easier to switch on record counting for an existing +document, you can use: +\cmddef{glsxtrenablerecordcount} +This redefines \gls{gls}, \gls{glspl}, \gls{Gls}, \gls{Glspl}, +\gls{GLS}, \gls{GLSpl} to \gls{rgls}, \gls{rglspl}, \gls{rGls}, +\gls{rGlspl}, \gls{rGLS}, \gls{rGLSpl}, respectively, for +convenience. This command will also switch the shortcut commands +such as \gls{ac} or \gls{ab}, if they have been enabled, from using +the \gls{cgls}-like commands to the corresponding \gls{rgls} +command. + +For example, using the earlier +\hypertarget{examplebib}{\filefmt{terms.bib}, \filefmt{abbrvs.bib} +and \filefmt{symbols.bib}} example files: +\begin{codebox} +\cmd{documentclass}\marg{article} +\codepar +\cmd{usepackage}\oarg{colorlinks}\marg{hyperref} +\cmd{usepackage}\oarg{\opt{record}}\marg{glossaries-extra} +\codepar +\gls{newignoredglossary}\marg{ignored} +\codepar +\gls{setabbreviationstyle}\marg{\abbrstyle{long-short-sc-desc}} +\gls{GlsXtrLoadResources}\oarg{ + \resourceoptvalm{src}{terms,abbrvs,symbols}, + \resourceoptval{trigger-type}{ignored}, + \resourceoptvalm{category}{same as entry} +} +\codepar +\gls{glsxtrenablerecordcount} +\gls{GlsXtrSetRecordCountAttribute}\marg{\cat{general},\cat{abbreviation}}\marg{1} +\codepar +\gls{glsdefpostlink}\marg{entry}\marg{\gls{glsxtrpostlinkAddDescOnFirstUse}} +\gls{glsdefpostlink}\marg{\cat{symbol}}\marg{\gls{glsxtrpostlinkAddDescOnFirstUse}} +\codepar +\cbeg{document} +\gls{gls}\marg{bird}, \gls{gls}\marg{ssi}, \gls{gls}\marg{bird}, \gls{gls}\marg{html}, +\gls{gls}\marg{M}, \gls{gls}\marg{html}. +\codepar +\gls{printunsrtglossaries} +\cend{document} +\end{codebox} +If the document is called \filefmt{myDoc.tex}, then the build +process is: +\begin{terminal} +pdflatex myDoc +bib2gls \switch{record-count} myDoc +pdflatex myDoc +\end{terminal} +The \resourceoptvalm{category}{same as entry} resource option +assigns the \gloskey{category} field to the \ext{bib} entry type +(without the initial \code{@}). This means that the entries defined +in \filefmt{terms.bib} (with \atentry{entry}) have their +\gloskey{category} set to \code{entry}, the entries defined +in \filefmt{abbrvs.bib} (with \atentry{abbreviation}) have their +\gloskey{category} set to \code{abbreviation}, and the entries defined +in \filefmt{symbols.bib} (with \atentry{symbol}) have their +\gloskey{category} set to \code{symbol}. + +I've added \idxpl{postlinkhook} to the \catfmt{entry} and +\catfmt{symbol} categories to show the description on +\idx{firstuse} (but not for the \catfmt{abbreviation} category). +\begin{resultbox} +\createexample*[ + label={ex:bib2glsrecordcounting}, +title={Using \appfmt{bib2gls}: record counting}, +description={Example document using bib2gls with multiple resource sets}, +arara={pdflatex,bib2gls: { recordcount: on },pdflatex,pdfcrop} +] +{\cbeg{filecontents*}{terms.bib}^^J% +\termsbibcontent^^J% +\cend{filecontents*}^^J% +\cbeg{filecontents*}{abbrvs.bib}^^J% +\abbrvsbibcontent^^J% +\cend{filecontents*}^^J% +\cbeg{filecontents*}{symbols.bib}^^J% +\symbolsbibcontent^^J% +\cend{filecontents*}^^J% +\cmd{usepackage}\oarg{colorlinks}\marg{hyperref}^^J% +\cmd{usepackage}\oarg{record}\marg{glossaries-extra} +\codepar +\gls{newignoredglossary}\marg{ignored}^^J% +\gls{setabbreviationstyle}\marg{long-short-sc-desc} +\codepar +\gls{GlsXtrLoadResources}\oarg{^^J + \resourceoptvalm{src}{terms,abbrvs,symbols},^^J + \resourceoptval{trigger-type}{ignored},^^J + \resourceoptvalm{category}{same as entry}^^J% +} +\codepar +\gls{glsxtrenablerecordcount}^^J% +\gls{GlsXtrSetRecordCountAttribute}\marg{symbol,abbreviation}\marg{1} +\codepar +\gls{glsdefpostlink}\marg{entry}\marg{\gls{glsxtrpostlinkAddDescOnFirstUse}}^^J% +\gls{glsdefpostlink}\marg{symbol}\marg{\gls{glsxtrpostlinkAddDescOnFirstUse}} +} +{\gls{gls}\marg{M}, \gls{gls}\marg{ssi}, \gls{gls}\marg{bird}, +\gls{gls}\marg{html},^^J% +\gls{gls}\marg{M}, \gls{gls}\marg{html}. +\codepar +\gls{printunsrtglossaries} +} +\end{resultbox} +In the above, \code{ssi} and \code{bird} only have one record. +However, they have been treated differently. The \code{ssi} entry is +using \gls{rglsformat} whereas the \code{bird} entry is using the +normal \gls{gls} behaviour. This is because the record counting +hasn't been applied to the custom \catfmt{entry} category, whereas +it has been applied to the \catfmt{abbreviation} and +\catfmt{symbol} categories. + +\subsection{Unit Record Counting} +\label{sec:unitrecordcount} + +If you want unit record counting you need to remember to invoke +\app{bib2gls} with \switch{record-count-unit} and you will also need +to redefine \gls{glsxtrrecordtriggervalue} appropriately. For +example, suppose you want to reset all abbreviations at the start of each +chapter, so that the full form is shown again, but only if the +abbreviation isn't used elsewhere in the chapter. + +This would require records with the \glsopt{counter} set to +\ctr{chapter}. This can be done with the \opt{counter} package +option: +\begin{codebox} +\cmd{usepackage}\oarg{\opt{record},\optval{counter}{\ctr{chapter}}}\marg{glossaries-extra} +\end{codebox} +However, this will have chapter numbers instead of page numbers in +the \idxpl{locationlist}. If you don't want \idxpl{locationlist} +then this isn't a problem. The list can simply be suppressed with +\opt{nonumberlist}. + +If you want page numbers in the \idxpl{locationlist} then you will +need to \record\ each entry with both the \ctr{page} and +\ctr{chapter} counters. This can be done with the hook that occurs +before the \gls{gls} options are set: +\begin{codebox} +\cmd{renewcommand}\marg{\gls{glslinkpresetkeys}}\marg{\comment{} + \gls{glsadd}\oarg{\glsoptval{format}{glsignore},\glsoptval{counter}{\ctr{chapter}}}\marg{\gls{glslabel}}} +\end{codebox} +Note that I've used the ignored location format to prevent the +chapter number from being added to the \idx{locationlist}. +An alternative is to use the \resourceoptval{loc-counters}{\ctr{page}} resource +option to only show the locations that use the \ctr{page} counter. + +The definition of \gls{glsxtrrecordtriggervalue} needs to be changed +so that it uses the total for the given location. If \sty{hyperref} +is used, you will need \theHcounter{chapter}: +\begin{codebox} +\cmd{renewcommand}*\marg{\gls{glsxtrrecordtriggervalue}}[1]\marg{\comment{} + \gls{GlsXtrLocationRecordCount}\marg{\#1}\marg{\ctr{chapter}}\marg{\theHcounter{chapter}}\comment{} +} +\end{codebox} +otherwise use \thecounter{chapter}. + +Consider the following (using the abbreviations defined in the +earlier \filefmt{abbrvs.bib}): +\begin{codebox} +\cbeg{document} +\cmd{chapter}\marg{First} +\gls{gls}\marg{html}. \gls{gls}\marg{html}. \gls{gls}\marg{html}. \gls{gls}\marg{ssi}. +\codepar +\cmd{chapter}\marg{Second} +\gls{gls}\marg{html}. \gls{gls}\marg{ssi}. \gls{gls}\marg{ssi}. +\gls{gls}\marg{xml}. +\codepar +\gls{printunsrtglossaries} +\cend{document} +\end{codebox} +Note that the \code{xml} entry is only used once in the entire +document, but it will still be added to the glossary. + +The previous example used the \resourceopt{trigger-type} resource +option to move entries with the \encap{glstriggerrecordformat} encap +(that is, they didn't exceed the trigger value) to another +glossary. Unfortunately, using that option in this case will move +all three abbreviations to the \resourceopt{trigger-type} glossary. +The \code{ssi} entry is only used once in the first chapter (but is +used twice in the second chapter), and the \code{html} is only used +once in the second chapter (but is used three times in the first +chapter). So all three will have \records\ in the \ext{aux} file +with the special \encap{glstriggerrecordformat} format. + +A simple solution is to omit any entries that don't have the +\gloskey{location} field set when displaying the glossary: +\begin{codebox} +\cmd{renewcommand}*\marg{\gls{printunsrtglossaryentryprocesshook}}[1]\marg{\comment{} + \gls{glsxtrifhasfield}*\marg{\gloskey{location}}\marg{\#1} + \marg{}\marg{\gls{printunsrtglossaryskipentry}}\comment{} +} +\gls{printunsrtglossaries} +\end{codebox} +An alternative is to test the total record count, but remember that +each entry is being \recorded\ twice: once with the \ctr{page} +counter and once with the \ctr{chapter} counter, so the total count +for the \code{ssi} entry will be 2 not 1. + +\begin{warning} +Take care not to strip entries from a +\glslink{hierarchicallevel}{hierarchical glossary} as it will +break the hierarchy and will cause formatting problems in the +glossary. +\end{warning} + +The complete document is: +\begin{codebox} +\cmd{documentclass}\marg{scrreport} +\cmd{usepackage}\oarg{T1}\marg{fontenc} +\cmd{usepackage}\oarg{colorlinks}\marg{hyperref} +\cmd{usepackage}\oarg{\opt{record},\opt{postdot}}\marg{glossaries-extra} +\codepar +\gls{setabbreviationstyle}\marg{\abbrstyle{long-short-sc-desc}} +\codepar +\gls{GlsXtrLoadResources}\oarg{\resourceoptvalm{src}{abbrvs}} +\codepar +\cmd{preto}\marg{\cmd{chapter}}\marg{\gls{glsresetall}} +\gls{glsxtrenablerecordcount} +\gls{GlsXtrSetRecordCountAttribute}\marg{abbreviation}\marg{1} +\codepar +\cmd{renewcommand}\marg{\gls{glslinkpresetkeys}}\marg{\comment{} + \gls{glsadd}\oarg{\glsoptval{format}{glsignore},\glsoptval{counter}{\ctr{chapter}}}\marg{\gls{glslabel}}} +\codepar +\cmd{renewcommand}*\marg{\gls{glsxtrrecordtriggervalue}}[1]\marg{\comment{} + \gls{GlsXtrLocationRecordCount}\marg{\#1}\marg{\ctr{chapter}}\marg{\thecounter{chapter}}\comment{} +} +\cbeg{document} +\cmd{chapter}\marg{First} +\gls{gls}\marg{html}. \gls{gls}\marg{html}. \gls{gls}\marg{html}. \gls{gls}\marg{ssi}. +\codepar +\cmd{chapter}\marg{Second} +\gls{gls}\marg{html}. \gls{gls}\marg{ssi}. \gls{gls}\marg{ssi}. \gls{gls}\marg{xml}. +\codepar +\cmd{renewcommand}*\marg{\gls{printunsrtglossaryentryprocesshook}}[1]\marg{\comment{} + \gls{glsxtrifhasfield}*\marg{\gloskey{location}}\marg{\#1} + \marg{}\marg{\gls{printunsrtglossaryskipentry}}\comment{} +} +\gls{printunsrtglossaries} +\cend{document} +\end{codebox} +If the document is in a file called \filefmt{myDoc.tex} then the +document build is: +\begin{terminal} +pdflatex myDoc +bib2gls --record-count-unit myDoc +pdflatex myDoc +\end{terminal} +\begin{resultbox} +\createexample*[ + label={ex:bib2glsunitrecordcounting}, +title={Using \appfmt{bib2gls}: unit record counting},class=scrreport,pages={1,2,3}, +description={Example document using bib2gls with unit records}, +arara={pdflatex,bib2gls: { recordcountunit: on },pdflatex,pdfcrop} +] +{\cbeg{filecontents*}{abbrvs.bib}^^J% +\abbrvsbibcontent^^J% +\cend{filecontents*}^^J% +\cmd{usepackage}\oarg{T1}\marg{fontenc}^^J% +\cmd{usepackage}\oarg{colorlinks}\marg{hyperref}^^J% +\cmd{usepackage}\oarg{record,postdot}\marg{glossaries-extra} +\codepar +\cmd{renewcommand}\marg{\cmd{chapterpagestyle}}\marg{empty}\comment{to assist cropping}% +\gls{setabbreviationstyle}\marg{long-short-sc-desc} +\codepar +\gls{GlsXtrLoadResources}\oarg{\resourceoptvalm{src}{abbrvs}} +\codepar +\cmd{preto}\marg{\cmd{chapter}}\marg{\gls{glsresetall}}^^J% +\gls{glsxtrenablerecordcount}^^J% +\gls{GlsXtrSetRecordCountAttribute}\marg{abbreviation}\marg{1} +\codepar +\cmd{renewcommand}\marg{\gls{glslinkpresetkeys}}\marg{\comment{} + \gls{glsadd}\oarg{format=glsignore,counter=chapter}\marg{\gls{glslabel}}} +\codepar +\cmd{renewcommand}*\marg{\gls{glsxtrrecordtriggervalue}}[1]\marg{\comment{} + \gls{GlsXtrLocationRecordCount}\marg{\#1}\marg{chapter}\marg{\cmd{theHchapter}}\comment{}% +} +} +{\cmd{chapter}\marg{First} +\gls{gls}\marg{html}. \gls{gls}\marg{html}. \gls{gls}\marg{html}. \gls{gls}\marg{ssi}. +\codepar +\cmd{chapter}\marg{Second} +\gls{gls}\marg{html}. \gls{gls}\marg{ssi}. \gls{gls}\marg{ssi}. +\gls{gls}\marg{xml}. +\codepar +\cmd{renewcommand}*\marg{\gls{printunsrtglossaryentryprocesshook}}[1]\marg{\comment{} + \gls{glsxtrifhasfield}*\marg{location}\marg{\#1}\marg{}\marg{\gls{printunsrtglossaryskipentry}}\comment{}% +}^^J% +\gls{printunsrtglossaries} +} +\end{resultbox} + +\subsection{Mini-Glossaries} +\label{sec:unitrecordcountminigloss} + +Record counting doesn't have to be used with the \gls{rgls} set of +commands. When \app{bib2gls} writes the code to the \ext{glstex} +file to save the record counting information, it does it with helper +commands that it provides in the \ext{glstex} file: +\cmddef{bibglssettotalrecordcount} +This sets the total record count and is defined in the +\ext{glstex} file as: +\begin{compactcodebox} +\cmd{providecommand}*\marg{\gls{bibglssettotalrecordcount}}[2]\marg{\comment{} + \gls{GlsXtrSetField}\marg{\#1}\marg{\glosfield{recordcount}}\marg{\#2}\comment{} +} +\end{compactcodebox} +\cmddef{bibglssetrecordcount} +This sets the total for the given counter and is defined as: +\begin{compactcodebox} +\cmd{providecommand}*\marg{\gls{bibglssetrecordcount}}[3]\marg{\comment{} + \gls{GlsXtrSetField}\marg{\#1}\marg{\recordcounterfield{\#2}}\marg{\#3}\comment{} +} +\end{compactcodebox} +The following is only available with \switch{record-count-unit}: +\cmddef{bibglssetlocationrecordcount} +This sets the total for the given location and is defined as: +\begin{compactcodebox} +\cmd{providecommand}*\marg{\gls{bibglssetlocationrecordcount}}[4]\marg{\comment{} + \gls{GlsXtrSetField}\marg{\#1}\marg{\recordcounterlocationfield{\#2}{\gls{glsxtrdetoklocation}\marg{\#3}}}\marg{\#4}\comment{} +} +\end{compactcodebox} + +By defining one of more of these commands before the \ext{glstex} +file is input, it's possible to pick up the information, without the +need to iterate over all entries later. For example, the following +will create a \idx{mini-glossary} for each particular location and +populate it with entries that have a record for that location. +\begin{codebox} +\cmd{newcommand}*\marg{\gls{bibglssetlocationrecordcount}}[4]\marg{\comment{} + \gls{GlsXtrSetField}\marg{\#1}\marg{\recordcounterlocationfield{\#2}{\#3}}\marg{\#4}\comment{} + \gls{provideignoredglossary}\marg{minigloss.\#2.\#3}\comment{} + \gls{glsxtrcopytoglossary}\marg{\#1}{minigloss.\#2.\#3}\comment{} +} +\end{codebox} +I've omitted \gls{glsxtrdetoklocation} for clarity and because I'm +confident the locations won't be problematic. The +\idx{mini-glossary} can then be displayed at the start of the +chapter with: +\begin{codebox} +\gls{printunsrtglossary}\oarg{\printglossoptval{type}{minigloss.chapter.\theHcounter{chapter}}} +\end{codebox} + +The previous example can be altered to strip the \gls{rgls} commands +and instead add a \idx{mini-glossary} at the start of each chapter +(the redefinition of \gls{glslinkpresetkeys} remains to ensure there +are locations with the \ctr{chapter} counter). I've also provided a +command to make it easier to display the \idxpl{mini-glossary}: +\begin{codebox} +\cmd{newcommand}\marg{\cmd{minigloss}}\marg{\comment{} + \gls{printunsrtglossary*}\oarg{\printglossoptval{style}{\glostyle{abbr-short-long}},\printglossoptval{type}{minigloss.chapter.\theHcounter{chapter}},\printglossoptval{groups}{false},\printglossoptval{target}{false}}\comment{} + \marg{\cmd{renewcommand}\marg{\gls{glossarysection}}[2][]\marg{}\comment{} + \cmd{renewcommand}\marg{\gls{glslongextraShortLongTabularHeader}}\marg{\cmd{toprule}}\comment{} + }% +} +\end{codebox} +The document build is the same. + +\begin{resultbox} +\createexample*[label=ex:recordcountminigloss,class=scrreport,pages={1,2,3}, +title={Using \appfmt{bib2gls}: unit record counting mini-glossary}, +description={Example document using bib2gls to create a mini-glossary with unit records}, +arara={pdflatex,bib2gls: { recordcountunit: on },pdflatex,pdfcrop} +] +{\cbeg{filecontents*}{abbrvs.bib}^^J% +\abbrvsbibcontent^^J% +\cend{filecontents*}^^J% +\cmd{usepackage}\oarg{T1}\marg{fontenc}^^J% +\cmd{usepackage}\oarg{colorlinks}\marg{hyperref}^^J% +\cmd{usepackage}\oarg{record,postdot,stylemods=longextra}\marg{glossaries-extra} +\codepar +\cmd{renewcommand}\marg{\cmd{chapterpagestyle}}\marg{empty}\comment{to assist cropping}% +\gls{setabbreviationstyle}\marg{long-short-sc-desc} +\codepar +\cmd{newcommand}*\marg{\gls{bibglssetlocationrecordcount}}[4]\marg{\comment{} + \gls{GlsXtrSetField}\marg{\#1}\marg{recordcount.\#2.\#3}\marg{\#4}\comment{} + \gls{provideignoredglossary}\marg{minigloss.\#2.\#3}\comment{} + \gls{glsxtrcopytoglossary}\marg{\#1}{minigloss.\#2.\#3}\comment{}% +} +\codepar +\gls{GlsXtrLoadResources}\oarg{\resourceoptvalm{src}{abbrvs}} +\codepar +\cmd{renewcommand}\marg{\gls{glslinkpresetkeys}}\marg{\comment{} + \gls{glsadd}\oarg{format=glsignore,counter=chapter}\marg{\gls{glslabel}}}^^J% +\cmd{newcommand}\marg{\cmd{minigloss}}\marg{\comment{} + \gls{printunsrtglossary*}\oarg{style=abbr-short-long,type=minigloss.chapter.\cmd{theHchapter},groups=false,target=false}\comment{} + \marg{\cmd{renewcommand}\marg{\gls{glossarysection}}[2][]\marg{}\comment{} + \cmd{renewcommand}\marg{\gls{glslongextraShortLongTabularHeader}}\marg{\cmd{toprule}}\comment{}% +}} +} +{\cmd{chapter}\marg{First} +\cmd{minigloss} +\gls{gls}\marg{html}. \gls{gls}\marg{html}. \gls{gls}\marg{html}. \gls{gls}\marg{ssi}. +\codepar +\cmd{chapter}\marg{Second} +\cmd{minigloss} +\gls{gls}\marg{html}. \gls{gls}\marg{ssi}. \gls{gls}\marg{ssi}. +\gls{gls}\marg{xml}. +\codepar +\cmd{renewcommand}*\marg{\gls{printunsrtglossaryentryprocesshook}}[1]\marg{\comment{} + \gls{glsxtrifhasfield}*\marg{location}\marg{\#1}\marg{}\marg{\gls{printunsrtglossaryskipentry}}\comment{}% +}^^J% +\gls{printunsrtglossaries} +} +\end{resultbox} -With \gls{bib2gls} v1.8+, normal locations are displayed using: -\begin{definition} -\cs{glsnoidxdisplayloc}\marg{prefix}\marg{counter}\marg{format}\marg{location} -\end{definition} -This is provided by the base \sty{glossaries} package and is simply -defined to do: -\begin{definition} -\cs{setentrycounter}\oarg{prefix}\marg{counter}\cs{csuse}\marg{format}\marg{location} -\end{definition} -Earlier versions of \gls{bib2gls} only used this in the -\gloskey{loclist} field and explicitly used \cs{setentrycounter} in -the \gloskey{location} field followed by -\cs{}\meta{format}\marg{location}, which follows the code that's created -with the default \pkgopt{makeindex} setting. -The \cs{setentrycounter} command sets up the prefix needed for -\cs{glshypernumber} to reform the target name from the given -location. - -The locations identified by \cs{glsxtr@record@nameref} are written -by \gls{bib2gls} to the location list using: -\begin{definition}[\DescribeMacro\glsxtrdisplaylocnameref] -\cs{glsxtrdisplaylocnameref}\marg{prefix}\marg{counter}\marg{format}\marg{location}\marg{title}\marg{href}\marg{hcounter}\marg{file} -\end{definition} -With normal internal locations, \meta{file} will always be empty. -With supplemental locations, \meta{file} will be the external file -reference. +\section{The \stytext{glossaries-extra-bib2gls} package} +\label{sec:bib2glssty} -The default definition is: -\begin{verbatim} -\newcommand*{\glsxtrdisplaylocnameref}[8]{% - \ifstrequal{#2}{equation}% - {\glsxtrnamereflink{#3}{(#4)}{#2.#7}{#8}}% - {% - \ifstrempty{#5}% - {% - \glsxtrnamereflink{#3}{#4}{#2.#7}{#8}% - }% - {% - \ifstrequal{#2}{page}% - {\glsxtrnamereflink{#3}{#4}{#2.#7}{#8}}% - {\glsxtrnamereflink{#3}{#5}{#2.#7}{#8}}% - }% - }% -} -\end{verbatim} -which uses: -\begin{definition}[\DescribeMacro\glsxtrnamereflink] -\cs{glsxtrnamereflink}\marg{format}\marg{title}\marg{target}\marg{file} -\end{definition} -This ignores the \meta{prefix}, \meta{counter} and \marg{location} -arguments and instead creates a hyperlink with the target name obtained from \meta{target} (and \meta{file}, if not empty). - -Since pages and equations typically don't have titles, the default -definition of \cs{glsxtrdisplaylocnameref} checks the counter was -used as the location. If it's \ctr{page} or if \meta{title} is empty, then just the location is -used as the hyperlink text. If the counter \ctr{equation}, then the -text is the location in parentheses. Otherwise the text is obtained -from \meta{title}. +\pkgdef{glossaries-extra-bib2gls} +\glsadd[format=(]{pkg.glossaries-extra-bib2gls}% +The package options \opteqvalref{record}{only} (or simply +\opt{record}) and \opteqvalref{record}{nameref} automatically +loads the supplementary package \sty{glossaries-extra-bib2gls}, +which provides some commands that are specific to \app{bib2gls}, in +particular to sorting and \idxpl{locationlist} which aren't relevant +with \opteqvalref{record}{hybrid}. -If \meta{file} is empty an internal link is created with: -\begin{definition}[\DescribeMacro\glsxtrfmtinternalnameref] -\cs{glsxtrfmtinternalnameref}\marg{target}\marg{format}\marg{title} -\end{definition} -otherwise an external link is created with: -\begin{definition}[\DescribeMacro\glsxtrfmtexternalnameref] -\cs{glsxtrfmtexternalnameref}\marg{target}\marg{format}\marg{title}\marg{file} -\end{definition} -The \meta{file} argument is set by \gls{bib2gls} for supplemental -locations. - -Here's alternative definition that uses the \meta{prefix} and -\meta{counter} to reform the target name (as -\cs{glsnoidxdisplayloc}) but uses the \meta{title} as the hyperlink text: -\begin{verbatim} -\renewcommand*{\glsxtrdisplaylocnameref}[7]{% - \glsxtrnamereflink{#3}{#5}{#6}{#7}% -} -\end{verbatim} -which uses: -\begin{definition}[\DescribeMacro\glsxtrnameloclink] -\cs{glsxtrnameloclink}\marg{prefix}\marg{counter}\marg{format}\marg{location}\marg{title}\marg{file} -\end{definition} -This uses the same commands as \cs{glsxtrnamereflink} -to produce the hyperlinks. - -In both cases, the link is encapsulated with the text-block command -whose name is given by \meta{format}, but \cs{glshypernumber} is -first locally redefined to \cs{@firstofone} to prevent a conflict with the -usual location hyperlink formation. This means that if the -\meta{format} is \texttt{hyperbf} then it will simply behave like -\texttt{textbf}. - -For compactness, \gls{bib2gls} merges normal records if the -\meta{prefix}, \meta{counter} and \meta{location} all match. (An -order of precedence can be provided for format conflicts.) With -nameref records, you can use the \verb|--merge-nameref-on| switch -provided by \gls{bib2gls} v1.8+ to determine how to merge nameref -records. This switch must be followed by one of the following -keywords: \texttt{hcounter} (merge on \meta{hcounter}, default) -\texttt{href} (merge on \meta{href}), \texttt{title} (merge -on \meta{title}) and \texttt{location} (merge on \meta{location}, as -regular records). In all cases, the \meta{counter} must also match. +If \sty{glossaries-extra-bib2gls} is loaded via the +\opt{record} package option then the check for associated +language files (see \sectionref{sec:lang}) will also +search for the existence of +\metafilefmt{glossariesxtr-}{script}{.ldf} for each +document dialect (where \meta{script} is the four letter +script identifier, such as \code{Latn}). + +\subsection{Displaying Glossaries} +\label{sec:printunsrtshortcuts} + +\Idxpl{glossary} are displayed with the \idx{unsrtfam} (see +\sectionref{sec:printunsrt}). Some styles, such as +\glostyle{bookindex}, are customized for use with \app{bib2gls}. + + +The following commands are shortcuts that use +\gls{printunsrtglossary}. However, they are only defined if a +corresponding package option has been set \emph{before} +\sty{glossaries-extra-bib2gls} is loaded. This means that the +options must be passed as a package option, not using +\gls{glossariesextrasetup}, if the shortcut commands are required. + +\cmddef{printunsrtabbreviations} +This shortcut is provided if the \opt{abbreviations} package +option has been used. This is a shortcut for: +\begin{codebox} +\gls{printunsrtglossary}\oarg{type=abbreviations,\meta{options}} +\end{codebox} + +\cmddef{printunsrtacronyms} +This shortcut is provided if the \opt{acronyms} (or +\opt{acronym}) package option has been used. This is a shortcut for: +\begin{codebox} +\gls{printunsrtglossary}\oarg{type=\gls{acronymtype},\meta{options}} +\end{codebox} + +\cmddef{printunsrtsymbols} +This shortcut is provided if the \opt{symbols} package +option has been used. This is a shortcut for: +\begin{codebox} +\gls{printunsrtglossary}\oarg{type=symbols,\meta{options}} +\end{codebox} + +\cmddef{printunsrtnumbers} +This shortcut is provided if the \opt{numbers} package +option has been used. This is a shortcut for: +\begin{codebox} +\gls{printunsrtglossary}\oarg{type=numbers,\meta{options}} +\end{codebox} + +\cmddef{printunsrtindex} +This shortcut is provided if the \opt{index} package +option has been used. This is a shortcut for: +\begin{codebox} +\gls{printunsrtglossary}\oarg{type=index,\meta{options}} +\end{codebox} \subsection{Helper Commands for Resource Options} \label{sec:resourcecommands} -\begin{definition}[\DescribeMacro\glshex] -\cs{glshex} -\end{definition} -This is just defined as \verb|\string\u|, which is required -when you need to indicate a Unicode character in the form -\cs{u}\meta{hex} in some of -the resource options (as illustrated above). - -\begin{definition}[\DescribeMacro\glscapturedgroup] -\cs{glscapturedgroup} -\end{definition} -This is just defined as \verb|\string\$| and is used for -the captured group reference in a replacement part of a regular -expression substitution (requires at least \gls{bib2gls} version 1.5). For example: -\begin{verbatim} -sort-replace={{([a-zA-Z])\string\.}{\glscapturedgroup1}} -\end{verbatim} -This only removes a full stop that follows any of the characters +\cmddef{glshex} +This simply expands to \code{\gls{string}\gls{u}\meta{hex}}, which +is used to identify the Unicode character \meta{hex} in the value of +some \idxpl{resourceopt}. + +\cmddef{glshashchar} +This expands to a literal \idx{sym.hash} character (similar to +\gls{glsbackslash}). + +\cmddef{glscapturedgroup} +This simply expands to \code{\gls{string}\gls{dollar}\meta{n}} +which is used to indicate the \meta{n}th captured group in a regular expression +replacement in the value of some \idxpl{resourceopt} (requires +\app{bib2gls} v1.5+), such as \resourceopt{sort-replace}. For example: +\begin{codebox} +\resourceoptvalm{sort-replace}{\marg{([a-zA-Z])\gls{string}\cmd{.}}\marg{\gls{glscapturedgroup}1}} +\end{codebox} +This removes a full stop that follows any of the characters a,\ldots,z or A,\ldots,Z. -If you use the \texttt{save-child-count} resource option, -you can test if the \texttt{childcount} field is non-zero using: -\begin{definition}[\DescribeMacro{\GlsXtrIfHasNonZeroChildCount}] -\cs{GlsXtrIfHasNonZeroChildCount}\marg{label}\marg{true}\marg{false} -\end{definition} -This internally uses \cs{GlsXtrIfFieldNonZero} and will do -\meta{false} if the field isn't set. Within \meta{true} and -\meta{false} you can use \cs{glscurrentfieldvalue} to access the -value. (It will be 0 in \meta{false} if the field isn't set.) -As from v1.47, there is also a starred version which uses -\cs{GlsXtrIfFieldNonZero*} (don't add grouping). - - -A convenient shortcut for use in the \texttt{entry-type-aliases} -setting: -\begin{definition}[\DescribeMacro\GlsXtrBibTeXEntryAliases] -\cs{GlsXtrBibTeXEntryAliases} -\end{definition} -This provides aliases for Bib\TeX's standard entry types to -\gls{bib2gls}['s] \texttt{@bibtexentry} entry type (requires at -least \gls{bib2gls} version 1.4). - -You may also want to provide storage keys for Bib\TeX's standard +A convenient shortcut for use in the \resourceopt{entry-type-aliases} +setting: +\cmddef{GlsXtrBibTeXEntryAliases} +This provides aliases for \BibTeX's standard entry types (such as +\atentry{article} and \atentry{book}) to \app{bib2gls}['s] +\atentry{bibtexentry} entry type (requires \app{bib2gls} v1.4+). + +You may also want to provide storage keys for \BibTeX's standard fields rather than having to alias them all. This can be done with: -\begin{definition}[\DescribeMacro\GlsXtrProvideBibTeXFields] -\cs{GlsXtrProvideBibTeXFields} -\end{definition} -Note that Bib\TeX's \texttt{type} field clashes with the \sty{glossaries} +\cmddef{GlsXtrProvideBibTeXFields} +This defines each \BibTeX\ field, such as \fieldfmt{author}, as a +glossary entry key: +\begin{compactcodebox} + \gls{glsaddstoragekey}\marg{address}\marg{}\marg{\inlineglsdef{glsxtrbibaddress}}\% + \gls{glsaddstoragekey}\marg{author}\marg{}\marg{\inlineglsdef{glsxtrbibauthor}}\% + \gls{glsaddstoragekey}\marg{booktitle}\marg{}\marg{\inlineglsdef{glsxtrbibbooktitle}}\% + \gls{glsaddstoragekey}\marg{chapter}\marg{}\marg{\inlineglsdef{glsxtrbibchapter}}\% + \gls{glsaddstoragekey}\marg{edition}\marg{}\marg{\inlineglsdef{glsxtrbibedition}}\% + \gls{glsaddstoragekey}\marg{howpublished}\marg{}\marg{\inlineglsdef{glsxtrbibhowpublished}}\% + \gls{glsaddstoragekey}\marg{institution}\marg{}\marg{\inlineglsdef{glsxtrbibinstitution}}\% + \gls{glsaddstoragekey}\marg{journal}\marg{}\marg{\inlineglsdef{glsxtrbibjournal}}\% + \gls{glsaddstoragekey}\marg{month}\marg{}\marg{\inlineglsdef{glsxtrbibmonth}}\% + \gls{glsaddstoragekey}\marg{note}\marg{}\marg{\inlineglsdef{glsxtrbibnote}}\% + \gls{glsaddstoragekey}\marg{number}\marg{}\marg{\inlineglsdef{glsxtrbibnumber}}\% + \gls{glsaddstoragekey}\marg{organization}\marg{}\marg{\inlineglsdef{glsxtrbiborganization}}\% + \gls{glsaddstoragekey}\marg{pages}\marg{}\marg{\inlineglsdef{glsxtrbibpages}}\% + \gls{glsaddstoragekey}\marg{publisher}\marg{}\marg{\inlineglsdef{glsxtrbibpublisher}}\% + \gls{glsaddstoragekey}\marg{school}\marg{}\marg{\inlineglsdef{glsxtrbibschool}}\% + \gls{glsaddstoragekey}\marg{series}\marg{}\marg{\inlineglsdef{glsxtrbibseries}}\% + \gls{glsaddstoragekey}\marg{title}\marg{}\marg{\inlineglsdef{glsxtrbibtitle}}\% + \gls{glsaddstoragekey}\marg{bibtextype}\marg{}\marg{\inlineglsdef{glsxtrbibtype}}\% + \gls{glsaddstoragekey}\marg{volume}\marg{}\marg{\inlineglsdef{glsxtrbibvolume}}\% +\end{compactcodebox} +This command should be placed before the first +\gls{GlsXtrLoadResources}. + +\begin{warning} +\BibTeX's \fieldfmt{type} field clashes with the \sty{glossaries} package's \gloskey{type} key, so this command provides the key -\texttt{bibtextype} instead. You can alias it with -\texttt{field-aliases={type=bibtextype}} in the resource options. -Each storage key is provided with a convenient command to access the -value in the form \cs{glsxtrbib}\meta{field}. For example, -\cs{glsxtrbibaddress}. The \texttt{bibtextype} field can be accessed -with \cs{glsxtrbibtype}. Each of these commands takes the entry -label as the sole argument. - -The \sty{glossaries-extra-bib2gls} package also provides definitions -of the missing mathematical Greek commands: \ics{Alpha}, -\ics{Beta}, \ics{Epsilon}, \ics{Zeta}, \ics{Eta}, \ics{Iota}, -\ics{Kappa}, \ics{Mu}, \ics{Nu}, \ics{Omicron}, \ics{Rho}, -\ics{Tau}, \ics{Chi}, \ics{Digamma}, \ics{omicron}. -These are all defined with \cs{providecommand}, so they won't override -any definitions provided by any package loaded before -\sty{glossaries-extra}. Since \gls{bib2gls}['s] interpreter -recognises these commands, using them instead of explicitly using -the Latin characters with the same shape helps to keep the Greek -symbols together when sorting. -Similarly, if \sty{upgreek} has been loaded, the missing upright -Greek commands are also provided. - -The remaining commands provide common rule blocks for use in -the \texttt{sort-rule} resource option. If you want a rule for +\fieldfmt{bibtextype} instead. You can alias it with +\resourceoptvalm{field-aliases}{\gloskey{type}=\fieldfmt{bibtextype}} +in the \idxpl{resourceopt}. +\end{warning} + +\subsubsection{Custom Sort} +\label{sec:customsort} + +There are many locale alphabetical rules provided with +\app{bib2gls}, such as \resourceoptval{sort}{de-1996} for German new +orthography. However, it may be that your particular locale isn't +supported, or you want a rule that covers multiple scripts or +non-alphabetic symbols. + +The \resourceoptval{sort}{custom} setting combined with +\resourceopt{sort-rule} provides a way to define your own sort rule. +For example, suppose I have a file called \filefmt{animals.bib} that +contains: +\newcommand{\animalsbib}{% + \atentry{index}\marg{bee}\newline + \atentry{index}\marg{lion}\newline + \atentry{index}\marg{ant}\newline + \atentry{index}\marg{cow}\newline + \atentry{index}\marg{goose}\newline + \atentry{index}\marg{zebu}\newline + \atentry{index}\marg{egret}\newline + \atentry{index}\marg{elk}\newline + \atentry{index}\marg{llama}\newline + \atentry{index}\marg{lynx}\newline + \atentry{index}\marg{bat}% +} +\begin{codebox} +\animalsbib +\end{codebox} +Here's a very limited rule that only recognises five letters: +\begin{codebox} +\cmd{usepackage}\oarg{\opt{record},\opt{nostyles},\optval{stylemods}{bookindex},\optval{style}{\glostyle{bookindex}}} +\marg{glossaries-extra} +\codepar +\cmd{newcommand}\marg{\gls{bibglssetlastgrouptitle}}[2]\marg{\% + \gls{glsxtrsetgrouptitle}\marg{\#1\#2}\marg{Other}\% +} +\gls{GlsXtrLoadResources}\oarg{\resourceoptval{src}{animals},\resourceoptval{selection}{all}, + \resourceoptval{sort}{custom},\resourceoptvalm{sort-rule}{ < a,A < b,B < e,E < l,L < ll,Ll,LL < z,Z}} +\codepar +\cbeg{document} +\gls{printunsrtglossaries} +\cend{document} +\end{codebox} +Any characters that aren't included in the rule (such as \qt{c} and +\qt{g}) are placed at the end. I've defined \gls{bibglssetlastgrouptitle} +to label that final group of characters \qt{Other}. If the document +is in a file called \filefmt{myDoc.tex}, the build process is: +\begin{terminal} +pdflatex myDoc +bib2gls \switch{g} myDoc +pdflatex myDoc +\end{terminal} +The result is: +\begin{resultbox} +\createexample*[arara={pdflatex,bib2gls: { group : on },pdflatex,pdfcrop}, + label={ex:bib2glscustomsort}, + title={Using \appfmt{bib2gls}: simple custom sort rule}, + description={Example document that provides a simplistic custom +sort rule} +] +{\cbeg{filecontents*}{animals.bib}^^J% +\animalsbib^^J% +\cend{filecontents*}^^J% +\cmd{usepackage}\oarg{\opt{record},\opt{nostyles},\optval{stylemods}{bookindex},\optval{style}{\glostyle{bookindex}}}^^J +\marg{glossaries-extra} +\codepar +\cmd{newcommand}\marg{\gls{bibglssetlastgrouptitle}}[2]\marg{\%^^J + \gls{glsxtrsetgrouptitle}\marg{\#1\#2}\marg{Other}\%^^J% +} +\gls{GlsXtrLoadResources}\oarg{\resourceoptval{src}{animals},\resourceoptval{selection}{all},^^J + \resourceoptval{sort}{custom},\resourceoptvalm{sort-rule}{ < a,A < b,B < e,E < l,L < ll,Ll,LL < z,Z}} +} +{\gls{printunsrtglossaries}} +\end{resultbox} +Note that \qt{egret} has been placed after \qt{elk}. This is because +\qt{l} is included in the rule but \qt{g} isn't. Whereas \qt{lynx} +comes before \qt{llama} because there's a separate \qt{ll} group +after the \qt{l} group. + +The commands listed below provide common rule blocks for use in +the \resourceopt{sort-rule} resource option. If you want a rule for a specific locale, you can provide similar commands in a file called -\texttt{glossariesxtr-}\meta{tag}\texttt{.ldf}, where \meta{tag} +\metafilefmt{glossariesxtr-}{tag}{.ldf}, where \meta{tag} identifies the dialect, locale, region or root language. See the -description of \cs{IfTrackedLanguageFileExists} in the +description of \gls{IfTrackedLanguageFileExists} in the \sty{tracklang} documentation for further details. If this file is on \TeX's path and the \sty{tracklang} package (automatically loaded -by \styfmt{glossaries}) detects that the document has requested that +by \sty{glossaries}) detects that the document has requested that language or locale, then the file will automatically be loaded. For example, if you want to provide a rule block for Welsh, then -create a file called \texttt{glossariesxtr-welsh.ldf} that contains: -\begin{verbatim} -\ProvidesGlossariesExtraLang{welsh}[2018/02/23 v1.0] - -\@ifpackageloaded{glossaries-extra-bib2gls} -{ - \newcommand{\glsxtrWelshRules}{% - \glsxtrLatinA - \string}. - -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} -and, as from v1.37, a command that converts the entire value to upper case: -\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. You can use \ics{listbreak} to break out of the loop -(see the \sty{etoolbox} manual for further details). - -For fields that contain comma-separated lists use -\cs{glsxtrforcsvfield} instead. - -New to v1.42: -\begin{definition}[\DescribeMacro\glsxtrfieldformatlist] -\cs{glsxtrfieldformatlist}\marg{label}\marg{field} -\end{definition} -Like \sty{datatool-base}'s \ics{DTLformatlist}, this iterates over -an (\sty{etoolbox}) internal list and formats each item. Uses all -the same helper commands as \cs{DTLformatlist} (the same list handler -macro is used). Unlike the \sty{datatool-base} command, this command -has no starred version. Grouping is automatically applied. - -For example, with \gls{bib2gls}['s] \texttt{save-child-count} -resource option: -\begin{verbatim} -\newcommand*{\listchildren}[1]{% - \GlsXtrIfFieldNonZero{childcount}{#1}% - {child count: \glscurrentfieldvalue; children: - \let\DTLlistformatitem\glsfmtname - \glsxtrfieldformatlist{#1}{childlist}% - }% - {no children}% -} -\end{verbatim} -For fields that contain a comma-separated list use \cs{glsxtrfieldformatcsvlist} -instead. - -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}. - -If the field has a comma-separated list value instead, you -can iterate over it using: -\begin{definition}[\DescribeMacro\glsxtrforcsvfield] -\cs{glsxtrforcsvfield}\marg{label}\marg{field}\marg{handler} -\end{definition} -where again \meta{handler} is a control sequence that takes -a single argument. Unlike the \sty{etoolbox} loops, this -doesn't ignore empty elements nor does it discard leading / trailing -spaces. Internally it uses \cs{@for} (modified by \sty{xfor} -which is automatically loaded by \sty{glossaries}). The -\sty{xfor} package modifies the behaviour of \cs{@for} to allow -the loop to be broken prematurely using \cs{@endfortrue}. -The \cs{glsxtrforcsvfield} command locally defines -a user level command: -\begin{definition}[\DescribeMacro\glsxtrendfor] -\cs{glsxtrendfor} -\end{definition} -which is just a synonym for \cs{@endfortrue}. - -The loop is performed within the true part of \cs{glsxtrifhasfield} -so scoping is automatically applied. If you don't want scoping use -\cs{glsxtrforcsvfield*} which will use \cs{glsxtrifhasfield*} -instead but take care if you nest these starred commands as -unexpected results can occur without the scoping. - -New to v1.42: -\begin{definition}[\DescribeMacro\glsxtrfieldformatcsvlist] -\cs{glsxtrfieldformatcsvlist}\marg{label}\marg{field} -\end{definition} -Like \cs{glsxtrfieldformatcsvlist} but for fields that contain -comma-separated lists. - -As from version 1.32, if the field given by -\begin{definition}[\DescribeMacro\GlsXtrForeignTextField] -\cs{GlsXtrForeignTextField} -\end{definition} -(which defaults to \texttt{userii}) contains a locale tag, then -\begin{definition}[\DescribeMacro\GlsXtrForeignText] -\cs{GlsXtrForeignText}\marg{entry label}\marg{text} -\end{definition} -can be used to encapsulate \meta{text} in -\cs{foreignlanguage}\marg{dialect}\marg{text} where \meta{dialect} -is obtained from the locale tag through \sty{tracklang}'s -\ics{GetTrackedDialectFromLanguageTag} command. You need at least -\sty{tracklang} v1.3.6 for this to work properly. The \meta{dialect} -must be one that's tracked (which typically means that \sty{babel} -or \sty{polyglossia} has been loaded with the appropriate setting -for that language). If \cs{foreignlanguage} hasn't been defined, -this just does \meta{text}. -For example: -\begin{verbatim} -\documentclass{article} - -\usepackage[main=british,brazilian,ngerman]{babel} -\usepackage{glossaries-extra} - -\setabbreviationstyle{long-short-user} -\newabbreviation - [user1={Associa\c{c}\~ao Brasileria de Normas T\'ecnicas}, - user2= {pt-BR} - ] - {abnt}{ABNT}{Brazilian National Standards Organization} - -\newabbreviation - [user1={Deutsches Institut f\"ur Normung e.V.}, - user2={de-DE-1996}] - {din}{DIN}{German Institute for Standardization} - -\renewcommand*{\glsxtruserparen}[2]{% - \glsxtrfullsep{#2}% - \glsxtrparen - {#1% - \ifglshasfield{\glsxtruserfield}{#2}% - {, \emph{\GlsXtrForeignText{#2}{\glscurrentfieldvalue}}}% - {}% - }% -} - -\begin{document} -\gls{abnt}, \gls{din}. -\end{document} -\end{verbatim} - - -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}). -If you want to use one of the \env{tabular}-like -styles with \cs{printunsrtglossary}, make sure you load -\sty{glossaries-extra-stylemods} which modifies -the definition of \cs{glsgroupskip} to avoid the -\qt{Incomplete \cs{iftrue}} error that may otherwise occur. - -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}). - -\begin{important} -No attempt is made to gather hierarchical elements. -If child entries aren't defined immediately after their parent -entry, they won't be together in the glossary when using -\cs{printunsrtglossary}. -\end{important} - -There's a difference in behaviour depending on whether or not the -\gloskey{group} key is defined. If not defined (default), the -group label will be formed from the first letter of the -\gloskey{name} field. The corresponding group title will be obtained -as discussed in \sectionref{sec:glosstylemods}. This can lead to an -odd effect if you are using a style that separates letter groups -when the ordering isn't alphabetical. - -If the \gloskey{group} key is defined (which it is with the -\pkgopt{record} option) then the group label will be obtained from -the value of that field. If the field is empty, \emph{no grouping is -performed}, even if the style supports it. (That is, there won't be -a header or a vertical separation.) If the \gloskey{group} field is -non-empty, then the corresponding title is obtained as described -earlier. - -In either case, if the \gloskey[printunsrtglossary]{groups} option is set -to false then no group formation will be performed. - -If you want to use a different field for the group label, you can redefine -\begin{definition}[\DescribeMacro\glsxtrgroupfield] -\cs{glsxtrgroupfield} -\end{definition} -to the relevant internal field label, but the \gloskey{group} -\emph{key} must still be defined (through the \pkgopt{record} option -or with commands like \cs{glsaddstoragekey}) to ensure that -\cs{printunsrtglossary} uses \cs{glsxtrgroupfield}. (This method is -used by \gls{bib2gls} for secondary entries, which have the group -label stored in the \texttt{secondarygroup} internal field.) - -If you have any entries with the \gloskey{see} key set, you will -need the \sty{glossaries} package option \pkgopt[ignore]{seenoindex} -or \pkgopt[warn]{seenoindex} to prevent an error occurring from the -automated \cs{glssee} normally triggered by this key. The -\pkgopt[only]{record} package option will automatically deal with -this. - -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}]. - -\subsection{Hooks} -\label{sec:printunsrthooks} - -To avoid complications caused by \env{tabular}-like glossary -styles, \cs{printunsrtglossary} iterates over all entries -in the selected glossary and appends the appropriate code -to an internal command. Once the construction of this -command is complete, then it's performed to display the -glossary. This puts the loop outside the style code. -For convenience, there's a hook used within the loop: -\begin{definition}[\DescribeMacro\printunsrtglossaryentryprocesshook] -\cs{printunsrtglossaryentryprocesshook}\marg{label} -\end{definition} -This hook should not display any content, but may be used -to perform calculations. For example, to calculate widths. -Within this hook you can use: -\begin{definition}[\DescribeMacro\printunsrtglossaryskipentry] -\cs{printunsrtglossaryskipentry} -\end{definition} -to skip the current entry. This will prevent the entry from -being added to the internal command. - -There's another hook immediately before the internal command -containing the glossary code is performed: -\begin{definition}[\DescribeMacro\printunsrtglossarypredoglossary] -\cs{printunsrtglossarypredoglossary} -\end{definition} - -The internal command uses -\begin{definition}[\DescribeMacro\printunsrtglossaryhandler] -\cs{printunsrtglossaryhandler}\marg{label} -\end{definition} -to display each item in the list, where \meta{label} is the current label. - -By default the handler 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}. If you want to -use a different field to be used instead of \gloskey{location} -then redefine: -\begin{definition}[\DescribeMacro\GlsXtrLocationField] -\cs{GlsXtrLocationField} -\end{definition} -to the internal name of the desired field. For example: -\begin{verbatim} -\renewcommand{\GlsXtrLocationField}{primarylocation} -\end{verbatim} -\begin{important} -Note that if the given location field is undefined or unset, -the handler will fallback on the \gloskey{loclist} field. -\end{important} -You can instruct \gls{bib2gls} to omit setting the \gloskey{loclist} -field with the resource option \texttt{--save-loclist=false} -to prevent it from being used as a fallback. - -\subsection{Filtering} -\label{sec:printunsrtfilter} - -You can redefine the handler used by \cs{printunsrtglossary} if required. For example, -you may want to filter entries according to the category -label. You can test if a label is contained in a comma-separated -list of labels using: -\begin{definition}[\DescribeMacro\glsxtriflabelinlist] -\cs{glsxtriflabelinlist}\marg{label}\marg{label list}\marg{true}\marg{false} -\end{definition} -The \meta{label} and \meta{label list} will be fully expanded. - -\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} +If this isn't a suitable fallback, it may be necessary to add one +after all the resource commands: +\begin{codebox} +\cmd{newcommand}\marg{\gls{bibglsprimaryprefixlabel}}[1]\marg{\% + \gls{glsxtraddlabelprefix}\marg{\#1}} +\cmd{newcommand}\marg{\gls{bibglsdualprefixlabel}}[1]\marg{\% + \gls{glsxtrprependlabelprefix}\marg{\#1}} +\gls{GlsXtrLoadResources}\oarg{\resourceoptval{src}{entries},\resourceoptvalm{label-prefix}{idx.}} +\gls{glsxtraddlabelprefix}\marg{idx.} +\end{codebox} +Although this rather defeats the purpose of using the hooks as you +still have to keep track of the fallback prefix. -Alternatively you can use the starred form of -\cs{printunsrtglossary} which will localise the change: +\subsection{Supplementary Commands} +\label{sec:bib2glssupplementarycommands} -\begin{verbatim} -\printunsrtglossary*{% - \renewcommand{\printunsrtglossaryhandler}[1]{% - \glsxtrfieldxifinlist{#1}{record.section}{\thesection} - {\glsxtrunsrtdo{#1}}% - {}% - }% -} -\end{verbatim} +\cmddef{glsdisplaynumberlist} +This command is provided by the base \sty{glossaries} package, but +it requires hooking into the \idx{locationlist} formatting within +the \idx{glossary} to obtain the list. This information is more +easily available with \app{bib2gls}, which stores the formatted +\idx{locationlist} in the \gloskey{location} field, so +\sty{glossaries-extra-bib2gls} redefines this command to use that +field value. Likewise for: +\cmddef{glsentrynumberlist} +which is redefined to simply do: +\begin{compactcodebox} +\gls{glsxtrusefield}\marg{\#1}\marg{\gloskey{location}} +\end{compactcodebox} + +\cmddef{IfTeXParserLib} +This command is defined by \sty{glossaries-extra-bib2gls} to expand +to \code{\LaTeX\ code}, but is defined by the \TeX\ +parser library used by \app{bib2gls}['s] to expand to \code{\TeX\ +parser lib code}. May be used in the \atentry{preamble} or in field +values to provide \app{bib2gls} with alternative content. + +\cmddef{glsxtrprovidecommand} +This command is intended for use in \atentry{preamble}. +It's simply defined to \gls{providecommand} in +\sty{glossaries-extra-bib2gls} but \app{bib2gls}['s] interpreter +treats it as \gls{renewcommand}. This means that you can +override \app{bib2gls}['s] internal definition of a command +without overriding the command definition in the document +(if it's already defined before the \idx{resourcefile} is input). +For example: +\begin{codebox} +\atentry{preamble}\marg{"\gls{glsxtrprovidecommand}\marg{\cmd{int}}\marg{integral}"} +\end{codebox} +This will force \app{bib2gls} to treat \csfmt{int} as the word +\qt{integral} to assist sorting but if this preamble code is written +to the \ext{glstex} file (as it is by default) then it won't +override the current definition (provided by the kernel or redefined +by a package). -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: +The helper commands in the \idxpl{resourcefile} are defined using +\gls{providecommand}. For many of them, if you want to provide an +alternative definition then you need to define the command before +the \idx{resourcefile} is loaded. There are a few that may be redefined +afterwards but if you use \gls{renewcommand} then you will get an +error on the first \LaTeX\ run when the \ext{glstex} file +doesn't exist. In this case, you may prefer to use: +\cmddef{glsrenewcommand} +This behaves like \gls{renewcommand} but only generates a warning +rather than an error if the command isn't already defined so it +won't interrupt the document build. -\begin{verbatim} -\printunsrtglossary*{% - \renewcommand{\printunsrtglossaryhandler}[1]{% - \glsxtrfieldxifinlist{#1}{record.section}{\thesection} - {\glsxtrunsrtdo{#1}}% - {}% - }% - \ifcsundef{theHsection}% - {% - \renewcommand*{\glolinkprefix}{record.\csuse{thesection}.}% - }% - {% - \renewcommand*{\glolinkprefix}{record.\csuse{theHsection}.}% - }% -} -\end{verbatim} -Note that this will cause a problem if your descriptions -contain commands like \cs{gls} that need to link an entry that -doesn't appear in the summary. In this case, it's a better approach -to use: -\begin{verbatim} -\printunsrtglossary*{% - \renewcommand{\printunsrtglossaryhandler}[1]{% - \glsxtrfieldxifinlist{#1}{record.section}{\thesection} - {\glsxtrunsrtdo{#1}}% - {}% - }% - \ifcsundef{theHsection}% - {% - \setkeys{printgloss}{targetnameprefix={record.\csuse{thesection}.}}% - }% - {% - \setkeys{printgloss}{targetnameprefix={record.\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.\csuse{thesection}.}% - }% - {% - \renewcommand*{\glolinkprefix}{record.\csuse{theHsection}.}% - }% - \renewcommand*{\glossarysection}[2][]{}% - \appto\glossarypostamble{\glspar\medskip\glspar}% -} -\end{verbatim} - -There's a shortcut command that essentially 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[hybrid]{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{Partial Glossaries} -\label{sec:printunsrtinner} +\cmddef{GlsXtrIndexCounterLink} +For use with the \opt{indexcounter} package option and the +\resourceopt{save-index-counter} resource option. +This command creates a hyperlink (if supported) to the target obtained from +the \glosfield{indexcounter} field (which will be set in the +\ext{glstex} file, if applicable). -It's possible that you may require greater customisation over the -way the glossary is displayed that can't be simply achieved with the -hooks or glossary styles. This section describes a command and -environment provided to assist with this, but note that they aren't -compatible with tabular-like glossary styles, such as -\glostyle{long} or \glostyle{super}, due to their complexity and -internal scoping that interferes with alignment. You will also need -to take care with list styles (provided in the \sty{glossary-list} -package). +If then \glosfield{indexcounter} field is set for the entry +given by \meta{entry-label}, this command does +\code{\gls{hyperref}\oarg{wrglossary.\meta{value}}\margm{text}}, where +\meta{value} is the value of the \glosfield{indexcounter} field. If the +field isn't set or if \gls{hyperref} hasn't been defined, this just +does \meta{text}. See the \app{bib2gls} manual (v1.4+) for further details. -To get a better understanding of how this works, it's useful to -consider how a glossary with \gls{makeindex} works. Here's a simple -example document: -\begin{verbatim} -\documentclass{article} +The \sty{glossaries-extra-bib2gls} package also provides definitions +of the missing mathematical Greek commands: \inlineglsdef{Alpha}, +\inlineglsdef{Beta}, \inlineglsdef{Epsilon}, \inlineglsdef{Zeta}, +\inlineglsdef{Eta}, \inlineglsdef{Iota}, +\inlineglsdef{Kappa}, \inlineglsdef{Mu}, \inlineglsdef{Nu}, +\inlineglsdef{Omicron}, \inlineglsdef{Rho}, +\inlineglsdef{Tau}, \inlineglsdef{Chi}, \inlineglsdef{Digamma}, +\inlineglsdef{omicron}. +These are all defined with \gls{providecommand}, so they won't override +any definitions provided by any package loaded before +\sty{glossaries-extra}. Since \app{bib2gls}['s] interpreter +recognises these commands, using them instead of explicitly using +the Latin characters with the same shape helps to keep the Greek +symbols together when sorting. +Similarly, if \sty{upgreek} has been loaded, the missing upright +Greek commands are also provided: \inlineglsdef{Upalpha}, +\inlineglsdef{Upbeta}, \inlineglsdef{Upepsilon}, \inlineglsdef{Upzeta}, +\inlineglsdef{Upeta}, \inlineglsdef{Upiota}, +\inlineglsdef{Upkappa}, \inlineglsdef{Upmu}, \inlineglsdef{Upnu}, +\inlineglsdef{Upomicron}, \inlineglsdef{Uprho}, +\inlineglsdef{Uptau}, \inlineglsdef{Upchi}, \inlineglsdef{upomicron}. -\usepackage{glossaries} +\glsadd[format=)]{pkg.glossaries-extra-bib2gls}% +\glsadd[format=)]{app.bib2gls}% end of bib2gls chapter -\makeglossaries +\chapter{Auto-Indexing} +\label{sec:autoindex} -\newglossaryentry{cabbage}{name={cabbage}, - description={vegetable with thick green or purple leaves}} +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}. -\newglossaryentry{broccoli}{name={broccoli}, - description={vegetable with heads of small green or purple flower buds}} +\begin{important} +The auto-indexing is designed for \app+{makeindex} syntax. If you've +used the \opt{xindy} package option, the automatic escaping of +\app+{xindy} special characters in the \gloskey{sort} field may +result in an incorrect sort value for the \gls{index} command used by +the auto-indexing. Note also that \app{texindy} has a fixed set of +special characters (corresponding to \app{makeindex}['s] defaults) +that can't be customized. You may want to consider using \app{bib2gls} and +its dual entries as an alternative approach. +\end{important} -\begin{document} -\Gls{cabbage} and \gls{broccoli}. +The \gls{glsxtrpostnamehook} macro, used at the end of +\gls{glossentryname} and \gls{Glossentryname}, checks the +\catattr{indexname} attribute for the category associated with that +entry. Since \gls{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. -\printglossary -\end{document} -\end{verbatim} -When the document is built, \gls{makeindex} creates a file that -contains: -\begin{alltt} -\ics{glossarysection}[\ics{glossarytoctitle}]\mgroup{\ics{glossarytitle}}\ics{glossarypreamble} -\cs{begin}\mgroup{theglossary}\ics{glossaryheader} -\ics{glsgroupheading}\mgroup{B}\cs{relax} \ics{glsresetentrylist} -\ics{glossentry}\mgroup{broccoli}\marg{location list}\ics{glsgroupskip} -\ics{glsgroupheading}\mgroup{C}\cs{relax} \ics{glsresetentrylist} -\ics{glossentry}\mgroup{cabbage}\marg{location list}\% -\cs{end}\mgroup{theglossary}\ics{glossarypostamble} -\end{alltt} -The \cs{printglossary} command defines the commands shown -above after it's detected the glossary type, the title and style. It -then inputs the file. - -The \cs{printunsrtglossary} command performs the same preliminary -setup but there's no file to input. Instead it then does the section -heading (\cs{glossarysection}) and preamble (\cs{glossarypreamble}) -and constructs a control sequence that contains -\texttt{\cs{begin}\mgroup{theglossary}} \meta{content} -\texttt{\cs{end}\mgroup{theglossary}}. - -The letter group markup (\cs{glsgroupheading} and \cs{glsgroupskip}) -is inserted whenever the group label changes between top-level -entries. In this case, \meta{content} doesn't explicitly contain -\cs{glossentry} but uses a handler function instead. For example, -instead of: -\begin{alltt} -\ics{glossentry}\mgroup{broccoli}\marg{location list} -\end{alltt} -the \meta{content} will contain: -\begin{alltt} -\meta{internal handler}\mgroup{broccoli} -\end{alltt} -This internal handler uses \ics{printunsrtglossaryhandler} to -determine the required information (location list, hierarchical -level) that's needed to typeset the entry (using \cs{glossentry} or -\cs{subglossentry}). - -\begin{definition} -\cs{begin}\mgroup{printunsrtglossarywrap}\oarg{options}\newline -\meta{content} -\cs{end}\mgroup{printunsrtglossarywrap} -\end{definition} -The \env{printunsrtglossarywrap} environment provides a wrapper in -which you can place the actual glossary code. The optional argument -is the same as for \cs{printunsrtglossary}, but note that in this -case the \gloskey[printglossary]{type} key simply provides the -glossary title and doesn't identify the content. - -This environment essentially does: -\begin{alltt} -\meta{initial setup} -\ics{glossarysection}[\ics{glossarytoctitle}]\mgroup{\ics{glossarytitle}}\ics{glossarypreamble} -\cs{begin}\mgroup{theglossary}\ics{glossaryheader}\cs{glsresetentrylist} -\meta{content} -\cs{end}\mgroup{theglossary}\cs{glossarypreamble} -\end{alltt} -where \meta{initial setup} is much the same code as used by -\cs{printglossary} and \cs{printunsrtglossary}. Most importantly, -\meta{initial setup} sets the current glossary style, which -determines the definition of \env{theglossary}, \cs{glossentry} and -\cs{subglossentry}. - -Whilst it is possible to explicitly use the commands that create -letter group headings and the handler within \meta{content}, it -would be quite laborious and prone to error to do so for anything -other than a very short list. This can be illustrated with the -following silly example: -\begin{verbatim} -\begin{printunsrtglossarywrap}[style=indexgroup]% -\glsgroupheading{W}% -\gdef\glscurrententrylabel{cabbage}% -\printunsrtglossaryhandler\glscurrententrylabel -\glsgroupskip -\glsgroupheading{Z}% -\gdef\glscurrententrylabel{broccoli}% -\printunsrtglossaryhandler\glscurrententrylabel -\end{printunsrtglossarywrap} -\end{verbatim} -This trivial example will work with a tabular-like style, such as -\glostyle{long} (although the group headings will be ignored). A -more practical example that uses a loop within \meta{content} won't. - -\begin{definition} -\ics{printunsrtinnerglossary}\oarg{options}\marg{pre-code}\marg{post-code} -\end{definition} -This command is provided for use within -\env{printunsrtglossarywrap}. The optional argument \meta{options} -is similar to \cs{printunsrtglossary} but the following keys are -unavailable: \gloskey[printglossary]{title}, -\gloskey[printglossary]{toctitle}, \gloskey[printglossary]{style}, -\gloskey[printglossary]{numberedsection} and \gloskey[printglossary]{label}. - -This will do: -\begin{alltt} - \cs{begingroup} - \meta{initial setup} - \meta{pre-code} - \meta{content} - \meta{post-code} - \cs{endgroup} -\end{alltt} -where \meta{initial setup} processes the options and assigns -\ics{currentglossary}, \meta{pre-code} is some preliminary code and -\meta{post-code} is some final code before the end of the scoping. -The \meta{content} is the sequence of code that -\cs{printunsrtglossary} would normally insert within the -\env{theglossary} environment. +The internal macro used by the \sty{glossaries} package to +write the information to the external glossary file is +modified to check for the \catattr{dualindex} attribute. -For example: -\begin{verbatim} -\begin{printunsrtglossarywrap}[style=indexgroup] -\printunsrtinnerglossary[type=main]{}{} -\end{printunsrtglossarywrap} -\end{verbatim} -This produces a result very similar to that obtained with just: -\begin{verbatim} -\printunsrtglossary[style=indexgroup,type=main] -\end{verbatim} -The first case is unsuitable for use with a tabular-style. It will -also cause a problem with a list style when used with \gls{bib2gls} -(where the inner content will be empty on the first \LaTeX\ run -which will cause a missing \cs{item} error). - -This partial glossary command is more useful when you need to apply -filtering (which can be set up in the \meta{pre-code} argument as in -\cs{printunsrtglossary*}) or if you have multiple glossaries. For -example: -\begin{verbatim} -\begin{printunsrtglossarywrap}[style=list] -\item[Animals] -\printunsrtinnerglossary[type=animal]{}{} -\item[Vegetables] -\printunsrtinnerglossary[type=vegetable]{}{} -\item[Minerals] -\printunsrtinnerglossary[type=mineral]{}{} -\end{printunsrtglossarywrap} -\end{verbatim} -In this case, the \glostyle{list} style doesn't cause a problem as -there will be three instances of \cs{item} on the first \LaTeX\ run. +In both cases, the indexing is done through: +\cmddef{glsxtrdoautoindexname} +This uses the standard \gls{index} command with the sort value +taken from the entry's \gloskey{sort} key and the actual value +set to \code{\gls{glsentryname}\margm{entry-label}}. There are +user-level commands available to change the sort and actual +value used by the automated index. -Here's another example: -\begin{verbatim} -\begin{printunsrtglossarywrap}[style=indexgroup] -\glsgroupheading{animal}% -\printunsrtinnerglossary[type=animal]{}{} -\glsgroupskip -\glsgroupheading{vegetable}% -\printunsrtinnerglossary[type=vegetable]{}{} -\glsgroupskip -\glsgroupheading{mineral}% -\printunsrtinnerglossary[type=mineral]{}{} -\end{printunsrtglossarywrap} -\end{verbatim} -Note that in both of the above cases, the inner glossaries have been -arranged manually (animal, then vegetable and then mineral). - -It's also possible to use \cs{printunsrtinnerglossary} within the -handler function used by \cs{printunsrtglossary}. The internal -scoping within \cs{printunsrtinnerglossary} helps to reduce -interference. - -This is a rather more complicated example that requires -\gls{bib2gls}. Suppose I have a file called -\nolinkurl{topictitles.bib} that contains: -\begin{verbatim} -@indexplural{animal} -@indexplural{mineral} -@indexplural{vegetable} -\end{verbatim} -And also a file called \nolinkurl{topics.bib} that contains entries -like: -\begin{verbatim} -@entry{zebra, - name={zebra}, - description={striped African horse}, - category={animal} -} - -@entry{broccoli, - name={broccoli}, - description={vegetable with heads of small green or purple flower buds}, - category={vegetable} -} - -@entry{quartz, - name={quartz}, - description={hard mineral consisting of silica}, - category={mineral} -} -\end{verbatim} -Note that the category labels in the second file match the entry -labels in the first file. - -The simplest way of creating a hierarchical glossary from this data -is to input both files and copy the \gloskey{category} field to the -\gloskey{parent} field: -\begin{verbatim} -\GlsXtrLoadResources[src={topictitles,topics}, - replicate-fields={category=parent}] -\end{verbatim} -The glossary can then simply be displayed with: -\begin{verbatim} -\printunsrtglossary[style=indexgroup] -\end{verbatim} -This will now be ordered: animal (followed by animal child entries), -mineral (followed by mineral child entries), vegetable (followed by -vegetable child entries). - -Suppose (for some strange reason) that I now need the ordering to be -vegetable, mineral, animal (that is, reverse alphabetical) but the -child entries still need to be in the normal alphabetical order. - -It's not possible to use different sort methods for different -hierarchical levels with \gls{bib2gls}, but it is possible to -simulate it. - -Instead of making the entries within \nolinkurl{topics.bib} children -of the entries defined in \nolinkurl{topictitles.bib}, I'm now going -to create separate glossaries for each type: -\begin{verbatim} -\newignoredglossary*{animal} -\newignoredglossary*{mineral} -\newignoredglossary*{vegetable} -\end{verbatim} -The entries in \nolinkurl{topictitles.bib} go in the default main -glossary and are sorted in reverse: -\begin{verbatim} -\GlsXtrLoadResources[src=topictitles,type=main,selection=all, - sort=en-GB-reverse] -\end{verbatim} -Note that I've selected all entries in this example. It becomes more -complicated with the default selection criteria. (See the -\nolinkurl{sample-nested.tex} example provided with \gls{bib2gls} -v2.3+.) - -Now the entries in \nolinkurl{topics.bib} are selected but the -\gloskey{type} field is set to the \gloskey{category} field: -\begin{verbatim} -\GlsXtrLoadResources[src=topics,type={same as category},selection=all, - sort=en-GB] -\end{verbatim} -The aim here is to use \cs{printunsrtglossary} to list all the -entries in the main glossary (that is, all the topic titles) and use -a handler that tests if there is a glossary that has the same label -as the current entry label. If one exists, it's then listed using -\cs{printunsrtinnerglossary} with the level offset shifted to give a -hierarchical appearance: -\begin{verbatim} -\newcommand{\nestedhandler}[1]{% - \glsxtrunsrtdo{#1}% - \ifglossaryexists*{#1}% - {% - \printunsrtinnerglossary[type={#1},leveloffset=++1]{}{}% - }% - {}% -} +The actual value is given by: +\cmddef{glsxtrautoindexentry} +where \meta{entry-label} is the entry's label. The default definition +is: +\begin{compactcodebox} +\cmd{newcommand}*\marg{\gls{glsxtrautoindexentry}}[1]\marg{\gls{string}\gls{glsentryname}\marg{\#1}} +\end{compactcodebox} +Note the use of \gls{string} to prevent \gls{glsentryname} from +being expanded as it's written to the index file. -\printunsrtglossary*[type=main,style=index]{% - \let\printunsrtglossaryhandler\nestedhandler +The sort value is assigned using: +\cmddef{glsxtrautoindexassignsort} +where \meta{entry-label} is the entry label and \meta{cs} is the command +which needs to be set to the sort value. The default definition is: +\begin{compactcodebox} +\cmd{newcommand}*\marg{\gls{glsxtrautoindexassignsort}}[2]\marg{\% + \gls{glsletentryfield}\marg{\#1}\marg{\#2}\marg{\gloskey{sort}}\% } -\end{verbatim} - -I've used \cs{newignoredglossary*} as I don't need to specify a -title for any of those glossaries nor do I need to use those glossaries with -\cs{printunsrtglossaries}. With \gls{bib2gls} v2.3+, I can omit the -three \cs{newignoredglossary*} lines and use the -\texttt{-{}-provide-glossaries} switch which will make \gls{bib2gls} -automatically provide any unknown glossaries (with -\cs{provideignoredglossary}) in the \texttt{.glstex} file. - -\section{Standalone Entry Items} -\label{sec:glossentry} - -It may be that you don't want a list but would rather display -entry details throughout the document. You can simply -do \cs{glsentryname} followed by \cs{glsentrydesc}. -(Remember that if you don't want a sorted list, use -\pkgopt[none]{sort} to skip the construction of the -\gloskey{sort} field.) -For example, in the preamble provide a custom command: -\begin{verbatim} -\newcommand{\displayterm}[1]{% - \par\medskip\par\noindent - Definition: \glsentryname{#1}.\par - \glsentrydesc{#1} - \par\medskip -} -\end{verbatim} -define your entries -\begin{verbatim} -\newglossaryentry{function}{name={function}, - description={a relation or expression involving variables} -} -\end{verbatim} -and then later in the text: -\begin{verbatim} -\displayterm{function} -\end{verbatim} +\end{compactcodebox} +After this macro is called, \meta{cs} is then processed to escape +any of \app{makeindex}['s] special characters. Note that this +escaping is only performed on the sort not on the actual value. +The escaping of the sort value is performed by +\cmddef{glsxtrautoindexesc} +You can redefine this to do nothing if you want to omit the +escaping. You may want to consider providing another field to obtain +the appropriate sort value if the one provided in the \gloskey{sort} +field isn't suitable (because it may already have had special +characters escaped or it may be a numeric value in the case of +sort by use or definition). -However, if may be that you want to use \sty{hyperref} and -have commands like \cs{gls} link back to the place where -the term is described. Instead of using \cs{glsentryname} -use -\begin{definition}[\DescribeMacro\glsxtrglossentry] -\cs{glsxtrglossentry}\marg{label} -\end{definition} -where \meta{label} is the entry's label. +The command used to perform the actual indexing is: +\cmddef{glsxtrautoindex} +This just does \code{\gls{index}\margm{text}} by default. -This is designed to behave much like the way the name is displayed -in the glossary. It performs the following: -\begin{itemize} -\item Defines \cs{glscurrententrylabel} to the entry's label. -This is usually done at the start of the glossary style commands -\cs{glossentry} and \cs{subglossentry} and may be used by hooks, -such as the post-name hooks. Here the definition is localised -so that it's only available for use in \cs{glossentryname}. +\begin{important} +The entry's \gloskey{parent} field isn't referenced in this +automated indexing. +\end{important} -\item Defines \cs{currentglossary} to the entry's glossary type. -This is usually done at the start of commands like -\cs{printglossary} and may be used by style hooks. -Here the definition is localised so that it's only available for use -in \cs{glsentryitem} and \cs{glssubentryitem}. The value is obtained -by fully expanding: -\begin{definition}[\DescribeMacro\GlsXtrStandaloneGlossaryType] -\cs{GlsXtrStandaloneGlossaryType} -\end{definition} -which defaults to the value of the \gloskey{type} field for the -current entry. +For example, to index the value of the \gloskey{first} key, +instead of the \gloskey{name} key: +\begin{codebox} +\cmd{renewcommand}*\marg{\gls{glsxtrautoindexentry}}[1]\marg{\gls{string}\gls{glsentryfirst}\marg{\#1}} +\end{codebox} +and if the sort value also needs to be set to the \gloskey{long} +field, if present, otherwise the \gloskey{sort} field: +\begin{codebox} +\cmd{renewcommand}*\marg{\gls{glsxtrautoindexassignsort}}[2]\marg{\% + \gls{ifglshaslong}\marg{\#2}\% + \marg{\gls{glsletentryfield}\marg{\#1}\marg{\#2}\marg{\gloskey{long}}}\% + \marg{\gls{glsletentryfield}\marg{\#1}\marg{\#2}\marg{\gloskey{sort}}}\% +} +\end{codebox} -\item Increments and display the entry counters - if the \pkgopt{entrycounter} or \pkgopt{subentrycounter} - package options are set. If the entry doesn't have a parent, then - this does - \begin{itemize} - \item \cs{glsentryitem}\marg{label} - \end{itemize} - otherwise it does (as from v1.31) - \begin{itemize} - \item \ics{GlsXtrStandaloneSubEntryItem}\marg{label} -which defaults to \cs{glssubentryitem}\marg{label} if the entry -has a parent but not a grandparent. - \end{itemize} - This reflects the behaviour of the predefined hierarchical styles. -A bug in pre-version~1.31 used \cs{glsentryitem} for all child levels, -which doesn't match the hierarchical glossary styles. If you want to -restore this behaviour, just do: -\begin{verbatim} -\renewcommand*{\GlsXtrStandaloneSubEntryItem}[1]{\glssubentryitem{#1}} -\end{verbatim} +If the value of the attribute is \qt{true}, no encap +will be added, otherwise the encap will be the +attribute value. For example: +\begin{codebox} +\gls{glssetcategoryattribute}\marg{\cat{general}}\marg{\catattr{indexname}}\marg{textbf} +\end{codebox} +will set the encap to \code{textbf} which will display the +relevant page number in bold whereas +\begin{codebox} +\gls{glssetcategoryattribute}\marg{\cat{general}}\marg{\catattr{dualindex}}\marg{true} +\end{codebox} +won't apply any formatting to the page number in the index. -\item Sets the hyper-target if supported (using \cs{glstarget}) -and displays the entry name using: -\begin{definition}[\DescribeMacro\GlsXtrStandaloneEntryName] -\cs{GlsXtrStandaloneEntryName}\marg{label} -\end{definition} - which uses - \cs{glstarget}\marg{label}\{\cs{glossentryname}\marg{label}\} - by default. - Remember that \cs{glossentryname} uses \cs{glsnamefont} or picks up - the style from category attributes such as - \catattr{glossnamefont}. -\end{itemize} -If you have used \ics{nopostdesc} or \ics{glsxtrnopostpunc} -in any of your description fields, you can use -\begin{definition}[\DescribeMacro\glsxtractivatenopost] -\cs{glsxtractivatenopost} -\end{definition} -to make these commands behave as they normally do within a glossary. -This needs to be placed before -\begin{alltt} -\cs{glossentrydesc}\marg{label}\cs{glspostdescription} -\end{alltt} -and scoped. Note that \cs{glsnonextpages} and \cs{glsnextpages} have no -effect outside of the glossary and are not intended for use in a -standalone context. +\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 \gls{index} to use +some thing else.) +\end{important} -It's also possible to select a different field (rather than -using \gloskey{name}): -\begin{definition}[\DescribeMacro\glsxtrglossentryother] -\cs{glsxtrglossentryother}\marg{header}\marg{label}\marg{field} -\end{definition} -The \meta{field} must be given using its internal field label -which may not be the same as the key used to set the field. -See the key to field mappings table in the \styfmt{glossaries} -user manual. The \meta{header} argument is the code -to pass to the third argument of \cs{glsxtrtitleorpdforheading}. -It may be left empty in which case the default is determined as follows: -\begin{itemize} -\item If \cs{glsxtrhead\meta{field}} is defined, then \meta{header} -is \cs{glsxtrhead\meta{field}}\marg{label}. -\item Otherwise \meta{header} is simply the field value. -\end{itemize} -The \cs{glsxtrglossentryother} command internally uses -\begin{definition}[\DescribeMacro\GlsXtrStandaloneEntryOther] -\cs{GlsXtrStandaloneEntryOther}\marg{label}\marg{field} -\end{definition} -instead of \cs{GlsXtrStandaloneEntryName}, which uses -\cs{glossentrynameother}\marg{label}\marg{field} instead of -\cs{glossentryname}\marg{label}. - -If you have loaded the -\sty{glossaries-accsupp} package (through the \pkgopt{accsupp} -option) then accessibility support will be provided if -there's a corresponding command -\begin{alltt} -\cs{gls\meta{field}accessdisplay}\marg{text}\marg{label} -\end{alltt} -(for example, \cs{glssymbolaccessdisplay}). +By default the \glsopt{format} key won't be used with +the \catattr{dualindex} attribute. You can allow the +\glsopt{format} key to override the attribute value +by using the preamble-only command: +\cmddef{GlsXtrEnableIndexFormatOverride} +If you use this command and \sty{hyperref} has been loaded, +then the \env{theindex} environment will be modified to redefine +\gls{glshypernumber} to allow formats that use that command. -This means that my custom command can be changed to: -\begin{verbatim} -\newcommand{\displayterm}[1]{% - \par\medskip\par\noindent - Definition: \glsxtrglossentry{#1}.\par - \glsentrydesc{#1} - \par\medskip -} -\end{verbatim} -If I want numbered definitions, then I can use the -package options \sty{entrycounter} or \sty{subentrycounter} -and remove the colon: -\begin{verbatim} -\newcommand{\displayterm}[1]{% - \par\medskip\par\noindent - Definition \glsxtrglossentry{#1}.\par - \glsentrydesc{#1} - \par\medskip -} -\end{verbatim} -The counter label uses a dot after the number by default -but this can be changed to a colon: -\begin{verbatim} -\renewcommand*{\glsentrycounterlabel}{\theglossaryentry:\space} -\end{verbatim} -It's now possible to not only use \cs{gls} to link back to the -definition but also use \cs{glsrefentry} to reference -the counter and \cs{glsxtrpageref} to reference the page number. +\begin{important} +The \catattr{dualindex} attribute will still be used on +subsequent use even if the \catattr{indexonlyfirst} attribute +(or \opt{indexonlyfirst} package option) is set. However, +the \catattr{dualindex} attribute will honour the +\glsopt{noindex} key. +\end{important} -If I want the description to behave more like it does -in a glossary in need to make the following modification: -\begin{verbatim} -\newcommand{\displayterm}[1]{% - \par\medskip\par\noindent - Definition \glsxtrglossentry{#1}.\par - \begingroup - \glsxtractivatenopost - \glossentrydesc{#1}\glspostdescription - \endgroup - \par\medskip -} -\end{verbatim} -(Note the grouping to localise \cs{glsxtractivatenopost}.) - -You can also use \cs{glsxtrglossentry} within section headings. -For example: -\begin{verbatim} -\section{\glsxtrglossentry{function}} -\end{verbatim} -This will use \cs{glsentryname} in PDF bookmarks (if -\cs{texorpdfstring} is defined) and will use \cs{glsxtrheadname} in -page headers and table of contents. (If you're using a page style or -table of contents that doesn't use \cs{markright} or \cs{markbook} -or \cs{@starttoc} then you need to insert \cs{glsxtrmarkhook} and -\cs{@glsxtrinmark} at the start of the header or table of contents -either scoped or afterwards cancelled with \cs{@glsxtrnotinmark} and -\cs{glsxtrrestoremarkhook}.) +The \gls{glsxtrdoautoindexname} command will attempt to escape any of +\app{makeindex}'s special characters, but there may be special cases +where it fails, so take care. This assumes the default \app{makeindex} actual, +level, quote and encap values (unless any of the commands +\gls{actualchar}, \gls{levelchar}, \gls{quotechar} or +\gls{encapchar} have been defined before \sty{glossaries-extra} +is loaded). -\section{Entry Aliases} -\label{sec:alias} +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} -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}.) +\cmddef{GlsXtrSetActualChar} +Set the actual character to \meta{char}. -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[hybrid]{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}. +\cmddef{GlsXtrSetLevelChar} +Set the level character to \meta{char}. -Note that with \pkgopt[only]{record}, the \gls{locationlist} -for aliased entries is controlled with \gls{bib2gls}['s] settings. -\end{itemize} +\cmddef{GlsXtrSetEscChar} +Set the escape (quote) character to \meta{char}. -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} +\cmddef{GlsXtrSetEncapChar} +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}. +\code{\meta{word}\gls{index}\margm{word}}, but they behave rather +differently. If you want to use \gls{index} then just use +\gls{index}. \end{important} -The \styfmt{glossaries} package advises against defining entries +The base \sty{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. +\sectionref{sec:refindexopts}, this ability is disabled by +default with \sty{glossaries-extra} but can be enabled using +the \opt{docdef} package options. -Although this can be problematic, the \styfmt{glossaries-extra} +Although this can be problematic, the \sty{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 +\opt{docdef} 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} +\cmddef{GlsXtrEnableOnTheFly} +When used, this defines the commands described below. The starred +version was provided to help support \idx{utf8} with \sty{inputenc}. +Recent versions of the \LaTeX\ kernel now provide better support. +Both \sty{glossaries} and \sty{glossaries-extra} have been updated +to help integrate the new kernel features, so the unstarred version +may also work with \idx{utf8}. + +\begin{warning} +If you use the starred version of \gls{GlsXtrEnableOnTheFly} +don't use any commands in the \meta{label}, even if they expand +to just text. +\end{warning} -\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 +\cmddef{glsxtr} +If an entry with the label \meta{entry-label} has already been defined, +this just does \code{\gls{gls}\oargm{gls-options}\margm{entry-label}}. If +\meta{entry-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{compactcodebox} +\gls{newglossaryentry}\margm{entry-label}\marg{\gloskeyval{name}{entry-label}, + \gloskeyval{category}{\gls{glsxtrcat}}, + \gloskeyval{description}{\gls{nopostdesc}}, + \meta{dfn-options}} +\end{compactcodebox} \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}. +\meta{entry-label} and placed in the \gloskey{name} key within +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} - +them. If it's not empty, a~warning will be generated with: +\cmddef{GlsXtrWarning} 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} +of \gls{glsxtr} below: +\begin{codebox} +\gls{glsxtr}\oarg{}\oarg{\gloskey{plural}{geese}}\marg{goose} +\comment{... later} +\gls{glsxtr}\oarg{}\oarg{\gloskey{plural}{geese}}\marg{goose} +\end{codebox} 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} +\begin{codebox} +\cmd{newcommand}*\marg{\cmd{goose}}\marg{\gls{glsxtr}\oarg{}\oarg{\gloskeyval{plural}{geese}}\marg{goose}} +\cmd{renewcommand}*\marg{\gls{GlsXtrWarning}}[2]\marg{} +\comment{... later} +\cmd{goose}\cmd{ }some more text here +\end{codebox} 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{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} +define the entries in the preamble with \gls{newglossaryentry} +and then use \gls{gls} in the document. + +There are also plural and case-changing alternatives to \gls{glsxtr}. +\cmddef{glsxtrpl} +This is like \gls{glsxtr} but uses \gls{glspl} instead of \gls{gls}. +\cmddef{Glsxtr} +This is like \gls{glsxtr} but uses \gls{Gls} instead of \gls{gls}. +\cmddef{Glsxtrpl} +This is like \gls{glsxtr} but uses \gls{Glspl} instead of \gls{gls}. + +The category is set to: +\cmddef{glsxtrcat} +This should simply expand to the required category label. +The default definition is \code{general}. \begin{important} -The \sty{glossaries-accsupp} package is still experimental and so -accessibility features are liable to change. +The commands \gls{glsxtr}, \gls{glsxtrpl}, \gls{Glsxtr} +and \gls{Glsxtrpl} can't be used after the \idxpl{glossary} have been +displayed (through \gls{printglossary} etc). It's best not to mix +these commands with the standard glossary commands, such +as \gls{gls} or there may be unexpected results. \end{important} -The \sty{glossaries-accsupp} package 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. Other accessibility features, such as the attributes used -by \ics{newabbreviation} also won't work if \sty{glossaries-accsupp} -is loaded too late. - -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{description} field. - -\begin{definition}[\DescribeMacro\Glsaccessdesc] -\cs{Glsaccessdesc}\marg{label} -\end{definition} -This displays the value of the \gloskey{description} 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{descriptionplural} field. - -\begin{definition}[\DescribeMacro\Glsaccessdescplural] -\cs{Glsaccessdescplural}\marg{label} -\end{definition} -This displays the value of the \gloskey{descriptionplural} 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} +\chapter{Supplementary Files} +\label{sec:extrafiles} + +The \sty{glossaries-extra} package comes with some additional files. +Those listed in \sectionref{sec:exampleglossariesfiles} provide +dummy entries for testing various styles. They should be placed on +\TeX's path. + +There are also some sample files listed in \sectionref{sec:samples}. +These should be located in the package documentation directory. + +\section{Dummy Files for Testing} +\label{sec:exampleglossariesfiles} + +The base \sty{glossaries} package provides files with dummy entries +for testing. The \sty{glossaries-extra} package provides an +additional file with entries. + +\filedef{example-glossaries-xr.tex} +This file contains entries that have the \gloskey{see}, \gloskey{seealso} or +\gloskey{alias} keys set. + +There are also \ext+{bib} files corresponding to all the available +\ext+{tex} files for use with \app{bib2gls}. + +\filedef{example-glossaries-acronym.bib} +Corresponds to \filefmt{example-glossaries-acronym.tex} +\filedef{example-glossaries-acronym-desc.bib} +Corresponds to \filefmt{example-glossaries-acronym-desc.tex} +\filedef{example-glossaries-acronyms-lang.bib} +Corresponds to \filefmt{example-glossaries-acronyms-lang.tex} +\filedef{example-glossaries-brief.bib} +Corresponds to \filefmt{example-glossaries-brief.tex} +\filedef{example-glossaries-childmultipar.bib} +Corresponds to \filefmt{example-glossaries-childmultipar.tex} +\filedef{example-glossaries-childnoname.bib} +Corresponds to \filefmt{example-glossaries-childnoname.tex} +\filedef{example-glossaries-cite.bib} +Corresponds to \filefmt{example-glossaries-cite.tex} +\filedef{example-glossaries-images.bib} +Corresponds to \filefmt{example-glossaries-images.tex} +\filedef{example-glossaries-long.bib} +Corresponds to \filefmt{example-glossaries-long.tex} +\filedef{example-glossaries-longchild.bib} +Corresponds to \filefmt{example-glossaries-longchild.tex} +\filedef{example-glossaries-multipar.bib} +Corresponds to \filefmt{example-glossaries-multipar.tex} +\filedef{example-glossaries-parent.bib} +Corresponds to \filefmt{example-glossaries-parent.tex} +\filedef{example-glossaries-symbolnames.bib} +Corresponds to \filefmt{example-glossaries-symbolnames.tex} +\filedef{example-glossaries-symbols.bib} +Corresponds to \filefmt{example-glossaries-symbols.tex} +\filedef{example-glossaries-url.bib} +Corresponds to \filefmt{example-glossaries-url.tex} +\filedef{example-glossaries-xr.bib} +Corresponds to \filefmt{example-glossaries-xr.tex} + +\section{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-abbr-styles.tex] Demonstrates all predefined -abbreviation styles. - -\item[sample-mixture.tex] General entries, acronyms and initialisms -all treated differently. - -\item[sample-name-font] Categories and attributes are used to +The \sty{glossaries-extra} package comes with some sample files +that are listed below. There are also sample files provided with the +\sty{glossaries} package and with \app{bib2gls}. See also +the \gallery{Dickimaw Books Gallery}. + +\filedef{sample.tex} +Simple sample file that uses one of the dummy +files provided by the \sty{glossaries} package for testing. +\begin{terminal} +pdflatex sample +makeglossaries sample +pdflatex sample +pdflatex sample +\end{terminal} + +\filedef{sample-abbr-styles.tex} +\begin{terminal} +pdflatex sample-abbr-styles +makeglossaries sample-abbr-styles +pdflatex sample-abbr-styles +pdflatex sample-abbr-styles +\end{terminal} +Demonstrates all predefined abbreviation styles. + +\filedef{sample-mixture.tex} +\begin{terminal} +pdflatex sample-mixture +makeglossaries sample-mixture +pdflatex sample-mixture +makeglossaries sample-mixture +pdflatex sample-mixture +\end{terminal} +General entries, acronyms and initialisms all treated differently. + +\filedef{sample-name-font.tex} +\begin{terminal} +pdflatex sample-name-font +makeglossaries sample-name-font +pdflatex sample-name-font +pdflatex sample-name-font +\end{terminal} +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} +\filedef{sample-abbrv.tex} +\begin{terminal} +pdflatex sample-abbrv +makeglossaries sample-abbrv +pdflatex sample-abbrv +pdflatex sample-abbrv +\end{terminal} +General abbreviations. + +\filedef{sample-acronym.tex} +\begin{terminal} +pdflatex sample-acronym +makeglossaries sample-acronym +pdflatex sample-acronym +\end{terminal} +Acronyms aren't initialisms and don't expand on \idx{firstuse}. + +\filedef{sample-acronym-desc.tex} +\begin{terminal} +pdflatex sample-acronym-desc +makeglossaries sample-acronym-desc +pdflatex sample-acronym-desc +makeglossaries sample-acronym-desc +pdflatex sample-acronym-desc +\end{terminal} +Acronyms that have a separate long form and description. + +\filedef{sample-crossref.tex} +\begin{terminal} +pdflatex sample-crossref +makeglossaries sample-crossref +pdflatex sample-crossref +\end{terminal} +Unused entries that have been cross-referenced automatically are +added at the end of the document. + +\filedef{sample-indexhook.tex} +\begin{terminal} +pdflatex sample-indexhook +makeglossaries sample-indexhook +pdflatex sample-indexhook +\end{terminal} +Use the index hook to track which entries have been indexed (and +therefore find out which ones haven't been indexed). + +\filedef{sample-footnote.tex} +\begin{terminal} +pdflatex sample-footnote +makeglossaries sample-footnote +pdflatex sample-footnote +\end{terminal} +Footnote abbreviation style that moves +the footnote marker outside of the hyperlink generated by \gls{gls} and moves it after certain punctuation characters for neatness. -\item[sample-undef.tex] Warn on undefined entries instead of +\filedef{sample-undef.tex} +\begin{terminal} +pdflatex sample-undef +makeglossaries sample-undef +pdflatex sample-undef +pdflatex sample-undef +\end{terminal} +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 +\filedef{sample-mixed-abbrv-styles.tex} +\begin{terminal} +pdflatex sample-mixed-abbrv-styles +makeglossaries sample-mixed-abbrv-styles +pdflatex sample-mixed-abbrv-styles +\end{terminal} +Different abbreviation styles for different entries. + +\filedef{sample-initialisms.tex} +\begin{terminal} +pdflatex sample-initialisms +makeglossaries sample-initialisms +pdflatex sample-initialisms +\end{terminal} +Automatically insert dots into initialisms. + +\filedef{sample-postdot.tex} +\begin{terminal} +pdflatex sample-postdot +makeglossaries sample-postdot +pdflatex sample-postdot +\end{terminal} +Another initialisms example. + +\filedef{sample-postlink.tex} +\begin{terminal} +pdflatex sample-postlink +makeglossaries sample-postlink +pdflatex sample-postlink +\end{terminal} +Automatically inserting text after +the \idx{linktext} produced by commands like \gls{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, see \sectionref{sec:entrycount}). - -\item[sample-unitentrycount.tex] Enable use of per-unit entry-use counting -(\sectionref{sec:entrycount}). - -\item[sample-onelink.tex] Using the per-unit entry counting -(\sectionref{sec:entrycount}) -to only have one hyperlink per entry per page. - -\item[sample-linkcount.tex] Using link counting -(\sectionref{sec:linkcount}) +\filedef{sample-header.tex} +\begin{terminal} +pdflatex sample-header +makeglossaries sample-header +pdflatex sample-header +pdflatex sample-header +\end{terminal} +Using entries in section\slash chapter headings. + +\filedef{sample-autoindex.tex} +\begin{terminal} +pdflatex sample-autoindex +makeglossaries sample-autoindex +pdflatex sample-autoindex +makeindex sample-autoindex +pdflatex sample-autoindex +\end{terminal} +Using the \catattr{dualindex} and \catattr{indexname} attributes to +automatically add glossary entries to the index (in addition to the +glossary \idx{locationlist}). + +\filedef{sample-autoindex-hyp.tex} +\begin{terminal} +pdflatex sample-autoindex-hyp +makeglossaries sample-autoindex-hyp +pdflatex sample-autoindex-hyp +makeindex sample-autoindex-hyp +pdflatex sample-autoindex-hyp +\end{terminal} +As previous but uses \sty{hyperref}. + +\filedef{sample-nested.tex} +\begin{terminal} +pdflatex sample-nested +makeglossaries sample-nested +pdflatex sample-nested +\end{terminal} +Using \gls{gls} within the value of the \gloskey{name} key. + +\filedef{sample-entrycount.tex} +\begin{terminal} +pdflatex sample-entrycount +pdflatex sample-entrycount +makeglossaries sample-entrycount +pdflatex sample-entrycount +\end{terminal} +Enable entry-use counting (only index if used more than $n$ times, +see \sectionref{sec:entrycount}). + +\filedef{sample-unitentrycount.tex} +\begin{terminal} +pdflatex sample-unitentrycount +pdflatex sample-unitentrycount +makeglossaries sample-unitentrycount +pdflatex sample-unitentrycount +\end{terminal} +Enable use of per-unit entry-use counting (\sectionref{sec:entrycount}). + +\filedef{sample-onelink.tex} +\begin{terminal} +pdflatex sample-onelink +makeglossaries sample-onelink +pdflatex sample-onelink +\end{terminal} +Using the per-unit entry counting (\sectionref{sec:entrycount}) to +only have one hyperlink per entry per page. + +\filedef{sample-linkcount.tex} +\begin{terminal} +pdflatex sample-linkcount +makeglossaries sample-linkcount +pdflatex sample-linkcount +\end{terminal} +Using link counting (\sectionref{sec:linkcount}) to only have one hyperlink per entry. -\item[sample-pages.tex] Insert \qt{page} or \qt{pages} before the -location list. - -\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 +\filedef{sample-pages.tex} +\begin{terminal} +pdflatex sample-pages +makeglossaries sample-pages +pdflatex sample-pages +pdflatex sample-pages +\end{terminal} +Insert \qt{page} or \qt{pages} before the \idx{locationlist}. + +\filedef{sample-altmodifier.tex} +\begin{terminal} +pdflatex sample-altmodifier +makeglossaries sample-altmodifier +pdflatex sample-altmodifier +pdflatex sample-altmodifier +\end{terminal} +Set the default options for commands like \gls{gls} and add an +alternative modifier. + +\filedef{sample-mixedsort.tex} +\begin{terminal} +pdflatex sample-mixedsort +pdflatex sample-mixedsort +\end{terminal} +Uses the optional argument of \gls{makeglossaries} to allow a +mixture of \gls{printglossary} and \gls{printnoidxglossary}. + +\filedef{sample-external.tex} +\begin{terminal} +pdflatex sample-external +makeglossaries sample-external +pdflatex sample-external +\end{terminal} +Uses the \catattr{targeturl} attribute to allow for entries that +should link to an external URL rather than to an internal glossary. + +\filedef{sample-fmt.tex} +\begin{terminal} +pdflatex sample-fmt +makeglossaries sample-fmt +pdflatex sample-fmt +\end{terminal} +Provides text-block commands associated +with entries in order to use \gls{glsxtrfmt}. + +\filedef{sample-alias.tex} +\begin{terminal} +pdflatex sample-alias +makeglossaries sample-alias +pdflatex sample-alias +\end{terminal} +Uses the \gloskey{alias} key (see \sectionref{sec:alias}). + +\filedef{sample-alttree.tex} +\begin{terminal} +pdflatex sample-alttree +makeglossaries sample-alttree +pdflatex sample-alttree +\end{terminal} +Uses the \sty{glossaries-extra-stylemods} package with the +\glostyle{alttree} style (see \sectionref{sec:stylemods}). + +\filedef{sample-alttree-sym.tex} +\begin{terminal} +pdflatex sample-alttree-sym +makeglossaries sample-alttree-sym +pdflatex sample-alttree-sym +\end{terminal} +Another \glostyle{alttree} example that measures the symbol widths. + +\filedef{sample-alttree-marginpar.tex} +\begin{terminal} +pdflatex sample-alttree-marginpar +makeglossaries sample-alttree-marginpar +pdflatex sample-alttree-marginpar +\end{terminal} +Another \glostyle{alttree} example +that puts the \idx{locationlist} in the margin. + +\filedef{sample-onthefly.tex} +\begin{terminal} +pdflatex sample-onthefly +makeglossaries sample-onthefly +pdflatex sample-onthefly +\end{terminal} +Using on-the-fly commands. Terms with accents must have the +\gloskey{name} key explicitly set. + +\filedef{sample-onthefly-xetex.tex} +\begin{terminal} +xelatex sample-onthefly-xetex +makeglossaries sample-onthefly-xetex +xelatex sample-onthefly-xetex +\end{terminal} +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 +\filedef{sample-onthefly-utf8.tex} +\begin{terminal} +pdflatex sample-onthefly-utf8 +makeglossaries sample-onthefly-utf8 +pdflatex sample-onthefly-utf8 +\end{terminal} +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 +of \gls{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 +\filedef{sample-accsupp.tex} +\begin{terminal} +pdflatex sample-accsupp +makeglossaries sample-accsupp +pdflatex sample-accsupp +\end{terminal} +Integrate \sty{glossaries-accsupp}. + +\filedef{sample-prefix.tex} +\begin{terminal} +pdflatex sample-prefix +makeglossaries sample-prefix +pdflatex sample-prefix +\end{terminal} +Integrate \sty{glossaries-prefix}. + +\filedef{sample-suppl-main.tex} +\begin{terminal} +pdflatex sample-suppl +pdflatex sample-suppl-main +makeglossaries sample-suppl-main +pdflatex sample-suppl-main +\end{terminal} +Uses \glsopt{thevalue} to reference a location in the supplementary +file \inlineglsdef{file.sample-suppl.tex}. + +\filedef{sample-suppl-main-hyp.tex} +\begin{terminal} +pdflatex sample-suppl-hyp +makeglossaries sample-suppl-hyp +pdflatex sample-suppl-hyp +pdflatex sample-suppl-main-hyp +makeglossaries sample-suppl-main-hyp +pdflatex sample-suppl-main-hyp +\end{terminal} +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}. +in the supplementary file \inlineglsdef{file.sample-suppl-hyp.tex}. -\end{description} \chapter{Multi-Lingual Support} \label{sec:lang} -There's only one command provided by \styfmt{glossaries-extra} +There's only one command provided by \sty{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 +\gls{abbreviationsname} if you use +the \opt{abbreviations} package option to automatically +create the glossary labelled \code{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}). +it will be defined as \gls{acronymname} (provided by +\sty{glossaries}), which is language-sensitive. -You can redefine it in the usual way. For example: -\begin{verbatim} -\renewcommand*{\abbreviationsname}{List of Abbreviations} -\end{verbatim} +You can redefine \gls{abbreviationsname} in the usual way. For example: +\begin{codebox} +\cmd{renewcommand}*\marg{\gls{abbreviationsname}}\marg{List of Abbreviations} +\end{codebox} Or using \sty{babel} or \sty{polyglossia} captions hook: -\begin{verbatim} -\appto\captionsenglish{% - \renewcommand*{\abbreviationsname}{List of Abbreviations}% +\begin{codebox} +\cmd{appto}\cmd{captionsenglish}\marg{\comment{} + \cmd{renewcommand}*\marg{\gls{abbreviationsname}}\marg{List of Abbreviations}\comment{} } -\end{verbatim} +\end{codebox} -Alternatively you can use the \gloskey[printglossary]{title} +Alternatively you can use the \printglossopt{title} key when you print the list of abbreviations. For example: -\begin{verbatim} -\printabbreviations[title={List of Abbreviations}] -\end{verbatim} +\begin{codebox} +\gls{printabbreviations}\oarg{\printglossoptvalm{title}{List of Abbreviations}} +\end{codebox} or -\begin{verbatim} -\printglossary[type=abbreviations,title={List of Abbreviations}] -\end{verbatim} +\begin{codebox} +\gls{printabbreviations}\oarg{\printglossopt{type}{abbreviations},\printglossoptvalm{title}{List of Abbreviations}} +\end{codebox} 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 +The \sty{glossaries-extra} package has the facility to load language modules (whose filename is in the form -\texttt{glossariesxtr\dhyphen}\meta{language}\texttt{.ldf}) if they exist, +\metafilefmt{glossariesxtr\dhyphen}{language}{.\ext+{ldf}}) if they exist, but won't warn if they don't. If \sty{glossaries-extra-bib2gls} is -loaded via the \pkgopt{record} package option then the check for +loaded via the \opt{record} package option then the check for language resource files will additionally search for an associated language script file given by -\texttt{glossariesxtr-}\meta{script}\texttt{.ldf} where +\metafilefmt{glossariesxtr-}{script}{.\ext{ldf}} where \meta{script} is the four letter script identifier, such as -\texttt{Latn}, associated with the given dialect. There's no warning if the +\code{Latn}, associated with the given dialect. There's no warning if the associated file isn't found. The script file is loaded after the dialect file. If you want to write your own language module, you just need to create a file called -\texttt{glossariesxtr\dhyphen}\meta{lang}\texttt{.ldf}, where \meta{lang} +\metafilefmt{glossariesxtr\dhyphen}{lang}{.\ext{ldf}}, where \meta{lang} identifies the language or dialect (see the \sty{tracklang} -package). For example, \nolinkurl{glossariesxtr-french.ldf}. - +package). For example, \filefmt{glossariesxtr-french.ldf}. +The file should start with: +\cmddef{ProvidesGlossariesExtraLang} The simplest code for this file is: -\begin{verbatim} -\ProvidesGlossariesExtraLang{french}[2015/12/09 v1.0] - -\newcommand*{\glossariesxtrcaptionsfrench}{% - \def\abbreviationsname{Abr\'eviations}% +\begin{codebox} +\gls{ProvidesGlossariesExtraLang}\marg{french}\oarg{2015/12/09 v1.0} +\codepar +\cmd{newcommand}*\marg{\cmd{glossariesxtrcaptionsfrench}}\marg{\comment{} + \cmd{def}\gls{abbreviationsname}\marg{Abr\cmd{'}eviations}\comment{} } -\glossariesxtrcaptionsfrench - -\ifcsdef{captions\CurrentTrackedDialect} -{% - \csappto{captions\CurrentTrackedDialect}% - {% - \glossariesxtrcaptionsfrench - }% -}% -{% - \ifcsdef{captions\CurrentTrackedLanguage} - {% - \csappto{captions\CurrentTrackedLanguage}% - {% - \glossariesxtrcaptionsfrench - }% - }% - {}% +\cmd{glossariesxtrcaptionsfrench} +\codepar +\cmd{ifcsdef}\marg{captions\gls+{CurrentTrackedDialect}} +\marg{\comment{} + \cmd{csappto}\marg{captions\gls{CurrentTrackedDialect}}\comment{} + \marg{\comment{} + \cmd{glossariesxtrcaptionsfrench} + }\comment{} +}\comment{} +\marg{\comment{} + \cmd{ifcsdef}\marg{captions\gls+{CurrentTrackedLanguage}} + \marg{\comment{} + \cmd{csappto}\marg{captions\gls{CurrentTrackedLanguage}}\comment{} + \marg{\comment{} + \cmd{glossariesxtrcaptionsfrench} + }\comment{} + }\comment{} + \marg{}\comment{} } -\end{verbatim} +\end{codebox} -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. -You can also use the \texttt{.ldf} file to provide rule -blocks for a particular language for use with \gls{bib2gls}['s] custom +You can adapt this for other languages by replacing +all instances of the language identifier \code{french} and +the translated text \code{Abr\cmd{'}eviations} as appropriate. +You can also use the \ext+{ldf} file to provide rule +blocks for a particular language for use with \app{bib2gls}['s] custom sort rule. See \sectionref{sec:bib2glssty} for further details. -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 +\begin{information} +For further information on \sty{tracklang}, see the \sty{tracklang} +documentation or \dickimawhref{latex/tracklang/}{Localisation with +\filefmt{tracklang.tex}}. +\end{information} + +This \ext{ldf} file then needs to be put somewhere on \TeX's +path so that it can be found by \sty{glossaries-extra}. +You might also want to consider uploading it to \ctanref{}{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} +\cmddef{GlsXtrNoGlsWarningHead} This produces the following text in English: \begin{quote} -\GlsXtrNoGlsWarningHead{\meta{label}}{\meta{file}} +\GlsXtrNoGlsWarningHead{\meta{glossary-label}}{\meta{file}} \end{quote} -\begin{definition}[\DescribeMacro\GlsXtrNoGlsWarningEmptyStart] -\cs{GlsXtrNoGlsWarningEmptyStart} -\end{definition} +\cmddef{GlsXtrNoGlsWarningEmptyStart} This produces the following text in English: \begin{quote} \GlsXtrNoGlsWarningEmptyStart \end{quote} -\begin{definition}[\DescribeMacro\GlsXtrNoGlsWarningEmptyMain] -\cs{GlsXtrNoGlsWarningEmptyMain} -\end{definition} +\cmddef{GlsXtrNoGlsWarningEmptyMain} This produces the following text in English: \begin{quote} \GlsXtrNoGlsWarningEmptyMain \end{quote} -\begin{definition}[\DescribeMacro\GlsXtrNoGlsWarningEmptyNotMain] -\cs{GlsXtrNoGlsWarningEmptyNotMain}\marg{label} -\end{definition} +\cmddef{GlsXtrNoGlsWarningEmptyNotMain} This produces the following text in English: \begin{quote} -\GlsXtrNoGlsWarningEmptyNotMain{\meta{label}} +\GlsXtrNoGlsWarningEmptyNotMain{\meta{glossary-label}} \end{quote} -\begin{definition}[\DescribeMacro\GlsXtrNoGlsWarningCheckFile] -\cs{GlsXtrNoGlsWarningCheckFile}\marg{file} -\end{definition} +\cmddef{GlsXtrNoGlsWarningCheckFile} This produces the following text in English: \begin{quote} \GlsXtrNoGlsWarningCheckFile{\meta{file}} \end{quote} -\begin{definition}[\DescribeMacro\GlsXtrNoGlsWarningMisMatch] -\cs{GlsXtrNoGlsWarningMisMatch} -\end{definition} +\cmddef{GlsXtrNoGlsWarningMisMatch} This produces the following text in English: \begin{quote} \GlsXtrNoGlsWarningMisMatch \end{quote} -\begin{definition}[\DescribeMacro\GlsXtrNoGlsWarningNoOut] -\cs{GlsXtrNoGlsWarningNoOut}\marg{file} -\end{definition} +\cmddef{GlsXtrNoGlsWarningNoOut} This produces the following text in English: \begin{quote} \GlsXtrNoGlsWarningNoOut{\meta{file}} \end{quote} -\begin{definition}[\DescribeMacro\GlsXtrNoGlsWarningTail] -\cs{GlsXtrNoGlsWarningTail} -\end{definition} +\cmddef{GlsXtrNoGlsWarningTail} This produces the following text in English: \begin{quote} \GlsXtrNoGlsWarningTail \end{quote} -\begin{definition}[\DescribeMacro\GlsXtrNoGlsWarningBuildInfo] -\cs{GlsXtrNoGlsWarningBuildInfo} -\end{definition} +\cmddef{GlsXtrNoGlsWarningBuildInfo} This is advice on how to generate the glossary files. -\begin{definition}[\DescribeMacro\GlsXtrNoGlsWarningAutoMake] -\cs{GlsXtrNoGlsWarningAutoMake}\marg{label} -\end{definition} -This is the message produced when the \pkgopt{automake} option +\cmddef{GlsXtrNoGlsWarningAutoMake} +This is the message produced when the \opt{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 (\nolinkurl{glossaries-extra-code.pdf}) +See the documented code (\filefmt{glossaries-extra-code.pdf}) for further details. -\printglossaries -\PrintIndex - +\part{Summaries and Index} +\backmatter +\printterms[title={Terms}] +\printcommonoptions[label=sec:gloskeys]{idx.gloskey} +\printcommonoptions{idx.glosfield} +\printcommonoptions{idx.glsopt} +\printcommonoptions{idx.mglsopt} +\printcommonoptions{idx.printglossopt} +\printcommonoptions{idx.abbrvstyle} +\printcommonoptions{idx.glossarystyle} +\printsummary + +\printuserguideindex \end{document} diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra.dtx b/macros/latex/contrib/glossaries-extra/glossaries-extra.dtx index 530455599f..ff8449fc09 100644 --- a/macros/latex/contrib/glossaries-extra/glossaries-extra.dtx +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra.dtx @@ -1,25 +1,28 @@ %\iffalse % glossaries-extra.dtx generated using makedtx version 1.2 (c) Nicola Talbot % Command line args: -% -comment ".*\.tex" -% -comment ".*\.bib" +% -doc "glossaries-extra-codedoc.tex" % -setambles ".*\.bib=>\nopreamble\nopostamble" -% -author "Nicola Talbot" % -macrocode ".*\.tex" % -macrocode ".*\.bib" -% -codetitle "Main Package Code (\\styfmt{glossaries-extra.sty})" -% -doc "glossaries-extra-codedoc.tex" +% -comment ".*\.tex" +% -comment ".*\.bib" +% -codetitle "Main Package Code (glossaries-extra.sty)" +% -section "section" +% -author "Nicola Talbot" % -src "glossaries-extra.sty\Z=>glossaries-extra.sty" +% -src "(.+)\.def\Z=>\1.def" % -src "glossaries-extra-bib2gls.sty\Z=>glossaries-extra-bib2gls.sty" % -src "glossaries-extra-stylemods.sty\Z=>glossaries-extra-stylemods.sty" % -src "glossary-bookindex.sty\Z=>glossary-bookindex.sty" % -src "glossary-longextra.sty\Z=>glossary-longextra.sty" % -src "glossary-topic.sty\Z=>glossary-topic.sty" +% -src "glossary-table.sty\Z=>glossary-table.sty" % -src "(example-glossaries-.+\.tex)\Z=>\1" % -src "(example-glossaries-.+\.bib)\Z=>\1" -% -section "chapter" +% -src "(glossar.+-2021-11-22.sty)\Z=>\1" % glossaries-extra -% Created on 2021/11/22 21:22 +% Created on 2022/10/19 17:47 %\fi %\iffalse %<*package> @@ -42,198 +45,118 @@ %\fi % \iffalse % Doc-Source file to use with LaTeX2e -% Copyright (C) 2021 Nicola Talbot, all rights reserved. +% Copyright (C) 2022 Nicola Talbot, all rights reserved. % \fi % \iffalse %<*driver> -\documentclass[report,widecs]{nlctdoc} - \iffalse glossaries-extra-codedoc.tex is a stub file used by makedtx to create glossaries-extra.dtx \fi -\usepackage{alltt} -\usepackage{pifont} -\usepackage[utf8]{inputenc} -\usepackage[T1]{fontenc} -\usepackage[colorlinks, - bookmarks, - hyperindex=false, - pdfauthor={Nicola L.C. Talbot}, - pdftitle={glossaries-extra.sty: an extension to the glossaries -package}, - pdfkeywords={LaTeX,package,glossary,abbreviations}]{hyperref} -\usepackage[nonumberlist,nopostdot=false]{glossaries-extra} - -\RecordChanges +\documentclass{article} +\usepackage{doc} -\makeglossaries - -\renewcommand*{\main}[1]{\hyperpage{#1}} -\newcommand*{\htextbf}[1]{\textbf{\hyperpage{#1}}} -\newcommand*{\itermdef}[1]{\index{#1|htextbf}} - -\newglossaryentry{xindy}{ - name={\appfmt{xindy}\index{xindy|htextbf}}, - sort={xindy}, - text={\protect\app{xindy}}, - description={An flexible indexing application with multilingual - support written in Perl} -} - -\newglossaryentry{makeindex}{% - name={\appfmt{makeindex}\index{makeindex|htextbf}},% - sort={makeindex},% - text={\protect\app{makeindex}},% - description={An indexing application}, -} - -\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 (like \appfmt{bibtex} but also performs hierarchical -sorting and collation, thus omitting the need for \gls{xindy} or -\gls{makeindex}). Further details at: -\url{http://www.dickimaw-books.com/software/bib2gls/}.}% -} - -\let\glsd\glsuseri -\let\glsation\glsuserii - -\newglossaryentry{firstuse}{% - name={First use\ifirstuse}, - sort={first use},% - text={first use},% - user1={first used}, - 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}. - \glsadd{firstuseflag}\glsadd{firstusetext}% - \glsseeformat{firstuseflag,firstusetext}{}\nopostdesc}% -} - -\newglossaryentry{firstuseflag}{% -name={First use flag\ifirstuseflag}, -sort={first use flag},% -text={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\ifirstusetext}, -sort={first use text},% -text={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}.)\nopostdesc}% -} - -\doxitem{Option}{option}{package options} -\doxitem{Counter}{counter}{glossary counters} -\doxitem{AbbrvStyle}{abbrvstyle}{abbreviation styles} -\doxitem{Style}{style}{glossary styles} +\CheckSum{69102} +\RecordChanges +\PageIndex +\SetupDoc{reportchangedates} \setcounter{IndexColumns}{2} -\CheckSum{30886} - -\newcommand*{\ifirstuse}{\iterm{first use}} -\newcommand*{\firstuse}{\gls{firstuse}} -\newcommand*{\firstuseflag}{\gls{firstuseflag}} -\newcommand*{\firstusetext}{\gls{firstusetext}} - -\newcommand*{\ifirstuseflag}{\iterm{first use>flag}} -\newcommand*{\ifirstusetext}{\iterm{first use>text}} - -\newcommand*{\istkey}[1]{\appfmt{#1}\index{makeindex=\appfmt{makeindex}>#1=\texttt{#1}}} -\newcommand*{\locfmt}[1]{\texttt{#1}\SpecialMainIndex{#1}} -\newcommand*{\mkidxspch}{\index{makeindex=\appfmt{makeindex}>special characters}} - -\newcommand*{\igloskey}[2][newglossaryentry]{\icsopt{#1}{#2}} -\newcommand*{\gloskey}[2][newglossaryentry]{\csopt{#1}{#2}} - -\newcommand*{\stylefmt}[1]{\textsf{#1}} +\usepackage[T1]{fontenc} +\usepackage{etoolbox} +\usepackage{tcolorbox} +\usepackage[colorlinks]{hyperref} -\newcommand*{\glostyle}[1]{\stylefmt{#1}% - \index{glossary styles:>#1=\protect\stylefmt{#1}|main}} +\definecolor{defbackground}{rgb}{1,1,0.75} -\newcommand*{\acrstyle}[1]{\stylefmt{#1}% - \index{acronym styles (glossaries):>#1=\protect\stylefmt{#1}|main}} +\newtcolorbox{definition}{halign=flush left, + colframe=black,colback=defbackground, + fontupper=\ttfamily, + before upper={\frenchspacing\obeylines}, + after={\par\noindent\ignorespacesafterend} +} -\newcommand*{\abbrstyle}[1]{\stylefmt{#1}% - \index{abbreviation styles:>#1=\protect\stylefmt{#1}|main}} +\NewDocElement{Option}{option} +\NewDocElement{AbbrvStyle}{abbrvstyle} +\NewDocElement{Style}{style} -\newcommand*{\category}[1]{\textsf{#1}\index{entry categories:>#1={\protect\sffamily#1}|main}} +\pdfstringdefDisableCommands{% + \let\sty\@firstofone + \let\app\@firstofone + \let\ctr\@firstofone + \let\category\@firstofone + \let\catattr\@firstofone + \let\glostyle\@firstofone + \let\abbrstyle\@firstofone + \let\pkgoptfmt\@firstofone + \renewcommand{\marg}[1]{\string<#1\string>}% + \renewcommand{\oarg}[1]{\string[#1\string]}% +} -\newcommand*{\catattr}[1]{\textsf{#1}\index{category attributes:>#1={\protect\sffamily#1}|main}} +\newcommand{\sty}[1]{\textsf{#1}} +\newcommand{\app}[1]{\texttt{#1}} +\newcommand{\ctr}[1]{\textsf{#1}} +\newcommand{\env}[1]{\textsf{#1}} +\newcommand{\category}[1]{\textsf{#1}} +\newcommand{\catattr}[1]{\textsf{#1}} +\newcommand{\glostyle}[1]{\textsf{#1}} +\newcommand{\abbrstyle}[1]{\textsf{#1}} +\newcommand{\pkgoptfmt}[1]{\textsf{#1}} +\newcommand{\pkgopt}[2][]{\pkgoptfmt{#2\ifstrempty{#1}{}{=#1}}} +\newcommand{\gloskey}[2][]{\textsf{#2}} +\newcommand{\qt}[1]{``#1''} +\newcommand{\sectionref}[1]{\S\ref{#1}} +\newcommand{\dequals}{=} -\GlossaryPrologue{% - \chapter*{{Change History}}% - \markboth{{Change History}}{{Change History}}% - \phantomsection - \addcontentsline{toc}{chapter}{Change History}% - \raggedright -} +\providecommand\marg[1]{% + \allowbreak{\ttfamily\char`\{}\meta{#1}{\ttfamily\char`\}}} +\providecommand\oarg[1]{% + \allowbreak{\ttfamily[}\meta{#1}{\ttfamily]}} -\title{glossaries-extra.sty v1.48: +\title{glossaries-extra.sty v1.49: documented code} \author{Nicola L.C. Talbot\\[10pt] Dickimaw Books\\ \url{http://www.dickimaw-books.com/}} -\date{2021-11-22} +\date{2022-10-14} \begin{document} \DocInput{glossaries-extra.dtx} \end{document} % %\fi -%\MakeShortVerb{"} -%\DeleteShortVerb{\|} -% -% \maketitle +%\maketitle % -%\begin{abstract} %This is the documented code for the \sty{glossaries-extra} package. -%See glossaries-extra-manual.pdf for the user manual. -% -%\begin{important} -%This package is experimental and not stable. It's provided for -%testing purposes only. Future versions may not be compatible with -%this version. Once it has stabilised I'll add it to CTAN, at which -%point compatibility with the first stable version will be -%maintained. -%\end{important} -%\end{abstract} +%See \texttt{glossaries-extra-manual.pdf} for the user manual. % %\tableofcontents % -%\StopEventually{% -% \printglossaries -% \PrintChanges -% \PrintIndex -%} -% +%\StopEventually{\PrintChanges \PrintIndex} % % -%\chapter{Main Package Code (\styfmt{glossaries-extra.sty})} +%\section{Main Package Code (glossaries-extra.sty)} %\iffalse % \begin{macrocode} %<*glossaries-extra.sty> % \end{macrocode} %\fi %\changes{0.1}{2015-11-22}{Initial experimental release} -%\section{Package Initialisation and Options} +%\subsection{Package Initialisation and Options} % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{glossaries-extra}[2021/11/22 v1.48 (NLCT)] +% \end{macrocode} +% Rollback releases: +% \begin{macrocode} +\DeclareRelease{v1.48}{2021-11-22}{glossaries-extra-2021-11-22.sty} +\DeclareCurrentRelease{v1.49}{2022-10-14} +% \end{macrocode} +% Declare package: +% \begin{macrocode} +\ProvidesPackage{glossaries-extra}[2022/10/14 v1.49 (NLCT)] % \end{macrocode} % Requires \sty{xkeyval} to define package options. % \begin{macrocode} @@ -243,21 +166,21 @@ Dickimaw Books\\ % \begin{macrocode} \RequirePackage{etoolbox} % \end{macrocode} -% Has \styfmt{glossaries} already been loaded? +% Has \sty{glossaries} already been loaded? % \begin{macrocode} \@ifpackageloaded{glossaries} {% % \end{macrocode} % Already loaded so pass any options to \cs{setupglossaries}. % This means that the options that can only be set when -% \styfmt{glossaries} is loaded can't be used. +% \sty{glossaries} is loaded can't be used. % \begin{macrocode} \newcommand{\glsxtr@dooption}[1]{\setupglossaries{#1}}% \let\@glsxtr@declareoption\@gls@declareoption } {% % \end{macrocode} -% Not already loaded, so pass options to \styfmt{glossaries}. +% Not already loaded, so pass options to \sty{glossaries}. % \begin{macrocode} \newcommand{\glsxtr@dooption}[1]{% \PassOptionsToPackage{#1}{glossaries}% @@ -293,7 +216,7 @@ Dickimaw Books\\ % \end{macrocode} %\end{macro} %\begin{macro}{\glsxtr@warnonexistsordo} -% If user wants \pkgopt[warn]{undefaction}, then \styfmt{glossaries} +% If user wants \pkgopt[warn]{undefaction}, then \sty{glossaries} % v4.19 is required. % \begin{macrocode} \newcommand*{\glsxtr@warnonexistsordo}[1]{} @@ -664,6 +587,15 @@ Dickimaw Books\\ %\changes{1.19}{2017-09-09}{Use \cs{@glsrecordlocref} instead of \cs{@glslocref}} % \begin{macrocode} \newcommand*\@glsxtr@dorecord{% + \@@glsxtr@dorecord\@gls@label\glsxtr@record\@glsxtr@do@nameref@record +} +% \end{macrocode} +%\end{macro} + +%\begin{macro}{\@@glsxtr@dorecord} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand*\@@glsxtr@dorecord[3]{% \global\let\@glsrecordlocref\theglsentrycounter \let\@glsxtr@orgprefix\@glo@counterprefix \ifx\theglsentrycounter\theHglsentrycounter @@ -677,28 +609,26 @@ Dickimaw Books\\ \protected@edef\@glsxtr@theHentrycounter{\theHglsentrycounter}% \@onelevel@sanitize\@glsxtr@theentrycounter \@onelevel@sanitize\@glsxtr@theHentrycounter - \protected@edef\@do@gls@getcounterprefix{\noexpand\@gls@getcounterprefix + \@xp@gls@getcounterprefix {\@glsxtr@theentrycounter}{\@glsxtr@theHentrycounter}% - }% - \@do@gls@getcounterprefix \fi % \end{macrocode} %\changes{1.30}{2018-04-25}{don't suppress expansion of \cs{@glsrecordlocref}} %\changes{1.29}{2018-04-09}{don't suppress expansion of %\cs{@glsrecordlocref} if counter isn't page} %Don't protect the \cs{@glsrecordlocref} from premature expansion. -%If the counter isn't \counter{page} then it needs expanding. If the +%If the counter isn't \ctr{page} then it needs expanding. If the %location includes \cs{thepage} then \cs{protected@write} will %automatically deal with it. %\changes{1.37}{2018-11-30}{added check for record=nameref} % \begin{macrocode} \ifx\@glsxtr@record@setting\@glsxtr@record@setting@nameref - \@glsxtr@do@nameref@record - {\@gls@label}{\@glo@counterprefix}{\@gls@counter}{\@glsnumberformat}% + #3% + {#1}{\@glo@counterprefix}{\@gls@counter}{\@glsnumberformat}% {\@glsrecordlocref}% \else - \protected@write\@auxout{}{\string\glsxtr@record - {\@gls@label}{\@glo@counterprefix}{\@gls@counter}{\@glsnumberformat}% + \@bibgls@write@aux{}{\string#2% + {#1}{\@glo@counterprefix}{\@gls@counter}{\@glsnumberformat}% {\@glsrecordlocref}}% \fi \@glsxtr@counterrecordhook @@ -723,21 +653,18 @@ Dickimaw Books\\ {\@gls@label}{}{\@gls@counter}{\@glsnumberformat}% {\theglsentrycounter}% \else - \protected@write\@auxout{}{\string\glsxtr@record + \@bibgls@write@aux{}{\string\glsxtr@record {\@gls@label}{}{\@gls@counter}{\@glsnumberformat}% {\theglsentrycounter}}% \fi \else - \edef\@do@gls@getcounterprefix{\noexpand\@gls@getcounterprefix - {\theglsentrycounter}{\theHglsentrycounter}% - }% - \@do@gls@getcounterprefix + \@xp@gls@getcounterprefix{\theglsentrycounter}{\theHglsentrycounter}% \ifx\@glsxtr@record@setting\@glsxtr@record@setting@nameref \@glsxtr@do@nameref@record {\@gls@label}{\@glo@counterprefix}{\@gls@counter}% {\@glsnumberformat}{\theglsentrycounter}% \else - \protected@write\@auxout{}{\string\glsxtr@record + \@bibgls@write@aux{}{\string\glsxtr@record {\@gls@label}{\@glo@counterprefix}{\@gls@counter}{\@glsnumberformat}% {\theglsentrycounter}}% \fi @@ -790,7 +717,7 @@ Dickimaw Books\\ \newcommand*{\@glsxtr@do@nameref@record}[5]{% \gls@ifnotmeasuring {% - \protected@write\@auxout{}{\string\glsxtr@record@nameref + \@bibgls@write@aux{}{\string\glsxtr@record@nameref {#1}{#2}{#3}{#4}{#5}% {\csuse{@currentlabelname}}{\csuse{@currentHref}}% {\theHglsentrycounter}}% @@ -837,7 +764,7 @@ Dickimaw Books\\ \@@glsxtrwrglossmark \def\@gls@xref{#2}% \@onelevel@sanitize\@gls@xref - \protected@write\@auxout{}{\string\glsxtr@recordsee{#1}{\@gls@xref}}% + \@bibgls@write@aux{}{\string\glsxtr@recordsee{#1}{\@gls@xref}}% } % \end{macrocode} %\end{macro} @@ -1135,6 +1062,79 @@ Dickimaw Books\\ % \end{macrocode} %\end{option} % +% +%\begin{option}{bibglsaux} +%\changes{1.49}{2022-10-14}{new} +%Provide an option to put the records in a different aux file that +%will only be read by bib2gls and not by \LaTeX. A large number of +%records in the aux file can slow down the document build as \LaTeX\ +%has to parse it all. This will require an extra write register, so +%may not be so desirable for documents with small glossaries but a +%large number of temporary files. +% \begin{macrocode} +\define@key{glossaries-extra.sty}{bibglsaux}{% + \glsxtrsetbibglsaux{#1}% +} +% \end{macrocode} +%\end{option} +% +%\begin{macro}{\glsxtrsetbibglsaux} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand{\glsxtrsetbibglsaux}[1]{% + \renewcommand{\@glsxtr@setup@bibglsaux}{\@@glsxtr@setup@bibglsaux{#1}}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsxtr@setup@bibglsaux} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand{\@glsxtr@setup@bibglsaux}{% + \renewcommand{\glsxtrsetbibglsaux}[1]{% + \@@glsxtr@setup@bibglsaux{##1}% + }% +} +\AtBeginDocument{\@glsxtr@setup@bibglsaux} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@@glsxtr@setup@bibglsaux} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand{\@@glsxtr@setup@bibglsaux}[1]{% + \ifstrempty{#1}% + {\renewcommand{\@bibgls@write@aux}{\protected@write\@auxout}}% + {\@set@bibgls@write@aux{#1.aux}}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@bibgls@write@aux} +%\changes{1.49}{2022-10-14}{new} +%Just used for writing records. +% \begin{macrocode} +\newcommand{\@bibgls@write@aux}{\protected@write\@auxout} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@set@bibgls@write@aux} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand{\@set@bibgls@write@aux}[1]{% + \protected@write\@auxout{}% + {\string\providecommand{\string\@bibgls@input}[1]{}}% + \protected@write\@auxout{}{\string\@bibgls@input{#1}}% + \global\newwrite\@bibgls@auxout + \openout\@bibgls@auxout=#1 + \AtEndDocument{\closeout\@bibgls@auxout}% + \gdef\@bibgls@write@aux{\protected@write\@bibgls@auxout}% + \gdef\@set@bibgls@write@aux##1{\GlossariesExtraWarning{repeated + invocation of bibglsaux option ignored}}% +} +% \end{macrocode} +%\end{macro} +% %\changes{1.06}{2016-06-18}{docdef option changed to choice} %Version 1.06 changes the \pkgopt{docdef} option to a choice rather %than boolean setting. The available values are: false, true or @@ -1221,7 +1221,7 @@ Dickimaw Books\\ % \begin{macrocode} \@glsxtrindexcrossrefsfalse % \end{macrocode} -% But allow \gloskey{see} key to switch it on automatically. +% But allow \gloskey{see} and \gloskey{seealso} keys to switch it on automatically. %\begin{macro}{\@glsxtr@autoindexcrossrefs} %\changes{1.0}{2016-01-24}{new} % \begin{macrocode} @@ -1414,7 +1414,7 @@ Dickimaw Books\\ \disable@keys{glossaries-extra.sty}{abbreviations}% % \end{macrocode} % If the \pkgopt{acronym} option hasn't been used, change -% \ics{acronymtype} to \ics{glsxtrabbrvtype}. +% \cs{acronymtype} to \cs{glsxtrabbrvtype}. %\changes{0.4}{2015-12-03}{added redefinition of \cs{acronymtype}} % \begin{macrocode} \ifglsacronym @@ -1434,37 +1434,95 @@ Dickimaw Books\\ % \end{macrocode} %\end{option} % +%\begin{macro}{\shortcut@gls} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand{\shortcut@gls}{\cgls} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\shortcut@glspl} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand{\shortcut@glspl}{\cglspl} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\shortcut@Gls} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand{\shortcut@Gls}{\cGls} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\shortcut@Glspl} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand{\shortcut@Glspl}{\cGlspl} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\shortcut@GLS} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand{\shortcut@GLS}{\cGLS} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\shortcut@GLSpl} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand{\shortcut@GLSpl}{\cGLSpl} +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\GlsXtrDefineAbbreviationShortcuts} % Enable shortcut commands for the abbreviations. Unlike the analogous -% command provided by \styfmt{glossaries}, this uses \cs{newcommand} +% command provided by \sty{glossaries}, this uses \cs{newcommand} % instead of \cs{let} as a safety feature (except for \cs{newabbr} % which is also provided with \cs{GlsXtrDefineAcShortcuts}). % \begin{macrocode} \newcommand*{\GlsXtrDefineAbbreviationShortcuts}{% - \newcommand*{\ab}{\cgls}% - \newcommand*{\abp}{\cglspl}% + \newcommand*{\ab}{\shortcut@gls}% + \newcommand*{\abp}{\shortcut@glspl}% \newcommand*{\as}{\glsxtrshort}% \newcommand*{\asp}{\glsxtrshortpl}% \newcommand*{\al}{\glsxtrlong}% \newcommand*{\alp}{\glsxtrlongpl}% \newcommand*{\af}{\glsxtrfull}% \newcommand*{\afp}{\glsxtrfullpl}% - \newcommand*{\Ab}{\cGls}% - \newcommand*{\Abp}{\cGlspl}% + \newcommand*{\Ab}{\shortcut@Gls}% + \newcommand*{\Abp}{\shortcut@Glspl}% \newcommand*{\As}{\Glsxtrshort}% \newcommand*{\Asp}{\Glsxtrshortpl}% \newcommand*{\Al}{\Glsxtrlong}% \newcommand*{\Alp}{\Glsxtrlongpl}% \newcommand*{\Af}{\Glsxtrfull}% \newcommand*{\Afp}{\Glsxtrfullpl}% - \newcommand*{\AB}{\cGLS}% - \newcommand*{\ABP}{\cGLSpl}% + \newcommand*{\AB}{\shortcut@GLS}% + \newcommand*{\ABP}{\shortcut@GLSpl}% \newcommand*{\AS}{\GLSxtrshort}% \newcommand*{\ASP}{\GLSxtrshortpl}% \newcommand*{\AL}{\GLSxtrlong}% \newcommand*{\ALP}{\GLSxtrlongpl}% \newcommand*{\AF}{\GLSxtrfull}% \newcommand*{\AFP}{\GLSxtrfullpl}% + \glsmfuaddmap{\ab}{\Ab}% + \glsmfublocker{\AB}% + \glsmfuaddmap{\abp}{\Abp}% + \glsmfublocker{\ABP}% + \glsmfuaddmap{\as}{\As}% + \glsmfublocker{\AS}% + \glsmfuaddmap{\asp}{\Asp}% + \glsmfublocker{\ASP}% + \glsmfuaddmap{\al}{\Al}% + \glsmfublocker{\AL}% + \glsmfuaddmap{\alp}{\Alp}% + \glsmfublocker{\ALP}% + \glsmfuaddmap{\af}{\Af}% + \glsmfublocker{\AF}% + \glsmfuaddmap{\afp}{\Afp}% + \glsmfublocker{\AFP}% % \end{macrocode} %\changes{1.23}{2017-11-12}{changed \cs{newabbr} definition to use \cs{providecommand}} % \begin{macrocode} @@ -1479,34 +1537,50 @@ Dickimaw Books\\ % %\begin{macro}{\GlsXtrDefineAcShortcuts} % Enable shortcut commands for the abbreviations, but uses the -% analogous commands provided by \styfmt{glossaries}. +% analogous commands provided by \sty{glossaries}. %\changes{1.17}{2017-08-09}{new} % \begin{macrocode} \newcommand*{\GlsXtrDefineAcShortcuts}{% - \newcommand*{\ac}{\cgls}% - \newcommand*{\acp}{\cglspl}% + \newcommand*{\ac}{\shortcut@gls}% + \newcommand*{\acp}{\shortcut@glspl}% \newcommand*{\acs}{\glsxtrshort}% \newcommand*{\acsp}{\glsxtrshortpl}% \newcommand*{\acl}{\glsxtrlong}% \newcommand*{\aclp}{\glsxtrlongpl}% \newcommand*{\acf}{\glsxtrfull}% \newcommand*{\acfp}{\glsxtrfullpl}% - \newcommand*{\Ac}{\cGls}% - \newcommand*{\Acp}{\cGlspl}% + \newcommand*{\Ac}{\shortcut@Gls}% + \newcommand*{\Acp}{\shortcut@Glspl}% \newcommand*{\Acs}{\Glsxtrshort}% \newcommand*{\Acsp}{\Glsxtrshortpl}% \newcommand*{\Acl}{\Glsxtrlong}% \newcommand*{\Aclp}{\Glsxtrlongpl}% \newcommand*{\Acf}{\Glsxtrfull}% \newcommand*{\Acfp}{\Glsxtrfullpl}% - \newcommand*{\AC}{\cGLS}% - \newcommand*{\ACP}{\cGLSpl}% + \newcommand*{\AC}{\shortcut@GLS}% + \newcommand*{\ACP}{\shortcut@GLSpl}% \newcommand*{\ACS}{\GLSxtrshort}% \newcommand*{\ACSP}{\GLSxtrshortpl}% \newcommand*{\ACL}{\GLSxtrlong}% \newcommand*{\ACLP}{\GLSxtrlongpl}% \newcommand*{\ACF}{\GLSxtrfull}% \newcommand*{\ACFP}{\GLSxtrfullpl}% + \glsmfuaddmap{\ac}{\Ac}% + \glsmfublocker{\AC}% + \glsmfuaddmap{\acp}{\Acp}% + \glsmfublocker{\ACP}% + \glsmfuaddmap{\acs}{\Acs}% + \glsmfublocker{\ACS}% + \glsmfuaddmap{\acsp}{\Acsp}% + \glsmfublocker{\ACSP}% + \glsmfuaddmap{\acl}{\Acl}% + \glsmfublocker{\ACL}% + \glsmfuaddmap{\aclp}{\Aclp}% + \glsmfublocker{\ACLP}% + \glsmfuaddmap{\acf}{\Acf}% + \glsmfublocker{\ACF}% + \glsmfuaddmap{\acfp}{\Acfp}% + \glsmfublocker{\ACFP}% % \end{macrocode} %\changes{1.23}{2017-11-12}{changed \cs{newabbr} definition to use \cs{providecommand}} % \begin{macrocode} @@ -1558,7 +1632,7 @@ Dickimaw Books\\ %\end{macro} % %\begin{option}{shortcuts} -%Provide \pkgopt{shortcuts} option. Unlike the \styfmt{glossaries} +%Provide \pkgopt{shortcuts} option. Unlike the \sty{glossaries} %version, this is a choice rather than a boolean key but it also provides %\pkgopt[true]{shortcuts} and \pkgopt[false]{shortcuts}, which are %equivalent to \pkgopt[all]{shortcuts} and @@ -1570,7 +1644,7 @@ Dickimaw Books\\ % \begin{macrocode} \define@choicekey{glossaries-extra.sty}{shortcuts}% [\@glsxtr@shortcutsval\@glsxtr@shortcutsnr]% - {acronyms,acro,abbreviations,abbr,other,all,true,ac,none,false}[true]{% + {acronyms,acro,abbreviations,abbr,other,all,true,ac,acother,abother,none,false}[true]{% \ifcase\@glsxtr@shortcutsnr\relax % acronyms \renewcommand*{\@glsxtr@setupshortcuts}{% \glsacrshortcutstrue @@ -1623,6 +1697,24 @@ Dickimaw Books\\ \glsacrshortcutstrue \GlsXtrDefineAcShortcuts }% + \or % acother +% \end{macrocode} +%\changes{1.49}{2022-10-14}{added shortcuts=acother} +% \begin{macrocode} + \renewcommand*{\@glsxtr@setupshortcuts}{% + \glsacrshortcutstrue + \GlsXtrDefineAcShortcuts + \GlsXtrDefineOtherShortcuts + }% + \or % abother +% \end{macrocode} +%\changes{1.49}{2022-10-14}{added shortcuts=abother} +% \begin{macrocode} + \renewcommand*{\@glsxtr@setupshortcuts}{% + \glsacrshortcutstrue + \GlsXtrDefineAbbreviationShortcuts + \GlsXtrDefineOtherShortcuts + }% % \end{macrocode} %Leave none and false as last option. % \begin{macrocode} @@ -1641,7 +1733,7 @@ Dickimaw Books\\ %\end{macro} % %\sty{glossaries-accsupp} can't be loaded after -%\styfmt{glossaries-extra}. \sty{glossaries-accsupp} v4.29+ checks +%\sty{glossaries-extra}. \sty{glossaries-accsupp} v4.29+ checks %\cs{@glsxtr@doaccsupp} to determine if it's been loaded too late. % %\begin{option}{accsupp} @@ -1794,7 +1886,7 @@ Dickimaw Books\\ %\begin{macro}{\GlsXtrInternalLocationHyperlink} %\changes{1.29}{2018-04-09}{new} %\begin{definition} -%\cs{glsxtrinternallocationhyperlink}\marg{counter}\marg{prefix}\marg{location} +%\cs{GlsXtrInternalLocationHyperlink}\marg{counter}\marg{prefix}\marg{location} %\end{definition} %The first two arguments are always control sequences. % \begin{macrocode} @@ -1821,7 +1913,7 @@ Dickimaw Books\\ %methods but it will interfere with the number list collation. %This option automatically implements \pkgopt[wrglossary]{counter}. % -%Since \styfmt{glossaries} automatically loads \sty{amsmath}, there +%Since \sty{glossaries} automatically loads \sty{amsmath}, there %may be a problem if the indexing occurs in the \env{equation} %environment, because only one \cs{label} is allowed in each %instance of that environment. It's best to change the counter when @@ -1838,12 +1930,13 @@ Dickimaw Books\\ \renewcommand*{\glsxtr@inc@wrglossaryctr}[1]{% % \end{macrocode} %Only increment if the current counter is \ctr{wrglossary}. -%\changes{1.30}{2018-04-25}{added check for \ctrfmt{wrglossary} counter} +%\changes{1.30}{2018-04-25}{added check for \ctr{wrglossary} counter} % \begin{macrocode} \ifdefstring\@gls@counter{wrglossary}% {% \refstepcounter{wrglossary}% \label{wrglossary.\thewrglossary}% + \@@glsxtrwrglosscountermark{\thewrglossary}% }% {}% }% @@ -1879,12 +1972,35 @@ Dickimaw Books\\ % %\begin{macro}{\glsxtrwrglossmark} %\changes{1.21}{2017-11-03}{new} -%Does nothing by default. % \begin{macrocode} \newcommand*{\glsxtrwrglossmark}{\ensuremath{\cdot}} % \end{macrocode} %\end{macro} % +%\begin{macro}{\@glsxtrwrglosscountermark} +%\changes{1.49}{2022-10-14}{new} +%Marks the place where wrglossary counter is incremented. +%Does nothing by default. +% \begin{macrocode} +\newcommand*{\@glsxtrwrglosscountermark}[1]{} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@@glsxtrwrglosscountermark} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand*{\@@glsxtrwrglosscountermark}[1]{} +\AtBeginDocument{\renewcommand*{\@@glsxtrwrglosscountermark}{\@glsxtrwrglosscountermark}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrwrglosscountermark} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand*{\glsxtrwrglosscountermark}[1]{\glsshowtargetfonttext{[#1]}} +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\@glsxtr@doshowtarget} %\changes{1.48}{2021-11-22}{new} % \begin{macrocode} @@ -1892,6 +2008,24 @@ Dickimaw Books\\ % \end{macrocode} %\end{macro} % +%\begin{macro}{\glsxtrundefdebug} +%\changes{1.49}{2022-10-14}{new} +%Don't do anything until after the document environment has begun. +% \begin{macrocode} +\newcommand*{\glsxtrundefdebug}[1]{} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsxtrundefdebug} +%\changes{1.49}{2022-10-14}{new} +%Use the same font as the targets. +% \begin{macrocode} +\newcommand*{\@glsxtrundefdebug}[1]{% + \if@gls@debug \glsshowtargetfonttext{[#1]}\fi +} +% \end{macrocode} +%\end{macro} +% %\begin{option}{debug} %\changes{1.21}{2017-11-03}{new} % Provide extra debug options. @@ -1903,20 +2037,26 @@ Dickimaw Books\\ \ifcase\@glsxtr@debugnr\relax % true \glsxtr@dooption{debug=true}% \renewcommand*{\@glsxtrwrglossmark}{}% + \renewcommand*{\@glsxtrwrglosscountermark}[1]{}% \or % false \glsxtr@dooption{debug=false}% \renewcommand*{\@glsxtrwrglossmark}{}% - \let\@glsxtr@doshowtarget\@secondoftwo + \renewcommand*{\@glsxtrwrglosscountermark}[1]{}% + \let\@glsxtr@doshowtarget\@secondoftwo \or % showtargets \glsxtr@dooption{debug=showtargets}% - \def\@glsxtr@doshowtarget{\@glsxtrshowtargetleft}% + \def\@glsxtr@doshowtarget{\@glsxtrshowtargetleft}% \or % showwrgloss \glsxtr@dooption{debug=true}% \renewcommand*{\@glsxtrwrglossmark}{\glsxtrwrglossmark}% + \renewcommand*{\@glsxtrwrglosscountermark}{\glsxtrwrglosscountermark}% \or % all - \glsxtr@dooption{debug=showtargets,debug=showaccsupp}% + \glsxtr@dooption{debug=true,debug=showaccsupp}% + % debug=showwrgloss: \renewcommand*{\@glsxtrwrglossmark}{\glsxtrwrglossmark}% - \def\@glsxtr@doshowtarget{\@glsxtrshowtargetleft}% + \renewcommand*{\@glsxtrwrglosscountermark}{\glsxtrwrglosscountermark}% + % debug=showtargets: + \def\@glsxtr@doshowtarget{\@glsxtrshowtargetleft}% \or % showaccsupp \glsxtr@dooption{debug=showaccsupp}% \fi @@ -2005,18 +2145,35 @@ Dickimaw Books\\ % \end{macrocode} %\end{option} % -% Pass all other options to \styfmt{glossaries}. +% Pass all other options to \sty{glossaries}. +%\begin{macro}{\glsxtr@processunknownoptions} +%\changes{1.49}{2022-10-14}{new} +% Need to compensate for the problem identified in +%\url{https://www.dickimaw-books.com/bugtracker.php?key=171} % \begin{macrocode} -\DeclareOptionX*{% - \expandafter\glsxtr@dooption\expandafter{\CurrentOption}} +\newcommand*{\glsxtr@processunknownoptions}{} +% \end{macrocode} +%\end{macro} +% \begin{macrocode} +\@ifpackageloaded{glossaries} +{% + \DeclareOptionX*{% + \edef\glsxtr@processunknownoptions{% + \noexpand\setupglossaries{\expandonce\CurrentOption}}} +} +{% + \DeclareOptionX*{% + \expandafter\glsxtr@dooption\expandafter{\CurrentOption}} +} % \end{macrocode} % Process options. % \begin{macrocode} \ProcessOptionsX % \end{macrocode} -% Load \styfmt{glossaries} if not already loaded. +% Load \sty{glossaries} if not already loaded. % \begin{macrocode} \RequirePackage{glossaries} +\glsxtr@processunknownoptions % \end{macrocode} % Load the \sty{glossaries-accsupp} package if required. % \begin{macrocode} @@ -2031,6 +2188,183 @@ Dickimaw Books\\ \@glsxtr@defpostpunc % \end{macrocode} % +%\begin{macro}{\glsindexsetting} +%\changes{1.49}{2022-10-14}{new} +%This command was new to \sty{glossaries} v4.50 so may not be +%defined. Note that \pkgopt[only]{record} and +%\pkgopt[nameref]{record} implement \pkgopt[none]{sort}, which will +%change the default definition of \cs{glsindexingsetting}. +% \begin{macrocode} +\let\@glsxtr@org@indexingsetting\glsindexingsetting +\providecommand{\glsindexingsetting}{\ifglsxindy xindy\else makeindex\fi} +\ifx\@glsxtr@org@indexingsetting\glsindexingsetting + \renewcommand{\glsindexingsetting}{% + \@glsxtr@if@record@only{bib2gls}{\ifglsxindy xindy\else makeindex\fi}% + } +\else + \@glsxtr@if@record@only{\renewcommand{\glsindexingsetting}{bib2gls}}{}% +\fi +% \end{macrocode} +%\end{macro} +% +% +%The following commands are new to \sty{glossaries} v4.50, so +%provide them if an older version is present. +%\begin{macro}{\glssentencecase} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\providecommand{\glssentencecase}[1]{\makefirstuc{#1}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\glslowercase} +%\changes{1.49}{2022-10-14}{new} +%This uses \cs{MakeTextLowercase} because if \cs{glslowercase} isn't +%defined then \sty{textcase} has been loaded and we might have an +%older kernel. +% \begin{macrocode} +\providecommand{\glslowercase}[1]{\MakeTextLowercase{#1}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\glsuppercase} +%\changes{1.49}{2022-10-14}{new} +%Not using \cs{unexpanded} because ditto the above. +% \begin{macrocode} +\providecommand{\glsuppercase}[1]{\mfirstucMakeUppercase{#1}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@Glsentryfield} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\providecommand{\@Glsentryfield}[2]{% + \glstexorpdfstring{\@Gls@entry@field{#1}{#2}}% + {\MFUsentencecase{\@gls@entry@field{#1}{#2}}}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\glstexorpdfstring} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\ifdef\glstexorpdfstring +{} +{ + \ifdef\texorpdfstring + {\newcommand{\glstexorpdfstring}{\texorpdfstring}} + {\newcommand{\glstexorpdfstring}[2]{#1}} +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsxtr@org@MakeUppercase} +%Save the original definition of \cs{MakeUppercase} in case it needs +%to be restored. +% \begin{macrocode} +\let\@glsxtr@org@MakeUppercase\MakeUppercase +% \end{macrocode} +%\end{macro} +% +%If \sty{mfirstuc} v2.08+ is installed, provide interface commands. +%The simplest method is to test the existence of +%\cs{MFUsentencecase}, which is provided by \sty{mfirstuc} v2.08+ +%but also by \sty{glossaries} v4.50+. So it may be defined because +%\sty{glossaries} v4.50+ is installed, in which case \cs{glsmfuexcl} +%etc are also defined, but it may be defined because \sty{mfirstuc} +%v2.08+ is installed but an older version of \sty{glossaries} may be +%present, in which case \cs{glsmfuexcl} etc won't be defined. +% \begin{macrocode} +\ExplSyntaxOn +\ifdef\MFUsentencecase +{% +% \end{macrocode} +% Automatically identify exclusions, blockers and mappings. +%\begin{macro}{\glsmfuexcl} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \providecommand{\glsmfuexcl}[1]{\MFUexcl{#1}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\glsmfublocker} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \providecommand{\glsmfublocker}[1]{\MFUblocker{#1}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\glsmfuaddmap} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \providecommand{\glsmfuaddmap}[2]{\MFUaddmap{#1}{#2}} +% \end{macrocode} +%\end{macro} +%Don't alter \cs{MakeUppercase} +%\begin{macro}{\@glsxtr@saveMakeUppercase} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand{\@glsxtr@saveMakeUppercase}{} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@glsxtr@restoreMakeUppercase} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand{\@glsxtr@restoreMakeUppercase}{} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@glsxtr@assignMakeUppercase} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand{\@glsxtr@assignMakeUppercase}{} +% \end{macrocode} +%\end{macro} +% \begin{macrocode} +} +{ +% \end{macrocode} +%Provide \cs{MFUsentencecase} for use where expandable contexts are +%required. +%\begin{macro}{\MFUsentencecase} +% \begin{macrocode} + \providecommand{\MFUsentencecase}[1]{\text_titlecase_first:n{#1}} +% \end{macrocode} +%\end{macro} +%Provide support for exclusions with \cs{MFUsentencecase}. +%\begin{macro}{\glsmfuexcl} +% \begin{macrocode} + \providecommand{\glsmfuexcl}[1]{ + \tl_if_in:NnF \l_text_case_exclude_arg_tl {#1} + { + \tl_put_right:Nn \l_text_case_exclude_arg_tl {#1} + } + } +% \end{macrocode} +%\end{macro} +%Just treat blockers and mappings as exclusions. +%\begin{macro}{\glsmfublocker} +% \begin{macrocode} + \providecommand{\glsmfublocker}[1]{\glsmfuexcl{#1}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\glsmfuaddmap} +% \begin{macrocode} + \providecommand{\glsmfuaddmap}[2]{\glsmfuexcl{#1}\glsmfublocker{#2}} +% \end{macrocode} +%\end{macro} +%With old versions of \sty{mfirstuc}, save and restore +%\cs{MakeUppercase} in the heading hooks. +% \begin{macrocode} + \newcommand{\@glsxtr@saveMakeUppercase}{% + \let\@glsxtr@org@MakeUppercase\MakeUppercase + } + \newcommand{\@glsxtr@restoreMakeUppercase}{% + \let\MakeUppercase\@glsxtr@org@MakeUppercase + } + \newcommand{\@glsxtr@assignMakeUppercase}{% + \let\MakeUppercase\MakeTextUppercase + } +} +% \end{macrocode} +%Finished \LaTeX3 code. +% \begin{macrocode} +\ExplSyntaxOff +% \end{macrocode} +% %\begin{macro}{\glsdoshowtarget} %\changes{1.48}{2021-11-22}{new} %Added to \sty{glossaries} v4.50 so many not be defined. @@ -2042,23 +2376,30 @@ Dickimaw Books\\ % %\begin{macro}{\glsxtrshowtargetsymbolright} %\changes{1.48}{2021-11-22}{new} +%\changes{1.49}{2022-10-14}{added check for math mode} % \begin{macrocode} -\newcommand{\glsxtrshowtargetsymbolright}{{\tiny$\triangleleft$}}% +\newcommand{\glsxtrshowtargetsymbolright}{% + \ifmmode \mbox{\tiny$\triangleleft$}\else {\tiny$\triangleleft$}\fi +} % \end{macrocode} %\end{macro} % %\begin{macro}{\glsxtrshowtargetsymbolleft} %\changes{1.48}{2021-11-22}{new} +%\changes{1.49}{2022-10-14}{added check for math mode} % \begin{macrocode} -\newcommand{\glsxtrshowtargetsymbolleft}{{\tiny$\triangleright$}}% +\newcommand{\glsxtrshowtargetsymbolleft}{% + \ifmmode \mbox{\tiny$\triangleright$}\else {\tiny$\triangleright$}\fi +} % \end{macrocode} %\end{macro} % %\begin{macro}{\glsshowtargetinner} %\changes{1.48}{2021-11-22}{new} +%\changes{1.49}{2022-10-14}{added check for math mode} %Only added to \sty{glossaries} in v4.50 so may not be defined. % \begin{macrocode} -\providecommand*{\glsshowtargetinner}[1]{{\glsshowtargetfont [#1]}} +\providecommand*{\glsshowtargetinner}[1]{\glsshowtargetfonttext{[#1]}} % \end{macrocode} %\end{macro} % @@ -2070,7 +2411,18 @@ Dickimaw Books\\ % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsshowtargetinnercontentsymleft} +%\begin{macro}{\glsshowtargetfonttext} +%\changes{1.49}{2022-10-14}{new} +%Text-block command that checks for math-mode. +%Only added to \sty{glossaries} in v4.50 so may not be defined. +% \begin{macrocode} +\providecommand*{\glsshowtargetfonttext}[1]{% + \ifmmode \nfss@text{\glsshowtargetfont #1}\else {\glsshowtargetfont #1}\fi +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsshowtargetinnersymleft} %\changes{1.48}{2021-11-22}{new} % \begin{macrocode} \newcommand*{\glsshowtargetinnersymleft}[1]{% @@ -2078,7 +2430,7 @@ Dickimaw Books\\ % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsshowtargetinnercontentsymright} +%\begin{macro}{\glsshowtargetinnersymright} %\changes{1.48}{2021-11-22}{new} % \begin{macrocode} \newcommand*{\glsshowtargetinnersymright}[1]{% @@ -2309,6 +2661,31 @@ Dickimaw Books\\ % \end{macrocode} %\end{macro} % +%\begin{macro}{\@xp@gls@getcounterprefix} +%This command is provided by \sty{glossaries} v4.50 so may not be +%defined. Provide a similar command in case the new version hasn't +%been installed. +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\providecommand*\@xp@gls@getcounterprefix[2]{% + \bgroup + \glswrglossdisableanchorcmds + \protected@edef\@do@gls@getcounterprefix{% + \noexpand\egroup + \noexpand\@gls@getcounterprefix{#1}{#2}% + }% + \@do@gls@getcounterprefix +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glswrglossdisableanchorcmds} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\providecommand{\glswrglossdisableanchorcmds}{\let\glstexorpdfstring\@secondoftwo} +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\@gls@getcounterprefix} %\changes{1.37}{2018-11-30}{new} %This command is provided by the base \sty{glossaries} package, but @@ -2319,9 +2696,14 @@ Dickimaw Books\\ %Unfortunately, not all targets are in this form, so the links fail. %With \pkgopt[nameref]{record}, the complete target name can be %saved, so this modification adjusts the warning. +% +%The expansion should now be performed in +%\cs{@xp@gls@getcounterprefix}. Any commands that were using +%\cs{@gls@getcounterprefix} directly need to be use +%\cs{@xp@gls@getcounterprefix} instead. % \begin{macrocode} \renewcommand*\@gls@getcounterprefix[2]{% - \protected@edef\@gls@thisloc{#1}\protected@edef\@gls@thisHloc{#2}% + \def\@gls@thisloc{#1}\def\@gls@thisHloc{#2}% \ifx\@gls@thisloc\@gls@thisHloc \def\@glo@counterprefix{}% \else @@ -2376,11 +2758,12 @@ Dickimaw Books\\ % \begin{macrocode} \AtBeginDocument{% \disable@keys{glossaries-extra.sty}{abbreviations,docdef,record}% + \def\glsxtrundefdebug{\@glsxtrundefdebug}% \def\@glsxtrundeftag{\glsxtrundeftag}% } % \end{macrocode} % -%\section{Extra Utilities} +%\subsection{Extra Utilities} % %\begin{macro}{\GlsXtrIfUnusedOrUndefined} %\changes{1.34}{2018-07-29}{new} @@ -2399,7 +2782,7 @@ Dickimaw Books\\ %\end{macro} % %Starred form of \cs{ifglossaryexists} was only introduced to -%\styfmt{glossaries} v4.46 so provide it if it hasn't been defined. +%\sty{glossaries} v4.46 so provide it if it hasn't been defined. % \begin{macrocode} \ifdef\s@ifglossaryexists {} @@ -2438,7 +2821,7 @@ Dickimaw Books\\ % Provide command to determine if any entries have been added to the % glossary (where the glossary label is provided in the first % argument). The entries are stored in the comma-separated list -% \cs{glolist@\meta{type}}. If this hasn't been defined, the glosary +% \cs{glolist@\meta{type}}. If this hasn't been defined, the glossary % doesn't exist. If it has been defined and is simply a comma, the % glossary exists and is empty. (It's initialised to a comma.) %\changes{0.4}{2015-12-03}{new} @@ -2456,6 +2839,32 @@ Dickimaw Books\\ % \end{macrocode} %\end{macro} % +%\begin{macro}{\GlsXtrIfInGlossary} +%\begin{definition} +%\cs{GlsXtrIfInGlossary}\marg{label}\marg{type}\marg{true}\marg{false} +%\end{definition} +%\changes{1.49}{?}{new} +%Test if the given entry is in the given glossary list. This may not +%correspond to the \gloskey{type} key as the entry may have been +%copied to the list. Does \meta{false} and issues warning if the glossary doesn't +%exist. +% \begin{macrocode} +\newcommand*{\GlsXtrIfInGlossary}[4]{% + \ifcsdef{glolist@#2}% + {% + \protected@edef\@glsxtr@tmp{#1}% + \letcs\@glsxtr@tmplist{glolist@#2}% + \expandafter\DTLifinlist\expandafter{\@glsxtr@tmp}{\@glsxtr@tmplist}% + {#3}{#4}% + }% + {% + \glsxtrundefaction{Glossary type `#1' doesn't exist}{}% + #4% + }% +} +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\glsxtrifkeydefined} %\changes{1.12}{2017-02-03}{new} %Tests if the key given in the first argument has been defined. @@ -2557,6 +2966,9 @@ Dickimaw Books\\ % %\begin{macro}{\glsxtrfmt} %\changes{1.12}{2017-02-03}{new} +%\begin{definition} +%\cs{glsxtrfmt}\oarg{options}\marg{entry-label}\marg{text}\oarg{insert} +%\end{definition} %The post-link hook isn't done. This now has a starred form %that checks for a final optional argument. % \begin{macrocode} @@ -2628,6 +3040,37 @@ Dickimaw Books\\ % \end{macrocode} %\end{macro} % +%\begin{macro}{\Glsxtrfmt} +%\changes{1.49}{2022-10-14}{new} +%\begin{definition} +%\cs{Glsxtrfmt}\oarg{options}\marg{entry-label}\marg{text}\oarg{insert} +%\end{definition} +%As \cs{glsxtrfmt} but applies a sentence-case change to +%\meta{text}. This is provided to allow a mapping with +%\sty{mfirstuc} v2.08+ in the event that an automated case-change is +%required. +% \begin{macrocode} +\newrobustcmd*{\Glsxtrfmt}{\@ifstar\s@Glsxtrfmt\@Glsxtrfmt} +\glsmfuaddmap{\glsxtrfmt}{\Glsxtrfmt} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@Glsxtrfmt} +%\changes{1.49}{2022-10-14}{new} +%Unstarred form. +% \begin{macrocode} +\newcommand*{\@Glsxtrfmt}[3][]{\@@glsxtrfmt{#1}{#2}{\glssentencecase{#3}}{}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\s@Glsxtrfmt} +%\changes{1.49}{2022-10-14}{new} +%Starred form. +% \begin{macrocode} +\newcommand*{\s@Glsxtrfmt}[3][]{% + \new@ifnextchar[{\s@@glsxtrfmt{#1}{#2}{\glssentencecase{#3}}}% + {\@@glsxtrfmt{#1}{#2}{\glssentencecase{#3}}{}}% +} +% \end{macrocode} +%\end{macro} %\begin{macro}{\glsxtrfmtdisplay} %\changes{1.23}{2017-11-12}{new} %The command used internally by \cs{glsxtrfmt} to do the actual @@ -2643,21 +3086,15 @@ Dickimaw Books\\ %\changes{1.12}{2017-02-03}{new} %No link or indexing. % \begin{macrocode} -\ifdef\texorpdfstring -{ - \newcommand*{\glsxtrentryfmt}[2]{% - \texorpdfstring{\@glsxtrentryfmt{#1}{#2}}{\glsxtrpdfentryfmt{#1}{#2}}% - } -} -{ - \newcommand*{\glsxtrentryfmt}{\@glsxtrentryfmt} +\newcommand*{\glsxtrentryfmt}[2]{% + \glstexorpdfstring{\@glsxtrentryfmt{#1}{#2}}{\glsxtrpdfentryfmt{#1}{#2}}% } % \end{macrocode} %\end{macro} % %\begin{macro}{\glsxtrpdfentryfmt} %\changes{1.42}{2020-02-03}{new} -%Use for the PDF bookmarks. +%Used for the PDF bookmarks. % \begin{macrocode} \newcommand*{\glsxtrpdfentryfmt}[2]{#2} % \end{macrocode} @@ -2692,6 +3129,27 @@ Dickimaw Books\\ % \end{macrocode} %\end{macro} % +%\begin{macro}{\Glsxtrentryfmt} +%\changes{1.49}{2022-10-14}{new} +%Sentence-case version. +% \begin{macrocode} +\newcommand*{\Glsxtrentryfmt}[2]{% + \glstexorpdfstring + {\@glsxtrentryfmt{#1}{\glssentencecase{#2}}}% + {\Glsxtrpdfentryfmt{#1}{#2}}% +} +\glsmfuaddmap{\glsxtrentryfmt}{\Glsxtrentryfmt} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\Glsxtrpdfentryfmt} +%\changes{1.49}{2022-10-14}{new} +%Used for the PDF bookmarks. +% \begin{macrocode} +\newcommand*{\Glsxtrpdfentryfmt}[2]{\MFUsentencecase{#2}} +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\glsxtrfieldlistadd} %\changes{1.12}{2017-02-03}{new} %If a field stores an etoolbox internal list (e.g. @@ -2807,7 +3265,7 @@ Dickimaw Books\\ %\end{macro} % %\begin{macro}{\@glsxtrforcsvfield} -%\changes{1.47}{2017-11-14}{new} +%\changes{1.47}{2021-11-04}{new} %Unstarred version. % \begin{macrocode} \newcommand*{\@glsxtrforcsvfield}[3]{% @@ -2822,7 +3280,7 @@ Dickimaw Books\\ %\end{macro} % %\begin{macro}{\s@glsxtrforcsvfield} -%\changes{1.47}{2017-11-14}{new} +%\changes{1.47}{2021-11-04}{new} %Starred version. % \begin{macrocode} \newcommand*{\s@glsxtrforcsvfield}[3]{% @@ -3158,41 +3616,29 @@ Dickimaw Books\\ %\changes{1.12}{2017-02-03}{new} %\changes{1.37}{2018-11-30}{fixed internal command and added check for %\cs{texorpdfstring}} +%\changes{1.49}{2022-10-14}{now using \cs{@Glsentryfield}} %Provide a user-level alternative to \cs{@Gls@entry@field}. +%Now uses \cs{MFUsentencecase} in PDF bookmarks. % \begin{macrocode} -\ifdef\texorpdfstring -{ - \newcommand*{\Glsxtrusefield}[2]{% - \texorpdfstring - {\@Gls@entry@field{#1}{#2}} - {\@gls@entry@field{#1}{#2}}% - } -} -{ - \newcommand*{\Glsxtrusefield}[2]{% - \@Gls@entry@field{#1}{#2}% - } +\newcommand*{\Glsxtrusefield}[2]{% + \@Glsentryfield{#1}{#2}% } +\glsmfuaddmap{\glsxtrusefield}{\Glsxtrusefield} % \end{macrocode} %\end{macro} % %\begin{macro}{\GLSxtrusefield} %\changes{1.37}{2018-11-30}{new} +%\changes{1.49}{2022-10-14}{added uppercase PDF bookmark alternative} %As above but convert to all caps. +%Note that with \sty{mfirstuc} v2.08+, \cs{mfirstucMakeUppercase} +%is expandable, so therefore \cs{glsuppercase} should also be +%expandable. % \begin{macrocode} -\ifdef\texorpdfstring -{ - \newcommand*{\GLSxtrusefield}[2]{% - \texorpdfstring - {\glsdoifexists{#1}{\mfirstucMakeUppercase{\@gls@entry@field{#1}{#2}}}}% - {\@gls@entry@field{#1}{#2}}% - } -} -{ - \newcommand*{\GLSxtrusefield}[2]{% - \glsdoifexists{#1}{\mfirstucMakeUppercase{\@gls@entry@field{#1}{#2}}}% - } +\newcommand*{\GLSxtrusefield}[2]{% + \glsuppercase{\csuse{glo@\glsdetoklabel{#1}@#2}}% } +\glsmfublocker{\GLSxtrusefield} % \end{macrocode} %\end{macro} % @@ -3228,7 +3674,7 @@ Dickimaw Books\\ %\begin{macro}{\glsxtrapptocsvfield} %\changes{1.47}{2021-11-04}{new} % Similar to the above but will append value with a leading comma if -% the field is already defined. This is used by \gls{bib2gls}. +% the field is already defined. This is used by \app{bib2gls}. % There's no check if the entry has been defined. (Because of the % way that bib2gls's save-from-alias etc options are % implemented, the entry may not have yet been written to the glstex @@ -3264,8 +3710,9 @@ Dickimaw Books\\ %\begin{macro}{\GlsXtrLetField} %\changes{1.12}{2017-02-03}{new} %Uses \cs{cslet} instead. Third argument should be a macro. +%\changes{1.49}{2022-10-14}{corrected spelling} % \begin{macrocode} -\newrobustcmd*{\GlstrLetField}[3]{% +\newrobustcmd*{\GlsXtrLetField}[3]{% \glsxtrsetfieldifexists{#1}{#2}% {\cslet{glo@\glsdetoklabel{#1}@#2}{#3}}% } @@ -3656,14 +4103,35 @@ Dickimaw Books\\ % \end{macrocode} %\end{macro} % -%\section{Modifications to Commands Provided by \styfmt{glossaries}} -% Some of the commands provided by \styfmt{glossaries} are modified +%\subsection{Modifications to Commands Provided by \sty{glossaries}} +% Some of the commands provided by \sty{glossaries} are modified % to take into account new options or to change default behaviour. % +%\begin{macro}{\@p@glossarysection} +%Phantom section only needs to be added for starred section +%commands. +%\changes{1.49}{2022-10-14}{moved \cs{phantomsection}} +% \begin{macrocode} +\renewcommand*{\@p@glossarysection}[2]{% + \glsclearpage + \ifdefempty\@@glossarysecstar + {% + \csname\@@glossarysec\endcsname{#2}% + }% + {% + \phantomsection + \@gls@toc{#1}{\@@glossarysec}% + \csname\@@glossarysec\endcsname*{#2}% + }% + \@@glossaryseclabel +} +% \end{macrocode} +%\end{macro} +% % The original \cs{@gls@entry@field} causes a problem for undefined % entries when used in section headings or captions. Since entries % must be defined with just the base package this isn't a -% significant issue, but it will cause a problem with \gls{bib2gls} +% significant issue, but it will cause a problem with \app{bib2gls} % where no entries are defined on the first \LaTeX\ call, so % redefine \cs{@gls@entry@field} to use \cs{csuse} instead of % \cs{csname}. @@ -3702,6 +4170,84 @@ Dickimaw Books\\ % \end{macrocode} %\end{macro} % +%\begin{macro}{\@gls@noexpand@field} +%\changes{1.49}{2022-10-14}{added redefinition} +%Add check for encapinnerfmt, encapnocase and encapnocaseinnerfmt +% \begin{macrocode} +\renewcommand{\@@gls@noexpand@field}[3]{% + \glsifcategoryattributehasitem{\@glo@category}{encapnocaseinnerfmt}{#2}% + {% + \csxdef{glo@#1@#2}{\noexpand\NoCaseChange{\noexpand\glsxtrgenentrytextfmt + {\expandonce{#3}}}}% + \glsexclapplyinnerfmtfield{#1}{#2}% + }% + {% + \glsifcategoryattributehasitem{\@glo@category}{encapnocase}{#2}% + {% + \glsifcategoryattributehasitem{\@glo@category}{encapinnerfmt}{#2}% + {% + \csxdef{glo@#1@#2}{\noexpand\NoCaseChange{\noexpand\glsxtrgenentrytextfmt + {\expandonce{#3}}}}% + \glsexclapplyinnerfmtfield{#1}{#2}% + }% + {% + \csxdef{glo@#1@#2}{\noexpand\NoCaseChange{\expandonce{#3}}}% + }% + }% + {% + \glsifcategoryattributehasitem{\@glo@category}{encapinnerfmt}{#2}% + {% + \csxdef{glo@#1@#2}{\noexpand\glsxtrgenentrytextfmt{\expandonce{#3}}}% + \glsexclapplyinnerfmtfield{#1}{#2}% + }% + {% + \expandafter\global\expandafter\let\csname glo@#1@#2\endcsname#3% + }% + }% + }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@@gls@expand@field} +%\changes{1.49}{2022-10-14}{added redefinition} +%Add check for encapinnerfmt, encapnocase and encapnocaseinnerfmt +% \begin{macrocode} +\renewcommand{\@@gls@expand@field}[3]{% + \glsifcategoryattributehasitem{\@glo@category}{encapnocaseinnerfmt}{#2}% + {% + \protected@csxdef{glo@#1@#2}{\noexpand\NoCaseChange + {\noexpand\glsxtrgenentrytextfmt{#3}}}% + \glsexclapplyinnerfmtfield{#1}{#2}% + }% + {% + \glsifcategoryattributehasitem{\@glo@category}{encapnocase}{#2}% + {% + \glsifcategoryattributehasitem{\@glo@category}{encapinnerfmt}{#2}% + {% + \protected@csxdef{glo@#1@#2}{\noexpand\NoCaseChange + {\noexpand\glsxtrgenentrytextfmt{#3}}}% + \glsexclapplyinnerfmtfield{#1}{#2}% + }% + {% + \protected@csxdef{glo@#1@#2}{\noexpand\NoCaseChange{#3}}% + }% + }% + {% + \glsifcategoryattributehasitem{\@glo@category}{encapinnerfmt}{#2}% + {% + \protected@csxdef{glo@#1@#2}{\noexpand\glsxtrgenentrytextfmt{#3}}% + \glsexclapplyinnerfmtfield{#1}{#2}% + }% + {% + \protected@csxdef{glo@#1@#2}{#3}% + }% + }% + }% +} +% \end{macrocode} +%\end{macro} +% %Provide a starred version of \cs{longnewglossaryentry} that doesn't %automatically insert \verb|\leavevmode\unskip\nopostdesc| at the %end of the description. The unstarred version is modified to use @@ -3973,10 +4519,21 @@ Dickimaw Books\\ % %\begin{macro}{\glsxtrcopytoglossary} %Adds an entry label to another glossary list. First argument is -%entry label. Second argument is glossary label. +%entry label. Second argument is glossary label. The starred version +%globally adds the entry label. %\changes{1.12}{2017-02-03}{new} +%\changes{1.49}{2022-10-14}{added starred form} % \begin{macrocode} -\newcommand*{\glsxtrcopytoglossary}[2]{% +\newcommand*{\glsxtrcopytoglossary}{% + \@ifstar\s@glsxtrcopytoglossary\@glsxtrcopytoglossary +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsxtrcopytoglossary} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand*{\@glsxtrcopytoglossary}[2]{% \glsdoifexists{#1}% {% \ifcsdef{glolist@#2} @@ -3994,25 +4551,54 @@ Dickimaw Books\\ % \end{macrocode} %\end{macro} % -%\subsection{Existence Checks} +%\begin{macro}{\s@glsxtrcopytoglossary} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand*{\s@glsxtrcopytoglossary}[2]{% + \glsdoifexists{#1}% + {% + \ifcsdef{glolist@#2} + {% + \protected@csxappto{glolist@#2}{#1,}% + }% + {% + \glsxtrundefaction{Glossary type `#2' doesn't exist}{}% + }% + }% +} +% \end{macrocode} +%\end{macro} +% +%\subsubsection{Existence Checks} %\begin{macro}{\glsdoifexists} % Modify \cs{glsdoifexists} to take account of the % \pkgopt{undefaction} setting. +%\changes{1.08}{2016-12-13}{now defines \cs{glslabel}} +%\changes{1.46}{2021-09-20}{changed \cs{edef} to \cs{protected@edef}} +%\changes{1.49}{2022-10-14}{added \cs{glsxtrundefdebug}} % \begin{macrocode} \renewcommand{\glsdoifexists}[2]{% - \ifglsentryexists{#1}{#2}% - {% + \ifglsentryexists{#1}{#2}{\glsxtr@doifexists{#1}}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtr@doifexists} +%Provide a robust command for the error/warning in case +%\cs{glsdoifexists} is expanded. +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newrobustcmd{\glsxtr@doifexists}[1]{% % \end{macrocode} % Define \cs{glslabel} in case it's needed after this command (for % example in the post-link hook). -%\changes{1.08}{2016-12-13}{now defines \cs{glslabel}} -%\changes{1.46}{2021-09-20}{changed \cs{edef} to \cs{protected@edef}} % \begin{macrocode} - \protected@edef\glslabel{\glsdetoklabel{#1}}% - \glsxtrundefaction{Glossary entry `\glslabel' - has not been defined}{You need to define a glossary entry before - you can reference it.}% - }% + \protected@edef\glslabel{\glsdetoklabel{#1}}% + \expandafter\glsxtrundefdebug\expandafter + {\expandafter\detokenize\expandafter{\glslabel}}% + \glsxtrundefaction{Glossary entry `\glslabel' + has not been defined}{You need to define a glossary entry before + you can reference it.}% } % \end{macrocode} %\end{macro} @@ -4022,9 +4608,19 @@ Dickimaw Books\\ % \pkgopt{undefaction} setting. % \begin{macrocode} \renewcommand{\glsdoifnoexists}[2]{% - \ifglsentryexists{#1}{% - \glsxtrundefaction{Glossary entry `\glsdetoklabel{#1}' - has already been defined}{}}{#2}% + \ifglsentryexists{#1}{\glsxtr@doifnoexists{#1}}{#2}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtr@doifnoexists} +%Provide a robust command for the error/warning in case +%\cs{glsdoifnoexists} is expanded. +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newrobustcmd{\glsxtr@doifnoexists}[1]{% + \glsxtrundefaction{Glossary entry `\glsdetoklabel{#1}' + has already been defined}% } % \end{macrocode} %\end{macro} @@ -4032,7 +4628,7 @@ Dickimaw Books\\ %\begin{macro}{\glsdoifexistsordo} % Modify \cs{glsdoifexistsordo} to take account of the % \pkgopt{undefaction} setting. This command was introduced in -% \styfmt{glossaries} version 4.19, so check if it has been defined first. +% \sty{glossaries} version 4.19, so check if it has been defined first. % \begin{macrocode} \ifdef\glsdoifexistsordo {% @@ -4092,8 +4688,8 @@ Dickimaw Books\\ %\end{macro} % %There are now three types of cross-references: the \gloskey{see} key (as -%original), the \gloskey{alias} key (from \styfmt{glossaries-extra} v1.12) -% and the \gloskey{seealso} key (from \styfmt{glossaries-extra} v1.16). +%original), the \gloskey{alias} key (from \sty{glossaries-extra} v1.12) +% and the \gloskey{seealso} key (from \sty{glossaries-extra} v1.16). % The original \gloskey{see} key needs to have a corresponding field % (which it doesn't with the base \sty{glossaries} package). % @@ -4117,6 +4713,70 @@ Dickimaw Books\\ % \end{macrocode} %\end{macro} % +%\begin{macro}{\glsxtrseelistsencap} +%\changes{1.49}{2022-10-14}{new} +%\begin{definition} +%\cs{glsxtrseelistsencap}\marg{content} +%\end{definition} +%Encapsulates cross-reference list. +% \begin{macrocode} +\newcommand*{\glsxtrseelistsencap}[1]{\space #1} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrseelistsdelim} +%\changes{1.49}{2022-10-14}{new} +%Delimiter in cross-reference list. +% \begin{macrocode} +\newcommand*{\glsxtrseelistsdelim}{, } +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrseelists} +%\changes{1.49}{2022-10-14}{new} +%\begin{definition} +%\cs{glsxtrseelists}\marg{label} +%\end{definition} +% \begin{macrocode} +\newcommand*{\glsxtrseelists}[1]{% + \glsdoifexists{#1}% + {% + \def\@glsxtr@seelists{}% + \letcs{\@glo@see}{glo@\glsdetoklabel{#1}@see}% + \ifdefempty\@glo@see + {}% + {% + \protected@edef\@glsxtr@seelists{% + \noexpand\glsxtr@usesee\@glo@see\noexpand\@end@glsxtr@usesee + }% + }% + \letcs{\@glo@see}{glo@\glsdetoklabel{#1}@seealso}% + \ifdefempty\@glo@see + {}% + {% + \ifdefempty\@glsxtr@seelists{}% + {\appto\@glsxtr@seelists{\glsxtrseelistsdelim}}% + \protected@edef\@glsxtr@seelists{% + \noexpand\glsxtruseseealsoformat{\@glo@see}% + }% + }% + \letcs{\@glo@see}{glo@\glsdetoklabel{#1}@alias}% + \ifdefempty\@glo@see + {}% + {% + \ifdefempty\@glsxtr@seelists{}% + {\appto\@glsxtr@seelists{\glsxtrseelistsdelim}}% + \protected@edef\@glsxtr@seelists{% + \noexpand\glsxtruseseeformat{\noexpand\seename}{\@glo@see}% + }% + }% + \ifdefempty\@glsxtr@seelists{}% + {\glsxtrseelistsencap\@glsxtr@seelists}% + }% +} +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\glsxtrusesee} %\changes{1.06}{2016-06-18}{new} %Apply \cs{glsseeformat} to the \gloskey{see} key if not empty. @@ -4171,11 +4831,11 @@ Dickimaw Books\\ %\changes{1.37}{2018-11-30}{removed reference to \cs{glslabel}} %\changes{1.42}{2020-02-03}{switched to using \cs{glsfmttext} and %\cs{glsfmtname}} -%\styfmt{glossaries} originally defined \cs{glsseeitemformat} +%\sty{glossaries} originally defined \cs{glsseeitemformat} %to use \cs{glsentryname} but in v3.0 this was switched to %use \cs{glsentrytext} due to problems occurring with the %\gloskey{name} field being sanitized. Since this is no longer a -%problem, \styfmt{glossaries-extra} restored the original +%problem, \sty{glossaries-extra} restored the original %definition as it makes more sense to use the \gloskey{name} %in the cross-reference list. Unfortunately this doesn't take style %changes into account, so as from v1.42, this now uses @@ -4201,12 +4861,26 @@ Dickimaw Books\\ %use this command to show the hierarchy, if required. This now uses %\cs{glsfmttext} and \cs{glsfmtname} instead of \cs{glsaccessshort} %and \cs{glsaccessname} to allow for style formatting. +%\changes{1.49}{2022-10-14}{added \cs{expandafter}s} +%\changes{1.49}{2022-10-14}{added \cs{glstexorpdfstring}} % \begin{macrocode} \newcommand*{\glsxtrhiername}[1]{% + \glstexorpdfstring + {\@glsxtrhiername{#1}}% + {\glsentryname{#1}}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@glsxtrhiername} +%Provide robust inner command. +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newrobustcmd*{\@glsxtrhiername}[1]{% \glsdoifexists{#1}% {% \glsxtrifhasfield{parent}{#1}% - {\glsxtrhiername{\glscurrentfieldvalue}\glsxtrhiernamesep}% + {\expandafter\glsxtrhiername\expandafter + {\glscurrentfieldvalue}\glsxtrhiernamesep}% {}% \ifglshasshort{#1}{\glsfmttext{#1}}{\glsfmtname{#1}}% }% @@ -4222,18 +4896,33 @@ Dickimaw Books\\ %\cs{Glsxtrhiername}\marg{label} %\end{definition} %As above but displays the top-level name with an initial capital. +%\changes{1.49}{2022-10-14}{added \cs{expandafter}s} +%\changes{1.49}{2022-10-14}{added \cs{glstexorpdfstring}} % \begin{macrocode} \newcommand*{\Glsxtrhiername}[1]{% + \glstexorpdfstring + {\@Glsxtrhiername{#1}}% + {\MFUsentencecase{\glsentryname{#1}}}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@Glsxtrhiername} +%\changes{1.49}{2022-10-14}{new} +%Provide robust inner command. +% \begin{macrocode} +\newrobustcmd*{\@Glsxtrhiername}[1]{% \glsdoifexists{#1}% {% \glsxtrifhasfield{parent}{#1}% {% - \Glsxtrhiername{\glscurrentfieldvalue}\glsxtrhiernamesep + \expandafter\Glsxtrhiername\expandafter + {\glscurrentfieldvalue}\glsxtrhiernamesep \ifglshasshort{#1}{\glsfmttext{#1}}{\glsfmtname{#1}}% }% {\ifglshasshort{#1}{\Glsfmttext{#1}}{\Glsfmtname{#1}}}% }% } +\glsmfuaddmap{\glsxtrhiername}{\Glsxtrhiername} % \end{macrocode} %\end{macro} % @@ -4247,16 +4936,31 @@ Dickimaw Books\\ %As above but converts the first letter of each name to a capital. %(Note that this isn't applying title case, just capitalising the %start of each hierarchical element.) +%\changes{1.49}{2022-10-14}{added \cs{expandafter}s} +%\changes{1.49}{2022-10-14}{added \cs{glstexorpdfstring}} % \begin{macrocode} \newcommand*{\GlsXtrhiername}[1]{% + \glstexorpdfstring + {\@GlsXtrhiername{#1}}% + {\glsentryname{#1}}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@GlsXtrhiername} +%\changes{1.49}{2022-10-14}{new} +%Provide robust inner command. +% \begin{macrocode} +\newrobustcmd*{\@GlsXtrhiername}[1]{% \glsdoifexists{#1}% {% \glsxtrifhasfield{parent}{#1}% - {\GlsXtrhiername{\glscurrentfieldvalue}\glsxtrhiernamesep}% + {\expandafter\GlsXtrhiername\expandafter + {\glscurrentfieldvalue}\glsxtrhiernamesep}% {}% \ifglshasshort{#1}{\Glsfmttext{#1}}{\Glsfmtname{#1}}% }% } +\glsmfublocker{\GlsXtrhiername} % \end{macrocode} %\end{macro} % @@ -4268,18 +4972,33 @@ Dickimaw Books\\ %\cs{GLSxtrhiername}\marg{label} %\end{definition} %As above but displays the top-level name in all-caps. +%\changes{1.49}{2022-10-14}{added \cs{expandafter}s} +%\changes{1.49}{2022-10-14}{added \cs{glstexorpdfstring}} % \begin{macrocode} \newcommand*{\GLSxtrhiername}[1]{% + \glstexorpdfstring + {\@GLSxtrhiername{#1}}% + {\GLSxtrusefield{#1}{name}}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@GLSxtrhiername} +%\changes{1.49}{2022-10-14}{new} +%Provide robust inner command. +% \begin{macrocode} +\newrobustcmd*{\@GLSxtrhiername}[1]{% \glsdoifexists{#1}% {% \glsxtrifhasfield{parent}{#1}% {% - \GLSxtrhiername{\glscurrentfieldvalue}\glsxtrhiernamesep + \expandafter\GLSxtrhiername\expandafter + {\glscurrentfieldvalue}\glsxtrhiernamesep \ifglshasshort{#1}{\glsfmttext{#1}}{\glsfmtname{#1}}% }% {\ifglshasshort{#1}{\GLSfmttext{#1}}{\GLSfmtname{#1}}}% }% } +\glsmfublocker{\GLSxtrhiername} % \end{macrocode} %\end{macro} % @@ -4291,16 +5010,34 @@ Dickimaw Books\\ %\cs{GLSXTRhiername}\marg{label} %\end{definition} %As above but displays all names in all-caps. +%\changes{1.49}{2022-10-14}{added \cs{expandafter}s} +%\changes{1.49}{2022-10-14}{added \cs{glstexorpdfstring}} % \begin{macrocode} \newcommand*{\GLSXTRhiername}[1]{% - \glsdoifexists{#1}% - {% - \glsxtrifhasfield{parent}{#1}% - {\GLSXTRhiername{\glscurrentfieldvalue}\glsxtrhiernamesep}% - {} - \ifglshasshort{#1}{\GLSfmttext{#1}}{\GLSfmtname{#1}}% - }% + \glstexorpdfstring + {\@GLSXTRhiername{#1}}% + {\GLSxtrusefield{#1}{name}}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@GLSXTRhiername} +%\changes{1.49}{2022-10-14}{new} +%Provide robust inner command. +% \begin{macrocode} +\newrobustcmd*{\@GLSXTRhiername}[1]{% + \glsdoifexists{#1}% + {% + \glsxtrifhasfield{parent}{#1}% + {\expandafter\GLSXTRhiername\expandafter + {\glscurrentfieldvalue}\glsxtrhiernamesep}% +% \end{macrocode} +%\changes{1.49}{2022-10-14}{removed unwanted eol} +% \begin{macrocode} + {}% + \ifglshasshort{#1}{\GLSfmttext{#1}}{\GLSfmtname{#1}}% + }% } +\glsmfublocker{\GLSXTRhiername} % \end{macrocode} %\end{macro} % @@ -4404,6 +5141,61 @@ Dickimaw Books\\ % \end{macrocode} %\end{macro} % +%\begin{macro}{\glsxtrtaggedlistsep} +%\changes{1.49}{2022-10-14}{new} +%Separator between the tag and the list in \cs{glsxtrtaggedlist} +% \begin{macrocode} +\newcommand{\glsxtrtaggedlistsep}{\space} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\glsxtrtaggedlist} +%\changes{1.49}{2022-10-14}{new} +%\begin{definition} +%\cs{glsxtrtaggedlist}\marg{singular tag}\marg{plural +%tag}\marg{label prefix}\marg{label list} +%\end{definition} +%Similar to the above but the tag is selected depending on how many +%items there are in the list. +% \begin{macrocode} +\newrobustcmd*{\glsxtrtaggedlist}[4]{% + \begingroup + \protected@edef\@gls@taggedlist@labels{#4}% + \let\@gls@dolast\relax + \let\@gls@donext\relax + \let\@glsseeitem\@glsxtr@seefirstitem + \let\@glsseelastsep\glsseelastsep + \def\@gls@taggedlist@content{}% + \let\@gls@taggedlist@tag\relax + \@for\@gls@thislabel:=\@gls@taggedlist@labels\do{% + \ifx\@xfor@nextelement\@nnil + \ifx\@gls@dolast\relax + \else + \eappto\@gls@taggedlist@content{\expandonce\@gls@dolast}% + \fi + \else + \ifx\@gls@dolast\relax + \else + \eappto\@gls@taggedlist@content{\expandonce\@gls@donext}% + \fi + \fi + \protected@eappto\@gls@taggedlist@content{\noexpand\@glsseeitem + {#3\@gls@thislabel}}% + \let\@gls@dolast\@glsseelastsep + \let\@gls@donext\glsseesep + \let\@glsseeitem\@glsxtr@seeitem + \let\@glsseelastsep\glsseelastoxfordsep + \ifx\@gls@taggedlist@tag\relax + \def\@gls@taggedlist@tag{#1\glsxtrtaggedlistsep}% + \else + \def\@gls@taggedlist@tag{#2\glsxtrtaggedlistsep}% + \fi + }% + \@gls@taggedlist@tag\@gls@taggedlist@content + \endgroup +} +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\@glsxtr@seeitem} %\changes{1.48}{2021-11-22}{new} % \begin{macrocode} @@ -4458,7 +5250,7 @@ Dickimaw Books\\ %\changes{1.16}{2017-06-15}{new} %\changes{1.42}{2020-02-03}{add check for \cs{alsoname}} %In case this command hasn't been defined. Languages packages -%actually provide \ics{alsoname} so use that if it's defined. +%actually provide \cs{alsoname} so use that if it's defined. % \begin{macrocode} \ifdef\alsoname {\providecommand{\seealsoname}{\alsoname}} @@ -4498,21 +5290,24 @@ Dickimaw Books\\ %This doesn't increment the associated counter. % \begin{macrocode} \newrobustcmd*{\glsxtrindexseealso}[2]{% - \ifx\@glsxtr@record@setting\@glsxtr@record@setting@alsoindex - \@glsxtr@recordsee{#1}{#2}% - \fi - \glsdoifexists{#1}% + \glsxtr@wrglossary@encap{#1} {% - \@@glsxtrwrglossmark - \def\@gls@xref{#2}% - \@onelevel@sanitize\@gls@xref - \@gls@checkmkidxchars\@gls@xref - \gls@glossary{\csname glo@#1@type\endcsname}{% - (indexentry - :tkey (\csname glo@#1@index\endcsname) - :xref (\string"\@gls@xref\string") - :attr \string"seealso\string" - ) + \ifx\@glsxtr@record@setting\@glsxtr@record@setting@alsoindex + \@glsxtr@recordsee{#1}{#2}% + \fi + \glsdoifexists{#1}% + {% + \@@glsxtrwrglossmark + \def\@gls@xref{#2}% + \@onelevel@sanitize\@gls@xref + \@gls@checkmkidxchars\@gls@xref + \gls@glossary{\csname glo@#1@type\endcsname}{% + (indexentry + :tkey (\csname glo@#1@index\endcsname) + :xref (\string"\@gls@xref\string") + :attr \string"seealso\string" + ) + }% }% }% } @@ -4575,6 +5370,7 @@ Dickimaw Books\\ {\csxdef{glo@\@glo@label @alias}{}}% {% \csxdef{glo@\@glo@label @alias}{\@glo@alias}% + \glsxtraliashook{\@glo@label}% }% } % \end{macrocode} @@ -4614,6 +5410,7 @@ Dickimaw Books\\ {% \protected@edef\@do@glssee{\noexpand\glssee{\@glo@label}{\@glo@alias}}% \@do@glssee + \glsxtraliashook{\@glo@label}% }% {}% }% @@ -4681,6 +5478,13 @@ Dickimaw Books\\ } % \end{macrocode} % +%\begin{macro}{\glsxtraliashook} +%\changes{1.49}{2022-10-14}{new} +%Provide a hook that's used when the alias field is provided. +% \begin{macrocode} +\newcommand*{\glsxtraliashook}[1]{} +% \end{macrocode} +%\end{macro} % % Add all unused cross-references at the end of the document. % \begin{macrocode} @@ -4696,14 +5500,22 @@ Dickimaw Books\\ {% \forglsentries[\@glo@type]{\@glo@label}% {% - \ifglsused{\@glo@label}% - {\expandafter\@glsxtr@addunusedxrefs\expandafter{\@glo@label}}{}% + \ifglsused{\@glo@label}{\glsxtraddunusedxrefs{\@glo@label}}{}% }% }% } % \end{macrocode} %\end{macro} % +%\begin{macro}{\glsxtraddunusedxrefs} +%\changes{1.49}{2022-10-14}{new} +%Added user-level command in case user wants to redefine +%\cs{glsxtraddallcrossrefs} +% \begin{macrocode} +\newcommand*{\glsxtraddunusedxrefs}[1]{\expandafter\@glsxtr@addunusedxrefs\expandafter{#1}} +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\@glsxtr@addunusedxrefs} % If the given entry has a \gloskey{see} or \gloskey{seealso} field add all unused % cross-references. (The \gloskey{alias} field isn't checked.) @@ -4767,10 +5579,10 @@ Dickimaw Books\\ % \end{macrocode} %\end{macro} % -%\subsection{Document Definitions} +%\subsubsection{Document Definitions} % %\begin{macro}{\gls@begindocdefs} -%This command was only introduced to \styfmt{glossaries} v4.37, so +%This command was only introduced to \sty{glossaries} v4.37, so %it may not be defined. If it has been defined, redefine it to check %\cs{@glsxtr@docdefval} so that it only inputs the \texttt{.glsdefs} %file if \pkgopt[true]{docdef}. @@ -4835,6 +5647,7 @@ Dickimaw Books\\ % \begin{macrocode} \let\glsxtr@orgmakenoidxglossaries\makenoidxglossaries \renewcommand{\makenoidxglossaries}{% + \def\glsindexingsetting{noidx}% \@domakeglossaries {% \ifdefequal\@glsxtr@record@setting\@glsxtr@record@setting@off @@ -4892,11 +5705,38 @@ Dickimaw Books\\ {You may only use \string\makenoidxglossaries\ space with the record=off option}% }% + \let\gls@warn@noidx@incompatible\@gls@warn@noidx@incompatible }% } % \end{macrocode} %\end{macro} % +%\begin{macro}{\gls@warn@noidx@incompatible} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand*{\gls@warn@noidx@incompatible}[2]{} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@gls@warn@noidx@incompatible} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand*{\@gls@warn@noidx@incompatible}[2]{% + #2\GlossariesExtraWarning{#1\space is incompatible with \string\makenoidxglossaries}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\gls@warn@noidxmakegloss@incompatible} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand*{\gls@warn@noidxmakegloss@incompatible}[2]{% + \gls@warn@noidx@incompatible{#1}{#2}% + \gls@warn@makegloss@incompatible{#1}{#2}% +} +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\gls@defdocnewglossaryentry} % Modify \cs{gls@defdocnewglossaryentry} so that it checks % the \pkgopt{docdef} value. @@ -5039,6 +5879,7 @@ Dickimaw Books\\ \def\glsxtr@keylist{##1}% \@Glsxtr } + \glsmfuaddmap{\glsxtr}{\Glsxtr} % \end{macrocode} %\end{macro} % @@ -5093,6 +5934,7 @@ Dickimaw Books\\ \def\glsxtr@keylist{##1}% \@Glsxtrpl } + \glsmfuaddmap{\glsxtrpl}{\Glsxtrpl} % \end{macrocode} %\end{macro} % @@ -5162,7 +6004,7 @@ Dickimaw Books\\ \@onlypreamble\GlsXtrEnableOnTheFly % \end{macrocode} % -%\subsection{Existing Glossary Style Modifications} +%\subsubsection{Existing Glossary Style Modifications} % % Modify \cs{setglossarystyle} to keep track of the current style. % This allows the \cs{glossaries-extra-stylemods} package to reset the @@ -5175,7 +6017,18 @@ Dickimaw Books\\ % \end{macrocode} %\end{macro} % -% Modify \cs{setglossarystyle} to set \cs{@glsxtr@current@style}. +%\begin{macro}{\glsxtrpreglossarystyle} +%\changes{1.49}{2022-10-14}{new} +%A hook to initialise default definitions for style commands. +% \begin{macrocode} +\newcommand{\glsxtrpreglossarystyle}{% + \renewcommand*{\glssubgroupheading}[4]{\glsgroupheading{##4}}% +} +% \end{macrocode} +%\end{macro} +% Modify \cs{setglossarystyle} to set \cs{@glsxtr@current@style} +% and reset \cs{glssubgroupheading} in case the style doesn't +% support it. %\begin{macro}{\setglossarystyle} % \begin{macrocode} \renewcommand*{\setglossarystyle}[1]{% @@ -5184,12 +6037,16 @@ Dickimaw Books\\ \PackageError{glossaries-extra}{Glossary style `#1' undefined}{}% }% {% + \glsxtrpreglossarystyle \csname @glsstyle@#1\endcsname % \end{macrocode} % Only set the current style if it exists. % \begin{macrocode} \protected@edef\@glsxtr@current@style{#1}% }% +% \end{macrocode} +% Set this as the default, if a default hasn't been set. +% \begin{macrocode} \ifx\@glossary@default@style\relax \protected@edef\@glossary@default@style{#1}% \fi @@ -5197,7 +6054,7 @@ Dickimaw Books\\ % \end{macrocode} %\end{macro} % -% In case we have an old version of \styfmt{glossaries}: +% In case we have an old version of \sty{glossaries}: % \begin{macrocode} \ifdef\@glossary@default@style {} @@ -5435,7 +6292,7 @@ Dickimaw Books\\ % \end{macrocode} %\end{macro} % -%\subsection{Entry Formatting, Hyperlinks and Indexing} +%\subsubsection{Entry Formatting, Hyperlinks and Indexing} % %\begin{macro}{\glsentryfmt} % Change default entry format. Use the generic format for regular @@ -5480,13 +6337,471 @@ Dickimaw Books\\ % \end{macrocode} %\end{macro} % +%Some formatting commands (such as highlighting or letter spacing) may +%require expandable content in the argument, so also provide a formatting +%command for use within \cs{glsgenentryfmt} for those instances. +% +%\begin{macro}{\glsxtrdefaultentrytextfmt} +%\changes{1.49}{2022-10-14}{new} +%This is the default command that \cs{glsxtrgenentrytextfmt} is initialised to +%within \cs{@gls@link}. +% \begin{macrocode} +\newcommand{\glsxtrdefaultentrytextfmt}[1]{#1} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrattrentrytextfmt} +%\changes{1.49}{2022-10-14}{new} +%Provide a convenient command that applies the formatting according to +%the category attribute. This isn't used by default as this inner formatting +%should rarely be needed and increases complexity. +% \begin{macrocode} +\newcommand{\glsxtrattrentrytextfmt}[1]{% + \glshasattribute{\glslabel}{innertextformat}% + {% + \csuse{\glsgetattribute{\glslabel}{innertextformat}}{#1}% + }% + {#1}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrgenentrytextfmt} +%\changes{1.49}{2022-10-14}{new} +%This command is a user-level command to allow it to be included in custom +%formats or styles but it should not be redefined at the user level +%as it's redefined within \cs{@gls@link} (similar to other style commands, such +%as \cs{glscapscase}. Redefine \cs{glsxtrdefaultentrytextfmt} to change +%the default definition for this command. +% \begin{macrocode} +\newcommand*{\glsxtrgenentrytextfmt}{\glsxtrdefaultentrytextfmt} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsfmtfield} +%\changes{1.49}{2022-10-14}{new} +%\begin{definition} +%\cs{glsfmtfield}\marg{insert}\marg{cs}\marg{label}\marg{field} +%\end{definition} +%Provide a convenient way of applying a formatting command to the actual +%field contents. No check for existence. +% +%Note this command intentionally isn't robust, as it's possible that +%a user may want to redefine an abbreviation command to use +%\cs{MakeLowercase}, for example, to use smallcaps when +%abbreviations have been defined with the short version in capitals. +%Using \cs{newrobustcmd} will break that case. +% \begin{macrocode} +\newcommand*{\glsfmtfield}[4]{% + \expandafter\expandafter\expandafter + #2\expandafter\expandafter\expandafter + {\csname glo@\glsdetoklabel{#3}@#4\endcsname #1}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\Glsfmtfield} +%\changes{1.49}{2022-10-14}{new} +%\begin{definition} +%\cs{Glsfmtfield}\marg{insert}\marg{cs}\marg{label}\marg{field} +%\end{definition} +%As above but convert first letter to uppercase. +%Note that if the formatting command can go outside of \cs{makefirstuc} +%then it can simply be applied around the appropriate command that expands +%to the field value. For example, +%\begin{verbatim} +%\emph{\Glsentrytext{label}} +%\end{verbatim} +%instead of +%\begin{verbatim} +%\Glsfmtfield{}{\emph}{sample}{text} +%\end{verbatim} +% +%Note this command intentionally isn't robust for the same reason as +%above. The expansion allows \cs{makefirstuc} to pick up any +%mappings or blockers before the content is passed to +%\cs{MFUsentencecase}. +% \begin{macrocode} +\newcommand*{\Glsfmtfield}[4]{% + \ifx#2\@firstofone + \expandafter\expandafter\expandafter + \glssentencecase\expandafter\expandafter\expandafter + {% + \csname glo@\glsdetoklabel{#3}@#4\endcsname #1% + }% + \else + \expandafter\expandafter\expandafter + \glssentencecase\expandafter\expandafter\expandafter + {% + \expandafter\expandafter\expandafter + #2\expandafter\expandafter\expandafter + {\csname glo@\glsdetoklabel{#3}@#4\endcsname #1}% + }% + \fi +} +\glsmfuaddmap{\glsfmtfield}{\Glsfmtfield} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GLSfmtfield} +%\changes{1.49}{2022-10-14}{new} +%\begin{definition} +%\cs{GLSfmtfield}\marg{insert}\marg{cs}\marg{label}\marg{field} +%\end{definition} +%As above but convert all to uppercase. +%The expansion is in case we have an older kernel. +% \begin{macrocode} +\newcommand*{\GLSfmtfield}[4]{% + \ifx#2\@firstofone + \expandafter\expandafter\expandafter + \glsuppercase\expandafter\expandafter\expandafter + {% + \csname glo@\glsdetoklabel{#3}@#4\endcsname #1% + }% + \else + \expandafter\expandafter\expandafter + \glsuppercase\expandafter\expandafter\expandafter + {% + \expandafter\expandafter\expandafter + #2\expandafter\expandafter\expandafter + {\csname glo@\glsdetoklabel{#3}@#4\endcsname #1}% + }% + \fi +} +\glsmfublocker{\GLSfmtfield} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsfmtinsert} +%\changes{1.49}{2022-10-14}{new} +%Formats \cs{glsinsert}. +% \begin{macrocode} +\newcommand*{\glsfmtinsert}{% + \ifdefempty\glsinsert{}% + {\expandafter\glsxtrgenentrytextfmt\expandafter{\glsinsert}}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GLSfmtinsert} +%\changes{1.49}{2022-10-14}{new} +%As above but all caps. +% \begin{macrocode} +\newcommand*{\GLSfmtinsert}{% + \ifdefempty\glsinsert{}% + {% + \expandafter\glsuppercase\expandafter + {\expandafter\glsxtrgenentrytextfmt\expandafter{\glsinsert}}% + }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsifapplyinnerfmtfield} +%\changes{1.49}{2022-10-14}{new} +%\begin{definition} +%\cs{glsifapplyinnerfmtfield}\marg{label}\marg{field}\marg{true}\marg{false} +%\end{definition} +%Does \meta{true} if \cs{glsgenentryfmt} should encapsulate the +%given field with the inner format otherwise does \meta{false}. +% \begin{macrocode} +\newcommand*{\glsifapplyinnerfmtfield}[4]{% + \ifcsundef{@glo@\glsdetoklabel{#1}@innerfmt@fields}% + {#3}% + {\xifinlistcs{#2}{@glo@\glsdetoklabel{#1}@innerfmt@fields}{#4}{#3}}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsexclapplyinnerfmtfield} +%\changes{1.49}{2022-10-14}{new} +%Adds the field to the exclusion list. This typically means that the +%field value already contains the inner formatting. +% \begin{macrocode} +\newcommand*{\glsexclapplyinnerfmtfield}[2]{% + \listcseadd{@glo@\glsdetoklabel{#1}@innerfmt@fields}{#2}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsgenentryfmt} +%\changes{1.49}{2022-10-14}{added redefinition} +% Redefine to use \cs{glsxtrgenentrytextfmt} +% \begin{macrocode} +\renewcommand*{\glsgenentryfmt}{% + \ifdefempty\glscustomtext + {% + \glsifplural + {% +% \end{macrocode} +% Plural form +% \begin{macrocode} + \glscapscase + {% +% \end{macrocode} +% Don't adjust case +% \begin{macrocode} + \ifglsused\glslabel + {% +% \end{macrocode} +% Subsequent use +% \begin{macrocode} + \glsifapplyinnerfmtfield{\glslabel}{plural}% + {% + \expandafter\glsaccessfmtplural\expandafter{\glsinsert}% + {\glsxtrgenentrytextfmt}{\glslabel}% + }% + {\glsaccessplural{\glslabel}\glsfmtinsert}% + }% + {% +% \end{macrocode} +% First use +% \begin{macrocode} + \glsifapplyinnerfmtfield{\glslabel}{firstpl}% + {% + \expandafter\glsaccessfmtfirstplural\expandafter{\glsinsert}% + {\glsxtrgenentrytextfmt}{\glslabel}% + }% + {\glsaccessfirstplural{\glslabel}\glsfmtinsert}% + }% + }% + {% +% \end{macrocode} +% Make first letter upper case +% \begin{macrocode} + \ifglsused\glslabel + {% +% \end{macrocode} +% Subsequent use. +% \begin{macrocode} + \glsifapplyinnerfmtfield{\glslabel}{plural}% + {% + \expandafter\Glsaccessfmtplural\expandafter + {\glsinsert}{\glsxtrgenentrytextfmt}{\glslabel}% + }% + {\Glsaccessplural{\glslabel}\glsfmtinsert}% + }% + {% +% \end{macrocode} +% First use +% \begin{macrocode} + \glsifapplyinnerfmtfield{\glslabel}{firstpl}% + {% + \expandafter\Glsaccessfmtfirstplural\expandafter + {\glsinsert}{\glsxtrgenentrytextfmt}{\glslabel}% + }% + {\Glsaccessfirstplural{\glslabel}\glsfmtinsert}% + }% + }% + {% +% \end{macrocode} +% Make all upper case +% \begin{macrocode} + \ifglsused\glslabel + {% +% \end{macrocode} +% Subsequent use +% \begin{macrocode} + \glsifapplyinnerfmtfield{\glslabel}{plural}% + {% + \expandafter\GLSaccessfmtplural\expandafter + {\glsinsert}{\glsxtrgenentrytextfmt}{\glslabel}% + }% + {\GLSaccessplural{\glslabel}\GLSfmtinsert}% + }% + {% +% \end{macrocode} +% First use +% \begin{macrocode} + \glsifapplyinnerfmtfield{\glslabel}{firstpl}% + {% + \expandafter\GLSaccessfmtfirstplural\expandafter + {\glsinsert}{\glsxtrgenentrytextfmt}{\glslabel}% + }% + {\GLSaccessfirstplural{\glslabel}\GLSfmtinsert}% + }% + }% + }% + {% +% \end{macrocode} +% Singular form +% \begin{macrocode} + \glscapscase + {% +% \end{macrocode} +% Don't adjust case +% \begin{macrocode} + \ifglsused\glslabel + {% +% \end{macrocode} +% Subsequent use +% \begin{macrocode} + \glsifapplyinnerfmtfield{\glslabel}{text}% + {% + \expandafter\glsaccessfmttext\expandafter + {\glsinsert}{\glsxtrgenentrytextfmt}{\glslabel}% + }% + {\glsaccesstext{\glslabel}\glsfmtinsert}% + }% + {% +% \end{macrocode} +% First use +% \begin{macrocode} + \glsifapplyinnerfmtfield{\glslabel}{first}% + {% + \expandafter\glsaccessfmtfirst\expandafter + {\glsinsert}{\glsxtrgenentrytextfmt}{\glslabel}% + }% + {\glsaccessfirst{\glslabel}\glsfmtinsert}% + }% + }% + {% +% \end{macrocode} +% Make first letter upper case +% \begin{macrocode} + \ifglsused\glslabel + {% +% \end{macrocode} +% Subsequent use +% \begin{macrocode} + \glsifapplyinnerfmtfield{\glslabel}{text}% + {% + \expandafter\Glsaccessfmttext\expandafter + {\glsinsert}{\glsxtrgenentrytextfmt}{\glslabel}% + }% + {\Glsaccesstext{\glslabel}\glsfmtinsert}% + }% + {% +% \end{macrocode} +% First use +% \begin{macrocode} + \glsifapplyinnerfmtfield{\glslabel}{first}% + {% + \expandafter\Glsaccessfmtfirst\expandafter + {\glsinsert}{\glsxtrgenentrytextfmt}{\glslabel}% + }% + {\Glsaccessfirst{\glslabel}\glsfmtinsert}% + }% + }% + {% +% \end{macrocode} +% Make all upper case +% \begin{macrocode} + \ifglsused\glslabel + {% +% \end{macrocode} +% Subsequent use +% \begin{macrocode} + \glsifapplyinnerfmtfield{\glslabel}{text}% + {% + \expandafter\GLSaccessfmttext\expandafter + {\glsinsert}{\glsxtrgenentrytextfmt}{\glslabel}% + }% + {\GLSaccesstext{\glslabel}\GLSfmtinsert}% + }% + {% +% \end{macrocode} +% First use +% \begin{macrocode} + \glsifapplyinnerfmtfield{\glslabel}{first}% + {% + \expandafter\GLSaccessfmtfirst\expandafter + {\glsinsert}{\glsxtrgenentrytextfmt}{\glslabel}% + }% + {\GLSaccessfirst{\glslabel}\GLSfmtinsert}% + }% + }% + }% + }% + {% +% \end{macrocode} +% Custom text provided in \cs{glsdisp}, in which case the formatting +% should already be applied. +% \begin{macrocode} + \glscustomtext + }% +} +% \end{macrocode} +%\end{macro} +% % Commands like \cs{glsifplural} are only used by the \cs{gls}-like -% commands in the \styfmt{glossaries} package, but it might be useful -% for the postlink hook to know if the user has used, say, +% commands in the \sty{glossaries} package, but it might be useful +% for the post-link hook to know if the user has used, say, % \cs{glsfirst} or \cs{glsplural}. This can provide better % consistency with the formatting of the \cs{gls}-like commands, % even though they don't use \cs{glsentryfmt}. % +%\begin{macro}{\glsxtrifwasglslike} +%\changes{1.49}{2022-10-14}{new} +%For use in the post-link hook, this indicates whether or not +%the hook follows a \cs{gls}-like command. +% \begin{macrocode} +\newcommand*{\glsxtrifwasglslike}[2]{#2} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrifwasglslikeandfirstuse} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand*{\glsxtrifwasglslikeandfirstuse}[2]{% + \glsxtrifwasglslike + {% + \glsxtrifwasfirstuse{#1}{#2}% + }{#2}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrifwassubsequentuse} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand*{\glsxtrifwassubsequentuse}[2]{% + \glsxtrifwasglslike + {% + \glsxtrifwasfirstuse{#2}{#1}% + }{#2}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrifallcaps} +%\changes{1.49}{2022-10-14}{new} +%Shortcut. +% \begin{macrocode} +\newcommand*{\glsxtrifallcaps}[2]{\glscapscase{#2}{#1}{#1}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrcurrentfield} +%\changes{1.49}{2022-10-14}{new} +%Another placeholder to find out information about the calling +%command. This will be empty for the \cs{gls} and +%\cs{glsxtrfull} set of commands and will be the singular field otherwise. +% \begin{macrocode} +\newcommand*{\glsxtrcurrentfield}{} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtr@shortfieldname} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand*{\glsxtr@shortfieldname}{short} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrifwassubsequentorshort} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand*{\glsxtrifwassubsequentorshort}[2]{% + \glsxtrifwasglslike + {% + \glsxtrifwasfirstuse{#2}{#1}% + }% + {\ifdefequal\glsxtrcurrentfield\glsxtr@shortfieldname{#1}{#2}}% +} +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\@gls@field@link} % Redefine \cs{@gls@field@link} so that commands like \cs{glsfirst} % can setup \cs{glsxtrifwasfirstuse} etc to allow the postlink hook @@ -5514,6 +6829,10 @@ Dickimaw Books\\ %Save local setting. % \begin{macrocode} \@gls@save@glslocal +% \end{macrocode} +%Initialise preunset, prereset and postunset +% \begin{macrocode} + \glsinitreunsets \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper \def\glscustomtext{#4}% \@glsxtr@field@linkdefs @@ -5536,6 +6855,7 @@ Dickimaw Books\\ % \begin{macrocode} \let\@glsxtr@org@gls@\@gls@ \def\@gls@#1#2{% + \def\glsxtrcurrentfield{}% \@glsxtr@record{#1}{#2}{glslink}% \@glsxtr@org@gls@{#1}{#2}% }% @@ -5548,6 +6868,7 @@ Dickimaw Books\\ % \begin{macrocode} \let\@glsxtr@org@glspl@\@glspl@ \def\@glspl@#1#2{% + \def\glsxtrcurrentfield{}% \@glsxtr@record{#1}{#2}{glslink}% \@glsxtr@org@glspl@{#1}{#2}% }% @@ -5560,6 +6881,7 @@ Dickimaw Books\\ % \begin{macrocode} \let\@glsxtr@org@Gls@\@Gls@ \def\@Gls@#1#2{% + \def\glsxtrcurrentfield{}% \@glsxtr@record{#1}{#2}{glslink}% \@glsxtr@org@Gls@{#1}{#2}% }% @@ -5572,6 +6894,7 @@ Dickimaw Books\\ % \begin{macrocode} \let\@glsxtr@org@Glspl@\@Glspl@ \def\@Glspl@#1#2{% + \def\glsxtrcurrentfield{}% \@glsxtr@record{#1}{#2}{glslink}% \@glsxtr@org@Glspl@{#1}{#2}% }% @@ -5584,6 +6907,7 @@ Dickimaw Books\\ % \begin{macrocode} \let\@glsxtr@org@GLS@\@GLS@ \def\@GLS@#1#2{% + \def\glsxtrcurrentfield{}% \@glsxtr@record{#1}{#2}{glslink}% \@glsxtr@org@GLS@{#1}{#2}% }% @@ -5597,6 +6921,7 @@ Dickimaw Books\\ % \begin{macrocode} \let\@glsxtr@org@GLSpl@\@GLSpl@ \def\@GLSpl@#1#2{% + \def\glsxtrcurrentfield{}% \@glsxtr@record{#1}{#2}{glslink}% \@glsxtr@org@GLSpl@{#1}{#2}% }% @@ -5611,12 +6936,13 @@ Dickimaw Books\\ %argument. % \begin{macrocode} \renewcommand*{\@glsdisp}[3][]{% + \def\glsxtrcurrentfield{}% \@glsxtr@record{#1}{#2}{glslink}% \glsdoifexists{#2}{% \let\do@gls@link@checkfirsthyper\@gls@link@checkfirsthyper \let\glsifplural\@secondoftwo \let\glscapscase\@firstofthree - \def\glscustomtext{#3}% + \def\glscustomtext{\glsxtrgenentrytextfmt{#3}}% \def\glsinsert{}% \def\@glo@text{\csname gls@\glstype @entryfmt\endcsname}% \@gls@link[#1]{#2}{\@glo@text}% @@ -5627,11 +6953,12 @@ Dickimaw Books\\ % \end{macrocode} %\end{macro} % -%\begin{macro}{\@gls@@link@} +%\begin{macro}{\@gls@@link} %\changes{1.08}{2016-12-13}{added \cs{@glsxtr@record}} %Redefine to include \cs{@glsxtr@record} % \begin{macrocode} \renewcommand*{\@gls@@link}[3][]{% + \def\glsxtrcurrentfield{}% \@glsxtr@record{#1}{#2}{glslink}% \glsdoifexistsordo{#2}% {% @@ -5641,8 +6968,9 @@ Dickimaw Books\\ % Post-link hook commands need initialising. % \begin{macrocode} \def\glscustomtext{#3}% + \def\glsinsert{}% \@glsxtr@field@linkdefs - \@gls@link[#1]{#2}{#3}% + \@gls@link[#1]{#2}{\glsxtrgenentrytextfmt{#3}}% }% {% \glstextformat{#3}% @@ -5678,7 +7006,128 @@ Dickimaw Books\\ % \end{macrocode} %\end{macro} % -% Define a \gloskey[glslink]{wrgloss} key to determine whether to +%\begin{macro}{\setupglslink} +%\changes{1.49}{2022-10-14}{new} +%Shortcut command to set glslink options. +% \begin{macrocode} +\newcommand*{\setupglslink}[1]{\setkeys{glslink}{#1}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\setupglsadd} +%\changes{1.49}{2022-10-14}{new} +%Shortcut command to set glsadd options. +% \begin{macrocode} +\newcommand*{\setupglsadd}[1]{\setkeys{glsadd}{#1}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@gls@do@glsprereset} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand*{\@gls@do@glsprereset}[1]{} +% \end{macrocode} +%\end{macro} +% +% \begin{macrocode} +\define@choicekey{glslink}{prereset}% +[\@glsxtr@preresetval\@glsxtr@preresetnr]% +{none,local,global}[local]% +{% + \ifcase\@glsxtr@preresetnr + \let\@gls@do@glsprereset\@gobble + \or + \def\@gls@do@glsprereset{% + \let\@gls@link@postkeys@checkfirsthyper\do@gls@link@checkfirsthyper + \let\glsxtrifwasfirstuse\@firstoftwo\glslocalreset}% + \or + \def\@gls@do@glsprereset{% + \let\@gls@link@postkeys@checkfirsthyper\do@gls@link@checkfirsthyper + \let\glsxtrifwasfirstuse\@firstoftwo\glsreset}% + \fi +} +% \end{macrocode} +% +%\begin{macro}{\@gls@do@glspreunset} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand*{\@gls@do@glspreunset}[1]{} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@gls@glslink@hyper@update@hook} +%\changes{1.49}{2022-10-14}{new} +%This hook was only introduced to \sty{glossaries} v4.50, so if +%isn't defined, need to patch the hyper key. +% \begin{macrocode} +\ifdef\@gls@glslink@hyper@update@hook +{% + \renewcommand*{\@gls@glslink@hyper@update@hook}{% + \let\@gls@if@glslink@hyper@updated\@firstoftwo + } +} +{ + \newcommand*{\@gls@glslink@hyper@update@hook}{% + \let\@gls@if@glslink@hyper@updated\@firstoftwo + } + \renewcommand*{\KV@glslink@hyper}[1]{% + \XKV@plfalse\XKV@sttrue + \XKV@checkchoice[\XKV@resa ]{#1}{true,false}% + {\csname KV@glslink@hyper\XKV@resa\endcsname\@gls@glslink@hyper@update@hook}% + } +} +% \end{macrocode} +%\end{macro} +% +% \begin{macrocode} +\define@choicekey{glslink}{preunset}% +[\@glsxtr@preunsetval\@glsxtr@preunsetnr]% +{none,local,global}[local]% +{% + \ifcase\@glsxtr@preunsetnr + \let\@gls@do@glspreunset\@gobble + \or + \def\@gls@do@glspreunset{% + \let\@gls@link@postkeys@checkfirsthyper\do@gls@link@checkfirsthyper + \let\glsxtrifwasfirstuse\@secondoftwo\glslocalunset}% + \or + \def\@gls@do@glspreunset{% + \let\@gls@link@postkeys@checkfirsthyper\do@gls@link@checkfirsthyper + \let\glsxtrifwasfirstuse\@secondoftwo\glsunset}% + \fi +} +% \end{macrocode} +% +% \begin{macrocode} +\define@choicekey{glslink}{postunset}% +[\@glsxtr@postunsetval\@glsxtr@postunsetnr]% +{none,local,global}[global]% +{% + \ifcase\@glsxtr@postunsetnr + \let\@gls@restore@glslocal\@gls@ignore@restore@glslocal + \or + \let\@gls@restore@glslocal\@gls@default@restore@glslocal + \KV@glslink@localtrue + \or + \let\@gls@restore@glslocal\@gls@default@restore@glslocal + \KV@glslink@localfalse + \fi +} +% \end{macrocode} +% +%\begin{macro}{\glsinitreunsets} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand*{\glsinitreunsets}{% + \let\@gls@do@glspreunset\@gobble + \let\@gls@do@glsprereset\@gobble + \let\@gls@restore@glslocal\@gls@default@restore@glslocal + \@glsxtrbuffer@check@repeats +} +% \end{macrocode} +%\end{macro} +% +% Define \gloskey[glslink]{wrgloss} key to determine whether to % write the glossary information before or after the link text. % \begin{macrocode} \define@choicekey{glslink}{wrgloss}% @@ -5713,6 +7162,29 @@ Dickimaw Books\\ % %\end{macro} % +%\begin{macro}{\@glsxtr@current@textformat@csname} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand*{\@glsxtr@current@textformat@csname}{glstextformat} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsxtr@current@innertextformat@csname} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand*{\@glsxtr@current@innertextformat@csname}{glsxtrdefaultentrytextfmt} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrassignlinktextfmt} +%\changes{1.49}{2022-10-14}{new} +%Used to assign \cs{glstextformat} and \cs{glsxtrgenentrytextfmt} +%in the post-link hook for \qt{postfootnote} abbreviation styles. +% \begin{macrocode} +\newcommand*{\glsxtrassignlinktextfmt}{} +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\@glsxtr@local@textformat} %\changes{1.30}{2018-04-25}{new} %Provide a key to locally change the text format. @@ -5721,6 +7193,24 @@ Dickimaw Books\\ \ifcsdef{#1} {% \letcs{\@glsxtr@local@textformat}{#1}% + \def\@glsxtr@current@textformat@csname{#1}% + }% + {% + \PackageError{glossaries-extra}{Unknown control sequence name `#1'}{}% + }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsxtr@local@innertextformat} +%\changes{1.49}{2022-10-14}{new} +%Provide a key to locally change the inner text format. +% \begin{macrocode} +\define@key{glslink}{innertextformat}{% + \ifcsdef{#1} + {% + \letcs{\@glsxtr@local@innertextformat}{#1}% + \def\@glsxtr@current@innertextformat@csname{#1}% }% {% \PackageError{glossaries-extra}{Unknown control sequence name `#1'}{}% @@ -5832,13 +7322,31 @@ Dickimaw Books\\ % %\begin{macro}{\glslinkwrcontent} %\changes{1.48}{2021-11-22}{new} -%This may resolve \href{https://www.dickimaw-books.com/bugtracker.php?key=189}{issue \#189} -%but it may have unexpected consequences. This is currently provided -%as a trial. If it causes a problem then redefine without the -%grouping. If no issues are reported it will be added to the base -%package. +%\changes{1.49}{2022-10-14}{removed grouping} +%This was defined to add grouping to resolve \href{https://www.dickimaw-books.com/bugtracker.php?key=189}{issue \#189} +%but had unexpected consequences +%(\href{https://www.dickimaw-books.com/bugtracker.php?key=194}{issue +%\#194}) so the grouping has been removed and transferred to +%\cs{glsencapwrcontent}. % \begin{macrocode} -\providecommand*{\glslinkwrcontent}[1]{{#1}} +\providecommand*{\glslinkwrcontent}[1]{#1} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glslink@prefix@label} +%\changes{1.49}{2022-10-14}{new} +% Hyperlink using current prefix and label. +% \begin{macrocode} +\newcommand*{\@glslink@prefix@label}[1]{% + \@glslink{\glolinkprefix\glslabel}{#1}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@noglslink@prefix@label} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand*{\@noglslink@prefix@label}[1]{% + \glsdonohyperlink{\glolinkprefix\glslabel}{#1}} % \end{macrocode} %\end{macro} % @@ -5867,6 +7375,10 @@ Dickimaw Books\\ % \begin{macrocode} \@gls@save@glslocal % \end{macrocode} +%Initialise preunset, prereset and postunset +% \begin{macrocode} + \glsinitreunsets +% \end{macrocode} %Save current value of \cs{glolinkprefix}: % \begin{macrocode} \let\@glsxtr@org@glolinkprefix\glolinkprefix @@ -5874,6 +7386,12 @@ Dickimaw Books\\ %Initialise \cs{@glsxtr@local@textformat} % \begin{macrocode} \let\@glsxtr@local@textformat\relax + \def\@glsxtr@current@textformat@csname{glstextformat}% +% \end{macrocode} +%Initialise inner text format (1.49): +% \begin{macrocode} + \let\@glsxtr@local@innertextformat\glsxtrdefaultentrytextfmt + \def\@glsxtr@current@innertextformat@csname{glsxtrdefaultentrytextfmt}% % \end{macrocode} % Initialise thevalue and theHvalue (v1.19). % \begin{macrocode} @@ -5909,6 +7427,11 @@ Dickimaw Books\\ \do@glsdisablehyperinlist \do@gls@link@checkfirsthyper % \end{macrocode} +% Provide way of finding if hyper key has been explicitly set. +% \begin{macrocode} + \let\@gls@if@glslink@hyper@updated\@secondoftwo + \let\@gls@link@postkeys@checkfirsthyper\relax +% \end{macrocode} %User hook before options are set (new to v1.26): % \begin{macrocode} \glslinkpresetkeys @@ -5925,6 +7448,20 @@ Dickimaw Books\\ % \begin{macrocode} \glslinkpostsetkeys % \end{macrocode} +%Reset/unset if required: +% \begin{macrocode} + \@gls@do@glsprereset{#2}% + \@gls@do@glspreunset{#2}% +% \end{macrocode} +% If the hyper setting hasn't changed, and reset/unset option has +% been used, need to perform another check. +% \begin{macrocode} + \@gls@if@glslink@hyper@updated{}{\@gls@link@postkeys@checkfirsthyper}% +% \end{macrocode} +%Set inner text format (1.49): +% \begin{macrocode} + \let\glsxtrgenentrytextfmt\@glsxtr@local@innertextformat +% \end{macrocode} % Check \gloskey[glslink]{thevalue} and \gloskey[glslink]{theHvalue} % before saving (v1.19). % \begin{macrocode} @@ -5951,6 +7488,7 @@ Dickimaw Books\\ \ifcsdef{\@glsxtr@attrval}% {% \letcs{\@glsxtr@textformat}{\@glsxtr@attrval}% + \let\@glsxtr@current@textformat@csname\@glsxtr@attrval }% {% \GlossariesExtraWarning{Unknown control sequence name @@ -5966,6 +7504,15 @@ Dickimaw Books\\ \let\@glsxtr@textformat\@glsxtr@local@textformat \fi % \end{macrocode} +%Setup formatting assignments for use in post-link hook. +% \begin{macrocode} + \edef\glsxtrassignlinktextfmt{% + \noexpand\def\noexpand\glslabel{\expandonce\glslabel}% + \noexpand\letcs\noexpand\glstextformat{\@glsxtr@current@textformat@csname}% + \noexpand\letcs\noexpand\glsxtrgenentrytextfmt + {\@glsxtr@current@innertextformat@csname}% + }% +% \end{macrocode} % Encapsulate link text and indexing. % \begin{macrocode} \glslinkwrcontent @@ -5974,22 +7521,22 @@ Dickimaw Books\\ % Do write if it should occur before the link text: % \begin{macrocode} \ifglsxtrinitwrglossbefore - \@do@wrglossary{#2}% + \glsxtr@wrglossary@encap{#2}{\@do@wrglossary{#2}}% \fi % \end{macrocode} % Do the link text: % \begin{macrocode} \ifKV@glslink@hyper \ifglsxtr@hyperoutside - \@glslink{\glolinkprefix\glslabel}{\@glsxtr@textformat{#3}}% + \@glslink@prefix@label{\@glsxtr@textformat{#3}}% \else - \@glsxtr@textformat{\@glslink{\glolinkprefix\glslabel}{#3}}% + \@glsxtr@textformat{\@glslink@prefix@label{#3}}% \fi \else \ifglsxtr@hyperoutside - \glsdonohyperlink{\glolinkprefix\glslabel}{\@glsxtr@textformat{#3}}% + \@noglslink@prefix@label{\@glsxtr@textformat{#3}}% \else - \@glsxtr@textformat{\glsdonohyperlink{\glolinkprefix\glslabel}{#3}}% + \@glsxtr@textformat{\@noglslink@prefix@label{#3}}% \fi \fi % \end{macrocode} @@ -5997,7 +7544,7 @@ Dickimaw Books\\ % \begin{macrocode} \ifglsxtrinitwrglossbefore \else - \@do@wrglossary{#2}% + \glsxtr@wrglossary@encap{#2}{\@do@wrglossary{#2}}% \fi }% % \end{macrocode} @@ -6091,7 +7638,7 @@ Dickimaw Books\\ %\changes{1.37}{2018-11-30}{ensure that \cs{glsadd} performs indexing} % \begin{macrocode} \KV@glslink@noindexfalse - \@@do@wrglossary{#2}% + \glsxtr@wrglossary@encap{#2}{\@@do@wrglossary{#2}}% }% \endgroup }% @@ -6111,14 +7658,17 @@ Dickimaw Books\\ %\end{macro} % %\begin{macro}{\@glsxtr@field@linkdefs} -% Default settings for \cs{@gls@field@link} +% Default settings for \cs{@gls@field@link}. %\changes{0.3}{2015-12-02}{new} +%\changes{1.49}{2022-10-14}{removed \cs{glsinsert}} +%Note that from v1.49, \cs{glsinsert} is set with +%\cs{glsxtrsaveinsert}. % \begin{macrocode} \newcommand*{\@glsxtr@field@linkdefs}{% + \let\glsxtrifwasglslike\@secondoftwo \let\glsxtrifwasfirstuse\@secondoftwo \let\glsifplural\@secondoftwo \let\glscapscase\@firstofthree - \let\glsinsert\@empty } % \end{macrocode} %\end{macro} @@ -6153,14 +7703,51 @@ Dickimaw Books\\ % \end{macrocode} %\end{macro} % +%\begin{macro}{\glsxtrsaveinsert} +%\changes{1.49}{2022-10-14}{new} +%\begin{definition} +%\cs{glsxtrsaveinsert}\marg{entry-label}\marg{insert} +%\end{definition} +%The insert argument isn't saved in \cs{glsinsert} for the +%\cs{glslike} commands, but provide a way to save it if it is +%required for the post-link hook. The default is to set +%\cs{glsinsert} to empty. This means that the insert won't appear in +%the post-link hook with commands like \cs{glsxtrfull} for the +%hyphen abbreviation styles. The entry label is provided in case the +%insert should only be saved for certain entries, such as those with +%a particular category. +% \begin{macrocode} +\newcommand*{\glsxtrsaveinsert}[2]{\def\glsinsert{}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrfullsaveinsert} +%\changes{1.49}{2022-10-14}{new} +%As above but specifically for commands like \cs{glsxtrfull} +% \begin{macrocode} +\newcommand*{\glsxtrfullsaveinsert}{\glsxtrsaveinsert} +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\@glstext@} %\changes{0.5.2}{2015-12-08}{added accessibility support} %\changes{1.04}{2016-05-02}{set abbreviation and regular format} % The abbreviation format may also need setting. % \begin{macrocode} \def\@glstext@#1#2[#3]{% + \def\glsxtrcurrentfield{text}% \glsxtrassignfieldfont{#2}% - \@gls@field@link{#1}{#2}{\@gls@field@font{\glsaccesstext{#2}#3}}% + \glsxtrsaveinsert{#2}{#3}% + \@gls@field@link{#1}{#2}% + {% + \glsifapplyinnerfmtfield{#2}{text}% + {% + \@gls@field@font{\glsaccessfmttext{#3}{\glsxtrgenentrytextfmt}{#2}}% + }% + {% + \@gls@field@font{\glsaccesstext{#2}\glsxtrgenentrytextfmt{#3}}% + }% + }% } % \end{macrocode} %\end{macro} @@ -6173,9 +7760,24 @@ Dickimaw Books\\ % The abbreviation format may also need setting. % \begin{macrocode} \def\@GLStext@#1#2[#3]{% + \def\glsxtrcurrentfield{text}% \glsxtrassignfieldfont{#2}% + \glsxtrsaveinsert{#2}{#3}% \@gls@field@link[\let\glscapscase\@thirdofthree]{#1}{#2}% - {\@gls@field@font{\GLSaccesstext{#2}\mfirstucMakeUppercase{#3}}}% + {% + \glsifapplyinnerfmtfield{#2}{text}% + {% + \@gls@field@font{\GLSaccessfmttext{#3}{\glsxtrgenentrytextfmt}{#2}}% + }% + {% + \ifx\glscapscase\@thirdofthree + \@gls@field@font{\GLSaccesstext{#2}% + \glsuppercase{\glsxtrgenentrytextfmt{#3}}}% + \else + \@gls@field@font{\glsaccesstext{#2}\glsxtrgenentrytextfmt{#3}}% + \fi + }% + }% } % \end{macrocode} %\end{macro} @@ -6188,9 +7790,19 @@ Dickimaw Books\\ % The abbreviation format may also need setting. % \begin{macrocode} \def\@Glstext@#1#2[#3]{% + \def\glsxtrcurrentfield{text}% \glsxtrassignfieldfont{#2}% + \glsxtrsaveinsert{#2}{#3}% \@gls@field@link[\let\glscapscase\@secondofthree]{#1}{#2}% - {\@gls@field@font{\Glsaccesstext{#2}#3}}% + {% + \glsifapplyinnerfmtfield{#2}{text}% + {% + \@gls@field@font{\Glsaccessfmttext{#3}{\glsxtrgenentrytextfmt}{#2}}% + }% + {% + \@gls@field@font{\Glsaccesstext{#2}\glsxtrgenentrytextfmt{#3}}% + }% + }% } % \end{macrocode} %\end{macro} @@ -6215,16 +7827,27 @@ Dickimaw Books\\ % The abbreviation format may also need setting. % \begin{macrocode} \def\@glsfirst@#1#2[#3]{% + \def\glsxtrcurrentfield{first}% \glsxtrassignfieldfont{#2}% % \end{macrocode} % Ensure that \cs{glsfirst} honours the \catattr{nohyperfirst} attribute. %\changes{1.07}{2016-08-15}{added check for nohyperfirst attribute} % \begin{macrocode} + \glsxtrsaveinsert{#2}{#3}% \@gls@field@link [\let\glsxtrifwasfirstuse\@firstoftwo \glsxtrchecknohyperfirst{#2}% + \glsxtr@check@complexstyle{#2}{#3}% ]{#1}{#2}% - {\@gls@field@font{\glsaccessfirst{#2}#3}}% + {% + \glsifapplyinnerfmtfield{#2}{first}% + {% + \@gls@field@font{\glsaccessfmtfirst{#3}{\glsxtrgenentrytextfmt}{#2}}% + }% + {% + \@gls@field@font{\glsaccessfirst{#2}\glsxtrgenentrytextfmt{#3}}% + }% + }% } % \end{macrocode} %\end{macro} @@ -6237,17 +7860,29 @@ Dickimaw Books\\ % The abbreviation format may also need setting. % \begin{macrocode} \def\@Glsfirst@#1#2[#3]{% + \def\glsxtrcurrentfield{first}% \glsxtrassignfieldfont{#2}% % \end{macrocode} % Ensure that \cs{Glsfirst} honours the \catattr{nohyperfirst} attribute. %\changes{1.07}{2016-08-15}{added check for nohyperfirst attribute} % \begin{macrocode} + \glsxtrsaveinsert{#2}{#3}% \@gls@field@link [\let\glsxtrifwasfirstuse\@firstoftwo \let\glscapscase\@secondofthree \glsxtrchecknohyperfirst{#2}% + \glsxtr@check@complexstyle{#2}{#3}% ]% - {#1}{#2}{\@gls@field@font{\Glsaccessfirst{#2}#3}}% + {#1}{#2}% + {% + \glsifapplyinnerfmtfield{#2}{first}% + {% + \@gls@field@font{\Glsaccessfmtfirst{#3}{\glsxtrgenentrytextfmt}{#2}}% + }% + {% + \@gls@field@font{\Glsaccessfirst{#2}\glsxtrgenentrytextfmt{#3}}% + }% + }% } % \end{macrocode} %\end{macro} @@ -6260,17 +7895,40 @@ Dickimaw Books\\ % The abbreviation format may also need setting. % \begin{macrocode} \def\@GLSfirst@#1#2[#3]{% + \def\glsxtrcurrentfield{first}% \glsxtrassignfieldfont{#2}% % \end{macrocode} % Ensure that \cs{GLSfirst} honours the \catattr{nohyperfirst} attribute. %\changes{1.07}{2016-08-15}{added check for nohyperfirst attribute} % \begin{macrocode} + \glsxtrsaveinsert{#2}{#3}% \@gls@field@link [\let\glsxtrifwasfirstuse\@firstoftwo \let\glscapscase\@thirdofthree \glsxtrchecknohyperfirst{#2}% + \glsxtr@check@complexstyle{#2}{#3}% ]% - {#1}{#2}{\@gls@field@font{\GLSaccessfirst{#2}\mfirstucMakeUppercase{#3}}}% + {#1}{#2}% + {% + \ifx\glscapscase\@thirdofthree + \glsifapplyinnerfmtfield{#2}{first}% + {% + \@gls@field@font{\GLSaccessfmtfirst{#3}{\glsxtrgenentrytextfmt}{#2}}% + }% + {% + \@gls@field@font{\GLSaccessfirst{#2}% + \glsuppercase{\glsxtrgenentrytextfmt{#3}}}% + }% + \else + \glsifapplyinnerfmtfield{#2}{first}% + {% + \@gls@field@font{\glsaccessfmtfirst{#3}{\glsxtrgenentrytextfmt}{#2}}% + }% + {% + \@gls@field@font{\glsaccessfirst{#2}\glsxtrgenentrytextfmt{#3}}% + }% + \fi + }% } % \end{macrocode} %\end{macro} @@ -6285,9 +7943,22 @@ Dickimaw Books\\ % The abbreviation format may also need setting. % \begin{macrocode} \def\@glsplural@#1#2[#3]{% + \def\glsxtrcurrentfield{text}% \glsxtrassignfieldfont{#2}% - \@gls@field@link[\let\glsifplural\@firstoftwo]{#1}{#2}% - {\@gls@field@font{\glsaccessplural{#2}#3}}% + \glsxtrsaveinsert{#2}{#3}% + \@gls@field@link + [\let\glsifplural\@firstoftwo + \glsxtr@check@complexstyle{#2}{#3}% + ]{#1}{#2}% + {% + \glsifapplyinnerfmtfield{#2}{plural}% + {% + \@gls@field@font{\glsaccessfmtplural{#3}{\glsxtrgenentrytextfmt}{#2}}% + }% + {% + \@gls@field@font{\glsaccessplural{#2}\glsxtrgenentrytextfmt{#3}}% + }% + }% } % \end{macrocode} %\end{macro} @@ -6302,12 +7973,24 @@ Dickimaw Books\\ % The abbreviation format may also need setting. % \begin{macrocode} \def\@Glsplural@#1#2[#3]{% + \def\glsxtrcurrentfield{text}% \glsxtrassignfieldfont{#2}% + \glsxtrsaveinsert{#2}{#3}% \@gls@field@link [\let\glsifplural\@firstoftwo \let\glscapscase\@secondofthree + \glsxtr@check@complexstyle{#2}{#3}% ]% - {#1}{#2}{\@gls@field@font{\Glsaccessplural{#2}#3}}% + {#1}{#2}% + {% + \glsifapplyinnerfmtfield{#2}{plural}% + {% + \@gls@field@font{\Glsaccessfmtplural{#3}{\glsxtrgenentrytextfmt}{#2}}% + }% + {% + \@gls@field@font{\Glsaccessplural{#2}\glsxtrgenentrytextfmt{#3}}% + }% + }% } % \end{macrocode} %\end{macro} @@ -6322,12 +8005,35 @@ Dickimaw Books\\ % The abbreviation format may also need setting. % \begin{macrocode} \def\@GLSplural@#1#2[#3]{% + \def\glsxtrcurrentfield{text}% \glsxtrassignfieldfont{#2}% + \glsxtrsaveinsert{#2}{#3}% \@gls@field@link [\let\glsifplural\@firstoftwo \let\glscapscase\@thirdofthree + \glsxtr@check@complexstyle{#2}{#3}% ]% - {#1}{#2}{\@gls@field@font{\GLSaccessplural{#2}\mfirstucMakeUppercase{#3}}}% + {#1}{#2}% + {% + \ifx\glscapscase\@thirdofthree + \glsifapplyinnerfmtfield{#2}{plural}% + {% + \@gls@field@font{\GLSaccessfmtplural{#3}{\glsxtrgenentrytextfmt}{#2}}% + }% + {% + \@gls@field@font{\GLSaccessplural{#2}% + \glsuppercase{\glsxtrgenentrytextfmt{#3}}}% + }% + \else + \glsifapplyinnerfmtfield{#2}{plural}% + {% + \@gls@field@font{\glsaccessfmtplural{#3}{\glsxtrgenentrytextfmt}{#2}}% + }% + {% + \@gls@field@font{\glsaccessplural{#2}\glsxtrgenentrytextfmt{#3}}% + }% + \fi + }% } % \end{macrocode} %\end{macro} @@ -6340,17 +8046,29 @@ Dickimaw Books\\ % The abbreviation format may also need setting. % \begin{macrocode} \def\@glsfirstplural@#1#2[#3]{% + \def\glsxtrcurrentfield{first}% \glsxtrassignfieldfont{#2}% % \end{macrocode} % Ensure that \cs{glsfirstplural} honours the \catattr{nohyperfirst} attribute. %\changes{1.07}{2016-08-15}{added check for nohyperfirst attribute} % \begin{macrocode} + \glsxtrsaveinsert{#2}{#3}% \@gls@field@link [\let\glsxtrifwasfirstuse\@firstoftwo \let\glsifplural\@firstoftwo \glsxtrchecknohyperfirst{#2}% + \glsxtr@check@complexstyle{#2}{#3}% ]% - {#1}{#2}{\@gls@field@font{\glsaccessfirstplural{#2}#3}}% + {#1}{#2}% + {% + \glsifapplyinnerfmtfield{#2}{firstpl}% + {% + \@gls@field@font{\glsaccessfmtfirstplural{#3}{\glsxtrgenentrytextfmt}{#2}}% + }% + {% + \@gls@field@font{\glsaccessfirstplural{#2}\glsxtrgenentrytextfmt{#3}}% + }% + }% } % \end{macrocode} %\end{macro} @@ -6364,18 +8082,30 @@ Dickimaw Books\\ % The abbreviation format may also need setting. % \begin{macrocode} \def\@Glsfirstplural@#1#2[#3]{% + \def\glsxtrcurrentfield{first}% \glsxtrassignfieldfont{#2}% % \end{macrocode} % Ensure that \cs{glsfirstplural} honours the \catattr{nohyperfirst} attribute. %\changes{1.07}{2016-08-15}{added check for nohyperfirst attribute} % \begin{macrocode} + \glsxtrsaveinsert{#2}{#3}% \@gls@field@link [\let\glsxtrifwasfirstuse\@firstoftwo \let\glsifplural\@firstoftwo \let\glscapscase\@secondofthree \glsxtrchecknohyperfirst{#2}% + \glsxtr@check@complexstyle{#2}{#3}% ]% - {#1}{#2}{\@gls@field@font{\Glsaccessfirstplural{#2}#3}}% + {#1}{#2}% + {% + \glsifapplyinnerfmtfield{#2}{firstpl}% + {% + \@gls@field@font{\Glsaccessfmtfirstplural{#3}{\glsxtrgenentrytextfmt}{#2}}% + }% + {% + \@gls@field@font{\Glsaccessfirstplural{#2}\glsxtrgenentrytextfmt{#3}}% + }% + }% } % \end{macrocode} %\end{macro} @@ -6389,19 +8119,41 @@ Dickimaw Books\\ % The abbreviation format may also need setting. % \begin{macrocode} \def\@GLSfirstplural@#1#2[#3]{% + \def\glsxtrcurrentfield{first}% \glsxtrassignfieldfont{#2}% % \end{macrocode} % Ensure that \cs{glsfirstplural} honours the \catattr{nohyperfirst} attribute. %\changes{1.07}{2016-08-15}{added check for nohyperfirst attribute} % \begin{macrocode} + \glsxtrsaveinsert{#2}{#3}% \@gls@field@link [\let\glsxtrifwasfirstuse\@firstoftwo \let\glsifplural\@firstoftwo \let\glscapscase\@thirdofthree \glsxtrchecknohyperfirst{#2}% + \glsxtr@check@complexstyle{#2}{#3}% ]% - {#1}{#2}% - {\@gls@field@font{\GLSaccessfirstplural{#2}\mfirstucMakeUppercase{#3}}}% + {#1}{#2}% + {% + \ifx\glscapscase\@thirdofthree + \glsifapplyinnerfmtfield{#2}{firstpl}% + {% + \@gls@field@font{\GLSaccessfmtfirstplural{#3}{\glsxtrgenentrytextfmt}{#2}}% + }% + {% + \@gls@field@font{\GLSaccessfirstplural{#2}% + \glsuppercase{\glsxtrgenentrytextfmt{#3}}}% + }% + \else + \glsifapplyinnerfmtfield{#2}{firstpl}% + {% + \@gls@field@font{\glsaccessfmtfirstplural{#3}{\glsxtrgenentrytextfmt}{#2}}% + }% + {% + \@gls@field@font{\glsaccessfirstplural{#2}\glsxtrgenentrytextfmt{#3}}% + }% + \fi + }% } % \end{macrocode} %\end{macro} @@ -6413,8 +8165,19 @@ Dickimaw Books\\ % The abbreviation format may also need setting. % \begin{macrocode} \def\@glsname@#1#2[#3]{% + \def\glsxtrcurrentfield{name}% \glsxtrassignfieldfont{#2}% - \@gls@field@link{#1}{#2}{\@gls@field@font{\glsaccessname{#2}#3}}% + \glsxtrsaveinsert{#2}{#3}% + \@gls@field@link{#1}{#2}% + {% + \glsifapplyinnerfmtfield{#2}{name}% + {% + \@gls@field@font{\glsaccessfmtname{#3}{\glsxtrgenentrytextfmt}{#2}}% + }% + {% + \@gls@field@font{\glsaccessname{#2}\glsxtrgenentrytextfmt{#3}}% + }% + }% } % \end{macrocode} %\end{macro} @@ -6427,10 +8190,20 @@ Dickimaw Books\\ % The abbreviation format may also need setting. % \begin{macrocode} \def\@Glsname@#1#2[#3]{% + \def\glsxtrcurrentfield{name}% \glsxtrassignfieldfont{#2}% + \glsxtrsaveinsert{#2}{#3}% \@gls@field@link - [\let\glscapscase\@secondoftwo]{#1}{#2}% - {\@gls@field@font{\Glsaccessname{#2}#3}}% + [\let\glscapscase\@secondofthree]{#1}{#2}% + {% + \glsifapplyinnerfmtfield{#2}{name}% + {% + \@gls@field@font{\Glsaccessfmtname{#3}{\glsxtrgenentrytextfmt}{#2}}% + }% + {% + \@gls@field@font{\Glsaccessname{#2}\glsxtrgenentrytextfmt{#3}}% + }% + }% } % \end{macrocode} %\end{macro} @@ -6443,10 +8216,21 @@ Dickimaw Books\\ % The abbreviation format may also need setting. % \begin{macrocode} \def\@GLSname@#1#2[#3]{% + \def\glsxtrcurrentfield{name}% \glsxtrassignfieldfont{#2}% - \@gls@field@link[\let\glscapscase\@thirdoftwo]% - {#1}{#2}% - {\@gls@field@font{\GLSaccessname{#2}\mfirstucMakeUppercase{#3}}}% + \glsxtrsaveinsert{#2}{#3}% + \@gls@field@link[\let\glscapscase\@thirdofthree]% + {#1}{#2}% + {% + \glsifapplyinnerfmtfield{#2}{name}% + {% + \@gls@field@font{\GLSaccessfmtname{#3}{\glsxtrgenentrytextfmt}{#2}}% + }% + {% + \@gls@field@font{\GLSaccessname{#2}% + \glsuppercase{\glsxtrgenentrytextfmt{#3}}}% + }% + }% } % \end{macrocode} %\end{macro} @@ -6456,8 +8240,19 @@ Dickimaw Books\\ %\changes{1.04}{2016-05-02}{set abbreviation and regular format} % \begin{macrocode} \def\@glsdesc@#1#2[#3]{% + \def\glsxtrcurrentfield{description}% \glsxtrassignfieldfont{#2}% - \@gls@field@link{#1}{#2}{\@gls@field@font{\glsaccessdesc{#2}#3}}% + \glsxtrsaveinsert{#2}{#3}% + \@gls@field@link{#1}{#2}% + {% + \glsifapplyinnerfmtfield{#2}{desc}% + {% + \@gls@field@font{\glsaccessfmtdesc{#3}{\glsxtrgenentrytextfmt}{#2}}% + }% + {% + \@gls@field@font{\glsaccessdesc{#2}\glsxtrgenentrytextfmt{#3}}% + }% + }% } % \end{macrocode} %\end{macro} @@ -6469,10 +8264,20 @@ Dickimaw Books\\ %\changes{1.04}{2016-05-02}{set abbreviation and regular format} % \begin{macrocode} \def\@Glsdesc@#1#2[#3]{% + \def\glsxtrcurrentfield{description}% \glsxtrassignfieldfont{#2}% + \glsxtrsaveinsert{#2}{#3}% \@gls@field@link - [\let\glscapscase\@secondoftwo]{#1}{#2}% - {\@gls@field@font{\Glsaccessdesc{#2}#3}}% + [\let\glscapscase\@secondofthree]{#1}{#2}% + {% + \glsifapplyinnerfmtfield{#2}{desc}% + {% + \@gls@field@font{\Glsaccessfmtdesc{#3}{\glsxtrgenentrytextfmt}{#2}}% + }% + {% + \@gls@field@font{\Glsaccessdesc{#2}\glsxtrgenentrytextfmt{#3}}% + }% + }% } % \end{macrocode} %\end{macro} @@ -6484,9 +8289,21 @@ Dickimaw Books\\ %\changes{1.04}{2016-05-02}{set abbreviation and regular format} % \begin{macrocode} \def\@GLSdesc@#1#2[#3]{% + \def\glsxtrcurrentfield{description}% \glsxtrassignfieldfont{#2}% - \@gls@field@link[\let\glscapscase\@thirdoftwo]% - {#1}{#2}{\@gls@field@font{\GLSaccessdesc{#2}\mfirstucMakeUppercase{#3}}}% + \glsxtrsaveinsert{#2}{#3}% + \@gls@field@link[\let\glscapscase\@thirdofthree]% + {#1}{#2}% + {% + \glsifapplyinnerfmtfield{#2}{desc}% + {% + \@gls@field@font{\GLSaccessfmtdesc{#3}{\glsxtrgenentrytextfmt}{#2}}% + }% + {% + \@gls@field@font{\GLSaccessdesc{#2}% + \glsuppercase{\glsxtrgenentrytextfmt{#3}}}% + }% + }% } % \end{macrocode} %\end{macro} @@ -6498,11 +8315,22 @@ Dickimaw Books\\ %\changes{1.04}{2016-05-02}{set abbreviation and regular format} % \begin{macrocode} \def\@glsdescplural@#1#2[#3]{% + \def\glsxtrcurrentfield{description}% \glsxtrassignfieldfont{#2}% + \glsxtrsaveinsert{#2}{#3}% \@gls@field@link - [\let\glscapscase\@secondoftwo + [\let\glscapscase\@secondofthree \let\glsifplural\@firstoftwo - ]{#1}{#2}{\@gls@field@font{\glsaccessdescplural{#2}#3}}% + ]{#1}{#2}% + {% + \glsifapplyinnerfmtfield{#2}{descplural}% + {% + \@gls@field@font{\glsaccessfmtdescpl{#3}{\glsxtrgenentrytextfmt}{#2}}% + }% + {% + \@gls@field@font{\glsaccessdescplural{#2}\glsxtrgenentrytextfmt{#3}}% + }% + }% } % \end{macrocode} %\end{macro} @@ -6514,11 +8342,22 @@ Dickimaw Books\\ %\changes{1.04}{2016-05-02}{set abbreviation and regular format} % \begin{macrocode} \def\@Glsdescplural@#1#2[#3]{% + \def\glsxtrcurrentfield{description}% \glsxtrassignfieldfont{#2}% + \glsxtrsaveinsert{#2}{#3}% \@gls@field@link - [\let\glscapscase\@secondoftwo + [\let\glscapscase\@secondofthree \let\glsifplural\@firstoftwo - ]{#1}{#2}{\@gls@field@font{\Glsaccessdescplural{#2}#3}}% + ]{#1}{#2}% + {% + \glsifapplyinnerfmtfield{#2}{descplural}% + {% + \@gls@field@font{\Glsaccessfmtdescpl{#3}{\glsxtrgenentrytextfmt}{#2}}% + }% + {% + \@gls@field@font{\Glsaccessdescplural{#2}#3}% + }% + }% } % \end{macrocode} %\end{macro} @@ -6529,14 +8368,25 @@ Dickimaw Books\\ %\changes{0.5.2}{2015-12-08}{added accessibility support} %\changes{1.04}{2016-05-02}{set abbreviation and regular format} % \begin{macrocode} -\def\@GLSdesc@#1#2[#3]{% +\def\@GLSdescplural@#1#2[#3]{% + \def\glsxtrcurrentfield{description}% \glsxtrassignfieldfont{#2}% + \glsxtrsaveinsert{#2}{#3}% \@gls@field@link - [\let\glscapscase\@thirdoftwo + [\let\glscapscase\@thirdofthree \let\glsifplural\@firstoftwo ]% - {#1}{#2}% - {\@gls@field@font{\GLSaccessdescplural{#2}\mfirstucMakeUppercase{#3}}}% + {#1}{#2}% + {% + \glsifapplyinnerfmtfield{#2}{descplural}% + {% + \@gls@field@font{\GLSaccessfmtdescplural{#3}{\glsxtrgenentrytextfmt}{#2}}% + }% + {% + \@gls@field@font{\GLSaccessdescplural{#2}% + \glsuppercase{\glsxtrgenentrytextfmt{#3}}}% + }% + }% } % \end{macrocode} %\end{macro} @@ -6546,8 +8396,19 @@ Dickimaw Books\\ %\changes{1.04}{2016-05-02}{set regular format} % \begin{macrocode} \def\@glssymbol@#1#2[#3]{% + \def\glsxtrcurrentfield{symbol}% \glsxtrassignfieldfont{#2}% - \@gls@field@link{#1}{#2}{\@gls@field@font{\glsaccesssymbol{#2}#3}}% + \glsxtrsaveinsert{#2}{#3}% + \@gls@field@link{#1}{#2}% + {% + \glsifapplyinnerfmtfield{#2}{symbol}% + {% + \@gls@field@font{\glsaccessfmtsymbol{#3}{\glsxtrgenentrytextfmt}{#2}}% + }% + {% + \@gls@field@font{\glsaccesssymbol{#2}\glsxtrgenentrytextfmt{#3}}% + }% + }% } % \end{macrocode} %\end{macro} @@ -6559,10 +8420,21 @@ Dickimaw Books\\ %\changes{1.04}{2016-05-02}{set regular format} % \begin{macrocode} \def\@Glssymbol@#1#2[#3]{% + \def\glsxtrcurrentfield{symbol}% \glsxtrassignfieldfont{#2}% + \glsxtrsaveinsert{#2}{#3}% \@gls@field@link - [\let\glscapscase\@secondoftwo]% - {#1}{#2}{\@gls@field@font{\Glsaccesssymbol{#2}#3}}% + [\let\glscapscase\@secondofthree]% + {#1}{#2}% + {% + \glsifapplyinnerfmtfield{#2}{symbol}% + {% + \@gls@field@font{\Glsaccessfmtsymbol{#3}{\glsxtrgenentrytextfmt}{#2}}% + }% + {% + \@gls@field@font{\Glsaccesssymbol{#2}\glsxtrgenentrytextfmt{#3}}% + }% + }% } % \end{macrocode} %\end{macro} @@ -6574,9 +8446,21 @@ Dickimaw Books\\ %\changes{1.04}{2016-05-02}{set regular format} % \begin{macrocode} \def\@GLSsymbol@#1#2[#3]{% + \def\glsxtrcurrentfield{symbol}% \glsxtrassignfieldfont{#2}% - \@gls@field@link[\let\glscapscase\@thirdoftwo]% - {#1}{#2}{\@gls@field@font{\GLSaccesssymbol{#2}\mfirstucMakeUppercase{#3}}}% + \glsxtrsaveinsert{#2}{#3}% + \@gls@field@link[\let\glscapscase\@thirdofthree]% + {#1}{#2}% + {% + \glsifapplyinnerfmtfield{#2}{symbol}% + {% + \@gls@field@font{\GLSaccessfmtsymbol{#3}{\glsxtrgenentrytextfmt}{#2}}% + }% + {% + \@gls@field@font{\GLSaccesssymbol{#2}% + \glsuppercase{\glsxtrgenentrytextfmt{#3}}}% + }% + }% } % \end{macrocode} %\end{macro} @@ -6588,11 +8472,22 @@ Dickimaw Books\\ %\changes{1.04}{2016-05-02}{set regular format} % \begin{macrocode} \def\@glssymbolplural@#1#2[#3]{% + \def\glsxtrcurrentfield{symbol}% \glsxtrassignfieldfont{#2}% + \glsxtrsaveinsert{#2}{#3}% \@gls@field@link - [\let\glscapscase\@secondoftwo + [\let\glscapscase\@secondofthree \let\glsifplural\@firstoftwo - ]{#1}{#2}{\@gls@field@font{\glsaccesssymbolplural{#2}#3}}% + ]{#1}{#2}% + {% + \glsifapplyinnerfmtfield{#2}{symbolplural}% + {% + \@gls@field@font{\glsaccessfmtsymbolplural{#3}{\glsxtrgenentrytextfmt}{#2}}% + }% + {% + \@gls@field@font{\glsaccesssymbolplural{#2}\glsxtrgenentrytextfmt{#3}}% + }% + }% } % \end{macrocode} %\end{macro} @@ -6604,11 +8499,22 @@ Dickimaw Books\\ %\changes{1.04}{2016-05-02}{set regular format} % \begin{macrocode} \def\@Glssymbolplural@#1#2[#3]{% + \def\glsxtrcurrentfield{symbol}% \glsxtrassignfieldfont{#2}% + \glsxtrsaveinsert{#2}{#3}% \@gls@field@link - [\let\glscapscase\@secondoftwo + [\let\glscapscase\@secondofthree \let\glsifplural\@firstoftwo - ]{#1}{#2}{\@gls@field@font{\Glsaccesssymbolplural{#2}#3}}% + ]{#1}{#2}% + {% + \glsifapplyinnerfmtfield{#2}{symbolplural}% + {% + \@gls@field@font{\Glsaccessfmtsymbolplural{#3}{\glsxtrgenentrytextfmt}{#2}}% + }% + {% + \@gls@field@font{\Glsaccesssymbolplural{#2}\glsxtrgenentrytextfmt{#3}}% + }% + }% } % \end{macrocode} %\end{macro} @@ -6619,14 +8525,48 @@ Dickimaw Books\\ %\changes{0.5.2}{2015-12-08}{added accessibility support} %\changes{1.04}{2016-05-02}{set regular format} % \begin{macrocode} -\def\@GLSsymbol@#1#2[#3]{% +\def\@GLSsymbolplural@#1#2[#3]{% + \def\glsxtrcurrentfield{symbol}% \glsxtrassignfieldfont{#2}% + \glsxtrsaveinsert{#2}{#3}% \@gls@field@link - [\let\glscapscase\@thirdoftwo + [\let\glscapscase\@thirdofthree \let\glsifplural\@firstoftwo ]% - {#1}{#2}% - {\@gls@field@font{\GLSaccesssymbolplural{#2}\mfirstucMakeUppercase{#3}}}% + {#1}{#2}% + {% + \glsifapplyinnerfmtfield{#2}{symbolplural}% + {% + \@gls@field@font{\GLSaccessfmtsymbolplural{#3}{\glsxtrgenentrytextfmt}{#2}}% + }% + {% + \@gls@field@font{\GLSaccesssymbolplural{#2}% + \glsuppercase{\glsxtrgenentrytextfmt{#3}}}% + }% + }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsuseri@} +% User 1 field. +%\changes{1.49}{2022-10-14}{added redefinition} +% \begin{macrocode} +\def\@glsuseri@#1#2[#3]{% + \def\glsxtrcurrentfield{user1}% + \glsxtrassignfieldfont{#2}% + \glsxtrsaveinsert{#2}{#3}% + \@gls@field@link + {#1}{#2}% + {% + \glsifapplyinnerfmtfield{#2}{useri}% + {% + \@gls@field@font{\glsaccessfmtuseri{#3}{\glsxtrgenentrytextfmt}{#2}}% + }% + {% + \@gls@field@font{\glsaccessuseri{#2}\glsxtrgenentrytextfmt{#3}}% + }% + }% } % \end{macrocode} %\end{macro} @@ -6637,10 +8577,20 @@ Dickimaw Books\\ %\changes{1.04}{2016-05-02}{set regular format} % \begin{macrocode} \def\@Glsuseri@#1#2[#3]{% + \def\glsxtrcurrentfield{user1}% \glsxtrassignfieldfont{#2}% + \glsxtrsaveinsert{#2}{#3}% \@gls@field@link - [\let\glscapscase\@secondoftwo]{#1}{#2}% - {\@gls@field@font{\Glsentryuseri{#2}#3}}% + [\let\glscapscase\@secondofthree]{#1}{#2}% + {% + \glsifapplyinnerfmtfield{#2}{useri}% + {% + \@gls@field@font{\Glsaccessfmtuseri{#3}{\glsxtrgenentrytextfmt}{#2}}% + }% + {% + \@gls@field@font{\Glsaccessuseri{#2}\glsxtrgenentrytextfmt{#3}}% + }% + }% } % \end{macrocode} %\end{macro} @@ -6651,9 +8601,48 @@ Dickimaw Books\\ %\changes{1.04}{2016-05-02}{set regular format} % \begin{macrocode} \def\@GLSuseri@#1#2[#3]{% + \def\glsxtrcurrentfield{user1}% \glsxtrassignfieldfont{#2}% - \@gls@field@link[\let\glscapscase\@thirdoftwo]% - {#1}{#2}{\@gls@field@font{\mfirstucMakeUppercase{\glsentryuseri{#2}#3}}}% + \glsxtrsaveinsert{#2}{#3}% + \@gls@field@link[\let\glscapscase\@thirdofthree]% + {#1}{#2}% + {% + \glsifapplyinnerfmtfield{#2}{useri}% + {% + \@gls@field@font{\GLSaccessfmtuseri{#3}{\glsxtrgenentrytextfmt}{#2}}% + }% + {% + \ifx\glscapscase\@thirdofthree + \@gls@field@font{\GLSaccessuseri{#2}% + \glsuppercase{\glsxtrgenentrytextfmt{#3}}}% + \else + \@gls@field@font{\glsaccessuseri{#2}\glsxtrgenentrytextfmt{#3}}% + \fi + }% + }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsuserii@} +% User 2 field. +%\changes{1.49}{2022-10-14}{added redefinition} +% \begin{macrocode} +\def\@glsuserii@#1#2[#3]{% + \def\glsxtrcurrentfield{user2}% + \glsxtrassignfieldfont{#2}% + \glsxtrsaveinsert{#2}{#3}% + \@gls@field@link + {#1}{#2}% + {% + \glsifapplyinnerfmtfield{#2}{userii}% + {% + \@gls@field@font{\glsaccessfmtuserii{#3}{\glsxtrgenentrytextfmt}{#2}}% + }% + {% + \@gls@field@font{\glsaccessuserii{#2}\glsxtrgenentrytextfmt{#3}}% + }% + }% } % \end{macrocode} %\end{macro} @@ -6664,10 +8653,21 @@ Dickimaw Books\\ %\changes{1.04}{2016-05-02}{set regular format} % \begin{macrocode} \def\@Glsuserii@#1#2[#3]{% + \def\glsxtrcurrentfield{user2}% \glsxtrassignfieldfont{#2}% + \glsxtrsaveinsert{#2}{#3}% \@gls@field@link - [\let\glscapscase\@secondoftwo]% - {#1}{#2}{\@gls@field@font{\Glsentryuserii{#2}#3}}% + [\let\glscapscase\@secondofthree]% + {#1}{#2}% + {% + \glsifapplyinnerfmtfield{#2}{userii}% + {% + \@gls@field@font{\Glsaccessfmtuserii{#3}{\glsxtrgenentrytextfmt}{#2}}% + }% + {% + \@gls@field@font{\Glsaccessuserii{#2}\glsxtrgenentrytextfmt{#3}}% + }% + }% } % \end{macrocode} %\end{macro} @@ -6678,9 +8678,48 @@ Dickimaw Books\\ %\changes{1.04}{2016-05-02}{set regular format} % \begin{macrocode} \def\@GLSuserii@#1#2[#3]{% + \def\glsxtrcurrentfield{user2}% \glsxtrassignfieldfont{#2}% - \@gls@field@link[\let\glscapscase\@thirdoftwo]% - {#1}{#2}{\@gls@field@font{\mfirstucMakeUppercase{\glsentryuserii{#2}#3}}}% + \glsxtrsaveinsert{#2}{#3}% + \@gls@field@link[\let\glscapscase\@thirdofthree]% + {#1}{#2}% + {% + \glsifapplyinnerfmtfield{#2}{userii}% + {% + \@gls@field@font{\GLSaccessfmtuserii{#3}{\glsxtrgenentrytextfmt}{#2}}% + }% + {% + \ifx\glscapscase\@thirdofthree + \@gls@field@font{\GLSaccessuserii{#2}% + \glsuppercase{\glsxtrgenentrytextfmt{#3}}}% + \else + \@gls@field@font{\glsaccessuserii{#2}\glsxtrgenentrytextfmt{#3}}% + \fi + }% + }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsuseriii@} +% User 3 field. +%\changes{1.49}{2022-10-14}{added redefinition} +% \begin{macrocode} +\def\@glsuseriii@#1#2[#3]{% + \def\glsxtrcurrentfield{user3}% + \glsxtrassignfieldfont{#2}% + \glsxtrsaveinsert{#2}{#3}% + \@gls@field@link + {#1}{#2}% + {% + \glsifapplyinnerfmtfield{#2}{useriii}% + {% + \@gls@field@font{\glsaccessfmtuseriii{#3}{\glsxtrgenentrytextfmt}{#2}}% + }% + {% + \@gls@field@font{\glsaccessuseriii{#2}\glsxtrgenentrytextfmt{#3}}% + }% + }% } % \end{macrocode} %\end{macro} @@ -6691,10 +8730,21 @@ Dickimaw Books\\ %\changes{1.04}{2016-05-02}{set regular format} % \begin{macrocode} \def\@Glsuseriii@#1#2[#3]{% + \def\glsxtrcurrentfield{user3}% \glsxtrassignfieldfont{#2}% + \glsxtrsaveinsert{#2}{#3}% \@gls@field@link - [\let\glscapscase\@secondoftwo]% - {#1}{#2}{\@gls@field@font{\Glsentryuseriii{#2}#3}}% + [\let\glscapscase\@secondofthree]% + {#1}{#2}% + {% + \glsifapplyinnerfmtfield{#2}{useriii}% + {% + \@gls@field@font{\Glsaccessfmtuseriii{#3}{\glsxtrgenentrytextfmt}{#2}}% + }% + {% + \@gls@field@font{\Glsaccessuseriii{#2}\glsxtrgenentrytextfmt{#3}}% + }% + }% } % \end{macrocode} %\end{macro} @@ -6705,9 +8755,48 @@ Dickimaw Books\\ %\changes{1.04}{2016-05-02}{set regular format} % \begin{macrocode} \def\@GLSuseriii@#1#2[#3]{% + \def\glsxtrcurrentfield{user3}% \glsxtrassignfieldfont{#2}% - \@gls@field@link[\let\glscapscase\@thirdoftwo]% - {#1}{#2}{\@gls@field@font{\mfirstucMakeUppercase{\glsentryuseriii{#2}#3}}}% + \glsxtrsaveinsert{#2}{#3}% + \@gls@field@link[\let\glscapscase\@thirdofthree]% + {#1}{#2}% + {% + \glsifapplyinnerfmtfield{#2}{useriii}% + {% + \@gls@field@font{\GLSaccessfmtuseriii{#3}{\glsxtrgenentrytextfmt}{#2}}% + }% + {% + \ifx\glscapscase\@thirdofthree + \@gls@field@font{\GLSaccessuseriii{#2}% + \glsuppercase{\glsxtrgenentrytextfmt{#3}}}% + \else + \@gls@field@font{\glsaccessuseriii{#2}\glsxtrgenentrytextfmt{#3}}% + \fi + }% + }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsuseriv@} +% User 4 field. +%\changes{1.49}{2022-10-14}{added redefinition} +% \begin{macrocode} +\def\@glsuseriv@#1#2[#3]{% + \def\glsxtrcurrentfield{user4}% + \glsxtrassignfieldfont{#2}% + \glsxtrsaveinsert{#2}{#3}% + \@gls@field@link + {#1}{#2}% + {% + \glsifapplyinnerfmtfield{#2}{useriv}% + {% + \@gls@field@font{\glsaccessfmtuseriv{#3}{\glsxtrgenentrytextfmt}{#2}}% + }% + {% + \@gls@field@font{\glsaccessuseriv{#2}\glsxtrgenentrytextfmt{#3}}% + }% + }% } % \end{macrocode} %\end{macro} @@ -6718,10 +8807,21 @@ Dickimaw Books\\ %\changes{1.04}{2016-05-02}{set regular format} % \begin{macrocode} \def\@Glsuseriv@#1#2[#3]{% + \def\glsxtrcurrentfield{user4}% \glsxtrassignfieldfont{#2}% + \glsxtrsaveinsert{#2}{#3}% \@gls@field@link - [\let\glscapscase\@secondoftwo]% - {#1}{#2}{\@gls@field@font{\Glsentryuseriv{#2}#3}}% + [\let\glscapscase\@secondofthree]% + {#1}{#2}% + {% + \glsifapplyinnerfmtfield{#2}{useriv}% + {% + \@gls@field@font{\Glsaccessfmtuseriv{#3}{\glsxtrgenentrytextfmt}{#2}}% + }% + {% + \@gls@field@font{\Glsaccessuseriv{#2}#3}% + }% + }% } % \end{macrocode} %\end{macro} @@ -6732,10 +8832,48 @@ Dickimaw Books\\ %\changes{1.04}{2016-05-02}{set regular format} % \begin{macrocode} \def\@GLSuseriv@#1#2[#3]{% + \def\glsxtrcurrentfield{user4}% \glsxtrassignfieldfont{#2}% - \@gls@field@link[\let\glscapscase\@thirdoftwo]% - {#1}{#2}% - {\@gls@field@font{\mfirstucMakeUppercase{\glsentryuseriv{#2}#3}}}% + \glsxtrsaveinsert{#2}{#3}% + \@gls@field@link[\let\glscapscase\@thirdofthree]% + {#1}{#2}% + {% + \glsifapplyinnerfmtfield{#2}{useriv}% + {% + \@gls@field@font{\GLSaccessfmtuseriv{#3}{\glsxtrgenentrytextfmt}{#2}}% + }% + {% + \ifx\glscapscase\@thirdofthree + \@gls@field@font{\GLSaccessuseriv{#2}% + \glsuppercase{\glsxtrgenentrytextfmt{#3}}}% + \else + \@gls@field@font{\glsaccessuseriv{#2}\glsxtrgenentrytextfmt{#3}}% + \fi + }% + }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsuserv@} +% User 5 field. +%\changes{1.49}{2022-10-14}{added redefinition} +% \begin{macrocode} +\def\@glsuserv@#1#2[#3]{% + \def\glsxtrcurrentfield{user5}% + \glsxtrassignfieldfont{#2}% + \glsxtrsaveinsert{#2}{#3}% + \@gls@field@link + {#1}{#2}% + {% + \glsifapplyinnerfmtfield{#2}{userv}% + {% + \@gls@field@font{\glsaccessfmtuserv{#3}{\glsxtrgenentrytextfmt}{#2}}% + }% + {% + \@gls@field@font{\glsaccessuserv{#2}\glsxtrgenentrytextfmt{#3}}% + }% + }% } % \end{macrocode} %\end{macro} @@ -6746,10 +8884,21 @@ Dickimaw Books\\ %\changes{1.04}{2016-05-02}{set regular format} % \begin{macrocode} \def\@Glsuserv@#1#2[#3]{% + \def\glsxtrcurrentfield{user5}% \glsxtrassignfieldfont{#2}% + \glsxtrsaveinsert{#2}{#3}% \@gls@field@link - [\let\glscapscase\@secondoftwo]% - {#1}{#2}{\@gls@field@font{\Glsentryuserv{#2}#3}}% + [\let\glscapscase\@secondofthree]% + {#1}{#2}% + {% + \glsifapplyinnerfmtfield{#2}{userv}% + {% + \@gls@field@font{\Glsfmtfield{#3}{\glsxtrgenentrytextfmt}{#2}{userv}}% + }% + {% + \@gls@field@font{\Glsentryuserv{#2}\glsxtrgenentrytextfmt{#3}}% + }% + }% } % \end{macrocode} %\end{macro} @@ -6760,23 +8909,73 @@ Dickimaw Books\\ %\changes{1.04}{2016-05-02}{set regular format} % \begin{macrocode} \def\@GLSuserv@#1#2[#3]{% + \def\glsxtrcurrentfield{user5}% \glsxtrassignfieldfont{#2}% - \@gls@field@link[\let\glscapscase\@thirdoftwo]% - {#1}{#2}{\@gls@field@font{\mfirstucMakeUppercase{\glsentryuserv{#2}#3}}}% -} -% \end{macrocode} -%\end{macro} -% + \glsxtrsaveinsert{#2}{#3}% + \@gls@field@link[\let\glscapscase\@thirdofthree]% + {#1}{#2}% + {% + \glsifapplyinnerfmtfield{#2}{userv}% + {% + \@gls@field@font{\GLSaccessfmtuserv{#3}{\glsxtrgenentrytextfmt}{#2}}% + }% + {% + \ifx\glscapscase\@thirdofthree + \@gls@field@font{\GLSaccessuserv{#2}% + \glsuppercase{\glsxtrgenentrytextfmt{#3}}}% + \else + \@gls@field@font{\glsaccessuserv{#2}\glsxtrgenentrytextfmt{#3}}% + \fi + }% + }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsuservi@} +% User 6 field. +%\changes{1.49}{2022-10-14}{added redefinition} +% \begin{macrocode} +\def\@glsuservi@#1#2[#3]{% + \def\glsxtrcurrentfield{user6}% + \glsxtrassignfieldfont{#2}% + \glsxtrsaveinsert{#2}{#3}% + \@gls@field@link + {#1}{#2}% + {% + \glsifapplyinnerfmtfield{#2}{uservi}% + {% + \@gls@field@font{\glsaccessfmtuservi{#3}{\glsxtrgenentrytextfmt}{#2}}% + }% + {% + \@gls@field@font{\glsaccessuservi{#2}\glsxtrgenentrytextfmt{#3}}% + }% + }% +} +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\@Glsuservi@} % First letter uppercase version. %\changes{0.3}{2015-12-02}{added redefinition} %\changes{1.04}{2016-05-02}{set regular format} % \begin{macrocode} \def\@Glsuservi@#1#2[#3]{% + \def\glsxtrcurrentfield{user6}% \glsxtrassignfieldfont{#2}% + \glsxtrsaveinsert{#2}{#3}% \@gls@field@link - [\let\glscapscase\@secondoftwo]% - {#1}{#2}{\@gls@field@font{\Glsentryuservi{#2}#3}}% + [\let\glscapscase\@secondofthree]% + {#1}{#2}% + {% + \glsifapplyinnerfmtfield{#2}{uservi}% + {% + \@gls@field@font{\Glsaccessfmtuservi{#3}{\glsxtrgenentrytextfmt}{#2}}% + }% + {% + \@gls@field@font{\Glsaccessuservi{#2}\glsxtrgenentrytextfmt{#3}}% + }% + }% } % \end{macrocode} %\end{macro} @@ -6787,9 +8986,25 @@ Dickimaw Books\\ %\changes{1.04}{2016-05-02}{set regular format} % \begin{macrocode} \def\@GLSuservi@#1#2[#3]{% + \def\glsxtrcurrentfield{user6}% \glsxtrassignfieldfont{#2}% - \@gls@field@link[\let\glscapscase\@thirdoftwo]% - {#1}{#2}{\@gls@field@font{\mfirstucMakeUppercase{\glsentryuservi{#2}#3}}}% + \glsxtrsaveinsert{#2}{#3}% + \@gls@field@link[\let\glscapscase\@thirdofthree]% + {#1}{#2}% + {% + \glsifapplyinnerfmtfield{#2}{uservi}% + {% + \@gls@field@font{\GLSaccessfmtuservi{#3}{\glsxtrgenentrytextfmt}{#2}}% + }% + {% + \ifx\glscapscase\@thirdofthree + \@gls@field@font{\GLSaccessuservi{#2}% + \glsuppercase{\glsxtrgenentrytextfmt{#3}}}% + \else + \@gls@field@font{\glsaccessuservi{#2}\glsxtrgenentrytextfmt{#3}}% + \fi + }% + }% } % \end{macrocode} %\end{macro} @@ -6819,15 +9034,19 @@ Dickimaw Books\\ % \end{macrocode} %\end{macro} % +%The following acr commands don't support innertextformat. +% %\begin{macro}{\@acrshort} %\changes{0.3}{2015-12-02}{added redefinition} % No case change. % \begin{macrocode} \def\@acrshort#1#2[#3]{% + \def\glsxtrcurrentfield{short}% \@glsxtr@base@acrcmd\acrshort\glsxtrshort \glsdoifexists{#2}% {% \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsxtrifwasglslike\@secondoftwo \let\glsxtrifwasfirstuse\@secondoftwo \let\glsifplural\@secondoftwo \let\glscapscase\@firstofthree @@ -6847,10 +9066,12 @@ Dickimaw Books\\ % First letter uppercase. % \begin{macrocode} \def\@Acrshort#1#2[#3]{% + \def\glsxtrcurrentfield{short}% \@glsxtr@base@acrcmd\Acrshort\Glsxtrshort \glsdoifexists{#2}% {% \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsxtrifwasglslike\@secondoftwo \let\glsxtrifwasfirstuse\@secondoftwo \let\glsifplural\@secondoftwo \let\glscapscase\@secondofthree @@ -6870,16 +9091,18 @@ Dickimaw Books\\ % All uppercase. % \begin{macrocode} \def\@ACRshort#1#2[#3]{% + \def\glsxtrcurrentfield{short}% \@glsxtr@base@acrcmd\ACRshort\GLSxtrshort \glsdoifexists{#2}% {% \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsxtrifwasglslike\@secondoftwo \let\glsxtrifwasfirstuse\@secondoftwo \let\glsifplural\@secondoftwo \let\glscapscase\@thirdofthree \let\glsinsert\@empty \def\glscustomtext{% - \mfirstucMakeUppercase{\acronymfont{\glsaccessshort{#2}}#3}% + \glsuppercase{\acronymfont{\glsaccessshort{#2}}#3}% }% \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% }% @@ -6893,10 +9116,12 @@ Dickimaw Books\\ % No case change. % \begin{macrocode} \def\@acrshortpl#1#2[#3]{% + \def\glsxtrcurrentfield{short}% \@glsxtr@base@acrcmd\acrshortpl\glsxtrshortpl \glsdoifexists{#2}% {% \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsxtrifwasglslike\@secondoftwo \let\glsxtrifwasfirstuse\@secondoftwo \let\glsifplural\@firstoftwo \let\glscapscase\@firstofthree @@ -6916,10 +9141,12 @@ Dickimaw Books\\ % First letter uppercase. % \begin{macrocode} \def\@Acrshortpl#1#2[#3]{% + \def\glsxtrcurrentfield{short}% \@glsxtr@base@acrcmd\Acrshortpl\Glsxtrshortpl \glsdoifexists{#2}% {% \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsxtrifwasglslike\@secondoftwo \let\glsxtrifwasfirstuse\@secondoftwo \let\glsifplural\@firstoftwo \let\glscapscase\@secondofthree @@ -6939,16 +9166,18 @@ Dickimaw Books\\ % All uppercase. % \begin{macrocode} \def\@ACRshortpl#1#2[#3]{% + \def\glsxtrcurrentfield{short}% \@glsxtr@base@acrcmd\ACRshortpl\GLSxtrshortpl \glsdoifexists{#2}% {% \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsxtrifwasglslike\@secondoftwo \let\glsxtrifwasfirstuse\@secondoftwo \let\glsifplural\@firstoftwo \let\glscapscase\@thirdofthree \let\glsinsert\@empty \def\glscustomtext{% - \mfirstucMakeUppercase{\acronymfont{\glsaccessshortpl{#2}}#3}% + \glsuppercase{\acronymfont{\glsaccessshortpl{#2}}#3}% }% \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% }% @@ -6962,10 +9191,12 @@ Dickimaw Books\\ % No case change. % \begin{macrocode} \def\@acrlong#1#2[#3]{% + \def\glsxtrcurrentfield{long}% \@glsxtr@base@acrcmd\acrlong\glsxtrlong \glsdoifexists{#2}% {% \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsxtrifwasglslike\@secondoftwo \let\glsxtrifwasfirstuse\@secondoftwo \let\glsifplural\@secondoftwo \let\glscapscase\@firstofthree @@ -6985,10 +9216,12 @@ Dickimaw Books\\ % First letter uppercase. % \begin{macrocode} \def\@Acrlong#1#2[#3]{% + \def\glsxtrcurrentfield{long}% \@glsxtr@base@acrcmd\Acrlong\Glsxtrlong \glsdoifexists{#2}% {% \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsxtrifwasglslike\@secondoftwo \let\glsxtrifwasfirstuse\@secondoftwo \let\glsifplural\@secondoftwo \let\glscapscase\@secondofthree @@ -7008,16 +9241,18 @@ Dickimaw Books\\ % All uppercase. % \begin{macrocode} \def\@ACRlong#1#2[#3]{% + \def\glsxtrcurrentfield{long}% \@glsxtr@base@acrcmd\ACRlong\GLSxtrlong \glsdoifexists{#2}% {% \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsxtrifwasglslike\@secondoftwo \let\glsxtrifwasfirstuse\@secondoftwo \let\glsifplural\@secondoftwo \let\glscapscase\@thirdofthree \let\glsinsert\@empty \def\glscustomtext{% - \mfirstucMakeUppercase{\acronymfont{\glsaccesslong{#2}}#3}% + \glsuppercase{\acronymfont{\glsaccesslong{#2}}#3}% }% \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% }% @@ -7031,10 +9266,12 @@ Dickimaw Books\\ % No case change. % \begin{macrocode} \def\@acrlongpl#1#2[#3]{% + \def\glsxtrcurrentfield{long}% \@glsxtr@base@acrcmd\acrlongpl\glsxtrlongpl \glsdoifexists{#2}% {% \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsxtrifwasglslike\@secondoftwo \let\glsxtrifwasfirstuse\@secondoftwo \let\glsifplural\@firstoftwo \let\glscapscase\@firstofthree @@ -7054,10 +9291,12 @@ Dickimaw Books\\ % First letter uppercase. % \begin{macrocode} \def\@Acrlongpl#1#2[#3]{% + \def\glsxtrcurrentfield{long}% \@glsxtr@base@acrcmd\Acrlongpl\Glsxtrlongpl \glsdoifexists{#2}% {% \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsxtrifwasglslike\@secondoftwo \let\glsxtrifwasfirstuse\@secondoftwo \let\glsifplural\@firstoftwo \let\glscapscase\@secondofthree @@ -7077,16 +9316,18 @@ Dickimaw Books\\ % All uppercase. % \begin{macrocode} \def\@ACRlongpl#1#2[#3]{% + \def\glsxtrcurrentfield{long}% \@glsxtr@base@acrcmd\ACRlongpl\GLSxtrlongpl \glsdoifexists{#2}% {% \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsxtrifwasglslike\@secondoftwo \let\glsxtrifwasfirstuse\@secondoftwo \let\glsifplural\@firstoftwo \let\glscapscase\@thirdofthree \let\glsinsert\@empty \def\glscustomtext{% - \mfirstucMakeUppercase{\acronymfont{\glsaccesslongpl{#2}}#3}% + \glsuppercase{\acronymfont{\glsaccesslongpl{#2}}#3}% }% \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% }% @@ -7106,6 +9347,7 @@ Dickimaw Books\\ %\changes{1.42}{2020-02-03}{added redefinition} % \begin{macrocode} \def\@acrfull#1#2[#3]{% + \def\glsxtrcurrentfield{}% \@glsxtr@base@acrcmd\acrfull\glsxtrfull \acrfullfmt{#1}{#2}{#3}% } @@ -7116,6 +9358,7 @@ Dickimaw Books\\ %\changes{1.42}{2020-02-03}{added redefinition} % \begin{macrocode} \def\@Acrfull#1#2[#3]{% + \def\glsxtrcurrentfield{}% \@glsxtr@base@acrcmd\Acrfull\Glsxtrfull \Acrfullfmt{#1}{#2}{#3}% } @@ -7126,6 +9369,7 @@ Dickimaw Books\\ %\changes{1.42}{2020-02-03}{added redefinition} % \begin{macrocode} \def\@ACRfull#1#2[#3]{% + \def\glsxtrcurrentfield{}% \@glsxtr@base@acrcmd\ACRfull\GLSxtrfull \ACRfullfmt{#1}{#2}{#3}% } @@ -7136,6 +9380,7 @@ Dickimaw Books\\ %\changes{1.42}{2020-02-03}{added redefinition} % \begin{macrocode} \def\@acrfullpl#1#2[#3]{% + \def\glsxtrcurrentfield{}% \@glsxtr@base@acrcmd\acrfullpl\glsxtrfullpl \acrfullplfmt{#1}{#2}{#3}% } @@ -7146,6 +9391,7 @@ Dickimaw Books\\ %\changes{1.42}{2020-02-03}{added redefinition} % \begin{macrocode} \def\@Acrfullpl#1#2[#3]{% + \def\glsxtrcurrentfield{}% \@glsxtr@base@acrcmd\Acrfullpl\Glsxtrfullpl \Acrfullplfmt{#1}{#2}{#3}% } @@ -7156,6 +9402,7 @@ Dickimaw Books\\ %\changes{1.42}{2020-02-03}{added redefinition} % \begin{macrocode} \def\@ACRfullpl#1#2[#3]{% + \def\glsxtrcurrentfield{}% \@glsxtr@base@acrcmd\ACRfullpl\GLSxtrfullpl \ACRfullplfmt{#1}{#2}{#3}% } @@ -7177,10 +9424,11 @@ Dickimaw Books\\ \gls@assign@field{#2}{\@glo@label}{#1}{\@glo@tmp}% }% \newcommand*{#3}[1]{\@gls@entry@field{##1}{#1}}% - \newcommand*{#4}[1]{\@Gls@entry@field{##1}{#1}}% + \newcommand*{#4}[1]{\@Glsentryfield{##1}{#1}}% % \end{macrocode} -% Now for the commands with links. First the version with no case -% change (same as before): +% Now for the commands with links. These currently don't support the +% inner text format. +% First the version with no case change: % \begin{macrocode} \ifcsdef{@gls@user@#1@}% {% @@ -7197,7 +9445,10 @@ Dickimaw Books\\ {\csuse{@gls@user@#1@}{##1}{##2}}% {\csuse{@gls@user@#1@}{##1}{##2}[]}}% \csdef{@gls@user@#1@}##1##2[##3]{% - \@gls@field@link{##1}{##2}{#3{##2}##3}% + \def\glsxtrcurrentfield{#1}% + \glsxtrassignfieldfont{##2}% + \glsxtrsaveinsert{##2}{##3}% + \@gls@field@link{##1}{##2}{\@gls@field@font{#3{##2}##3}}% }% \newrobustcmd*{#5}{% \expandafter\@gls@hyp@opt\csname @gls@user@#1\endcsname}% @@ -7221,8 +9472,11 @@ Dickimaw Books\\ {\csuse{@Gls@user@#1@}{##1}{##2}}% {\csuse{@Gls@user@#1@}{##1}{##2}[]}}% \csdef{@Gls@user@#1@}##1##2[##3]{% + \def\glsxtrcurrentfield{#1}% + \glsxtrassignfieldfont{##2}% + \glsxtrsaveinsert{##2}{##3}% \@gls@field@link[\let\glscapscase\@secondofthree]% - {##1}{##2}{#4{##2}##3}% + {##1}{##2}{\@gls@field@font{#4{##2}##3}}% }% \newrobustcmd*{#6}{% \expandafter\@gls@hyp@opt\csname @Gls@user@#1\endcsname}% @@ -7245,12 +9499,21 @@ Dickimaw Books\\ {\csuse{@GLS@user@#1@}{##1}{##2}}% {\csuse{@GLS@user@#1@}{##1}{##2}[]}}% \csdef{@GLS@user@#1@}##1##2[##3]{% + \def\glsxtrcurrentfield{#1}% + \glsxtrassignfieldfont{##2}% + \glsxtrsaveinsert{##2}{##3}% \@gls@field@link[\let\glscapscase\@thirdofthree]% - {##1}{##2}{\mfirstucMakeUppercase{#3{##2}##3}}% + {##1}{##2}{\@gls@field@font{\glsuppercase{#3{##2}##3}}}% }% \newrobustcmd*{#7}{% \expandafter\@gls@hyp@opt\csname @GLS@user@#1\endcsname}% }% +% \end{macrocode} +%Add mappings. +% \begin{macrocode} + \glsmfuaddmap{#3}{#4}% + \glsmfuaddmap{#5}{#6}% + \glsmfublocker{#7}% }% {% \PackageError{glossaries-extra}{Key `#1' already exists}{}% @@ -7260,13 +9523,22 @@ Dickimaw Books\\ %\end{macro} % %\begin{macro}{\@gls@link@nocheckfirsthyper} -% Old versions of \styfmt{glossaries} don't define +% Old versions of \sty{glossaries} don't define % this, so provide it just in case it hasn't been defined. % \begin{macrocode} \providecommand*{\@gls@link@nocheckfirsthyper}{} % \end{macrocode} %\end{macro} % +%\begin{macro}{\@gls@link@postkeys@checkfirsthyper} +%\changes{1.49}{2022-10-14}{new} +%Need another check after preunset and postunset options have been +%applied. +% \begin{macrocode} +\newcommand*{\@gls@link@postkeys@checkfirsthyper}{} +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\@gls@link@checkfirsthyper} % Modify check to determine if the hyperlink should be automatically % suppressed, but save the original in case the acronyms are restored. @@ -7291,17 +9563,21 @@ Dickimaw Books\\ {\let\glsxtrifwasfirstuse\@secondoftwo} {\let\glsxtrifwasfirstuse\@firstoftwo}% % \end{macrocode} +%Similarly for \cs{glsxtrifwasglslike} +% \begin{macrocode} + \let\glsxtrifwasglslike\@firstoftwo +% \end{macrocode} % Store the category label for convenience. %\changes{1.46}{2021-09-20}{changed \cs{edef} to \cs{protected@edef}} % \begin{macrocode} \protected@edef\glscategorylabel{\glscategory{\glslabel}}% - \ifglsused{\glslabel}% + \glsxtrifwasfirstuse {% - \glsifcategoryattribute{\glscategorylabel}{nohypernext}{true}% + \glsifcategoryattribute{\glscategorylabel}{nohyperfirst}{true}% {\KV@glslink@hyperfalse}{}% }% {% - \glsifcategoryattribute{\glscategorylabel}{nohyperfirst}{true}% + \glsifcategoryattribute{\glscategorylabel}{nohypernext}{true}% {\KV@glslink@hyperfalse}{}% }% \glslinkcheckfirsthyperhook @@ -7310,7 +9586,7 @@ Dickimaw Books\\ %\end{macro} % %\begin{macro}{\do@glsdisablehyperinlist} -% This command was introduced in \styfmt{glossaries} v4.19. If it +% This command was introduced in \sty{glossaries} v4.19. If it % hasn't been defined, we're using an earlier version, in which case % the \catattr{nohyper} attribute can't be implemented. % \begin{macrocode} @@ -7353,6 +9629,25 @@ Dickimaw Books\\ \else \let\@gls@do@glsunset\glsunset \fi + \let\ifKV@glslink@local\if@org@KV@glslink@local +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@gls@default@restore@glslocal} +%\changes{1.49}{2022-10-14}{new} +%Save default definition of \cs{@gls@restore@glslocal} +% \begin{macrocode} +\let\@gls@default@restore@glslocal\@gls@restore@glslocal +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@gls@ignore@restore@glslocal} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand*{\@gls@ignore@restore@glslocal}{% + \let\@gls@do@glsunset\@gobble + \let\ifKV@glslink@local\if@org@KV@glslink@local } % \end{macrocode} %\end{macro} @@ -7365,8 +9660,19 @@ Dickimaw Books\\ % \end{macrocode} %\end{macro} % +%\begin{macro}{\@gls@default@glslink@opts} +%\changes{1.49}{2022-10-14}{new} +%The noindex setting needs to be initialised, so it's now always set +%to false first before applying the default options. Otherwise, if +%noindex is explicitly set in a command like \cs{gls} then it won't +%get reset if the default option list doesn't set it. +% \begin{macrocode} +\newcommand*{\@gls@default@glslink@opts}{} +% \end{macrocode} +%\end{macro} +% %If \cs{@gls@setdefault@glslink@opts} has been defined -%(\styfmt{glossaries} v4.20) use it to set the default keys in +%(\sty{glossaries} v4.20) use it to set the default keys in %\cs{@glslink}. %\begin{macro}{\@gls@setdefault@glslink@opts} %\changes{0.5.4}{2015-12-15}{new} @@ -7375,6 +9681,7 @@ Dickimaw Books\\ { \renewcommand*{\@gls@setdefault@glslink@opts}{% \KV@glslink@noindexfalse + \expandafter\setupglslink\expandafter{\@gls@default@glslink@opts}% \@glsxtrsetaliasnoindex } } @@ -7385,6 +9692,7 @@ Dickimaw Books\\ % \begin{macrocode} \newcommand*{\@gls@setdefault@glslink@opts}{% \KV@glslink@noindexfalse + \expandafter\setupglslink\expandafter{\@gls@default@glslink@opts}% \@glsxtrsetaliasnoindex } \preto\do@glsdisablehyperinlist{\@gls@setdefault@glslink@opts} @@ -7442,7 +9750,7 @@ Dickimaw Books\\ % \begin{macrocode} \protected@edef\@gls@counter{\csname glo@\glsdetoklabel{\glslabel}@counter\endcsname}% \glsxtr@saveentrycounter - \@@do@wrglossary{\glsxtralias{\glslabel}}% + \glsxtr@wrglossary@encap{\glsxtralias{\glslabel}}{\@@do@wrglossary{\glsxtralias{\glslabel}}}% \endgroup \fi } @@ -7474,10 +9782,23 @@ Dickimaw Books\\ % Set the default options for \cs{glslink} etc. % \begin{macrocode} \newcommand*{\GlsXtrSetDefaultGlsOpts}[1]{% - \renewcommand*{\@gls@setdefault@glslink@opts}{% - \setkeys{glslink}{#1}% - \@glsxtrsetaliasnoindex - }% + \renewcommand*{\@gls@default@glslink@opts}{#1}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GlsXtrAppToDefaultGlsOpts} +% \begin{macrocode} +\newcommand*{\GlsXtrAppToDefaultGlsOpts}[1]{% + \appto\@gls@default@glslink@opts{,#1}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GlsXtrPreToDefaultGlsOpts} +% \begin{macrocode} +\newcommand*{\GlsXtrPreToDefaultGlsOpts}[1]{% + \preto\@gls@default@glslink@opts{#1,}% } % \end{macrocode} %\end{macro} @@ -7491,6 +9812,80 @@ Dickimaw Books\\ % \end{macrocode} %\end{macro} % +%\begin{macro}{\glsxtr@wrglossary@encap} +%\changes{1.49}{2022-10-14}{new} +%\begin{definition} +%\cs{glsxtr@@wrglossary@encap}\marg{label}\marg{whatsit} +%\end{definition} +%Encapsulate indexing whatsit and increment indexed count. +%See also \cs{glsxtrdowrglossaryhook} +% \begin{macrocode} +\newcommand*{\glsxtr@wrglossary@encap}[2]{\glsencapwrcontent{#2\@glsxtr@inc@indexcount{#1}}} +% \end{macrocode} +%\end{macro} +% +% Keep track of how many times an entry has been indexed. This doesn't test if +% the entry has been defined to allow for the first \LaTeX\ run before calling +% \app{bib2gls}. +%\begin{macro}{\@glsxtr@inc@indexcount} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand*{\@glsxtr@inc@indexcount}[1]{% + \ifcsdef{glo@\glsdetoklabel{#1}@indexed} + {% + \csxdef{glo@\glsdetoklabel{#1}@indexed}{% + \expandafter\number\expandafter\numexpr\csname glo@\glsdetoklabel{#1}@indexed\endcsname+1}% + }% + {% + \csgdef{glo@\glsdetoklabel{#1}@indexed}{1}% + }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsentryindexcount} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand*{\glsentryindexcount}[1]{% + \ifcsdef{glo@\glsdetoklabel{#1}@indexed} + {\csuse{glo@\glsdetoklabel{#1}@indexed}}% + {0}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsifindexed} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand*{\glsifindexed}[3]{% + \ifcsdef{glo@\glsdetoklabel{#1}@indexed}% + {\expandafter\ifnum\csname glo@\glsdetoklabel{#1}@indexed\endcsname>0 #2\else#3\fi}% + {#3}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsaddallunindexed} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand*{\glsaddallunindexed}[1][\@glo@types]{% + \forallglsentries[#1]{\@glo@entry}% + {% + \glsifindexed{\@glo@entry}{}{\glsadd[format=glsignore]{\@glo@entry}}% + }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsencapwrcontent} +%\changes{1.49}{2022-10-14}{new} +%This command was added to \sty{glossaries} v4.50 so may not be +%defined. +% \begin{macrocode} +\providecommand*{\glsencapwrcontent}[1]{{#1}} +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\glswriteentry} % Redefine to test for \catattr{indexonlyfirst} category attribute. %\changes{1.44}{2020-03-23}{replaced \cs{ifglsused} with \cs{GlsXtrIfUnusedOrUndefined}} @@ -7521,7 +9916,7 @@ Dickimaw Books\\ % %\begin{macro}{\@@do@@wrglossary} % Hook into glossary indexing command so that it can also use -% \ics{index} at the same time if required and add user hook. +% \cs{index} at the same time if required and add user hook. % \begin{macrocode} \appto\@@do@@wrglossary{\@glsxtr@do@@wrindex \glsxtrdowrglossaryhook{\@gls@label}% @@ -7563,7 +9958,10 @@ Dickimaw Books\\ % \begin{macrocode} \newcommand*{\@gls@alt@hyp@opt}[1]{% \let\glslinkvar\@firstofthree - \let\@gls@hyp@opt@cs#1\relax +% \end{macrocode} +%\changes{1.49}{2022-10-14}{changed \cs{let} to \cs{def} for \cs{@gls@hyp@opt@cs}} +% \begin{macrocode} + \def\@gls@hyp@opt@cs{#1}% \@ifstar{\s@gls@hyp@opt}% {\@ifnextchar+% {\@firstoftwo{\p@gls@hyp@opt}}% @@ -7627,7 +10025,7 @@ Dickimaw Books\\ {}% {% % \end{macrocode} -%Let \gls{bib2gls} know the modifier. +%Let \app{bib2gls} know the modifier. %\changes{1.37}{2018-11-30}{write modifier to aux} % \begin{macrocode} \protected@write\@auxout{}{\string\providecommand{\string\@glsxtr@altmodifier}[1]{}}% @@ -7637,6 +10035,32 @@ Dickimaw Books\\ % \end{macrocode} %\end{macro} % +%\begin{macro}{\GlsXtrSetPlusModifier} +% Allow user to override the plus modifier. +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand*{\GlsXtrSetPlusModifier}[1]{% + \renewcommand*{\p@gls@hyp@opt}[1][]{% + \let\glslinkvar\@thirdofthree + \@gls@hyp@opt@cs[#1,##1]% + }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GlsXtrSetStarModifier} +% Allow user to override the star modifier. +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand*{\GlsXtrSetStarModifier}[1]{% + \renewcommand*{\s@gls@hyp@opt}[1][]{% + \let\glslinkvar\@secondofthree + \@gls@hyp@opt@cs[#1,##1]% + } +} +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\glsxtr@org@dohyperlink} %\changes{1.21}{2017-11-03}{new} % \begin{macrocode} @@ -7646,7 +10070,7 @@ Dickimaw Books\\ % %\begin{macro}{\glsnavhyperlink} %\changes{1.21}{2017-11-03}{patched} -%Since \ics{glsnavhyperlink} uses \cs{@glslink}, it's necessary to +%Since \cs{glsnavhyperlink} uses \cs{@glslink}, it's necessary to %patch it uses \cs{glsdohyperlink} instead of \cs{glsxtrdohyperlink}. %The simplest way to achieve this is to locally let %\cs{glsxtrdohyperlink} to \cs{glsdohyperlink}. @@ -7741,8 +10165,8 @@ Dickimaw Books\\ % Unpleasant complications can occur if the \gloskey{text} or % \gloskey{first} key etc contains \cs{gls}, particularly if there % are hyperlinks. To get around this problem, patch -% \cs{glsdohyperlink} so that it temporarily makes \ics{gls} behave -% like \ics{glstext}\oarg{hyper=false,noindex}. (This will be +% \cs{glsdohyperlink} so that it temporarily makes \cs{gls} behave +% like \cs{glstext}\oarg{hyper=false,noindex}. (This will be % overridden if the user explicitly cancels either of those options % in the optional argument of \cs{gls} or using the plus version.) % This also patches the short form commands like \cs{acrshort} @@ -7814,7 +10238,7 @@ Dickimaw Books\\ %\begin{macro}{\glsxtrhyperlink} %\changes{1.19}{2017-09-09}{new} -%Allows integration with the base \styfmt{glossaries} package's +%Allows integration with the base \sty{glossaries} package's %\pkgopt[showtargets]{debug} option. % \begin{macrocode} \newcommand{\glsxtrhyperlink}[2]{% @@ -7849,7 +10273,7 @@ Dickimaw Books\\ %\begin{macro}{\glsdisablehyper} %\changes{0.5.4}{2015-12-15}{added} %\changes{1.21}{2017-11-03}{changed to use \cs{def} rather than \cs{let}} -% Redefine in case we have an old version of \styfmt{glossaries}. +% Redefine in case we have an old version of \sty{glossaries}. %This now uses \cs{def} rather than \cs{let} to allow for %redefinitions of \cs{glsdonohyperlink}. % \begin{macrocode} @@ -7877,8 +10301,8 @@ Dickimaw Books\\ %\end{macro} % %\begin{macro}{\glsdonohyperlink} -% This command was only introduced in \styfmt{glossaries} v4.20, so it may -% not be defined (therefore use \cs{def}). For older \styfmt{glossaries} versions, this won't be +% This command was only introduced in \sty{glossaries} v4.20, so it may +% not be defined (therefore use \cs{def}). For older \sty{glossaries} versions, this won't be % used if \sty{hyperref} hasn't been loaded, which means the % indexing will still take place. The generated text is scoped % (the link text in \cs{hyperlink} is also scoped, so it's @@ -8021,7 +10445,7 @@ Dickimaw Books\\ \def\@GLSxtr@p@short@#1#2[#3]{% {% \glssetabbrvfmt{\glscategory{#2}}% - \mfirstucMakeUppercase{\glsabbrvfont{\glsentryshort{#2}}#3}% + \glsuppercase{\glsabbrvfont{\glsentryshort{#2}}#3}% }% } % \end{macrocode} @@ -8057,7 +10481,7 @@ Dickimaw Books\\ \def\@GLSxtr@p@shortpl@#1#2[#3]{% {% \glssetabbrvfmt{\glscategory{#2}}% - \mfirstucMakeUppercase{\glsabbrvfont{\glsentryshortpl{#2}}#3}% + \glsuppercase{\glsabbrvfont{\glsentryshortpl{#2}}#3}% }% } % \end{macrocode} @@ -8081,7 +10505,7 @@ Dickimaw Books\\ %\changes{0.5.4}{2015-12-15}{new} % \begin{macrocode} \def\@GLSxtr@p@long@#1#2[#3]{% - {\mfirstucMakeUppercase{\glslongfont{\glsentrylong{#2}}#3}}} + {\glsuppercase{\glslongfont{\glsentrylong{#2}}#3}}} % \end{macrocode} %\end{macro} % @@ -8103,7 +10527,7 @@ Dickimaw Books\\ %\changes{0.5.4}{2015-12-15}{new} % \begin{macrocode} \def\@GLSxtr@p@longpl@#1#2[#3]{% - {\mfirstucMakeUppercase{\glslongfont{\glsentrylongpl{#2}}#3}}} + {\glsuppercase{\glslongfont{\glsentrylongpl{#2}}#3}}} % \end{macrocode} %\end{macro} % @@ -8125,7 +10549,7 @@ Dickimaw Books\\ %\changes{0.5.4}{2015-12-15}{new} % \begin{macrocode} \def\@GLSxtr@p@acrshort@#1#2[#3]{% - {\mfirstucMakeUppercase{\acronymfont{\glsentryshort{#2}}#3}}} + {\glsuppercase{\acronymfont{\glsentryshort{#2}}#3}}} % \end{macrocode} %\end{macro} % @@ -8147,7 +10571,7 @@ Dickimaw Books\\ %\changes{0.5.4}{2015-12-15}{new} % \begin{macrocode} \def\@GLSxtr@p@acrshortpl@#1#2[#3]{% - {\mfirstucMakeUppercase{\acronymfont{\glsentryshortpl{#2}}#3}}} + {\glsuppercase{\acronymfont{\glsentryshortpl{#2}}#3}}} % \end{macrocode} %\end{macro} % @@ -8169,7 +10593,7 @@ Dickimaw Books\\ %\changes{0.5.4}{2015-12-15}{new} % \begin{macrocode} \def\@GLSxtr@p@acrlong@#1#2[#3]{% - {\mfirstucMakeUppercase{\glsentrylong{#2}#3}}} + {\glsuppercase{\glsentrylong{#2}#3}}} % \end{macrocode} %\end{macro} % @@ -8191,7 +10615,7 @@ Dickimaw Books\\ %\changes{0.5.4}{2015-12-15}{new} % \begin{macrocode} \def\@GLSxtr@p@acrlongpl@#1#2[#3]{% - {\mfirstucMakeUppercase{\glsentrylongpl{#2}#3}}} + {\glsuppercase{\glsentrylongpl{#2}#3}}} % \end{macrocode} %\end{macro} % @@ -8306,13 +10730,29 @@ Dickimaw Books\\ % \end{macrocode} %\end{macro} % +%\begin{macro}{\glsxtrifintoc} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand{\glsxtrifintoc}[2]{#2} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrifheaduc} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand*{\glsxtrifheaduc}[3]{% + \glsxtrifintoc{#3}{\glsifattribute{#1}{headuc}{true}{#2}{#3}}% +} +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\glsxtr@entry@p} %\changes{1.07}{2016-08-15}{new} % \begin{macrocode} \newrobustcmd*{\glsxtr@headentry@p}[2]{% - \glsifattribute{#1}{headuc}{true}% + \glsxtrifheaduc{#1}% {% - \mfirstucMakeUppercase{\@gls@entry@field{#1}{#2}}% + \glsuppercase{\@gls@entry@field{#1}{#2}}% }% {% \@gls@entry@field{#1}{#2}% @@ -8325,42 +10765,16 @@ Dickimaw Books\\ %\changes{1.07}{2016-08-15}{new} %Not robust as it needs to expand somewhat. % \begin{macrocode} -\ifdef\texorpdfstring -{ - \newcommand{\glsxtrp}[2]{% - \protect\NoCaseChange - {% - \protect\texorpdfstring - {% - \protect\glsxtrifinmark - {% - \ifcsdef{glsxtrhead#1}% - {% - {\protect\csuse{glsxtrhead#1}{#2}}% - }% - {% - \glsxtr@headentry@p{#2}{#1}% - }% - }% - {% - \@glsxtrp{#1}{#2}% - }% - }% - {% - \protect\@gls@entry@field{#2}{#1}% - }% - }% - } -} -{ - \newcommand{\glsxtrp}[2]{% - \protect\NoCaseChange +\newcommand{\glsxtrp}[2]{% + \protect\NoCaseChange + {% + \protect\glstexorpdfstring {% \protect\glsxtrifinmark {% \ifcsdef{glsxtrhead#1}% {% - {\protect\csuse{glsxtrhead#1}}% + {\protect\csuse{glsxtrhead#1}{#2}}% }% {% \glsxtr@headentry@p{#2}{#1}% @@ -8370,7 +10784,10 @@ Dickimaw Books\\ \@glsxtrp{#1}{#2}% }% }% - } + {% + \protect\@gls@entry@field{#2}{#1}% + }% + }% } % \end{macrocode} %\end{macro} @@ -8391,47 +10808,24 @@ Dickimaw Books\\ % %\begin{macro}{\Glsxtrp} %\changes{1.07}{2016-08-15}{new} -%As above but use first letter upper case (but not for the -%bookmarks, which can't process \cs{uppercase}). +%As above but use first letter upper case. % \begin{macrocode} -\ifdef\texorpdfstring -{ - \newcommand{\Glsxtrp}[2]{% - \protect\NoCaseChange - {% - \protect\texorpdfstring - {% - \protect\glsxtrifinmark - {% - \ifcsdef{Glsxtrhead#1}% - {% - {\protect\csuse{Glsxtrhead#1}{#2}}% - }% - {% - \protect\@Gls@entry@field{#2}{#1}% - }% - }% - {% - \@Glsxtrp{#1}{#2}% - }% - }% - {% - \protect\@gls@entry@field{#2}{#1}% - }% - }% - } -} -{ - \newcommand{\Glsxtrp}[2]{% - \protect\NoCaseChange +\newcommand{\Glsxtrp}[2]{% + \protect\NoCaseChange + {% + \protect\glstexorpdfstring {% \protect\glsxtrifinmark {% \ifcsdef{Glsxtrhead#1}% {% - {\protect\csuse{Glsxtrhead#1}}% + {\protect\csuse{Glsxtrhead#1}{#2}}% }% {% +% \end{macrocode} +% \cs{@Gls@entry@field} is robust as from \sty{glossaries} v4.50, +% but continue to use \cs{protect} in case an older version is installed. +% \begin{macrocode} \protect\@Gls@entry@field{#2}{#1}% }% }% @@ -8439,49 +10833,25 @@ Dickimaw Books\\ \@Glsxtrp{#1}{#2}% }% }% - } + {% + \MFUsentencecase{\@gls@entry@field{#2}{#1}}% + }% + }% } +\glsmfuaddmap{\glsxtrp}{\Glsxtrp} % \end{macrocode} %\end{macro} % %\begin{macro}{\GLSxtrp} %\changes{1.07}{2016-08-15}{new} -%As above but all upper case (but not for the -%bookmarks, which can't process \cs{uppercase}). +%As above but all upper case. The bookmarks use +%\cs{glsuppercase}, which is expandable as from +%\sty{mfirstuc} v2.08+. % \begin{macrocode} -\ifdef\texorpdfstring -{ - \newcommand{\GLSxtrp}[2]{% - \protect\NoCaseChange - {% - \protect\texorpdfstring - {% - \protect\glsxtrifinmark - {% - \ifcsdef{GLSxtr#1}% - {% - {\protect\GLSxtrshort[noindex,hyper=false]{#1}[]}% - }% - {% - \protect\mfirstucMakeUppercase - {% - \protect\@gls@entry@field{#2}{#1}% - }% - }% - }% - {% - \@GLSxtrp{#1}{#2}% - }% - }% - {% - \protect\@gls@entry@field{#2}{#1}% - }% - }% - } -} -{ - \newcommand{\GLSxtrp}[2]{% - \protect\NoCaseChange +\newcommand{\GLSxtrp}[2]{% + \protect\NoCaseChange + {% + \protect\glstexorpdfstring {% \protect\glsxtrifinmark {% @@ -8490,7 +10860,7 @@ Dickimaw Books\\ {\protect\GLSxtrshort[noindex,hyper=false]{#1}[]}% }% {% - \protect\mfirstucMakeUppercase + \protect\glsuppercase {% \protect\@gls@entry@field{#2}{#1}% }% @@ -8500,23 +10870,27 @@ Dickimaw Books\\ \@GLSxtrp{#1}{#2}% }% }% - } + {% + \protect\GLSxtrusefield{#2}{#1}% + }% + }% } +\glsmfublocker{\GLSxtrp} % \end{macrocode} %\end{macro} % % -%\subsection{Entry Counting} +%\subsubsection{Entry Counting} % -% The (use) entry counting mechanism from \styfmt{glossaries} is adjusted +% The (use) entry counting mechanism from \sty{glossaries} is adjusted % here to work with category attributes. Provide a convenient % command to enable entry counting, set the \catattr{entrycount} -% attribute for given categories and redefine \ics{gls} etc to +% attribute for given categories and redefine \cs{gls} etc to % use \cs{cgls} instead. This form of entry counting is provided to % adjust the formatting if the number of times an entry has been % used (through commands that unset the first use flag) doesn't % exceeding the specified threshold. For link counting, see -% \sectionref{sec:linkcount}. +%\sectionref{sec:linkcount}. % % First adjust definitions of the unset and reset commands to % provide a hook, but changing the flag can cause problems in @@ -8569,8 +10943,12 @@ Dickimaw Books\\ % \begin{macrocode} \newcommand*{\@GlsXtrStartUnsetBuffering}{% \let\@glsxtr@org@unset@buffer\@glsxtr@unset@buffer - \def\@glsxtr@unset@buffer{}% + \GlsXtrClearUnsetBuffer \let\@glsunset\@glsxtrbuffer@unset + \let\org@glsxtrbuffer@check@repeats\@glsxtrbuffer@check@repeats + \renewcommand*{\@glsxtrbuffer@check@repeats}{% + \@@glsxtrbuffer@check@repeats + }% } % \end{macrocode} %\end{macro} @@ -8581,8 +10959,12 @@ Dickimaw Books\\ % \begin{macrocode} \newcommand*{\s@GlsXtrStartUnsetBuffering}{% \let\@glsxtr@org@unset@buffer\@glsxtr@unset@buffer - \def\@glsxtr@unset@buffer{}% + \GlsXtrClearUnsetBuffer \let\@glsunset\@glsxtrbuffer@nodup@unset + \let\org@glsxtrbuffer@check@repeats\@glsxtrbuffer@check@repeats + \renewcommand*{\@glsxtrbuffer@check@repeats}{% + \@@glsxtrbuffer@check@repeats + }% } % \end{macrocode} %\end{macro} @@ -8613,6 +10995,79 @@ Dickimaw Books\\ % \end{macrocode} %\end{macro} % +%\begin{macro}{\@glsxtrbuffer@check@repeats} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand*{\@glsxtrbuffer@check@repeats}{} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@@glsxtrbuffer@check@repeats} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand*{\@@glsxtrbuffer@check@repeats}{} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@@glsxtrbuffer@check@repeats@notused} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand*{\@@glsxtrbuffer@check@repeats@notused}{} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@@glsxtrbuffer@do@check@repeat} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newrobustcmd*{\@@glsxtrbuffer@do@check@repeat}{% + \expandafter\ifinlist\expandafter{\glslabel}{\@glsxtr@unset@buffer}% + {\@glslocalunset{\glslabel}}% + {\GlsXtrIfUnusedOrUndefined\glslabel + {\listxadd\@@glsxtrbuffer@check@repeats@notused{\glslabel}}{}}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GlsXtrUnsetBufferEnableRepeatLocal} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand*{\GlsXtrUnsetBufferEnableRepeatLocal}{% + \def\@@glsxtrbuffer@check@repeats{\@@glsxtrbuffer@do@check@repeat}% + \def\@@glsxtrbuffer@check@repeats@notused{}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GlsXtrUnsetBufferDisableRepeatLocal} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand*{\GlsXtrUnsetBufferDisableRepeatLocal}{% + \def\@@glsxtrbuffer@check@repeats{}% + \def\@@glsxtrbuffer@check@repeats@notused{}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GlsXtrResetLocalBuffer} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand*{\GlsXtrResetLocalBuffer}{% + \forlistloop\@glslocalreset\@@glsxtrbuffer@check@repeats@notused + \GlsXtrClearUnsetBuffer +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GlsXtrClearUnsetBuffer} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand*{\GlsXtrClearUnsetBuffer}{% + \def\@@glsxtrbuffer@check@repeats@notused{}% + \def\@glsxtr@unset@buffer{}% +} +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\GlsXtrStopUnsetBuffering} %\changes{1.30}{2018-04-25}{new} % \begin{macrocode} @@ -8630,6 +11085,7 @@ Dickimaw Books\\ \let\@glsunset\@glsxtr@unset \forlistloop\@glsunset\@glsxtr@unset@buffer \let\@glsxtr@unset@buffer\@glsxtr@org@unset@buffer + \let\@glsxtrbuffer@check@repeats\org@glsxtrbuffer@check@repeats } % \end{macrocode} %\end{macro} @@ -8641,6 +11097,7 @@ Dickimaw Books\\ \newcommand*{\s@GlsXtrStopUnsetBuffering}{% \forlistloop\@glslocalunset\@glsxtr@unset@buffer \let\@glsunset\@glsxtr@unset + \let\@glsxtrbuffer@check@repeats\org@glsxtrbuffer@check@repeats } % \end{macrocode} %\end{macro} @@ -8652,6 +11109,7 @@ Dickimaw Books\\ \newcommand*{\GlsXtrDiscardUnsetBuffering}{% \let\@glsunset\@glsxtr@unset \let\@glsxtr@unset@buffer\@glsxtr@org@unset@buffer + \let\@glsxtrbuffer@check@repeats\org@glsxtrbuffer@check@repeats } % \end{macrocode} %\end{macro} @@ -8801,6 +11259,17 @@ Dickimaw Books\\ % \end{macrocode} %\end{macro} % +%\begin{macro}{\ifglsresetcurrcount} +%\changes{1.49}{2022-10-14}{new} +%Determine whether or not to reset the entry counter when the first +%use flag is reset. This conditional will already be defined with +%\sty{glossaries} v4.50+. +% \begin{macrocode} +\ifdef\glsresetcurrcountfalse{}{\newif\ifglsresetcurrcount} +\glsresetcurrcountfalse +% \end{macrocode} +%\end{macro} +% % Redefine the entry counting commands to take into account the %\catattr{entrycount} attribute. %\begin{macro}{\glsenableentrycount} @@ -8850,12 +11319,16 @@ Dickimaw Books\\ \let\@glsxtr@entrycount@org@reset\glsxtrpostreset \renewcommand*{\glsxtrpostreset}[1]{% \@glsxtr@entrycount@org@reset{##1}% - \csgdef{glo@\glsdetoklabel{##1}@currcount}{0}% + \ifglsresetcurrcount + \csgdef{glo@\glsdetoklabel{##1}@currcount}{0}% + \fi }% \let\@glsxtr@entrycount@org@localreset\glsxtrpostlocalreset \renewcommand*{\glsxtrpostlocalreset}[1]{% \@glsxtr@entrycount@org@localreset{##1}% - \csdef{glo@\glsdetoklabel{##1}@currcount}{0}% + \ifglsresetcurrcount + \csdef{glo@\glsdetoklabel{##1}@currcount}{0}% + \fi }% % \end{macrocode} % Modifications to take into account the attributes that govern @@ -8887,6 +11360,21 @@ Dickimaw Books\\ % \end{macrocode} %\end{macro} % +%\begin{macro}{\@@newglossaryentry@defcounters} +%\changes{1.49}{2022-10-14}{new} +%Allow for docdef=restricted. +% \begin{macrocode} +\renewcommand*{\@@newglossaryentry@defcounters}{% + \csdef{glo@\@glo@label @currcount}{0}% + \ifnum\@glsxtr@docdefval=2\relax + \ifcsdef{glo@\@glo@label @prevcount}{}{\csdef{glo@\@glo@label @prevcount}{0}}% + \else + \csdef{glo@\@glo@label @prevcount}{0}% + \fi +} +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\@gls@write@entrycounts} % Modify this command so that it only writes the information for % entries with the \catattr{entrycount} attribute and issue @@ -9059,11 +11547,12 @@ Dickimaw Books\\ % \end{macrocode} %\end{macro} % -% Add all upper case versions not provided by \styfmt{glossaries}. +% Add all upper case versions not provided by \sty{glossaries}. %\begin{macro}{\cGLS} %\changes{0.5}{2015-12-07}{new} % \begin{macrocode} \newrobustcmd*{\cGLS}{\@gls@hyp@opt\@cGLS} +\glsmfublocker{\cGLS} % \end{macrocode} %\end{macro} %\begin{macro}{\@cGLS} @@ -9090,7 +11579,7 @@ Dickimaw Books\\ % text. % \begin{macrocode} \newcommand*{\cGLSformat}[2]{% - \expandafter\mfirstucMakeUppercase\expandafter{\cglsformat{#1}{#2}}% + \expandafter\glsuppercase\expandafter{\cglsformat{#1}{#2}}% } % \end{macrocode} %\end{macro} @@ -9099,6 +11588,7 @@ Dickimaw Books\\ %\changes{0.5}{2015-12-07}{new} % \begin{macrocode} \newrobustcmd*{\cGLSpl}{\@gls@hyp@opt\@cGLSpl} +\glsmfublocker{\cGLSpl} % \end{macrocode} %\end{macro} %\begin{macro}{\@cGLSpl} @@ -9125,7 +11615,7 @@ Dickimaw Books\\ % text. % \begin{macrocode} \newcommand*{\cGLSplformat}[2]{% - \expandafter\mfirstucMakeUppercase\expandafter{\cglsplformat{#1}{#2}}% + \expandafter\glsuppercase\expandafter{\cglsplformat{#1}{#2}}% } % \end{macrocode} %\end{macro} @@ -9394,11 +11884,12 @@ Dickimaw Books\\ {% % \end{macrocode} %\changes{1.46}{2021-09-20}{changed \cs{edef} to \cs{protected@edef}} +%\changes{1.49}{2022-10-14}{added \cs{ifglsresetcurrcount}} % \begin{macrocode} \protected@edef\@glsxtr@csname{\@glsxtr@currentunitcount{##1}}% \ifcsundef{\@glsxtr@csname}% {}% - {\csgdef{\@glsxtr@csname}{0}}% + {\ifglsresetcurrcount\csgdef{\@glsxtr@csname}{0}\fi}% }% {}% }% @@ -9409,11 +11900,12 @@ Dickimaw Books\\ {% % \end{macrocode} %\changes{1.46}{2021-09-20}{changed \cs{edef} to \cs{protected@edef}} +%\changes{1.49}{2022-10-14}{added \cs{ifglsresetcurrcount}} % \begin{macrocode} \protected@edef\@glsxtr@csname{\@glsxtr@currentunitcount{##1}}% \ifcsundef{\@glsxtr@csname}% {}% - {\csdef{\@glsxtr@csname}{0}}% + {\ifglsresetcurrcount\csdef{\@glsxtr@csname}{0}\fi}% }% {}% }% @@ -9564,13 +12056,13 @@ Dickimaw Books\\ %\end{macro} % % -%\subsection{Acronym Modifications} +%\subsubsection{Acronym Modifications} % It's more consistent to use the abbreviation code for acronyms, % but make some adjustments to allow for continued use of the -% \styfmt{glossaries} package's custom acronym format. (For example, +% \sty{glossaries} package's custom acronym format. (For example, % user may already have defined some acronym styles with % \cs{newacronymstyle} which they would like to continue to use.) -% The original \styfmt{glossaries} acronym code can be restored +% The original \sty{glossaries} acronym code can be restored % with \cs{RestoreAcronyms}, but adjust \cs{SetGenericNewAcronym} % so that \cs{newacronym} adds the category. % @@ -9628,14 +12120,14 @@ Dickimaw Books\\ \glslink[##1]{##2}{\Genacrfullformat{##2}{##3}}}% \renewcommand*{\ACRfullfmt}[3]{% \glslink[##1]{##2}{% - \mfirstucMakeUppercase{\genacrfullformat{##2}{##3}}}}% + \glsuppercase{\genacrfullformat{##2}{##3}}}}% \renewcommand*{\acrfullplfmt}[3]{% \glslink[##1]{##2}{\genplacrfullformat{##2}{##3}}}% \renewcommand*{\Acrfullplfmt}[3]{% \glslink[##1]{##2}{\Genplacrfullformat{##2}{##3}}}% \renewcommand*{\ACRfullplfmt}[3]{% \glslink[##1]{##2}{% - \mfirstucMakeUppercase{\genplacrfullformat{##2}{##3}}}}% + \glsuppercase{\genplacrfullformat{##2}{##3}}}}% \renewcommand*{\glsentryfull}[1]{\genacrfullformat{##1}{}}% \renewcommand*{\Glsentryfull}[1]{\Genacrfullformat{##1}{}}% \renewcommand*{\glsentryfullpl}[1]{\genplacrfullformat{##1}{}}% @@ -9674,7 +12166,7 @@ Dickimaw Books\\ % \end{macrocode} %\end{macro} % -%Need to provide a replacement for \ics{forallacronyms} since +%Need to provide a replacement for \cs{forallacronyms} since %\cs{@glsacronymlists} isn't available. % %\begin{macro}{\@glsxtr@abbrlists} @@ -9785,7 +12277,7 @@ Dickimaw Books\\ % \end{macrocode} % %\begin{macro}{\RestoreAcronyms} -% Restore acronyms to \styfmt{glossaries} interface. +% Restore acronyms to \sty{glossaries} interface. % \begin{macrocode} \newcommand*{\RestoreAcronyms}{% % \end{macrocode} @@ -9849,15 +12341,30 @@ Dickimaw Books\\ % \end{macrocode} %\end{macro} % -%\subsection{Indexing and Displaying Glossaries} +%\begin{macro}{\glsabspace} +%\changes{1.49}{2022-10-14}{new} +% Similar to \cs{glsacspace} but includes inner formatting. +% \begin{macrocode} +\newrobustcmd*{\glsabspace}[1]{% + \settowidth{\dimen@}{(\glsfirstabbrvfont{\glsentryshort{#1}})}% + \ifdim\dimen@<\glsacspacemax + \glsxtrgenentrytextfmt{~}% + \else + \glsxtrgenentrytextfmt{ }% + \fi +} +% \end{macrocode} +%\end{macro} +% +%\subsubsection{Indexing and Displaying Glossaries} %From time-to-time users ask if they can have one glossary sorted %normally and another sorted by definition or usage. With the -% base \styfmt{glossaries} package this can only be achieved with the +% base \sty{glossaries} package this can only be achieved with the % \qt{noidx} commands (Option~1). This is an attempt to mix and % match. % %First we need a list of the glossaries that require -%\gls{makeindex}\slash\gls{xindy}. +%\app{makeindex}\slash\app{xindy}. %\begin{macro}{\@glsxtr@reg@glosslist} %\changes{1.0}{2016-01-24}{new} % \begin{macrocode} @@ -9900,6 +12407,14 @@ Dickimaw Books\\ % \end{macrocode} %\end{macro} % +%\begin{macro}{\@gls@automake@types} +%\changes{1.49}{2022-10-14}{new} +%Added to \sty{glossaries} v4.50 so may not be defined. +% \begin{macrocode} +\providecommand{\@gls@automake@types}{\@glo@types} +% \end{macrocode} +%\end{macro} +% % Redefine \cs{makeglossaries} to take an optional argument. % This should be empty for the usual behaviour (all glossaries % need processing with an indexing application) or a comma-separated @@ -9911,6 +12426,15 @@ Dickimaw Books\\ %\changes{1.42}{2020-02-03}{added \cs{@domakeglossaries}} % \begin{macrocode} \renewcommand*{\makeglossaries}[1][]{% + \ifx\@glsxtr@record@setting\@glsxtr@record@setting@alsoindex + \edef\glsindexingsetting{bib2gls-\ifglsxindy xindy\else makeindex\fi}% + \else + \ifglsxindy + \def\glsindexingsetting{xindy}% + \else + \def\glsindexingsetting{makeindex}% + \fi + \fi \@domakeglossaries {% \@glsxtr@if@record@only @@ -9939,13 +12463,20 @@ Dickimaw Books\\ {You may only use the hybrid \string\makeglossaries[...]\space with record=off option}% \else + \appto\glsindexingsetting{-noidx}% % \end{macrocode} %\cs{@gls@@automake@immediate} was introduced to \sty{glossaries} %v4.42 so it may not be defined. %\changes{1.46}{2021-09-20}{changed \cs{edef} to \cs{protected@edef}} % \begin{macrocode} - \ifdef\@gls@@automake@immediate{\@gls@@automake@immediate}{}% \protected@edef\@glsxtr@reg@glosslist{#1}% +% \end{macrocode} +% \cs{@gls@@automake@immediate} uses \cs{@gls@automake@types} +% as from v4.50. Older versions use \cs{@glo@types} which will +% include the noidx glossaries. +% \begin{macrocode} + \let\@gls@automake@types\@glsxtr@reg@glosslist + \ifdef\@gls@@automake@immediate{\@gls@@automake@immediate}{}% \ifundef{\glswrite}{\newwrite\glswrite}{}% \protected@write\@auxout{}{\string\providecommand \string\@glsorder[1]{}} @@ -10136,17 +12667,41 @@ Dickimaw Books\\ \ifdef\@glo@check@sortallowed{\@glo@check@sortallowed\makeglossaries}{}% \fi }% +% \end{macrocode} +% Prohibit the use of \cs{glsxtrnoidxgroups}. +% \begin{macrocode} + \prohibit@glsxtrnoidxgroups +% \end{macrocode} +% Activate warnings for incompatible options. +% \begin{macrocode} + \let\gls@warn@makegloss@incompatible\@gls@warn@makegloss@incompatible }% }% } % \end{macrocode} %\end{macro} % +%\begin{macro}{\gls@warn@makegloss@incompatible} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand*{\gls@warn@makegloss@incompatible}[2]{} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@gls@warn@makegloss@incompatible} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand*{\@gls@warn@makegloss@incompatible}[2]{% + #2\GlossariesExtraWarning{#1\space is incompatible with \string\makeglossaries}% +} +% \end{macrocode} +%\end{macro} +% %The optional argument version of \cs{makeglossaries} needs an %adjustment to \cs{@printglossary} to allow \cs{@glo@assign@sortkey} %to pick up the glossary type. % -%Earlier versions of \styfmt{glossaries-extra} simply saved the +%Earlier versions of \sty{glossaries-extra} simply saved the %original version of \cs{@printglossary} with \cs{let} %\cs{@glsxtr@orgprintglossary}. This was later changed to actually %defining \cs{@glsxtr@orgprintglossary} to something similar with @@ -10192,7 +12747,7 @@ Dickimaw Books\\ \ifx\@glossary@default@style\relax \GlossariesWarning{No default glossary style provided \MessageBreak for the glossary `\@glo@type'. \MessageBreak - Using deprecated fallback. \MessageBreak + Using fallback. \MessageBreak To fix this set the style with \MessageBreak \string\setglossarystyle\space or use the \MessageBreak style key=value option}% @@ -10259,7 +12814,7 @@ Dickimaw Books\\ % %\begin{macro}{\@glsxtr@nopostpunc} %Provide a command that works like \cs{nopostdesc} but only -%switches of the punctuation without suppressing the post-description +%switches off the punctuation without suppressing the post-description %hook. %\changes{1.22}{2017-11-08}{new} % \begin{macrocode} @@ -10368,6 +12923,20 @@ Dickimaw Books\\ } % \end{macrocode} % +%\changes{1.49}{2022-10-14}{added \texttt{preamble} key for \texttt{printgloss}} +% \begin{macrocode} +\define@key{printgloss}{preamble}{% + \renewcommand{\glossarypreamble}{#1}% +} +% \end{macrocode} +% +%\changes{1.49}{2022-10-14}{added \texttt{postamble} key for \texttt{printgloss}} +% \begin{macrocode} +\define@key{printgloss}{postamble}{% + \renewcommand{\glossarypostamble}{#1}% +} +% \end{macrocode} +% %\begin{macro}{\glsxtrsetglossarylabel} %\changes{1.39}{2019-03-22}{new} %Set the label for subsequent glossaries. If the label is @@ -10394,6 +12963,8 @@ Dickimaw Books\\ % \begin{macrocode} \define@key{printgloss}{leveloffset}{% \@glsxtr@assign@leveloffset#1\relax + \gls@warn@noidxmakegloss@incompatible{option `leveloffset'} + {\@glsxtr@leveloffset=0\relax}% } % \end{macrocode} % @@ -10432,10 +13003,27 @@ Dickimaw Books\\ % %\changes{1.44}{2020-03-23}{added groups key} % \begin{macrocode} -\define@boolkey{printgloss}[glsxtr@printgloss@]{groups}[true]{} +\define@boolkey{printgloss}[glsxtr@printgloss@]{groups}[true]{% + \ifglsxtr@printgloss@groups + \else + \gls@warn@noidxmakegloss@incompatible{option `groups'}% + {\glsxtr@printgloss@groupstrue}% + \fi +} \glsxtr@printgloss@groupstrue % \end{macrocode} % +%\changes{1.49}{2022-10-14}{added flatten key} +% \begin{macrocode} +\define@boolkey{printgloss}[glsxtrprintgloss]{flatten}[true]{% + \ifglsxtrprintglossflatten + \gls@warn@noidxmakegloss@incompatible{option `flatten'}% + {\glsxtrprintglossflattenfalse}% + \fi +} +\glsxtrprintglossflattenfalse +% \end{macrocode} +% %\begin{macro}{\glsdohypertarget} %\changes{1.20}{2017-09-11}{added redefinition} %Redefine to insert \cs{@glsxtrhypernameprefix} before the target @@ -10662,6 +13250,44 @@ Dickimaw Books\\ % \end{macrocode} %\end{macro} % +%\begin{macro}{\glsxtrnoidxgroups} +%\changes{1.49}{2022-10-14}{new} +%Provide the ability to switch from unsrt to noidx code, but only +%for record=off. +% \begin{macrocode} +\newcommand*{\glsxtrnoidxgroups}{% + \ifdefequal\@glsxtr@record@setting\@glsxtr@record@setting@off + {% + \let\@gls@getgrouptitle\@gls@noidx@getgrouptitle + \let\glsxtr@org@getgrouptitle\@gls@getgrouptitle + }% + {\PackageError{glossaries-extra}{Can't use + \string\glsxtrunsrtgrouptonoidx\space with record=\@glsxtr@record@setting} + {\string\glsxtrunsrtgrouptonoidx\space is only available with record=off}}% + \global\let\prohibit@glsxtrnoidxgroups\@glsxtrnoidxgroups@nomakegloss +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsxtrnoidxgroups@nomakegloss} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand{\@glsxtrnoidxgroups@nomakegloss}{% + \PackageError{glossaries-extra}{Can't use + \string\glsxtrunsrtgrouptonoidx\space with \string\makeglossaries}{} +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\prohibit@glsxtrnoidxgroups} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand{\prohibit@glsxtrnoidxgroups}{% + \global\let\glsxtrnoidxgroups\@glsxtrnoidxgroups@nomakegloss +} +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\glsxtrgetgrouptitle} %\changes{1.14}{2017-04-18}{new} %Provide a user-level command to fetch the group title. The first @@ -10669,10 +13295,10 @@ Dickimaw Books\\ %sequence in which to store the title. % \begin{macrocode} \newrobustcmd{\glsxtrgetgrouptitle}[2]{% - \protected@edef\@glsxtr@titlelabel{glsxtr@grouptitle@#1}% - \@onelevel@sanitize\@glsxtr@titlelabel - \ifcsdef{\@glsxtr@titlelabel} - {\letcs{#2}{\@glsxtr@titlelabel}}% + \protected@edef\@glsxtr@titlecsname{glsxtr@grouptitle@#1}% + \@onelevel@sanitize\@glsxtr@titlecsname + \ifcsdef{\@glsxtr@titlecsname} + {\letcs{#2}{\@glsxtr@titlecsname}}% {\glsxtr@org@getgrouptitle{#1}{#2}}% } \let\@gls@getgrouptitle\glsxtrgetgrouptitle @@ -11267,12 +13893,16 @@ Dickimaw Books\\ %enforces a .glstex extension to avoid conflict. % \begin{macrocode} \newcommand*{\glsxtrresourcefile}[2][]{% + \@glsxtr@if@record@only + {\renewcommand{\glsindexingsetting}{bib2gls}}% + {\edef\glsindexingsetting{bib2gls-\ifglsxindy xindy\else makeindex\fi}}% % \end{macrocode} %The \pkgopt{record} option can't be set after this command. %\changes{1.21}{2017-11-03}{now disables record key} % \begin{macrocode} \disable@keys{glossaries-extra.sty}{record}% \glsxtr@writefields + \glsxtr@save@mfu \ifdefempty\GlsXtrDefaultResourceOptions {% \protected@write\@auxout{\glsxtrresourceinit}% @@ -11367,6 +13997,40 @@ Dickimaw Books\\ % \end{macrocode} %\end{macro} % +%\begin{macro}{\glsxtrMFUsave} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand*{\glsxtrMFUsave}{% + \ifdef\MFUsave + {% + \AtBeginDocument{\MFUsave}% + }% + {% + \GlossariesExtraWarning{mfirstuc.sty too old, + \string\glsxtrMFUsave\space has no effect. You need to upgrade + to mfirstuc v2.08}% + }% + \let\glsxtrMFUsave\relax +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtr@save@mfu} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\ifdef\MFUsave +{ + \newcommand*{\glsxtr@save@mfu}{% + \glsxtrMFUsave + \let\glsxtr@save@mfu\relax + } +} +{ + \newcommand*{\glsxtr@save@mfu}{} +} +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\glsxtr@fields} %\changes{1.11}{2017-01-19}{new} % \begin{macrocode} @@ -11457,19 +14121,20 @@ Dickimaw Books\\ \protected@write\@auxout{}{\string\glsxtr@pluralsuffixes {\glspluralsuffix}{\abbrvpluralsuffix}{\acrpluralsuffix}% {\glsxtrabbrvpluralsuffix}}% - \ifdef\inputencodingname - {% - \protected@write\@auxout{}{\string\glsxtr@texencoding{\inputencodingname}}% - }% +% \end{macrocode} +%\changes{1.49}{2022-10-14}{encoding test replaced \cs{ifdef} with +%\cs{ifdefvoid} and reversed args} +% \begin{macrocode} + \ifdefvoid\inputencodingname {% % \end{macrocode} -%If \sty{fontspec} has been loaded, assume UTF-8. (The encoding can -%be changed with \cs{XeTeXinputencoding}, but I can't work out how -%to determine the current encoding.) +%Assume UTF-8. +%\changes{1.49}{2022-10-14}{removed test for \sty{fontspec}} % \begin{macrocode} - \@ifpackageloaded{fontspec}% - {\protected@write\@auxout{}{\string\glsxtr@texencoding{utf8}}}% - {}% + \protected@write\@auxout{}{\string\glsxtr@texencoding{utf8}}% + }% + {% + \protected@write\@auxout{}{\string\glsxtr@texencoding{\inputencodingname}}% }% \protected@write\@auxout{}{\string\glsxtr@shortcutsval{\@glsxtr@shortcutsval}}% % \end{macrocode} @@ -11497,7 +14162,7 @@ Dickimaw Books\\ % \end{macrocode} %If \cs{makeglossaries} is also used, allow makeindex/xindy to %also be run, otherwise disable the error message about requiring -%\cs{makeglossaries} with \pkgopt[true]{automake}. +%\cs{makeglossaries} with \pkgopt{automake}. % \begin{macrocode} \ifx\@gls@doautomake\@gls@doautomake@err \let\@gls@doautomake\relax @@ -11522,14 +14187,22 @@ Dickimaw Books\\ % %\begin{macro}{\@glsxtr@do@automake@err} %\changes{1.14}{2017-04-18}{new} +%\sty{glossaries} v4.50+ now provides \cs{@gls@do@automake@err} so +%use that if defined. % \begin{macrocode} -\newcommand*{\@gls@doautomake@err}{% - \PackageError{glossaries}{You must use - \string\makeglossaries\space with automake=true} - {% - Either remove the automake=true setting or - add \string\makeglossaries\space to your document preamble.% - }% +\ifdef{\@gls@do@automake@err} +{ + \let\@gls@doautomake@err\@gls@do@automake@err +} +{ + \newcommand*{\@gls@doautomake@err}{% + \PackageError{glossaries}{You must use + \string\makeglossaries\space with automake=true} + {% + Either remove the automake=true setting or + add \string\makeglossaries\space to your document preamble.% + }% + } } % \end{macrocode} %\end{macro} @@ -11557,10 +14230,19 @@ Dickimaw Books\\ % \begin{macrocode} \newcommand*{\glsxtr@counterrecord}[3]{% \glsxtrfieldlistgadd{#1}{record.#2}{#3}% + \glsxtrAddCounterRecordHook{#1}{#2}{#3}% } % \end{macrocode} %\end{macro} % +%\begin{macro}{\glsxtrAddCounterRecordHook} +%\changes{1.49}{2022-10-14}{new} +%User hook. +% \begin{macrocode} +\newcommand{\glsxtrAddCounterRecordHook}[3]{} +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\@glsxtr@counterrecordhook} %\changes{1.12}{2017-02-03}{new} %Hook used by \cs{@glsxtr@dorecord}. @@ -11585,7 +14267,7 @@ Dickimaw Books\\ %\changes{1.12}{2017-02-03}{new} % \begin{macrocode} \newcommand*{\@glsxtr@docounterrecord}[1]{% - \protected@write\@auxout{}{\string\glsxtr@counterrecord + \@bibgls@write@aux{}{\string\glsxtr@counterrecord {\@gls@label}{#1}{\csuse{the#1}}}% } % \end{macrocode} @@ -11606,8 +14288,8 @@ Dickimaw Books\\ \newcommand*{\glsxtrglossentry}[1]{% \glsxtrtitleorpdforheading {\@glsxtrglossentry{#1}}% - {\glsentryname{#1}}% - {\glsxtrheadname{#1}}% + {\GlsXtrStandaloneEntryPdfName{#1}}% + {\GlsXtrStandaloneEntryHeadName{#1}}% } % \end{macrocode} %\end{macro} @@ -11634,8 +14316,26 @@ Dickimaw Books\\ \endgroup }% }% - {\glsentryname{#1}}% - {\glsxtrheadname{#1}}% + {\GlsXtrStandaloneEntryPdfName{#1}}% + {\GlsXtrStandaloneEntryHeadName{#1}}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GlsXtrStandaloneEntryHeadName} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand*{\GlsXtrStandaloneEntryHeadName}[1]{% + \glsxtrheadname{#1}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GlsXtrStandaloneEntryPdfName} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand*{\GlsXtrStandaloneEntryPdfName}[1]{% + \glsentryname{#1}% } % \end{macrocode} %\end{macro} @@ -11682,31 +14382,49 @@ Dickimaw Books\\ \newcommand*{\glsxtrglossentryother}[3]{% \ifstrempty{#1}% {% - \ifcsdef{glsxtrhead#3}% - {% - \glsxtrtitleorpdforheading - {\@glsxtrglossentryother{#2}{#3}{#1}}% - {\@gls@entry@field{#2}{#3}}% - {\csuse{glsxtrhead#3}{#2}}% - }% - {% - \glsxtrtitleorpdforheading - {\@glsxtrglossentryother{#2}{#3}{#1}}% - {\@gls@entry@field{#2}{#3}}% - {\@gls@entry@field{\NoCaseChange{#2}}{#3}}% - }% +% \end{macrocode} +%\changes{1.49}{2022-10-14}{use default header if first argument empty} +% \begin{macrocode} + \glsxtrtitleorpdforheading + {\@glsxtrglossentryother{#2}{#3}{\GlsXtrStandaloneEntryHeadOther{#3}{#2}}}% + {\GlsXtrStandaloneEntryPdfOther{#2}{#3}}% + {\GlsXtrStandaloneEntryHeadOther{#3}{#2}}% }% {% \glsxtrtitleorpdforheading {\@glsxtrglossentryother{#2}{#3}{#1}}% - {\@gls@entry@field{#2}{#3}}% + {\GlsXtrStandaloneEntryPdfOther{#2}{#3}}% {#1}% }% } % \end{macrocode} %\end{macro} +% +%\begin{macro}{\GlsXtrStandaloneEntryHeadOther} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand*{\GlsXtrStandaloneEntryHeadOther}[2]{% + \ifcsdef{glsxtrhead#2}% + {\csuse{glsxtrhead#2}{#1}}% + {\@gls@entry@field{\NoCaseChange{#1}}{#2}}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GlsXtrStandaloneEntryPdfOther} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand*{\GlsXtrStandaloneEntryPdfOther}[2]{% + \@gls@entry@field{#1}{#2}% +} +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\@glsxtrglossentryother} %\changes{1.22}{2017-11-08}{new} +%\begin{definition} +%\cs{\@glsxtrglossentryother}\marg{entry-label}\marg{field}\marg{header} +%\end{definition} %As \cs{@glsxtrglossentry} but uses a different field. % \begin{macrocode} \newrobustcmd*{\@glsxtrglossentryother}[3]{% @@ -11723,11 +14441,14 @@ Dickimaw Books\\ \ifglshasparent{#1}% {\GlsXtrStandaloneSubEntryItem{#1}}% {\glsentryitem{#1}}% - \GlsXtrStandaloneEntryOther{#1}% +% \end{macrocode} +%\changes{1.49}{2022-10-14}{bug fix: corrected arguments to \cs{GlsXtrStandaloneEntryOther}} +% \begin{macrocode} + \GlsXtrStandaloneEntryOther{#1}{#2}% \endgroup }% }% - {\@gls@entry@field{#1}{#2}}% + {\GlsXtrStandaloneEntryPdfOther{#1}{#2}}% {#3}% } % \end{macrocode} @@ -11814,50 +14535,47 @@ Dickimaw Books\\ }% {% % \end{macrocode} -%\changes{1.16}{2017-06-15}{corrected misspelt command} +% Setup local commands. % \begin{macrocode} - \key@ifundefined{glossentry}{group}% - {\let\@gls@getgrouptitle\@gls@noidx@getgrouptitle}% - {\let\@gls@getgrouptitle\@glsxtr@unsrt@getgrouptitle}% - \def\@gls@currentlettergroup{}% + \@glsxtr@unsrt@gloss@init % \end{macrocode} %A loop within the tabular-like styles can cause problems, so -%move the loop outside. +%move the loop outside. The entire glossary will be saved in +%\cs{@glsxtr@doglossary}, which will be built up in the loop. % \begin{macrocode} \def\@glsxtr@doglossary{% \begin{theglossary}% \glossaryheader \glsresetentrylist }% +% \end{macrocode} +% Iterate over all entries in the current glossary and add the relevant commands to +% \cs{@glsxtr@doglossary}. +% \begin{macrocode} \expandafter\@for\expandafter\glscurrententrylabel\expandafter :\expandafter=\csname glolist@\@glo@type\endcsname\do{% \ifdefempty{\glscurrententrylabel} {}% {% % \end{macrocode} -%Provide a hook (for example to measure width). +%Initialise hooks % \begin{macrocode} - \let\glsxtr@process\@firstofone - \let\printunsrtglossaryskipentry - \@glsxtr@printunsrtglossaryskipentry - \printunsrtglossaryentryprocesshook{\glscurrententrylabel}% + \@gls@xtr@initprocess % \end{macrocode} -%Don't check group for child entries. +%Process this entry (unless it has been skipped). % \begin{macrocode} \glsxtr@process {% \ifglsxtr@printgloss@groups % \end{macrocode} -% This still uses \cs{ifglshasparent} to determine whether or not to -% check for a change in the letter group. (It doesn't take the level -% offset into account because \app{bib2gls} only saves the group -% information for parentless entries.) +% Check if the group heading should be added and, if so, add it. +% \cs{@glsxtr@groupheading} will be empty if no group heading. % \begin{macrocode} - \ifglshasparent{\glscurrententrylabel}{}% + \glsxtraddgroup\glscurrententrylabel {% - \@glsxtr@checkgroup\glscurrententrylabel - \expandafter\appto\expandafter\@glsxtr@doglossary\expandafter - {\@glsxtr@groupheading}% + \@glsxtr@checkgroup\glscurrententrylabel + \expandafter\appto\expandafter\@glsxtr@doglossary\expandafter + {\@glsxtr@groupheading}% }% \fi % \end{macrocode} @@ -11877,6 +14595,89 @@ Dickimaw Books\\ % \end{macrocode} %\end{macro} % +%\begin{macro}{\@glsxtr@unsrt@gloss@init} +%\changes{1.49}{2022-10-14}{new} +%Initialise hooks needed at the start. +% \begin{macrocode} +\newcommand*{\@glsxtr@unsrt@gloss@init}{% +% \end{macrocode} +%Determine how to obtain the group information. +%\changes{1.16}{2017-06-15}{corrected misspelt command} +% \begin{macrocode} + \key@ifundefined{glossentry}{group}% + {\let\@gls@getgrouptitle\@gls@noidx@getgrouptitle}% + {\let\@gls@getgrouptitle\@glsxtr@unsrt@getgrouptitle}% +% \end{macrocode} +%Initialise current group information. +% \begin{macrocode} + \def\@gls@currentlettergroup{}% +% \end{macrocode} +%\changes{1.49}{2022-10-14}{save hierarchical level information} +%Need to keep track of the current group hierarchical level +% \begin{macrocode} + \def\@gls@currentlettergroup@level{-1}% +% \end{macrocode} +%and the current entry hierarchical level. +% \begin{macrocode} + \def\glscurrententrylevel{-1}% +% \end{macrocode} +% Initialise the root entry. This will be the most recent entry that +% doesn't have a parent. +% \begin{macrocode} + \def\glscurrentrootentry{}% +% \end{macrocode} +% Initialise the top-level entry. This will be the most recent entry that +% had level=0 (after adjustment). +% \begin{macrocode} + \def\glscurrenttoplevelentry{}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@gls@xtr@initprocess} +%\changes{1.49}{2022-10-14}{new} +%Initialise hooks needed for each iteration of the process loop. +% \begin{macrocode} +\newcommand*{\@gls@xtr@initprocess}{% +% \end{macrocode} +%Save the current hierarchical level (adjusted). +% \begin{macrocode} + \ifglsxtrprintglossflatten + \edef\glscurrententrylevel{\number\@glsxtr@leveloffset}% + \else + \edef\glscurrententrylevel{% + \number\numexpr\csname glo@\glscurrententrylabel @level\endcsname + + \@glsxtr@leveloffset}% + \fi +% \end{macrocode} +%If this level 0, update \cs{glscurrenttoplevelentry} +% \begin{macrocode} + \ifnum\glscurrententrylevel=0\relax + \let\glscurrenttoplevelentry\glscurrententrylabel + \fi +% \end{macrocode} +%If this entry doesn't have a parent, update \cs{glscurrentrootentry} +% \begin{macrocode} + \ifglsxtrprintglossflatten + \let\glscurrentrootentry\glscurrententrylabel + \else + \ifglshasparent{\glscurrententrylabel}{}% + {\let\glscurrentrootentry\glscurrententrylabel}% + \fi +% \end{macrocode} +%Initialise to do the current entry. +% \begin{macrocode} + \let\glsxtr@process\@firstofone +% \end{macrocode} +%Provide a way to skip the current entry. This will redefine +%\cs{glsxtr@process} to ignore its argument. +% \begin{macrocode} + \let\printunsrtglossaryskipentry\@glsxtr@printunsrtglossaryskipentry + \printunsrtglossaryentryprocesshook{\glscurrententrylabel}% +} +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\printunsrtinnerglossary} %\changes{1.44}{2020-03-23}{new} %Similar to \cs{printunsrtglossary} but doesn't add the section @@ -11916,7 +14717,7 @@ Dickimaw Books\\ \ifx\@glossary@default@style\relax \GlossariesWarning{No default glossary style provided \MessageBreak for the glossary `\@glo@type'. \MessageBreak - Using deprecated fallback. \MessageBreak + Using fallback. \MessageBreak To fix this set the style with \MessageBreak \string\setglossarystyle\space or use the \MessageBreak style key=value option}% @@ -11989,43 +14790,42 @@ Dickimaw Books\\ \GlossariesExtraWarning{No entries defined in glossary `\@glo@type'}% }% {% - \key@ifundefined{glossentry}{group}% - {\let\@gls@getgrouptitle\@gls@noidx@getgrouptitle}% - {\let\@gls@getgrouptitle\@glsxtr@unsrt@getgrouptitle}% - \def\@gls@currentlettergroup{}% +% \end{macrocode} +% Setup local commands. +% \begin{macrocode} + \@glsxtr@unsrt@gloss@init % \end{macrocode} %No header or reset. % \begin{macrocode} \def\@glsxtr@doglossary{}% +% \end{macrocode} +% Iterate over all entries in the current glossary and add the relevant commands to +% \cs{@glsxtr@doglossary}. +% \begin{macrocode} \expandafter\@for\expandafter\glscurrententrylabel\expandafter :\expandafter=\csname glolist@\@glo@type\endcsname\do{% \ifdefempty{\glscurrententrylabel} {}% {% % \end{macrocode} -%Provide a hook (for example to measure width). +%Initialise hooks % \begin{macrocode} - \let\glsxtr@process\@firstofone - \let\printunsrtglossaryskipentry - \@glsxtr@printunsrtglossaryskipentry - \printunsrtglossaryentryprocesshook{\glscurrententrylabel}% + \@gls@xtr@initprocess % \end{macrocode} -%Don't check group for child entries. +%Process this entry (unless it has been skipped). % \begin{macrocode} \glsxtr@process {% \ifglsxtr@printgloss@groups % \end{macrocode} -% This still uses \cs{ifglshasparent} to determine whether or not to -% check for a change in the letter group. (It doesn't take the level -% offset into account because \app{bib2gls} only saves the group -% information for parentless entries.) +% Check if the group heading should be added and, if so, add it. +% \cs{@glsxtr@groupheading} will be empty if no group heading. % \begin{macrocode} - \ifglshasparent{\glscurrententrylabel}{}% + \glsxtraddgroup\glscurrententrylabel {% - \@glsxtr@checkgroup\glscurrententrylabel - \expandafter\appto\expandafter\@glsxtr@doglossary\expandafter - {\@glsxtr@groupheading}% + \@glsxtr@checkgroup\glscurrententrylabel + \expandafter\appto\expandafter\@glsxtr@doglossary\expandafter + {\@glsxtr@groupheading}% }% \fi % \end{macrocode} @@ -12046,6 +14846,24 @@ Dickimaw Books\\ % \end{macrocode} %\end{macro} % +%\begin{macro}{\glsxtraddgroup} +%\changes{1.49}{2022-10-14}{new} +%Now that \app{bib2gls} v3.0+ has the ability to store group labels +%for sub-levels, provide a way to allow for this. This checks if the entry has +%a parent, which was used originally, unless the flatten option has been used. +%\app{bib2gls} will redefine this in the .glstex file if the +%group-level setting is used. +% \begin{macrocode} +\newcommand*{\glsxtraddgroup}[2]{% + \ifglsxtrprintglossflatten + #2% + \else + \ifglshasparent{#1}{}{#2}% + \fi +} +% \end{macrocode} +%\end{macro} +% % %\begin{macro}{\printunsrtglossaryentryprocesshook} %\changes{1.21}{2017-11-03}{new} @@ -12064,7 +14882,7 @@ can only be used within \string\printunsrtglossaryentryprocesshook}{}% % \end{macrocode} %\end{macro} % -%\begin{macro}{\printunsrtglossaryentryprocesshook} +%\begin{macro}{\@glsxtr@printunsrtglossaryskipentry} %\changes{1.21}{2017-11-03}{new} % \begin{macrocode} \newcommand*{\@glsxtr@printunsrtglossaryskipentry}{% @@ -12152,11 +14970,18 @@ can only be used within \string\printunsrtglossaryentryprocesshook}{}% \renewcommand*{\@glsxtrhypernameprefix}{record.#1.\csuse{theH#1}.\@gobble}% }% \renewcommand*{\glossarysection}[2][]{}% - \appto\glossarypostamble{\glspar\medskip\glspar}% + \appto\glossarypostamble{\printunsrtglossaryunitpostskip}% } % \end{macrocode} %\end{macro} % +%\begin{macro}{\printunsrtglossaryunitpostskip} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand*{\printunsrtglossaryunitpostskip}{\glspar\medskip\glspar} +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\print@noop@unsrtglossaryunit} %\changes{1.12}{2017-02-03}{new} % \begin{macrocode} @@ -12212,7 +15037,8 @@ can only be used within \string\printunsrtglossaryentryprocesshook}{}% %formerly in \cs{@glsxtr@noidx@do}.) Now that this is no longer %within a tabular environment, the global definitions aren't needed. %The result is now stored in \cs{@glsxtr@groupheading}, which will -%be empty if no heading is required. +%be empty if no heading is required. The current hierarchical level +%must have first been saved to \cs{glscurrententrylevel}. % \begin{macrocode} \newcommand*{\@glsxtr@checkgroup}[1]{% \def\@glsxtr@groupheading{}% @@ -12228,20 +15054,56 @@ can only be used within \string\printunsrtglossaryentryprocesshook}{}% \protected@edef\@glo@thislettergrp{% \csuse{glo@\glsdetoklabel{#1}@\glsxtrgroupfield}}% }% - \ifdefequal{\@glo@thislettergrp}{\@gls@currentlettergroup}% +% \end{macrocode} +%Need to keep track of the current group for the current level. +% \begin{macrocode} + \ifcsundef{@gls@currentlettergroup\romannumeral\glscurrententrylevel}% + {\csdef{@gls@currentlettergroup\romannumeral\glscurrententrylevel}{}}{}% +% \end{macrocode} +%Has the group label changed for the current level? +% \begin{macrocode} + \ifcsequal{@glo@thislettergrp}{@gls@currentlettergroup\romannumeral\glscurrententrylevel}% {}% {% - \ifdefempty{\@gls@currentlettergroup}{}% - {\def\@glsxtr@groupheading{\glsgroupskip}}% - \protected@eappto\@glsxtr@groupheading{% - \noexpand\glsgroupheading{\expandonce\@glo@thislettergrp}% + \ifdefempty\@glo@thislettergrp + {}% + {% + \ifnum\glscurrententrylevel>0\relax + \protected@eappto\@glsxtr@groupheading{% + \noexpand\glssubgroupheading + {\@gls@currentlettergroup@level}{\glscurrententrylevel}% + {\csuse{glo@\glsdetoklabel{#1}@parent}}% + {\expandonce\@glo@thislettergrp}% + }% + \else + \ifdefempty{\@gls@currentlettergroup}{}% + {% + \def\@glsxtr@groupheading{\glsgroupskip}% + }% + \protected@eappto\@glsxtr@groupheading{% + \noexpand\glsgroupheading{\expandonce\@glo@thislettergrp}% + }% + \fi + \let\@gls@currentlettergroup@level\glscurrententrylevel + \cslet{@gls@currentlettergroup\romannumeral\glscurrententrylevel}\@glo@thislettergrp }% }% - \let\@gls@currentlettergroup\@glo@thislettergrp } % \end{macrocode} %\end{macro} % +%\begin{macro}{\glssubgroupheading} +%\begin{definition} +%\cs{glssubgroupheading}\marg{previous level}\marg{level}\marg{parent}\marg{group label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} +%Default definition uses the same format as the top-level heading. +%Note that this won't include the group skip. +% \begin{macrocode} +\newcommand*{\glssubgroupheading}[4]{\glsgroupheading{#4}} +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\GlsXtrLocationField} %\changes{1.37}{2018-11-30}{new} %Stores the internal name of the location field. @@ -12254,7 +15116,7 @@ can only be used within \string\printunsrtglossaryentryprocesshook}{}% %\changes{1.11}{2017-01-19}{new} %Minor modification of \cs{@gls@noidx@do} to check for location %field if present, but also need to check for the \gloskey{group} -%field. +%field and flatten option. % \begin{macrocode} \newcommand{\@glsxtr@noidx@do}[1]{% \ifglsentryexists{#1}% @@ -12265,7 +15127,11 @@ can only be used within \string\printunsrtglossaryentryprocesshook}{}% % Use level number to determine whether or not this entry has a % parent. % \begin{macrocode} - \gls@level=\numexpr\csuse{glo@\glsdetoklabel{#1}@level}+\@glsxtr@leveloffset\relax + \ifglsxtrprintglossflatten + \gls@level=\@glsxtr@leveloffset\relax + \else + \gls@level=\numexpr\csuse{glo@\glsdetoklabel{#1}@level}+\@glsxtr@leveloffset\relax + \fi \ifnum\gls@level>0 \let\@glsxtr@ifischild\@firstoftwo \else @@ -12281,16 +15147,27 @@ can only be used within \string\printunsrtglossaryentryprocesshook}{}% {% \ifdefvoid{\@gls@location}% {% - \ifdefvoid{\@gls@loclist}% - {% - \expandafter\subglossentry\expandafter{\number\gls@level}{#1}{}% - }% +% \end{macrocode} +%\changes{1.49}{2022-10-14}{check if location field has been changed} +%If \cs{GlsXtrLocationField} has been changed then don't fallback on +%\gloskey{loclist}. +% \begin{macrocode} + \ifdefstring{\GlsXtrLocationField}{location}% {% - \expandafter\subglossentry\expandafter{\number\gls@level}{#1}% + \ifdefvoid{\@gls@loclist}% {% - \glossaryentrynumbers{\glsnoidxloclist{\@gls@loclist}}% + \expandafter\subglossentry\expandafter{\number\gls@level}{#1}{}% + }% + {% + \expandafter\subglossentry\expandafter{\number\gls@level}{#1}% + {% + \glossaryentrynumbers{\glsnoidxloclist{\@gls@loclist}}% + }% }% }% + {% + \expandafter\subglossentry\expandafter{\number\gls@level}{#1}{}% + }% }% {% \expandafter\subglossentry\expandafter @@ -12303,16 +15180,27 @@ can only be used within \string\printunsrtglossaryentryprocesshook}{}% % \begin{macrocode} \ifdefvoid{\@gls@location}% {% - \ifdefvoid{\@gls@loclist} - {% - \glossentry{#1}{}% - }% +% \end{macrocode} +%\changes{1.49}{2022-10-14}{check if location field has been changed} +%If \cs{GlsXtrLocationField} has been changed then don't fallback on +%\gloskey{loclist}. +% \begin{macrocode} + \ifdefstring{\GlsXtrLocationField}{location}% {% - \glossentry{#1}% + \ifdefvoid{\@gls@loclist} {% - \glossaryentrynumbers{\glsnoidxloclist{\@gls@loclist}}% + \glossentry{#1}{}% + }% + {% + \glossentry{#1}% + {% + \glossaryentrynumbers{\glsnoidxloclist{\@gls@loclist}}% + }% }% }% + {% + \glossentry{#1}{}% + }% }% {% \glossentry{#1}% @@ -12344,6 +15232,15 @@ can only be used within \string\printunsrtglossaryentryprocesshook}{}% %help make it unique, but it might feasibly contain %\gloskey[glslink]{thevalue} where the value might contain commands.) % +%\begin{macro}{\glsxtrdoidentify} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand*{\glsxtrdoidentify}[1]{% + \ifdefequal\@glsxtr@record@setting\@glsxtr@record@setting@off{}{#1}% +} +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\@glsxtr@providenewgls} %\changes{1.37}{2018-11-30}{new} % \begin{macrocode} @@ -12357,11 +15254,12 @@ can only be used within \string\printunsrtglossaryentryprocesshook}{}% %\begin{macro}{\glsxtridentifyglslike} %\changes{1.37}{2018-11-30}{new} %Identify the command given in the second argument for the benefit -%of \gls{bib2gls}. +%of \app{bib2gls} and also identify command as a blocker for +%\cs{makefirstuc}. % \begin{macrocode} \newcommand{\glsxtridentifyglslike}[2]{% - \ifdefequal\@glsxtr@record@setting\@glsxtr@record@setting@off - {}% + \glsmfublocker{#2}% + \glsxtrdoidentify {% \@glsxtr@providenewgls \protected@write\@auxout{}{\string\@glsxtr@newglslike{#1}{\string#2}}% @@ -12370,10 +15268,137 @@ can only be used within \string\printunsrtglossaryentryprocesshook}{}% % \end{macrocode} %\end{macro} % +%\begin{macro}{\@glsxtr@providenewglsfamily} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand*{\@glsxtr@providenewglsfamily}{% + \protected@write\@auxout{}{\string\providecommand{\string\@glsxtr@newglslikefamily}[8]{}}% + \let\@glsxtr@providenewglsfamily\relax +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtridentifyglsfamily} +%\changes{1.49}{2022-10-14}{new} +%\begin{definition} +%\cs{glsxtridentifyglsfamily}\marg{options}\marg{prefix}\marg{gls}\marg{glspl}\marg{Gls}\marg{Glspl}\marg{GLS}\marg{GLSpl} +%\end{definition} +%Identify the family of commands for the benefit +%of \app{bib2gls} and also establishes a sentence-case mapping. +% \begin{macrocode} +\newcommand{\glsxtridentifyglsfamily}[8]{% + \glsmfuaddmap{#3}{#5}% + \glsmfuaddmap{#4}{#6}% + \glsmfublocker{#7}% + \glsmfublocker{#8}% + \glsxtrdoidentify + {% + \@glsxtr@providenewglsfamily + \protected@write\@auxout{}{\string\@glsxtr@newglslikefamily{\detokenize{#1}}{\detokenize{#2}}{\detokenize{#3}}{\detokenize{#4}}{\detokenize{#5}}{\detokenize{#6}}{\detokenize{#7}}{\detokenize{#8}}}% + }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsxtr@providenewglslink} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand*{\@glsxtr@providenewglslink}{% + \protected@write\@auxout{}{\string\providecommand{\string\@glsxtr@newglslink}[2]{}}% + \let\@glsxtr@providenewglslink\relax +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtridentifyglslink} +%\changes{1.49}{2022-10-14}{new} +%Identify the command given in the second argument for the benefit +%of \app{bib2gls} and identify the command as a blocker for +%\cs{makefirstuc}. +% \begin{macrocode} +\newcommand{\glsxtridentifyglslink}[2]{% + \glsmfublocker{#2}% + \glsxtrdoidentify + {% + \@glsxtr@providenewglslink + \protected@write\@auxout{}{\string\@glsxtr@newglslink{#1}{\string#2}}% + }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsxtrnewglslink} +%\changes{1.49}{2022-10-14}{new} +%\begin{definition} +%\cs{@glsxtrnewglslink}\oarg{options}\marg{prefix}\marg{cs}\marg{inner cs +%name} +%\end{definition} +% \begin{macrocode} +\newcommand*{\@glsxtrnewglslink}[4]{% + \ifdef{#3}% + {% + \PackageError{glossaries-extra}{Command \string#3\space already +defined}{}% + }% + {% +% \end{macrocode} +%Write information to the aux file for bib2gls. +% \begin{macrocode} + \glsxtridentifyglslink{#2}{#3}% + \ifcsdef{@#4link@#2}% + {% + \advance\@glsxtrnewgls@inner by \@ne + \def\@glsxtrnewgls@innercsname{@#4link\number\@glsxtrnewgls@inner @#2}% + }% + {\def\@glsxtrnewgls@innercsname{@#4link@#2}}% + \expandafter\newrobustcmd\expandafter*\expandafter + #3\expandafter{\expandafter\@gls@hyp@opt\csname\@glsxtrnewgls@innercsname\endcsname}% + \ifstrempty{#1}% + {% + \expandafter\newcommand\expandafter*\csname\@glsxtrnewgls@innercsname\endcsname[2][]{% + \csname #4\endcsname{##1}{#2##2}% + }% + }% + {% + \expandafter\newcommand\expandafter*\csname\@glsxtrnewgls@innercsname\endcsname[2][]{% + \csname #4\endcsname{#1,##1}{#2##2}% + }% + }% + }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrnewglslink} +%\begin{definition} +%\cs{glsxtrnewglslink}\oarg{options}\marg{prefix}\marg{cs} +%\end{definition} +%The first argument prepends to the options and the second argument is the prefix. +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newrobustcmd*{\glsxtrnewglslink}[3][]{% + \@glsxtrnewglslink{#1}{#2}{#3}{@gls@@link}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrnewglsdisp} +%\begin{definition} +%\cs{glsxtrnewglsdisp}\oarg{options}\marg{prefix}\marg{cs} +%\end{definition} +%The first argument prepends to the options and the second argument is the prefix. +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newrobustcmd*{\glsxtrnewglsdisp}[3][]{% + \@glsxtrnewglslink{#1}{#2}{#3}{@glsdisp}% +} +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\@glsxtrnewgls} %\changes{1.21}{2017-11-03}{new} %\begin{definition} -%\cs{glsxtrnewgls}\oarg{options}\marg{prefix}\marg{cs}\marg{inner cs +%\cs{@glsxtrnewgls}\oarg{options}\marg{prefix}\marg{cs}\marg{inner cs %name} %\end{definition} % @@ -12437,6 +15462,7 @@ defined}{}% %\changes{1.21}{2017-11-03}{new} % \begin{macrocode} \newrobustcmd*{\glsxtrnewglslike}[6][]{% + \glsxtridentifyglsfamily{#1}{#2}{#3}{#4}{#5}{#6}{}{}% \@glsxtrnewgls{#1}{#2}{#3}{gls}% \@glsxtrnewgls{#1}{#2}{#4}{glspl}% \@glsxtrnewgls{#1}{#2}{#5}{Gls}% @@ -12452,6 +15478,7 @@ defined}{}% %\changes{1.21}{2017-11-03}{new} % \begin{macrocode} \newrobustcmd*{\glsxtrnewGLSlike}[4][]{% + \glsxtridentifyglsfamily{#1}{#2}{}{}{}{}{#3}{#4}% \@glsxtrnewgls{#1}{#2}{#3}{GLS}% \@glsxtrnewgls{#1}{#2}{#4}{GLSpl}% } @@ -12473,6 +15500,7 @@ defined}{}% %\changes{1.21}{2017-11-03}{new} % \begin{macrocode} \newrobustcmd*{\glsxtrnewrglslike}[6][]{% + \glsxtridentifyglsfamily{#1}{#2}{#3}{#4}{#5}{#6}{}{}% \@glsxtrnewgls{#1}{#2}{#3}{rgls}% \@glsxtrnewgls{#1}{#2}{#4}{rglspl}% \@glsxtrnewgls{#1}{#2}{#5}{rGls}% @@ -12486,6 +15514,7 @@ defined}{}% %As \cs{glsxtrnewGLSlike} but for \cs{rGLS} etc. % \begin{macrocode} \newrobustcmd*{\glsxtrnewrGLSlike}[4][]{% + \glsxtridentifyglsfamily{#1}{#2}{}{}{}{}{#3}{#4}% \@glsxtrnewgls{#1}{#2}{#3}{rGLS}% \@glsxtrnewgls{#1}{#2}{#4}{rGLSpl}% } @@ -12553,6 +15582,12 @@ defined}{}% \renewcommand*{\Glspl}{\rGlspl}% \renewcommand*{\GLS}{\rGLS}% \renewcommand*{\GLSpl}{\rGLSpl}% + \renewcommand{\shortcut@gls}{\rgls}% + \renewcommand{\shortcut@glspl}{\rglspl}% + \renewcommand{\shortcut@Gls}{\rGls}% + \renewcommand{\shortcut@Glspl}{\rGlspl}% + \renewcommand{\shortcut@GLS}{\rGLS}% + \renewcommand{\shortcut@GLSpl}{\rGLSpl}% } % \end{macrocode} %\end{macro} @@ -12622,6 +15657,10 @@ defined}{}% %Save local setting. % \begin{macrocode} \@gls@save@glslocal +% \end{macrocode} +%Initialise preunset, prereset and postunset +% \begin{macrocode} + \glsinitreunsets \glsxtrinitwrgloss \glslinkpresetkeys \setkeys{glslink}{#1}% @@ -12637,12 +15676,12 @@ defined}{}% \glslinkwrcontent {% \ifglsxtrinitwrglossbefore - \@do@wrglossary{#2}% + \glsxtr@wrglossary@encap{#2}{\@do@wrglossary{#2}}% \fi #3% \ifglsxtrinitwrglossbefore \else - \@do@wrglossary{#2}% + \glsxtr@wrglossary@encap{#2}{\@do@wrglossary{#2}}% \fi }% \@gls@restore@glslocal @@ -12723,6 +15762,7 @@ defined}{}% %\changes{1.21}{2017-11-03}{new} % \begin{macrocode} \newrobustcmd*{\rGls}{\@gls@hyp@opt\@rGls} +\glsmfuaddmap{\rgls}{\rGls} % \end{macrocode} %\end{macro} %\begin{macro}{\@rGls} @@ -12752,6 +15792,7 @@ defined}{}% %\changes{1.21}{2017-11-03}{new} % \begin{macrocode} \newrobustcmd*{\rGlspl}{\@gls@hyp@opt\@rGlspl} +\glsmfuaddmap{\rglspl}{\rGlspl} % \end{macrocode} %\end{macro} %\begin{macro}{\@rGlspl} @@ -12782,6 +15823,7 @@ defined}{}% %\changes{1.21}{2017-11-03}{new} % \begin{macrocode} \newrobustcmd*{\rGLS}{\@gls@hyp@opt\@rGLS} +\glsmfublocker{\rGLS}% % \end{macrocode} %\end{macro} %\begin{macro}{\@rGLS} @@ -12812,6 +15854,7 @@ defined}{}% %\changes{1.21}{2017-11-03}{new} % \begin{macrocode} \newrobustcmd*{\rGLSpl}{\@gls@hyp@opt\@rGLSpl} +\glsmfublocker{\rGLSpl}% % \end{macrocode} %\end{macro} %\begin{macro}{\@rGLSpl} @@ -12886,7 +15929,7 @@ defined}{}% %\changes{1.21}{2017-11-03}{new} % \begin{macrocode} \newcommand*{\rGLSformat}[2]{% - \expandafter\mfirstucMakeUppercase\expandafter{\rglsformat{#1}{#2}}% + \expandafter\glsuppercase\expandafter{\rglsformat{#1}{#2}}% } % \end{macrocode} %\end{macro} @@ -12895,12 +15938,12 @@ defined}{}% %\changes{1.21}{2017-11-03}{new} % \begin{macrocode} \newcommand*{\rGLSplformat}[2]{% - \expandafter\mfirstucMakeUppercase\expandafter{\rglsplformat{#1}{#2}}% + \expandafter\glsuppercase\expandafter{\rglsplformat{#1}{#2}}% } % \end{macrocode} %\end{macro} % -%\section{Link Counting} +%\subsection{Link Counting} %\label{sec:linkcount} %This is different to the entry counting provided by the base %package (which counts the number of times the first use flag is @@ -13033,16 +16076,20 @@ defined}{}% % \end{macrocode} %\end{macro} % -%\section{Integration with glossaries-accsupp} +%\subsection{Integration with glossaries-accsupp} % Provide better integration with the \sty{glossaries-accsupp} % package. (Must be loaded before the main code of -% \styfmt{glossaries-extra} either explicitly or through the +% \sty{glossaries-extra} either explicitly or through the % \pkgopt{accsupp} package option.) % % These commands have their definitions set according to whether -% or not \styfmt{glossaries-extra} has been loaded. +% or not \sty{glossaries-extra} has been loaded. %\changes{0.5.2}{2015-12-08}{fixed typo in glossaries-accsupp and tidied up code to use % just one \cs{@ifpackageloaded}} +% +%To allow for formatting commands that need to go inside all other commands +%(such as the commands provided by \sty{soul}), also add version +% of each command that takes a text-block command as an argument. % \begin{macrocode} \@ifpackageloaded{glossaries-accsupp} { @@ -13063,6 +16110,22 @@ defined}{}% % \end{macrocode} %\end{macro} % +%\begin{macro}{\glsaccessfmtname} +%\begin{definition} +%\cs{glsaccessfmtname}\marg{insert}\marg{cs}\marg{label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\glsaccessfmtname}[3]{% + \glsnameaccessdisplay + {% + \glsfmtfield{#1}{#2}{#3}{name}% + }% + {#3}% + } +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\Glsaccessname} % Display the \gloskey{name} value (no link and no check for existence) % with the first letter converted to upper case. @@ -13078,6 +16141,22 @@ defined}{}% % \end{macrocode} %\end{macro} % +%\begin{macro}{\Glsaccessfmtname} +%\begin{definition} +%\cs{Glsaccessfmtname}\marg{insert}\marg{cs}\marg{label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\Glsaccessfmtname}[3]{% + \glsnameaccessdisplay + {% + \Glsfmtfield{#1}{#2}{#3}{name}% + }% + {#3}% + } +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\GLSaccessname} % Display the \gloskey{name} value (no link and no check for existence) % converted to upper case. @@ -13086,13 +16165,29 @@ defined}{}% \newcommand*{\GLSaccessname}[1]{% \glsnameaccessdisplay {% - \mfirstucMakeUppercase{\glsentryname{#1}}% + \glsuppercase{\glsentryname{#1}}% }% {#1}% } % \end{macrocode} %\end{macro} % +%\begin{macro}{\GLSaccessfmtname} +%\begin{definition} +%\cs{GLSaccessfmtname}\marg{insert}\marg{cs}\marg{label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\GLSaccessfmtname}[3]{% + \glsnameaccessdisplay + {% + \GLSfmtfield{#1}{#2}{#3}{name}% + }% + {#3}% + } +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\glsaccesstext} % Display the \gloskey{text} value (no link and no check for existence). %\changes{0.3}{2015-12-02}{new} @@ -13107,6 +16202,22 @@ defined}{}% % \end{macrocode} %\end{macro} % +%\begin{macro}{\glsaccessfmttext} +%\begin{definition} +%\cs{glsaccessfmttext}\marg{insert}\marg{cs}\marg{label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\glsaccessfmttext}[3]{% + \glstextaccessdisplay + {% + \glsfmtfield{#1}{#2}{#3}{text}% + }% + {#3}% + } +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\Glsaccesstext} % Display the \gloskey{text} value (no link and no check for existence) % with the first letter converted to upper case. @@ -13122,6 +16233,22 @@ defined}{}% % \end{macrocode} %\end{macro} % +%\begin{macro}{\Glsaccessfmttext} +%\begin{definition} +%\cs{Glsaccessfmttext}\marg{insert}\marg{cs}\marg{label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\Glsaccessfmttext}[3]{% + \glstextaccessdisplay + {% + \Glsfmtfield{#1}{#2}{#3}{text}% + }% + {#3}% + } +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\GLSaccesstext} % Display the \gloskey{text} value (no link and no check for existence) % converted to upper case. @@ -13130,13 +16257,29 @@ defined}{}% \newcommand*{\GLSaccesstext}[1]{% \glstextaccessdisplay {% - \mfirstucMakeUppercase{\glsentrytext{#1}}% + \glsuppercase{\glsentrytext{#1}}% }% {#1}% } % \end{macrocode} %\end{macro} % +%\begin{macro}{\GLSaccessfmttext} +%\begin{definition} +%\cs{GLSaccessfmttext}\marg{insert}\marg{cs}\marg{label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\GLSaccessfmttext}[3]{% + \glstextaccessdisplay + {% + \GLSfmtfield{#1}{#2}{#3}{text}% + }% + {#3}% + } +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\glsaccessplural} % Display the \gloskey{plural} value (no link and no check for existence). %\changes{0.3}{2015-12-02}{new} @@ -13151,6 +16294,22 @@ defined}{}% % \end{macrocode} %\end{macro} % +%\begin{macro}{\glsaccessfmtplural} +%\begin{definition} +%\cs{glsaccessfmtplural}\marg{insert}\marg{cs}\marg{label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\glsaccessfmtplural}[3]{% + \glspluralaccessdisplay + {% + \glsfmtfield{#1}{#2}{#3}{plural}% + }% + {#3}% + } +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\Glsaccessplural} % Display the \gloskey{plural} value (no link and no check for existence) % with the first letter converted to upper case. @@ -13166,6 +16325,22 @@ defined}{}% % \end{macrocode} %\end{macro} % +%\begin{macro}{\Glsaccessfmtplural} +%\begin{definition} +%\cs{Glsaccessfmtplural}\marg{insert}\marg{cs}\marg{label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\Glsaccessfmtplural}[3]{% + \glspluralaccessdisplay + {% + \Glsfmtfield{#1}{#2}{#3}{plural}% + }% + {#3}% + } +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\GLSaccessplural} % Display the \gloskey{plural} value (no link and no check for existence) % converted to upper case. @@ -13174,13 +16349,29 @@ defined}{}% \newcommand*{\GLSaccessplural}[1]{% \glspluralaccessdisplay {% - \mfirstucMakeUppercase{\glsentryplural{#1}}% + \glsuppercase{\glsentryplural{#1}}% }% {#1}% } % \end{macrocode} %\end{macro} % +%\begin{macro}{\GLSaccessfmtplural} +%\begin{definition} +%\cs{GLSaccessfmtplural}\marg{insert}\marg{cs}\marg{label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\GLSaccessfmtplural}[3]{% + \glspluralaccessdisplay + {% + \GLSfmtfield{#1}{#2}{#3}{plural}% + }% + {#3}% + } +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\glsaccessfirst} % Display the \gloskey{first} value (no link and no check for existence). %\changes{0.3}{2015-12-02}{new} @@ -13195,6 +16386,22 @@ defined}{}% % \end{macrocode} %\end{macro} % +%\begin{macro}{\glsaccessfmtfirst} +%\begin{definition} +%\cs{glsaccessfmtfirst}\marg{insert}\marg{cs}\marg{label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\glsaccessfmtfirst}[3]{% + \glsfirstaccessdisplay + {% + \glsfmtfield{#1}{#2}{#3}{first}% + }% + {#3}% + } +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\Glsaccessfirst} % Display the \gloskey{first} value (no link and no check for existence) % with the first letter converted to upper case. @@ -13210,6 +16417,22 @@ defined}{}% % \end{macrocode} %\end{macro} % +%\begin{macro}{\Glsaccessfmtfirst} +%\begin{definition} +%\cs{Glsaccessfmtfirst}\marg{insert}\marg{cs}\marg{label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\Glsaccessfmtfirst}[3]{% + \glsfirstaccessdisplay + {% + \Glsfmtfield{#1}{#2}{#3}{first}% + }% + {#3}% + } +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\GLSaccessfirst} % Display the \gloskey{first} value (no link and no check for existence) % converted to upper case. @@ -13218,13 +16441,29 @@ defined}{}% \newcommand*{\GLSaccessfirst}[1]{% \glsfirstaccessdisplay {% - \mfirstucMakeUppercase{\glsentryfirst{#1}}% + \glsuppercase{\glsentryfirst{#1}}% }% {#1}% } % \end{macrocode} %\end{macro} % +%\begin{macro}{\GLSaccessfmtfirst} +%\begin{definition} +%\cs{GLSaccessfmtfirst}\marg{insert}\marg{cs}\marg{label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\GLSaccessfmtfirst}[3]{% + \glsfirstaccessdisplay + {% + \GLSfmtfield{#1}{#2}{#3}{first}% + }% + {#3}% + } +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\glsaccessfirstplural} % Display the \gloskey{firstplural} value (no link and no check for existence). %\changes{0.3}{2015-12-02}{new} @@ -13239,6 +16478,22 @@ defined}{}% % \end{macrocode} %\end{macro} % +%\begin{macro}{\glsaccessfmtfirstplural} +%\begin{definition} +%\cs{glsaccessfmtfirstplural}\marg{insert}\marg{cs}\marg{label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\glsaccessfmtfirstplural}[3]{% + \glsfirstpluralaccessdisplay + {% + \glsfmtfield{#1}{#2}{#3}{firstpl}% + }% + {#3}% + } +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\Glsaccessfirstplural} % Display the \gloskey{firstplural} value (no link and no check for existence) % with the first letter converted to upper case. @@ -13254,6 +16509,22 @@ defined}{}% % \end{macrocode} %\end{macro} % +%\begin{macro}{\Glsaccessfmtfirstplural} +%\begin{definition} +%\cs{Glsaccessfmtfirstplural}\marg{insert}\marg{cs}\marg{label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\Glsaccessfmtfirstplural}[3]{% + \glsfirstpluralaccessdisplay + {% + \Glsfmtfield{#1}{#2}{#3}{firstpl}% + }% + {#3}% + } +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\GLSaccessfirstplural} % Display the \gloskey{firstplural} value (no link and no check for existence) % converted to upper case. @@ -13262,13 +16533,29 @@ defined}{}% \newcommand*{\GLSaccessfirstplural}[1]{% \glsfirstpluralaccessdisplay {% - \mfirstucMakeUppercase{\glsentryfirstplural{#1}}% + \glsuppercase{\glsentryfirstplural{#1}}% }% {#1}% } % \end{macrocode} %\end{macro} % +%\begin{macro}{\GLSaccessfmtfirstplural} +%\begin{definition} +%\cs{GLSaccessfmtfirstplural}\marg{insert}\marg{cs}\marg{label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\GLSaccessfmtfirstplural}[3]{% + \glsfirstpluralaccessdisplay + {% + \GLSfmtfield{#1}{#2}{#3}{firstpl}% + }% + {#3}% + } +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\glsaccesssymbol} % Display the \gloskey{symbol} value (no link and no check for existence). %\changes{0.3}{2015-12-02}{new} @@ -13283,6 +16570,22 @@ defined}{}% % \end{macrocode} %\end{macro} % +%\begin{macro}{\glsaccessfmtsymbol} +%\begin{definition} +%\cs{glsaccessfmtsymbol}\marg{insert}\marg{cs}\marg{label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\glsaccessfmtsymbol}[3]{% + \glssymbolaccessdisplay + {% + \glsfmtfield{#1}{#2}{#3}{symbol}% + }% + {#3}% + } +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\Glsaccesssymbol} % Display the \gloskey{symbol} value (no link and no check for existence) % with the first letter converted to upper case. @@ -13298,6 +16601,22 @@ defined}{}% % \end{macrocode} %\end{macro} % +%\begin{macro}{\Glsaccessfmtsymbol} +%\begin{definition} +%\cs{Glsaccessfmtsymbol}\marg{insert}\marg{cs}\marg{label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\Glsaccessfmtsymbol}[3]{% + \glssymbolaccessdisplay + {% + \Glsfmtfield{#1}{#2}{#3}{symbol}% + }% + {#3}% + } +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\GLSaccesssymbol} % Display the \gloskey{symbol} value (no link and no check for existence) % converted to upper case. @@ -13306,13 +16625,29 @@ defined}{}% \newcommand*{\GLSaccesssymbol}[1]{% \glssymbolaccessdisplay {% - \mfirstucMakeUppercase{\glsentrysymbol{#1}}% + \glsuppercase{\glsentrysymbol{#1}}% }% {#1}% } % \end{macrocode} %\end{macro} % +%\begin{macro}{\GLSaccessfmtsymbol} +%\begin{definition} +%\cs{GLSaccessfmtsymbol}\marg{insert}\marg{cs}\marg{label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\GLSaccessfmtsymbol}[3]{% + \glssymbolaccessdisplay + {% + \GLSfmtfield{#1}{#2}{#3}{symbol}% + }% + {#3}% + } +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\glsaccesssymbolplural} % Display the \gloskey{symbolplural} value (no link and no check for existence). %\changes{0.3}{2015-12-02}{new} @@ -13327,6 +16662,22 @@ defined}{}% % \end{macrocode} %\end{macro} % +%\begin{macro}{\glsaccessfmtsymbolplural} +%\begin{definition} +%\cs{glsaccessfmtsymbolplural}\marg{insert}\marg{cs}\marg{label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\glsaccessfmtsymbolplural}[3]{% + \glssymbolpluralaccessdisplay + {% + \glsfmtfield{#1}{#2}{#3}{symbolplural}% + }% + {#3}% + } +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\Glsaccesssymbolplural} % Display the \gloskey{symbolplural} value (no link and no check for existence) % with the first letter converted to upper case. @@ -13342,6 +16693,22 @@ defined}{}% % \end{macrocode} %\end{macro} % +%\begin{macro}{\Glsaccessfmtsymbolplural} +%\begin{definition} +%\cs{Glsaccessfmtsymbolplural}\marg{insert}\marg{cs}\marg{label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\Glsaccessfmtsymbolplural}[3]{% + \glssymbolpluralaccessdisplay + {% + \Glsfmtfield{#1}{#2}{#3}{symbolplural}% + }% + {#3}% + } +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\GLSaccesssymbolplural} % Display the \gloskey{symbolplural} value (no link and no check for existence) % converted to upper case. @@ -13350,13 +16717,29 @@ defined}{}% \newcommand*{\GLSaccesssymbolplural}[1]{% \glssymbolpluralaccessdisplay {% - \mfirstucMakeUppercase{\glsentrysymbolplural{#1}}% + \glsuppercase{\glsentrysymbolplural{#1}}% }% {#1}% } % \end{macrocode} %\end{macro} % +%\begin{macro}{\GLSaccessfmtsymbolplural} +%\begin{definition} +%\cs{GLSaccessfmtsymbolplural}\marg{insert}\marg{cs}\marg{label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\GLSaccessfmtsymbolplural}[3]{% + \glssymbolpluralaccessdisplay + {% + \GLSfmtfield{#1}{#2}{#3}{symbolplural}% + }% + {#3}% + } +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\glsaccessdesc} % Display the \gloskey{desc} value (no link and no check for existence). %\changes{0.3}{2015-12-02}{new} @@ -13371,6 +16754,22 @@ defined}{}% % \end{macrocode} %\end{macro} % +%\begin{macro}{\glsaccessfmtdesc} +%\begin{definition} +%\cs{glsaccessfmtdesc}\marg{insert}\marg{cs}\marg{label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\glsaccessfmtdesc}[3]{% + \glsdescaccessdisplay + {% + \glsfmtfield{#1}{#2}{#3}{desc}% + }% + {#3}% + } +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\Glsaccessdesc} % Display the \gloskey{desc} value (no link and no check for existence) % with the first letter converted to upper case. @@ -13386,6 +16785,22 @@ defined}{}% % \end{macrocode} %\end{macro} % +%\begin{macro}{\Glsaccessfmtdesc} +%\begin{definition} +%\cs{Glsaccessfmtdesc}\marg{insert}\marg{cs}\marg{label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\Glsaccessfmtdesc}[3]{% + \glsdescaccessdisplay + {% + \Glsfmtfield{#1}{#2}{#3}{desc}% + }% + {#3}% + } +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\GLSaccessdesc} % Display the \gloskey{desc} value (no link and no check for existence) % converted to upper case. @@ -13394,13 +16809,29 @@ defined}{}% \newcommand*{\GLSaccessdesc}[1]{% \glsdescriptionaccessdisplay {% - \mfirstucMakeUppercase{\glsentrydesc{#1}}% + \glsuppercase{\glsentrydesc{#1}}% }% {#1}% } % \end{macrocode} %\end{macro} % +%\begin{macro}{\GLSaccessfmtdesc} +%\begin{definition} +%\cs{GLSaccessfmtdesc}\marg{insert}\marg{cs}\marg{label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\GLSaccessfmtdesc}[3]{% + \glsdescaccessdisplay + {% + \GLSfmtfield{#1}{#2}{#3}{desc}% + }% + {#3}% + } +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\glsaccessdescplural} % Display the \gloskey{descplural} value (no link and no check for existence). %\changes{0.3}{2015-12-02}{new} @@ -13415,6 +16846,22 @@ defined}{}% % \end{macrocode} %\end{macro} % +%\begin{macro}{\glsaccessfmtdescplural} +%\begin{definition} +%\cs{glsaccessfmtdescplural}\marg{insert}\marg{cs}\marg{label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\glsaccessfmtdescplural}[3]{% + \glsdescpluralaccessdisplay + {% + \glsfmtfield{#1}{#2}{#3}{descplural}% + }% + {#3}% + } +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\Glsaccessdescplural} % Display the \gloskey{descplural} value (no link and no check for existence) % with the first letter converted to upper case. @@ -13430,6 +16877,22 @@ defined}{}% % \end{macrocode} %\end{macro} % +%\begin{macro}{\Glsaccessfmtdescplural} +%\begin{definition} +%\cs{Glsaccessfmtdescplural}\marg{insert}\marg{cs}\marg{label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\Glsaccessfmtdescplural}[3]{% + \glsdescpluralaccessdisplay + {% + \Glsfmtfield{#1}{#2}{#3}{descplural}% + }% + {#3}% + } +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\GLSaccessdescplural} % Display the \gloskey{descplural} value (no link and no check for existence) % converted to upper case. @@ -13438,13 +16901,29 @@ defined}{}% \newcommand*{\GLSaccessdescplural}[1]{% \glsdescriptionpluralaccessdisplay {% - \mfirstucMakeUppercase{\glsentrydescplural{#1}}% + \glsuppercase{\glsentrydescplural{#1}}% }% {#1}% } % \end{macrocode} %\end{macro} % +%\begin{macro}{\GLSaccessfmtdescplural} +%\begin{definition} +%\cs{GLSaccessfmtdescplural}\marg{insert}\marg{cs}\marg{label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\GLSaccessfmtdescplural}[3]{% + \glsdescpluralaccessdisplay + {% + \GLSfmtfield{#1}{#2}{#3}{descplural}% + }% + {#3}% + } +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\glsaccessshort} % Display the short form (no link and no check for existence). %\changes{0.3}{2015-12-02}{new} @@ -13459,6 +16938,22 @@ defined}{}% % \end{macrocode} %\end{macro} % +%\begin{macro}{\glsaccessfmtshort} +%\begin{definition} +%\cs{glsaccessfmtshort}\marg{insert}\marg{cs}\marg{label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\glsaccessfmtshort}[3]{% + \glsshortaccessdisplay + {% + \glsfmtfield{#1}{#2}{#3}{short}% + }% + {#3}% + } +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\Glsaccessshort} % Display the short form with first letter converted to uppercase % (no link and no check for existence). @@ -13474,6 +16969,22 @@ defined}{}% % \end{macrocode} %\end{macro} % +%\begin{macro}{\Glsaccessfmtshort} +%\begin{definition} +%\cs{Glsaccessfmtshort}\marg{insert}\marg{cs}\marg{label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\Glsaccessfmtshort}[3]{% + \glsshortaccessdisplay + {% + \Glsfmtfield{#1}{#2}{#3}{short}% + }% + {#3}% + } +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\GLSaccessshort} % Display the \gloskey{short} value (no link and no check for existence) % converted to upper case. @@ -13482,13 +16993,29 @@ defined}{}% \newcommand*{\GLSaccessshort}[1]{% \glsshortaccessdisplay {% - \mfirstucMakeUppercase{\glsentryshort{#1}}% + \glsuppercase{\glsentryshort{#1}}% }% {#1}% } % \end{macrocode} %\end{macro} % +%\begin{macro}{\GLSaccessfmtshort} +%\begin{definition} +%\cs{GLSaccessfmtshort}\marg{insert}\marg{cs}\marg{label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\GLSaccessfmtshort}[3]{% + \glsshortaccessdisplay + {% + \GLSfmtfield{#1}{#2}{#3}{short}% + }% + {#3}% + } +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\glsaccessshortpl} % Display the short plural form (no link and no check for existence). %\changes{0.3}{2015-12-02}{new} @@ -13503,8 +17030,24 @@ defined}{}% % \end{macrocode} %\end{macro} % -%\begin{macro}{\Glsaccessshortpl} -% Display the short plural form with first letter converted to +%\begin{macro}{\glsaccessfmtshortpl} +%\begin{definition} +%\cs{glsaccessfmtshortpl}\marg{insert}\marg{cs}\marg{label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\glsaccessfmtshortpl}[3]{% + \glsshortpluralaccessdisplay + {% + \glsfmtfield{#1}{#2}{#3}{shortpl}% + }% + {#3}% + } +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\Glsaccessshortpl} +% Display the short plural form with first letter converted to % uppercase (no link and no check for existence). %\changes{0.3}{2015-12-02}{new} % \begin{macrocode} @@ -13518,6 +17061,22 @@ defined}{}% % \end{macrocode} %\end{macro} % +%\begin{macro}{\Glsaccessfmtshortpl} +%\begin{definition} +%\cs{Glsaccessfmtshortpl}\marg{insert}\marg{cs}\marg{label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\Glsaccessfmtshortpl}[3]{% + \glsshortpluralaccessdisplay + {% + \Glsfmtfield{#1}{#2}{#3}{shortpl}% + }% + {#3}% + } +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\GLSaccessshortpl} % Display the \gloskey{shortplural} value (no link and no check for existence) % converted to upper case. @@ -13526,13 +17085,29 @@ defined}{}% \newcommand*{\GLSaccessshortpl}[1]{% \glsshortpluralaccessdisplay {% - \mfirstucMakeUppercase{\glsentryshortpl{#1}}% + \glsuppercase{\glsentryshortpl{#1}}% }% {#1}% } % \end{macrocode} %\end{macro} % +%\begin{macro}{\GLSaccessfmtshortpl} +%\begin{definition} +%\cs{GLSaccessfmtshortpl}\marg{insert}\marg{cs}\marg{label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\GLSaccessfmtshortpl}[3]{% + \glsshortpluralaccessdisplay + {% + \GLSfmtfield{#1}{#2}{#3}{shortpl}% + }% + {#3}% + } +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\glsaccesslong} % Display the long form (no link and no check for existence). %\changes{0.3}{2015-12-02}{new} @@ -13543,17 +17118,48 @@ defined}{}% % \end{macrocode} %\end{macro} % +%\begin{macro}{\glsaccessfmtlong} +%\begin{definition} +%\cs{glsaccessfmtlong}\marg{insert}\marg{cs}\marg{label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\glsaccessfmtlong}[3]{% + \glslongaccessdisplay + {% + \glsfmtfield{#1}{#2}{#3}{long}% + }% + {#3}% + } +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\Glsaccesslong} % Display the long form (no link and no check for existence). %\changes{0.3}{2015-12-02}{new} % \begin{macrocode} - \newcommand*{\Glsaccesslong}[1]{% \glslongaccessdisplay{\Glsentrylong{#1}}{#1}% } % \end{macrocode} %\end{macro} % +%\begin{macro}{\Glsaccessfmtlong} +%\begin{definition} +%\cs{Glsaccessfmtlong}\marg{insert}\marg{cs}\marg{label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\Glsaccessfmtlong}[3]{% + \glslongaccessdisplay + {% + \Glsfmtfield{#1}{#2}{#3}{long}% + }% + {#3}% + } +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\GLSaccesslong} % Display the \gloskey{long} value (no link and no check for existence) % converted to upper case. @@ -13562,13 +17168,29 @@ defined}{}% \newcommand*{\GLSaccesslong}[1]{% \glslongaccessdisplay {% - \mfirstucMakeUppercase{\glsentrylong{#1}}% + \glsuppercase{\glsentrylong{#1}}% }% {#1}% } % \end{macrocode} %\end{macro} % +%\begin{macro}{\GLSaccessfmtlong} +%\begin{definition} +%\cs{GLSaccessfmtlong}\marg{insert}\marg{cs}\marg{label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\GLSaccessfmtlong}[3]{% + \glslongaccessdisplay + {% + \GLSfmtfield{#1}{#2}{#3}{long}% + }% + {#3}% + } +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\glsaccesslongpl} % Display the long plural form (no link and no check for existence). %\changes{0.5.2}{2015-12-08}{new} @@ -13579,6 +17201,22 @@ defined}{}% % \end{macrocode} %\end{macro} % +%\begin{macro}{\glsaccessfmtlongpl} +%\begin{definition} +%\cs{glsaccessfmtlongpl}\marg{insert}\marg{cs}\marg{label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\glsaccessfmtlongpl}[3]{% + \glslongpluralaccessdisplay + {% + \glsfmtfield{#1}{#2}{#3}{longpl}% + }% + {#3}% + } +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\Glsaccesslongpl} % Display the long plural form (no link and no check for existence). %\changes{0.5.2}{2015-12-08}{new} @@ -13590,6 +17228,22 @@ defined}{}% % \end{macrocode} %\end{macro} % +%\begin{macro}{\Glsaccessfmtlongpl} +%\begin{definition} +%\cs{Glsaccessfmtlongpl}\marg{insert}\marg{cs}\marg{label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\Glsaccessfmtlongpl}[3]{% + \glslongpluralaccessdisplay + {% + \Glsfmtfield{#1}{#2}{#3}{longpl}% + }% + {#3}% + } +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\GLSaccesslongpl} % Display the \gloskey{longplural} value (no link and no check for existence) % converted to upper case. @@ -13598,302 +17252,1155 @@ defined}{}% \newcommand*{\GLSaccesslongpl}[1]{% \glslongpluralaccessdisplay {% - \mfirstucMakeUppercase{\glsentrylongpl{#1}}% + \glsuppercase{\glsentrylongpl{#1}}% }% {#1}% } % \end{macrocode} %\end{macro} % -% Keys for accessibility support. +%\begin{macro}{\GLSaccessfmtlongpl} +%\begin{definition} +%\cs{GLSaccessfmtlongpl}\marg{insert}\marg{cs}\marg{label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} % \begin{macrocode} - \define@key{glsxtrabbrv}{access}{% - \def\@gls@nameaccess{#1}% + \newcommand*{\GLSaccessfmtlongpl}[3]{% + \glslongpluralaccessdisplay + {% + \GLSfmtfield{#1}{#2}{#3}{longpl}% + }% + {#3}% } % \end{macrocode} +%\end{macro} +% +%The user accessibility fields were added to +%\sty{glossaries-accsupp} v4.45 so these may not be defined. % +%USER1 +%\begin{macro}{\glsaccessuseri} +% Display the \gloskey{user1} value (no link and no check for existence). +%\changes{1.49}{2022-10-14}{new} % \begin{macrocode} - \define@key{glsxtrabbrv}{textaccess}{% - \def\@gls@textaccess{#1}% + \ifdef\glsuseriaccessdisplay + { + \newcommand*{\glsaccessuseri}[1]{% + \glsuseriaccessdisplay + {% + \glsentryuseri{#1}% + }% + {#1}% + } + } + { + \newcommand*{\glsaccessuseri}[1]{% + \glsentryuseri{#1}% + } } % \end{macrocode} +%\end{macro} % +%\begin{macro}{\glsaccessfmtuseri} +%\begin{definition} +%\cs{glsaccessfmtuseri}\marg{insert}\marg{cs}\marg{label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} % \begin{macrocode} - \define@key{glsxtrabbrv}{pluralaccess}{% - \def\@gls@pluralaccess{#1}% + \ifdef\glsuseriaccessdisplay + { + \newcommand*{\glsaccessfmtuseri}[3]{% + \glsuseriaccessdisplay + {% + \glsfmtfield{#1}{#2}{#3}{useri}% + }% + {#3}% + } + } + { + \newcommand*{\glsaccessfmtuseri}[3]{% + \glsfmtfield{#1}{#2}{#3}{useri}% + } } % \end{macrocode} +%\end{macro} % +%\begin{macro}{\Glsaccessuseri} +% Display the \gloskey{user1} value (no link and no check for existence) +% with the first letter converted to upper case. +%\changes{1.49}{2022-10-14}{new} % \begin{macrocode} - \define@key{glsxtrabbrv}{firstaccess}{% - \def\@gls@firstaccess{#1}% + \ifdef\glsuseriaccessdisplay + { + \newcommand*{\Glsaccessuseri}[1]{% + \glsuseriaccessdisplay + {% + \Glsentryuseri{#1}% + }% + {#1}% + } + } + { + \newcommand*{\Glsaccessuseri}[1]{% + \Glsentryuseri{#1}% + } } % \end{macrocode} +%\end{macro} % +%\begin{macro}{\Glsaccessfmtuseri} +%\begin{definition} +%\cs{Glsaccessfmtuseri}\marg{insert}\marg{cs}\marg{label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} % \begin{macrocode} - \define@key{glsxtrabbrv}{firstpluralaccess}{% - \def\@gls@firstpluralaccess{#1}% + \ifdef\glsuseriaccessdisplay + { + \newcommand*{\Glsaccessfmtuseri}[3]{% + \glsuseriaccessdisplay + {% + \Glsfmtfield{#1}{#2}{#3}{useri}% + }% + {#3}% + } + } + { + \newcommand*{\Glsaccessfmtuseri}[3]{% + \Glsfmtfield{#1}{#2}{#3}{useri}% + } } % \end{macrocode} +%\end{macro} % +%\begin{macro}{\GLSaccessuseri} +% Display the \gloskey{user1} value (no link and no check for existence) +% converted to upper case. +%\changes{1.49}{2022-10-14}{new} % \begin{macrocode} - \define@key{glsxtrabbrv}{shortaccess}{% - \def\@gls@shortaccess{#1}% + \ifdef\glsuseriaccessdisplay + { + \newcommand*{\GLSaccessuseri}[1]{% + \glsuseriaccessdisplay + {% + \glsuppercase{\glsentryuseri{#1}}% + }% + {#1}% + } + } + { + \newcommand*{\GLSaccessuseri}[1]{% + \glsuppercase{\glsentryuseri{#1}}% + } } % \end{macrocode} +%\end{macro} % +%\begin{macro}{\GLSaccessfmtuseri} +%\begin{definition} +%\cs{GLSaccessfmtuseri}\marg{insert}\marg{cs}\marg{label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} % \begin{macrocode} - \define@key{glsxtrabbrv}{shortpluralaccess}{% - \def\@gls@shortaccesspl{#1}% + \ifdef\glsuseriaccessdisplay + { + \newcommand*{\GLSaccessfmtuseri}[3]{% + \glsuseriaccessdisplay + {% + \GLSfmtfield{#1}{#2}{#3}{useri}% + }% + {#3}% + } + } + { + \newcommand*{\GLSaccessfmtuseri}[3]{% + \GLSfmtfield{#1}{#2}{#3}{useri}% + } } % \end{macrocode} +%\end{macro} % +%USER2 +%\begin{macro}{\glsaccessuserii} +% Display the \gloskey{user2} value (no link and no check for existence). +%\changes{1.49}{2022-10-14}{new} % \begin{macrocode} - \define@key{glsxtrabbrv}{longaccess}{% - \def\@gls@longaccess{#1}% + \ifdef\glsuseriiaccessdisplay + { + \newcommand*{\glsaccessuserii}[1]{% + \glsuseriiaccessdisplay + {% + \glsentryuserii{#1}% + }% + {#1}% + } + } + { + \newcommand*{\glsaccessuserii}[1]{% + \glsentryuserii{#1}% + } } % \end{macrocode} +%\end{macro} % +%\begin{macro}{\glsaccessfmtuserii} +%\begin{definition} +%\cs{glsaccessfmtuserii}\marg{insert}\marg{cs}\marg{label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} % \begin{macrocode} - \define@key{glsxtrabbrv}{shortlonglaccess}{% - \def\@gls@longaccesspl{#1}% + \ifdef\glsuseriiaccessdisplay + { + \newcommand*{\glsaccessfmtuserii}[3]{% + \glsuseriiaccessdisplay + {% + \glsfmtfield{#1}{#2}{#3}{userii}% + }% + {#3}% + } + } + { + \newcommand*{\glsaccessfmtuserii}[3]{% + \glsfmtfield{#1}{#2}{#3}{userii}% + } } % \end{macrocode} -%\begin{macro}{\@gls@initaccesskeys} -%\changes{1.31}{2018-05-09}{new} +%\end{macro} +% +%\begin{macro}{\Glsaccessuserii} +% Display the \gloskey{user2} value (no link and no check for existence) +% with the first letter converted to upper case. +%\changes{1.49}{2022-10-14}{new} % \begin{macrocode} - \newcommand*{\@gls@initaccesskeys}{% - \def\@gls@nameaccess{}% - \def\@gls@textaccess{}% - \def\@gls@pluralaccess{}% - \def\@gls@firstaccess{}% - \def\@gls@firstpluralaccess{}% - \def\@gls@shortaccess{}% - \def\@gls@shortaccesspl{}% - \def\@gls@longaccess{}% - \def\@gls@longaccesspl{}% + \ifdef\glsuseriiaccessdisplay + { + \newcommand*{\Glsaccessuserii}[1]{% + \glsuseriiaccessdisplay + {% + \Glsentryuserii{#1}% + }% + {#1}% + } + } + { + \newcommand*{\Glsaccessuserii}[1]{% + \Glsentryuserii{#1}% + } } % \end{macrocode} %\end{macro} % -%\begin{macro}{\@gls@ifaccessattribute@set} +%\begin{macro}{\Glsaccessfmtuserii} %\begin{definition} -%\cs{\@gls@ifaccessattribute@set}\marg{attribute}\marg{true}\marg{false} +%\cs{Glsaccessfmtuserii}\marg{insert}\marg{cs}\marg{label} %\end{definition} -%\changes{1.31}{2018-05-09}{new} +%\changes{1.49}{2022-10-14}{new} % \begin{macrocode} -\newcommand*{\@gls@ifaccessattribute@set}[3]{% - \glsifcategoryattribute{\glscategorylabel}{access#1}{true}% - {#2}% - {% - \glsifcategoryattribute{\glscategorylabel}{access#1}{false}% - {#3}% - {% - \glsifcategoryattribute{\glscategorylabel}{#1}{true}% - {#2}% + \ifdef\glsuseriiaccessdisplay + { + \newcommand*{\Glsaccessfmtuserii}[3]{% + \glsuseriiaccessdisplay + {% + \Glsfmtfield{#1}{#2}{#3}{userii}% + }% {#3}% - }% - }% -} + } + } + { + \newcommand*{\Glsaccessfmtuserii}[3]{% + \Glsfmtfield{#1}{#2}{#3}{userii}% + } + } % \end{macrocode} %\end{macro} % -%As from \sty{glossaries} v4.45, the replacement text support has -%been corrected so that the accessibility support for abbreviations -%use the \qt{E} (expanded value) element. This should actually -%contain the long form since it's supposed to explain the -%abbreviation. This is a bit redundant on first use for styles like -%\abbrstyle{long-short}. +%\begin{macro}{\GLSaccessuserii} +% Display the \gloskey{user2} value (no link and no check for existence) +% converted to upper case. +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \ifdef\glsuseriiaccessdisplay + { + \newcommand*{\GLSaccessuserii}[1]{% + \glsuseriiaccessdisplay + {% + \glsuppercase{\glsentryuserii{#1}}% + }% + {#1}% + } + } + { + \newcommand*{\GLSaccessuserii}[1]{% + \glsuppercase{\glsentryuserii{#1}}% + } + } +% \end{macrocode} +%\end{macro} % -%\begin{macro}{\glsdefaultshortaccess} -%\changes{1.42}{2020-02-03}{new} +%\begin{macro}{\GLSaccessfmtuserii} %\begin{definition} -%\cs{glsdefaultshortaccess}\marg{long}\marg{short} +%\cs{GLSaccessfmtuserii}\marg{insert}\marg{cs}\marg{label} %\end{definition} -%This command was only introduced to \sty{glossaries-accsupp} 1.42 -%so it may not be defined. +%\changes{1.49}{2022-10-14}{new} % \begin{macrocode} - \def\glsdefaultshortaccess#1#2{#1 (#2)} + \ifdef\glsuseriiaccessdisplay + { + \newcommand*{\GLSaccessfmtuserii}[3]{% + \glsuseriiaccessdisplay + {% + \GLSfmtfield{#1}{#2}{#3}{userii}% + }% + {#3}% + } + } + { + \newcommand*{\GLSaccessfmtuserii}[3]{% + \GLSfmtfield{#1}{#2}{#3}{userii}% + } + } % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrassignactualsetup} -%\changes{1.42}{2020-02-03}{new} +%USER3 +%\begin{macro}{\glsaccessuseriii} +% Display the \gloskey{user3} value (no link and no check for existence). +%\changes{1.49}{2022-10-14}{new} % \begin{macrocode} - \newcommand{\glsxtrassignactualsetup}{% - \let\@\empty - \let\emph\@firstofone - \let\textbf\@firstofone - \let\textmd\@firstofone - \let\textit\@firstofone - \let\textsl\@firstofone - \let\textsc\@firstofone - \let\textrm\@firstofone - \let\textsf\@firstofone - \let\texttt\@firstofone + \ifdef\glsuseriiiaccessdisplay + { + \newcommand*{\glsaccessuseriii}[1]{% + \glsuseriiiaccessdisplay + {% + \glsentryuseriii{#1}% + }% + {#1}% + } + } + { + \newcommand*{\glsaccessuseriii}[1]{% + \glsentryuseriii{#1}% + } } % \end{macrocode} %\end{macro} % -%\begin{macro}{\@gls@assign@actual} -%\changes{1.42}{2020-02-03}{new} +%\begin{macro}{\glsaccessfmtuseriii} +%\begin{definition} +%\cs{glsaccessfmtuseriii}\marg{insert}\marg{cs}\marg{label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} % \begin{macrocode} - \ifdef\pdfstringdef + \ifdef\glsuseriiiaccessdisplay { - \newcommand{\@gls@assign@actual}{% - \begingroup - \glsxtrassignactualsetup - \pdfstringdef\@gls@actualshort{\glsxtrorgshort}% - \pdfstringdef\@gls@actuallong{\glsxtrorglong}% - \pdfstringdef\@gls@actualshortpl{\@gls@shortpl}% - \pdfstringdef\@gls@actuallongpl{\@gls@longpl}% - \protected@edef\@gls@tmp{\endgroup - \def\noexpand\@gls@actualshort{\expandonce\@gls@actualshort}% - \def\noexpand\@gls@actuallong{\expandonce\@gls@actuallong}% - \def\noexpand\@gls@actualshortpl{\expandonce\@gls@actualshortpl}% - \def\noexpand\@gls@actuallongpl{\expandonce\@gls@actuallongpl}% - }% - \@gls@tmp - } + \newcommand*{\glsaccessfmtuseriii}[3]{% + \glsuseriiiaccessdisplay + {% + \glsfmtfield{#1}{#2}{#3}{useriii}% + }% + {#3}% + } } { - \newcommand{\@gls@assign@actual}{% - \begingroup - \glsxtrassignactualsetup - \protected@edef\@gls@tmp{\endgroup - \def\noexpand\@gls@actualshort{\glsxtrorgshort}% - \def\noexpand\@gls@actuallong{\glsxtrorglong}% - \def\noexpand\@gls@actualshortpl{\@gls@shortpl}% - \def\noexpand\@gls@actuallongpl{\@gls@longpl}% - }% - \@gls@tmp - } + \newcommand*{\glsaccessfmtuseriii}[3]{% + \glsfmtfield{#1}{#2}{#3}{useriii}% + } } % \end{macrocode} %\end{macro} -%\begin{macro}{\@gls@setup@default@short@access} -%\changes{1.31}{2018-05-09}{new} -%\changes{1.42}{2020-02-03}{renamed to \cs{@gls@setup@default@access}} -%Renamed \cs{@gls@setup@default@access} and removed argument since -%it can be obtained from \cs{glsxtrorgshort}. -%\end{macro} -%\begin{macro}{\@gls@setup@default@access} -%\changes{1.42}{2020-02-03}{added \cs{glsdefaultshortaccess}} -%Assign the default value of the \gloskey{shortaccess} key. The -%argument is the short value passed to \cs{newabbreviation}. -%The \gloskey{shortaccess} value should explain the abbreviation. -% \begin{macrocode} - \newcommand{\@gls@setup@default@access}{% - \@gls@assign@actual - \ifdefempty\@gls@shortaccess - {% -% \end{macrocode} -%Check if the \catattr{accessinsertdots} attribute has been set but -%only if \gloskey{shortaccess} hasn't been set. +% +%\begin{macro}{\Glsaccessuseriii} +% Display the \gloskey{user3} value (no link and no check for existence) +% with the first letter converted to upper case. +%\changes{1.49}{2022-10-14}{new} % \begin{macrocode} - \@gls@ifaccessattribute@set{insertdots}% + \ifdef\glsuseriiiaccessdisplay + { + \newcommand*{\Glsaccessuseriii}[1]{% + \glsuseriiiaccessdisplay {% - \expandafter\@glsxtr@insertdots\expandafter\@gls@actualshort\expandafter - {\@gls@actualshort}% + \Glsentryuseriii{#1}% }% - {}% - \ifdefempty\@gls@longaccess - {% + {#1}% + } + } + { + \newcommand*{\Glsaccessuseriii}[1]{% + \Glsentryuseriii{#1}% + } + } % \end{macrocode} -%\changes{1.46}{2021-09-20}{changed \cs{edef} to \cs{protected@edef}} +%\end{macro} +% +%\begin{macro}{\Glsaccessfmtuseriii} +%\begin{definition} +%\cs{Glsaccessfmtuseriii}\marg{insert}\marg{cs}\marg{label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} % \begin{macrocode} - \protected@edef\@gls@shortaccess{\glsdefaultshortaccess - {\expandonce\@gls@actuallong}{\expandonce\@gls@actualshort}}% - }% + \ifdef\glsuseriiiaccessdisplay + { + \newcommand*{\Glsaccessfmtuseriii}[3]{% + \glsuseriiiaccessdisplay {% - \protected@edef\@gls@shortaccess{\glsdefaultshortaccess - {\expandonce\@gls@longaccess}{\expandonce\@gls@actualshort}}% + \Glsfmtfield{#1}{#2}{#3}{useriii}% }% - \eappto\ExtraCustomAbbreviationFields{shortaccess={\@gls@shortaccess},}% + {#3}% + } + } + { + \newcommand*{\Glsaccessfmtuseriii}[3]{% + \Glsfmtfield{#1}{#2}{#3}{useriii}% + } + } % \end{macrocode} -%If \gloskey{shortaccessplural} hasn't been set, assign plural form. +%\end{macro} +% +%\begin{macro}{\GLSaccessuseriii} +% Display the \gloskey{user3} value (no link and no check for existence) +% converted to upper case. +%\changes{1.49}{2022-10-14}{new} % \begin{macrocode} - \ifdefempty\@gls@shortaccesspl - {% - \@gls@ifaccessattribute@set{aposplural}% - {% - \expandafter\def\expandafter\@gls@shortaccesspl\expandafter{% - \@gls@actualshort'\glsxtrabbrvpluralsuffix}% - }% - {% - \@gls@ifaccessattribute@set{noshortplural}% - {% - \let\@gls@shortaccesspl\@gls@shortaccess - }% - {% - \let\@gls@shortaccesspl\@gls@actualshortpl - }% - }% - \ifdefempty\@gls@longaccesspl + \ifdef\glsuseriiiaccessdisplay + { + \newcommand*{\GLSaccessuseriii}[1]{% + \glsuseriiiaccessdisplay {% + \glsuppercase{\glsentryuseriii{#1}}% + }% + {#1}% + } + } + { + \newcommand*{\GLSaccessuseriii}[1]{% + \glsuppercase{\glsentryuseriii{#1}}% + } + } % \end{macrocode} -%\changes{1.46}{2021-09-20}{changed \cs{edef} to \cs{protected@edef}} +%\end{macro} +% +%\begin{macro}{\GLSaccessfmtuseriii} +%\begin{definition} +%\cs{GLSaccessfmtuseriii}\marg{insert}\marg{cs}\marg{label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} % \begin{macrocode} - \protected@edef\@gls@shortaccesspl{\glsdefaultshortaccess - {\expandonce\@gls@actuallongpl}{\expandonce\@gls@actualshortpl}}% - }% + \ifdef\glsuseriiiaccessdisplay + { + \newcommand*{\GLSaccessfmtuseriii}[3]{% + \glsuseriiiaccessdisplay {% - \protected@edef\@gls@shortaccesspl{\glsdefaultshortaccess - {\expandonce\@gls@longaccesspl}{\expandonce\@gls@actualshort}}% + \GLSfmtfield{#1}{#2}{#3}{useriii}% }% - \eappto\ExtraCustomAbbreviationFields{shortpluralaccess={\@gls@shortaccesspl},}% - }% - {}% - }% - {% - \ifdefempty\@gls@shortaccesspl - {\let\@gls@shortaccesspl\@gls@shortaccess}% - {}% - }% + {#3}% + } + } + { + \newcommand*{\GLSaccessfmtuseriii}[3]{% + \GLSfmtfield{#1}{#2}{#3}{useriii}% + } + } % \end{macrocode} -%If \gloskey{access} key hasn't been set, check if the -%\catattr{nameshortaccess} attribute has been set. +%\end{macro} +% +%USER4 +%\begin{macro}{\glsaccessuseriv} +% Display the \gloskey{user4} value (no link and no check for existence). +%\changes{1.49}{2022-10-14}{new} % \begin{macrocode} - \ifdefempty\@gls@nameaccess - {% - \glsifcategoryattribute{\glscategorylabel}{nameshortaccess}{true}% + \ifdef\glsuserivaccessdisplay + { + \newcommand*{\glsaccessuseriv}[1]{% + \glsuserivaccessdisplay {% - \eappto\ExtraCustomAbbreviationFields{access={\@gls@shortaccess},}% + \glsentryuseriv{#1}% }% - {}% - }% - {}% + {#1}% + } + } + { + \newcommand*{\glsaccessuseriv}[1]{% + \glsentryuseriv{#1}% + } + } % \end{macrocode} -%If \gloskey{textaccess} key hasn't been set, check if the -%\catattr{textshortaccess} attribute has been set. +%\end{macro} +% +%\begin{macro}{\glsaccessfmtuseriv} +%\begin{definition} +%\cs{glsaccessfmtuseriv}\marg{insert}\marg{cs}\marg{label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} % \begin{macrocode} - \ifdefempty\@gls@textaccess - {% - \glsifcategoryattribute{\glscategorylabel}{textshortaccess}{true}% + \ifdef\glsuserivaccessdisplay + { + \newcommand*{\glsaccessfmtuseriv}[3]{% + \glsuserivaccessdisplay {% - \eappto\ExtraCustomAbbreviationFields{textaccess={\@gls@shortaccess},}% + \glsfmtfield{#1}{#2}{#3}{useriv}% }% - {}% - }% - {}% - \ifdefempty\@gls@pluralaccess - {% - \glsifcategoryattribute{\glscategorylabel}{textshortaccess}{true}% + {#3}% + } + } + { + \newcommand*{\glsaccessfmtuseriv}[3]{% + \glsfmtfield{#1}{#2}{#3}{useriv}% + } + } +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\Glsaccessuseriv} +% Display the \gloskey{user4} value (no link and no check for existence) +% with the first letter converted to upper case. +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \ifdef\glsuserivaccessdisplay + { + \newcommand*{\Glsaccessuseriv}[1]{% + \glsuserivaccessdisplay {% - \eappto\ExtraCustomAbbreviationFields{% - pluralaccess={\@gls@shortaccesspl},% - }% + \Glsentryuseriv{#1}% }% - {}% - }% - {}% + {#1}% + } + } + { + \newcommand*{\Glsaccessuseriv}[1]{% + \Glsentryuseriv{#1}% + } + } % \end{macrocode} -%If \gloskey{firstaccess} key hasn't been set, check if the -%\catattr{firstshortaccess} attribute has been set. +%\end{macro} +% +%\begin{macro}{\Glsaccessfmtuseriv} +%\begin{definition} +%\cs{Glsaccessfmtuseriv}\marg{insert}\marg{cs}\marg{label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} % \begin{macrocode} - \ifdefempty\@gls@firstaccess - {% - \glsifcategoryattribute{\glscategorylabel}{firstshortaccess}{true}% + \ifdef\glsuserivaccessdisplay + { + \newcommand*{\Glsaccessfmtuseriv}[3]{% + \glsuserivaccessdisplay + {% + \Glsfmtfield{#1}{#2}{#3}{useriv}% + }% + {#3}% + } + } + { + \newcommand*{\Glsaccessfmtuseriv}[3]{% + \Glsfmtfield{#1}{#2}{#3}{useriv}% + } + } +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GLSaccessuseriv} +% Display the \gloskey{user4} value (no link and no check for existence) +% converted to upper case. +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \ifdef\glsuserivaccessdisplay + { + \newcommand*{\GLSaccessuseriv}[1]{% + \glsuserivaccessdisplay + {% + \glsuppercase{\glsentryuseriv{#1}}% + }% + {#1}% + } + } + { + \newcommand*{\GLSaccessuseriv}[1]{% + \glsuppercase{\glsentryuseriv{#1}}% + } + } +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GLSaccessfmtuseriv} +%\begin{definition} +%\cs{GLSaccessfmtuseriv}\marg{insert}\marg{cs}\marg{label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \ifdef\glsuserivaccessdisplay + { + \newcommand*{\GLSaccessfmtuseriv}[3]{% + \glsuserivaccessdisplay + {% + \GLSfmtfield{#1}{#2}{#3}{useriv}% + }% + {#3}% + } + } + { + \newcommand*{\GLSaccessfmtuseriv}[3]{% + \GLSfmtfield{#1}{#2}{#3}{useriv}% + } + } +% \end{macrocode} +%\end{macro} +% +%USER5 +%\begin{macro}{\glsaccessuserv} +% Display the \gloskey{user5} value (no link and no check for existence). +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \ifdef\glsuservaccessdisplay + { + \newcommand*{\glsaccessuserv}[1]{% + \glsuservaccessdisplay + {% + \glsentryuserv{#1}% + }% + {#1}% + } + } + { + \newcommand*{\glsaccessuserv}[1]{% + \glsentryuserv{#1}% + } + } +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsaccessfmtuserv} +%\begin{definition} +%\cs{glsaccessfmtuserv}\marg{insert}\marg{cs}\marg{label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \ifdef\glsuservaccessdisplay + { + \newcommand*{\glsaccessfmtuserv}[3]{% + \glsuservaccessdisplay + {% + \glsfmtfield{#1}{#2}{#3}{userv}% + }% + {#3}% + } + } + { + \newcommand*{\glsaccessfmtuserv}[3]{% + \glsfmtfield{#1}{#2}{#3}{userv}% + } + } +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\Glsaccessuserv} +% Display the \gloskey{user5} value (no link and no check for existence) +% with the first letter converted to upper case. +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \ifdef\glsuservaccessdisplay + { + \newcommand*{\Glsaccessuserv}[1]{% + \glsuservaccessdisplay + {% + \Glsentryuserv{#1}% + }% + {#1}% + } + } + { + \newcommand*{\Glsaccessuserv}[1]{% + \Glsentryuserv{#1}% + } + } +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\Glsaccessfmtuserv} +%\begin{definition} +%\cs{Glsaccessfmtuserv}\marg{insert}\marg{cs}\marg{label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \ifdef\glsuservaccessdisplay + { + \newcommand*{\Glsaccessfmtuserv}[3]{% + \glsuservaccessdisplay + {% + \Glsfmtfield{#1}{#2}{#3}{userv}% + }% + {#3}% + } + } + { + \newcommand*{\Glsaccessfmtuserv}[3]{% + \Glsfmtfield{#1}{#2}{#3}{userv}% + } + } +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GLSaccessuserv} +% Display the \gloskey{user5} value (no link and no check for existence) +% converted to upper case. +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \ifdef\glsuservaccessdisplay + { + \newcommand*{\GLSaccessuserv}[1]{% + \glsuservaccessdisplay + {% + \glsuppercase{\glsentryuserv{#1}}% + }% + {#1}% + } + } + { + \newcommand*{\GLSaccessuserv}[1]{% + \glsuppercase{\glsentryuserv{#1}}% + } + } +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GLSaccessfmtuserv} +%\begin{definition} +%\cs{GLSaccessfmtuserv}\marg{insert}\marg{cs}\marg{label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \ifdef\glsuservaccessdisplay + { + \newcommand*{\GLSaccessfmtuserv}[3]{% + \glsuservaccessdisplay + {% + \GLSfmtfield{#1}{#2}{#3}{userv}% + }% + {#3}% + } + } + { + \newcommand*{\GLSaccessfmtuserv}[3]{% + \GLSfmtfield{#1}{#2}{#3}{userv}% + } + } +% \end{macrocode} +%\end{macro} +% +%USER6 +%\begin{macro}{\glsaccessuservi} +% Display the \gloskey{user6} value (no link and no check for existence). +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \ifdef\glsuserviaccessdisplay + { + \newcommand*{\glsaccessuservi}[1]{% + \glsuserviaccessdisplay + {% + \glsentryuservi{#1}% + }% + {#1}% + } + } + { + \newcommand*{\glsaccessuservi}[1]{% + \glsentryuservi{#1}% + } + } +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsaccessfmtuservi} +%\begin{definition} +%\cs{glsaccessfmtuservi}\marg{insert}\marg{cs}\marg{label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \ifdef\glsuserviaccessdisplay + { + \newcommand*{\glsaccessfmtuservi}[3]{% + \glsuserviaccessdisplay + {% + \glsfmtfield{#1}{#2}{#3}{uservi}% + }% + {#3}% + } + } + { + \newcommand*{\glsaccessfmtuservi}[3]{% + \glsfmtfield{#1}{#2}{#3}{uservi}% + } + } +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\Glsaccessuservi} +% Display the \gloskey{user6} value (no link and no check for existence) +% with the first letter converted to upper case. +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \ifdef\glsuserviaccessdisplay + { + \newcommand*{\Glsaccessuservi}[1]{% + \glsuserviaccessdisplay + {% + \Glsentryuservi{#1}% + }% + {#1}% + } + } + { + \newcommand*{\Glsaccessuservi}[1]{% + \Glsentryuservi{#1}% + } + } +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\Glsaccessfmtuservi} +%\begin{definition} +%\cs{Glsaccessfmtuservi}\marg{insert}\marg{cs}\marg{label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \ifdef\glsuserviaccessdisplay + { + \newcommand*{\Glsaccessfmtuservi}[3]{% + \glsuserviaccessdisplay + {% + \Glsfmtfield{#1}{#2}{#3}{uservi}% + }% + {#3}% + } + } + { + \newcommand*{\Glsaccessfmtuservi}[3]{% + \Glsfmtfield{#1}{#2}{#3}{uservi}% + } + } +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GLSaccessuservi} +% Display the \gloskey{user6} value (no link and no check for existence) +% converted to upper case. +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \ifdef\glsuserviaccessdisplay + { + \newcommand*{\GLSaccessuservi}[1]{% + \glsuserviaccessdisplay + {% + \glsuppercase{\glsentryuservi{#1}}% + }% + {#1}% + } + } + { + \newcommand*{\GLSaccessuservi}[1]{% + \glsuppercase{\glsentryuservi{#1}}% + } + } +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GLSaccessfmtuservi} +%\begin{definition} +%\cs{GLSaccessfmtuservi}\marg{insert}\marg{cs}\marg{label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \ifdef\glsuserviaccessdisplay + { + \newcommand*{\GLSaccessfmtuservi}[3]{% + \glsuserviaccessdisplay + {% + \GLSfmtfield{#1}{#2}{#3}{uservi}% + }% + {#3}% + } + } + { + \newcommand*{\GLSaccessfmtuservi}[3]{% + \GLSfmtfield{#1}{#2}{#3}{uservi}% + } + } +% \end{macrocode} +%\end{macro} +% +% Keys for accessibility support while pre-parsing in +% \cs{newabbreviation}. +% \begin{macrocode} + \define@key{glsxtrabbrv}{access}{% + \def\@gls@nameaccess{#1}% + } +% \end{macrocode} +% +% \begin{macrocode} + \define@key{glsxtrabbrv}{textaccess}{% + \def\@gls@textaccess{#1}% + } +% \end{macrocode} +% +% \begin{macrocode} + \define@key{glsxtrabbrv}{pluralaccess}{% + \def\@gls@pluralaccess{#1}% + } +% \end{macrocode} +% +% \begin{macrocode} + \define@key{glsxtrabbrv}{firstaccess}{% + \def\@gls@firstaccess{#1}% + } +% \end{macrocode} +% +% \begin{macrocode} + \define@key{glsxtrabbrv}{firstpluralaccess}{% + \def\@gls@firstpluralaccess{#1}% + } +% \end{macrocode} +% +% \begin{macrocode} + \define@key{glsxtrabbrv}{shortaccess}{% + \def\@gls@shortaccess{#1}% + } +% \end{macrocode} +% +% \begin{macrocode} + \define@key{glsxtrabbrv}{shortpluralaccess}{% + \def\@gls@shortaccesspl{#1}% + } +% \end{macrocode} +% +% \begin{macrocode} + \define@key{glsxtrabbrv}{longaccess}{% + \def\@gls@longaccess{#1}% + } +% \end{macrocode} +% +%\changes{1.49}{2022-10-14}{corrected name of longpluralaccess field} +% \begin{macrocode} + \define@key{glsxtrabbrv}{longpluralaccess}{% + \def\@gls@longaccesspl{#1}% + } +% \end{macrocode} +%\begin{macro}{\@gls@initaccesskeys} +%\changes{1.31}{2018-05-09}{new} +% \begin{macrocode} + \newcommand*{\@gls@initaccesskeys}{% + \def\@gls@nameaccess{}% + \def\@gls@textaccess{}% + \def\@gls@pluralaccess{}% + \def\@gls@firstaccess{}% + \def\@gls@firstpluralaccess{}% + \def\@gls@shortaccess{}% + \def\@gls@shortaccesspl{}% + \def\@gls@longaccess{}% + \def\@gls@longaccesspl{}% + } +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@gls@ifaccessattribute@set} +%\begin{definition} +%\cs{\@gls@ifaccessattribute@set}\marg{attribute}\marg{true}\marg{false} +%\end{definition} +%\changes{1.31}{2018-05-09}{new} +% \begin{macrocode} + \newcommand*{\@gls@ifaccessattribute@set}[3]{% + \glsifcategoryattribute{\glscategorylabel}{access#1}{true}% + {#2}% + {% + \glsifcategoryattribute{\glscategorylabel}{access#1}{false}% + {#3}% + {% + \glsifcategoryattribute{\glscategorylabel}{#1}{true}% + {#2}% + {#3}% + }% + }% + } +% \end{macrocode} +%\end{macro} +% +%As from \sty{glossaries} v4.45, the replacement text support has +%been corrected so that the accessibility support for abbreviations +%use the \qt{E} (expanded value) element. This should actually +%contain the long form since it's supposed to explain the +%abbreviation. This is a bit redundant on first use for styles like +%\abbrstyle{long-short}. +% +%\begin{macro}{\glsdefaultshortaccess} +%\changes{1.42}{2020-02-03}{new} +%\changes{1.49}{2022-10-14}{reverted to original definition} +%\begin{definition} +%\cs{glsdefaultshortaccess}\marg{long}\marg{short} +%\end{definition} +%This command was only introduced to \sty{glossaries-accsupp} 4.45 +%so it may not be defined. This was defined to do \verb|#1 (#2)| but +%the original definition is more appropriate, so has been reverted +%back to the definition provided by \sty{glossaries-accsupp}. +% \begin{macrocode} + \providecommand*{\glsdefaultshortaccess}[2]{#1} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrassignactualsetup} +%\changes{1.42}{2020-02-03}{new} +%\changes{1.49}{2022-10-14}{added \cs{glstextup}} +% \begin{macrocode} + \newcommand{\glsxtrassignactualsetup}{% + \let\@\empty + \let\emph\@firstofone + \let\textbf\@firstofone + \let\textmd\@firstofone + \let\textit\@firstofone + \let\textsl\@firstofone + \let\textsc\@firstofone + \let\textrm\@firstofone + \let\textsf\@firstofone + \let\texttt\@firstofone + \let\glstextup\@firstofone + } +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@gls@assign@actual} +%\changes{1.42}{2020-02-03}{new} +%\changes{1.49}{2022-10-14}{removed use of \cs{pdfstringdef}} +% \begin{macrocode} + \newcommand{\@gls@assign@actual}{% + \begingroup + \glsxtrassignactualsetup + \protected@edef\@gls@tmp{\endgroup + \def\noexpand\@gls@actualshort{\glsxtrorgshort}% + \def\noexpand\@gls@actuallong{\glsxtrorglong}% + \def\noexpand\@gls@actualshortpl{\@gls@shortpl}% + \def\noexpand\@gls@actuallongpl{\@gls@longpl}% + }% + \@gls@tmp + } +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@gls@setup@default@short@access} +%\changes{1.31}{2018-05-09}{new} +%\changes{1.42}{2020-02-03}{renamed to \cs{@gls@setup@default@access}} +%Renamed \cs{@gls@setup@default@access} and removed argument since +%it can be obtained from \cs{glsxtrorgshort}. +%\end{macro} +%\begin{macro}{\@gls@setup@default@access} +%\changes{1.42}{2020-02-03}{added \cs{glsdefaultshortaccess}} +%Assign the default value of the \gloskey{shortaccess} key. The +%argument is the short value passed to \cs{newabbreviation}. +%The \gloskey{shortaccess} value should explain the abbreviation. +% \begin{macrocode} + \newcommand{\@gls@setup@default@access}{% + \@gls@assign@actual + \ifdefempty\@gls@shortaccess + {% +% \end{macrocode} +%Check if the \catattr{accessinsertdots} attribute has been set but +%only if \gloskey{shortaccess} hasn't been set. +% \begin{macrocode} + \@gls@ifaccessattribute@set{insertdots}% + {% + \expandafter\@glsxtr@insertdots\expandafter\@gls@actualshort\expandafter + {\@gls@actualshort}% + }% + {}% + \ifdefempty\@gls@longaccess + {% +% \end{macrocode} +%\changes{1.46}{2021-09-20}{changed \cs{edef} to \cs{protected@edef}} +% \begin{macrocode} + \protected@edef\@gls@shortaccess{\glsdefaultshortaccess + {\expandonce\@gls@actuallong}{\expandonce\@gls@actualshort}}% + }% + {% + \protected@edef\@gls@shortaccess{\glsdefaultshortaccess + {\expandonce\@gls@longaccess}{\expandonce\@gls@actualshort}}% + }% + \eappto\ExtraCustomAbbreviationFields{shortaccess={\@gls@shortaccess},}% +% \end{macrocode} +%If \gloskey{shortaccessplural} hasn't been set, assign plural form. +% \begin{macrocode} + \ifdefempty\@gls@shortaccesspl + {% + \@gls@ifaccessattribute@set{aposplural}% + {% + \expandafter\def\expandafter\@gls@shortaccesspl\expandafter{% + \@gls@actualshort'\glsxtrabbrvpluralsuffix}% + }% + {% + \@gls@ifaccessattribute@set{noshortplural}% + {% + \let\@gls@shortaccesspl\@gls@shortaccess + }% + {% + \let\@gls@shortaccesspl\@gls@actualshortpl + }% + }% + \ifdefempty\@gls@longaccesspl + {% +% \end{macrocode} +%\changes{1.46}{2021-09-20}{changed \cs{edef} to \cs{protected@edef}} +% \begin{macrocode} + \protected@edef\@gls@shortaccesspl{\glsdefaultshortaccess + {\expandonce\@gls@actuallongpl}{\expandonce\@gls@actualshortpl}}% + }% + {% + \protected@edef\@gls@shortaccesspl{\glsdefaultshortaccess + {\expandonce\@gls@longaccesspl}{\expandonce\@gls@actualshort}}% + }% + \eappto\ExtraCustomAbbreviationFields{shortpluralaccess={\@gls@shortaccesspl},}% + }% + {}% + }% + {% + \ifdefempty\@gls@shortaccesspl + {\let\@gls@shortaccesspl\@gls@shortaccess}% + {}% + }% +% \end{macrocode} +%If \gloskey{access} key hasn't been set, check if the +%\catattr{nameshortaccess} attribute has been set. +% \begin{macrocode} + \ifdefempty\@gls@nameaccess + {% + \glsifcategoryattribute{\glscategorylabel}{nameshortaccess}{true}% + {% + \eappto\ExtraCustomAbbreviationFields{access={\@gls@shortaccess},}% + }% + {}% + }% + {}% +% \end{macrocode} +%If \gloskey{textaccess} key hasn't been set, check if the +%\catattr{textshortaccess} attribute has been set. +% \begin{macrocode} + \ifdefempty\@gls@textaccess + {% + \glsifcategoryattribute{\glscategorylabel}{textshortaccess}{true}% + {% + \eappto\ExtraCustomAbbreviationFields{textaccess={\@gls@shortaccess},}% + }% + {}% + }% + {}% + \ifdefempty\@gls@pluralaccess + {% + \glsifcategoryattribute{\glscategorylabel}{textshortaccess}{true}% + {% + \eappto\ExtraCustomAbbreviationFields{% + pluralaccess={\@gls@shortaccesspl},% + }% + }% + {}% + }% + {}% +% \end{macrocode} +%If \gloskey{firstaccess} key hasn't been set, check if the +%\catattr{firstshortaccess} attribute has been set. +% \begin{macrocode} + \ifdefempty\@gls@firstaccess + {% + \glsifcategoryattribute{\glscategorylabel}{firstshortaccess}{true}% {% \eappto\ExtraCustomAbbreviationFields{firstaccess={\@gls@shortaccess},}% }% @@ -14022,6 +18529,18 @@ defined}{}% % \end{macrocode} %\end{macro} % +%\begin{macro}{\glsaccessfmtname} +%\begin{definition} +%\cs{glsaccessfmtname}\marg{insert}\marg{cs}\marg{label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\glsaccessfmtname}[3]{% + \glsfmtfield{#1}{#2}{#3}{name}% + } +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\Glsaccessname} % Display the \gloskey{name} value (no link and no check for existence) % with the first letter converted to upper case. @@ -14030,13 +18549,37 @@ defined}{}% % \end{macrocode} %\end{macro} % +%\begin{macro}{\Glsaccessfmtname} +%\begin{definition} +%\cs{Glsaccessfmtname}\marg{insert}\marg{cs}\marg{label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\Glsaccessfmtname}[3]{% + \Glsfmtfield{#1}{#2}{#3}{name}% + } +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\GLSaccessname} % Display the \gloskey{name} value (no link and no check for existence). % converted to upper case. %\changes{0.5.2}{2015-12-08}{new} % \begin{macrocode} \newcommand*{\GLSaccessname}[1]{% - \protect\mfirstucMakeUppercase{\glsentryname{#1}}} + \protect\glsuppercase{\glsentryname{#1}}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GLSaccessfmtname} +%\begin{definition} +%\cs{GLSaccessfmtname}\marg{insert}\marg{cs}\marg{label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\GLSaccessfmtname}[3]{% + \GLSfmtfield{#1}{#2}{#3}{name}% + } % \end{macrocode} %\end{macro} % @@ -14047,6 +18590,18 @@ defined}{}% % \end{macrocode} %\end{macro} % +%\begin{macro}{\glsaccessfmttext} +%\begin{definition} +%\cs{glsaccessfmttext}\marg{insert}\marg{cs}\marg{label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\glsaccessfmttext}[3]{% + \glsfmtfield{#1}{#2}{#3}{text}% + } +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\Glsaccesstext} % Display the \gloskey{text} value (no link and no check for existence) % with the first letter converted to upper case. @@ -14055,13 +18610,37 @@ defined}{}% % \end{macrocode} %\end{macro} % +%\begin{macro}{\Glsaccessfmttext} +%\begin{definition} +%\cs{Glsaccessfmttext}\marg{insert}\marg{cs}\marg{label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\Glsaccessfmttext}[3]{% + \Glsfmtfield{#1}{#2}{#3}{text}% + } +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\GLSaccesstext} % Display the \gloskey{text} value (no link and no check for existence). % converted to upper case. %\changes{0.5.2}{2015-12-08}{new} % \begin{macrocode} \newcommand*{\GLSaccesstext}[1]{% - \protect\mfirstucMakeUppercase{\glsentrytext{#1}}} + \protect\glsuppercase{\glsentrytext{#1}}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GLSaccessfmttext} +%\begin{definition} +%\cs{GLSaccessfmttext}\marg{insert}\marg{cs}\marg{label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\GLSaccessfmttext}[3]{% + \GLSfmtfield{#1}{#2}{#3}{text}% + } % \end{macrocode} %\end{macro} % @@ -14072,21 +18651,57 @@ defined}{}% % \end{macrocode} %\end{macro} % -%\begin{macro}{\Glsaccessplural} -% Display the \gloskey{plural} value (no link and no check for existence) -% with the first letter converted to upper case. +%\begin{macro}{\glsaccessfmtplural} +%\begin{definition} +%\cs{glsaccessfmtplural}\marg{insert}\marg{cs}\marg{label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\glsaccessfmtplural}[3]{% + \glsfmtfield{#1}{#2}{#3}{plural}% + } +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\Glsaccessplural} +% Display the \gloskey{plural} value (no link and no check for existence) +% with the first letter converted to upper case. % \begin{macrocode} \newcommand*{\Glsaccessplural}[1]{\Glsentryplural{#1}} % \end{macrocode} %\end{macro} % +%\begin{macro}{\Glsaccessfmtplural} +%\begin{definition} +%\cs{Glsaccessfmtplural}\marg{insert}\marg{cs}\marg{label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\Glsaccessfmtplural}[3]{% + \Glsfmtfield{#1}{#2}{#3}{plural}% + } +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\GLSaccessplural} % Display the \gloskey{plural} value (no link and no check for existence). % converted to upper case. %\changes{0.5.2}{2015-12-08}{new} % \begin{macrocode} \newcommand*{\GLSaccessplural}[1]{% - \protect\mfirstucMakeUppercase{\glsentryplural{#1}}} + \protect\glsuppercase{\glsentryplural{#1}}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GLSaccessfmtplural} +%\begin{definition} +%\cs{GLSaccessfmtplural}\marg{insert}\marg{cs}\marg{label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\GLSaccessfmtplural}[3]{% + \GLSfmtfield{#1}{#2}{#3}{plural}% + } % \end{macrocode} %\end{macro} % @@ -14097,6 +18712,18 @@ defined}{}% % \end{macrocode} %\end{macro} % +%\begin{macro}{\glsaccessfmtfirst} +%\begin{definition} +%\cs{glsaccessfmtfirst}\marg{insert}\marg{cs}\marg{label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\glsaccessfmtfirst}[3]{% + \glsfmtfield{#1}{#2}{#3}{first}% + } +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\Glsaccessfirst} % Display the \gloskey{first} value (no link and no check for existence) % with the first letter converted to upper case. @@ -14105,13 +18732,37 @@ defined}{}% % \end{macrocode} %\end{macro} % +%\begin{macro}{\Glsaccessfmtfirst} +%\begin{definition} +%\cs{Glsaccessfmtfirst}\marg{insert}\marg{cs}\marg{label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\Glsaccessfmtfirst}[3]{% + \Glsfmtfield{#1}{#2}{#3}{first}% + } +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\GLSaccessfirst} % Display the \gloskey{first} value (no link and no check for existence). % converted to upper case. %\changes{0.5.2}{2015-12-08}{new} % \begin{macrocode} \newcommand*{\GLSaccessfirst}[1]{% - \protect\mfirstucMakeUppercase{\glsentryfirst{#1}}} + \protect\glsuppercase{\glsentryfirst{#1}}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GLSaccessfmtfirst} +%\begin{definition} +%\cs{GLSaccessfmtfirst}\marg{insert}\marg{cs}\marg{label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\GLSaccessfmtfirst}[3]{% + \GLSfmtfield{#1}{#2}{#3}{first}% + } % \end{macrocode} %\end{macro} % @@ -14122,6 +18773,18 @@ defined}{}% % \end{macrocode} %\end{macro} % +%\begin{macro}{\glsaccessfmtfirstplural} +%\begin{definition} +%\cs{glsaccessfmtfirstplural}\marg{insert}\marg{cs}\marg{label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\glsaccessfmtfirstplural}[3]{% + \glsfmtfield{#1}{#2}{#3}{firstpl}% + } +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\Glsaccessfirstplural} % Display the \gloskey{firstplural} value (no link and no check for existence) % with the first letter converted to upper case. @@ -14130,13 +18793,37 @@ defined}{}% % \end{macrocode} %\end{macro} % +%\begin{macro}{\Glsaccessfmtfirstplural} +%\begin{definition} +%\cs{Glsaccessfmtfirstplural}\marg{insert}\marg{cs}\marg{label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\Glsaccessfmtfirstplural}[3]{% + \Glsfmtfield{#1}{#2}{#3}{firstpl}% + } +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\GLSaccessfirstplural} % Display the \gloskey{firstplural} value (no link and no check for existence). % converted to upper case. %\changes{0.5.2}{2015-12-08}{new} % \begin{macrocode} \newcommand*{\GLSaccessfirstplural}[1]{% - \protect\mfirstucMakeUppercase{\glsentryfirstplural{#1}}} + \protect\glsuppercase{\glsentryfirstplural{#1}}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GLSaccessfmtfirstplural} +%\begin{definition} +%\cs{GLSaccessfmtfirstplural}\marg{insert}\marg{cs}\marg{label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\GLSaccessfmtfirstplural}[3]{% + \GLSfmtfield{#1}{#2}{#3}{firstpl}% + } % \end{macrocode} %\end{macro} % @@ -14147,6 +18834,18 @@ defined}{}% % \end{macrocode} %\end{macro} % +%\begin{macro}{\glsaccessfmtsymbol} +%\begin{definition} +%\cs{glsaccessfmtsymbol}\marg{insert}\marg{cs}\marg{label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\glsaccessfmtsymbol}[3]{% + \glsfmtfield{#1}{#2}{#3}{symbol}% + } +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\Glsaccesssymbol} % Display the \gloskey{symbol} value (no link and no check for existence) % with the first letter converted to upper case. @@ -14155,13 +18854,37 @@ defined}{}% % \end{macrocode} %\end{macro} % +%\begin{macro}{\Glsaccessfmtsymbol} +%\begin{definition} +%\cs{Glsaccessfmtsymbol}\marg{insert}\marg{cs}\marg{label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\Glsaccessfmtsymbol}[3]{% + \Glsfmtfield{#1}{#2}{#3}{symbol}% + } +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\GLSaccesssymbol} % Display the \gloskey{symbol} value (no link and no check for existence). % converted to upper case. %\changes{0.5.2}{2015-12-08}{new} % \begin{macrocode} \newcommand*{\GLSaccesssymbol}[1]{% - \protect\mfirstucMakeUppercase{\glsentrysymbol{#1}}} + \protect\glsuppercase{\glsentrysymbol{#1}}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GLSaccessfmtsymbol} +%\begin{definition} +%\cs{GLSaccessfmtsymbol}\marg{insert}\marg{cs}\marg{label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\GLSaccessfmtsymbol}[3]{% + \GLSfmtfield{#1}{#2}{#3}{symbol}% + } % \end{macrocode} %\end{macro} % @@ -14172,6 +18895,18 @@ defined}{}% % \end{macrocode} %\end{macro} % +%\begin{macro}{\glsaccessfmtsymbolplural} +%\begin{definition} +%\cs{glsaccessfmtsymbolplural}\marg{insert}\marg{cs}\marg{label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\glsaccessfmtsymbolplural}[3]{% + \glsfmtfield{#1}{#2}{#3}{symbolplural}% + } +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\Glsaccesssymbolplural} % Display the \gloskey{symbolplural} value (no link and no check for existence) % with the first letter converted to upper case. @@ -14180,13 +18915,37 @@ defined}{}% % \end{macrocode} %\end{macro} % +%\begin{macro}{\Glsaccessfmtsymbolplural} +%\begin{definition} +%\cs{Glsaccessfmtsymbolplural}\marg{insert}\marg{cs}\marg{label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\Glsaccessfmtsymbolplural}[3]{% + \Glsfmtfield{#1}{#2}{#3}{symbolplural}% + } +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\GLSaccesssymbolplural} % Display the \gloskey{symbolplural} value (no link and no check for existence). % converted to upper case. %\changes{0.5.2}{2015-12-08}{new} % \begin{macrocode} \newcommand*{\GLSaccesssymbolplural}[1]{% - \protect\mfirstucMakeUppercase{\glsentrysymbolplural{#1}}} + \protect\glsuppercase{\glsentrysymbolplural{#1}}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GLSaccessfmtsymbolplural} +%\begin{definition} +%\cs{GLSaccessfmtsymbolplural}\marg{insert}\marg{cs}\marg{label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\GLSaccessfmtsymbolplural}[3]{% + \GLSfmtfield{#1}{#2}{#3}{symbolplural}% + } % \end{macrocode} %\end{macro} % @@ -14197,6 +18956,18 @@ defined}{}% % \end{macrocode} %\end{macro} % +%\begin{macro}{\glsaccessfmtdesc} +%\begin{definition} +%\cs{glsaccessfmtdesc}\marg{insert}\marg{cs}\marg{label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\glsaccessfmtdesc}[3]{% + \glsfmtfield{#1}{#2}{#3}{desc}% + } +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\Glsaccessdesc} % Display the \gloskey{desc} value (no link and no check for existence) % with the first letter converted to upper case. @@ -14205,13 +18976,37 @@ defined}{}% % \end{macrocode} %\end{macro} % +%\begin{macro}{\Glsaccessfmtdesc} +%\begin{definition} +%\cs{Glsaccessfmtdesc}\marg{insert}\marg{cs}\marg{label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\Glsaccessfmtdesc}[3]{% + \Glsfmtfield{#1}{#2}{#3}{desc}% + } +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\GLSaccessdesc} % Display the \gloskey{desc} value (no link and no check for existence). % converted to upper case. %\changes{0.5.2}{2015-12-08}{new} % \begin{macrocode} \newcommand*{\GLSaccessdesc}[1]{% - \protect\mfirstucMakeUppercase{\glsentrydesc{#1}}} + \protect\glsuppercase{\glsentrydesc{#1}}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GLSaccessfmtdesc} +%\begin{definition} +%\cs{GLSaccessfmtdesc}\marg{insert}\marg{cs}\marg{label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\GLSaccessfmtdesc}[3]{% + \GLSfmtfield{#1}{#2}{#3}{desc}% + } % \end{macrocode} %\end{macro} % @@ -14222,6 +19017,18 @@ defined}{}% % \end{macrocode} %\end{macro} % +%\begin{macro}{\glsaccessfmtdescplural} +%\begin{definition} +%\cs{glsaccessfmtdescplural}\marg{insert}\marg{cs}\marg{label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\glsaccessfmtdescplural}[3]{% + \glsfmtfield{#1}{#2}{#3}{descplural}% + } +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\Glsaccessdescplural} % Display the \gloskey{descplural} value (no link and no check for existence) % with the first letter converted to upper case. @@ -14230,13 +19037,37 @@ defined}{}% % \end{macrocode} %\end{macro} % +%\begin{macro}{\Glsaccessfmtdescplural} +%\begin{definition} +%\cs{Glsaccessfmtdescplural}\marg{insert}\marg{cs}\marg{label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\Glsaccessfmtdescplural}[3]{% + \Glsfmtfield{#1}{#2}{#3}{descplural}% + } +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\GLSaccessdescplural} % Display the \gloskey{descplural} value (no link and no check for existence). % converted to upper case. %\changes{0.5.2}{2015-12-08}{new} % \begin{macrocode} \newcommand*{\GLSaccessdescplural}[1]{% - \protect\mfirstucMakeUppercase{\glsentrydescplural{#1}}} + \protect\glsuppercase{\glsentrydescplural{#1}}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GLSaccessfmtdescplural} +%\begin{definition} +%\cs{GLSaccessfmtdescplural}\marg{insert}\marg{cs}\marg{label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\GLSaccessfmtdescplural}[3]{% + \GLSfmtfield{#1}{#2}{#3}{descplural}% + } % \end{macrocode} %\end{macro} % @@ -14247,6 +19078,18 @@ defined}{}% % \end{macrocode} %\end{macro} % +%\begin{macro}{\glsaccessfmtshort} +%\begin{definition} +%\cs{glsaccessfmtshort}\marg{insert}\marg{cs}\marg{label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\glsaccessfmtshort}[3]{% + \glsfmtfield{#1}{#2}{#3}{short}% + } +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\Glsaccessshort} % Display the short form with first letter converted to uppercase % (no link and no check for existence). @@ -14255,13 +19098,37 @@ defined}{}% % \end{macrocode} %\end{macro} % +%\begin{macro}{\Glsaccessfmtshort} +%\begin{definition} +%\cs{Glsaccessfmtshort}\marg{insert}\marg{cs}\marg{label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\Glsaccessfmtshort}[3]{% + \Glsfmtfield{#1}{#2}{#3}{short}% + } +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\GLSaccessshort} % Display the \gloskey{short} value (no link and no check for existence). % converted to upper case. %\changes{0.5.2}{2015-12-08}{new} % \begin{macrocode} \newcommand*{\GLSaccessshort}[1]{% - \protect\mfirstucMakeUppercase{\glsentryshort{#1}}} + \protect\glsuppercase{\glsentryshort{#1}}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GLSaccessfmtshort} +%\begin{definition} +%\cs{GLSaccessfmtshort}\marg{insert}\marg{cs}\marg{label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\GLSaccessfmtshort}[3]{% + \GLSfmtfield{#1}{#2}{#3}{short}% + } % \end{macrocode} %\end{macro} % @@ -14272,6 +19139,18 @@ defined}{}% % \end{macrocode} %\end{macro} % +%\begin{macro}{\glsaccessfmtshortpl} +%\begin{definition} +%\cs{glsaccessfmtshortpl}\marg{insert}\marg{cs}\marg{label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\glsaccessfmtshortpl}[3]{% + \glsfmtfield{#1}{#2}{#3}{shortpl}% + } +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\Glsaccessshortpl} % Display the short plural form with first letter converted to % uppercase (no link and no check for existence). @@ -14280,13 +19159,37 @@ defined}{}% % \end{macrocode} %\end{macro} % +%\begin{macro}{\Glsaccessfmtshortpl} +%\begin{definition} +%\cs{Glsaccessfmtshortpl}\marg{insert}\marg{cs}\marg{label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\Glsaccessfmtshortpl}[3]{% + \Glsfmtfield{#1}{#2}{#3}{shortpl}% + } +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\GLSaccessshortpl} % Display the \gloskey{shortplural} value (no link and no check for existence). % converted to upper case. %\changes{0.5.2}{2015-12-08}{new} % \begin{macrocode} \newcommand*{\GLSaccessshortpl}[1]{% - \protect\mfirstucMakeUppercase{\glsentryshortpl{#1}}} + \protect\glsuppercase{\glsentryshortpl{#1}}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GLSaccessfmtshortpl} +%\begin{definition} +%\cs{GLSaccessfmtshortpl}\marg{insert}\marg{cs}\marg{label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\GLSaccessfmtshortpl}[3]{% + \GLSfmtfield{#1}{#2}{#3}{shortpl}% + } % \end{macrocode} %\end{macro} % @@ -14297,6 +19200,18 @@ defined}{}% % \end{macrocode} %\end{macro} % +%\begin{macro}{\glsaccessfmtlong} +%\begin{definition} +%\cs{glsaccessfmtlong}\marg{insert}\marg{cs}\marg{label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\glsaccessfmtlong}[3]{% + \glsfmtfield{#1}{#2}{#3}{long}% + } +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\Glsaccesslong} % Display the long form (no link and no check for existence). % \begin{macrocode} @@ -14304,13 +19219,37 @@ defined}{}% % \end{macrocode} %\end{macro} % +%\begin{macro}{\Glsaccessfmtlong} +%\begin{definition} +%\cs{Glsaccessfmtlong}\marg{insert}\marg{cs}\marg{label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\Glsaccessfmtlong}[3]{% + \Glsfmtfield{#1}{#2}{#3}{long}% + } +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\GLSaccesslong} % Display the \gloskey{long} value (no link and no check for existence). % converted to upper case. %\changes{0.5.2}{2015-12-08}{new} % \begin{macrocode} \newcommand*{\GLSaccesslong}[1]{% - \protect\mfirstucMakeUppercase{\glsentrylong{#1}}} + \protect\glsuppercase{\glsentrylong{#1}}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GLSaccessfmtlong} +%\begin{definition} +%\cs{GLSaccessfmtlong}\marg{insert}\marg{cs}\marg{label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\GLSaccessfmtlong}[3]{% + \GLSfmtfield{#1}{#2}{#3}{long}% + } % \end{macrocode} %\end{macro} % @@ -14321,6 +19260,18 @@ defined}{}% % \end{macrocode} %\end{macro} % +%\begin{macro}{\glsaccessfmtlongpl} +%\begin{definition} +%\cs{glsaccessfmtlongpl}\marg{insert}\marg{cs}\marg{label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\glsaccessfmtlongpl}[3]{% + \glsfmtfield{#1}{#2}{#3}{longpl}% + } +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\Glsaccesslongpl} % Display the long plural form (no link and no check for existence). % \begin{macrocode} @@ -14328,13 +19279,421 @@ defined}{}% % \end{macrocode} %\end{macro} % +%\begin{macro}{\Glsaccessfmtlongpl} +%\begin{definition} +%\cs{Glsaccessfmtlongpl}\marg{insert}\marg{cs}\marg{label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\Glsaccessfmtlongpl}[3]{% + \Glsfmtfield{#1}{#2}{#3}{longpl}% + } +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\GLSaccesslongpl} % Display the \gloskey{longplural} value (no link and no check for existence). % converted to upper case. %\changes{0.5.2}{2015-12-08}{new} % \begin{macrocode} \newcommand*{\GLSaccesslongpl}[1]{% - \protect\mfirstucMakeUppercase{\glsentrylongpl{#1}}} + \protect\glsuppercase{\glsentrylongpl{#1}}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GLSaccessfmtlongpl} +%\begin{definition} +%\cs{GLSaccessfmtlongpl}\marg{insert}\marg{cs}\marg{label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\GLSaccessfmtlongpl}[3]{% + \GLSfmtfield{#1}{#2}{#3}{longpl}% + } +% \end{macrocode} +%\end{macro} +% +%USER1 +%\begin{macro}{\glsaccessuseri} +% Display the \gloskey{user1} value (no link and no check for existence). +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\glsaccessuseri}[1]{\glsentryuseri{#1}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsaccessfmtuseri} +%\begin{definition} +%\cs{glsaccessfmtuseri}\marg{insert}\marg{cs}\marg{label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\glsaccessfmtuseri}[3]{% + \glsfmtfield{#1}{#2}{#3}{useri}% + } +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\Glsaccessuseri} +% Display the \gloskey{user1} value (no link and no check for existence) +% with the first letter converted to upper case. +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\Glsaccessuseri}[1]{\Glsentryuseri{#1}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\Glsaccessfmtuseri} +%\begin{definition} +%\cs{Glsaccessfmtuseri}\marg{insert}\marg{cs}\marg{label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\Glsaccessfmtuseri}[3]{% + \Glsfmtfield{#1}{#2}{#3}{useri}% + } +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GLSaccessuseri} +% Display the \gloskey{user1} value (no link and no check for existence). +% converted to upper case. +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\GLSaccessuseri}[1]{% + \protect\glsuppercase{\glsentryuseri{#1}}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GLSaccessfmtuseri} +%\begin{definition} +%\cs{GLSaccessfmtuseri}\marg{insert}\marg{cs}\marg{label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\GLSaccessfmtuseri}[3]{% + \GLSfmtfield{#1}{#2}{#3}{useri}% + } +% \end{macrocode} +%\end{macro} +% +%USER2 +%\begin{macro}{\glsaccessuserii} +% Display the \gloskey{user2} value (no link and no check for existence). +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\glsaccessuserii}[1]{\glsentryuserii{#1}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsaccessfmtuserii} +%\begin{definition} +%\cs{glsaccessfmtuserii}\marg{insert}\marg{cs}\marg{label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\glsaccessfmtuserii}[3]{% + \glsfmtfield{#1}{#2}{#3}{userii}% + } +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\Glsaccessuserii} +% Display the \gloskey{user2} value (no link and no check for existence) +% with the first letter converted to upper case. +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\Glsaccessuserii}[1]{\Glsentryuserii{#1}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\Glsaccessfmtuserii} +%\begin{definition} +%\cs{Glsaccessfmtuserii}\marg{insert}\marg{cs}\marg{label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\Glsaccessfmtuserii}[3]{% + \Glsfmtfield{#1}{#2}{#3}{userii}% + } +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GLSaccessuserii} +% Display the \gloskey{user2} value (no link and no check for existence). +% converted to upper case. +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\GLSaccessuserii}[1]{% + \protect\glsuppercase{\glsentryuserii{#1}}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GLSaccessfmtuserii} +%\begin{definition} +%\cs{GLSaccessfmtuserii}\marg{insert}\marg{cs}\marg{label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\GLSaccessfmtuserii}[3]{% + \GLSfmtfield{#1}{#2}{#3}{userii}% + } +% \end{macrocode} +%\end{macro} +% +%USER3 +%\begin{macro}{\glsaccessuseriii} +% Display the \gloskey{user3} value (no link and no check for existence). +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\glsaccessuseriii}[1]{\glsentryuseriii{#1}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsaccessfmtuseriii} +%\begin{definition} +%\cs{glsaccessfmtuseriii}\marg{insert}\marg{cs}\marg{label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\glsaccessfmtuseriii}[3]{% + \glsfmtfield{#1}{#2}{#3}{useriii}% + } +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\Glsaccessuseriii} +% Display the \gloskey{user3} value (no link and no check for existence) +% with the first letter converted to upper case. +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\Glsaccessuseriii}[1]{\Glsentryuseriii{#1}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\Glsaccessfmtuseriii} +%\begin{definition} +%\cs{Glsaccessfmtuseriii}\marg{insert}\marg{cs}\marg{label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\Glsaccessfmtuseriii}[3]{% + \Glsfmtfield{#1}{#2}{#3}{useriii}% + } +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GLSaccessuseriii} +% Display the \gloskey{user3} value (no link and no check for existence). +% converted to upper case. +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\GLSaccessuseriii}[1]{% + \protect\glsuppercase{\glsentryuseriii{#1}}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GLSaccessfmtuseriii} +%\begin{definition} +%\cs{GLSaccessfmtuseriii}\marg{insert}\marg{cs}\marg{label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\GLSaccessfmtuseriii}[3]{% + \GLSfmtfield{#1}{#2}{#3}{useriii}% + } +% \end{macrocode} +%\end{macro} +% +%USER4 +%\begin{macro}{\glsaccessuseriv} +% Display the \gloskey{user4} value (no link and no check for existence). +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\glsaccessuseriv}[1]{\glsentryuseriv{#1}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsaccessfmtuseriv} +%\begin{definition} +%\cs{glsaccessfmtuseriv}\marg{insert}\marg{cs}\marg{label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\glsaccessfmtuseriv}[3]{% + \glsfmtfield{#1}{#2}{#3}{useriv}% + } +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\Glsaccessuseriv} +% Display the \gloskey{user4} value (no link and no check for existence) +% with the first letter converted to upper case. +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\Glsaccessuseriv}[1]{\Glsentryuseriv{#1}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\Glsaccessfmtuseriv} +%\begin{definition} +%\cs{Glsaccessfmtuseriv}\marg{insert}\marg{cs}\marg{label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\Glsaccessfmtuseriv}[3]{% + \Glsfmtfield{#1}{#2}{#3}{useriv}% + } +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GLSaccessuseriv} +% Display the \gloskey{user4} value (no link and no check for existence). +% converted to upper case. +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\GLSaccessuseriv}[1]{% + \protect\glsuppercase{\glsentryuseriv{#1}}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GLSaccessfmtuseriv} +%\begin{definition} +%\cs{GLSaccessfmtuseriv}\marg{insert}\marg{cs}\marg{label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\GLSaccessfmtuseriv}[3]{% + \GLSfmtfield{#1}{#2}{#3}{useriv}% + } +% \end{macrocode} +%\end{macro} +% +%USER5 +%\begin{macro}{\glsaccessuserv} +% Display the \gloskey{user5} value (no link and no check for existence). +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\glsaccessuserv}[1]{\glsentryuserv{#1}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsaccessfmtuserv} +%\begin{definition} +%\cs{glsaccessfmtuserv}\marg{insert}\marg{cs}\marg{label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\glsaccessfmtuserv}[3]{% + \glsfmtfield{#1}{#2}{#3}{userv}% + } +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\Glsaccessuserv} +% Display the \gloskey{user5} value (no link and no check for existence) +% with the first letter converted to upper case. +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\Glsaccessuserv}[1]{\Glsentryuserv{#1}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\Glsaccessfmtuserv} +%\begin{definition} +%\cs{Glsaccessfmtuserv}\marg{insert}\marg{cs}\marg{label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\Glsaccessfmtuserv}[3]{% + \Glsfmtfield{#1}{#2}{#3}{userv}% + } +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GLSaccessuserv} +% Display the \gloskey{user5} value (no link and no check for existence). +% converted to upper case. +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\GLSaccessuserv}[1]{% + \protect\glsuppercase{\glsentryuserv{#1}}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GLSaccessfmtuserv} +%\begin{definition} +%\cs{GLSaccessfmtuserv}\marg{insert}\marg{cs}\marg{label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\GLSaccessfmtuserv}[3]{% + \GLSfmtfield{#1}{#2}{#3}{userv}% + } +% \end{macrocode} +%\end{macro} +% +%USER6 +%\begin{macro}{\glsaccessuservi} +% Display the \gloskey{user6} value (no link and no check for existence). +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\glsaccessuservi}[1]{\glsentryuservi{#1}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsaccessfmtuservi} +%\begin{definition} +%\cs{glsaccessfmtuservi}\marg{insert}\marg{cs}\marg{label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\glsaccessfmtuservi}[3]{% + \glsfmtfield{#1}{#2}{#3}{uservi}% + } +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\Glsaccessuservi} +% Display the \gloskey{user6} value (no link and no check for existence) +% with the first letter converted to upper case. +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\Glsaccessuservi}[1]{\Glsentryuservi{#1}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\Glsaccessfmtuservi} +%\begin{definition} +%\cs{Glsaccessfmtuservi}\marg{insert}\marg{cs}\marg{label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\Glsaccessfmtuservi}[3]{% + \Glsfmtfield{#1}{#2}{#3}{uservi}% + } +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GLSaccessuservi} +% Display the \gloskey{user6} value (no link and no check for existence). +% converted to upper case. +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\GLSaccessuservi}[1]{% + \protect\glsuppercase{\glsentryuservi{#1}}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GLSaccessfmtuservi} +%\begin{definition} +%\cs{GLSaccessfmtuservi}\marg{insert}\marg{cs}\marg{label} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\GLSaccessfmtuservi}[3]{% + \GLSfmtfield{#1}{#2}{#3}{uservi}% + } % \end{macrocode} %\end{macro} % @@ -14391,8 +19750,87 @@ defined}{}% } % \end{macrocode} %\end{macro} -% -%\section{Categories} +%Identify sentence-case mappings: +% \begin{macrocode} +\glsmfuaddmap{\glsaccessname}{\Glsaccessname} +\glsmfuaddmap{\glsaccessfmtname}{\Glsaccessfmtname} +\glsmfublocker{\GLSaccessname} +\glsmfublocker{\GLSaccessfmtname} +\glsmfuaddmap{\glsaccesstext}{\Glsaccesstext} +\glsmfuaddmap{\glsaccessfmttext}{\Glsaccessfmttext} +\glsmfublocker{\GLSaccesstext} +\glsmfublocker{\GLSaccessfmttext} +\glsmfuaddmap{\glsaccessplural}{\Glsaccessplural} +\glsmfuaddmap{\glsaccessfmtplural}{\Glsaccessfmtplural} +\glsmfublocker{\GLSaccessplural} +\glsmfublocker{\GLSaccessfmtplural} +\glsmfuaddmap{\glsaccessfirst}{\Glsaccessfirst} +\glsmfuaddmap{\glsaccessfmtfirst}{\Glsaccessfmtfirst} +\glsmfublocker{\GLSaccessfirst} +\glsmfublocker{\GLSaccessfmtfirst} +\glsmfuaddmap{\glsaccessfirstplural}{\Glsaccessfirstplural} +\glsmfuaddmap{\glsaccessfmtfirstplural}{\Glsaccessfmtfirstplural} +\glsmfublocker{\GLSaccessfirstplural} +\glsmfublocker{\GLSaccessfmtfirstplural} +\glsmfuaddmap{\glsaccesssymbol}{\Glsaccesssymbol} +\glsmfuaddmap{\glsaccessfmtsymbol}{\Glsaccessfmtsymbol} +\glsmfublocker{\GLSaccesssymbol} +\glsmfublocker{\GLSaccessfmtsymbol} +\glsmfuaddmap{\glsaccesssymbolplural}{\Glsaccesssymbolplural} +\glsmfuaddmap{\glsaccessfmtsymbolplural}{\Glsaccessfmtsymbolplural} +\glsmfublocker{\GLSaccesssymbolplural} +\glsmfublocker{\GLSaccessfmtsymbolplural} +\glsmfuaddmap{\glsaccessdesc}{\Glsaccessdesc} +\glsmfuaddmap{\glsaccessfmtdesc}{\Glsaccessfmtdesc} +\glsmfublocker{\GLSaccessdesc} +\glsmfublocker{\GLSaccessfmtdesc} +\glsmfuaddmap{\glsaccessdescplural}{\Glsaccessdescplural} +\glsmfuaddmap{\glsaccessfmtdescplural}{\Glsaccessfmtdescplural} +\glsmfublocker{\GLSaccessdescplural} +\glsmfublocker{\GLSaccessfmtdescplural} +\glsmfuaddmap{\glsaccessshort}{\Glsaccessshort} +\glsmfuaddmap{\glsaccessfmtshort}{\Glsaccessfmtshort} +\glsmfublocker{\GLSaccessshort} +\glsmfublocker{\GLSaccessfmtshort} +\glsmfuaddmap{\glsaccessshortpl}{\Glsaccessshortpl} +\glsmfuaddmap{\glsaccessfmtshortpl}{\Glsaccessfmtshortpl} +\glsmfublocker{\GLSaccessshortpl} +\glsmfublocker{\GLSaccessfmtshortpl} +\glsmfuaddmap{\glsaccesslong}{\Glsaccesslong} +\glsmfuaddmap{\glsaccessfmtlong}{\Glsaccessfmtlong} +\glsmfublocker{\GLSaccesslong} +\glsmfublocker{\GLSaccessfmtlong} +\glsmfuaddmap{\glsaccesslongpl}{\Glsaccesslongpl} +\glsmfuaddmap{\glsaccessfmtlongpl}{\Glsaccessfmtlongpl} +\glsmfublocker{\GLSaccesslongpl} +\glsmfublocker{\GLSaccessfmtlongpl} +\glsmfuaddmap{\glsaccessuseri}{\Glsaccessuseri} +\glsmfuaddmap{\glsaccessfmtuseri}{\Glsaccessfmtuseri} +\glsmfublocker{\GLSaccessuseri} +\glsmfublocker{\GLSaccessfmtuseri} +\glsmfuaddmap{\glsaccessuserii}{\Glsaccessuserii} +\glsmfuaddmap{\glsaccessfmtuserii}{\Glsaccessfmtuserii} +\glsmfublocker{\GLSaccessuserii} +\glsmfublocker{\GLSaccessfmtuserii} +\glsmfuaddmap{\glsaccessuseriii}{\Glsaccessuseriii} +\glsmfuaddmap{\glsaccessfmtuseriii}{\Glsaccessfmtuseriii} +\glsmfublocker{\GLSaccessuseriii} +\glsmfublocker{\GLSaccessfmtuseriii} +\glsmfuaddmap{\glsaccessuseriv}{\Glsaccessuseriv} +\glsmfuaddmap{\glsaccessfmtuseriv}{\Glsaccessfmtuseriv} +\glsmfublocker{\GLSaccessuseriv} +\glsmfublocker{\GLSaccessfmtuseriv} +\glsmfuaddmap{\glsaccessuserv}{\Glsaccessuserv} +\glsmfuaddmap{\glsaccessfmtuserv}{\Glsaccessfmtuserv} +\glsmfublocker{\GLSaccessuserv} +\glsmfublocker{\GLSaccessfmtuserv} +\glsmfuaddmap{\glsaccessuservi}{\Glsaccessuservi} +\glsmfuaddmap{\glsaccessfmtuservi}{\Glsaccessfmtuservi} +\glsmfublocker{\GLSaccessuservi} +\glsmfublocker{\GLSaccessfmtuservi} +% \end{macrocode} +% +%\subsection{Categories} %\begin{macro}{\glscategory} % Add a new storage key that can be used to indicate a category. The % default category is \category{general}. @@ -14460,6 +19898,22 @@ defined}{}% % \end{macrocode} %\end{macro} % +%\begin{macro}{\glssetcategoryattributes} +%\begin{definition} +%\cs{glssetcategoryattributes}\marg{category}\marg{attribute list}\marg{value} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} +% Similar to above, but globally apply to each attribute in the list +% to the given category. +% \begin{macrocode} +\newcommand*{\glssetcategoryattributes}[3]{% + \@for\@gls@thisattrlabel:=#2\do{% + \csgdef{@glsxtr@categoryattr@@#1@\@gls@thisattrlabel}{#3}% + }% +} +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\glsgetcategoryattribute} %\begin{definition} %\cs{glsgetcategoryattribute}\marg{category}\marg{attribute-label} @@ -14575,6 +20029,69 @@ defined}{}% % \end{macrocode} %\end{macro} % +%Provide expandable test to determine if attribute is set to true. +%\begin{macro}{\@glsxtr@truevalue} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand*{\@glsxtr@truevalue}{true} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsifcategoryattributetrue} +%\changes{1.49}{2022-10-14}{new} +%\begin{definition} +%\cs{glsifcategoryattributetrue}\marg{category-label}\marg{attribute}\marg{true}\marg{false} +%\end{definition} +%Does \meta{false} if the entry hasn't been defined. +% \begin{macrocode} +\newcommand*{\glsifcategoryattributetrue}[4]{% + \ifcsequal{@glsxtr@categoryattr@@#1@#2}% + {@glsxtr@truevalue}% + {#3}{#4}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsifattributetrue} +%\changes{1.49}{2022-10-14}{new} +%\begin{definition} +%\cs{glsifattributetrue}\marg{label}\marg{attribute}\marg{true}\marg{false} +%\end{definition} +%Does \meta{false} if the entry hasn't been defined. +% \begin{macrocode} +\newcommand*{\glsifattributetrue}[4]{% + \ifcsundef{glo@\glsdetoklabel{#1}@category}% + {#4} + {\ifcsequal + {@glsxtr@categoryattr@@\csname glo@\glsdetoklabel{#1}@category\endcsname @#2}% + {@glsxtr@truevalue}% + {#3}{#4}% + }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsifcategoryattributehasitem} +%\changes{1.49}{2022-10-14}{new} +%\begin{definition} +%\cs{glsifcategoryattributehasitem}\marg{category}\marg{attribute-label}\marg{item}\marg{true +%part}\marg{false part} +%\end{definition} +% True if category has the attribute (whose value is a +% comma-separated list) contains the given item. The \meta{item} is expanded. +% \begin{macrocode} +\newrobustcmd{\glsifcategoryattributehasitem}[5]{% + \ifcsundef{@glsxtr@categoryattr@@#1@#2}% + {#5}% + {% + \protected@edef\gls@tmp{% + \noexpand\DTLifinlist{#3}{\csuse{@glsxtr@categoryattr@@#1@#2}}}% + \gls@tmp{#4}{#5}% + }% +} +% \end{macrocode} +%\end{macro} +% % Set attributes for the default \category{general} category: % \begin{macrocode} \glssetcategoryattribute{general}{regular}{true} @@ -15006,7 +20523,7 @@ defined}{}% % Hide the label from the upper-casing command. % \begin{macrocode} \letcs{\glo@name}{glo@\glsdetoklabel{#1}@name}% - \@glsxtr@glossnamefont{\mfirstucMakeUppercase{\glo@name}}% + \@glsxtr@glossnamefont{\glsuppercase{\glo@name}}% }% {#1}% }% @@ -15067,12 +20584,12 @@ defined}{}% % Hide the label from the upper-casing command. % \begin{macrocode} \letcs{\glo@name}{glo@\glsdetoklabel{#1}@name}% - \@glsxtr@glossnamefont{\mfirstucMakeUppercase{\glo@name}}% + \@glsxtr@glossnamefont{\glsuppercase{\glo@name}}% }% {% % \end{macrocode} -% This little trick is used by \styfmt{glossaries} to allow the user to -% redefine \ics{glsnamefont} to use \cs{makefirstuc}. Support it +% This little trick is used by \sty{glossaries} to allow the user to +% redefine \cs{glsnamefont} to use \cs{makefirstuc}. Support it % even though they can now use the \catattr{firstuc} attribute. % \begin{macrocode} \letcs{\glo@name}{glo@\glsdetoklabel{#1}@name}% @@ -15171,7 +20688,7 @@ defined}{}% %\end{macro} % % Provide a convenient way to also index the entries using the -% standard \ics{index} mechanism. This may use different actual, +% standard \cs{index} mechanism. This may use different actual, % encap and escape characters to those used for the glossaries. % %\begin{macro}{\glsxtrpostnamehook} @@ -15303,7 +20820,7 @@ defined}{}% {% \letcs{\glo@name}{glo@\glsdetoklabel{#1}@#2}% \@glsxtr@accessdisplay - {\@glsxtr@glossnamefont{\mfirstucMakeUppercase{\glo@name}}}% + {\@glsxtr@glossnamefont{\glsuppercase{\glo@name}}}% {#1}% }% {% @@ -15317,7 +20834,7 @@ defined}{}% % \end{macrocode} % Do post-name hook. % \begin{macrocode} - \glsxtrpostnamehook{#1}% + \glsxtrpostnamehook{#1}% }% } % \end{macrocode} @@ -15333,7 +20850,7 @@ defined}{}% % \end{macrocode} %\end{macro} % -%If overriding is enabled, the \ics{glshypernumber} command will have to +%If overriding is enabled, the \cs{glshypernumber} command will have to %be redefined in the index to use \cs{hyperpage} instead. %\begin{macro}{\GlsXtrEnableIndexFormatOverride} % \begin{macrocode} @@ -15606,25 +21123,25 @@ defined}{}% %\end{macro} % % Set if defined. (For example, if \sty{doc} package has been -% loaded.) Actual character \ics{actualchar}: +% loaded.) Actual character \cs{actualchar}: % \begin{macrocode} \ifdef\actualchar {\expandafter\GlsXtrSetActualChar\expandafter{\actualchar}} {} % \end{macrocode} -% Quote character \ics{quotechar}: +% Quote character \cs{quotechar}: % \begin{macrocode} \ifdef\quotechar {\expandafter\GlsXtrSetEscChar\expandafter{\quotechar}} {} % \end{macrocode} -% Level character \ics{levelchar}: +% Level character \cs{levelchar}: % \begin{macrocode} \ifdef\levelchar {\expandafter\GlsXtrSetLevelChar\expandafter{\levelchar}} {} % \end{macrocode} -% Encap character \ics{encapchar}: +% Encap character \cs{encapchar}: % \begin{macrocode} \ifdef\encapchar {\expandafter\GlsXtrSetEncapChar\expandafter{\encapchar}} @@ -15683,20 +21200,14 @@ defined}{}% % entry definitions. %\changes{0.5.2}{2015-12-08}{added} % \begin{macrocode} -\ifdef\texorpdfstring -{ - \renewcommand*{\glossentrysymbol}[1]{% - \texorpdfstring{\@glossentrysymbol{#1}}{\glsentrypdfsymbol{#1}}% - } -} -{ - \renewcommand*{\glossentrysymbol}[1]{\@glossentrysymbol{#1}} +\renewcommand*{\glossentrysymbol}[1]{% + \glstexorpdfstring{\@glossentrysymbol{#1}}{\glsentrypdfsymbol{#1}}% } % \end{macrocode} %\end{macro} % %\begin{macro}{\glsentrypdfsymbol} -%\changes{1.4.2}{??}{new} +%\changes{1.42}{2020-02-13}{new} %May be redefined to a field that expands to a value that's more %suitable for PDF bookmarks. % \begin{macrocode} @@ -15705,7 +21216,7 @@ defined}{}% %\end{macro} % %\begin{macro}{\@glossentrysymbol} -%\changes{1.4.2}{??}{new} +%\changes{1.42}{2020-02-13}{new} %There are no case-changing attributes as it's less usual for %symbols. %\changes{1.46}{2021-09-20}{changed \cs{edef} to \cs{protected@edef}} @@ -15859,7 +21370,7 @@ defined}{}% %\end{macro} % %\begin{macro}{\@glsxtr@activate@initialtagging} -% Used in \cs{printglossary} but at least v4.19 of \styfmt{glossaries} +% Used in \cs{printglossary} but at least v4.19 of \sty{glossaries} % required. %\changes{0.5.2}{2015-12-08}{new} % \begin{macrocode} @@ -15887,7 +21398,7 @@ defined}{}% %\end{macro} % %\begin{macro}{\@gls@preglossaryhook} -% This macro was introduced in \styfmt{glossaries} version 4.19, so it +% This macro was introduced in \sty{glossaries} version 4.19, so it % may not be defined. If it hasn't been defined this feature is % unavailable. A check is added for the entry's existence to prevent % errors from occurring if the user removes an entry or changes the @@ -15949,6 +21460,8 @@ defined}{}% %\end{macro} % %\begin{macro}{\glsxtrpostdescterm} +%This is redundant as it doesn't match any common categories. +%\cs{newterm} sets the category to index. % \begin{macrocode} \newcommand*{\glsxtrpostdescterm}{} % \end{macrocode} @@ -16042,6 +21555,48 @@ defined}{}% % \end{macrocode} %\end{macro} % +%\begin{macro}{\glspretopostlink} +%\changes{1.49}{2022-10-14}{new} +%Similar to the above but prepend. +% \begin{macrocode} +\newcommand*{\glspretopostlink}[2]{% +% \end{macrocode} +% \cs{ifthenelse} is used to ensure that the expanded value is +% tested. (The category label must be fully expandable.) +% \begin{macrocode} + \ifthenelse{\equal{#1}{}}% + {\PackageError{glossaries-extra} + {Invalid empty category label in \string\glspretopostlink}{}}% + {% + \ifcsundef{glsxtrpostlink#1} + {\csdef{glsxtrpostlink#1}{#2}}% + {\cspreto{glsxtrpostlink#1}{#2}}% + }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsapptopostlink} +%\changes{1.49}{2022-10-14}{new} +%Similar to the above but append. +% \begin{macrocode} +\newcommand*{\glsapptopostlink}[2]{% +% \end{macrocode} +% \cs{ifthenelse} is used to ensure that the expanded value is +% tested. (The category label must be fully expandable.) +% \begin{macrocode} + \ifthenelse{\equal{#1}{}}% + {\PackageError{glossaries-extra} + {Invalid empty category label in \string\glspretopostlink}{}}% + {% + \ifcsundef{glsxtrpostlink#1} + {\csdef{glsxtrpostlink#1}{#2}}% + {\csappto{glsxtrpostlink#1}{#2}}% + }% +} +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\glsxtrpostlinkendsentence} %\changes{0.3}{2015-12-02}{new} % Done by \cs{glsxtrpostlinkhook} if a full stop is discarded. @@ -16072,9 +21627,11 @@ defined}{}% % first use, for the convenience of users wanting to add this to the % post link hook. %\changes{1.25}{2017-11-24}{changed to use \cs{glsxtrparen}} +%\changes{1.49}{2022-10-14}{added inner formatting} % \begin{macrocode} \newcommand*{\glsxtrpostlinkAddDescOnFirstUse}{% - \glsxtrifwasfirstuse{\space\glsxtrparen{\glsaccessdesc{\glslabel}}}{}% + \glsxtrifwasfirstuse{\glsxtrgenentrytextfmt{ }% + \glsxtrparen{\glsaccessfmtdesc{}{\glsxtrgenentrytextfmt}{\glslabel}}}{}% } % \end{macrocode} %\end{macro} @@ -16085,12 +21642,14 @@ defined}{}% % first use, for the convenience of users wanting to add this to the % post link hook. %\changes{1.25}{2017-11-24}{changed to use \cs{glsxtrparen}} +%\changes{1.49}{2022-10-14}{added inner formatting} % \begin{macrocode} \newcommand*{\glsxtrpostlinkAddSymbolOnFirstUse}{% \glsxtrifwasfirstuse {% \ifglshassymbol{\glslabel}% - {\space\glsxtrparen{\glsaccesssymbol{\glslabel}}}% + {\glsxtrgenentrytextfmt{ }% + \glsxtrparen{\glsaccessfmtsymbol{}{\glsxtrgenentrytextfmt}{\glslabel}}}% {}% }% {}% @@ -16108,12 +21667,13 @@ defined}{}% \newcommand*{\glsxtrpostlinkAddSymbolDescOnFirstUse}{% \glsxtrifwasfirstuse {% - \space\glsxtrparen + \glsxtrgenentrytextfmt{ }\glsxtrparen {% \ifglshassymbol{\glslabel}% - {\glsaccesssymbol{\glslabel}, }% + {\glsaccessfmtsymbol{}{\glsxtrgenentrytextfmt}{\glslabel}% + \expandafter\glsxtrgenentrytextfmt\expandafter{\glsxtrpostlinkSymbolDescSep}}% {}% - \glsaccessdesc{\glslabel}% + \glsaccessfmtdesc{}{\glsxtrgenentrytextfmt}{\glslabel}% }% }% {}% @@ -16121,6 +21681,23 @@ defined}{}% % \end{macrocode} %\end{macro} % +%\begin{macro}{\glsxtrpostlinkSymbolDescSep} +%\changes{1.49}{2022-10-14}{new} +% Separator used in the above +% \begin{macrocode} +\newcommand*{\glsxtrpostlinkSymbolDescSep}{, } +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrdiscardperiodretainfirstuse} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand*{\glsxtrdiscardperiodretainfirstuse}[3]{% + \glsxtrifwassubsequentorshort{\glsxtrifperiod{#2}{#3}}{#3}% +} +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\glsxtrdiscardperiod} % Discard following period (if present) if the % \catattr{discardperiod} attribute is true. If a period is @@ -16133,26 +21710,8 @@ defined}{}% %\changes{1.01}{2016-02-02}{added check for first use} % \begin{macrocode} \newcommand*{\glsxtrdiscardperiod}[3]{% - \glsxtrifwasfirstuse - {% - \glsifattribute{#1}{retainfirstuseperiod}{true}% - {#3}% - {% - \glsifattribute{#1}{discardperiod}{true}% - {% - \glsifplural - {% - \glsifattribute{#1}{pluraldiscardperiod}{true}% - {\glsxtrifperiod{#2}{#3}}% - {#3}% - }% - {% - \glsxtrifperiod{#2}{#3}% - }% - }% - {#3}% - }% - }% + \glsifattribute{#1}{retainfirstuseperiod}{true}% + {\glsxtrdiscardperiodretainfirstuse{#1}{#2}{#3}}% {% \glsifattribute{#1}{discardperiod}{true}% {% @@ -16206,7 +21765,7 @@ defined}{}% % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrifpunc} +%\begin{macro}{\glsxtrifnextpunc} %\begin{definition} %\cs{glsxtrifnextpunc}\marg{true part}\marg{false part} %\end{definition} @@ -16271,14 +21830,15 @@ defined}{}% %\end{macro} % %\begin{macro}{\glsxtrdopostpunc} +%\changes{1.49}{2022-10-14}{made robust} %\begin{definition} %\cs{glsxtrdopostpunc}\marg{code} %\end{definition} -% If this is followed be a punctuation character, do \meta{code} +% If this is followed by a punctuation character, do \meta{code} % after the character otherwise do \meta{code} before whatever comes % next. % \begin{macrocode} -\newcommand{\glsxtrdopostpunc}[1]{% +\newrobustcmd{\glsxtrdopostpunc}[1]{% \glsxtrifnextpunc{\@glsxtr@swaptwo{#1}}{#1}% } % \end{macrocode} @@ -16290,9 +21850,9 @@ defined}{}% % \end{macrocode} %\end{macro} % -%\section{Abbreviations} +%\subsection{Abbreviations} % -%The \qt{acronym} code from \styfmt{glossaries} is misnamed as it's more +%The \qt{acronym} code from \sty{glossaries} is misnamed as it's more %often used for other forms of abbreviations. This code corrects %this inconsistency, but rather than just having synonyms, provide % commands for abbreviations that have a similar, but not identical, @@ -16306,16 +21866,20 @@ defined}{}% \protected@edef\glscategorylabel{#1}% } % \end{macrocode} +%\changes{1.49}{2022-10-14}{split shortplural and longplural into separate +%family} +% The shortplural and longplural are parsed separately, so are now +% in another key family. % Save the short plural form. This may be needed before the entry is % defined. % \begin{macrocode} -\define@key{glsxtrabbrv}{shortplural}{% +\define@key{glsxtrabbrvpl}{shortplural}{% \def\@gls@shortpl{#1}% } % \end{macrocode} % Similarly for the long plural form. % \begin{macrocode} -\define@key{glsxtrabbrv}{longplural}{% +\define@key{glsxtrabbrvpl}{longplural}{% \def\@gls@longpl{#1}% } % \end{macrocode} @@ -16375,14 +21939,20 @@ defined}{}% %\begin{macro}{\glsxtrwordsep} %\changes{1.17}{2017-08-09}{new} % \begin{macrocode} -\newcommand*{\glsxtrwordsep}{\space} +\newcommand*{\glsxtrwordsep}{\glsxtrgenentrytextfmt{ }} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\glsxtrwordsephyphen} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand*{\glsxtrwordsephyphen}{\glsxtrgenentrytextfmt{-}} % \end{macrocode} %\end{macro} %Each word is marked with %\begin{macro}{\glsxtrword} %\changes{1.17}{2017-08-09}{new} % \begin{macrocode} -\newcommand*{\glsxtrword}[1]{#1} +\newcommand*{\glsxtrword}[1]{\glsxtrgenentrytextfmt{#1}} % \end{macrocode} %\end{macro} %\begin{macro}{\@glsxtr@markwordseps} @@ -16440,9 +22010,13 @@ defined}{}% \def\glsxtrorgshort{#3}% \def\glsxtrorglong{#4}% % \end{macrocode} +%\changes{1.49}{2022-10-14}{added \cs{glsxtrorgkeylist}} +% \begin{macrocode} + \def\glsxtrorgkeylist{#1}% +% \end{macrocode} %\changes{1.31}{2018-05-09}{added \cs{ExtraCustomAbbreviationFields}} -%Provide extra settings for hooks (if modified, this command must -%end with a comma). +%Provide extra settings for hooks. Make sure to append a comma if +%this hook is changed. % \begin{macrocode} \def\ExtraCustomAbbreviationFields{}% % \end{macrocode} @@ -16459,7 +22033,11 @@ defined}{}% % \end{macrocode} % Ignore the shortplural and longplural keys. % \begin{macrocode} - \setkeys*{glsxtrabbrv}[shortplural,longplural]{#1}% + \setkeys*{glsxtrabbrv}{#1}% +% \end{macrocode} +% Save remaining keys, just in case any hook also uses \cs{setkeys} +% \begin{macrocode} + \let\@glsxtrabbrv@rmkeys\XKV@rm % \end{macrocode} % Set the abbreviation style. % \begin{macrocode} @@ -16482,31 +22060,37 @@ defined}{}% }% % \end{macrocode} % Set the default long plural +%\changes{1.49}{2022-10-14}{bug fix: markwords doesn't include plural suffix} % \begin{macrocode} \def\@gls@longpl{#4\glspluralsuffix}% - \let\@gls@default@longpl\@gls@longpl % \end{macrocode} % Has the \catattr{markwords} attribute been set? % \begin{macrocode} \glsifcategoryattribute{\glscategorylabel}{markwords}{true}% {% \@glsxtr@markwordseps\@gls@long{#4}% - \expandafter\def\expandafter\@gls@longpl\expandafter - {\@gls@long\glspluralsuffix}% - \let\@gls@default@longpl\@gls@longpl % \end{macrocode} % Update \cs{glslongtok}. % \begin{macrocode} \expandafter\glslongtok\expandafter{\@gls@long}% +% \end{macrocode} +% Mark this entry as having a description with formatting. +% \begin{macrocode} + \glsexclapplyinnerfmtfield{\the\glslabeltok}{desc}% }% {}% % \end{macrocode} % Has the \catattr{markshortwords} attribute been set? (Not % compatible with \catattr{insertdots}.) % \begin{macrocode} + \let\@glsxtr@if@markshortwords\@secondoftwo \glsifcategoryattribute{\glscategorylabel}{markshortwords}{true}% {% - \@glsxtr@markwordseps\@gls@short{#3}% +% \end{macrocode} +% Don't mark words until the default plural has been obtained. +% \begin{macrocode} + \let\@glsxtr@if@markshortwords\@firstoftwo + \def\@gls@short{#3}% }% {% % \end{macrocode} @@ -16541,11 +22125,17 @@ defined}{}% {% \let\@gls@shortpl\@gls@short }% - {% + {% \expandafter\def\expandafter\@gls@shortpl\expandafter{\@gls@short \abbrvpluralsuffix}% }% }% + \@glsxtr@if@markshortwords + {% + \expandafter\@glsxtr@markwordseps\expandafter\@gls@short + \expandafter{\@gls@short}% + }% + {}% % \end{macrocode} % Update \cs{glsshorttok}: % \begin{macrocode} @@ -16557,29 +22147,52 @@ defined}{}% % \end{macrocode} % Get the short and long plurals provided by user in optional % argument to override defaults, if necessary. -% Ignore the category key (already obtained). +% Save the default short plural. % \begin{macrocode} - \setkeys*{glsxtrabbrv}[category]{#1}% + \let\@gls@default@shortpl\@gls@shortpl + \let\XKV@rm\@glsxtrabbrv@rmkeys + \setrmkeys*{glsxtrabbrvpl}% % \end{macrocode} -% Save in case required. +% Update \cs{glskeylisttok} so that it only has the remaining keys. % \begin{macrocode} - \let\@gls@org@longpl\@gls@longpl - \let\@gls@org@shortpl\@gls@shortpl + \expandafter\glskeylisttok\expandafter{\XKV@rm}% % \end{macrocode} -% Has the plural been explicitly set? +% Save in case required. % \begin{macrocode} - \ifx\@gls@default@longpl\@gls@longpl - \else + \let\@gls@org@longpl\@gls@longpl + \let\@gls@org@shortpl\@gls@shortpl % \end{macrocode} % Has the \catattr{markwords} attribute been set? % \begin{macrocode} - \glsifcategoryattribute{\glscategorylabel}{markwords}{true}% - {% - \expandafter\@glsxtr@markwordseps\expandafter\@gls@longpl\expandafter - {\@gls@longpl}% - }% - {}% - \fi + \glsifcategoryattribute{\glscategorylabel}{markwords}{true}% + {% + \expandafter\@glsxtr@markwordseps\expandafter\@gls@longpl\expandafter + {\@gls@longpl}% + }% + {}% +% \end{macrocode} +% Has the \catattr{markshortwords} attribute been set? +% \begin{macrocode} + \@glsxtr@if@markshortwords + {% + \expandafter\@glsxtr@markwordseps\expandafter\@gls@shortpl + \expandafter{\@gls@shortpl}% + }% + {% +% \end{macrocode} +% Has the \catattr{insertdots} attribute been set? +% \begin{macrocode} + \ifx\@gls@default@shortpl\@gls@shortpl + \else + \glsifcategoryattribute{\glscategorylabel}{insertdots}{true}% + {% + \expandafter\@glsxtr@insertdots\expandafter\@gls@shortpl + \expandafter{\@gls@shortpl}% + \appto\@gls@shortpl{\@}% + }% + {}% + \fi + }% % \end{macrocode} % Set the plural token registers so the values can be accessed by % the abbreviation styles. @@ -16601,8 +22214,8 @@ defined}{}% \protected@edef\@do@newglossaryentry{% \noexpand\newglossaryentry{\the\glslabeltok}% {% - type=\glsxtrabbrvtype,% - category=abbreviation,% + type={\glsxtrabbrvtype},% + category={\glscategorylabel},% short={\the\glsshorttok},% shortplural={\the\glsshortpltok},% long={\the\glslongtok},% @@ -16610,13 +22223,13 @@ defined}{}% name={\the\glsshorttok},% \CustomAbbreviationFields,% % \end{macrocode} -% Hook may override abbreviation style default settings (this hook -% must end with a comma if set). +% Hook may override abbreviation style default settings. % \begin{macrocode} \ExtraCustomAbbreviationFields % \end{macrocode} % Any explicit fields set in the optional argument override all -% other settings. +% other settings, except for the ones that have already been +% processed. % \begin{macrocode} \the\glskeylisttok }% @@ -16626,6 +22239,16 @@ defined}{}% % Obtain the type and add it to the list of abbreviations. % \begin{macrocode} \@glsxtr@addabbreviationlist{\glsentrytype{\the\glslabeltok}}% +% \end{macrocode} +% Exclude name, first, firstpl, text and plural fields from inner +% fmt as they include formatting commands. The description may also +% need adding, depending on the style. +% \begin{macrocode} + \glsexclapplyinnerfmtfield{\the\glslabeltok}{first}% + \glsexclapplyinnerfmtfield{\the\glslabeltok}{firstpl}% + \glsexclapplyinnerfmtfield{\the\glslabeltok}{text}% + \glsexclapplyinnerfmtfield{\the\glslabeltok}{plural}% + \glsexclapplyinnerfmtfield{\the\glslabeltok}{name}% \GlsXtrPostNewAbbreviation } % \end{macrocode} @@ -16663,55 +22286,150 @@ defined}{}% %\changes{1.17}{2017-08-09}{new} %For the parenthetical styles. % \begin{macrocode} -\newcommand*{\glsxtrparen}[1]{(#1)} +\newcommand*{\glsxtrparen}[1]{% + \glsxtrgenentrytextfmt{(}#1\glsxtrgenentrytextfmt{)}} % \end{macrocode} %\end{macro} % %\begin{macro}{\glsxtrfullformat} % Full format without case change. +%\changes{1.49}{2022-10-14}{added check for insert inside and inner fmt} % \begin{macrocode} \newcommand*{\glsxtrfullformat}[2]{% - \glsfirstlongfont{\glsaccesslong{#1}}#2\glsxtrfullsep{#1}% - \glsxtrparen{\protect\glsfirstabbrvfont{\glsaccessshort{#1}}}% + \ifglsxtrinsertinside + \glsfirstlongfont{\glsaccessfmtlong{#2}{\glsxtrgenentrytextfmt}{#1}}% + \else + \glsfirstlongfont{\glsaccessfmtlong{}{\glsxtrgenentrytextfmt}{#1}}% + \glsxtrgenentrytextfmt{#2}% + \fi + \glsxtrfullsep{#1}% + \glsxtrparen{\protect\glsfirstabbrvfont + {\glsaccessfmtshort{}{\glsxtrgenentrytextfmt}{#1}}}% } % \end{macrocode} %\end{macro} % %\begin{macro}{\Glsxtrfullformat} % Full format with case change. +%\changes{1.49}{2022-10-14}{added check for insert inside and inner fmt} % \begin{macrocode} \newcommand*{\Glsxtrfullformat}[2]{% - \glsfirstlongfont{\Glsaccesslong{#1}}#2\glsxtrfullsep{#1}% - \glsxtrparen{\protect\glsfirstabbrvfont{\glsaccessshort{#1}}}% + \ifglsxtrinsertinside + \glsfirstlongfont{\Glsaccessfmtlong{#2}{\glsxtrgenentrytextfmt}{#1}}% + \else + \glsfirstlongfont{\Glsaccessfmtlong{}{\glsxtrgenentrytextfmt}{#1}}% + \glsxtrgenentrytextfmt{#2}% + \fi + \glsxtrfullsep{#1}% + \glsxtrparen{\protect\glsfirstabbrvfont + {\glsaccessfmtshort{}{\glsxtrgenentrytextfmt}{#1}}}% +} +\glsmfuaddmap{\glsxtrfullformat}{\Glsxtrfullformat} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GLSxtrfullformat} +% Full format with all caps. +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand*{\GLSxtrfullformat}[2]{% + \ifglsxtrinsertinside + \glsfirstlongfont{\GLSaccessfmtlong{#2}{\glsxtrgenentrytextfmt}{#1}}% + \else + \glsfirstlongfont{\GLSaccessfmtlong{}{\glsxtrgenentrytextfmt}{#1}}% + \glsuppercase{\glsxtrgenentrytextfmt{#2}}% + \fi + \glsxtrfullsep{#1}% + \glsxtrparen{\protect\glsfirstabbrvfont + {\GLSaccessfmtshort{}{\glsxtrgenentrytextfmt}{#1}}}% } +\glsmfublocker{\GLSxtrfullformat} % \end{macrocode} %\end{macro} % %\begin{macro}{\glsxtrfullplformat} % Plural full format without case change. +%\changes{1.49}{2022-10-14}{added check for insert inside and inner fmt} % \begin{macrocode} \newcommand*{\glsxtrfullplformat}[2]{% - \glsfirstlongfont{\glsaccesslongpl{#1}}#2\glsxtrfullsep{#1}% - \glsxtrparen{\protect\glsfirstabbrvfont{\glsaccessshortpl{#1}}}% + \ifglsxtrinsertinside + \glsfirstlongfont{\glsaccessfmtlongpl{#2}{\glsxtrgenentrytextfmt}{#1}}% + \else + \glsfirstlongfont{\glsaccessfmtlongpl{}{\glsxtrgenentrytextfmt}{#1}}% + \glsxtrgenentrytextfmt{#2}% + \fi + \glsxtrfullsep{#1}% + \glsxtrparen{\protect\glsfirstabbrvfont + {\glsaccessfmtshortpl{}{\glsxtrgenentrytextfmt}{#1}}}% } % \end{macrocode} %\end{macro} % %\begin{macro}{\Glsxtrfullplformat} % Plural full format with case change. +%\changes{1.49}{2022-10-14}{added check for insert inside and inner fmt} % \begin{macrocode} \newcommand*{\Glsxtrfullplformat}[2]{% - \glsfirstlongfont{\Glsaccesslongpl{#1}}#2\glsxtrfullsep{#1}% - \glsxtrparen{\protect\glsfirstabbrvfont{\glsaccessshortpl{#1}}}% + \ifglsxtrinsertinside + \glsfirstlongfont{\Glsaccessfmtlongpl{#2}{\glsxtrgenentrytextfmt}{#1}}% + \else + \glsfirstlongfont{\Glsaccessfmtlongpl{}{\glsxtrgenentrytextfmt}{#1}}% + \glsxtrgenentrytextfmt{#2}% + \fi + \glsxtrfullsep{#1}% + \glsxtrparen{\protect\glsfirstabbrvfont + {\glsaccessfmtshortpl{}{\glsxtrgenentrytextfmt}{#1}}}% +} +\glsmfuaddmap{\glsxtrfullplformat}{\Glsxtrfullplformat} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GLSxtrfullplformat} +% Full format with all caps. +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand*{\GLSxtrfullplformat}[2]{% + \ifglsxtrinsertinside + \glsfirstlongfont{\GLSaccessfmtlongpl{#2}{\glsxtrgenentrytextfmt}{#1}}% + \else + \glsfirstlongfont{\GLSaccessfmtlongpl{}{\glsxtrgenentrytextfmt}{#1}}% + \glsuppercase{\glsxtrgenentrytextfmt{#2}}% + \fi + \glsxtrfullsep{#1}% + \glsxtrparen{\protect\glsfirstabbrvfont + {\GLSaccessfmtshortpl{}{\glsxtrgenentrytextfmt}{#1}}}% } +\glsmfublocker{\GLSxtrfullplformat} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GLSxtr@fullformat@fallback} +% Fallback for custom styles that don't implement all caps version. +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand*{\GLSxtr@fullformat@fallback}[2]{% + \glsuppercase{\glsxtrfullformat{##1}{##2}}% +}% +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GLSxtr@fullplformat@fallback} +% Fallback for custom styles that don't implement all caps version. +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand*{\GLSxtr@fullplformat@fallback}[2]{% + \glsuppercase{\glsxtrfullplformat{##1}{##2}}% +}% % \end{macrocode} %\end{macro} % +% %\begin{macro}{\glsxtrfullsep} % Separator used by full format is a space by default. The argument % is the entry's label. +%\changes{1.49}{2022-10-14}{added inner fmt} % \begin{macrocode} -\newcommand*{\glsxtrfullsep}[1]{\space} +\newcommand*{\glsxtrfullsep}[1]{\glsxtrgenentrytextfmt{ }} % \end{macrocode} %\end{macro} % @@ -16732,6 +22450,14 @@ defined}{}% % \end{macrocode} %\end{macro} % +%\begin{macro}{\GLSxtrinlinefullformat} +% Full format with all caps. +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand*{\GLSxtrinlinefullformat}{\GLSxtrfullformat} +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\glsxtrfullplformat} % Plural full format without case change. % \begin{macrocode} @@ -16746,10 +22472,20 @@ defined}{}% % \end{macrocode} %\end{macro} % +%\begin{macro}{\GLSxtrinlinefullplformat} +% Full format with all caps. +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand*{\GLSxtrinlinefullplformat}{\GLSxtrfullplformat} +% \end{macrocode} +%\end{macro} +% % Redefine \cs{glsentryfull} etc to use the inline format. -% Since these commands as supposed to be expandable, they can only +% Since these commands are supposed to be expandable, they can only % use the currently applied style. If there are mixed styles, you'll % need to use the \cs{glsxtrfull} set of commands instead. +% If expandable sentence case is required, use \cs{MFUsentencecase} +% on the non-case-change version. %\begin{macro}{\glsentryfull} % \begin{macrocode} \renewcommand*{\glsentryfull}[1]{\glsxtrinlinefullformat{#1}{}} @@ -16759,6 +22495,7 @@ defined}{}% %\begin{macro}{\Glsentryfull} % \begin{macrocode} \renewcommand*{\Glsentryfull}[1]{\Glsxtrinlinefullformat{#1}{}} +\glsmfuaddmap{\glsentryfull}{\Glsentryfull} % \end{macrocode} %\end{macro} % @@ -16771,6 +22508,7 @@ defined}{}% %\begin{macro}{\Glsentryfullpl} % \begin{macrocode} \renewcommand*{\Glsentryfullpl}[1]{\Glsxtrinlinefullplformat{#1}{}} +\glsmfuaddmap{\glsentryfullpl}{\Glsentryfullpl} % \end{macrocode} %\end{macro} % @@ -16782,6 +22520,28 @@ defined}{}% % \end{macrocode} %\end{macro} % +%\begin{macro}{\glsfirstinnerfmtabbrvfont} +%\changes{1.49}{2022-10-14}{new} +%Include inner formatting command. +% \begin{macrocode} +\newrobustcmd*{\glsfirstinnerfmtabbrvfont}[1]{% + \glsfirstabbrvfont{\glsxtrgenentrytextfmt{#1}}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsfirstxpabbrvfont} +%\changes{1.49}{2022-10-14}{new} +%Expand to appropriate formatting command. +% \begin{macrocode} +\newcommand*{\glsfirstxpabbrvfont}[2]{% + \glsifcategoryattributetrue{#2}{markshortwords}% + {\protect\glsfirstabbrvfont{#1}}% + {\glsfirstinnerfmtabbrvfont{#1}}% +} +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\glsfirstabbrvdefaultfont} % Font changing command used for the abbreviation on first use or in % the full format. @@ -16801,6 +22561,28 @@ defined}{}% % \end{macrocode} %\end{macro} % +%\begin{macro}{\glsinnerfmtabbrvfont} +%\changes{1.49}{2022-10-14}{new} +%Include inner formatting command. +% \begin{macrocode} +\newrobustcmd*{\glsinnerfmtabbrvfont}[1]{% + \glsabbrvfont{\glsxtrgenentrytextfmt{#1}}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxpabbrvfont} +%\changes{1.49}{2022-10-14}{new} +%Expand to appropriate formatting command. +% \begin{macrocode} +\newcommand*{\glsxpabbrvfont}[2]{% + \glsifcategoryattributetrue{#2}{markshortwords}% + {\protect\glsabbrvfont{#1}}% + {\glsinnerfmtabbrvfont{#1}}% +} +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\glsabbrvdefaultfont} %\changes{0.3}{2015-12-02}{renamed from \cs{abbrvdefaultfont}} % \begin{macrocode} @@ -16817,6 +22599,28 @@ defined}{}% % \end{macrocode} %\end{macro} % +%\begin{macro}{\glsinnerfmtlongfont} +%\changes{1.49}{2022-10-14}{new} +%Include inner formatting command. +% \begin{macrocode} +\newrobustcmd*{\glsinnerfmtlongfont}[1]{% + \glslongfont{\glsxtrgenentrytextfmt{#1}}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxplongfont} +%\changes{1.49}{2022-10-14}{new} +%Expand to appropriate formatting command. +% \begin{macrocode} +\newcommand*{\glsxplongfont}[2]{% + \glsifcategoryattributetrue{#2}{markwords}% + {\protect\glslongfont{#1}}% + {\glsinnerfmtlongfont{#1}}% +} +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\glslongdefaultfont} % Default font changing command used for the long form in commands like %\changes{1.04}{2016-05-02}{new} @@ -16834,6 +22638,28 @@ defined}{}% % \end{macrocode} %\end{macro} % +%\begin{macro}{\glsfirstinnerfmtlongfont} +%\changes{1.49}{2022-10-14}{new} +%Include inner formatting command. +% \begin{macrocode} +\newrobustcmd*{\glsfirstinnerfmtlongfont}[1]{% + \glsfirstlongfont{\glsxtrgenentrytextfmt{#1}}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsfirstxplongfont} +%\changes{1.49}{2022-10-14}{new} +%Expand to appropriate formatting command. +% \begin{macrocode} +\newcommand*{\glsfirstxplongfont}[2]{% + \glsifcategoryattributetrue{#2}{markwords}% + {\protect\glsfirstlongfont{#1}}% + {\glsfirstinnerfmtlongfont{#1}}% +} +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\glsfirstlongdefaultfont} %\changes{0.5}{2015-12-07}{new} % \begin{macrocode} @@ -16857,6 +22683,20 @@ defined}{}% % \end{macrocode} %\end{macro} % +%\begin{macro}{\glsxtrrevert} +%\changes{1.49}{2022-10-14}{new} +% Provide a way to counteract the abbreviation font. +% \begin{macrocode} +\newcommand*{\glsxtrrevert}[1]{\glsxtrdefaultrevert{#1}}% +% \end{macrocode} +%\end{macro} +%\begin{macro}{\glsxtrdefaultrevert} +%\changes{1.49}{2022-10-14}{new} +%The default simply does its argument. +% \begin{macrocode} +\newcommand*{\glsxtrdefaultrevert}[1]{#1}% +% \end{macrocode} +%\end{macro} %\begin{macro}{\glsxtrfull} % Full form (no case-change). % \begin{macrocode} @@ -16871,6 +22711,7 @@ defined}{}% % Low-level macro: % \begin{macrocode} \def\@glsxtr@full#1#2[#3]{% + \def\glsxtrcurrentfield{}% % \end{macrocode} %If the \pkgopt{record} option has been used, the information needs %to be written to the aux file regardless of whether the entry @@ -16882,9 +22723,13 @@ defined}{}% {% \glssetabbrvfmt{\glscategory{#2}}% \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsxtrifwasglslike\@secondoftwo \let\glsifplural\@secondoftwo \let\glscapscase\@firstofthree - \let\glsinsert\@empty + \glsxtrfullsaveinsert{#2}{#3}% +% \end{macrocode} +% The innertextformat support should be provided within the inline command. +% \begin{macrocode} \def\glscustomtext{\glsxtrinlinefullformat{#2}{#3}}% % \end{macrocode} % What should \cs{glsxtrifwasfirstuse} be set to here? Where the inline @@ -16918,19 +22763,25 @@ defined}{}% \new@ifnextchar[{\@Glsxtr@full{#1}{#2}}% {\@Glsxtr@full{#1}{#2}[]}% } +\glsmfuaddmap{\glsxtrfull}{\Glsxtrfull} % \end{macrocode} %\end{macro} %\begin{macro}{\@Glsxtr@full} % Low-level macro: % \begin{macrocode} \def\@Glsxtr@full#1#2[#3]{% + \def\glsxtrcurrentfield{}% \glsdoifexists{#2}% {% \glssetabbrvfmt{\glscategory{#2}}% \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsxtrifwasglslike\@secondoftwo \let\glsifplural\@secondoftwo \let\glscapscase\@secondofthree - \let\glsinsert\@empty + \glsxtrfullsaveinsert{#2}{#3}% +% \end{macrocode} +% The innertextformat support should be provided within the inline command. +% \begin{macrocode} \def\glscustomtext{\Glsxtrinlinefullformat{#2}{#3}}% \glsxtrsetupfulldefs \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% @@ -16954,19 +22805,25 @@ defined}{}% % Low-level macro: % \begin{macrocode} \def\@GLSxtr@full#1#2[#3]{% + \def\glsxtrcurrentfield{}% \glsdoifexists{#2}% {% \glssetabbrvfmt{\glscategory{#2}}% \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsxtrifwasglslike\@secondoftwo \let\glsifplural\@secondoftwo \let\glscapscase\@thirdofthree - \let\glsinsert\@empty - \def\glscustomtext{\mfirstucMakeUppercase{\glsxtrinlinefullformat{#2}{#3}}}% + \glsxtrfullsaveinsert{#2}{#3}% +% \end{macrocode} +% The innertextformat support should be provided within the inline command. +% \begin{macrocode} + \def\glscustomtext{\GLSxtrinlinefullformat{#2}{#3}}% \glsxtrsetupfulldefs \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% }% \glspostlinkhook } +\glsmfublocker{\GLSxtrfull} % \end{macrocode} %\end{macro} % @@ -16984,6 +22841,7 @@ defined}{}% % Low-level macro: % \begin{macrocode} \def\@glsxtr@fullpl#1#2[#3]{% + \def\glsxtrcurrentfield{}% % \end{macrocode} %If the \pkgopt{record} option has been used, the information needs %to be written to the aux file regardless of whether the entry @@ -16995,9 +22853,13 @@ defined}{}% {% \glssetabbrvfmt{\glscategory{#2}}% \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsxtrifwasglslike\@secondoftwo \let\glsifplural\@firstoftwo \let\glscapscase\@firstofthree - \let\glsinsert\@empty + \glsxtrfullsaveinsert{#2}{#3}% +% \end{macrocode} +% The innertextformat support should be provided within the inline command. +% \begin{macrocode} \def\glscustomtext{\glsxtrinlinefullplformat{#2}{#3}}% \glsxtrsetupfulldefs \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% @@ -17015,12 +22877,14 @@ defined}{}% \new@ifnextchar[{\@Glsxtr@fullpl{#1}{#2}}% {\@Glsxtr@fullpl{#1}{#2}[]}% } +\glsmfuaddmap{\glsxtrfullpl}{\Glsxtrfullpl} % \end{macrocode} %\end{macro} %\begin{macro}{\@Glsxtr@fullpl} % Low-level macro: % \begin{macrocode} \def\@Glsxtr@fullpl#1#2[#3]{% + \def\glsxtrcurrentfield{}% % \end{macrocode} %If the \pkgopt{record} option has been used, the information needs %to be written to the aux file regardless of whether the entry @@ -17032,9 +22896,13 @@ defined}{}% {% \glssetabbrvfmt{\glscategory{#2}}% \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsxtrifwasglslike\@secondoftwo \let\glsifplural\@firstoftwo \let\glscapscase\@secondofthree - \let\glsinsert\@empty + \glsxtrfullsaveinsert{#2}{#3}% +% \end{macrocode} +% The innertextformat support should be provided within the inline command. +% \begin{macrocode} \def\glscustomtext{\Glsxtrinlinefullplformat{#2}{#3}}% \glsxtrsetupfulldefs \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% @@ -17052,12 +22920,14 @@ defined}{}% \new@ifnextchar[{\@GLSxtr@fullpl{#1}{#2}}% {\@GLSxtr@fullpl{#1}{#2}[]}% } +\glsmfublocker{\GLSxtrfullpl} % \end{macrocode} %\end{macro} %\begin{macro}{\@GLSxtr@fullpl} % Low-level macro: % \begin{macrocode} \def\@GLSxtr@fullpl#1#2[#3]{% + \def\glsxtrcurrentfield{}% % \end{macrocode} %If the \pkgopt{record} option has been used, the information needs %to be written to the aux file regardless of whether the entry @@ -17068,11 +22938,15 @@ defined}{}% \glsdoifexists{#2}% {% \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsxtrifwasglslike\@secondoftwo \let\glsifplural\@firstoftwo \let\glscapscase\@thirdofthree - \let\glsinsert\@empty + \glsxtrfullsaveinsert{#2}{#3}% +% \end{macrocode} +% The innertextformat support should be provided within the inline command. +% \begin{macrocode} \def\glscustomtext{% - \mfirstucMakeUppercase{\glsxtrinlinefullplformat{#2}{#3}}}% + \GLSxtrinlinefullplformat{#2}{#3}}% \glsxtrsetupfulldefs \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% }% @@ -17096,6 +22970,7 @@ defined}{}% % Read in the final optional argument: % \begin{macrocode} \def\@glsxtrshort#1#2[#3]{% + \def\glsxtrcurrentfield{short}% % \end{macrocode} %If the \pkgopt{record} option has been used, the information needs %to be written to the aux file regardless of whether the entry @@ -17110,13 +22985,13 @@ defined}{}% % \begin{macrocode} \glssetabbrvfmt{\glscategory{#2}}% \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsxtrifwasglslike\@secondoftwo \let\glsxtrifwasfirstuse\@secondoftwo \let\glsifplural\@secondoftwo \let\glscapscase\@firstofthree - \let\glsinsert\@empty + \glsxtrsaveinsert{#2}{#3}% \def\glscustomtext{% - \glsabbrvfont{\glsaccessshort{#2}\ifglsxtrinsertinside#3\fi}% - \ifglsxtrinsertinside\else#3\fi + \glsxtrshortformat{#2}{#3}{\glsabbrvfont}% }% \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% }% @@ -17128,6 +23003,7 @@ defined}{}% %\begin{macro}{\Glsxtrshort} % \begin{macrocode} \newrobustcmd*{\Glsxtrshort}{\@gls@hyp@opt\ns@Glsxtrshort} +\glsmfuaddmap{\glsxtrshort}{\Glsxtrshort} % \end{macrocode} % Define the un-starred form. Need to determine if there is % a final optional argument @@ -17139,6 +23015,7 @@ defined}{}% % Read in the final optional argument: % \begin{macrocode} \def\@Glsxtrshort#1#2[#3]{% + \def\glsxtrcurrentfield{short}% % \end{macrocode} %If the \pkgopt{record} option has been used, the information needs %to be written to the aux file regardless of whether the entry @@ -17150,13 +23027,13 @@ defined}{}% {% \glssetabbrvfmt{\glscategory{#2}}% \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsxtrifwasglslike\@secondoftwo \let\glsxtrifwasfirstuse\@secondoftwo \let\glsifplural\@secondoftwo \let\glscapscase\@secondofthree - \let\glsinsert\@empty + \glsxtrsaveinsert{#2}{#3}% \def\glscustomtext{% - \glsabbrvfont{\Glsaccessshort{#2}\ifglsxtrinsertinside#3\fi}% - \ifglsxtrinsertinside\else#3\fi + \Glsxtrshortformat{#2}{#3}{\glsabbrvfont}% }% \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% }% @@ -17168,6 +23045,7 @@ defined}{}% %\begin{macro}{\GLSxtrshort} % \begin{macrocode} \newrobustcmd*{\GLSxtrshort}{\@gls@hyp@opt\ns@GLSxtrshort} +\glsmfublocker{\GLSxtrshort} % \end{macrocode} % Define the un-starred form. Need to determine if there is % a final optional argument @@ -17179,6 +23057,7 @@ defined}{}% % Read in the final optional argument: % \begin{macrocode} \def\@GLSxtrshort#1#2[#3]{% + \def\glsxtrcurrentfield{short}% % \end{macrocode} %If the \pkgopt{record} option has been used, the information needs %to be written to the aux file regardless of whether the entry @@ -17190,16 +23069,12 @@ defined}{}% {% \glssetabbrvfmt{\glscategory{#2}}% \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsxtrifwasglslike\@secondoftwo \let\glsxtrifwasfirstuse\@secondoftwo \let\glsifplural\@secondoftwo \let\glscapscase\@thirdofthree - \let\glsinsert\@empty - \def\glscustomtext{% - \mfirstucMakeUppercase - {\glsabbrvfont{\glsaccessshort{#2}\ifglsxtrinsertinside#3\fi}% - \ifglsxtrinsertinside\else#3\fi - }% - }% + \glsxtrsaveinsert{#2}{#3}% + \def\glscustomtext{\GLSxtrshortformat{#2}{#3}{\glsabbrvfont}}% \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% }% \glspostlinkhook @@ -17207,6 +23082,18 @@ defined}{}% % \end{macrocode} %\end{macro} % +%\begin{macro}{\glsxtrsetlongfirstuse} +% Assigns \cs{glsxtrifwasfirstuse} for the long commands. +%The argument is the entry label. This now makes commands such as +%\cs{glsxtrlong} simulate first use. +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand{\glsxtrsetlongfirstuse}[1]{% + \let\glsxtrifwasfirstuse\@firstoftwo +} +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\glsxtrlong} % \begin{macrocode} \newrobustcmd*{\glsxtrlong}{\@gls@hyp@opt\ns@glsxtrlong} @@ -17221,6 +23108,7 @@ defined}{}% % Read in the final optional argument: % \begin{macrocode} \def\@glsxtrlong#1#2[#3]{% + \def\glsxtrcurrentfield{long}% % \end{macrocode} %If the \pkgopt{record} option has been used, the information needs %to be written to the aux file regardless of whether the entry @@ -17231,13 +23119,13 @@ defined}{}% \glsdoifexists{#2}% {% \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper - \let\glsxtrifwasfirstuse\@secondoftwo + \let\glsxtrifwasglslike\@secondoftwo \let\glsifplural\@secondoftwo \let\glscapscase\@firstofthree - \let\glsinsert\@empty + \glsxtrsetlongfirstuse{#2}% + \glsxtrsaveinsert{#2}{#3}% \def\glscustomtext{% - \glslongfont{\glsaccesslong{#2}\ifglsxtrinsertinside#3\fi}% - \ifglsxtrinsertinside\else#3\fi + \glsxtrlongformat{#2}{#3}{\glslongfont}% }% \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% }% @@ -17249,6 +23137,7 @@ defined}{}% %\begin{macro}{\Glsxtrlong} % \begin{macrocode} \newrobustcmd*{\Glsxtrlong}{\@gls@hyp@opt\ns@Glsxtrlong} +\glsmfuaddmap{\glsxtrlong}{\Glsxtrlong} % \end{macrocode} % Define the un-starred form. Need to determine if there is % a final optional argument @@ -17260,23 +23149,25 @@ defined}{}% % Read in the final optional argument: % \begin{macrocode} \def\@Glsxtrlong#1#2[#3]{% + \def\glsxtrcurrentfield{long}% % \end{macrocode} %If the \pkgopt{record} option has been used, the information needs %to be written to the aux file regardless of whether the entry %exists (unless indexing has been switched off). %\changes{1.30}{2018-04-25}{added \cs{@glsxtr@record}} +%\changes{1.49}{2022-10-14}{now simulates first use} % \begin{macrocode} \@glsxtr@record{#1}{#2}{glslink}% \glsdoifexists{#2}% {% \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper - \let\glsxtrifwasfirstuse\@secondoftwo + \let\glsxtrifwasglslike\@secondoftwo \let\glsifplural\@secondoftwo \let\glscapscase\@secondofthree - \let\glsinsert\@empty + \glsxtrsetlongfirstuse{#2}% + \glsxtrsaveinsert{#2}{#3}% \def\glscustomtext{% - \glslongfont{\Glsaccesslong{#2}\ifglsxtrinsertinside#3\fi}% - \ifglsxtrinsertinside\else#3\fi + \Glsxtrlongformat{#2}{#3}{\glslongfont}% }% \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% }% @@ -17288,6 +23179,7 @@ defined}{}% %\begin{macro}{\GLSxtrlong} % \begin{macrocode} \newrobustcmd*{\GLSxtrlong}{\@gls@hyp@opt\ns@GLSxtrlong} +\glsmfublocker{\GLSxtrlong} % \end{macrocode} % Define the un-starred form. Need to determine if there is % a final optional argument @@ -17299,6 +23191,7 @@ defined}{}% % Read in the final optional argument: % \begin{macrocode} \def\@GLSxtrlong#1#2[#3]{% + \def\glsxtrcurrentfield{long}% % \end{macrocode} %If the \pkgopt{record} option has been used, the information needs %to be written to the aux file regardless of whether the entry @@ -17309,15 +23202,13 @@ defined}{}% \glsdoifexists{#2}% {% \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper - \let\glsxtrifwasfirstuse\@secondoftwo + \let\glsxtrifwasglslike\@secondoftwo \let\glsifplural\@secondoftwo \let\glscapscase\@thirdofthree - \let\glsinsert\@empty + \glsxtrsetlongfirstuse{#2}% + \glsxtrsaveinsert{#2}{#3}% \def\glscustomtext{% - \mfirstucMakeUppercase - {\glslongfont{\glsaccesslong{#2}\ifglsxtrinsertinside#3\fi}% - \ifglsxtrinsertinside\else#3\fi - }% + \GLSxtrlongformat{#2}{#3}{\glslongfont}% }% \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% }% @@ -17342,6 +23233,7 @@ defined}{}% % Read in the final optional argument: % \begin{macrocode} \def\@glsxtrshortpl#1#2[#3]{% + \def\glsxtrcurrentfield{short}% % \end{macrocode} %If the \pkgopt{record} option has been used, the information needs %to be written to the aux file regardless of whether the entry @@ -17353,13 +23245,13 @@ defined}{}% {% \glssetabbrvfmt{\glscategory{#2}}% \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsxtrifwasglslike\@secondoftwo \let\glsxtrifwasfirstuse\@secondoftwo \let\glsifplural\@firstoftwo \let\glscapscase\@firstofthree - \let\glsinsert\@empty + \glsxtrsaveinsert{#2}{#3}% \def\glscustomtext{% - \glsabbrvfont{\glsaccessshortpl{#2}\ifglsxtrinsertinside#3\fi}% - \ifglsxtrinsertinside\else#3\fi + \glsxtrshortplformat{#2}{#3}{\glsabbrvfont}% }% \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% }% @@ -17372,6 +23264,7 @@ defined}{}% %\changes{0.3}{2015-12-02}{new} % \begin{macrocode} \newrobustcmd*{\Glsxtrshortpl}{\@gls@hyp@opt\ns@Glsxtrshortpl} +\glsmfuaddmap{\glsxtrshortpl}{\Glsxtrshortpl} % \end{macrocode} % Define the un-starred form. Need to determine if there is % a final optional argument @@ -17383,6 +23276,7 @@ defined}{}% % Read in the final optional argument: % \begin{macrocode} \def\@Glsxtrshortpl#1#2[#3]{% + \def\glsxtrcurrentfield{short}% % \end{macrocode} %If the \pkgopt{record} option has been used, the information needs %to be written to the aux file regardless of whether the entry @@ -17394,13 +23288,13 @@ defined}{}% {% \glssetabbrvfmt{\glscategory{#2}}% \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsxtrifwasglslike\@secondoftwo \let\glsxtrifwasfirstuse\@secondoftwo \let\glsifplural\@firstoftwo \let\glscapscase\@secondofthree - \let\glsinsert\@empty + \glsxtrsaveinsert{#2}{#3}% \def\glscustomtext{% - \glsabbrvfont{\Glsaccessshortpl{#2}\ifglsxtrinsertinside#3\fi}% - \ifglsxtrinsertinside\else#3\fi + \Glsxtrshortplformat{#2}{#3}{\glsabbrvfont}% }% \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% }% @@ -17413,6 +23307,7 @@ defined}{}% %\changes{0.3}{2015-12-02}{new} % \begin{macrocode} \newrobustcmd*{\GLSxtrshortpl}{\@gls@hyp@opt\ns@GLSxtrshortpl} +\glsmfublocker{\GLSxtrshortpl} % \end{macrocode} % Define the un-starred form. Need to determine if there is % a final optional argument @@ -17424,6 +23319,7 @@ defined}{}% % Read in the final optional argument: % \begin{macrocode} \def\@GLSxtrshortpl#1#2[#3]{% + \def\glsxtrcurrentfield{short}% % \end{macrocode} %If the \pkgopt{record} option has been used, the information needs %to be written to the aux file regardless of whether the entry @@ -17435,15 +23331,13 @@ defined}{}% {% \glssetabbrvfmt{\glscategory{#2}}% \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsxtrifwasglslike\@secondoftwo \let\glsxtrifwasfirstuse\@secondoftwo \let\glsifplural\@firstoftwo \let\glscapscase\@thirdofthree - \let\glsinsert\@empty + \glsxtrsaveinsert{#2}{#3}% \def\glscustomtext{% - \mfirstucMakeUppercase - {\glsabbrvfont{\glsaccessshortpl{#2}\ifglsxtrinsertinside#3\fi}% - \ifglsxtrinsertinside\else#3\fi - }% + \GLSxtrshortplformat{#2}{#3}{\glsabbrvfont}% }% \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% }% @@ -17468,6 +23362,7 @@ defined}{}% % Read in the final optional argument: % \begin{macrocode} \def\@glsxtrlongpl#1#2[#3]{% + \def\glsxtrcurrentfield{long}% % \end{macrocode} %If the \pkgopt{record} option has been used, the information needs %to be written to the aux file regardless of whether the entry @@ -17478,13 +23373,13 @@ defined}{}% \glsdoifexists{#2}% {% \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper - \let\glsxtrifwasfirstuse\@secondoftwo + \let\glsxtrifwasglslike\@secondoftwo \let\glsifplural\@firstoftwo \let\glscapscase\@firstofthree - \let\glsinsert\@empty + \glsxtrsetlongfirstuse{#2}% + \glsxtrsaveinsert{#2}{#3}% \def\glscustomtext{% - \glslongfont{\glsaccesslongpl{#2}\ifglsxtrinsertinside#3\fi}% - \ifglsxtrinsertinside\else#3\fi + \glsxtrlongplformat{#2}{#3}{\glslongfont}% }% \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% }% @@ -17497,6 +23392,7 @@ defined}{}% %\changes{0.3}{2015-12-02}{new} % \begin{macrocode} \newrobustcmd*{\Glsxtrlongpl}{\@gls@hyp@opt\ns@Glsxtrlongpl} +\glsmfuaddmap{\glsxtrlongpl}{\Glsxtrlongpl} % \end{macrocode} % Define the un-starred form. Need to determine if there is % a final optional argument @@ -17508,6 +23404,7 @@ defined}{}% % Read in the final optional argument: % \begin{macrocode} \def\@Glsxtrlongpl#1#2[#3]{% + \def\glsxtrcurrentfield{long}% % \end{macrocode} %If the \pkgopt{record} option has been used, the information needs %to be written to the aux file regardless of whether the entry @@ -17518,13 +23415,13 @@ defined}{}% \glsdoifexists{#2}% {% \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper - \let\glsxtrifwasfirstuse\@secondoftwo + \let\glsxtrifwasglslike\@secondoftwo \let\glsifplural\@firstoftwo \let\glscapscase\@secondofthree - \let\glsinsert\@empty + \glsxtrsetlongfirstuse{#2}% + \glsxtrsaveinsert{#2}{#3}% \def\glscustomtext{% - \glslongfont{\Glsaccesslongpl{#2}\ifglsxtrinsertinside#3\fi}% - \ifglsxtrinsertinside\else#3\fi + \Glsxtrlongplformat{#2}{#3}{\glslongfont}% }% \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% }% @@ -17537,6 +23434,7 @@ defined}{}% %\changes{0.3}{2015-12-02}{new} % \begin{macrocode} \newrobustcmd*{\GLSxtrlongpl}{\@gls@hyp@opt\ns@GLSxtrlongpl} +\glsmfublocker{\GLSxtrlongpl} % \end{macrocode} % Define the un-starred form. Need to determine if there is % a final optional argument @@ -17548,6 +23446,7 @@ defined}{}% % Read in the final optional argument: % \begin{macrocode} \def\@GLSxtrlongpl#1#2[#3]{% + \def\glsxtrcurrentfield{long}% % \end{macrocode} %If the \pkgopt{record} option has been used, the information needs %to be written to the aux file regardless of whether the entry @@ -17558,15 +23457,13 @@ defined}{}% \glsdoifexists{#2}% {% \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper - \let\glsxtrifwasfirstuse\@secondoftwo + \let\glsxtrifwasglslike\@secondoftwo \let\glsifplural\@firstoftwo \let\glscapscase\@thirdofthree - \let\glsinsert\@empty + \glsxtrsetlongfirstuse{#2}% + \glsxtrsaveinsert{#2}{#3}% \def\glscustomtext{% - \mfirstucMakeUppercase - {\glslongfont{\glsaccesslongpl{#2}\ifglsxtrinsertinside#3\fi}% - \ifglsxtrinsertinside\else#3\fi - }% + \GLSxtrlongplformat{#2}{#3}{\glslongfont}% }% \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% }% @@ -17609,6 +23506,10 @@ defined}{}% %\begin{macro}{\glsxtrgenabbrvfmt} % Similar to \cs{glsgenacfmt}, but for abbreviations. %\changes{1.17}{2017-08-09}{added check for \cs{ifglsxtrinsertinside}} +% The expansion is to ensure that \cs{glsinsert} is expanded before being +% passed to \cs{glsfmtfield} etc in the event that an inner command +% is being used (which typically signifies a complex formatting command +% such as those provided by \sty{soul}). % \begin{macrocode} \newcommand*{\glsxtrgenabbrvfmt}{% \ifdefempty\glscustomtext @@ -17628,20 +23529,22 @@ defined}{}% % \end{macrocode} % Subsequent plural form, don't adjust case: % \begin{macrocode} - \glsxtrsubsequentplfmt{\glslabel}{\glsinsert}% + \expandafter\glsxtrsubsequentplfmt\expandafter\glslabel + \expandafter{\glsinsert}% }% {% % \end{macrocode} % Subsequent plural form, make first letter upper case: % \begin{macrocode} - \Glsxtrsubsequentplfmt{\glslabel}{\glsinsert}% + \expandafter\Glsxtrsubsequentplfmt\expandafter\glslabel + \expandafter{\glsinsert}% }% {% % \end{macrocode} % Subsequent plural form, all caps: % \begin{macrocode} - \mfirstucMakeUppercase - {\glsxtrsubsequentplfmt{\glslabel}{\glsinsert}}% + \expandafter\GLSxtrsubsequentplfmt\expandafter\glslabel + \expandafter{\glsinsert}% }% }% {% @@ -17653,20 +23556,22 @@ defined}{}% % \end{macrocode} % Subsequent singular form, don't adjust case: % \begin{macrocode} - \glsxtrsubsequentfmt{\glslabel}{\glsinsert}% + \expandafter\glsxtrsubsequentfmt\expandafter\glslabel + \expandafter{\glsinsert}% }% {% % \end{macrocode} % Subsequent singular form, make first letter upper case: % \begin{macrocode} - \Glsxtrsubsequentfmt{\glslabel}{\glsinsert}% + \expandafter\Glsxtrsubsequentfmt\expandafter + \glslabel\expandafter{\glsinsert}% }% {% % \end{macrocode} % Subsequent singular form, all caps: % \begin{macrocode} - \mfirstucMakeUppercase - {\glsxtrsubsequentfmt{\glslabel}{\glsinsert}}% + \expandafter\GLSxtrsubsequentfmt\expandafter + \glslabel\expandafter{\glsinsert}% }% }% }% @@ -17684,20 +23589,22 @@ defined}{}% % \end{macrocode} % First use plural form, don't adjust case: % \begin{macrocode} - \glsxtrfullplformat{\glslabel}{\glsinsert}% + \expandafter\glsxtrfullplformat\expandafter\glslabel + \expandafter{\glsinsert}% }% {% % \end{macrocode} % First use plural form, make first letter upper case: % \begin{macrocode} - \Glsxtrfullplformat{\glslabel}{\glsinsert}% + \expandafter\Glsxtrfullplformat\expandafter\glslabel + \expandafter{\glsinsert}% }% {% % \end{macrocode} % First use plural form, all caps: % \begin{macrocode} - \mfirstucMakeUppercase - {\glsxtrfullplformat{\glslabel}{\glsinsert}}% + \expandafter\GLSxtrfullplformat\expandafter\glslabel + \expandafter{\glsinsert}% }% }% {% @@ -17709,27 +23616,31 @@ defined}{}% % \end{macrocode} % First use singular form, don't adjust case: % \begin{macrocode} - \glsxtrfullformat{\glslabel}{\glsinsert}% + \expandafter\glsxtrfullformat\expandafter\glslabel + \expandafter{\glsinsert}% }% {% % \end{macrocode} % First use singular form, make first letter upper case: % \begin{macrocode} - \Glsxtrfullformat{\glslabel}{\glsinsert}% + \expandafter\Glsxtrfullformat\expandafter\glslabel + \expandafter{\glsinsert}% }% {% % \end{macrocode} % First use singular form, all caps: % \begin{macrocode} - \mfirstucMakeUppercase - {\glsxtrfullformat{\glslabel}{\glsinsert}}% + \expandafter\GLSxtrfullformat\expandafter\glslabel + \expandafter{\glsinsert}% }% }% }% }% {% % \end{macrocode} -% User supplied text. +% Custom text provided in \cs{glsdisp}. (The insert is most likely +% to be empty at this point.) Any inner formatting can be supplied with the custom +% text. % \begin{macrocode} \glscustomtext }% @@ -17742,8 +23653,22 @@ defined}{}% %\changes{1.17}{2017-08-09}{new} % \begin{macrocode} \newcommand*{\glsxtrsubsequentfmt}[2]{% - \glsabbrvfont{\glsaccessshort{#1}\ifglsxtrinsertinside #2\fi}% - \ifglsxtrinsertinside \else#2\fi + \glsifattribute{#1}{markshortwords}{true}% + {% + \ifglsxtrinsertinside + \glsabbrvfont{\glsaccessshort{#1}\glsxtrgenentrytextfmt{#2}}% + \else + \glsabbrvfont{\glsaccessshort{#1}}\glsxtrgenentrytextfmt{#2}% + \fi + }% + {% + \ifglsxtrinsertinside + \glsabbrvfont{\glsaccessfmtshort{#2}{\glsxtrgenentrytextfmt}{#1}}% + \else + \glsabbrvfont{\glsaccessfmtshort{}{\glsxtrgenentrytextfmt}{#1}}% + \glsxtrgenentrytextfmt{#2}% + \fi + }% } \let\glsxtrdefaultsubsequentfmt\glsxtrsubsequentfmt % \end{macrocode} @@ -17754,8 +23679,22 @@ defined}{}% %\changes{1.17}{2017-08-09}{new} % \begin{macrocode} \newcommand*{\glsxtrsubsequentplfmt}[2]{% - \glsabbrvfont{\glsaccessshortpl{#1}\ifglsxtrinsertinside #2\fi}% - \ifglsxtrinsertinside \else#2\fi + \glsifattribute{#1}{markshortwords}{true}% + {% + \ifglsxtrinsertinside + \glsabbrvfont{\glsaccessshortpl{#1}\glsxtrgenentrytextfmt{#2}}% + \else + \glsabbrvfont{\glsaccessshortpl{#1}}\glsxtrgenentrytextfmt{#2}% + \fi + }% + {% + \ifglsxtrinsertinside + \glsabbrvfont{\glsaccessfmtshortpl{#2}{\glsxtrgenentrytextfmt}{#1}}% + \else + \glsabbrvfont{\glsaccessfmtshortpl{}{\glsxtrgenentrytextfmt}{#1}}% + \glsxtrgenentrytextfmt{#2}% + \fi + }% } \let\glsxtrdefaultsubsequentplfmt\glsxtrsubsequentplfmt % \end{macrocode} @@ -17766,10 +23705,25 @@ defined}{}% %\changes{1.17}{2017-08-09}{new} % \begin{macrocode} \newcommand*{\Glsxtrsubsequentfmt}[2]{% - \glsabbrvfont{\Glsaccessshort{#1}\ifglsxtrinsertinside #2\fi}% - \ifglsxtrinsertinside \else#2\fi + \glsifattribute{#1}{markshortwords}{true}% + {% + \ifglsxtrinsertinside + \glsabbrvfont{\Glsaccessshort{#1}\glsxtrgenentrytextfmt{#2}}% + \else + \glsabbrvfont{\Glsaccessshort{#1}}\glsxtrgenentrytextfmt{#2}% + \fi + }% + {% + \ifglsxtrinsertinside + \glsabbrvfont{\Glsaccessfmtshort{#2}{\glsxtrgenentrytextfmt}{#1}}% + \else + \glsabbrvfont{\Glsaccessfmtshort{}{\glsxtrgenentrytextfmt}{#1}}% + \glsxtrgenentrytextfmt{#2}% + \fi + }% } \let\Glsxtrdefaultsubsequentfmt\Glsxtrsubsequentfmt +\glsmfuaddmap{\glsxtrsubsequentfmt}{\Glsxtrsubsequentfmt} % \end{macrocode} %\end{macro} % @@ -17778,14 +23732,87 @@ defined}{}% %\changes{1.17}{2017-08-09}{new} % \begin{macrocode} \newcommand*{\Glsxtrsubsequentplfmt}[2]{% - \glsabbrvfont{\Glsaccessshortpl{#1}\ifglsxtrinsertinside #2\fi}% - \ifglsxtrinsertinside \else#2\fi + \glsifattribute{#1}{markshortwords}{true}% + {% + \ifglsxtrinsertinside + \glsabbrvfont{\Glsaccessshortpl{#1}\glsxtrgenentrytextfmt{#2}}% + \else + \glsabbrvfont{\Glsaccessshortpl{#1}}\glsxtrgenentrytextfmt{#2}% + \fi + }% + {% + \ifglsxtrinsertinside + \glsabbrvfont{\Glsaccessfmtshortpl{#2}{\glsxtrgenentrytextfmt}{#1}}% + \else + \glsabbrvfont{\Glsaccessfmtshortpl{}{\glsxtrgenentrytextfmt}{#1}}% + \glsxtrgenentrytextfmt{#2}% + \fi + }% } \let\Glsxtrdefaultsubsequentplfmt\Glsxtrsubsequentplfmt +\glsmfuaddmap{\glsxtrsubsequentplfmt}{\Glsxtrsubsequentplfmt} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GLSxtrsubsequentfmt} +% Subsequent use format (singular, all caps). +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand*{\GLSxtrsubsequentfmt}[2]{% + \glsifattribute{#1}{markshortwords}{true}% + {% + \ifglsxtrinsertinside + \glsabbrvfont{\GLSaccessshort{#1}% + \glsuppercase{\glsxtrgenentrytextfmt{#2}}}% + \else + \glsabbrvfont{\GLSaccessshort{#1}}% + \glsuppercase{\glsxtrgenentrytextfmt{#2}}% + \fi + }% + {% + \ifglsxtrinsertinside + \glsabbrvfont{\GLSaccessfmtshort{#2}{\glsxtrgenentrytextfmt}{#1}}% + \else + \glsabbrvfont{\GLSaccessfmtshort{}{\glsxtrgenentrytextfmt}{#1}}% + \glsuppercase{\glsxtrgenentrytextfmt{#2}}% + \fi + }% +} +\glsmfublocker{\GLSxtrsubsequentfmt} +\let\GLSxtrdefaultsubsequentfmt\GLSxtrsubsequentfmt +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GLSxtrsubsequentplfmt} +% Subsequent use format (plural, all caps). +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand*{\GLSxtrsubsequentplfmt}[2]{% + \glsifattribute{#1}{markshortwords}{true}% + {% + \ifglsxtrinsertinside + \glsabbrvfont{\GLSaccessshortpl{#1}% + \glsuppercase{\glsxtrgenentrytextfmt{#2}}}% + \else + \glsabbrvfont{\GLSaccessshortpl{#1}}% + \glsuppercase{\glsxtrgenentrytextfmt{#2}}% + \fi + }% + {% + \ifglsxtrinsertinside + \glsabbrvfont{\GLSaccessfmtshortpl{#2}{\glsxtrgenentrytextfmt}{#1}}% + \else + \glsabbrvfont{\GLSaccessfmtshortpl{}{\glsxtrgenentrytextfmt}{#1}}% + \glsuppercase{\glsxtrgenentrytextfmt{#2}}% + \fi + }% +} +\glsmfublocker{\GLSxtrsubsequentplfmt} +\let\GLSxtrdefaultsubsequentplfmt\GLSxtrsubsequentplfmt % \end{macrocode} %\end{macro} % -%\subsection{Abbreviation Styles Setup} +%\subsubsection{Abbreviation Styles Setup} % %\begin{macro}{\setabbreviationstyle} % \begin{macrocode} @@ -17850,6 +23877,122 @@ defined}{}% % \end{macrocode} %\end{macro} % +%\begin{macro}{\glsxtrsetcomplexstyle} +%\changes{1.49}{2022-10-14}{new} +%Identify an entry as having a complex abbreviation style that +%doesn't work with \cs{GLSfirst} etc. The argument is the entry +%label. The second argument should be numeric: 1 (all caps doesn't +%work), 2 (all caps and insert don't work), 3 (insert doesn't work). +% \begin{macrocode} +\newcommand*{\glsxtrsetcomplexstyle}[2]{% + \csdef{@glsxtr@has@complexstyle@#1}{#2}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtr@do@ifcomplexstyle@allcaps} +%\changes{1.49}{2022-10-14}{new} +%Do second argument if entry identified by first argument has a +%problem with all caps. Does nothing otherwise. +% \begin{macrocode} +\newcommand*{\glsxtr@do@ifcomplexstyle@allcaps}[2]{% + \ifcsdef{@glsxtr@has@complexstyle@#1}% + {% + \ifnum\csuse{@glsxtr@has@complexstyle@#1}<1 + \else + \ifnum\csuse{@glsxtr@has@complexstyle@#1}<3 + #2% + \fi + \fi + }% + {}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtr@do@ifcomplexstyle@insert} +%\changes{1.49}{2022-10-14}{new} +%Do second argument if entry identified by first argument has a +%problem with the insert argument. Does nothing otherwise. +% \begin{macrocode} +\newcommand*{\glsxtr@do@ifcomplexstyle@insert}[2]{% + \ifcsdef{@glsxtr@has@complexstyle@#1}% + {% + \ifnum\csuse{@glsxtr@has@complexstyle@#1}<2 + \else + #2% + \fi + }% + {}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GlossariesAbbrStyleTooComplexWarning} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand*{\GlossariesAbbrStyleTooComplexWarning}[2]{% + \GlossariesExtraWarning{Abbreviation style used by `#1' too complex #2}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtr@check@complexstyle} +%\changes{1.49}{2022-10-14}{new} +%The first argument is the label the second is the insert. +% \begin{macrocode} +\newcommand*{\glsxtr@check@complexstyle}[2]{% + \ifx\glscapscase\@thirdofthree + \glsxtr@do@ifcomplexstyle@allcaps{#1}% + {% + \glsxtrifwasfirstuse + {% + \glsifplural + {% + \GlossariesAbbrStyleTooComplexWarning{#1}{for \string\GLSfirstplural. + Use \string\GLSpl{#1} or \string\GLSxtrfullpl{#1} instead. + Switching off all-caps% + }% + }% + {% + \GlossariesAbbrStyleTooComplexWarning{#1}{for \string\GLSfirst. + Use \string\GLS{#1} or \string\GLSxtrfull{#1} instead. + Switching off all-caps% + }% + }% + }% + {% + \glsifplural + {% + \GlossariesAbbrStyleTooComplexWarning{#1}{for \string\GLSplural. + Use \string\GLSpl{#1} or \string\GLSxtrshortpl{#1} instead. + Switching off all-caps% + }% + }% + {% + \GlossariesAbbrStyleTooComplexWarning{#1}{for \string\GLStext. + Use \string\GLS{#1} or \string\GLSxtrshort{#1} instead. + Switching off all-caps% + }% + }% + }% + \let\glscapscase\@firstofthree + }% + \fi + \ifstrempty{#2}{}% + {% + \glsxtr@do@ifcomplexstyle@insert{#1}% + {% + \GlossariesAbbrStyleTooComplexWarning{#1}% + {to support insert argument with commands like \string\glsfirst\space or + \string\glstext. Unexpected results may occur. Use commands + like \string\gls\space or \string\glsxtrshort\space instead}% + }% + }% +} +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\newabbreviationstyle} % This is different from \cs{newacronymstyle}. The first argument is % the label, the second argument sets the information required when @@ -17877,8 +24020,16 @@ defined}{}% % \begin{macrocode} \renewcommand*{\glsxtrinlinefullformat}{\glsxtrfullformat}% \renewcommand*{\Glsxtrinlinefullformat}{\Glsxtrfullformat}% + \renewcommand*{\GLSxtrinlinefullformat}{\GLSxtrfullformat}% \renewcommand*{\glsxtrinlinefullplformat}{\glsxtrfullplformat}% \renewcommand*{\Glsxtrinlinefullplformat}{\Glsxtrfullplformat}% + \renewcommand*{\GLSxtrinlinefullplformat}{\GLSxtrfullplformat}% +% \end{macrocode} +%In the event that some custom styles predate the introduction of +%the all caps versions, provide default definitions: +% \begin{macrocode} + \renewcommand*{\GLSxtrfullformat}{\GLSxtr@fullformat@fallback}% + \renewcommand*{\GLSxtrfullplformat}{\GLSxtr@fullplformat@fallback}% % \end{macrocode} % Reset \cs{glsxtrsubsequentfmt} etc in case a style changes this. % \begin{macrocode} @@ -17886,6 +24037,8 @@ defined}{}% \let\glsxtrsubsequentplfmt\glsxtrdefaultsubsequentplfmt \let\Glsxtrsubsequentfmt\Glsxtrdefaultsubsequentfmt \let\Glsxtrsubsequentplfmt\Glsxtrdefaultsubsequentplfmt + \let\GLSxtrsubsequentfmt\GLSxtrdefaultsubsequentfmt + \let\GLSxtrsubsequentplfmt\GLSxtrdefaultsubsequentplfmt #3}% }% } @@ -17914,8 +24067,26 @@ defined}{}% % \begin{macrocode} \renewcommand*{\glsxtrinlinefullformat}{\glsxtrfullformat}% \renewcommand*{\Glsxtrinlinefullformat}{\Glsxtrfullformat}% + \renewcommand*{\GLSxtrinlinefullformat}{\GLSxtrfullformat}% \renewcommand*{\glsxtrinlinefullplformat}{\glsxtrfullplformat}% \renewcommand*{\Glsxtrinlinefullplformat}{\Glsxtrfullplformat}% + \renewcommand*{\GLSxtrinlinefullplformat}{\GLSxtrfullplformat}% +% \end{macrocode} +%In the event that some custom styles predate the introduction of +%the all caps versions, provide default definitions: +% \begin{macrocode} + \renewcommand*{\GLSxtrfullformat}{\GLSxtr@fullformat@fallback}% + \renewcommand*{\GLSxtrfullplformat}{\GLSxtr@fullplformat@fallback}% +% \end{macrocode} +%\changes{1.49}{2022-10-14}{reset subsequent fmts} +% Reset \cs{glsxtrsubsequentfmt} etc in case a style changes this. +% \begin{macrocode} + \let\glsxtrsubsequentfmt\glsxtrdefaultsubsequentfmt + \let\glsxtrsubsequentplfmt\glsxtrdefaultsubsequentplfmt + \let\Glsxtrsubsequentfmt\Glsxtrdefaultsubsequentfmt + \let\Glsxtrsubsequentplfmt\Glsxtrdefaultsubsequentplfmt + \let\GLSxtrsubsequentfmt\GLSxtrdefaultsubsequentfmt + \let\GLSxtrsubsequentplfmt\GLSxtrdefaultsubsequentplfmt #3}% }% } @@ -17991,19 +24162,26 @@ defined}{}% % \end{macrocode} %\end{macro} % -%\subsection{Predefined Styles (Default Font)} +%\subsubsection{Predefined Styles} % Define some common styles. These will set the \gloskey{first}, % \gloskey{firstplural}, \gloskey{text} and \gloskey{plural} % keys, even if the \catattr{regular} attribute isn't set to % \qt{true}. If this attribute is set, commands like \cs{gls} will % use them as per a regular entry, otherwise those keys will be % ignored unless explicitly invoked by the user with commands like -% \cs{glsfirst}. In order for the first letter uppercase versions to +% \cs{glsfirst}. In order for the sentence case versions to % work correctly, \cs{glsxtrfullformat} needs to be expanded when % those keys are set. The final optional argument of \cs{glsfirst} % will behave differently to the final optional argument of \cs{gls} % with some styles. % +%v1.49 has introduced innertextformat for formatting commands that +%need access to the actual text (which is normally too deeply +%embedded). The styles have been modified to allow for this. The all +%caps versions also now need to be implemented within the styles as +%again the text is now to deeply embedded for the case change to +%otherwise work. +% %\begin{macro}{\ifglsxtrinsertinside} %\changes{1.02}{2016-04-25}{new} % Switch to determine if the insert text should be inside or outside @@ -18013,6365 +24191,6728 @@ defined}{}% \glsxtrinsertinsidefalse % \end{macrocode} %\end{macro} -% -%\begin{macro}{\glsxtrlongshortname} -%\changes{1.25}{2017-11-24}{new} +%The abbreviation styles are now defined in the file +%\texttt{glossaries-extra-abbrstyles.def}, which needs to be input +%here: % \begin{macrocode} -\newcommand*{\glsxtrlongshortname}{% - \protect\glsabbrvfont{\the\glsshorttok}% -} +\input{glossaries-extra-abbrstyles.def} % \end{macrocode} -%\end{macro} % -%\changes{1.17}{2017-08-09}{removed some inconsistencies in the abbreviation -%styles} -%\begin{abbrvstyle}{long-short} -% \begin{macrocode} -\newabbreviationstyle{long-short}% -{% -% \end{macrocode} -% Set accessibility attributes if enabled. -% \begin{macrocode} - \glsxtrAccSuppAbbrSetFirstLongAttrs\glscategorylabel -% \end{macrocode} -% Setup the default fields. -% \begin{macrocode} - \renewcommand*{\CustomAbbreviationFields}{% - name={\glsxtrlongshortname}, - sort={\the\glsshorttok}, - first={\protect\glsfirstlongfont{\the\glslongtok}% - \protect\glsxtrfullsep{\the\glslabeltok}% - \glsxtrparen{\protect\glsfirstabbrvfont{\the\glsshorttok}}},% - firstplural={\protect\glsfirstlongfont{\the\glslongpltok}% - \protect\glsxtrfullsep{\the\glslabeltok}% - \glsxtrparen{\protect\glsfirstabbrvfont{\the\glsshortpltok}}},% -% \end{macrocode} -%\changes{1.15}{2017-05-10}{fixed spelling of \cs{glsabbrvfont}} -%\changes{1.42}{2020-02-03}{added missing text key} +%\subsection{Using Entries in Headings} +% +% There are four main problems with using entries in sectioning +% commands: they can mess with the first use flag if they end up in +% the table of contents, they can add unwanted numbers to the +% entry's location list, the label is corrupted if used inside +% \cs{MakeUppercase} (which is used by the default headings style) +% and they need to be expandable for PDF bookmarks. The +% \sty{glossaries} package therefore recommends the use of the +% expandable commands, such as \cs{glsentryshort}, instead but this +% doesn't reflect the formatting since it doesn't include +% \cs{glsabbrvfont}. The commands below are an attempt to get around +% these problems. +% +% The PDF bookmark issue can easily be fixed with \sty{hyperref}'s +% \cs{texorpdfstring} which can simply use the expandable command +% in the PDF string case. The \TeX\ string case can now use +% \cs{glsxtrshort} with the \gloskey[glslink]{noindex} key set, which +% prevents the unwanted additions to the location list, and the +% \gloskey[glslink]{hyper} key set to false, which prevents the problem of +% nested links. This just leaves one thing left that needs to be +% dealt with, and that's what to do if the heading style +% uses \cs{MakeUppercase}. +% +% Note that \sty{glossaries} automatically loads \sty{textcase} +% unless \sty{mfirstuc} 2.08+ is detected, so +% the label can be protected from case change with \sty{textcase}'s +% \cs{NoCaseChange}. This means that we don't have a problem +% provided the page style uses \cs{MakeTextUppercase}, but the +% default heading page style uses \cs{MakeUppercase}. (With newer +% versions of \sty{mfirstuc}, exclusions are used to protect labels). +% +% To get around this, save the original definition of \cs{markboth} +% and \cs{markright} and adjust it so that \cs{MakeUppercase} is +% temporarily redefined to \cs{MakeTextUppercase}. Some packages or +% classes redefine these commands, so we can't just assume they +% still have the original kernel definition. This only needs to be +% done with old versions of \sty{mfirstuc}. +% +%\begin{macro}{\markright} +% Save original definition: % \begin{macrocode} - plural={\protect\glsabbrvfont{\the\glsshortpltok}},% - text={\protect\glsabbrvfont{\the\glsshorttok}},% - description={\the\glslongtok}}% +\let\@glsxtr@org@markright\markright % \end{macrocode} -%\changes{0.5.1}{2015-12-07}{switch off regular attribute if set} -% Unset the \catattr{regular} attribute if it has been set. +% Redefine (grouping not added in case it interferes with the +% original code): % \begin{macrocode} - \renewcommand*{\GlsXtrPostNewAbbreviation}{% - \glshasattribute{\the\glslabeltok}{regular}% - {% - \glssetattribute{\the\glslabeltok}{regular}{false}% - }% - {}% - }% -}% -{% +\renewcommand*{\markright}[1]{% + \glsxtrmarkhook + \@glsxtr@org@markright{\@glsxtrinmark#1\@glsxtrnotinmark}% + \glsxtrrestoremarkhook +} % \end{macrocode} -% In case the user wants to mix and match font styles, these are -% redefined here. +%\end{macro} +% +%\begin{macro}{\markboth} +% Save original definition: % \begin{macrocode} - \renewcommand*{\abbrvpluralsuffix}{\glsxtrabbrvpluralsuffix}% - \renewcommand*{\glsabbrvfont}[1]{\glsabbrvdefaultfont{##1}}% - \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvdefaultfont{##1}}% - \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% - \renewcommand*{\glslongfont}[1]{\glslongdefaultfont{##1}}% +\let\@glsxtr@org@markboth\markboth % \end{macrocode} -% The first use full form and the inline full form are the same for -% this style. +% Redefine (grouping not added in case it interferes with the +% original code): % \begin{macrocode} - \renewcommand*{\glsxtrfullformat}[2]{% - \glsfirstlongfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - \glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstabbrvfont{\glsaccessshort{##1}}}% - }% - \renewcommand*{\glsxtrfullplformat}[2]{% - \glsfirstlongfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstabbrvfont{\glsaccessshortpl{##1}}}% - }% - \renewcommand*{\Glsxtrfullformat}[2]{% - \glsfirstlongfont{\Glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstabbrvfont{\glsaccessshort{##1}}}% - }% - \renewcommand*{\Glsxtrfullplformat}[2]{% - \glsfirstlongfont{\Glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstabbrvfont{\glsaccessshortpl{##1}}}% - }% +\renewcommand*{\markboth}[2]{% + \glsxtrmarkhook + \@glsxtr@org@markboth + {\@glsxtrinmark#1\@glsxtrnotinmark}% + {\@glsxtrinmark#2\@glsxtrnotinmark}% + \glsxtrrestoremarkhook } % \end{macrocode} -%\end{abbrvstyle} +%\end{macro} % -% Set this as the default style for general abbreviations: +%Also do this for \cs{@starttoc} +%\begin{macro}{\@starttoc} +% Save original definition: % \begin{macrocode} -\setabbreviationstyle{long-short} +\let\@glsxtr@org@@starttoc\@starttoc % \end{macrocode} -% -%\begin{macro}{\glsxtrlongshortdescsort} -%\changes{1.04}{2016-05-02}{new} +% Redefine: % \begin{macrocode} -\newcommand*{\glsxtrlongshortdescsort}{% - \expandonce\glsxtrorglong\space (\expandonce\glsxtrorgshort)% +\renewcommand*{\@starttoc}[1]{% + \let\glsxtrifintoc\@firstoftwo + \glsxtrmarkhook + \@glsxtrinmark + \@glsxtr@org@@starttoc{#1}% + \@glsxtrnotinmark + \glsxtrrestoremarkhook + \let\glsxtrifintoc\@secondoftwo } % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrlongshortdescname} -%\changes{1.17}{2017-08-09}{new} +% If this causes a problem provide a simple way of switching back to +% the original definitions: +%\begin{macro}{\glsxtrRevertMarks} % \begin{macrocode} -\newcommand*{\glsxtrlongshortdescname}{% - \protect\glslongfont{\the\glslongtok} - \glsxtrparen{\protect\glsabbrvfont{\the\glsshorttok}}% +\newcommand*{\glsxtrRevertMarks}{% + \let\markright\@glsxtr@org@markright + \let\markboth\@glsxtr@org@markboth + \let\@starttoc\@glsxtr@org@@starttoc } % \end{macrocode} %\end{macro} % -%\begin{abbrvstyle}{long-short-desc} -% User supplies description. The long form is included in the name. -%\changes{0.3}{2015-12-02}{fixed name to use \cs{glslabeltok}} -% \begin{macrocode} -\newabbreviationstyle{long-short-desc}% -{% -% \end{macrocode} -% Set accessibility attributes if enabled. -% \begin{macrocode} - \glsxtrAccSuppAbbrSetTextShortAttrs\glscategorylabel -% \end{macrocode} -% Setup the default fields. -% \begin{macrocode} - \renewcommand*{\CustomAbbreviationFields}{% - name={\glsxtrlongshortdescname}, - sort={\glsxtrlongshortdescsort},% - first={\protect\glsfirstlongfont{\the\glslongtok}% - \protect\glsxtrfullsep{\the\glslabeltok}% - \glsxtrparen{\protect\glsfirstabbrvfont{\the\glsshorttok}}},% - firstplural={\protect\glsfirstlongfont{\the\glslongpltok}% - \protect\glsxtrfullsep{\the\glslabeltok}% - \glsxtrparen{\protect\glsfirstabbrvfont{\the\glsshortpltok}}},% -% \end{macrocode} -%The \gloskey{text} key should only have the short form. -%\changes{1.07}{2016-08-15}{added missing text key} +%\begin{macro}{\glsxtrRevertTocMarks} +%\changes{1.31}{2018-05-09}{new} +%Just restores \cs{@starttoc}. % \begin{macrocode} - text={\protect\glsabbrvfont{\the\glsshorttok}},% +\newcommand*{\glsxtrRevertTocMarks}{% + \let\@starttoc\@glsxtr@org@@starttoc +} % \end{macrocode} -%\changes{1.07}{2016-08-15}{fixed misspelling of \cs{glsabbrvfont}} +%\end{macro} +% +%\begin{macro}{\glsxtrifinmark} +%\changes{1.07}{2016-08-15}{new} % \begin{macrocode} - plural={\protect\glsabbrvfont{\the\glsshortpltok}}% - }% +\newcommand*{\glsxtrifinmark}[2]{#2} % \end{macrocode} -%\changes{0.5.1}{2015-12-07}{switch off regular attribute if set} -% Unset the \catattr{regular} attribute if it has been set. +%\end{macro} +% +%\begin{macro}{\@glsxtrinmark} +%\changes{1.07}{2016-08-15}{new} % \begin{macrocode} - \renewcommand*{\GlsXtrPostNewAbbreviation}{% - \glshasattribute{\the\glslabeltok}{regular}% - {% - \glssetattribute{\the\glslabeltok}{regular}{false}% - }% - {}% - }% -}% -{% - \GlsXtrUseAbbrStyleFmts{long-short}% +\newrobustcmd*{\@glsxtrinmark}{% + \let\glsxtrifinmark\@firstoftwo } % \end{macrocode} -%\end{abbrvstyle} +%\end{macro} % -%\begin{macro}{\glsxtrshortlongname} -%\changes{1.25}{2017-11-24}{new} +%\begin{macro}{\@glsxtrnotinmark} +%\changes{1.07}{2016-08-15}{new} % \begin{macrocode} -\newcommand*{\glsxtrshortlongname}{% - \protect\glsabbrvfont{\the\glsshorttok}% +\newrobustcmd*{\@glsxtrnotinmark}{% + \let\glsxtrifinmark\@secondoftwo } % \end{macrocode} %\end{macro} % -%\begin{abbrvstyle}{short-long} -% Short form followed by long form in parenthesis on first use. -% \begin{macrocode} -\newabbreviationstyle{short-long}% -{% -% \end{macrocode} -% Set accessibility attributes if enabled. +%\begin{macro}{\glsxtrtitleorpdforheading} +%\changes{1.21}{2017-11-03}{new} % \begin{macrocode} - \glsxtrAccSuppAbbrSetFirstLongAttrs\glscategorylabel +\newcommand*{\glsxtrtitleorpdforheading}[3]{% + \glsxtrifinmark{#3}{\glstexorpdfstring{#1}{#2}}} % \end{macrocode} -% Setup the default fields. +%\end{macro} +% +%\changes{1.49}{2022-10-14}{add gettitlestring patch for \cs{glsxtrtitleorpdforheading}} +%This will require \verb|\GetTitleStringSetup{expand}| to work. % \begin{macrocode} - \renewcommand*{\CustomAbbreviationFields}{% - name={\glsxtrshortlongname}, - sort={\the\glsshorttok}, - description={\the\glslongtok},% - first={\protect\glsfirstabbrvfont{\the\glsshorttok}% - \protect\glsxtrfullsep{\the\glslabeltok}% - \glsxtrparen{\protect\glsfirstlongfont{\the\glslongtok}}},% - firstplural={\protect\glsfirstabbrvfont{\the\glsshortpltok}% - \protect\glsxtrfullsep{\the\glslabeltok}% - \glsxtrparen{\protect\glsfirstlongfont{\the\glslongpltok}}},% +\ifdef\GetTitleStringDisableCommands +{\GetTitleStringDisableCommands{\let\glsxtrtitleorpdforheading\@thirdofthree + \let\glsxtrifinmark\@firstoftwo}} +{} % \end{macrocode} -%\changes{1.15}{2017-05-10}{fixed spelling of \cs{glsabbrvfont}} -%\changes{1.42}{2020-02-03}{added missing text key} +% +%\begin{macro}{\glsxtrmarkhook} +% Hook used in new definition of \cs{markboth} and \cs{markright} +% to make some changes to apply to the marks: % \begin{macrocode} - text={\protect\glsabbrvfont{\the\glsshorttok}},% - plural={\protect\glsabbrvfont{\the\glsshortpltok}}}% +\newcommand*{\glsxtrmarkhook}{% % \end{macrocode} -%\changes{0.5.1}{2015-12-07}{switch off regular attribute if set} -% Unset the \catattr{regular} attribute if it has been set. +% Save current definitions: % \begin{macrocode} - \renewcommand*{\GlsXtrPostNewAbbreviation}{% - \glshasattribute{\the\glslabeltok}{regular}% - {% - \glssetattribute{\the\glslabeltok}{regular}{false}% - }% - {}% - }% -}% -{% + \@glsxtr@saveMakeUppercase + \let\@glsxtr@org@glsxtrtitleorpdforheading\glsxtrtitleorpdforheading + \let\@glsxtr@org@glsxtrtitleshort\glsxtrtitleshort + \let\@glsxtr@org@glsxtrtitleshortpl\glsxtrtitleshortpl + \let\@glsxtr@org@Glsxtrtitleshort\Glsxtrtitleshort + \let\@glsxtr@org@Glsxtrtitleshortpl\Glsxtrtitleshortpl + \let\@glsxtr@org@GLSxtrtitleshort\GLSxtrtitleshort + \let\@glsxtr@org@GLSxtrtitleshortpl\GLSxtrtitleshortpl + \let\@glsxtr@org@glsxtrtitlename\glsxtrtitlename + \let\@glsxtr@org@Glsxtrtitlename\Glsxtrtitlename + \let\@glsxtr@org@glsxtrtitletext\glsxtrtitletext + \let\@glsxtr@org@Glsxtrtitletext\Glsxtrtitletext + \let\@glsxtr@org@GLSxtrtitletext\GLSxtrtitletext + \let\@glsxtr@org@glsxtrtitleplural\glsxtrtitleplural + \let\@glsxtr@org@Glsxtrtitleplural\Glsxtrtitleplural + \let\@glsxtr@org@GLSxtrtitleplural\GLSxtrtitleplural + \let\@glsxtr@org@glsxtrtitlefirst\glsxtrtitlefirst + \let\@glsxtr@org@Glsxtrtitlefirst\Glsxtrtitlefirst + \let\@glsxtr@org@glsxtrtitlefirstplural\glsxtrtitlefirstplural + \let\@glsxtr@org@Glsxtrtitlefirstplural\Glsxtrtitlefirstplural + \let\@glsxtr@org@GLSxtrtitlefirstplural\GLSxtrtitlefirstplural + \let\@glsxtr@org@glsxtrtitlelong\glsxtrtitlelong + \let\@glsxtr@org@glsxtrtitlelongpl\glsxtrtitlelongpl + \let\@glsxtr@org@Glsxtrtitlelong\Glsxtrtitlelong + \let\@glsxtr@org@Glsxtrtitlelongpl\Glsxtrtitlelongpl + \let\@glsxtr@org@glsxtrtitlefull\glsxtrtitlefull + \let\@glsxtr@org@glsxtrtitlefullpl\glsxtrtitlefullpl + \let\@glsxtr@org@Glsxtrtitlefull\Glsxtrtitlefull + \let\@glsxtr@org@Glsxtrtitlefullpl\Glsxtrtitlefullpl + \let\@glsxtr@org@GLSxtrtitlefull\GLSxtrtitlefull + \let\@glsxtr@org@GLSxtrtitlefullpl\GLSxtrtitlefullpl % \end{macrocode} -% In case the user wants to mix and match font styles, these are -% redefined here. +% New definitions % \begin{macrocode} - \renewcommand*{\abbrvpluralsuffix}{\glsxtrabbrvpluralsuffix}% - \renewcommand*\glsabbrvfont[1]{\glsabbrvdefaultfont{##1}}% - \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvdefaultfont{##1}}% - \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% - \renewcommand*{\glslongfont}[1]{\glslongdefaultfont{##1}}% + \let\glsxtrifinmark\@firstoftwo + \@glsxtr@assignMakeUppercase + \let\glsxtrtitleorpdforheading\@thirdofthree + \let\glsxtrtitleshort\glsxtrheadshort + \let\glsxtrtitleshortpl\glsxtrheadshortpl + \let\Glsxtrtitleshort\Glsxtrheadshort + \let\Glsxtrtitleshortpl\Glsxtrheadshortpl + \let\GLSxtrtitleshort\GLSxtrheadshort + \let\GLSxtrtitleshortpl\GLSxtrheadshortpl + \let\glsxtrtitlename\glsxtrheadname + \let\Glsxtrtitlename\Glsxtrheadname + \let\GLSxtrtitlename\GLSxtrheadname + \let\glsxtrtitletext\glsxtrheadtext + \let\Glsxtrtitletext\Glsxtrheadtext + \let\GLSxtrtitletext\GLSxtrheadtext + \let\glsxtrtitleplural\glsxtrheadplural + \let\Glsxtrtitleplural\Glsxtrheadplural + \let\GLSxtrtitleplural\GLSxtrheadplural + \let\glsxtrtitlefirst\glsxtrheadfirst + \let\Glsxtrtitlefirst\Glsxtrheadfirst + \let\GLSxtrtitlefirst\GLSxtrheadfirst + \let\glsxtrtitlefirstplural\glsxtrheadfirstplural + \let\Glsxtrtitlefirstplural\Glsxtrheadfirstplural + \let\GLSxtrtitlefirstplural\GLSxtrheadfirstplural + \let\glsxtrtitlelong\glsxtrheadlong + \let\glsxtrtitlelongpl\glsxtrheadlongpl + \let\Glsxtrtitlelong\Glsxtrheadlong + \let\Glsxtrtitlelongpl\Glsxtrheadlongpl + \let\glsxtrtitlefull\glsxtrheadfull + \let\glsxtrtitlefullpl\glsxtrheadfullpl + \let\Glsxtrtitlefull\Glsxtrheadfull + \let\Glsxtrtitlefullpl\Glsxtrheadfullpl + \let\GLSxtrtitlefull\GLSxtrheadfull + \let\GLSxtrtitlefullpl\GLSxtrheadfullpl +} % \end{macrocode} -% The first use full form and the inline full form are the same for -% this style. +%\end{macro} +% +%\begin{macro}{\glsxtrrestoremarkhook} +% Hook used in new definition of \cs{markboth} and \cs{markright} +% to restore the modified definitions. (This is in case the original +% \cs{markboth} and \cs{markright} shouldn't be grouped for some +% reason. There already is some grouping within those original +% definitions, but some of the code lies outside that grouping, and +% possibly there's a reason for it.) % \begin{macrocode} - \renewcommand*{\glsxtrfullformat}[2]{% - \glsfirstabbrvfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - \glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstlongfont{\glsaccesslong{##1}}}% - }% - \renewcommand*{\glsxtrfullplformat}[2]{% - \glsfirstabbrvfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - \glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstlongfont{\glsaccesslongpl{##1}}}% - }% - \renewcommand*{\Glsxtrfullformat}[2]{% - \glsfirstabbrvfont{\Glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstlongfont{\glsaccesslong{##1}}}% - }% - \renewcommand*{\Glsxtrfullplformat}[2]{% - \glsfirstabbrvfont{\Glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstlongfont{\glsaccesslongpl{##1}}}% - }% +\newcommand*{\glsxtrrestoremarkhook}{% + \let\glsxtrifinmark\@secondoftwo + \@glsxtr@restoreMakeUppercase + \let\glsxtrtitleorpdforheading\@glsxtr@org@glsxtrtitleorpdforheading + \let\glsxtrtitleshort\@glsxtr@org@glsxtrtitleshort + \let\glsxtrtitleshortpl\@glsxtr@org@glsxtrtitleshortpl + \let\Glsxtrtitleshort\@glsxtr@org@Glsxtrtitleshort + \let\Glsxtrtitleshortpl\@glsxtr@org@Glsxtrtitleshortpl + \let\GLSxtrtitleshort\@glsxtr@org@GLSxtrtitleshort + \let\GLSxtrtitleshortpl\@glsxtr@org@GLSxtrtitleshortpl + \let\glsxtrtitlename\@glsxtr@org@glsxtrtitlename + \let\Glsxtrtitlename\@glsxtr@org@Glsxtrtitlename + \let\GLSxtrtitlename\@glsxtr@org@GLSxtrtitlename + \let\glsxtrtitletext\@glsxtr@org@glsxtrtitletext + \let\Glsxtrtitletext\@glsxtr@org@Glsxtrtitletext + \let\GLSxtrtitletext\@glsxtr@org@GLSxtrtitletext + \let\glsxtrtitleplural\@glsxtr@org@glsxtrtitleplural + \let\Glsxtrtitleplural\@glsxtr@org@Glsxtrtitleplural + \let\GLSxtrtitleplural\@glsxtr@org@GLSxtrtitleplural + \let\glsxtrtitlefirst\@glsxtr@org@glsxtrtitlefirst + \let\Glsxtrtitlefirst\@glsxtr@org@Glsxtrtitlefirst + \let\GLSxtrtitlefirst\@glsxtr@org@GLSxtrtitlefirst + \let\glsxtrtitlefirstplural\@glsxtr@org@glsxtrtitlefirstplural + \let\Glsxtrtitlefirstplural\@glsxtr@org@Glsxtrtitlefirstplural + \let\GLSxtrtitlefirstplural\@glsxtr@org@GLSxtrtitlefirstplural + \let\glsxtrtitlelong\@glsxtr@org@glsxtrtitlelong + \let\glsxtrtitlelongpl\@glsxtr@org@glsxtrtitlelongpl + \let\Glsxtrtitlelong\@glsxtr@org@Glsxtrtitlelong + \let\Glsxtrtitlelongpl\@glsxtr@org@Glsxtrtitlelongpl + \let\glsxtrtitlefull\@glsxtr@org@glsxtrtitlefull + \let\glsxtrtitlefullpl\@glsxtr@org@glsxtrtitlefullpl + \let\Glsxtrtitlefull\@glsxtr@org@Glsxtrtitlefull + \let\Glsxtrtitlefullpl\@glsxtr@org@Glsxtrtitlefullpl + \let\GLSxtrtitlefull\@glsxtr@org@GLSxtrtitlefull + \let\GLSxtrtitlefullpl\@glsxtr@org@GLSxtrtitlefullpl } % \end{macrocode} -%\end{abbrvstyle} +%\end{macro} % -%\begin{macro}{\glsxtrshortlongdescsort} -%\changes{1.17}{2017-08-09}{new} +%\changes{0.5.1}{2015-12-07}{removed \cs{ifglsxtruseuchead}} +% Instead of using one document-wide conditional, use +% \catattr{headuc} attribute to determine whether or not to use the +% all upper case form. +% +%\begin{macro}{\glsxtrtitleopts} +%\changes{1.49}{2022-10-14}{new} +%Make it possible to change the default options within the title +%(but not the page header or table of contents). % \begin{macrocode} -\newcommand*{\glsxtrshortlongdescsort}{\the\glsshorttok} +\newcommand*{\glsxtrtitleopts}{noindex,hyper=false} % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrshortlongdescname} -%\changes{1.17}{2017-08-09}{new} +%\begin{macro}{\glsxtr@title@field} +%\changes{1.49}{2022-10-14}{new} +%\begin{definition} +%\cs{glsxtr@title@field}\marg{cs}\marg{label} +%\end{definition} +%Used by all the \cs{glsxtrtitle\meta{field}} commands for +%consistency. % \begin{macrocode} -\newcommand*{\glsxtrshortlongdescname}{% - \protect\glsabbrvfont{\the\glsshorttok} - \glsxtrparen{\protect\glslongfont{\the\glslongtok}}% +\newcommand*{\glsxtr@title@field}[2]{% + \expandafter#1\expandafter[\glsxtrtitleopts]{#2}[]% } % \end{macrocode} %\end{macro} % -%\begin{abbrvstyle}{short-long-desc} -% User supplies description. The long form is included in the name. -%\changes{0.3}{2015-12-02}{fixed name to use \cs{glslabeltok}} -% \begin{macrocode} -\newabbreviationstyle{short-long-desc}% -{% -% \end{macrocode} -% Set accessibility attributes if enabled. -% \begin{macrocode} - \glsxtrAccSuppAbbrSetTextShortAttrs\glscategorylabel -% \end{macrocode} -% Setup the default fields. -% \begin{macrocode} - \renewcommand*{\CustomAbbreviationFields}{% - name={\glsxtrshortlongdescname}, - sort={\glsxtrshortlongdescsort}, - first={\protect\glsfirstabbrvfont{\the\glsshorttok}% - \protect\glsxtrfullsep{\the\glslabeltok}% - \glsxtrparen{\protect\glsfirstlongfont{\the\glslongtok}}},% - firstplural={\protect\glsfirstabbrvfont{\the\glsshortpltok}% - \protect\glsxtrfullsep{\the\glslabeltok}% - \glsxtrparen{\protect\glsfirstlongfont{\the\glslongpltok}}},% -% \end{macrocode} -%\changes{1.07}{2016-08-15}{added text key} +%\begin{macro}{\glsxtrheadshort} +% Command used to display short form in the page header. +%\changes{0.5.1}{2015-12-07}{now uses headuc attribute} % \begin{macrocode} - text={\protect\glsabbrvfont{\the\glsshorttok}},% +\newcommand*{\glsxtrheadshort}[1]{% + \protect\NoCaseChange + {% + \glsxtrifheaduc{#1}% + {% + \GLSxtrshort[noindex,hyper=false]{#1}[]% + }% + {% + \glsxtrshort[noindex,hyper=false]{#1}[]% + }% + }% +} % \end{macrocode} -%\changes{1.07}{2016-08-15}{fixed misspelling of \cs{glsabbrvfont} in plural -%key} +%\end{macro} +% +%\begin{macro}{\glsxtrtitleshort} +% Command to display short form of abbreviation in section title. % \begin{macrocode} - plural={\protect\glsabbrvfont{\the\glsshortpltok}}% - }% +\newrobustcmd*{\glsxtrtitleshort}[1]{% + \glsxtr@title@field\glsxtrshort{#1}% +} % \end{macrocode} -%\changes{0.5.1}{2015-12-07}{switch off regular attribute if set} -% Unset the \catattr{regular} attribute if it has been set. +%\end{macro} +% +%\begin{macro}{\glsxtrheadshortpl} +% Command used to display plural short form in the page header. +% If you want the text converted to upper case, this needs to be +% redefined to use \cs{GLSxtrshortpl} instead. If you are using a +% smallcaps style, the default fonts don't provide italic smallcaps. +%\changes{0.5.1}{2015-12-07}{now uses headuc attribute} % \begin{macrocode} - \renewcommand*{\GlsXtrPostNewAbbreviation}{% - \glshasattribute{\the\glslabeltok}{regular}% - {% - \glssetattribute{\the\glslabeltok}{regular}{false}% - }% - {}% - }% -}% -{% - \GlsXtrUseAbbrStyleFmts{short-long}% +\newcommand*{\glsxtrheadshortpl}[1]{% + \protect\NoCaseChange + {% + \glsxtrifheaduc{#1}% + {% + \GLSxtrshortpl[noindex,hyper=false]{#1}[]% + }% + {% + \glsxtrshortpl[noindex,hyper=false]{#1}[]% + }% + }% } % \end{macrocode} -%\end{abbrvstyle} +%\end{macro} % -%\begin{macro}{\glsfirstlongfootnotefont} -%\changes{1.05}{2016-06-10}{new} -%Only used by the \qt{footnote} styles. +%\begin{macro}{\glsxtrtitleshortpl} +% Command to display plural short form of abbreviation in section title. +%\changes{1.03}{2016-04-27}{bug fix: changed \cs{glsxtrshort} to +%\cs{glsxtrshortpl}} % \begin{macrocode} -\newcommand*{\glsfirstlongfootnotefont}[1]{\glslongfootnotefont{#1}}% +\newrobustcmd*{\glsxtrtitleshortpl}[1]{% + \glsxtr@title@field\glsxtrshortpl{#1}% +} % \end{macrocode} %\end{macro} % -%\begin{macro}{\glslongfootnotefont} -%\changes{1.05}{2016-06-10}{new} -%Only used by the \qt{footnote} styles. +%\begin{macro}{\Glsxtrheadshort} +% Command used to display short form in the page header with the +% first letter converted to upper case. +%\changes{0.5.1}{2015-12-07}{now uses headuc attribute} % \begin{macrocode} -\newcommand*{\glslongfootnotefont}[1]{\glslongdefaultfont{#1}}% +\newcommand*{\Glsxtrheadshort}[1]{% + \protect\NoCaseChange + {% + \glsxtrifheaduc{#1}% + {% + \GLSxtrshort[noindex,hyper=false]{#1}[]% + }% + {% + \Glsxtrshort[noindex,hyper=false]{#1}[]% + }% + }% +} % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrabbrvfootnote} -%\begin{definition} -%\cs{glsxtrabbrvfootnote}\marg{label}\marg{long} -%\end{definition} -%\changes{1.07}{2016-08-15}{new} -%Command used by footnote abbreviation styles. The default -%definition ignores the first argument. The second argument -%\meta{long} includes the font changing command and may be the -%singular or plural form, depending on the command that was used -%(for example, \cs{gls} or \cs{glspl}). +%\begin{macro}{\Glsxtrtitleshort} +% Command to display short form of abbreviation in section title +% with the first letter converted to upper case. % \begin{macrocode} -\newcommand*{\glsxtrabbrvfootnote}[2]{\footnote{#2}} +\newrobustcmd*{\Glsxtrtitleshort}[1]{% + \glsxtr@title@field\Glsxtrshort{#1}% +} % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrfootnotename} -%\changes{1.25}{2017-11-24}{new} +%\begin{macro}{\GLSxtrheadshort} +%\changes{1.49}{2022-10-14}{new} +%There's no need to check for the headuc attribute. % \begin{macrocode} -\newcommand*{\glsxtrfootnotename}{% - \protect\glsabbrvfont{\the\glsshorttok}% +\newcommand*{\GLSxtrheadshort}[1]{% + \protect\NoCaseChange + {% + \GLSxtrshort[noindex,hyper=false]{#1}[]% + }% } % \end{macrocode} %\end{macro} % -%\begin{abbrvstyle}{footnote} -% Short form followed by long form in footnote on first use. +%\begin{macro}{\GLSxtrtitleshort} +%\changes{1.42}{2020-02-03}{new} +% Command to display short form of abbreviation in section title +% in all upper case. % \begin{macrocode} -\newabbreviationstyle{footnote}% -{% +\newrobustcmd*{\GLSxtrtitleshort}[1]{% + \glsxtr@title@field\GLSxtrshort{#1}% +} % \end{macrocode} -% Set accessibility attributes if enabled. (Add -% \catattr{firstshortaccess} since long form is hidden in a -% footnote on first use.) +%\end{macro} +% +%\begin{macro}{\GLSxtrheadshortpl} +%\changes{1.49}{2022-10-14}{new} +%There's no need to check for the headuc attribute. % \begin{macrocode} - \glsxtrAccSuppAbbrSetNoLongAttrs\glscategorylabel +\newcommand*{\GLSxtrheadshortpl}[1]{% + \protect\NoCaseChange + {% + \GLSxtrshortpl[noindex,hyper=false]{#1}[]% + }% +} % \end{macrocode} -% Setup the default fields. +%\end{macro} +% +%\begin{macro}{\Glsxtrheadshortpl} +% Command used to display plural short form in the page header with the +% first letter converted to upper case. +%\changes{0.5.1}{2015-12-07}{now uses headuc attribute} % \begin{macrocode} - \renewcommand*{\CustomAbbreviationFields}{% - name={\glsxtrfootnotename}, - sort={\the\glsshorttok}, - description={\the\glslongtok},% +\newcommand*{\Glsxtrheadshortpl}[1]{% + \protect\NoCaseChange + {% + \glsxtrifheaduc{#1}% + {% + \GLSxtrshortpl[noindex,hyper=false]{#1}[]% + }% + {% + \Glsxtrshortpl[noindex,hyper=false]{#1}[]% + }% + }% +} % \end{macrocode} -%\changes{1.07}{2016-08-15}{changed first forms to use -%\cs{glsfirstlongfootnotefont}} +%\end{macro} +% +%\begin{macro}{\Glsxtrtitleshortpl} +% Command to display plural short form of abbreviation in section title +% with the first letter converted to upper case. % \begin{macrocode} - first={\protect\glsfirstabbrvfont{\the\glsshorttok}% - \protect\glsxtrabbrvfootnote{\the\glslabeltok}% - {\protect\glsfirstlongfootnotefont{\the\glslongtok}}},% - firstplural={\protect\glsfirstabbrvfont{\the\glsshortpltok}% - \protect\glsxtrabbrvfootnote{\the\glslabeltok}% - {\protect\glsfirstlongfootnotefont{\the\glslongpltok}}},% +\newrobustcmd*{\Glsxtrtitleshortpl}[1]{% + \glsxtr@title@field\Glsxtrshortpl{#1}% +} % \end{macrocode} -%\changes{1.15}{2017-05-10}{fixed spelling of \cs{glsabbrvfont}} -%\changes{1.42}{2020-02-03}{added missing text key} +%\end{macro} +% +%\begin{macro}{\GLSxtrtitleshortpl} +%\changes{1.42}{2020-02-03}{new} +% Command to display plural short form of abbreviation in section title +% in all upper case. % \begin{macrocode} - text={\protect\glsabbrvfont{\the\glsshorttok}},% - plural={\protect\glsabbrvfont{\the\glsshortpltok}}}% +\newrobustcmd*{\GLSxtrtitleshortpl}[1]{% + \glsxtr@title@field\GLSxtrshortpl{#1}% +} % \end{macrocode} -% Switch off hyperlinks on first use to prevent nested hyperlinks, -% and unset the \catattr{regular} attribute if it has been set. -%\changes{0.5.1}{2015-12-07}{switch off regular attribute if set} +%\end{macro} +% +%\begin{macro}{\glsxtrheadname} +% As above but for the \gloskey{name} value. +%\changes{1.21}{2017-11-03}{new} % \begin{macrocode} - \renewcommand*{\GlsXtrPostNewAbbreviation}{% - \glssetattribute{\the\glslabeltok}{nohyperfirst}{true}% - \glshasattribute{\the\glslabeltok}{regular}% - {% - \glssetattribute{\the\glslabeltok}{regular}{false}% - }% - {}% - }% -}% -{% +\newcommand*{\glsxtrheadname}[1]{% + \protect\NoCaseChange + {% + \glsxtrifheaduc{#1}% + {% + \GLSname[noindex,hyper=false]{#1}[]% + }% + {% + \glsname[noindex,hyper=false]{#1}[]% + }% + }% +} % \end{macrocode} -% In case the user wants to mix and match font styles, these are -% redefined here. +%\end{macro} +% +%\begin{macro}{\glsxtrtitlename} +% Command to display \gloskey{name} value in section title. +%\changes{1.21}{2017-11-03}{new} % \begin{macrocode} - \renewcommand*{\abbrvpluralsuffix}{\glsxtrabbrvpluralsuffix}% - \renewcommand*\glsabbrvfont[1]{\glsabbrvdefaultfont{##1}}% - \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvdefaultfont{##1}}% - \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongfootnotefont{##1}}% - \renewcommand*{\glslongfont}[1]{\glslongfootnotefont{##1}}% +\newrobustcmd*{\glsxtrtitlename}[1]{% + \glsxtr@title@field\glsname{#1}% +} % \end{macrocode} -% The full format displays the short form followed by the long form -% as a footnote. +%\end{macro} +% +%\begin{macro}{\Glsxtrheadname} +% First letter converted to upper case +%\changes{1.21}{2017-11-03}{new} % \begin{macrocode} - \renewcommand*{\glsxtrfullformat}[2]{% - \glsfirstabbrvfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - \protect\glsxtrabbrvfootnote{##1}% - {\glsfirstlongfootnotefont{\glsaccesslong{##1}}}% - }% - \renewcommand*{\glsxtrfullplformat}[2]{% - \glsfirstabbrvfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - \protect\glsxtrabbrvfootnote{##1}% - {\glsfirstlongfootnotefont{\glsaccesslongpl{##1}}}% - }% - \renewcommand*{\Glsxtrfullformat}[2]{% - \glsfirstabbrvfont{\Glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - \protect\glsxtrabbrvfootnote{##1}% - {\glsfirstlongfootnotefont{\glsaccesslong{##1}}}% - }% - \renewcommand*{\Glsxtrfullplformat}[2]{% - \glsfirstabbrvfont{\Glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - \protect\glsxtrabbrvfootnote{##1}% - {\glsfirstlongfootnotefont{\glsaccesslongpl{##1}}}% - }% +\newcommand*{\Glsxtrheadname}[1]{% + \protect\NoCaseChange + {% + \glsxtrifheaduc{#1}% + {% + \GLSname[noindex,hyper=false]{#1}[]% + }% + {% + \Glsname[noindex,hyper=false]{#1}[]% + }% + }% +} % \end{macrocode} -% The first use full form and the inline full form use the short -% (long) style. +%\end{macro} +% +%\begin{macro}{\Glsxtrtitlename} +% Command to display \gloskey{name} value in section title +% with the first letter changed to upper case. +%\changes{1.21}{2017-11-03}{new} % \begin{macrocode} - \renewcommand*{\glsxtrinlinefullformat}[2]{% - \glsfirstabbrvfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstlongfootnotefont{\glsaccesslong{##1}}}% - }% - \renewcommand*{\glsxtrinlinefullplformat}[2]{% - \glsfirstabbrvfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstlongfootnotefont{\glsaccesslongpl{##1}}}% - }% - \renewcommand*{\Glsxtrinlinefullformat}[2]{% - \glsfirstabbrvfont{\Glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstlongfootnotefont{\glsaccesslong{##1}}}% - }% - \renewcommand*{\Glsxtrinlinefullplformat}[2]{% - \glsfirstabbrvfont{\Glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstlongfootnotefont{\glsaccesslongpl{##1}}}% - }% +\newrobustcmd*{\Glsxtrtitlename}[1]{% + \glsxtr@title@field\Glsname{#1}% } % \end{macrocode} -%\end{abbrvstyle} -%\begin{abbrvstyle}{short-footnote} -%\changes{1.04}{2016-05-02}{new} +%\end{macro} +% +%\begin{macro}{\GLSxtrheadname} +%\changes{1.49}{2022-10-14}{new} +%There's no need to check for the headuc attribute. % \begin{macrocode} -\letabbreviationstyle{short-footnote}{footnote} +\newcommand*{\GLSxtrheadname}[1]{% + \protect\NoCaseChange + {% + \GLSname[noindex,hyper=false]{#1}[]% + }% +} % \end{macrocode} -%\end{abbrvstyle} +%\end{macro} % -%\begin{macro}{\glsxtrfootnotedescname} +%\begin{macro}{\GLSxtrtitlename} +% Command to display \gloskey{name} value in section title +% in all upper case. %\changes{1.42}{2020-02-03}{new} % \begin{macrocode} -\newcommand*{\glsxtrfootnotedescname}{% - \protect\glsabbrvfont{\the\glsshorttok}% - \protect\glsxtrfullsep{\the\glslabeltok}% - \protect\glsxtrparen{\protect\glslongfont{\the\glslongtok}}% +\newrobustcmd*{\GLSxtrtitlename}[1]{% + \glsxtr@title@field\GLSname{#1}% } % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrfootnotedescsort} -%\changes{1.42}{2020-02-03}{new} +%\begin{macro}{\glsxtrheadtext} +% As above but for the \gloskey{text} value. +%\changes{0.5.1}{2015-12-07}{now uses headuc attribute} % \begin{macrocode} -\newcommand*{\glsxtrfootnotedescsort}{\the\glsshorttok} +\newcommand*{\glsxtrheadtext}[1]{% + \protect\NoCaseChange + {% + \glsxtrifheaduc{#1}% + {% + \GLStext[noindex,hyper=false]{#1}[]% + }% + {% + \glstext[noindex,hyper=false]{#1}[]% + }% + }% +} % \end{macrocode} %\end{macro} % -%\begin{abbrvstyle}{short-footnote-desc} -% Like \abbrstyle{short-footnote} but with user supplied description. -%\changes{1.42}{2020-02-03}{new} +%\begin{macro}{\glsxtrtitletext} +% Command to display \gloskey{text} value in section title. % \begin{macrocode} -\newabbreviationstyle{short-footnote-desc}% -{% +\newrobustcmd*{\glsxtrtitletext}[1]{% + \glsxtr@title@field\glstext{#1}% +} % \end{macrocode} -% Set accessibility attributes if enabled +%\end{macro} +% +% +%\begin{macro}{\Glsxtrheadtext} +% First letter converted to upper case +%\changes{0.5.1}{2015-12-07}{now uses headuc attribute} % \begin{macrocode} - \glsxtrAccSuppAbbrSetNameLongAttrs\glscategorylabel +\newcommand*{\Glsxtrheadtext}[1]{% + \protect\NoCaseChange + {% + \glsxtrifheaduc{#1}% + {% + \GLStext[noindex,hyper=false]{#1}[]% + }% + {% + \Glstext[noindex,hyper=false]{#1}[]% + }% + }% +} % \end{macrocode} -% Setup the default fields. +%\end{macro} +% +%\begin{macro}{\Glsxtrtitletext} +% Command to display \gloskey{text} value in section title +% with the first letter changed to upper case. % \begin{macrocode} - \renewcommand*{\CustomAbbreviationFields}{% - name={\glsxtrfootnotedescname}, - sort={\glsxtrfootnotedescsort}, - first={\protect\glsfirstabbrvfont{\the\glsshorttok}% - \protect\glsxtrabbrvfootnote{\the\glslabeltok}% - {\protect\glsfirstlongfootnotefont{\the\glslongtok}}},% - firstplural={\protect\glsfirstabbrvfont{\the\glsshortpltok}% - \protect\glsxtrabbrvfootnote{\the\glslabeltok}% - {\protect\glsfirstlongfootnotefont{\the\glslongpltok}}},% - text={\protect\glsabbrvfont{\the\glsshorttok}},% - plural={\protect\glsabbrvfont{\the\glsshortpltok}}}% +\newrobustcmd*{\Glsxtrtitletext}[1]{% + \glsxtr@title@field\Glstext{#1}% +} % \end{macrocode} -% Switch off hyperlinks on first use to prevent nested hyperlinks, -% and unset the \catattr{regular} attribute if it has been set. +%\end{macro} +% +%\begin{macro}{\GLSxtrheadtext} +%\changes{1.49}{2022-10-14}{new} +%There's no need to check for the headuc attribute. % \begin{macrocode} - \renewcommand*{\GlsXtrPostNewAbbreviation}{% - \glssetattribute{\the\glslabeltok}{nohyperfirst}{true}% - \glshasattribute{\the\glslabeltok}{regular}% - {% - \glssetattribute{\the\glslabeltok}{regular}{false}% - }% - {}% - }% -}% -{% - \GlsXtrUseAbbrStyleFmts{footnote}% +\newcommand*{\GLSxtrheadtext}[1]{% + \protect\NoCaseChange + {% + \GLStext[noindex,hyper=false]{#1}[]% + }% } % \end{macrocode} -%\end{abbrvstyle} +%\end{macro} % -%\begin{abbrvstyle}{footnote-desc} +%\begin{macro}{\GLSxtrtitletext} +% Command to display \gloskey{text} value in section title +% in all upper case. %\changes{1.42}{2020-02-03}{new} -%Synonym. % \begin{macrocode} -\letabbreviationstyle{footnote-desc}{short-footnote-desc} +\newrobustcmd*{\GLSxtrtitletext}[1]{% + \glsxtr@title@field\GLStext{#1}% +} % \end{macrocode} -%\end{abbrvstyle} +%\end{macro} % -%\begin{abbrvstyle}{postfootnote} -% Similar to \abbrstyle{footnote} but the footnote is placed afterwards, -% outside the link. This avoids nested links and can also move the -% footnote marker after any following punctuation mark. -% Pre v1.07 included \cs{footnote} in the first keys, which was -% incorrect as it caused duplicate footnotes. -%\changes{1.07}{2016-08-15}{removed \cs{footnote} from first keys} +%\begin{macro}{\glsxtrheadplural} +% As above but for the \gloskey{plural} value. +%\changes{0.5.1}{2015-12-07}{now uses headuc attribute} % \begin{macrocode} -\newabbreviationstyle{postfootnote}% -{% +\newcommand*{\glsxtrheadplural}[1]{% + \protect\NoCaseChange + {% + \glsxtrifheaduc{#1}% + {% + \GLSplural[noindex,hyper=false]{#1}[]% + }% + {% + \glsplural[noindex,hyper=false]{#1}[]% + }% + }% +} % \end{macrocode} -% Set accessibility attributes if enabled. (Add -% \catattr{firstshortaccess} since long form is hidden in a -% footnote on first use.) +%\end{macro} +% +%\begin{macro}{\glsxtrtitleplural} +% Command to display \gloskey{plural} value in section title. % \begin{macrocode} - \glsxtrAccSuppAbbrSetNoLongAttrs\glscategorylabel +\newrobustcmd*{\glsxtrtitleplural}[1]{% + \glsxtr@title@field\glsplural{#1}% +} % \end{macrocode} -% Setup the default fields. +%\end{macro} +% +%\begin{macro}{\Glsxtrheadplural} +% Convert first letter to upper case. +%\changes{0.5.1}{2015-12-07}{now uses headuc attribute} % \begin{macrocode} - \renewcommand*{\CustomAbbreviationFields}{% - name={\glsxtrfootnotename}, - sort={\the\glsshorttok}, - description={\the\glslongtok},% - first={\protect\glsfirstabbrvfont{\the\glsshorttok}},% - firstplural={\protect\glsfirstabbrvfont{\the\glsshortpltok}},% +\newcommand*{\Glsxtrheadplural}[1]{% + \protect\NoCaseChange + {% + \glsxtrifheaduc{#1}% + {% + \GLSplural[noindex,hyper=false]{#1}[]% + }% + {% + \Glsplural[noindex,hyper=false]{#1}[]% + }% + }% +} % \end{macrocode} -%\changes{1.15}{2017-05-10}{fixed spelling of \cs{glsabbrvfont}} -%\changes{1.42}{2020-02-03}{added missing text key} +%\end{macro} +% +%\begin{macro}{\Glsxtrtitleplural} +% Command to display \gloskey{plural} value in section title +% with the first letter changed to upper case. % \begin{macrocode} - text={\protect\glsabbrvfont{\the\glsshorttok}},% - plural={\protect\glsabbrvfont{\the\glsshortpltok}}}% +\newrobustcmd*{\Glsxtrtitleplural}[1]{% + \glsxtr@title@field\Glsplural{#1}% +} % \end{macrocode} -% Make this category insert a footnote after the link if this was -% the first use, and -% unset the \catattr{regular} attribute if it has been set. -%\changes{0.5.1}{2015-12-07}{switch off regular attribute if set} +%\end{macro} +% +%\begin{macro}{\GLSxtrheadplural} +%\changes{1.49}{2022-10-14}{new} +%There's no need to check for the headuc attribute. % \begin{macrocode} - \renewcommand*{\GlsXtrPostNewAbbreviation}{% - \csdef{glsxtrpostlink\glscategorylabel}{% - \glsxtrifwasfirstuse - {% +\newcommand*{\GLSxtrheadplural}[1]{% + \protect\NoCaseChange + {% + \GLSplural[noindex,hyper=false]{#1}[]% + }% +} % \end{macrocode} -% Needs the specific font command here as the style may have been -% lost by the time the footnote occurs. +%\end{macro} +% +%\begin{macro}{\GLSxtrtitleplural} +%\changes{1.42}{2020-02-03}{new} +% Command to display \gloskey{plural} value in section title +% in all upper case. % \begin{macrocode} - \glsxtrdopostpunc{\protect\glsxtrabbrvfootnote{\glslabel}% - {\glsfirstlongfootnotefont{\glsentrylong{\glslabel}}}}% - }% - {}% - }% - \glshasattribute{\the\glslabeltok}{regular}% - {% - \glssetattribute{\the\glslabeltok}{regular}{false}% - }% - {}% - }% +\newrobustcmd*{\GLSxtrtitleplural}[1]{% + \glsxtr@title@field\GLSplural{#1}% +} % \end{macrocode} -%\changes{1.02}{2016-04-25}{added redef of \cs{glsxtrsetupfulldefs}} -% The footnote needs to be suppressed in the inline form, so -% \cs{glsxtrfull} must set the first use switch off. +%\end{macro} +% +%\begin{macro}{\glsxtrheadfirst} +% As above but for the \gloskey{first} value. +%\changes{0.5.1}{2015-12-07}{now uses headuc attribute} % \begin{macrocode} - \renewcommand*{\glsxtrsetupfulldefs}{% - \let\glsxtrifwasfirstuse\@secondoftwo - }% -}% -{% +\newcommand*{\glsxtrheadfirst}[1]{% + \protect\NoCaseChange + {% + \glsxtrifheaduc{#1}% + {% + \GLSfirst[noindex,hyper=false]{#1}[]% + }% + {% + \glsfirst[noindex,hyper=false]{#1}[]% + }% + }% +} % \end{macrocode} -% In case the user wants to mix and match font styles, these are -% redefined here. +%\end{macro} +% +%\begin{macro}{\glsxtrtitlefirst} +% Command to display \gloskey{first} value in section title. % \begin{macrocode} - \renewcommand*{\abbrvpluralsuffix}{\glsxtrabbrvpluralsuffix}% - \renewcommand*\glsabbrvfont[1]{\glsabbrvdefaultfont{##1}}% - \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvdefaultfont{##1}}% - \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongfootnotefont{##1}}% - \renewcommand*{\glslongfont}[1]{\glslongfootnotefont{##1}}% +\newrobustcmd*{\glsxtrtitlefirst}[1]{% + \glsxtr@title@field\glsfirst{#1}% +} % \end{macrocode} -% The full format displays the short form. The long form is -% deferred. +%\end{macro} +% +%\begin{macro}{\Glsxtrheadfirst} +% First letter converted to upper case +%\changes{0.5.1}{2015-12-07}{now uses headuc attribute} % \begin{macrocode} - \renewcommand*{\glsxtrfullformat}[2]{% - \glsfirstabbrvfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - }% - \renewcommand*{\glsxtrfullplformat}[2]{% - \glsfirstabbrvfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - }% - \renewcommand*{\Glsxtrfullformat}[2]{% - \glsfirstabbrvfont{\Glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - }% - \renewcommand*{\Glsxtrfullplformat}[2]{% - \glsfirstabbrvfont{\Glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - }% +\newcommand*{\Glsxtrheadfirst}[1]{% + \protect\NoCaseChange + {% + \glsxtrifheaduc{#1}% + {% + \GLSfirst[noindex,hyper=false]{#1}[]% + }% + {% + \Glsfirst[noindex,hyper=false]{#1}[]% + }% + }% +} % \end{macrocode} -% The first use full form and the inline full form use the short -% (long) style. -%\changes{1.07}{2016-08-15}{switched from \cs{glsfirstlongfont} to -%\cs{glsfirstlongfootnotefont}} +%\end{macro} +% +%\begin{macro}{\Glsxtrtitlefirst} +% Command to display \gloskey{first} value in section title +% with the first letter changed to upper case. % \begin{macrocode} - \renewcommand*{\glsxtrinlinefullformat}[2]{% - \glsfirstabbrvfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstlongfootnotefont{\glsaccesslong{##1}}}% - }% - \renewcommand*{\glsxtrinlinefullplformat}[2]{% - \glsfirstabbrvfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstlongfootnotefont{\glsaccesslongpl{##1}}}% - }% - \renewcommand*{\Glsxtrinlinefullformat}[2]{% - \glsfirstabbrvfont{\Glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstlongfootnotefont{\glsaccesslong{##1}}}% - }% - \renewcommand*{\Glsxtrinlinefullplformat}[2]{% - \glsfirstabbrvfont{\Glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstlongfootnotefont{\glsaccesslongpl{##1}}}% - }% +\newrobustcmd*{\Glsxtrtitlefirst}[1]{% + \glsxtr@title@field\Glsfirst{#1}% } % \end{macrocode} -%\end{abbrvstyle} +%\end{macro} % -%\begin{abbrvstyle}{short-postfootnote} -%\changes{1.04}{2016-05-02}{new} +%\begin{macro}{\GLSxtrheadfirst} +%\changes{1.49}{2022-10-14}{new} +%There's no need to check for the headuc attribute. % \begin{macrocode} -\letabbreviationstyle{short-postfootnote}{postfootnote} +\newcommand*{\GLSxtrheadfirst}[1]{% + \protect\NoCaseChange + {% + \GLSfirst[noindex,hyper=false]{#1}[]% + }% +} % \end{macrocode} -%\end{abbrvstyle} +%\end{macro} % -%\begin{abbrvstyle}{short-postfootnote-desc} +%\begin{macro}{\GLSxtrtitlefirst} %\changes{1.42}{2020-02-03}{new} -% Like \abbrstyle{short-postfootnote} but with user supplied description. +% Command to display \gloskey{first} value in section title +% in all upper case. % \begin{macrocode} -\newabbreviationstyle{short-postfootnote-desc}% -{% +\newrobustcmd*{\GLSxtrtitlefirst}[1]{% + \glsxtr@title@field\GLSfirst{#1}% +} % \end{macrocode} -% Set accessibility attributes if enabled. +%\end{macro} +% +%\begin{macro}{\glsxtrheadfirstplural} +% As above but for the \gloskey{firstplural} value. +%\changes{0.5.1}{2015-12-07}{now uses headuc attribute} % \begin{macrocode} - \glsxtrAccSuppAbbrSetNameLongAttrs\glscategorylabel +\newcommand*{\glsxtrheadfirstplural}[1]{% + \protect\NoCaseChange + {% + \glsxtrifheaduc{#1}% + {% + \GLSfirstplural[noindex,hyper=false]{#1}[]% + }% + {% + \glsfirstplural[noindex,hyper=false]{#1}[]% + }% + }% +} % \end{macrocode} -% Setup the default fields. +%\end{macro} +% +%\begin{macro}{\glsxtrtitlefirstplural} +% Command to display \gloskey{firstplural} value in section title. % \begin{macrocode} - \renewcommand*{\CustomAbbreviationFields}{% - name={\glsxtrfootnotedescname}, - sort={\glsxtrfootnotedescsort}, - first={\protect\glsfirstabbrvfont{\the\glsshorttok}},% - firstplural={\protect\glsfirstabbrvfont{\the\glsshortpltok}},% +\newrobustcmd*{\glsxtrtitlefirstplural}[1]{% + \glsxtr@title@field\glsfirstplural{#1}% +} % \end{macrocode} -%\changes{1.15}{2017-05-10}{fixed spelling of \cs{glsabbrvfont}} -%\changes{1.42}{2020-02-03}{added missing text key} +%\end{macro} +% +%\begin{macro}{\Glsxtrheadfirstplural} +% First letter converted to upper case +%\changes{0.5.1}{2015-12-07}{now uses headuc attribute} % \begin{macrocode} - text={\protect\glsabbrvfont{\the\glsshorttok}},% - plural={\protect\glsabbrvfont{\the\glsshortpltok}}}% +\newcommand*{\Glsxtrheadfirstplural}[1]{% + \protect\NoCaseChange + {% + \glsxtrifheaduc{#1}% + {% + \GLSfirstplural[noindex,hyper=false]{#1}[]% + }% + {% + \Glsfirstplural[noindex,hyper=false]{#1}[]% + }% + }% +} % \end{macrocode} -% Make this category insert a footnote after the link if this was -% the first use, and -% unset the \catattr{regular} attribute if it has been set. -%\changes{0.5.1}{2015-12-07}{switch off regular attribute if set} +%\end{macro} +% +%\begin{macro}{\Glsxtrtitlefirstplural} +% Command to display \gloskey{first} value in section title +% with the first letter changed to upper case. % \begin{macrocode} - \renewcommand*{\GlsXtrPostNewAbbreviation}{% - \csdef{glsxtrpostlink\glscategorylabel}{% - \glsxtrifwasfirstuse - {% +\newrobustcmd*{\Glsxtrtitlefirstplural}[1]{% + \glsxtr@title@field\Glsfirstplural{#1}% +} % \end{macrocode} -% Needs the specific font command here as the style may have been -% lost by the time the footnote occurs. +%\end{macro} +% +%\begin{macro}{\GLSxtrheadfirstplural} +%\changes{1.49}{2022-10-14}{new} +%There's no need to check for the headuc attribute. % \begin{macrocode} - \glsxtrdopostpunc{\protect\glsxtrabbrvfootnote{\glslabel}% - {\glsfirstlongfootnotefont{\glsentrylong{\glslabel}}}}% - }% - {}% - }% - \glshasattribute{\the\glslabeltok}{regular}% - {% - \glssetattribute{\the\glslabeltok}{regular}{false}% - }% - {}% - }% +\newcommand*{\GLSxtrheadfirstplural}[1]{% + \protect\NoCaseChange + {% + \GLSfirstplural[noindex,hyper=false]{#1}[]% + }% +} % \end{macrocode} -%\changes{1.02}{2016-04-25}{added redef of \cs{glsxtrsetupfulldefs}} -% The footnote needs to be suppressed in the inline form, so -% \cs{glsxtrfull} must set the first use switch off. +%\end{macro} +% +%\begin{macro}{\GLSxtrtitlefirstplural} +%\changes{1.42}{2020-02-03}{new} +% Command to display \gloskey{first} value in section title +% in all upper case. % \begin{macrocode} - \renewcommand*{\glsxtrsetupfulldefs}{% - \let\glsxtrifwasfirstuse\@secondoftwo - }% -}% -{% - \GlsXtrUseAbbrStyleFmts{postfootnote}% +\newrobustcmd*{\GLSxtrtitlefirstplural}[1]{% + \glsxtr@title@field\GLSfirstplural{#1}% } % \end{macrocode} -%\end{abbrvstyle} +%\end{macro} % -%\begin{abbrvstyle}{postfootnote-desc} -%\changes{1.42}{?}{new} +%\begin{macro}{\glsxtrheadlong} +% Command used to display long form in the page header. +%\changes{1.02}{2016-04-25}{new} % \begin{macrocode} -\letabbreviationstyle{postfootnote-desc}{short-postfootnote-desc} +\newcommand*{\glsxtrheadlong}[1]{% + \protect\NoCaseChange + {% + \glsxtrifheaduc{#1}% + {% + \GLSxtrlong[noindex,hyper=false]{#1}[]% + }% + {% + \glsxtrlong[noindex,hyper=false]{#1}[]% + }% + }% +} % \end{macrocode} -%\end{abbrvstyle} +%\end{macro} % -%\begin{macro}{\glsxtrshortnolongname} -%\changes{1.25}{2017-11-24}{new} +%\begin{macro}{\glsxtrtitlelong} +% Command to display long form of abbreviation in section title. +%\changes{1.02}{2016-04-25}{new} % \begin{macrocode} -\newcommand*{\glsxtrshortnolongname}{% - \protect\glsabbrvfont{\the\glsshorttok}% +\newrobustcmd*{\glsxtrtitlelong}[1]{% + \glsxtr@title@field\glsxtrlong{#1}% } % \end{macrocode} %\end{macro} % -%\begin{abbrvstyle}{short} -% Provide a style that only displays the short form on first use, -% but the short and long form can be displayed with the \qt{full} -% commands that use the inline format. If the user supplies a -% description, the long form won't be displayed in the predefined -% glossary styles, but the post description hook can be employed to -% automatically insert it. +%\begin{macro}{\glsxtrheadlongpl} +% Command used to display plural long form in the page header. +% If you want the text converted to upper case, this needs to be +% redefined to use \cs{GLSxtrlongpl} instead. If you are using a +% smallcaps style, the default fonts don't provide italic smallcaps. +%\changes{1.02}{2016-04-25}{new} % \begin{macrocode} -\newabbreviationstyle{short}% -{% +\newcommand*{\glsxtrheadlongpl}[1]{% + \protect\NoCaseChange + {% + \glsxtrifheaduc{#1}% + {% + \GLSxtrlongpl[noindex,hyper=false]{#1}[]% + }% + {% + \glsxtrlongpl[noindex,hyper=false]{#1}[]% + }% + }% +} % \end{macrocode} -% Set accessibility attributes if enabled. +%\end{macro} +% +%\begin{macro}{\glsxtrtitlelongpl} +% Command to display plural long form of abbreviation in section title. +%\changes{1.02}{2016-04-25}{new} +%\changes{1.03}{2016-04-27}{bug fix: changed \cs{glsxtrlong} to +%\cs{glsxtrlongpl}} % \begin{macrocode} - \glsxtrAccSuppAbbrSetNoLongAttrs\glscategorylabel +\newrobustcmd*{\glsxtrtitlelongpl}[1]{% + \glsxtr@title@field\glsxtrlongpl{#1}% +} % \end{macrocode} -% Setup the default fields. +%\end{macro} +% +%\begin{macro}{\Glsxtrheadlong} +% Command used to display long form in the page header with the +% first letter converted to upper case. +%\changes{1.02}{2016-04-25}{new} % \begin{macrocode} - \renewcommand*{\CustomAbbreviationFields}{% - name={\glsxtrshortnolongname}, - sort={\the\glsshorttok}, - first={\protect\glsfirstabbrvfont{\the\glsshorttok}}, - firstplural={\protect\glsfirstabbrvfont{\the\glsshortpltok}}, - text={\protect\glsabbrvfont{\the\glsshorttok}}, - plural={\protect\glsabbrvfont{\the\glsshortpltok}}, - description={\the\glslongtok}}% - \renewcommand*{\GlsXtrPostNewAbbreviation}{% - \glssetattribute{\the\glslabeltok}{regular}{true}}% -}% -{% +\newcommand*{\Glsxtrheadlong}[1]{% + \protect\NoCaseChange + {% + \glsxtrifheaduc{#1}% + {% + \GLSxtrlong[noindex,hyper=false]{#1}[]% + }% + {% + \Glsxtrlong[noindex,hyper=false]{#1}[]% + }% + }% +} % \end{macrocode} -% In case the user wants to mix and match font styles, these are -% redefined here. +%\end{macro} +% +%\begin{macro}{\Glsxtrtitlelong} +% Command to display long form of abbreviation in section title +% with the first letter converted to upper case. +%\changes{1.02}{2016-04-25}{new} % \begin{macrocode} - \renewcommand*{\abbrvpluralsuffix}{\glsxtrabbrvpluralsuffix}% - \renewcommand*\glsabbrvfont[1]{\glsabbrvdefaultfont{##1}}% - \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvdefaultfont{##1}}% - \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% - \renewcommand*{\glslongfont}[1]{\glslongdefaultfont{##1}}% +\newrobustcmd*{\Glsxtrtitlelong}[1]{% + \glsxtr@title@field\Glsxtrlong{#1}% +} % \end{macrocode} -% The inline full form displays the short form followed by the -% long form in parentheses. -%\changes{0.2}{2015-11-30}{switched inline full form to short (long)} +%\end{macro} +% +%\begin{macro}{\GLSxtrtitlelong} +% Command to display long form of abbreviation in section title +% in all upper case. +%\changes{1.42}{2020-02-03}{new} % \begin{macrocode} - \renewcommand*{\glsxtrinlinefullformat}[2]{% - \protect\glsfirstabbrvfont{\glsaccessshort{##1}% - \ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstlongfont{\glsaccesslong{##1}}}% - }% - \renewcommand*{\glsxtrinlinefullplformat}[2]{% - \protect\glsfirstabbrvfont{\glsaccessshortpl{##1}% - \ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstlongfont{\glsaccesslongpl{##1}}}% - }% - \renewcommand*{\Glsxtrinlinefullformat}[2]{% - \protect\glsfirstabbrvfont{\glsaccessshort{##1}% - \ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstlongfont{\Glsaccesslong{##1}}}% - }% - \renewcommand*{\Glsxtrinlinefullplformat}[2]{% - \protect\glsfirstabbrvfont{\glsaccessshortpl{##1}% - \ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstlongfont{\Glsaccesslongpl{##1}}}% - }% +\newrobustcmd*{\GLSxtrtitlelong}[1]{% + \glsxtr@title@field\GLSxtrlong{#1}% +} % \end{macrocode} -% The first use full form only displays the short form, but it -% typically won't be used as the \catattr{regular} attribute is set by this style. +%\end{macro} +% +%\begin{macro}{\GLSxtrheadlong} +%\changes{1.49}{2022-10-14}{new} +%There's no need to check for the headuc attribute. % \begin{macrocode} - \renewcommand*{\glsxtrfullformat}[2]{% - \glsfirstabbrvfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - }% - \renewcommand*{\glsxtrfullplformat}[2]{% - \glsfirstabbrvfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - }% - \renewcommand*{\Glsxtrfullformat}[2]{% - \glsfirstabbrvfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - }% - \renewcommand*{\Glsxtrfullplformat}[2]{% - \glsfirstabbrvfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - }% +\newcommand*{\GLSxtrheadlong}[1]{% + \protect\NoCaseChange + {% + \GLSxtrlong[noindex,hyper=false]{#1}[]% + }% } % \end{macrocode} -%\end{abbrvstyle} -% Set this as the default style for acronyms: +%\end{macro} +% +%\begin{macro}{\Glsxtrheadlongpl} +% Command used to display plural long form in the page header with the +% first letter converted to upper case. +%\changes{1.02}{2016-04-25}{new} % \begin{macrocode} -\setabbreviationstyle[acronym]{short} +\newcommand*{\Glsxtrheadlongpl}[1]{% + \protect\NoCaseChange + {% + \glsxtrifheaduc{#1}% + {% + \GLSxtrlongpl[noindex,hyper=false]{#1}[]% + }% + {% + \Glsxtrlongpl[noindex,hyper=false]{#1}[]% + }% + }% +} % \end{macrocode} +%\end{macro} % -%\begin{abbrvstyle}{short-nolong} -%\changes{1.04}{2016-05-02}{new} +%\begin{macro}{\Glsxtrtitlelongpl} +% Command to display plural long form of abbreviation in section title +% with the first letter converted to upper case. +%\changes{1.02}{2016-04-25}{new} % \begin{macrocode} -\letabbreviationstyle{short-nolong}{short} +\newrobustcmd*{\Glsxtrtitlelongpl}[1]{% + \glsxtr@title@field\Glsxtrlongpl{#1}% +} % \end{macrocode} -%\end{abbrvstyle} +%\end{macro} % -%\begin{abbrvstyle}{short-nolong-noreg} -%\changes{1.17}{2017-08-09}{new} -% Like \abbrstyle{short-nolong} but doesn't set the \catattr{regular} attribute. +%\begin{macro}{\GLSxtrtitlelongpl} +% Command to display plural long form of abbreviation in section title +% in all upper case. +%\changes{1.42}{2020-02-03}{new} % \begin{macrocode} -\newabbreviationstyle{short-nolong-noreg}% -{% - \GlsXtrUseAbbrStyleSetup{short-nolong}% +\newrobustcmd*{\GLSxtrtitlelongpl}[1]{% + \glsxtr@title@field\GLSxtrlongpl{#1}% +} % \end{macrocode} -% Unset the \catattr{regular} attribute if it has been set. +%\end{macro} +% +%\begin{macro}{\GLSxtrheadlongpl} +%\changes{1.49}{2022-10-14}{new} +%There's no need to check for the headuc attribute. % \begin{macrocode} - \renewcommand*{\GlsXtrPostNewAbbreviation}{% - \glshasattribute{\the\glslabeltok}{regular}% - {% - \glssetattribute{\the\glslabeltok}{regular}{false}% - }% - {}% - }% -}% -{% - \GlsXtrUseAbbrStyleFmts{short-nolong}% +\newcommand*{\GLSxtrheadlongpl}[1]{% + \protect\NoCaseChange + {% + \GLSxtrlongpl[noindex,hyper=false]{#1}[]% + }% } % \end{macrocode} -%\end{abbrvstyle} -% +%\end{macro} % -%\begin{macro}{\glsxtrshortdescname} -%\changes{1.17}{2017-08-09}{new} -%\changes{1.39}{2019-03-22}{corrected to show long form as advertised in the -%manual} +%\begin{macro}{\glsxtrheadfull} +% Command used to display full form in the page header. +%\changes{1.02}{2016-04-25}{new} % \begin{macrocode} -\newcommand*{\glsxtrshortdescname}{% - \protect\glsabbrvfont{\the\glsshorttok}% - \protect\glsxtrfullsep{\the\glslabeltok}% - \protect\glsxtrparen{\protect\glslongfont{\the\glslongtok}}% +\newcommand*{\glsxtrheadfull}[1]{% + \protect\NoCaseChange + {% + \glsxtrifheaduc{#1}% + {% + \GLSxtrfull[noindex,hyper=false]{#1}[]% + }% + {% + \glsxtrfull[noindex,hyper=false]{#1}[]% + }% + }% } % \end{macrocode} %\end{macro} % -%\begin{abbrvstyle}{short-desc} -% The user must supply the description in this style. The long form -% is added to the name. The \abbrstyle{short} style (possibly with the -% post-description hooks set) might be a better option. -%\changes{1.01}{2016-02-02}{fixed typo in -%\cs{glsxtrinlinefullformat} and added missing second argument} -%\changes{1.39}{2019-03-22}{corrected to omit \gloskey{description} key as advertised in the -%manual} -% \begin{macrocode} -\newabbreviationstyle{short-desc}% -{% -% \end{macrocode} -% Set accessibility attributes if enabled. -% \begin{macrocode} - \glsxtrAccSuppAbbrSetNoLongAttrs\glscategorylabel -% \end{macrocode} -% Setup the default fields. -% \begin{macrocode} - \renewcommand*{\CustomAbbreviationFields}{% - name={\glsxtrshortdescname}, - sort={\the\glsshorttok}, - first={\protect\glsfirstabbrvfont{\the\glsshorttok}}, - firstplural={\protect\glsfirstabbrvfont{\the\glsshortpltok}}, - text={\protect\glsabbrvfont{\the\glsshorttok}}, - plural={\protect\glsabbrvfont{\the\glsshortpltok}}}% - \renewcommand*{\GlsXtrPostNewAbbreviation}{% - \glssetattribute{\the\glslabeltok}{regular}{true}}% -}% -{% -% \end{macrocode} -% In case the user wants to mix and match font styles, these are -% redefined here. +%\begin{macro}{\glsxtrtitlefull} +% Command to display full form of abbreviation in section title. +%\changes{1.02}{2016-04-25}{new} % \begin{macrocode} - \renewcommand*{\abbrvpluralsuffix}{\glsxtrabbrvpluralsuffix}% - \renewcommand*\glsabbrvfont[1]{\glsabbrvdefaultfont{##1}}% - \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvdefaultfont{##1}}% - \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% - \renewcommand*{\glslongfont}[1]{\glslongdefaultfont{##1}}% +\newrobustcmd*{\glsxtrtitlefull}[1]{% + \glsxtr@title@field\glsxtrfull{#1}% +} % \end{macrocode} -% The inline full form displays the short format followed by the -% long form in parentheses. +%\end{macro} +% +%\begin{macro}{\glsxtrheadfullpl} +% Command used to display plural full form in the page header. +% If you want the text converted to upper case, this needs to be +% redefined to use \cs{GLSxtrfullpl} instead. If you are using a +% smallcaps style, the default fonts don't provide italic smallcaps. +%\changes{1.02}{2016-04-25}{new} % \begin{macrocode} - \renewcommand*{\glsxtrinlinefullformat}[2]{% - \glsfirstabbrvfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstlongfont{\glsaccesslong{##1}}}% - }% - \renewcommand*{\glsxtrinlinefullplformat}[2]{% - \glsfirstabbrvfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstlongfont{\glsaccesslongpl{##1}}}% - }% - \renewcommand*{\Glsxtrinlinefullformat}[2]{% - \glsfirstabbrvfont{\Glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstlongfont{\glsaccesslong{##1}}}% - }% - \renewcommand*{\Glsxtrinlinefullplformat}[2]{% - \glsfirstabbrvfont{\Glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstlongfont{\glsaccesslongpl{##1}}}% - }% +\newcommand*{\glsxtrheadfullpl}[1]{% + \protect\NoCaseChange + {% + \glsxtrifheaduc{#1}% + {% + \GLSxtrfullpl[noindex,hyper=false]{#1}[]% + }% + {% + \glsxtrfullpl[noindex,hyper=false]{#1}[]% + }% + }% +} % \end{macrocode} -% The first use full form only displays the short form, but it -% typically won't be used as the \catattr{regular} attribute is set by this style. +%\end{macro} +% +%\begin{macro}{\glsxtrtitlefullpl} +% Command to display plural full form of abbreviation in section title. +%\changes{1.02}{2016-04-25}{new} % \begin{macrocode} - \renewcommand*{\glsxtrfullformat}[2]{% - \glsfirstabbrvfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - }% - \renewcommand*{\glsxtrfullplformat}[2]{% - \glsfirstabbrvfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - }% - \renewcommand*{\Glsxtrfullformat}[2]{% - \glsfirstabbrvfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - }% - \renewcommand*{\Glsxtrfullplformat}[2]{% - \glsfirstabbrvfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - }% +\newrobustcmd*{\glsxtrtitlefullpl}[1]{% + \glsxtr@title@field\glsxtrfullpl{#1}% } % \end{macrocode} -%\end{abbrvstyle} -%\begin{abbrvstyle}{short-nolong-desc} -%\changes{1.04}{2016-05-02}{new} +%\end{macro} +% +%\begin{macro}{\Glsxtrheadfull} +% Command used to display full form in the page header with the +% first letter converted to upper case. +%\changes{1.02}{2016-04-25}{new} % \begin{macrocode} -\letabbreviationstyle{short-nolong-desc}{short-desc} +\newcommand*{\Glsxtrheadfull}[1]{% + \protect\NoCaseChange + {% + \glsxtrifheaduc{#1}% + {% + \GLSxtrfull[noindex,hyper=false]{#1}[]% + }% + {% + \Glsxtrfull[noindex,hyper=false]{#1}[]% + }% + }% +} % \end{macrocode} -%\end{abbrvstyle} +%\end{macro} % -%\begin{abbrvstyle}{short-nolong-desc-noreg} -%\changes{1.17}{2017-08-09}{new} -% Like \abbrstyle{short-nolong-desc} but doesn't set the \catattr{regular} attribute. +%\begin{macro}{\Glsxtrtitlefull} +% Command to display full form of abbreviation in section title +% with the first letter converted to upper case. +%\changes{1.02}{2016-04-25}{new} % \begin{macrocode} -\newabbreviationstyle{short-nolong-desc-noreg}% -{% - \GlsXtrUseAbbrStyleSetup{short-nolong-desc}% +\newrobustcmd*{\Glsxtrtitlefull}[1]{% + \glsxtr@title@field\Glsxtrfull{#1}% +} % \end{macrocode} -% Unset the \catattr{regular} attribute if it has been set. +%\end{macro} +% +%\begin{macro}{\GLSxtrheadfull} +%\changes{1.49}{2022-10-14}{new} +%There's no need to check for the headuc attribute. % \begin{macrocode} - \renewcommand*{\GlsXtrPostNewAbbreviation}{% - \glshasattribute{\the\glslabeltok}{regular}% - {% - \glssetattribute{\the\glslabeltok}{regular}{false}% - }% - {}% - }% -}% -{% - \GlsXtrUseAbbrStyleFmts{short-nolong-desc}% +\newcommand*{\GLSxtrheadfull}[1]{% + \protect\NoCaseChange + {% + \GLSxtrfull[noindex,hyper=false]{#1}[]% + }% } % \end{macrocode} -%\end{abbrvstyle} +%\end{macro} % -%\begin{abbrvstyle}{nolong-short} -% Similar to \abbrstyle{short-nolong} but the full form shows the -% long form followed by the short form in parentheses. -%\changes{1.21}{2017-11-03}{new} +%\begin{macro}{\GLSxtrtitlefull} +% Command to display full form of abbreviation in section title +% in all upper case. +%\changes{1.42}{2020-02-03}{new} % \begin{macrocode} -\newabbreviationstyle{nolong-short}% -{% - \GlsXtrUseAbbrStyleSetup{short-nolong}% -}% -{% - \GlsXtrUseAbbrStyleFmts{short-nolong}% +\newrobustcmd*{\GLSxtrtitlefull}[1]{% + \glsxtr@title@field\GLSxtrfull{#1}% +} % \end{macrocode} -% The inline full form displays the long form followed by the -% short form in parentheses. +%\end{macro} +% +%\begin{macro}{\Glsxtrheadfullpl} +% Command used to display plural full form in the page header with the +% first letter converted to upper case. +%\changes{1.02}{2016-04-25}{new} % \begin{macrocode} - \renewcommand*{\glsxtrinlinefullformat}[2]{% - \protect\glsfirstlongfont{\glsaccesslong{##1}% - \ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstabbrvfont{\glsaccessshort{##1}}}% - }% - \renewcommand*{\glsxtrinlinefullplformat}[2]{% - \protect\glsfirstlongfont{\glsaccesslongpl{##1}% - \ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstabbrvfont{\glsaccessshortpl{##1}}}% - }% - \renewcommand*{\Glsxtrinlinefullformat}[2]{% - \protect\glsfirstlongfont{\glsaccesslong{##1}% - \ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstabbrvfont{\Glsaccessshort{##1}}}% - }% - \renewcommand*{\Glsxtrinlinefullplformat}[2]{% - \protect\glsfirstlongfont{\glsaccesslongpl{##1}% - \ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstabbrvfont{\Glsaccessshortpl{##1}}}% - }% +\newcommand*{\Glsxtrheadfullpl}[1]{% + \protect\NoCaseChange + {% + \glsxtrifheaduc{#1}% + {% + \GLSxtrfullpl[noindex,hyper=false]{#1}[]% + }% + {% + \Glsxtrfullpl[noindex,hyper=false]{#1}[]% + }% + }% } % \end{macrocode} -%\end{abbrvstyle} +%\end{macro} % -%\begin{abbrvstyle}{nolong-short-noreg} -%\changes{1.21}{2017-11-03}{new} -% Like \abbrstyle{nolong-short} but doesn't set the \catattr{regular} attribute. +%\begin{macro}{\Glsxtrtitlefullpl} +% Command to display plural full form of abbreviation in section title +% with the first letter converted to upper case. +%\changes{1.02}{2016-04-25}{new} % \begin{macrocode} -\newabbreviationstyle{nolong-short-noreg}% -{% - \GlsXtrUseAbbrStyleSetup{nolong-short}% +\newrobustcmd*{\Glsxtrtitlefullpl}[1]{% + \glsxtr@title@field\Glsxtrfullpl{#1}% +} % \end{macrocode} -% Unset the \catattr{regular} attribute if it has been set. +%\end{macro} +% +%\begin{macro}{\GLSxtrheadfullpl} +%\changes{1.49}{2022-10-14}{new} +%There's no need to check for the headuc attribute. % \begin{macrocode} - \renewcommand*{\GlsXtrPostNewAbbreviation}{% - \glshasattribute{\the\glslabeltok}{regular}% - {% - \glssetattribute{\the\glslabeltok}{regular}{false}% - }% - {}% - }% -}% -{% - \GlsXtrUseAbbrStyleFmts{nolong-short}% +\newcommand*{\GLSxtrheadfullpl}[1]{% + \protect\NoCaseChange + {% + \GLSxtrfullpl[noindex,hyper=false]{#1}[]% + }% } % \end{macrocode} -%\end{abbrvstyle} +%\end{macro} % -%\begin{macro}{\glsxtrlongnoshortdescname} -%\changes{1.25}{2017-11-24}{new} +%\begin{macro}{\GLSxtrtitlefullpl} +% Command to display plural full form of abbreviation in section title +% in all upper case. +%\changes{1.42}{2020-02-03}{new} % \begin{macrocode} -\newcommand*{\glsxtrlongnoshortdescname}{% - \protect\glslongfont{\the\glslongtok}% +\newrobustcmd*{\GLSxtrtitlefullpl}[1]{% + \glsxtr@title@field\GLSxtrfullpl{#1}% } % \end{macrocode} %\end{macro} % -%\begin{abbrvstyle}{long-desc} -% Provide a style that only displays the long form, -% but the long and short form can be displayed with the \qt{full} -% commands that use the inline format. The predefined glossary styles -% won't show the short form. The user must supply a description for -% this style. The accessibility attributes don't need setting here. +%\begin{macro}{\glsfmtshort} +% Provide a way of using the formatted short form in section +% headings. If \sty{hyperref} has been loaded, use +% \cs{texorpdfstring} for convenience in PDF bookmarks. +%\changes{0.2}{2015-11-30}{new} +%\changes{0.4}{2015-12-03}{changed to use \cs{glsxtrshort}} +%\changes{0.5}{2015-12-07}{changed to use \cs{glsxtrtitleshort}} +%\changes{0.5}{2015-12-07}{renamed from \cs{glsentryfmtshort}} % \begin{macrocode} -\newabbreviationstyle{long-desc}% -{% - \renewcommand*{\CustomAbbreviationFields}{% - name={\glsxtrlongnoshortdescname}, - sort={\the\glslongtok}, - first={\protect\glsfirstlongfont{\the\glslongtok}}, - firstplural={\protect\glsfirstlongfont{\the\glslongpltok}}, - text={\glslongfont{\the\glslongtok}}, - plural={\glslongfont{\the\glslongpltok}}% - }% - \renewcommand*{\GlsXtrPostNewAbbreviation}{% - \glssetattribute{\the\glslabeltok}{regular}{true}}% -}% -{% +\newcommand*{\glsfmtshort}[1]{% + \glstexorpdfstring + {\glsxtrtitleshort{#1}}% + {\glsentryshort{#1}}% +} % \end{macrocode} -% In case the user wants to mix and match font styles, these are -% redefined here. +%\end{macro} +%Similarly for the plural version. +%\begin{macro}{\glsfmtshortpl} +%\changes{0.2}{2015-11-30}{new} +%\changes{0.4}{2015-12-03}{changed to use \cs{glsxtrshortpl}} +%\changes{0.5}{2015-12-07}{changed to use \cs{glsxtrtitleshortpl}} +%\changes{0.5}{2015-12-07}{renamed from \cs{glsentryfmtshortpl}} % \begin{macrocode} - \renewcommand*{\abbrvpluralsuffix}{\glsxtrabbrvpluralsuffix}% - \renewcommand*\glsabbrvfont[1]{\glsabbrvdefaultfont{##1}}% - \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvdefaultfont{##1}}% - \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% - \renewcommand*{\glslongfont}[1]{\glslongdefaultfont{##1}}% +\newcommand*{\glsfmtshortpl}[1]{% + \glstexorpdfstring + {\glsxtrtitleshortpl{#1}}% + {\glsentryshortpl{#1}}% +} % \end{macrocode} -% The format for subsequent use (not used when the regular attribute -% is set). +%\end{macro} +% Use the expandable \cs{MFUsentencecase} in the PDF bookmark. +%\begin{macro}{\Glsfmtshort} +% Singular form (first letter uppercase). +%\changes{0.2}{2015-11-30}{new} +%\changes{0.4}{2015-12-03}{changed to use \cs{Glsxtrshort}} +%\changes{0.5}{2015-12-07}{changed to use \cs{Glsxtrtitleshort}} +%\changes{0.5}{2015-12-07}{renamed from \cs{Glsentryfmtshort}} +%\changes{1.49}{2022-10-14}{added \cs{MFUsentencecase}} % \begin{macrocode} - \renewcommand*{\glsxtrsubsequentfmt}[2]{% - \glslongfont{\glsaccesslong{##1}\ifglsxtrinsertinside ##2\fi}% - \ifglsxtrinsertinside \else##2\fi - }% - \renewcommand*{\glsxtrsubsequentplfmt}[2]{% - \glslongfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside ##2\fi}% - \ifglsxtrinsertinside \else##2\fi - }% - \renewcommand*{\Glsxtrsubsequentfmt}[2]{% - \glslongfont{\Glsaccesslong{##1}\ifglsxtrinsertinside ##2\fi}% - \ifglsxtrinsertinside \else##2\fi - }% - \renewcommand*{\Glsxtrsubsequentplfmt}[2]{% - \glslongfont{\Glsaccesslongpl{##1}\ifglsxtrinsertinside ##2\fi}% - \ifglsxtrinsertinside \else##2\fi - }% +\newcommand*{\Glsfmtshort}[1]{% + \glstexorpdfstring + {\Glsxtrtitleshort{#1}}% + {\MFUsentencecase{\glsentryshort{#1}}}% +} +\glsmfuaddmap{\glsfmtshort}{\Glsfmtshort} % \end{macrocode} -% The inline full form displays the long format followed by the -% short form in parentheses. +%\end{macro} +%\begin{macro}{\Glsfmtshortpl} +%Plural form (first letter uppercase). +%\changes{0.2}{2015-11-30}{new} +%\changes{0.4}{2015-12-03}{changed to use \cs{glsxtrshortpl}} +%\changes{0.5}{2015-12-07}{changed to use \cs{Glsxtrtitleshortpl}} +%\changes{0.5}{2015-12-07}{renamed from \cs{Glsentryfmtshortpl}} +%\changes{1.49}{2022-10-14}{added \cs{MFUsentencecase}} % \begin{macrocode} - \renewcommand*{\glsxtrinlinefullformat}[2]{% - \glsfirstlongfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\protect\glsfirstabbrvfont{\glsaccessshort{##1}}}% - }% - \renewcommand*{\glsxtrinlinefullplformat}[2]{% - \glsfirstlongfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\protect\glsfirstabbrvfont{\glsaccessshortpl{##1}}}% - }% - \renewcommand*{\Glsxtrinlinefullformat}[2]{% - \glsfirstlongfont{\Glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\protect\glsfirstabbrvfont{\glsaccessshort{##1}}}% - }% - \renewcommand*{\Glsxtrinlinefullplformat}[2]{% - \glsfirstlongfont{\Glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\protect\glsfirstabbrvfont{\glsaccessshortpl{##1}}}% - }% +\newcommand*{\Glsfmtshortpl}[1]{% + \glstexorpdfstring + {\Glsxtrtitleshortpl{#1}}% + {\MFUsentencecase{\glsentryshortpl{#1}}}% +} +\glsmfuaddmap{\glsfmtshortpl}{\Glsfmtshortpl} % \end{macrocode} -% The first use full form only displays the long form, but it -% typically won't be used as the \catattr{regular} attribute is set by this style. +%\end{macro} +% +% Similarly for all-caps. +%\begin{macro}{\GLSfmtshort} +%\changes{1.49}{2022-10-14}{new} % \begin{macrocode} - \renewcommand*{\glsxtrfullformat}[2]{% - \glsfirstlongfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - }% - \renewcommand*{\glsxtrfullplformat}[2]{% - \glsfirstlongfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - }% - \renewcommand*{\Glsxtrfullformat}[2]{% - \glsfirstlongfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - }% - \renewcommand*{\Glsxtrfullplformat}[2]{% - \glsfirstlongfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - }% +\newcommand*{\GLSfmtshort}[1]{% + \glstexorpdfstring + {\GLSxtrtitleshort{#1}}% + {\GLSxtrusefield{#1}{short}}% } +\glsmfublocker{\GLSfmtshort} % \end{macrocode} -%\end{abbrvstyle} -%\begin{abbrvstyle}{long-noshort-desc} -%\changes{1.04}{2016-05-02}{new} -%Provide a synonym that matches similar styles. +%\end{macro} +% +%\begin{macro}{\GLSfmtshortpl} +%\changes{1.49}{2022-10-14}{new} % \begin{macrocode} -\letabbreviationstyle{long-noshort-desc}{long-desc} +\newcommand*{\GLSfmtshortpl}[1]{% + \glstexorpdfstring + {\GLSxtrtitleshortpl{#1}}% + {\GLSxtrusefield{#1}{shortpl}}% +} +\glsmfublocker{\GLSfmtshortpl} % \end{macrocode} -%\end{abbrvstyle} +%\end{macro} % -%\begin{abbrvstyle}{long-noshort-desc-noreg} -%\changes{1.17}{2017-08-09}{new} -% Like long-noshort-desc but doesn't set the \catattr{regular} attribute. +%\begin{macro}{\glsfmtname} +%As above but for the \gloskey{name} value. +%\changes{1.21}{2017-11-03}{new} % \begin{macrocode} -\newabbreviationstyle{long-noshort-desc-noreg}% -{% - \GlsXtrUseAbbrStyleSetup{long-noshort-desc}% +\newcommand*{\glsfmtname}[1]{% + \glstexorpdfstring + {\glsxtrtitlename{#1}}% + {\glsentryname{#1}}% +} % \end{macrocode} -% Unset the \catattr{regular} attribute if it has been set. +%\end{macro} +% +%\begin{macro}{\Glsfmtname} +%First letter converted to upper case. +%\changes{1.21}{2017-11-03}{new} +%\changes{1.49}{2022-10-14}{added \cs{MFUsentencecase}} % \begin{macrocode} - \renewcommand*{\GlsXtrPostNewAbbreviation}{% - \glshasattribute{\the\glslabeltok}{regular}% - {% - \glssetattribute{\the\glslabeltok}{regular}{false}% - }% - {}% - }% -}% -{% - \GlsXtrUseAbbrStyleFmts{long-noshort-desc}% +\newcommand*{\Glsfmtname}[1]{% + \glstexorpdfstring + {\Glsxtrtitlename{#1}}% + {\MFUsentencecase{\glsentryname{#1}}}% } +\glsmfuaddmap{\glsfmtname}{\Glsfmtname} % \end{macrocode} -%\end{abbrvstyle} +%\end{macro} % -%\begin{macro}{\glsxtrlongnoshortname} -%\changes{1.25}{2017-11-24}{new} +%\begin{macro}{\GLSfmtname} +%All upper case. +%\changes{1.42}{2020-02-03}{new} % \begin{macrocode} -\newcommand*{\glsxtrlongnoshortname}{% - \protect\glsabbrvfont{\the\glsshorttok}% +\newcommand*{\GLSfmtname}[1]{% + \glstexorpdfstring + {\GLSxtrtitlename{#1}}% + {\GLSxtrusefield{#1}{name}}% } +\glsmfublocker{\GLSfmtname} % \end{macrocode} %\end{macro} % -%\begin{abbrvstyle}{long} -% It doesn't really make a great deal of sense to have a long-only -% style that doesn't have a description (unless no glossary is -% required), but the best course of -% action here is to use the short form as the name and the long -% form as the description. +% +%\begin{macro}{\glsfmttext} +%As above but for the \gloskey{text} value. +%\changes{0.5}{2015-12-07}{new} % \begin{macrocode} -\newabbreviationstyle{long}% -{% +\newcommand*{\glsfmttext}[1]{% + \glstexorpdfstring + {\glsxtrtitletext{#1}}% + {\glsentrytext{#1}}% +} % \end{macrocode} -% Set accessibility attributes if enabled. +%\end{macro} +% +%\begin{macro}{\Glsfmttext} +%First letter converted to upper case. +%\changes{0.5}{2015-12-07}{new} +%\changes{1.49}{2022-10-14}{added \cs{MFUsentencecase}} % \begin{macrocode} - \glsxtrAccSuppAbbrSetNameShortAttrs\glscategorylabel +\newcommand*{\Glsfmttext}[1]{% + \glstexorpdfstring + {\Glsxtrtitletext{#1}}% + {\MFUsentencecase{\glsentrytext{#1}}}% +} +\glsmfuaddmap{\glsfmttext}{\Glsfmttext} % \end{macrocode} -% Setup the default fields. +%\end{macro} +% +%\begin{macro}{\GLSfmttext} +%All upper case. +%\changes{1.42}{2020-02-03}{new} % \begin{macrocode} - \renewcommand*{\CustomAbbreviationFields}{% - name={\glsxtrlongnoshortname}, - sort={\the\glsshorttok}, - first={\protect\glsfirstlongfont{\the\glslongtok}}, - firstplural={\protect\glsfirstlongfont{\the\glslongpltok}}, - text={\glslongfont{\the\glslongtok}}, - plural={\glslongfont{\the\glslongpltok}},% - description={\the\glslongtok}% - }% - \renewcommand*{\GlsXtrPostNewAbbreviation}{% - \glssetattribute{\the\glslabeltok}{regular}{true}}% -}% -{% - \GlsXtrUseAbbrStyleFmts{long-desc}% +\newcommand*{\GLSfmttext}[1]{% + \glstexorpdfstring + {\GLSxtrtitletext{#1}}% + {\GLSxtrusefield{#1}{text}}% } +\glsmfublocker{\GLSfmttext} % \end{macrocode} -%\end{abbrvstyle} +%\end{macro} % -%\begin{abbrvstyle}{long-noshort} -%\changes{1.04}{2016-05-02}{new} -%Provide a synonym that matches similar styles. +%\begin{macro}{\glsfmtplural} +%As above but for the \gloskey{plural} value. +%\changes{0.5}{2015-12-07}{new} % \begin{macrocode} -\letabbreviationstyle{long-noshort}{long} +\newcommand*{\glsfmtplural}[1]{% + \glstexorpdfstring + {\glsxtrtitleplural{#1}}% + {\glsentryplural{#1}}% +} % \end{macrocode} -%\end{abbrvstyle} +%\end{macro} % -%\begin{abbrvstyle}{long-noshort-noreg} -%\changes{1.17}{2017-08-09}{new} -% Like long-noshort but doesn't set the \catattr{regular} attribute. +%\begin{macro}{\Glsfmtplural} +%First letter converted to upper case. +%\changes{0.5}{2015-12-07}{new} +%\changes{1.49}{2022-10-14}{added \cs{MFUsentencecase}} % \begin{macrocode} -\newabbreviationstyle{long-noshort-noreg}% -{% - \GlsXtrUseAbbrStyleSetup{long-noshort}% +\newcommand*{\Glsfmtplural}[1]{% + \glstexorpdfstring + {\Glsxtrtitleplural{#1}}% + {\MFUsentencecase{\glsentryplural{#1}}}% +} +\glsmfuaddmap{\glsfmtplural}{\Glsfmtplural} % \end{macrocode} -% Unset the \catattr{regular} attribute if it has been set. +%\end{macro} +% +%\begin{macro}{\GLSfmtplural} +%All upper case. +%\changes{1.42}{2020-02-03}{new} % \begin{macrocode} - \renewcommand*{\GlsXtrPostNewAbbreviation}{% - \glshasattribute{\the\glslabeltok}{regular}% - {% - \glssetattribute{\the\glslabeltok}{regular}{false}% - }% - {}% - }% -}% -{% - \GlsXtrUseAbbrStyleFmts{long-noshort}% +\newcommand*{\GLSfmtplural}[1]{% + \glstexorpdfstring + {\GLSxtrtitleplural{#1}}% + {\GLSxtrusefield{#1}{plural}}% } +\glsmfublocker{\GLSfmtplural} % \end{macrocode} -%\end{abbrvstyle} +%\end{macro} % -%\subsection{Predefined Styles (Small Capitals)} -%These styles use \cs{textsc} for the short form. -%\begin{macro}{\glsxtrscfont} +%\begin{macro}{\glsfmtfirst} +%As above but for the \gloskey{first} value. %\changes{0.5}{2015-12-07}{new} -%Maintained for backward-compatibility. % \begin{macrocode} -\newcommand*{\glsxtrscfont}[1]{\textsc{#1}} +\newcommand*{\glsfmtfirst}[1]{% + \glstexorpdfstring + {\glsxtrtitlefirst{#1}}% + {\glsentryfirst{#1}}% +} % \end{macrocode} %\end{macro} -%\begin{macro}{\glsabbrvscfont} -%\changes{1.17}{2017-08-09}{new} -%Added for consistent naming. +% +%\begin{macro}{\Glsfmtfirst} +%First letter converted to upper case. +%\changes{0.5}{2015-12-07}{new} +%\changes{1.49}{2022-10-14}{added \cs{MFUsentencecase}} % \begin{macrocode} -\newcommand*{\glsabbrvscfont}{\glsxtrscfont} +\newcommand*{\Glsfmtfirst}[1]{% + \glstexorpdfstring + {\Glsxtrtitlefirst{#1}}% + {\MFUsentencecase{\glsentryfirst{#1}}}% +} +\glsmfuaddmap{\glsfmtfirst}{\Glsfmtfirst} % \end{macrocode} %\end{macro} -%\begin{macro}{\glsxtrfirstscfont} -%\changes{1.04}{2016-05-02}{new} -%Maintained for backward-compatibility. +% +%\begin{macro}{\GLSfmtfirst} +%All upper case. +%\changes{1.42}{2020-02-03}{new} % \begin{macrocode} -\newcommand*{\glsxtrfirstscfont}[1]{\glsabbrvscfont{#1}} +\newcommand*{\GLSfmtfirst}[1]{% + \glstexorpdfstring + {\GLSxtrtitlefirst{#1}}% + {\GLSxtrusefield{#1}{first}}% +} +\glsmfublocker{\GLSfmtfirst} % \end{macrocode} %\end{macro} -%\begin{macro}{\glsfirstabbrvscfont} -%\changes{1.17}{2017-08-09}{new} -%Added for consistent naming. +% +%\begin{macro}{\glsfmtfirstpl} +%As above but for the \gloskey{firstplural} value. +%\changes{0.5}{2015-12-07}{new} % \begin{macrocode} -\newcommand*{\glsfirstabbrvscfont}{\glsxtrfirstscfont} +\newcommand*{\glsfmtfirstpl}[1]{% + \glstexorpdfstring + {\glsxtrtitlefirstplural{#1}}% + {\GLSxtrusefield{#1}{firstpl}}% +} % \end{macrocode} %\end{macro} -% and for the default short form suffix: -%\begin{macro}{\glsxtrscsuffix} +% +%\begin{macro}{\Glsfmtfirstpl} +%First letter converted to upper case. %\changes{0.5}{2015-12-07}{new} -%\changes{1.42}{2020-02-03}{added \cs{protect}} -%\cs{protect} needs to come inside \cs{\glsxtrscsuffix} to avoid -%interfering with all caps. +%\changes{1.49}{2022-10-14}{added \cs{MFUsentencecase}} % \begin{macrocode} -\newcommand*{\glsxtrscsuffix}{\protect\glstextup{\glsxtrabbrvpluralsuffix}} +\newcommand*{\Glsfmtfirstpl}[1]{% + \glstexorpdfstring + {\Glsxtrtitlefirstplural{#1}}% + {\MFUsentencecase{\glsentryfirstplural{#1}}}% +} % \end{macrocode} %\end{macro} % -%\begin{abbrvstyle}{long-short-sc} -%\changes{1.42}{2020-02-03}{added missing text key} +%\begin{macro}{\GLSfmtfirstpl} +%All upper case. +%\changes{1.42}{2020-02-03}{new} % \begin{macrocode} -\newabbreviationstyle{long-short-sc}% -{% +\newcommand*{\GLSfmtfirstpl}[1]{% + \glstexorpdfstring + {\GLSxtrtitlefirstplural{#1}}% + {\GLSxtrusefield{#1}{firstpl}}% +} +\glsmfublocker{\GLSfmtfirstpl} % \end{macrocode} -% Set accessibility attributes if enabled. +%\end{macro} +% +%\begin{macro}{\glsfmtlong} +%As above but for the \gloskey{long} value. +%\changes{1.02}{2016-04-25}{new} % \begin{macrocode} - \glsxtrAccSuppAbbrSetFirstLongAttrs\glscategorylabel +\newcommand*{\glsfmtlong}[1]{% + \glstexorpdfstring + {\glsxtrtitlelong{#1}}% + {\glsentrylong{#1}}% +} % \end{macrocode} -% Setup the default fields. +%\end{macro} +% +%\begin{macro}{\Glsfmtlong} +%First letter converted to upper case. +%\changes{1.02}{2016-04-25}{new} +%\changes{1.49}{2022-10-14}{added \cs{MFUsentencecase}} % \begin{macrocode} - \renewcommand*{\CustomAbbreviationFields}{% - name={\glsxtrlongshortname}, - sort={\the\glsshorttok}, - first={\protect\glsfirstlongdefaultfont{\the\glslongtok}% - \protect\glsxtrfullsep{\the\glslabeltok}% - \glsxtrparen{\protect\glsfirstabbrvscfont{\the\glsshorttok}}},% - firstplural={\protect\glsfirstlongdefaultfont{\the\glslongpltok}% - \protect\glsxtrfullsep{\the\glslabeltok}% - \glsxtrparen{\protect\glsfirstabbrvscfont{\the\glsshortpltok}}},% - text={\protect\glsabbrvscfont{\the\glsshorttok}},% - plural={\protect\glsabbrvscfont{\the\glsshortpltok}},% - description={\the\glslongtok}}% - \renewcommand*{\GlsXtrPostNewAbbreviation}{% - \glshasattribute{\the\glslabeltok}{regular}% - {% - \glssetattribute{\the\glslabeltok}{regular}{false}% - }% - {}% - }% -}% -{% +\newcommand*{\Glsfmtlong}[1]{% + \glstexorpdfstring + {\Glsxtrtitlelong{#1}}% + {\MFUsentencecase{\glsentrylong{#1}}}% +} +\glsmfuaddmap{\glsfmtlong}{\Glsfmtlong} % \end{macrocode} -% Use smallcaps and adjust the plural suffix to revert to upright. -%\changes{1.42}{2020-02-03}{moved \cs{protect} inside \cs{glsxtrscsuffix}} +%\end{macro} +% +%\begin{macro}{\GLSfmtlong} +%All upper case. +%\changes{1.42}{2020-02-03}{new} % \begin{macrocode} - \renewcommand*{\abbrvpluralsuffix}{\glsxtrscsuffix}% - \renewcommand*\glsabbrvfont[1]{\glsabbrvscfont{##1}}% - \renewcommand*\glsfirstabbrvfont[1]{\glsfirstabbrvscfont{##1}}% +\newcommand*{\GLSfmtlong}[1]{% + \glstexorpdfstring + {\GLSxtrtitlelong{#1}}% + {\GLSxtrusefield{#1}{long}}% +} +\glsmfublocker{\GLSfmtlong} % \end{macrocode} -% Use the default long fonts. +%\end{macro} +% +%\begin{macro}{\glsfmtlongpl} +%As above but for the \gloskey{longplural} value. +%\changes{1.02}{2016-04-25}{new} % \begin{macrocode} - \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% - \renewcommand*{\glslongfont}[1]{\glslongdefaultfont{##1}}% +\newcommand*{\glsfmtlongpl}[1]{% + \glstexorpdfstring + {\glsxtrtitlelongpl{#1}}% + {\glsentrylongpl{#1}}% +} % \end{macrocode} -% The first use full form and the inline full form are the same for -% this style. +%\end{macro} +% +%\begin{macro}{\Glsfmtlongpl} +%First letter converted to upper case. +%\changes{1.02}{2016-04-25}{new} +%\changes{1.49}{2022-10-14}{added \cs{MFUsentencecase}} % \begin{macrocode} - \renewcommand*{\glsxtrfullformat}[2]{% - \glsfirstlongdefaultfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - \glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstabbrvscfont{\glsaccessshort{##1}}}% - }% - \renewcommand*{\glsxtrfullplformat}[2]{% - \glsfirstlongdefaultfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstabbrvscfont{\glsaccessshortpl{##1}}}% - }% - \renewcommand*{\Glsxtrfullformat}[2]{% - \glsfirstlongdefaultfont{\Glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstabbrvscfont{\glsaccessshort{##1}}}% - }% - \renewcommand*{\Glsxtrfullplformat}[2]{% - \glsfirstlongdefaultfont{\Glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstabbrvscfont{\glsaccessshortpl{##1}}}% - }% +\newcommand*{\Glsfmtlongpl}[1]{% + \glstexorpdfstring + {\Glsxtrtitlelongpl{#1}}% + {\MFUsentencecase{\glsentrylongpl{#1}}}% } +\glsmfuaddmap{\glsfmtlongpl}{\Glsfmtlongpl} % \end{macrocode} -%\end{abbrvstyle} +%\end{macro} % -%\begin{abbrvstyle}{long-short-sc-desc} +%\begin{macro}{\GLSfmtlongpl} +%All upper case. +%\changes{1.42}{2020-02-03}{new} % \begin{macrocode} -\newabbreviationstyle{long-short-sc-desc}% -{% +\newcommand*{\GLSfmtlongpl}[1]{% + \glstexorpdfstring + {\GLSxtrtitlelongpl{#1}}% + {\GLSxtrusefield{#1}{longpl}}% +} +\glsmfublocker{\GLSfmtlongpl} % \end{macrocode} -% Set accessibility attributes if enabled. +%\end{macro} +% +%\begin{macro}{\glspdffmtfull} +%\changes{1.42}{2020-02-03}{new} +%Can't use \cs{glsxtrinlinefullformat} in PDF bookmarks as it's not +%fully expandable. This command is for the PDF part of +%\cs{texorpdfstring} for the full form. % \begin{macrocode} - \glsxtrAccSuppAbbrSetTextShortAttrs\glscategorylabel +\newcommand*{\glspdffmtfull}[1]{\glsentrylong{#1} (\glsentryshort{#1})}% % \end{macrocode} -% Setup the default fields. +%\end{macro} +%\begin{macro}{\glspdffmtfullpl} +%\changes{1.42}{2020-02-03}{new} +%Likewise for plural. % \begin{macrocode} - \renewcommand*{\CustomAbbreviationFields}{% - name={\glsxtrlongshortdescname}, - sort={\glsxtrlongshortdescsort},% - first={\protect\glsfirstlongdefaultfont{\the\glslongtok}% - \protect\glsxtrfullsep{\the\glslabeltok}% - \glsxtrparen{\protect\glsfirstabbrvscfont{\the\glsshorttok}}},% - firstplural={\protect\glsfirstlongdefaultfont{\the\glslongpltok}% - \protect\glsxtrfullsep{\the\glslabeltok}% - \glsxtrparen{\protect\glsfirstabbrvscfont{\the\glsshortpltok}}},% - text={\protect\glsabbrvscfont{\the\glsshorttok}},% - plural={\protect\glsabbrvscfont{\the\glsshortpltok}}% - }% +\newcommand*{\glspdffmtfullpl}[1]{\glsentrylongpl{#1} (\glsentryshortpl{#1})}% % \end{macrocode} -%\changes{0.5.1}{2015-12-07}{switch off regular attribute if set} -% Unset the \catattr{regular} attribute if it has been set. +%\end{macro} +%\begin{macro}{\glsfmtfull} +%In-line full format. +%\changes{1.02}{2016-04-25}{new} +%\changes{1.42}{2020-02-03}{switched pdf case to use \cs{glspdffmtfull}} % \begin{macrocode} - \renewcommand*{\GlsXtrPostNewAbbreviation}{% - \glshasattribute{\the\glslabeltok}{regular}% - {% - \glssetattribute{\the\glslabeltok}{regular}{false}% - }% - {}% - }% -}% -{% +\newcommand*{\glsfmtfull}[1]{% + \glstexorpdfstring + {\glsxtrtitlefull{#1}}% + {\glspdffmtfull{#1}}% +} % \end{macrocode} -% As long-short-sc style: +%\end{macro} +% +%\begin{macro}{\Glsfmtfull} +%First letter converted to upper case. +%\changes{1.02}{2016-04-25}{new} +%\changes{1.42}{2020-02-03}{switched pdf case to use \cs{glspdffmtfull}} +%\changes{1.49}{2022-10-14}{added \cs{MFUsentencecase}} % \begin{macrocode} - \GlsXtrUseAbbrStyleFmts{long-short-sc}% +\newcommand*{\Glsfmtfull}[1]{% + \glstexorpdfstring + {\Glsxtrtitlefull{#1}}% + {\MFUsentencecase{\glspdffmtfull{#1}{}}}% } +\glsmfuaddmap{\glsfmtfull}{\Glsfmtfull} % \end{macrocode} -%\end{abbrvstyle} +%\end{macro} % -%\begin{abbrvstyle}{short-sc-long} -% Now the short (long) version -%\changes{1.42}{2020-02-03}{added missing text key} +%\begin{macro}{\GLSfmtfull} +%All upper case. This explicitly uses \cs{text\_uppercase:n} in case +%an old version of \sty{glossaries} or \sty{mfirstuc} is present. +%\changes{1.42}{2020-02-03}{new} +%\changes{1.49}{2022-10-14}{add upper case bookmark} % \begin{macrocode} -\newabbreviationstyle{short-sc-long}% -{% +\ExplSyntaxOn +\newcommand*{\GLSfmtfull}[1]{% + \glstexorpdfstring + {\GLSxtrtitlefull{#1}}% + {\text_uppercase:n{\glspdffmtfull{#1}}}% +} +\ExplSyntaxOff +\glsmfublocker{\GLSfmtfull} % \end{macrocode} -% Set accessibility attributes if enabled. +%\end{macro} +% +%\begin{macro}{\glsfmtfullpl} +%In-line full plural format. +%\changes{1.02}{2016-04-25}{new} +%\changes{1.42}{2020-02-03}{switched pdf case to use \cs{glspdffmtfullpl}} % \begin{macrocode} - \glsxtrAccSuppAbbrSetFirstLongAttrs\glscategorylabel +\newcommand*{\glsfmtfullpl}[1]{% + \glstexorpdfstring + {\glsxtrtitlefullpl{#1}}% + {\glspdffmtfullpl{#1}}% +} % \end{macrocode} -% Setup the default fields. +%\end{macro} +% +%\begin{macro}{\Glsfmtfullpl} +%First letter converted to upper case. +%\changes{1.02}{2016-04-25}{new} +%\changes{1.42}{2020-02-03}{switched pdf case to use \cs{glspdffmtfullpl}} +%\changes{1.49}{2022-10-14}{added \cs{MFUsentencecase}} % \begin{macrocode} - \renewcommand*{\CustomAbbreviationFields}{% - name={\glsxtrshortlongname}, - sort={\the\glsshorttok}, - description={\the\glslongtok},% - first={\protect\glsfirstabbrvscfont{\the\glsshorttok}% - \protect\glsxtrfullsep{\the\glslabeltok}% - \glsxtrparen{\protect\glsfirstlongdefaultfont{\the\glslongtok}}},% - firstplural={\protect\glsfirstabbrvscfont{\the\glsshortpltok}% - \protect\glsxtrfullsep{\the\glslabeltok}% - \glsxtrparen{\protect\glsfirstlongdefaultfont{\the\glslongpltok}}},% - text={\protect\glsabbrvscfont{\the\glsshorttok}},% - plural={\protect\glsabbrvscfont{\the\glsshortpltok}}}% +\newcommand*{\Glsfmtfullpl}[1]{% + \glstexorpdfstring + {\Glsxtrtitlefullpl{#1}}% + {\MFUsentencecase{\glspdffmtfullpl{#1}{}}}% +} +\glsmfuaddmap{\glsfmtfullpl}{\Glsfmtfullpl} % \end{macrocode} -% Unset the \catattr{regular} attribute if it has been set. +%\end{macro} +% +%\begin{macro}{\GLSfmtfullpl} +%All upper case. This explicitly uses \cs{text\_uppercase:n} in case +%an old version of \sty{glossaries} or \sty{mfirstuc} is present. +%\changes{1.42}{2020-02-03}{new} +%\changes{1.49}{2022-10-14}{add upper case bookmark} % \begin{macrocode} - \renewcommand*{\GlsXtrPostNewAbbreviation}{% - \glshasattribute{\the\glslabeltok}{regular}% - {% - \glssetattribute{\the\glslabeltok}{regular}{false}% - }% - {}% - }% -}% -{% +\ExplSyntaxOn +\newcommand*{\GLSfmtfullpl}[1]{% + \glstexorpdfstring + {\GLSxtrtitlefullpl{#1}}% + {\text_uppercase:n{\glspdffmtfullpl{#1}{}}}% +} +\ExplSyntaxOff +\glsmfublocker{\GLSfmtfullpl} % \end{macrocode} -% Use smallcaps and adjust the plural suffix to revert to upright. -%\changes{1.42}{2020-02-03}{moved \cs{protect} inside \cs{glsxtrscsuffix}} +%\end{macro} +% +%\subsection{Prefixes} +%Provide support for \sty{glossaries-prefix}. +% +%\begin{macro}{\pglsprefix} +%\changes{1.49}{2022-10-14}{new} +%\begin{definition} +%\cs{pglsprefix}\marg{entry-label}\marg{prefix-field} +%\end{definition} +%A shortcut way of inserting the prefix and separator if they are +%required. If this needs to be redefined, use \cs{ifglsfieldvoid} +%for an expandable test. % \begin{macrocode} - \renewcommand*{\abbrvpluralsuffix}{\glsxtrscsuffix}% - \renewcommand*\glsabbrvfont[1]{\glsabbrvscfont{##1}}% - \renewcommand*\glsfirstabbrvfont[1]{\glsfirstabbrvscfont{##1}}% - \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% - \renewcommand*{\glslongfont}[1]{\glslongdefaultfont{##1}}% +\newcommand{\pglsprefix}[2]{% + \ifcsempty{glo@\glsdetoklabel{#1}@#2}{}% + {\csuse{glo@\glsdetoklabel{#1}@#2}\glsprefixsep}% +} % \end{macrocode} -% The first use full form and the inline full form are the same for -% this style. +%\end{macro} +% +%\begin{macro}{\Pglsprefix} +%\changes{1.49}{2022-10-14}{new} +%\begin{definition} +%\cs{Pglsprefix}\marg{entry-label}\marg{prefix-field} +%\end{definition} +%Similar to \cs{pglsprefix} but sentence case. The conditional is +%omitted as it will have to already be checked. % \begin{macrocode} - \renewcommand*{\glsxtrfullformat}[2]{% - \glsfirstabbrvscfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - \glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstlongdefaultfont{\glsaccesslong{##1}}}% - }% - \renewcommand*{\glsxtrfullplformat}[2]{% - \glsfirstabbrvscfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - \glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstlongdefaultfont{\glsaccesslongpl{##1}}}% - }% - \renewcommand*{\Glsxtrfullformat}[2]{% - \glsfirstabbrvscfont{\Glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstlongdefaultfont{\glsaccesslong{##1}}}% - }% - \renewcommand*{\Glsxtrfullplformat}[2]{% - \glsfirstabbrvscfont{\Glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstlongdefaultfont{\glsaccesslongpl{##1}}}% - }% +\newcommand{\Pglsprefix}[2]{% + \Glsxtrusefield{#1}{#2}\glsprefixsep } % \end{macrocode} -%\end{abbrvstyle} +%\end{macro} % -%\begin{abbrvstyle}{short-sc-long-desc} -% As before but user provides description +%\begin{macro}{\PGLSprefix} +%\changes{1.49}{2022-10-14}{new} +%\begin{definition} +%\cs{PGLSprefix}\marg{entry-label}\marg{prefix-field} +%\end{definition} +%As \cs{pglsprefix} but all caps. % \begin{macrocode} -\newabbreviationstyle{short-sc-long-desc}% -{% +\newcommand{\PGLSprefix}[2]{% + \ifcsempty{glo@\glsdetoklabel{#1}@#2}{}% + {\glsuppercase{\csuse{glo@\glsdetoklabel{#1}@#2}\glsprefixsep}}% +} % \end{macrocode} -% Set accessibility attributes if enabled. +%\end{macro} +% +%Abbreviations. Short form uses prefix and prefixplural fields. +%\begin{macro}{\pglsxtrshort} +%\changes{1.49}{2022-10-14}{new} +%No case-change. % \begin{macrocode} - \glsxtrAccSuppAbbrSetTextShortAttrs\glscategorylabel +\newrobustcmd*{\pglsxtrshort}{\@gls@hyp@opt\ns@pglsxtrshort} +\newcommand*{\ns@pglsxtrshort}[2][]{% + \new@ifnextchar[{\@pglsxtrshort{#1}{#2}}{\@pglsxtrshort{#1}{#2}[]}% +} +\def\@pglsxtrshort#1#2[#3]{% + \pglsprefix{#2}{prefix}% + \@glsxtrshort{#1}{#2}[#3]% +} % \end{macrocode} -% Setup the default fields. +%\end{macro} +% +%\begin{macro}{\Pglsxtrshort} +%\changes{1.49}{2022-10-14}{new} +%Sentence case. % \begin{macrocode} - \renewcommand*{\CustomAbbreviationFields}{% - name={\glsxtrshortlongdescname}, - sort={\glsxtrshortlongdescsort}, - first={\protect\glsfirstabbrvscfont{\the\glsshorttok}% - \protect\glsxtrfullsep{\the\glslabeltok}% - \glsxtrparen{\protect\glsfirstlongdefaultfont{\the\glslongtok}}},% - firstplural={\protect\glsfirstabbrvscfont{\the\glsshortpltok}% - \protect\glsxtrfullsep{\the\glslabeltok}% - \glsxtrparen{\protect\glsfirstlongdefaultfont{\the\glslongpltok}}},% - text={\protect\glsabbrvscfont{\the\glsshorttok}},% - plural={\protect\glsabbrvscfont{\the\glsshortpltok}}% +\newrobustcmd*{\Pglsxtrshort}{\@gls@hyp@opt\ns@Pglsxtrshort} +\newcommand*{\ns@Pglsxtrshort}[2][]{% + \new@ifnextchar[{\@Pglsxtrshort{#1}{#2}}{\@Pglsxtrshort{#1}{#2}[]}% +} +\def\@Pglsxtrshort#1#2[#3]{% + \ifglshasprefix{#2}% + {% + \Pglsprefix{#2}{prefix}% + \@glsxtrshort{#1}{#2}[#3]% }% + {\@Glsxtrshort{#1}{#2}[#3]}% +} +\glsmfuaddmap{\pglsxtrshort}{\Pglsxtrshort} % \end{macrocode} -% Unset the \catattr{regular} attribute if it has been set. +%\end{macro} +% +%\begin{macro}{\PGLSxtrshort} +%\changes{1.49}{2022-10-14}{new} +%All-caps is also fairly simple. % \begin{macrocode} - \renewcommand*{\GlsXtrPostNewAbbreviation}{% - \glshasattribute{\the\glslabeltok}{regular}% - {% - \glssetattribute{\the\glslabeltok}{regular}{false}% - }% - {}% +\newrobustcmd*{\PGLSxtrshort}{\@gls@hyp@opt\ns@PGLSxtrshort} +\newcommand*{\ns@PGLSxtrshort}[2][]{% + \new@ifnextchar[{\@PGLSxtrshort{#1}{#2}}{\@PGLSxtrshort{#1}{#2}[]}% +} +\def\@PGLSxtrshort#1#2[#3]{% + \PGLSprefix{#2}{prefix}% + \@GLSxtrshort{#1}{#2}[#3]% +} +\glsmfublocker{\PGLSxtrshort} +% \end{macrocode} +%\end{macro} +% +%Short plural. +%\begin{macro}{\pglsxtrshortpl} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newrobustcmd*{\pglsxtrshortpl}{\@gls@hyp@opt\ns@pglsxtrshortpl} +\newcommand*{\ns@pglsxtrshortpl}[2][]{% + \new@ifnextchar[{\@pglsxtrshortpl{#1}{#2}}{\@pglsxtrshortpl{#1}{#2}[]}% +} +\def\@pglsxtrshortpl#1#2[#3]{% + \pglsprefix{#2}{prefixplural}% + \@glsxtrshortpl{#1}{#2}[#3]% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\Pglsxtrshortpl} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newrobustcmd*{\Pglsxtrshortpl}{\@gls@hyp@opt\ns@Pglsxtrshortpl} +\newcommand*{\ns@Pglsxtrshortpl}[2][]{% + \new@ifnextchar[{\@Pglsxtrshortpl{#1}{#2}}{\@Pglsxtrshortpl{#1}{#2}[]}% +} +\def\@Pglsxtrshortpl#1#2[#3]{% + \ifglshasprefixplural{#2}% + {% + \Pglsprefix{#2}{prefixplural}% + \@glsxtrshortpl{#1}{#2}[#3]% }% -}% -{% + {\@Glsxtrshortpl{#1}{#2}[#3]}% +} +\glsmfuaddmap{\pglsxtrshortpl}{\Pglsxtrshortpl} % \end{macrocode} -% As short-sc-long style: +%\end{macro} +% +%\begin{macro}{\PGLSxtrshortpl} +%\changes{1.49}{2022-10-14}{new} +%All-caps is also fairly simple. % \begin{macrocode} - \GlsXtrUseAbbrStyleFmts{short-sc-long}% +\newrobustcmd*{\PGLSxtrshortpl}{\@gls@hyp@opt\ns@PGLSxtrshortpl} +\newcommand*{\ns@PGLSxtrshortpl}[2][]{% + \new@ifnextchar[{\@PGLSxtrshortpl{#1}{#2}}{\@PGLSxtrshortpl{#1}{#2}[]}% +} +\def\@PGLSxtrshortpl#1#2[#3]{% + \PGLSprefix{#2}{prefixplural}% + \@GLSxtrshortpl{#1}{#2}[#3]% } +\glsmfublocker{\PGLSxtrshortpl} % \end{macrocode} -%\end{abbrvstyle} +%\end{macro} % -%\begin{abbrvstyle}{short-sc} +%Long form uses prefixfirst and prefixfirstplural fields. +%\begin{macro}{\pglsxtrlong} +%\changes{1.49}{2022-10-14}{new} +%No case-change. % \begin{macrocode} -\newabbreviationstyle{short-sc}% -{% +\newrobustcmd*{\pglsxtrlong}{\@gls@hyp@opt\ns@pglsxtrlong} +\newcommand*{\ns@pglsxtrlong}[2][]{% + \new@ifnextchar[{\@pglsxtrlong{#1}{#2}}{\@pglsxtrlong{#1}{#2}[]}% +} +\def\@pglsxtrlong#1#2[#3]{% + \pglsprefix{#2}{prefixfirst}% + \@glsxtrlong{#1}{#2}[#3]% +} % \end{macrocode} -% Set accessibility attributes if enabled. +%\end{macro} +% +%\begin{macro}{\Pglsxtrlong} +%\changes{1.49}{2022-10-14}{new} +%Sentence case. % \begin{macrocode} - \glsxtrAccSuppAbbrSetNoLongAttrs\glscategorylabel +\newrobustcmd*{\Pglsxtrlong}{\@gls@hyp@opt\ns@Pglsxtrlong} +\newcommand*{\ns@Pglsxtrlong}[2][]{% + \new@ifnextchar[{\@Pglsxtrlong{#1}{#2}}{\@Pglsxtrlong{#1}{#2}[]}% +} +\def\@Pglsxtrlong#1#2[#3]{% + \ifglshasprefixfirst{#2}% + {% + \Pglsprefix{#2}{prefixfirst}% + \@glsxtrlong{#1}{#2}[#3]% + }% + {\@Glsxtrlong{#1}{#2}[#3]}% +} +\glsmfuaddmap{\pglsxtrlong}{\Pglsxtrlong} % \end{macrocode} -% Setup the default fields. +%\end{macro} +% +%\begin{macro}{\PGLSxtrlong} +%\changes{1.49}{2022-10-14}{new} +%All-caps is also fairly simple. % \begin{macrocode} - \renewcommand*{\CustomAbbreviationFields}{% - name={\glsxtrshortnolongname}, - sort={\the\glsshorttok}, - first={\protect\glsfirstabbrvscfont{\the\glsshorttok}}, - firstplural={\protect\glsfirstabbrvscfont{\the\glsshortpltok}}, - text={\protect\glsabbrvscfont{\the\glsshorttok}}, - plural={\protect\glsabbrvscfont{\the\glsshortpltok}}, - description={\the\glslongtok}}% - \renewcommand*{\GlsXtrPostNewAbbreviation}{% - \glssetattribute{\the\glslabeltok}{regular}{true}}% -}% -{% +\newrobustcmd*{\PGLSxtrlong}{\@gls@hyp@opt\ns@PGLSxtrlong} +\newcommand*{\ns@PGLSxtrlong}[2][]{% + \new@ifnextchar[{\@PGLSxtrlong{#1}{#2}}{\@PGLSxtrlong{#1}{#2}[]}% +} +\def\@PGLSxtrlong#1#2[#3]{% + \PGLSprefix{#2}{prefixfirst}% + \@GLSxtrlong{#1}{#2}[#3]% +} +\glsmfublocker{\PGLSxtrlong} % \end{macrocode} -% Use smallcaps and adjust the plural suffix to revert to upright. -%\changes{1.42}{2020-02-03}{moved \cs{protect} inside \cs{glsxtrscsuffix}} +%\end{macro} +% +%Long plural. +%\begin{macro}{\pglsxtrlongpl} +%\changes{1.49}{2022-10-14}{new} % \begin{macrocode} - \renewcommand*{\abbrvpluralsuffix}{\glsxtrscsuffix}% - \renewcommand*\glsabbrvfont[1]{\glsabbrvscfont{##1}}% - \renewcommand*\glsfirstabbrvfont[1]{\glsfirstabbrvscfont{##1}}% - \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% - \renewcommand*{\glslongfont}[1]{\glslongdefaultfont{##1}}% +\newrobustcmd*{\pglsxtrlongpl}{\@gls@hyp@opt\ns@pglsxtrlongpl} +\newcommand*{\ns@pglsxtrlongpl}[2][]{% + \new@ifnextchar[{\@pglsxtrlongpl{#1}{#2}}{\@pglsxtrlongpl{#1}{#2}[]}% +} +\def\@pglsxtrlongpl#1#2[#3]{% + \pglsprefix{#2}{prefixfirstplural}% + \@glsxtrlongpl{#1}{#2}[#3]% +} % \end{macrocode} -% The inline full form displays the short form followed by the -% long form in parentheses. +%\end{macro} +% +%\begin{macro}{\Pglsxtrlongpl} +%\changes{1.49}{2022-10-14}{new} % \begin{macrocode} - \renewcommand*{\glsxtrinlinefullformat}[2]{% - \protect\glsfirstabbrvscfont{\glsaccessshort{##1}% - \ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstlongdefaultfont{\glsaccesslong{##1}}}% - }% - \renewcommand*{\glsxtrinlinefullplformat}[2]{% - \protect\glsfirstabbrvscfont{\glsaccessshortpl{##1}% - \ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstlongdefaultfont{\glsaccesslongpl{##1}}}% +\newrobustcmd*{\Pglsxtrlongpl}{\@gls@hyp@opt\ns@Pglsxtrlongpl} +\newcommand*{\ns@Pglsxtrlongpl}[2][]{% + \new@ifnextchar[{\@Pglsxtrlongpl{#1}{#2}}{\@Pglsxtrlongpl{#1}{#2}[]}% +} +\def\@Pglsxtrlongpl#1#2[#3]{% + \ifglshasprefixfirstplural{#2}% + {% + \Pglsprefix{#2}{prefixfirstplural}% + \@glsxtrlongpl{#1}{#2}[#3]% }% + {\@Glsxtrlongpl{#1}{#2}[#3]}% +} +\glsmfuaddmap{\pglsxtrlongpl}{\Pglsxtrlongpl} % \end{macrocode} -%\changes{1.21}{2017-11-03}{corrected first letter uppercasing} +%\end{macro} +% +%\begin{macro}{\PGLSxtrlongpl} +%\changes{1.49}{2022-10-14}{new} +%All-caps is also fairly simple. % \begin{macrocode} - \renewcommand*{\Glsxtrinlinefullformat}[2]{% - \protect\glsfirstabbrvscfont{\Glsaccessshort{##1}% - \ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstlongdefaultfont{\glsaccesslong{##1}}}% - }% - \renewcommand*{\Glsxtrinlinefullplformat}[2]{% - \protect\glsfirstabbrvscfont{\Glsaccessshortpl{##1}% - \ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstlongdefaultfont{\glsaccesslongpl{##1}}}% - }% +\newrobustcmd*{\PGLSxtrlongpl}{\@gls@hyp@opt\ns@PGLSxtrlongpl} +\newcommand*{\ns@PGLSxtrlongpl}[2][]{% + \new@ifnextchar[{\@PGLSxtrlongpl{#1}{#2}}{\@PGLSxtrlongpl{#1}{#2}[]}% +} +\def\@PGLSxtrlongpl#1#2[#3]{% + \PGLSprefix{#2}{prefixfirstplural}% + \@GLSxtrlongpl{#1}{#2}[#3]% +} +\glsmfublocker{\PGLSxtrlongpl} % \end{macrocode} -% The first use full form only displays the short form, but it -% typically won't be used as the \catattr{regular} attribute is set by this style. +%\end{macro} +% +%Title commands (analogous to \cs{glsfmtshort} etc). +%\begin{macro}{\pglsfmtshort} +%\changes{1.49}{2022-10-14}{new} % \begin{macrocode} - \renewcommand*{\glsxtrfullformat}[2]{% - \glsfirstabbrvscfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - }% - \renewcommand*{\glsxtrfullplformat}[2]{% - \glsfirstabbrvscfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - }% - \renewcommand*{\Glsxtrfullformat}[2]{% - \glsfirstabbrvscfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - }% - \renewcommand*{\Glsxtrfullplformat}[2]{% - \glsfirstabbrvscfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi +\newcommand*{\pglsfmtshort}[1]{% + \pglsprefix{#1}{prefix}% + \glsfmtshort{#1}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\Pglsfmtshort} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand*{\Pglsfmtshort}[1]{% + \glstexorpdfstring + {\Pglsxtrtitleshort{#1}}% + {\MFUsentencecase{% + \pglsprefix{#1}{prefix}% + \glsentryshort{#1}}% }% } +\glsmfuaddmap{\pglsfmtshort}{\Pglsfmtshort} % \end{macrocode} -%\end{abbrvstyle} +%\end{macro} % -%\begin{abbrvstyle}{short-sc-nolong} -%\changes{1.04}{2016-05-02}{new} +%\begin{macro}{\Pglsxtrtitleshort} +%\changes{1.49}{2022-10-14}{new} % \begin{macrocode} -\letabbreviationstyle{short-sc-nolong}{short-sc} +\newrobustcmd*{\Pglsxtrtitleshort}[1]{% + \glsxtr@title@field\Pglsxtrshort{#1}% +} % \end{macrocode} -%\end{abbrvstyle} +%\end{macro} % -%\begin{abbrvstyle}{short-sc-desc} -%\changes{1.39}{2019-03-22}{bug fix: omit \gloskey{description} key as advertised in the -%manual} +%\begin{macro}{\PGLSfmtshort} +%\changes{1.49}{2022-10-14}{new} % \begin{macrocode} -\newabbreviationstyle{short-sc-desc}% -{% +\newcommand*{\PGLSfmtshort}[1]{% + \PGLSprefix{#1}{prefix}% + \GLSfmtshort{#1}% +} +\glsmfublocker{\PGLSfmtshort} % \end{macrocode} -% Set accessibility attributes if enabled. +%\end{macro} +% +%\begin{macro}{\pglsfmtshortpl} +%\changes{1.49}{2022-10-14}{new} % \begin{macrocode} - \glsxtrAccSuppAbbrSetNameLongAttrs\glscategorylabel +\newcommand*{\pglsfmtshortpl}[1]{% + \pglsprefix{#1}{prefixplural}% + \glsfmtshortpl{#1}% +} % \end{macrocode} -% Setup the default fields. +%\end{macro} +% +%\begin{macro}{\Pglsfmtshortpl} +%\changes{1.49}{2022-10-14}{new} % \begin{macrocode} - \renewcommand*{\CustomAbbreviationFields}{% - name={\glsxtrshortdescname}, - sort={\the\glsshorttok}, - first={\protect\glsfirstabbrvscfont{\the\glsshorttok}}, - firstplural={\protect\glsfirstabbrvscfont{\the\glsshortpltok}}, - text={\protect\glsabbrvscfont{\the\glsshorttok}}, - plural={\protect\glsabbrvscfont{\the\glsshortpltok}}}% - \renewcommand*{\GlsXtrPostNewAbbreviation}{% - \glssetattribute{\the\glslabeltok}{regular}{true}}% -}% -{% -% \end{macrocode} -% Use smallcaps and adjust the plural suffix to revert to upright. -%\changes{1.42}{2020-02-03}{moved \cs{protect} inside \cs{glsxtrscsuffix}} -% \begin{macrocode} - \renewcommand*{\abbrvpluralsuffix}{\glsxtrscsuffix}% - \renewcommand*\glsabbrvfont[1]{\glsabbrvscfont{##1}}% - \renewcommand*\glsfirstabbrvfont[1]{\glsfirstabbrvscfont{##1}}% - \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% - \renewcommand*{\glslongfont}[1]{\glslongdefaultfont{##1}}% -% \end{macrocode} -% The inline full form displays the short format followed by the -% long form in parentheses. -% \begin{macrocode} - \renewcommand*{\glsxtrinlinefullformat}[2]{% - \glsfirstabbrvscfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstlongdefaultfont{\glsaccesslong{##1}}}% - }% - \renewcommand*{\glsxtrinlinefullplformat}[2]{% - \glsfirstabbrvscfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstlongdefaultfont{\glsaccesslongpl{##1}}}% - }% - \renewcommand*{\Glsxtrinlinefullformat}[2]{% - \glsfirstabbrvscfont{\Glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstlongdefaultfont{\glsaccesslong{##1}}}% - }% - \renewcommand*{\Glsxtrinlinefullplformat}[2]{% - \glsfirstabbrvscfont{\Glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstlongdefaultfont{\glsaccesslongpl{##1}}}% +\newcommand*{\Pglsfmtshortpl}[1]{% + \glstexorpdfstring + {\Pglsxtrtitleshortpl{#1}}% + {\MFUsentencecase + {% + \pglsprefix{#1}{prefixplural}% + \glsentryshortpl{#1}% + }% }% +} +\glsmfuaddmap{\pglsfmtshortpl}{\Pglsfmtshortpl} % \end{macrocode} -% The first use full form only displays the short form, but it -% typically won't be used as the \catattr{regular} attribute is set by this style. +%\end{macro} +% +%\begin{macro}{\Pglsxtrtitleshortpl} +%\changes{1.49}{2022-10-14}{new} % \begin{macrocode} - \renewcommand*{\glsxtrfullformat}[2]{% - \glsfirstabbrvscfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - }% - \renewcommand*{\glsxtrfullplformat}[2]{% - \glsfirstabbrvscfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - }% - \renewcommand*{\Glsxtrfullformat}[2]{% - \glsfirstabbrvscfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - }% - \renewcommand*{\Glsxtrfullplformat}[2]{% - \glsfirstabbrvscfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - }% +\newrobustcmd*{\Pglsxtrtitleshortpl}[1]{% + \glsxtr@title@field\Pglsxtrshortpl{#1}% } % \end{macrocode} -%\end{abbrvstyle} -%\begin{abbrvstyle}{short-sc-nolong-desc} -%\changes{1.04}{2016-05-02}{new} +%\end{macro} +% +%\begin{macro}{\PGLSfmtshortpl} +%\changes{1.49}{2022-10-14}{new} % \begin{macrocode} -\letabbreviationstyle{short-sc-nolong-desc}{short-sc-desc} +\newcommand*{\PGLSfmtshortpl}[1]{% + \PGLSprefix{#1}{prefixplural}% + \GLSfmtshortpl{#1}% +} +\glsmfublocker{\PGLSfmtshortpl} % \end{macrocode} -%\end{abbrvstyle} +%\end{macro} % -%\begin{abbrvstyle}{nolong-short-sc} -%\changes{1.21}{2017-11-03}{new} +%\begin{macro}{\pglsfmtlong} +%\changes{1.49}{2022-10-14}{new} % \begin{macrocode} -\newabbreviationstyle{nolong-short-sc}% -{% - \GlsXtrUseAbbrStyleSetup{short-sc-nolong}% -}% -{% - \GlsXtrUseAbbrStyleFmts{short-sc-nolong}% +\newcommand*{\pglsfmtlong}[1]{% + \pglsprefix{#1}{prefixfirst}% + \glsfmtlong{#1}% +} % \end{macrocode} -% The inline full form displays the long form followed by the -% short form in parentheses. +%\end{macro} +% +%\begin{macro}{\Pglsfmtlong} +%\changes{1.49}{2022-10-14}{new} % \begin{macrocode} - \renewcommand*{\glsxtrinlinefullformat}[2]{% - \protect\glsfirstlongdefaultfont{\glsaccesslong{##1}% - \ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstabbrvscfont{\glsaccessshort{##1}}}% - }% - \renewcommand*{\glsxtrinlinefullplformat}[2]{% - \protect\glsfirstlongdefaultfont{\glsaccesslongpl{##1}% - \ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstabbrvscfont{\glsaccessshortpl{##1}}}% - }% - \renewcommand*{\Glsxtrinlinefullformat}[2]{% - \protect\glsfirstlongdefaultfont{\Glsaccesslong{##1}% - \ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstabbrvscfont{\glsaccessshort{##1}}}% - }% - \renewcommand*{\Glsxtrinlinefullplformat}[2]{% - \protect\glsfirstlongdefaultfont{\Glsaccesslongpl{##1}% - \ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstabbrvscfont{\glsaccessshortpl{##1}}}% +\newcommand*{\Pglsfmtlong}[1]{% + \glstexorpdfstring + {\Pglsxtrtitlelong{#1}}% + {\MFUsentencecase{% + \pglsprefix{#1}{prefixfirst}% + \glsentrylong{#1}}% }% } +\glsmfuaddmap{\pglsfmtlong}{\Pglsfmtlong} % \end{macrocode} -%\end{abbrvstyle} +%\end{macro} % -%\begin{abbrvstyle}{long-noshort-sc} -%\changes{1.04}{2016-05-02}{renamed from \qt{long-sc}} -% The smallcaps font will only be used if -% the short form is explicitly invoked through commands like -% \cs{glsxtrshort}. No accessibility attributes needed here. +%\begin{macro}{\Pglsxtrtitlelong} +%\changes{1.49}{2022-10-14}{new} % \begin{macrocode} -\newabbreviationstyle{long-noshort-sc}% -{% - \renewcommand*{\CustomAbbreviationFields}{% - name={\glsxtrlongnoshortname}, - sort={\the\glsshorttok}, - first={\protect\glsfirstlongdefaultfont{\the\glslongtok}}, - firstplural={\protect\glsfirstlongdefaultfont{\the\glslongpltok}}, - text={\protect\glslongdefaultfont{\the\glslongtok}}, - plural={\protect\glslongdefaultfont{\the\glslongpltok}},% - description={\the\glslongtok}% - }% - \renewcommand*{\GlsXtrPostNewAbbreviation}{% - \glssetattribute{\the\glslabeltok}{regular}{true}}% -}% -{% +\newrobustcmd*{\Pglsxtrtitlelong}[1]{% + \glsxtr@title@field\Pglsxtrlong{#1}% +} % \end{macrocode} -% Use smallcaps and adjust the plural suffix to revert to upright. -%\changes{1.42}{2020-02-03}{moved \cs{protect} inside \cs{glsxtrscsuffix}} +%\end{macro} +% +%\begin{macro}{\PGLSfmtlong} +%\changes{1.49}{2022-10-14}{new} % \begin{macrocode} - \renewcommand*{\abbrvpluralsuffix}{\glsxtrscsuffix}% - \renewcommand*\glsabbrvfont[1]{\glsabbrvscfont{##1}}% - \renewcommand*\glsfirstabbrvfont[1]{\glsfirstabbrvscfont{##1}}% - \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% - \renewcommand*{\glslongfont}[1]{\glslongdefaultfont{##1}}% +\newcommand*{\PGLSfmtlong}[1]{% + \PGLSprefix{#1}{prefixfirst}% + \GLSfmtlong{#1}% +} +\glsmfublocker{\PGLSfmtlong} % \end{macrocode} -% The format for subsequent use (not used when the regular attribute -% is set). +%\end{macro} +% +%\begin{macro}{\pglsfmtlongpl} +%\changes{1.49}{2022-10-14}{new} % \begin{macrocode} - \renewcommand*{\glsxtrsubsequentfmt}[2]{% - \glslongdefaultfont{\glsaccesslong{##1}\ifglsxtrinsertinside ##2\fi}% - \ifglsxtrinsertinside \else##2\fi - }% - \renewcommand*{\glsxtrsubsequentplfmt}[2]{% - \glslongdefaultfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside ##2\fi}% - \ifglsxtrinsertinside \else##2\fi - }% - \renewcommand*{\Glsxtrsubsequentfmt}[2]{% - \glslongdefaultfont{\Glsaccesslong{##1}\ifglsxtrinsertinside ##2\fi}% - \ifglsxtrinsertinside \else##2\fi - }% - \renewcommand*{\Glsxtrsubsequentplfmt}[2]{% - \glslongdefaultfont{\Glsaccesslongpl{##1}\ifglsxtrinsertinside ##2\fi}% - \ifglsxtrinsertinside \else##2\fi - }% +\newcommand*{\pglsfmtlongpl}[1]{% + \pglsprefix{#1}{prefixfirstplural}% + \glsfmtlongpl{#1}% +} % \end{macrocode} -% The inline full form displays the long format followed by the -% short form in parentheses. +%\end{macro} +% +%\begin{macro}{\Pglsfmtlongpl} +%\changes{1.49}{2022-10-14}{new} % \begin{macrocode} - \renewcommand*{\glsxtrinlinefullformat}[2]{% - \glsfirstlongdefaultfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\protect\glsfirstabbrvscfont{\glsaccessshort{##1}}}% - }% - \renewcommand*{\glsxtrinlinefullplformat}[2]{% - \glsfirstlongdefaultfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\protect\glsfirstabbrvscfont{\glsaccessshortpl{##1}}}% - }% - \renewcommand*{\Glsxtrinlinefullformat}[2]{% - \glsfirstlongdefaultfont{\Glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\protect\glsfirstabbrvscfont{\glsaccessshort{##1}}}% - }% - \renewcommand*{\Glsxtrinlinefullplformat}[2]{% - \glsfirstlongdefaultfont{\Glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\protect\glsfirstabbrvscfont{\glsaccessshortpl{##1}}}% +\newcommand*{\Pglsfmtlongpl}[1]{% + \glstexorpdfstring + {\Pglsxtrtitlelongpl{#1}}% + {\MFUsentencecase + {% + \pglsprefix{#1}{prefixfirstplural}% + \glsentrylongpl{#1}% + }% }% +} +\glsmfuaddmap{\pglsfmtlongpl}{\Pglsfmtlongpl} % \end{macrocode} -% The first use full form only displays the long form, but it -% typically won't be used as the \catattr{regular} attribute is set by this style. +%\end{macro} +% +%\begin{macro}{\Pglsxtrtitlelongpl} +%\changes{1.49}{2022-10-14}{new} % \begin{macrocode} - \renewcommand*{\glsxtrfullformat}[2]{% - \glsfirstlongdefaultfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - }% - \renewcommand*{\glsxtrfullplformat}[2]{% - \glsfirstlongdefaultfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - }% - \renewcommand*{\Glsxtrfullformat}[2]{% - \glsfirstlongdefaultfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - }% - \renewcommand*{\Glsxtrfullplformat}[2]{% - \glsfirstlongdefaultfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - }% +\newrobustcmd*{\Pglsxtrtitlelongpl}[1]{% + \glsxtr@title@field\Pglsxtrlongpl{#1}% } % \end{macrocode} -%\end{abbrvstyle} -%\begin{abbrvstyle}{long-sc} -%Backward compatibility: +%\end{macro} +% +%\begin{macro}{\PGLSfmtlongpl} +%\changes{1.49}{2022-10-14}{new} % \begin{macrocode} -\@glsxtr@deprecated@abbrstyle{long-sc}{long-noshort-sc} +\newcommand*{\PGLSfmtlongpl}[1]{% + \PGLSprefix{#1}{prefixfirstplural}% + \GLSfmtlongpl{#1}% +} +\glsmfublocker{\PGLSfmtlongpl} % \end{macrocode} -%\end{abbrvstyle} +%\end{macro} % -%\begin{abbrvstyle}{long-noshort-sc-desc} -%\changes{1.04}{2016-05-02}{renamed from \qt{long-desc-sc}} -% The smallcaps font will only be used if -% the short form is explicitly invoked through commands like -% \cs{glsshort}. +%\subsection{Multi (Combined/Compound) Entries} +%(I'd rather call these combined or compound entries but \cs{cgls} is +%already taken.) +% +%New to version 1.48, the commands here provide a way of referencing +%multiple entries as a single unit. For example, biological +%organisms are often referred to by their genus and species, such as +%\emph{Clostridium botulinum} and \emph{Clostridium perfringens} +%(where the genus is Clostridium). The genus is often abbreviated +%after first use, regardless of which species in the genus is being +%referenced. For example, \qt{\emph{Clostridium botulinum} and +%\emph{C. perfringens}}. This can't be supported by any abbreviation +%styles unless the genus and species names are defined separately. +%For example: +%\begin{verbatim} +%\setabbreviationstyle{long-only-short-only} +%\newabbreviation{clostridium}{C.}{Clostridium} +%\newglossaryentry{botulinum}{name={botulinum},description={}} +%\newglossaryentry{perfringens}{name={perfringens},description={}} +%\end{verbatim} +%This means that the entries then need to be referenced using a +%rather cumbersome method: +%\begin{verbatim} +%\gls{clostridium} \gls{botulinum} and \gls{clostridum} +%\gls{perfringens} +%\end{verbatim} +%This section provides a command that will provide a way of defining +%a label that represents a combination of entries (which must all be +%first defined). For example: +%\begin{verbatim} +%\multiglossaryentry{cbot}{clostridium,botulinum} +%\end{verbatim} +%This label can then be referenced using \cs{mgls}, which internally +%uses \cs{gls} for each component. The last component in the list is +%considered the \qt{main} component (not to be confused with the +%main glossary). If this isn't the case, the label of the main +%component should be added in the optional argument before the label +%list. Note that the multi-label (\texttt{cbot} in this case) can't be +%referenced using commands like \cs{gls}. +% +%First define the general set of options that should be applied to +%all multi-entries. These can be set with: +%\begin{macro}{\multiglossaryentrysetup} +%\changes{1.48}{2021-11-22}{new} % \begin{macrocode} -\newabbreviationstyle{long-noshort-sc-desc}% -{% - \GlsXtrUseAbbrStyleSetup{long-noshort-desc}% -}% -{% +\newcommand*{\multiglossaryentrysetup}[1]{\setkeys{glsxtrcombined}{#1}} % \end{macrocode} -% Use smallcaps and adjust the plural suffix to revert to upright. -%\changes{1.42}{2020-02-03}{moved \cs{protect} inside \cs{glsxtrscsuffix}} +%\end{macro} +%\begin{macro}{\@gls@combined@indexmain} +%\changes{1.48}{2021-11-22}{new} +%Numeric value: 0=false (don't index main component), 1=true (always +%index main component), 2=first (only index main component on first +%use). Default: 1 (true); % \begin{macrocode} - \renewcommand*{\abbrvpluralsuffix}{\glsxtrscsuffix}% - \renewcommand*\glsabbrvfont[1]{\glsabbrvscfont{##1}}% - \renewcommand*\glsfirstabbrvfont[1]{\glsfirstabbrvscfont{##1}}% - \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% - \renewcommand*{\glslongfont}[1]{\glslongdefaultfont{##1}}% +\newcommand*{\@gls@combined@indexmain}{1} +\define@choicekey{glsxtrcombined}{indexmain}% + [\@gls@combined@indexmain@val\@gls@combined@indexmain] + {false,true,first}[true]{} % \end{macrocode} -% The format for subsequent use (not used when the regular attribute -% is set). +%\end{macro} +%\begin{macro}{\@gls@combined@indexothers} +%\changes{1.48}{2021-11-22}{new} +%Numeric value: 0=false (don't index other components), 1=true (always +%index other components), 2=first (only index other components on first +%use). Default: 2 (first); % \begin{macrocode} - \renewcommand*{\glsxtrsubsequentfmt}[2]{% - \glslongdefaultfont{\glsaccesslong{##1}\ifglsxtrinsertinside ##2\fi}% - \ifglsxtrinsertinside \else##2\fi - }% - \renewcommand*{\glsxtrsubsequentplfmt}[2]{% - \glslongdefaultfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside ##2\fi}% - \ifglsxtrinsertinside \else##2\fi - }% - \renewcommand*{\Glsxtrsubsequentfmt}[2]{% - \glslongdefaultfont{\Glsaccesslong{##1}\ifglsxtrinsertinside ##2\fi}% - \ifglsxtrinsertinside \else##2\fi - }% - \renewcommand*{\Glsxtrsubsequentplfmt}[2]{% - \glslongdefaultfont{\Glsaccesslongpl{##1}\ifglsxtrinsertinside ##2\fi}% - \ifglsxtrinsertinside \else##2\fi - }% +\newcommand*{\@gls@combined@indexothers}{2} +\define@choicekey{glsxtrcombined}{indexothers}% + [\@gls@combined@indexothers@val\@gls@combined@indexothers] + {false,true,first}[true]{} % \end{macrocode} -% The inline full form displays the long format followed by the -% short form in parentheses. +%\end{macro} +%\begin{macro}{\@gls@combined@hyper} +%\changes{1.48}{2021-11-22}{new} +%Numeric value: 0=none (\cs{mgls} doesn't create a hyperlink), +% 1=allmain (all content hyperlinks to the main component), +% 2=mainonly (only the main component has a hyperlink), +% 3=individual (each component has a hyperlink to their own target). +% Default: 3. % \begin{macrocode} - \renewcommand*{\glsxtrinlinefullformat}[2]{% - \glsfirstlongdefaultfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\protect\glsfirstabbrvscfont{\glsaccessshort{##1}}}% - }% - \renewcommand*{\glsxtrinlinefullplformat}[2]{% - \glsfirstlongdefaultfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\protect\glsfirstabbrvscfont{\glsaccessshortpl{##1}}}% - }% - \renewcommand*{\Glsxtrinlinefullformat}[2]{% - \glsfirstlongdefaultfont{\Glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\protect\glsfirstabbrvscfont{\glsaccessshort{##1}}}% - }% - \renewcommand*{\Glsxtrinlinefullplformat}[2]{% - \glsfirstlongdefaultfont{\Glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\protect\glsfirstabbrvscfont{\glsaccessshortpl{##1}}}% - }% +\newcommand*{\@gls@combined@hyper}{3} +\define@choicekey{glsxtrcombined}{hyper}% + [\@gls@combined@hyper@val\@gls@combined@hyper] + {none,allmain,mainonly,individual,otheronly,notmainfirst,nototherfirst,notfirst}{} % \end{macrocode} -% The first use full form only displays the long form, but it -% typically won't be used as the \catattr{regular} attribute is set by this style. +%\end{macro} +% +%\begin{macro}{\@gls@combined@encapmain} +%\changes{1.48}{2021-11-22}{new} +%Location encap value for main component (corresponding to format key in \cs{gls}). % \begin{macrocode} - \renewcommand*{\glsxtrfullformat}[2]{% - \glsfirstlongdefaultfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - }% - \renewcommand*{\glsxtrfullplformat}[2]{% - \glsfirstlongdefaultfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - }% - \renewcommand*{\Glsxtrfullformat}[2]{% - \glsfirstlongdefaultfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - }% - \renewcommand*{\Glsxtrfullplformat}[2]{% - \glsfirstlongdefaultfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - }% +\newcommand*{\@gls@combined@encapmain}{glsnumberformat} +\define@key{glsxtrcombined}{encapmain}{% + \renewcommand*{\@gls@combined@encapmain}{#1}% } % \end{macrocode} -%\end{abbrvstyle} -%\begin{abbrvstyle}{long-desc-sc} -%Backward compatibility: +%\end{macro} +% +%\begin{macro}{\@gls@combined@encapothers} +%\changes{1.48}{2021-11-22}{new} +%Location encap value for other components (corresponding to format key in \cs{gls}). % \begin{macrocode} -\@glsxtr@deprecated@abbrstyle{long-desc-sc}{long-noshort-sc-desc} +\newcommand*{\@gls@combined@encapothers}{glsnumberformat} +\define@key{glsxtrcombined}{encapothers}{% + \renewcommand*{\@gls@combined@encapothers}{#1}% +} % \end{macrocode} -%\end{abbrvstyle} +%\end{macro} % -%\begin{abbrvstyle}{short-sc-footnote} -%\changes{0.5}{2015-12-07}{new} -%\changes{1.04}{2016-05-02}{renamed from \qt{footnote-sc}} -%\changes{1.42}{2020-02-03}{added missing text key} +%\begin{macro}{\@gls@combined@textformat} +%\changes{1.48}{2021-11-22}{new} +%Encapsulate entire content with the command identified by the given +%control sequence name. % \begin{macrocode} -\newabbreviationstyle{short-sc-footnote}% -{% +\newcommand*{\@gls@combined@textformat}{@firstofone} +\define@key{glsxtrcombined}{textformat}{% + \renewcommand*{\@gls@combined@textformat}{#1}% +} % \end{macrocode} -% Set accessibility attributes if enabled. +%\end{macro} +% +%\begin{macro}{\@gls@combined@category} +%\changes{1.48}{2021-11-22}{new} +%Assign a category to the combined set. % \begin{macrocode} - \glsxtrAccSuppAbbrSetNoLongAttrs\glscategorylabel +\newcommand*{\@gls@combined@category}{} +\define@key{glsxtrcombined}{category}{% + \renewcommand*{\@gls@combined@category}{#1}% +} % \end{macrocode} -% Setup the default fields. +%Pre-options family: % \begin{macrocode} - \renewcommand*{\CustomAbbreviationFields}{% - name={\glsxtrfootnotename}, - sort={\the\glsshorttok}, - description={\the\glslongtok},% - first={\protect\glsfirstabbrvscfont{\the\glsshorttok}% - \protect\glsxtrabbrvfootnote{\the\glslabeltok}% - {\protect\glsfirstlongfootnotefont{\the\glslongtok}}},% - firstplural={\protect\glsfirstabbrvscfont{\the\glsshortpltok}% - \protect\glsxtrabbrvfootnote{\the\glslabeltok}% - {\protect\glsfirstlongfootnotefont{\the\glslongpltok}}},% - text={\protect\glsabbrvscfont{\the\glsshorttok}},% - plural={\protect\glsabbrvscfont{\the\glsshortpltok}}}% +\define@key{glsxtrcombinedpreopts}{category}{% + \renewcommand*{\@gls@combined@category}{#1}% +} % \end{macrocode} -% Switch off hyperlinks on first use to prevent nested hyperlinks, -% and unset the \catattr{regular} attribute if it has been set. -%\changes{0.5.1}{2015-12-07}{switch off regular attribute if set} +%\end{macro} +% +%\begin{macro}{\@gls@combined@mglsopts} +%\changes{1.48}{2021-11-22}{new} +%Default options to pass to \cs{mgls}. % \begin{macrocode} - \renewcommand*{\GlsXtrPostNewAbbreviation}{% - \glssetattribute{\the\glslabeltok}{nohyperfirst}{true}% - \glshasattribute{\the\glslabeltok}{regular}% - {% - \glssetattribute{\the\glslabeltok}{regular}{false}% - }% - {}% - }% -}% -{% +\newcommand*{\@gls@combined@mglsopts}{} +\define@key{glsxtrcombined}{mglsopts}{% + \renewcommand*{\@gls@combined@mglsopts}{#1}% +} +\define@key{glsxtrcombinedpreopts}{mglsopts}{% + \@gls@combined@mglsopts@do + {% + \renewcommand*{\@gls@combined@mglsopts}{#1}% + }% +} % \end{macrocode} -% Use smallcaps and adjust the plural suffix to revert to upright. -%\changes{1.42}{2020-02-03}{moved \cs{protect} inside \cs{glsxtrscsuffix}} +%\end{macro} +% +%\begin{macro}{\@gls@combined@mglsopts@do} +%\changes{1.48}{2021-11-22}{new} % \begin{macrocode} - \renewcommand*{\abbrvpluralsuffix}{\glsxtrscsuffix}% - \renewcommand*\glsabbrvfont[1]{\glsabbrvscfont{##1}}% - \renewcommand*\glsfirstabbrvfont[1]{\glsfirstabbrvscfont{##1}}% - \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongfootnotefont{##1}}% - \renewcommand*{\glslongfont}[1]{\glslongfootnotefont{##1}}% +\newcommand*{\@gls@combined@mglsopts@do}[1]{#1} % \end{macrocode} -% The full format displays the short form followed by the long form -% as a footnote. +%\end{macro} +% +%\begin{macro}{\mgls@disable@mglsopts} +%\changes{1.48}{2021-11-22}{new} % \begin{macrocode} - \renewcommand*{\glsxtrfullformat}[2]{% - \glsfirstabbrvscfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - \protect\glsxtrabbrvfootnote{##1}% - {\glsfirstlongfootnotefont{\glsaccesslong{##1}}}% - }% - \renewcommand*{\glsxtrfullplformat}[2]{% - \glsfirstabbrvscfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - \protect\glsxtrabbrvfootnote{##1}% - {\glsfirstlongfootnotefont{\glsaccesslongpl{##1}}}% - }% - \renewcommand*{\Glsxtrfullformat}[2]{% - \glsfirstabbrvscfont{\Glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - \protect\glsxtrabbrvfootnote{##1}% - {\glsfirstlongfootnotefont{\glsaccesslong{##1}}}% - }% - \renewcommand*{\Glsxtrfullplformat}[2]{% - \glsfirstabbrvscfont{\Glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - \protect\glsxtrabbrvfootnote{##1}% - {\glsfirstlongfootnotefont{\glsaccesslongpl{##1}}}% - }% +\newcommand*{\mgls@disable@mglsopts}{% + \let\@gls@combined@mglsopts@do\@gls@combined@mglsopts@do@not +} % \end{macrocode} -% The first use full form and the inline full form use the short -% (long) style. +%\end{macro} +% +%\begin{macro}{\mgls@enable@mglsopts} +%\changes{1.48}{2021-11-22}{new} % \begin{macrocode} - \renewcommand*{\glsxtrinlinefullformat}[2]{% - \glsfirstabbrvscfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstlongfootnotefont{\glsaccesslong{##1}}}% - }% - \renewcommand*{\glsxtrinlinefullplformat}[2]{% - \glsfirstabbrvscfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstlongfootnotefont{\glsaccesslongpl{##1}}}% - }% - \renewcommand*{\Glsxtrinlinefullformat}[2]{% - \glsfirstabbrvscfont{\Glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstlongfootnotefont{\glsaccesslong{##1}}}% - }% - \renewcommand*{\Glsxtrinlinefullplformat}[2]{% - \glsfirstabbrvscfont{\Glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstlongfootnotefont{\glsaccesslongpl{##1}}}% - }% +\newcommand*{\mgls@enable@mglsopts}{% + \let\@gls@combined@mglsopts@do\@firstofone } % \end{macrocode} -%\end{abbrvstyle} -%\begin{abbrvstyle}{footnote-sc} -%Backward compatibility: +%\end{macro} +% +%\begin{macro}{\@gls@combined@mglsopts@do} +%\changes{1.48}{2021-11-22}{new} % \begin{macrocode} -\@glsxtr@deprecated@abbrstyle{footnote-sc}{short-sc-footnote} +\newcommand*{\@gls@combined@mglsopts@do@not}[1]{% + \PackageError{glossaries-extra}{`mglsopts' key not permitted inside + `setup' value}{}% +} % \end{macrocode} -%\end{abbrvstyle} +%\end{macro} % -%\begin{abbrvstyle}{short-sc-footnote-desc} -% Like \abbrstyle{short-sc-footnote} but with user supplied description. -%\changes{1.42}{2020-02-03}{new} +%\begin{macro}{\@gls@combined@firstprefix} +%\changes{1.48}{2021-11-22}{new} +%Prefix for multi-entry first use. % \begin{macrocode} -\newabbreviationstyle{short-sc-footnote-desc}% -{% +\newcommand*{\@gls@combined@firstprefix}{} +\define@key{glsxtrcombined}{firstprefix}{% + \renewcommand*{\@gls@combined@firstprefix}{#1}% +} % \end{macrocode} -% Set accessibility attributes if enabled. +%\end{macro} +% +%\begin{macro}{\@gls@combined@usedprefix} +%\changes{1.48}{2021-11-22}{new} +%Prefix for multi-entry subsequent first use. % \begin{macrocode} - \glsxtrAccSuppAbbrSetNameLongAttrs\glscategorylabel +\newcommand*{\@gls@combined@usedprefix}{} +\define@key{glsxtrcombined}{usedprefix}{% + \renewcommand*{\@gls@combined@usedprefix}{#1}% +} % \end{macrocode} -% Setup the default fields. +%\end{macro} +% +%\begin{macro}{\@gls@combined@firstsuffix} +%\changes{1.48}{2021-11-22}{new} +%Suffix for multi-entry first use. % \begin{macrocode} - \renewcommand*{\CustomAbbreviationFields}{% - name={\glsxtrfootnotedescname}, - sort={\glsxtrfootnotedescsort}, - first={\protect\glsfirstabbrvscfont{\the\glsshorttok}% - \protect\glsxtrabbrvfootnote{\the\glslabeltok}% - {\protect\glsfirstlongfootnotefont{\the\glslongtok}}},% - firstplural={\protect\glsfirstabbrvscfont{\the\glsshortpltok}% - \protect\glsxtrabbrvfootnote{\the\glslabeltok}% - {\protect\glsfirstlongfootnotefont{\the\glslongpltok}}},% - text={\protect\glsabbrvscfont{\the\glsshorttok}},% - plural={\protect\glsabbrvscfont{\the\glsshortpltok}}}% +\newcommand*{\@gls@combined@firstsuffix}{} +\define@key{glsxtrcombined}{firstsuffix}{% + \renewcommand*{\@gls@combined@firstsuffix}{#1}% +} % \end{macrocode} -% Switch off hyperlinks on first use to prevent nested hyperlinks, -% and unset the \catattr{regular} attribute if it has been set. -%\changes{0.5.1}{2015-12-07}{switch off regular attribute if set} +%\end{macro} +% +%\begin{macro}{\@gls@combined@usedsuffix} +%\changes{1.48}{2021-11-22}{new} +%Suffix for multi-entry subsequent first use. % \begin{macrocode} - \renewcommand*{\GlsXtrPostNewAbbreviation}{% - \glssetattribute{\the\glslabeltok}{nohyperfirst}{true}% - \glshasattribute{\the\glslabeltok}{regular}% - {% - \glssetattribute{\the\glslabeltok}{regular}{false}% - }% - {}% - }% -}% -{% - \GlsXtrUseAbbrStyleFmts{short-sc-footnote}% +\newcommand*{\@gls@combined@usedsuffix}{} +\define@key{glsxtrcombined}{usedsuffix}{% + \renewcommand*{\@gls@combined@usedsuffix}{#1}% } % \end{macrocode} -%\end{abbrvstyle} +%\end{macro} % -%\begin{abbrvstyle}{short-sc-postfootnote} -%\changes{0.5}{2015-12-07}{new} -%\changes{1.04}{2016-05-02}{renamed from \qt{postfootnote-sc}} -%\changes{1.42}{2020-02-03}{added missing text key} +%\begin{macro}{\@gls@combined@firstskipmain} +%\changes{1.48}{2021-11-22}{new} +%Skip the main element on first use (multi-entry first use not +%element first use). % \begin{macrocode} -\newabbreviationstyle{short-sc-postfootnote}% -{% +\define@boolkey{glsxtrcombined}{firstskipmain}[true]{} +\KV@glsxtrcombined@firstskipmainfalse % \end{macrocode} -% Set accessibility attributes if enabled. +%\end{macro} +% +%\begin{macro}{\@gls@combined@firstskipothers} +%\changes{1.48}{2021-11-22}{new} +%Skip the other elements on first use (multi-entry first use not +%element first use). % \begin{macrocode} - \glsxtrAccSuppAbbrSetNoLongAttrs\glscategorylabel +\define@boolkey{glsxtrcombined}{firstskipothers}[true]{} +\KV@glsxtrcombined@firstskipothersfalse % \end{macrocode} -% Setup the default fields. +%\end{macro} +% +%\begin{macro}{\@gls@combined@usedskipmain} +%\changes{1.48}{2021-11-22}{new} +%Skip the main element on subsequent use (multi-entry subsequent use not +%element subsequent use). % \begin{macrocode} - \renewcommand*{\CustomAbbreviationFields}{% - name={\glsxtrfootnotename}, - sort={\the\glsshorttok}, - description={\the\glslongtok},% - first={\protect\glsfirstabbrvscfont{\the\glsshorttok}},% - firstplural={\protect\glsfirstabbrvscfont{\the\glsshortpltok}},% - text={\protect\glsabbrvscfont{\the\glsshorttok}},% - plural={\protect\glsabbrvscfont{\the\glsshortpltok}}}% +\define@boolkey{glsxtrcombined}{usedskipmain}[true]{} +\KV@glsxtrcombined@usedskipmainfalse % \end{macrocode} -% Make this category insert a footnote after the link if this was -% the first use, and -% unset the \catattr{regular} attribute if it has been set. +%\end{macro} +% +%\begin{macro}{\@gls@combined@usedskipothers} +%\changes{1.48}{2021-11-22}{new} +%Skip the other elements on subsequent use (multi-entry subsequent use not +%element subsequent use). % \begin{macrocode} - \renewcommand*{\GlsXtrPostNewAbbreviation}{% - \csdef{glsxtrpostlink\glscategorylabel}{% - \glsxtrifwasfirstuse - {% +\define@boolkey{glsxtrcombined}{usedskipothers}[true]{} +\KV@glsxtrcombined@usedskipothersfalse % \end{macrocode} -% Needs the specific font command here as the style may have been -% lost by the time the footnote occurs. +%\end{macro} +% +%\begin{macro}{\@gls@combined@postlinks} +%\changes{1.48}{2021-11-22}{new} +%Determine whether or not to use the individual element post-link hooks. % \begin{macrocode} - \glsxtrdopostpunc{\protect\glsxtrabbrvfootnote{\glslabel}% - {\glsfirstlongfootnotefont{\glsentrylong{\glslabel}}}}% - }% - {}% - }% - \glshasattribute{\the\glslabeltok}{regular}% - {% - \glssetattribute{\the\glslabeltok}{regular}{false}% - }% - {}% - }% +\newcommand*{\@gls@combined@postlinks@nr}{0} +\define@choicekey{glsxtrcombined}{postlinks}% + [\@gls@combined@postlinks@val\@gls@combined@postlinks@nr] + {none,all,notlast,mainnotlast,mainonly,othernotlast,otheronly}{} % \end{macrocode} -% The footnote needs to be suppressed in the inline form, so -% \cs{glsxtrfull} must set the first use switch off. +%\end{macro} +% +%\begin{macro}{\@gls@combined@mpostlink} +%\changes{1.48}{2021-11-22}{new} +%Determine whether or not to use the multi-entry post-link hook. % \begin{macrocode} - \renewcommand*{\glsxtrsetupfulldefs}{% - \let\glsxtrifwasfirstuse\@secondoftwo - }% -}% -{% +\newcommand*{\@gls@combined@mpostlink@nr}{1} +\define@choicekey{glsxtrcombined}{mpostlink}% + [\@gls@combined@mpostlink@val\@gls@combined@mpostlink@nr] + {false,true,firstonly,usedonly}[true]{} % \end{macrocode} -% Use smallcaps and adjust the plural suffix to revert to upright. -%\changes{1.42}{2020-02-03}{moved \cs{protect} inside \cs{glsxtrscsuffix}} +%\end{macro} +% +%\begin{macro}{\@gls@combined@mpostlinkelement} +%\changes{1.48}{2021-11-22}{new} +%Determine which element to use for the post-link hook. % \begin{macrocode} - \renewcommand*{\abbrvpluralsuffix}{\glsxtrscsuffix}% - \renewcommand*\glsabbrvfont[1]{\glsabbrvscfont{##1}}% - \renewcommand*\glsfirstabbrvfont[1]{\glsfirstabbrvscfont{##1}}% - \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongfootnotefont{##1}}% - \renewcommand*{\glslongfont}[1]{\glslongfootnotefont{##1}}% +\newcommand*{\@gls@combined@mpostlinkelement@nr}{0} +\define@choicekey{glsxtrcombined}{mpostlinkelement}% + [\@gls@combined@mpostlinkelement@val\@gls@combined@mpostlinkelement@nr] + {last,main,custom}{} % \end{macrocode} -% The full format displays the short form. The long form is -% deferred. +%\end{macro} +% +%\begin{macro}{\glsxtrifmulti} +%\changes{1.48}{2021-11-22}{new} % \begin{macrocode} - \renewcommand*{\glsxtrfullformat}[2]{% - \glsfirstabbrvscfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - }% - \renewcommand*{\glsxtrfullplformat}[2]{% - \glsfirstabbrvscfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - }% - \renewcommand*{\Glsxtrfullformat}[2]{% - \glsfirstabbrvscfont{\Glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - }% - \renewcommand*{\Glsxtrfullplformat}[2]{% - \glsfirstabbrvscfont{\Glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - }% +\newcommand*{\glsxtrifmulti}[3]{\ifcsdef{@gls@combined@#1@main}{#2}{#3}} % \end{macrocode} -% The first use full form and the inline full form use the short -% (long) style. +%\end{macro} +% +%\begin{macro}{\glsxtrmultimain} +%\changes{1.48}{2021-11-22}{new} % \begin{macrocode} - \renewcommand*{\glsxtrinlinefullformat}[2]{% - \glsfirstabbrvscfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstlongfootnotefont{\glsaccesslong{##1}}}% - }% - \renewcommand*{\glsxtrinlinefullplformat}[2]{% - \glsfirstabbrvscfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstlongfootnotefont{\glsaccesslongpl{##1}}}% - }% - \renewcommand*{\Glsxtrinlinefullformat}[2]{% - \glsfirstabbrvscfont{\Glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstlongfootnotefont{\glsaccesslong{##1}}}% - }% - \renewcommand*{\Glsxtrinlinefullplformat}[2]{% - \glsfirstabbrvscfont{\Glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstlongfootnotefont{\glsaccesslongpl{##1}}}% - }% -} +\newcommand*{\glsxtrmultimain}[1]{\csuse{@gls@combined@#1@main}} % \end{macrocode} -%\end{abbrvstyle} -%\begin{abbrvstyle}{postfootnote-sc} -%Backward compatibility: +%\end{macro} +% +%\begin{macro}{\glsxtrmultilist} +%\changes{1.48}{2021-11-22}{new} % \begin{macrocode} -\@glsxtr@deprecated@abbrstyle{postfootnote-sc}{short-sc-postfootnote} +\newcommand*{\glsxtrmultilist}[1]{\csuse{@gls@combined@#1@list}} % \end{macrocode} -%\end{abbrvstyle} +%\end{macro} % -%\begin{abbrvstyle}{short-sc-postfootnote-desc} -% Like \abbrstyle{short-sc-footnote} but with user supplied description. -%\changes{1.42}{2020-02-03}{new} +%\begin{macro}{\glsxtrmultitotalelements} +%\changes{1.48}{2021-11-22}{new} +%Total number of elements. % \begin{macrocode} -\newabbreviationstyle{short-sc-postfootnote-desc}% -{% +\newcommand*{\glsxtrmultitotalelements}[1]{\csuse{@gls@combined@#1@total}} % \end{macrocode} -% Set accessibility attributes if enabled. +%\end{macro} +% +%\begin{macro}{\glsxtrmultimainindex} +%\changes{1.48}{2021-11-22}{new} +%Index of main element (starting from 1). If the main element is the +%last element in the list then this should equal the total number of +%elements. % \begin{macrocode} - \glsxtrAccSuppAbbrSetNameLongAttrs\glscategorylabel +\newcommand*{\glsxtrmultimainindex}[1]{\csuse{@gls@combined@#1@mainindex}} % \end{macrocode} -% Setup the default fields. +%\end{macro} +% +%\begin{macro}{\glsxtrmultilastotherindex} +%\changes{1.48}{2021-11-22}{new} +%Index of the last non-main element. % \begin{macrocode} - \renewcommand*{\CustomAbbreviationFields}{% - name={\glsxtrfootnotedescname}, - sort={\glsxtrfootnotedescsort}, - first={\protect\glsfirstabbrvscfont{\the\glsshorttok}},% - firstplural={\protect\glsfirstabbrvscfont{\the\glsshortpltok}},% - text={\protect\glsabbrvscfont{\the\glsshorttok}},% - plural={\protect\glsabbrvscfont{\the\glsshortpltok}}}% +\newcommand*{\glsxtrmultilastotherindex}[1]{\csuse{@gls@combined@#1@lastotherindex}} % \end{macrocode} -% Make this category insert a footnote after the link if this was -% the first use, and -% unset the \catattr{regular} attribute if it has been set. +%\end{macro} +% +%\begin{macro}{\ifmultiglossaryentryglobal} +%\changes{1.48}{2021-11-22}{new} +%Make definitions global. % \begin{macrocode} - \renewcommand*{\GlsXtrPostNewAbbreviation}{% - \csdef{glsxtrpostlink\glscategorylabel}{% - \glsxtrifwasfirstuse - {% +\newif\ifmultiglossaryentryglobal +\multiglossaryentryglobalfalse % \end{macrocode} -% Needs the specific font command here as the style may have been -% lost by the time the footnote occurs. +%\end{macro} +% +%\begin{macro}{\mglselementindex} +%\changes{1.48}{2021-11-22}{new} +% Count register to keep track of the current element index. % \begin{macrocode} - \glsxtrdopostpunc{\protect\glsxtrabbrvfootnote{\glslabel}% - {\glsfirstlongfootnotefont{\glsentrylong{\glslabel}}}}% - }% - {}% - }% - \glshasattribute{\the\glslabeltok}{regular}% - {% - \glssetattribute{\the\glslabeltok}{regular}{false}% - }% - {}% - }% +\newcount\mglselementindex % \end{macrocode} -% The footnote needs to be suppressed in the inline form, so -% \cs{glsxtrfull} must set the first use switch off. +%\end{macro} +% +%\begin{macro}{\multiglossaryentry} +%\changes{1.48}{2021-11-22}{new} +%\begin{definition} +%\cs{multiglossaryentry}\oarg{options}\marg{multi-label}\oarg{main label}\marg{label +%list} +%\end{definition} +%Defines the label \meta{multi-label} that can be used in \cs{mgls}. % \begin{macrocode} - \renewcommand*{\glsxtrsetupfulldefs}{% - \let\glsxtrifwasfirstuse\@secondoftwo - }% -}% -{% - \GlsXtrUseAbbrStyleFmts{short-sc-postfootnote}% +\newrobustcmd{\multiglossaryentry}[1][]{% + \def\@gls@combined@current@opts{#1}% + \ifnum\@glsxtr@docdefval=1\relax + \let\@multi@glossentry@donext\@defmultiglossaryentry + \else + \let\@multi@glossentry@donext\@multiglossaryentry + \fi + \@multi@glossentry@donext } % \end{macrocode} -%\end{abbrvstyle} +%\end{macro} % -%\subsection{Predefined Styles (Fake Small Capitals)} -% These styles require the \sty{relsize} package, which must be -% loaded by the user. These styles all use: -%\begin{macro}{\glsxtrsmfont} -%\changes{0.5}{2015-12-07}{new} -%Maintained for backward compatibility. +%\begin{macro}{\@multiglossaryentry} +%\changes{1.48}{2021-11-22}{new} % \begin{macrocode} -\newcommand*{\glsxtrsmfont}[1]{\textsmaller{#1}} +\newcommand*{\@multiglossaryentry}[1]{% + \def\@gls@combined@current@label{#1}% + \@multi@glossaryentry +} % \end{macrocode} %\end{macro} -%\begin{macro}{\glsabbrvsmfont} -%\changes{1.17}{2017-08-09}{new} -%Added for consistent naming. +% +%\begin{macro}{\@multi@glossaryentry} +%\changes{1.48}{2021-11-22}{new} +% Check for existence. % \begin{macrocode} -\newcommand*{\glsabbrvsmfont}{\glsxtrsmfont} +\newcommand*{\@multi@glossaryentry}[2][]{% + \ifcsdef{@gls@combined@\@gls@combined@current@label @main}% + {\PackageError{glossaries-extra}% + {Multi-entry label `\@gls@combined@current@label' already defined}% + {}% + }% + {% + \@multi@glossary@entry{#1}{#2}% + }% +} % \end{macrocode} %\end{macro} -%\begin{macro}{\glsxtrfirstsmfont} -%\changes{1.04}{2016-05-02}{new} -%Maintained for backward compatibility. +% +%\begin{macro}{\@defmultiglossaryentry} +%\changes{1.48}{2021-11-22}{new} +%Used if document definitions are on. % \begin{macrocode} -\newcommand*{\glsxtrfirstsmfont}[1]{\glsabbrvsmfont{#1}} +\newcommand*{\@defmultiglossaryentry}[1]{% + \def\@gls@combined@current@label{#1}% + \@def@multi@glossaryentry +} % \end{macrocode} %\end{macro} -%\begin{macro}{\glsfirstabbrvsmfont} -%\changes{1.17}{2017-08-09}{new} -%Added for consistent naming. +% +%\begin{macro}{\@def@multi@glossaryentry} +%\changes{1.48}{2021-11-22}{new} +%Used if document definitions are on. % \begin{macrocode} -\newcommand*{\glsfirstabbrvsmfont}{\glsxtrfirstsmfont} +\newcommand*{\@def@multi@glossaryentry}[2][]{% + \let\@def@multi@glossaryentry@do\@multi@glossary@entry + \ifundef\@glsxtr@docdefs@multilist + {% + \gdef\@glsxtr@docdefs@multilist{}% + \listxadd + {\@glsxtr@docdefs@multilist}{\expandonce\@gls@combined@current@label}% + }% + {% + \xifinlist{\@gls@combined@current@label}{\@glsxtr@docdefs@multilist}% + {% + \PackageError{glossaries-extra}% + {Multi-entry label `\@gls@combined@current@label' already defined}% + {}% + \let\@def@multi@glossaryentry@do\@gobbletwo + }% + {% + \listxadd + {\@glsxtr@docdefs@multilist}{\expandonce\@gls@combined@current@label}% + }% + }% + \@def@multi@glossaryentry@do{#1}{#2}% +} % \end{macrocode} %\end{macro} -% and for the default short form suffix: -%\begin{macro}{\glsxtrsmsuffix} -%\changes{0.5}{2015-12-07}{new} +% +%\begin{macro}{\@multi@glossary@doifexists} +%\changes{1.48}{2021-11-22}{new} % \begin{macrocode} -\newcommand*{\glsxtrsmsuffix}{\glsxtrabbrvpluralsuffix} +\newcommand*{\@multi@glossary@doifexists}{\glsdoifexists} % \end{macrocode} %\end{macro} % -%\begin{abbrvstyle}{long-short-sm} -%\changes{0.5}{2015-12-07}{new} -%\changes{1.42}{2020-02-03}{added missing text key} +%\begin{macro}{\providemultiglossaryentry} +%\changes{1.48}{2021-11-22}{new} +%\begin{definition} +%\cs{providemultiglossaryentry}\oarg{options}\marg{multi-label}\oarg{main label}\marg{label +%list} +%\end{definition} +%Defines a multi-entry unless it has already been defined. % \begin{macrocode} -\newabbreviationstyle{long-short-sm}% -{% +\newrobustcmd{\providemultiglossaryentry}[2][]{% + \def\@gls@combined@current@opts{#1}% + \def\@gls@combined@current@label{#2}% + \ifcsdef{@gls@combined@\@gls@combined@current@label @main}% + {\def\@multi@glossentry@donext{\@provide@multi@glossaryentry@noop}}% + {% + \ifnum\@glsxtr@docdefval=1\relax + \def\@multi@glossentry@donext{\@def@multi@glossaryentry}% + \else + \def\@multi@glossentry@donext{\@multi@glossaryentry}% + \fi + }% + \@multi@glossentry@donext +} % \end{macrocode} -% Set accessibility attributes if enabled. +%\end{macro} +% +%\begin{macro}{\@provide@multi@glossaryentry@noop} +%\changes{1.48}{2021-11-22}{new} +% Do nothing. % \begin{macrocode} - \glsxtrAccSuppAbbrSetFirstLongAttrs\glscategorylabel +\newcommand*{\@provide@multi@glossaryentry@noop}[2][]{} % \end{macrocode} -% Setup the default fields. +%\end{macro} +% +%\begin{macro}{\@multi@glossaryentry@list} +%\changes{1.48}{2021-11-22}{new} +% List of all defined multi-entry sets. % \begin{macrocode} - \renewcommand*{\CustomAbbreviationFields}{% - name={\glsxtrlongshortname}, - sort={\the\glsshorttok}, - first={\protect\glsfirstlongdefaultfont{\the\glslongtok}% - \protect\glsxtrfullsep{\the\glslabeltok}% - \glsxtrparen{\protect\glsfirstabbrvsmfont{\the\glsshorttok}}},% - firstplural={\protect\glsfirstlongdefaultfont{\the\glslongpltok}% - \protect\glsxtrfullsep{\the\glslabeltok}% - \glsxtrparen{\protect\glsfirstabbrvsmfont{\the\glsshortpltok}}},% - text={\protect\glsabbrvsmfont{\the\glsshorttok}},% - plural={\protect\glsabbrvsmfont{\the\glsshortpltok}},% - description={\the\glslongtok}}% - \renewcommand*{\GlsXtrPostNewAbbreviation}{% - \glshasattribute{\the\glslabeltok}{regular}% - {% - \glssetattribute{\the\glslabeltok}{regular}{false}% - }% - {}% - }% -}% -{% +\newcommand*{\@multi@glossaryentry@list}{} % \end{macrocode} -%\changes{1.42}{2020-02-03}{removed \cs{protect} from \cs{glsxtrsmsuffix}} +%\end{macro} +% +%\begin{macro}{\@multi@glossary@entry} +%\changes{1.48}{2021-11-22}{new} % \begin{macrocode} - \renewcommand*\glsabbrvfont[1]{\glsabbrvsmfont{##1}}% - \renewcommand*\glsfirstabbrvfont[1]{\glsfirstabbrvsmfont{##1}}% - \renewcommand*{\abbrvpluralsuffix}{\glsxtrsmsuffix}% +\newcommand*{\@multi@glossary@entry}[2]{% + \protected@edef\@gls@combined@current@main{#1}% % \end{macrocode} -% Use the default long fonts. +% Fully expand list. % \begin{macrocode} - \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% - \renewcommand*{\glslongfont}[1]{\glslongdefaultfont{##1}}% + \protected@edef\@gls@combined@currentlist{#2}% % \end{macrocode} -% The first use full form and the inline full form are the same for -% this style. +% Count items in list, check they are all defined, and find last item at the same time. % \begin{macrocode} - \renewcommand*{\glsxtrfullformat}[2]{% - \glsfirstlongdefaultfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - \glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstabbrvsmfont{\glsaccessshort{##1}}}% - }% - \renewcommand*{\glsxtrfullplformat}[2]{% - \glsfirstlongdefaultfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstabbrvsmfont{\glsaccessshortpl{##1}}}% - }% - \renewcommand*{\Glsxtrfullformat}[2]{% - \glsfirstlongdefaultfont{\Glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstabbrvsmfont{\glsaccessshort{##1}}}% - }% - \renewcommand*{\Glsxtrfullplformat}[2]{% - \glsfirstlongdefaultfont{\Glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstabbrvsmfont{\glsaccessshortpl{##1}}}% + \mglselementindex=0\relax + \@for\@gls@tmp:=\@gls@combined@currentlist\do{% + \advance\mglselementindex by 1\relax + \@multi@glossary@doifexists{\@gls@tmp}{}% + \let\@gls@combined@finalitem\@gls@tmp + \ifdefvoid\@gls@combined@current@main + {}% + {% + \ifx\@gls@combined@current@main\@gls@tmp + \ifmultiglossaryentryglobal + \global\cslet{@gls@combined@\@gls@combined@current@label @main}% + \@gls@combined@current@main + \csxdef{@gls@combined@\@gls@combined@current@label @mainindex}% + {\the\mglselementindex}% + \else + \cslet{@gls@combined@\@gls@combined@current@label @main}% + \@gls@combined@current@main + \csedef{@gls@combined@\@gls@combined@current@label @mainindex}% + {\the\mglselementindex}% + \fi + \else + \ifmultiglossaryentryglobal + \csxdef{@gls@combined@\@gls@combined@current@label @lastotherindex}% + {\the\mglselementindex}% + \else + \csedef{@gls@combined@\@gls@combined@current@label @lastotherindex}% + {\the\mglselementindex}% + \fi + \fi + }% }% -} -% \end{macrocode} -%\end{abbrvstyle} -% -%\begin{abbrvstyle}{long-short-sm-desc} -%\changes{0.5}{2015-12-07}{new} -% \begin{macrocode} -\newabbreviationstyle{long-short-sm-desc}% -{% + \ifmultiglossaryentryglobal + \csxdef{@gls@combined@\@gls@combined@current@label @total}% + {\the\mglselementindex}% + \else + \csedef{@gls@combined@\@gls@combined@current@label @total}% + {\the\mglselementindex}% + \fi + \ifnum\mglselementindex<2\relax + \PackageError{glossaries-extra}{At least 2 labels required in + multi-entry element list (\number\mglselementindex\space found)}{}% + \else + \ifdefvoid\@gls@combined@current@main + {}% + {% % \end{macrocode} -% Set accessibility attributes if enabled. +% If \cs{@gls@combined@\meta{label}@main} hasn't been set then it +% wasn't included in the list. % \begin{macrocode} - \glsxtrAccSuppAbbrSetTextShortAttrs\glscategorylabel + \ifcsundef{@gls@combined@\@gls@combined@current@label @main}% + {\PackageError{glossaries-extra}% + {Main element `\@gls@combined@current@main' not found in list}% + {The final element `\@gls@combined@finalitem' will be used instead} % \end{macrocode} -% Setup the default fields. +% Set to empty so that the default (final element) is used instead. % \begin{macrocode} - \renewcommand*{\CustomAbbreviationFields}{% - name={\glsxtrlongshortdescname}, - sort={\glsxtrlongshortdescsort},% - first={\protect\glsfirstlongdefaultfont{\the\glslongtok}% - \protect\glsxtrfullsep{\the\glslabeltok}% - \glsxtrparen{\protect\glsfirstabbrvsmfont{\the\glsshorttok}}},% - firstplural={\protect\glsfirstlongdefaultfont{\the\glslongpltok}% - \protect\glsxtrfullsep{\the\glslabeltok}% - \glsxtrparen{\protect\glsfirstabbrvsmfont{\the\glsshortpltok}}},% - text={\protect\glsabbrvsmfont{\the\glsshorttok}},% - plural={\protect\glsabbrvsmfont{\the\glsshortpltok}}% - }% + \let\@gls@combined@current@main\@empty + }% + {}% + }% + \ifdefvoid\@gls@combined@current@main + {% % \end{macrocode} -% Unset the \catattr{regular} attribute if it has been set. +% Set main to final element. % \begin{macrocode} - \renewcommand*{\GlsXtrPostNewAbbreviation}{% - \glshasattribute{\the\glslabeltok}{regular}% - {% - \glssetattribute{\the\glslabeltok}{regular}{false}% + \ifmultiglossaryentryglobal + \global\cslet{@gls@combined@\@gls@combined@current@label @main}% + \@gls@combined@finalitem + \global\csletcs{@gls@combined@\@gls@combined@current@label @mainindex}% + {@gls@combined@\@gls@combined@current@label @total}% + \csxdef{@gls@combined@\@gls@combined@current@label @lastotherindex}% + {\the\numexpr\mglselementindex-1 }% + \else + \cslet{@gls@combined@\@gls@combined@current@label @main}% + \@gls@combined@finalitem + \csletcs{@gls@combined@\@gls@combined@current@label @mainindex}% + {@gls@combined@\@gls@combined@current@label @total}% + \csedef{@gls@combined@\@gls@combined@current@label @lastotherindex}% + {\the\numexpr\mglselementindex-1 }% + \fi }% {}% - }% -}% -{% + \ifmultiglossaryentryglobal % \end{macrocode} -% As long-short-sm style: +% Globally define element list. % \begin{macrocode} - \GlsXtrUseAbbrStyleFmts{long-short-sm}% -} + \global\cslet{@gls@combined@\@gls@combined@current@label @list}% + \@gls@combined@currentlist % \end{macrocode} -%\end{abbrvstyle} -% -%\begin{abbrvstyle}{short-sm-long} -% Now the short (long) version -%\changes{0.5}{2015-12-07}{new} -%\changes{1.42}{2020-02-03}{added missing text key} +% Globally define options. % \begin{macrocode} -\newabbreviationstyle{short-sm-long}% -{% + \protected@csxdef{@gls@combined@\@gls@combined@current@label @options}% + {\@gls@combined@current@opts}% % \end{macrocode} -% Set accessibility attributes if enabled. +% Global conditional definition. % \begin{macrocode} - \glsxtrAccSuppAbbrSetFirstLongAttrs\glscategorylabel + \expandafter\@ifdefinable + \csname if@gls@combined@\@gls@combined@current@label @flag\endcsname + {\expandafter\global\expandafter + \newif\csname if@gls@combined@\@gls@combined@current@label @flag\endcsname}% + \expandafter\global + \csname @gls@combined@\@gls@combined@current@label @flagfalse\endcsname + \else % \end{macrocode} -% Setup the default fields. +% Locally define element list. % \begin{macrocode} - \renewcommand*{\CustomAbbreviationFields}{% - name={\glsxtrshortlongname}, - sort={\the\glsshorttok}, - description={\the\glslongtok},% - first={\protect\glsfirstabbrvsmfont{\the\glsshorttok}% - \protect\glsxtrfullsep{\the\glslabeltok}% - \glsxtrparen{\protect\glsfirstlongdefaultfont{\the\glslongtok}}},% - firstplural={\protect\glsfirstabbrvsmfont{\the\glsshortpltok}% - \protect\glsxtrfullsep{\the\glslabeltok}% - \glsxtrparen{\protect\glsfirstlongdefaultfont{\the\glslongpltok}}},% - text={\protect\glsabbrvsmfont{\the\glsshorttok}},% - plural={\protect\glsabbrvsmfont{\the\glsshortpltok}}}% + \cslet{@gls@combined@\@gls@combined@current@label @list}% + \@gls@combined@currentlist % \end{macrocode} -% Unset the \catattr{regular} attribute if it has been set. +% Locally define options. % \begin{macrocode} - \renewcommand*{\GlsXtrPostNewAbbreviation}{% - \glshasattribute{\the\glslabeltok}{regular}% - {% - \glssetattribute{\the\glslabeltok}{regular}{false}% - }% - {}% - }% -}% -{% + \protected@csedef{@gls@combined@\@gls@combined@current@label @options}% + {\@gls@combined@current@opts}% % \end{macrocode} -%\changes{1.42}{2020-02-03}{removed \cs{protect} from \cs{glsxtrsmsuffix}} +% Local conditional definition. % \begin{macrocode} - \renewcommand*\glsabbrvfont[1]{\glsabbrvsmfont{##1}}% - \renewcommand*\glsfirstabbrvfont[1]{\glsfirstabbrvsmfont{##1}}% - \renewcommand*{\abbrvpluralsuffix}{\glsxtrsmsuffix}% - \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% - \renewcommand*{\glslongfont}[1]{\glslongdefaultfont{##1}}% + \newboolean{@gls@combined@\@gls@combined@current@label @flag}% + \csname @gls@combined@\@gls@combined@current@label @flagfalse\endcsname + \fi + \fi + \writemultiglossentry + {\@gls@combined@current@opts}{\@gls@combined@current@label}% + {\csuse{@gls@combined@\@gls@combined@current@label @main}}{#2}% % \end{macrocode} -% The first use full form and the inline full form are the same for -% this style. +%Append label to list. % \begin{macrocode} - \renewcommand*{\glsxtrfullformat}[2]{% - \glsfirstabbrvsmfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - \glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstlongdefaultfont{\glsaccesslong{##1}}}% - }% - \renewcommand*{\glsxtrfullplformat}[2]{% - \glsfirstabbrvsmfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - \glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstlongdefaultfont{\glsaccesslongpl{##1}}}% - }% - \renewcommand*{\Glsxtrfullformat}[2]{% - \glsfirstabbrvsmfont{\Glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstlongdefaultfont{\glsaccesslong{##1}}}% - }% - \renewcommand*{\Glsxtrfullplformat}[2]{% - \glsfirstabbrvsmfont{\Glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstlongdefaultfont{\glsaccesslongpl{##1}}}% - }% + \ifmultiglossaryentryglobal + \ifdefempty\@multi@glossaryentry@list + {\let\@multi@glossaryentry@list\@gls@combined@current@label}% + {% + \eappto\@multi@glossaryentry@list{,\expandonce\@gls@combined@current@label}% + }% + \else + \ifdefempty\@multi@glossaryentry@list + {\global\let\@multi@glossaryentry@list\@gls@combined@current@label}% + {% + \xappto\@multi@glossaryentry@list{,\expandonce\@gls@combined@current@label}% + }% + \fi } % \end{macrocode} -%\end{abbrvstyle} +%\end{macro} % -%\begin{abbrvstyle}{short-sm-long-desc} -% As before but user provides description -%\changes{0.5}{2015-12-07}{new} +%\begin{macro}{\@glsxtr@multientry} +%\begin{definition} +%\cs{@glsxtr@multientry}\marg{options}\marg{multilabel}\marg{main}\marg{list} +%\end{definition} +%Information for aux file. Useful for \app{bib2gls} and also for +%\pkgopt{docdef}. +%\changes{1.48}{2021-11-22}{new} % \begin{macrocode} -\newabbreviationstyle{short-sm-long-desc}% -{% +\newcommand*{\@glsxtr@multientry}[4]{% + \ifnum\@glsxtr@docdefval=1\relax + \bgroup + \def\@gls@combined@current@opts{#1}% + \def\@gls@combined@current@label{#2}% + \let\@multi@glossary@doifexists\@secondoftwo + \let\writemultiglossentry\@gobblefour + \multiglossaryentryglobaltrue + \@multi@glossary@entry{#3}{#4}% + \egroup + \fi +} % \end{macrocode} -% Set accessibility attributes if enabled. +%\end{macro} +% +%\begin{macro}{\writemultiglossentry} +%\changes{1.48}{2021-11-22}{new} +%This can be redefined to do nothing if the information isn't +%required. % \begin{macrocode} - \glsxtrAccSuppAbbrSetTextShortAttrs\glscategorylabel +\newcommand*{\writemultiglossentry}[4]{% + \protected@write\@auxout{}{\string\@glsxtr@multientry{#1}{#2}{#3}{#4}}% +} % \end{macrocode} -% Setup the default fields. +%\end{macro} +% +%\begin{macro}{\ifmglsused} +%\changes{1.48}{2021-11-22}{new} +% Determines whether or not the multi-entry set has been referenced +% by commands like \cs{mgls} or \cs{mglsname}. % \begin{macrocode} - \renewcommand*{\CustomAbbreviationFields}{% - name={\glsxtrshortlongdescname}, - sort={\glsxtrshortlongdescsort}, - first={\protect\glsfirstabbrvsmfont{\the\glsshorttok}% - \protect\glsxtrfullsep{\the\glslabeltok}% - \glsxtrparen{\protect\glsfirstlongdefaultfont{\the\glslongtok}}},% - firstplural={\protect\glsfirstabbrvsmfont{\the\glsshortpltok}% - \protect\glsxtrfullsep{\the\glslabeltok}% - \glsxtrparen{\protect\glsfirstlongdefaultfont{\the\glslongpltok}}},% - text={\protect\glsabbrvsmfont{\the\glsshorttok}},% - plural={\protect\glsabbrvsmfont{\the\glsshortpltok}}% - }% +\newcommand*{\ifmglsused}[3]{% + \ifbool{@gls@combined@#1@flag}{#2}{#3}% +} % \end{macrocode} -% Unset the \catattr{regular} attribute if it has been set. +%\end{macro} +% +%\begin{macro}{\mglsunset} +%\changes{1.48}{2021-11-22}{new} +%Unset the flag. % \begin{macrocode} - \renewcommand*{\GlsXtrPostNewAbbreviation}{% - \glshasattribute{\the\glslabeltok}{regular}% +\newcommand*{\mglsunset}[1]{% + \gls@ifnotmeasuring + {% + \glsxtrifmulti{#1}{\@mglsunset{#1}}% {% - \glssetattribute{\the\glslabeltok}{regular}{false}% + \glsxtrundefaction{Multi entry `#1' hasn't been defined}% + {You need to define `#1' with \string\multiglossaryentry}% }% - {}% - }% -}% -{% -% \end{macrocode} -% As short-sm-long style: -% \begin{macrocode} - \GlsXtrUseAbbrStyleFmts{short-sm-long}% + }% } % \end{macrocode} -%\end{abbrvstyle} +%\end{macro} % -%\begin{abbrvstyle}{short-sm} -%\changes{0.5}{2015-12-07}{new} +%\begin{macro}{\@mglsunset} +%\changes{1.48}{2021-11-22}{new} % \begin{macrocode} -\newabbreviationstyle{short-sm}% -{% +\newcommand*{\@mglsunset}[1]{% + \expandafter\global\csname @gls@combined@#1@flagtrue\endcsname +} % \end{macrocode} -% Set accessibility attributes if enabled. +%\end{macro} +% +%\begin{macro}{\mglsreset} +%\changes{1.48}{2021-11-22}{new} +%Unset the flag. % \begin{macrocode} - \glsxtrAccSuppAbbrSetNameLongAttrs\glscategorylabel +\newcommand*{\mglsreset}[1]{% + \gls@ifnotmeasuring + {% + \glsxtrifmulti{#1}{\@mglsreset{#1}}% + {% + \glsxtrundefaction{Multi entry `#1' hasn't been defined}% + {You need to define `#1' with \string\multiglossaryentry}% + }% + }% +} % \end{macrocode} -% Setup the default fields. +%\end{macro} +% +%\begin{macro}{\@mglsreset} +%\changes{1.48}{2021-11-22}{new} % \begin{macrocode} - \renewcommand*{\CustomAbbreviationFields}{% - name={\glsxtrshortnolongname}, - sort={\the\glsshorttok}, - first={\protect\glsfirstabbrvsmfont{\the\glsshorttok}}, - firstplural={\protect\glsfirstabbrvsmfont{\the\glsshortpltok}}, - text={\protect\glsabbrvsmfont{\the\glsshorttok}}, - plural={\protect\glsabbrvsmfont{\the\glsshortpltok}}, - description={\the\glslongtok}}% - \renewcommand*{\GlsXtrPostNewAbbreviation}{% - \glssetattribute{\the\glslabeltok}{regular}{true}}% -}% -{% +\newcommand*{\@mglsreset}[1]{% + \expandafter\global\csname @gls@combined@#1@flagfalse\endcsname +} % \end{macrocode} -%\changes{1.42}{2020-02-03}{removed \cs{protect} from \cs{glsxtrsmsuffix}} +%\end{macro} +% +%\begin{macro}{\mglslocalunset} +%\changes{1.48}{2021-11-22}{new} +%Unset the flag. % \begin{macrocode} - \renewcommand*\glsabbrvfont[1]{\glsabbrvsmfont{##1}}% - \renewcommand*\glsfirstabbrvfont[1]{\glsfirstabbrvsmfont{##1}}% - \renewcommand*{\abbrvpluralsuffix}{\glsxtrsmsuffix}% - \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% - \renewcommand*{\glslongfont}[1]{\glslongdefaultfont{##1}}% +\newcommand*{\mglslocalunset}[1]{% + \gls@ifnotmeasuring + {% + \glsxtrifmulti{#1}{\@mglslocalunset{#1}}% + {% + \glsxtrundefaction{Multi entry `#1' hasn't been defined}% + {You need to define `#1' with \string\multiglossaryentry}% + }% + }% +} % \end{macrocode} -% The inline full form displays the short form followed by the -% long form in parentheses. +%\end{macro} +% +%\begin{macro}{\@mglslocalunset} +%\changes{1.48}{2021-11-22}{new} % \begin{macrocode} - \renewcommand*{\glsxtrinlinefullformat}[2]{% - \protect\glsfirstabbrvsmfont{\glsaccessshort{##1}% - \ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstlongdefaultfont{\glsaccesslong{##1}}}% - }% - \renewcommand*{\glsxtrinlinefullplformat}[2]{% - \protect\glsfirstabbrvsmfont{\glsaccessshortpl{##1}% - \ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstlongdefaultfont{\glsaccesslongpl{##1}}}% - }% +\newcommand*{\@mglslocalunset}[1]{% + \csname @gls@combined@#1@flagtrue\endcsname +} % \end{macrocode} -%\changes{1.21}{2017-11-03}{corrected first letter uppercasing} +%\end{macro} +% +%\begin{macro}{\mglslocalreset} +%\changes{1.48}{2021-11-22}{new} +%Unset the flag. % \begin{macrocode} - \renewcommand*{\Glsxtrinlinefullformat}[2]{% - \protect\glsfirstabbrvsmfont{\Glsaccessshort{##1}% - \ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstlongdefaultfont{\glsaccesslong{##1}}}% - }% - \renewcommand*{\Glsxtrinlinefullplformat}[2]{% - \protect\glsfirstabbrvsmfont{\Glsaccessshortpl{##1}% - \ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstlongdefaultfont{\glsaccesslongpl{##1}}}% - }% +\newcommand*{\mglslocalreset}[1]{% + \gls@ifnotmeasuring + {% + \glsxtrifmulti{#1}{\@mglslocalreset{#1}}% + {% + \glsxtrundefaction{Multi entry `#1' hasn't been defined}% + {You need to define `#1' with \string\multiglossaryentry}% + }% + }% +} % \end{macrocode} -% The first use full form only displays the short form, but it -% typically won't be used as the \catattr{regular} attribute is set by this style. +%\end{macro} +% +%\begin{macro}{\@mglslocalreset} +%\changes{1.48}{2021-11-22}{new} % \begin{macrocode} - \renewcommand*{\glsxtrfullformat}[2]{% - \glsfirstabbrvsmfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - }% - \renewcommand*{\glsxtrfullplformat}[2]{% - \glsfirstabbrvsmfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - }% - \renewcommand*{\Glsxtrfullformat}[2]{% - \glsfirstabbrvsmfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - }% - \renewcommand*{\Glsxtrfullplformat}[2]{% - \glsfirstabbrvsmfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - }% +\newcommand*{\@mglslocalreset}[1]{% + \csname @gls@combined@#1@flagfalse\endcsname } % \end{macrocode} -%\end{abbrvstyle} +%\end{macro} % -%\begin{abbrvstyle}{short-sm-nolong} -%\changes{1.04}{2016-05-02}{new} +%\begin{macro}{\mglsunsetall} +%\changes{1.48}{2021-11-22}{new} +%Unset all. % \begin{macrocode} -\letabbreviationstyle{short-sm-nolong}{short-sm} +\newcommand*{\mglsunsetall}{% + \@for\@mgls@thislabel:=\@multi@glossaryentry@list\do{\mglsunset\@mgls@thislabel}% +}% % \end{macrocode} -%\end{abbrvstyle} +%\end{macro} % -%\begin{abbrvstyle}{short-sm-desc} -%\changes{0.5}{2015-12-07}{new} -%\changes{1.39}{2019-03-22}{corrected to omit \gloskey{description} key as advertised in the -%manual} +%\begin{macro}{\mglsresetall} +%\changes{1.48}{2021-11-22}{new} +%Reset all. % \begin{macrocode} -\newabbreviationstyle{short-sm-desc}% -{% +\newcommand*{\mglsresetall}{% + \@for\@mgls@thislabel:=\@multi@glossaryentry@list\do{\mglsreset\@mgls@thislabel}% +}% % \end{macrocode} -% Set accessibility attributes if enabled. +%\end{macro} +% +%\begin{macro}{\mglsSetMain} +%\changes{1.48}{2021-11-22}{new} +%\begin{definition} +%\cs{mglsSetName}\marg{multi-label}\marg{new main} +%\end{definition} +%Allow the main label to be changed (local). % \begin{macrocode} - \glsxtrAccSuppAbbrSetNoLongAttrs\glscategorylabel +\newrobustcmd{\mglsSetMain}[2]{% + \ifcsundef{@gls@combined@#1@main}% + {\PackageError{glossaries-extra}{Multi-entry label `#1' not defined}{}}% + {% + \protected@edef\@gls@combined@current@main{#2}% + \letcs\@gls@combined@currentlist{@gls@combined@#1@list}% % \end{macrocode} -% Setup the default fields. -% \begin{macrocode} - \renewcommand*{\CustomAbbreviationFields}{% - name={\glsxtrshortdescname}, - sort={\the\glsshorttok}, - first={\protect\glsfirstabbrvsmfont{\the\glsshorttok}}, - firstplural={\protect\glsfirstabbrvsmfont{\the\glsshortpltok}}, - text={\protect\glsabbrvsmfont{\the\glsshorttok}}, - plural={\protect\glsabbrvsmfont{\the\glsshortpltok}}}% - \renewcommand*{\GlsXtrPostNewAbbreviation}{% - \glssetattribute{\the\glslabeltok}{regular}{true}}% -}% -{% -% \end{macrocode} -%\changes{1.42}{2020-02-03}{removed \cs{protect} from \cs{glsxtrsmsuffix}} +% Check that the given label is in the list of elements and update +% main and last other element index. % \begin{macrocode} - \renewcommand*\glsabbrvfont[1]{\glsabbrvsmfont{##1}}% - \renewcommand*\glsfirstabbrvfont[1]{\glsfirstabbrvsmfont{##1}}% - \renewcommand*{\abbrvpluralsuffix}{\glsxtrsmsuffix}% - \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% - \renewcommand*{\glslongfont}[1]{\glslongdefaultfont{##1}}% + \mglselementindex=0\relax + \count@=0\relax + \@for\@gls@tmp:=\@gls@combined@currentlist\do{% + \advance\mglselementindex by 1\relax + \ifx\@gls@combined@current@main\@gls@tmp + \count@=\mglselementindex\relax + \let\@gls@combined@finalitem\@gls@tmp + \ifmultiglossaryentryglobal + \global\cslet{@gls@combined@#1@main}\@gls@combined@current@main + \csxdef{@gls@combined@#1@mainindex}{\the\mglselementindex}% + \else + \cslet{@gls@combined@#1@main}\@gls@combined@current@main + \csedef{@gls@combined@#1@mainindex}{\the\mglselementindex}% + \fi + \else + \ifmultiglossaryentryglobal + \csxdef{@gls@combined@#1@lastotherindex}{\the\mglselementindex}% + \else + \csedef{@gls@combined@#1@lastotherindex}{\the\mglselementindex}% + \fi + \fi + }% + \ifnum\count@=0\relax + \PackageError{glossaries-extra}{Label `#2' is not in `#1' set + (\@gls@combined@currentlist)}{}% % \end{macrocode} -% The inline full form displays the short format followed by the -% long form in parentheses. +% Default to final item. % \begin{macrocode} - \renewcommand*{\glsxtrinlinefullformat}[2]{% - \glsfirstabbrvsmfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstlongdefaultfont{\glsaccesslong{##1}}}% - }% - \renewcommand*{\glsxtrinlinefullplformat}[2]{% - \glsfirstabbrvsmfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstlongdefaultfont{\glsaccesslongpl{##1}}}% - }% - \renewcommand*{\Glsxtrinlinefullformat}[2]{% - \glsfirstabbrvsmfont{\Glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstlongdefaultfont{\glsaccesslong{##1}}}% - }% - \renewcommand*{\Glsxtrinlinefullplformat}[2]{% - \glsfirstabbrvsmfont{\Glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstlongdefaultfont{\glsaccesslongpl{##1}}}% + \ifmultiglossaryentryglobal + \global\cslet{@gls@combined@#1@main}\@gls@combined@finalitem + \csxdef{@gls@combined@#1@mainindex}{\the\mglselementindex}% + \csxdef{@gls@combined@#1@lastotherindex}{% + \number\numexpr\mglselementindex-1 }% + \else + \cslet{@gls@combined@#1@main}\@gls@combined@finalitem + \csedef{@gls@combined@#1@mainindex}{\the\mglselementindex}% + \csedef{@gls@combined@#1@lastotherindex}{% + \number\numexpr\mglselementindex-1 }% + \fi + \fi }% +} % \end{macrocode} -% The first use full form only displays the short form, but it -% typically won't be used as the \catattr{regular} attribute is set by this style. +%\end{macro} +% +%\begin{macro}{\mglsSetOptions} +%\changes{1.48}{2021-11-22}{new} +%\begin{definition} +%\cs{mglsSetOptions}\marg{multi-label}\marg{new options} +%\end{definition} +%Allow the options to be changed (local). No expansion is applied. % \begin{macrocode} - \renewcommand*{\glsxtrfullformat}[2]{% - \glsfirstabbrvsmfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - }% - \renewcommand*{\glsxtrfullplformat}[2]{% - \glsfirstabbrvsmfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - }% - \renewcommand*{\Glsxtrfullformat}[2]{% - \glsfirstabbrvsmfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - }% - \renewcommand*{\Glsxtrfullplformat}[2]{% - \glsfirstabbrvsmfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi +\newrobustcmd{\mglsSetOptions}[2]{% + \ifcsundef{@gls@combined@#1@main}% + {\PackageError{glossaries-extra}{Multi-entry label `#1' not defined}{}}% + {% + \csdef{@gls@combined@#1@options}{#2}% }% } % \end{macrocode} -%\end{abbrvstyle} -%\begin{abbrvstyle}{short-sm-nolong-desc} -%\changes{1.04}{2016-05-02}{new} -% \begin{macrocode} -\letabbreviationstyle{short-sm-nolong-desc}{short-sm-desc} -% \end{macrocode} -%\end{abbrvstyle} +%\end{macro} % -%\begin{abbrvstyle}{nolong-short-sm} -%\changes{1.21}{2017-11-03}{new} -% \begin{macrocode} -\newabbreviationstyle{nolong-short-sm}% -{% - \GlsXtrUseAbbrStyleSetup{short-sm-nolong}% -}% -{% - \GlsXtrUseAbbrStyleFmts{short-sm-nolong}% -% \end{macrocode} -% The inline full form displays the long form followed by the -% short form in parentheses. +%\begin{macro}{\mglsAddOptions} +%\changes{1.48}{2021-11-22}{new} +%\begin{definition} +%\cs{mglsAddOptions}\marg{multi-label}\marg{extra options} +%\end{definition} +%Allow the options to be changed (local). No expansion is applied. % \begin{macrocode} - \renewcommand*{\glsxtrinlinefullformat}[2]{% - \protect\glsfirstlongdefaultfont{\glsaccesslong{##1}% - \ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstabbrvsmfont{\glsaccessshort{##1}}}% - }% - \renewcommand*{\glsxtrinlinefullplformat}[2]{% - \protect\glsfirstlongdefaultfont{\glsaccesslongpl{##1}% - \ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstabbrvsmfont{\glsaccessshortpl{##1}}}% - }% - \renewcommand*{\Glsxtrinlinefullformat}[2]{% - \protect\glsfirstlongdefaultfont{\Glsaccesslong{##1}% - \ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstabbrvsmfont{\glsaccessshort{##1}}}% - }% - \renewcommand*{\Glsxtrinlinefullplformat}[2]{% - \protect\glsfirstlongdefaultfont{\Glsaccesslongpl{##1}% - \ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstabbrvsmfont{\glsaccessshortpl{##1}}}% +\newrobustcmd{\mglsAddOptions}[2]{% + \ifcsundef{@gls@combined@#1@main}% + {\PackageError{glossaries-extra}{Multi-entry label `#1' not defined}{}}% + {% + \ifcsempty{@gls@combined@#1@options}% + {\csdef{@gls@combined@#1@options}{#2}}% + {\csappto{@gls@combined@#1@options}{,#2}}% }% } % \end{macrocode} -%\end{abbrvstyle} +%\end{macro} % -%\begin{abbrvstyle}{long-noshort-sm} -%\changes{0.5}{2015-12-07}{new} -%\changes{1.04}{2016-05-02}{renamed from \qt{long-sm}} -% The smallcaps font will only be used if -% the short form is explicitly invoked through commands like -% \cs{glsshort}. -% \begin{macrocode} -\newabbreviationstyle{long-noshort-sm}% -{% -% \end{macrocode} -% Set accessibility attributes if enabled. +%Options for \cs{mgls}: +%\begin{macro}{\@mgls@all} +%\changes{1.48}{2021-11-22}{new} +%Options to apply to all elements. % \begin{macrocode} - \glsxtrAccSuppAbbrSetNameShortAttrs\glscategorylabel +\newcommand*{\@mgls@all}{} +\define@key{mgls}{all}{\renewcommand*{\@mgls@all}{#1}} % \end{macrocode} -% Setup the default fields. +%\end{macro} +% +%\begin{macro}{\@mgls@main} +%\changes{1.48}{2021-11-22}{new} +%Options to apply to the main element only. % \begin{macrocode} - \renewcommand*{\CustomAbbreviationFields}{% - name={\glsxtrlongnoshortname}, - sort={\the\glsshorttok}, - first={\protect\glsfirstlongdefaultfont{\the\glslongtok}}, - firstplural={\protect\glsfirstlongdefaultfont{\the\glslongpltok}}, - text={\protect\glslongdefaultfont{\the\glslongtok}}, - plural={\protect\glslongdefaultfont{\the\glslongpltok}},% - description={\the\glslongtok}% - }% - \renewcommand*{\GlsXtrPostNewAbbreviation}{% - \glssetattribute{\the\glslabeltok}{regular}{true}}% -}% -{% +\newcommand*{\@mgls@main}{} +\define@key{mgls}{main}{\renewcommand*{\@mgls@main}{#1}} % \end{macrocode} -%\changes{1.42}{2020-02-03}{removed \cs{protect} from \cs{glsxtrsmsuffix}} +%\end{macro} +% +%\begin{macro}{\@mgls@others} +%\changes{1.48}{2021-11-22}{new} +%Options to apply to the other (no main) elements. % \begin{macrocode} - \renewcommand*\glsabbrvfont[1]{\glsabbrvsmfont{##1}}% - \renewcommand*\glsfirstabbrvfont[1]{\glsfirstabbrvsmfont{##1}}% - \renewcommand*{\abbrvpluralsuffix}{\glsxtrsmsuffix}% - \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% - \renewcommand*{\glslongfont}[1]{\glslongdefaultfont{##1}}% +\newcommand*{\@mgls@others}{} +\define@key{mgls}{others}{\renewcommand*{\@mgls@others}{#1}} % \end{macrocode} -% The format for subsequent use (not used when the regular attribute -% is set). +%\end{macro} +% +%\begin{macro}{\@mgls@setup} +%\changes{1.48}{2021-11-22}{new} +%Options to apply to \cs{multiglossaryentrysetup}. % \begin{macrocode} - \renewcommand*{\glsxtrsubsequentfmt}[2]{% - \glslongdefaultfont{\glsaccesslong{##1}\ifglsxtrinsertinside ##2\fi}% - \ifglsxtrinsertinside \else##2\fi - }% - \renewcommand*{\glsxtrsubsequentplfmt}[2]{% - \glslongdefaultfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside ##2\fi}% - \ifglsxtrinsertinside \else##2\fi - }% - \renewcommand*{\Glsxtrsubsequentfmt}[2]{% - \glslongdefaultfont{\Glsaccesslong{##1}\ifglsxtrinsertinside ##2\fi}% - \ifglsxtrinsertinside \else##2\fi - }% - \renewcommand*{\Glsxtrsubsequentplfmt}[2]{% - \glslongdefaultfont{\Glsaccesslongpl{##1}\ifglsxtrinsertinside ##2\fi}% - \ifglsxtrinsertinside \else##2\fi - }% +\newcommand*{\@mgls@setup}{} +\define@key{mgls}{setup}{% + \@mgls@setup@do{\renewcommand*{\@mgls@setup}{#1}}% +} % \end{macrocode} -% The inline full form displays the long format followed by the -% short form in parentheses. +%\end{macro} +% +%\begin{macro}{\@mgls@setup@do} +%\changes{1.48}{2021-11-22}{new} % \begin{macrocode} - \renewcommand*{\glsxtrinlinefullformat}[2]{% - \glsfirstlongdefaultfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\protect\glsfirstabbrvsmfont{\glsaccessshort{##1}}}% - }% - \renewcommand*{\glsxtrinlinefullplformat}[2]{% - \glsfirstlongdefaultfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\protect\glsfirstabbrvsmfont{\glsaccessshortpl{##1}}}% - }% - \renewcommand*{\Glsxtrinlinefullformat}[2]{% - \glsfirstlongdefaultfont{\Glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\protect\glsfirstabbrvsmfont{\glsaccessshort{##1}}}% - }% - \renewcommand*{\Glsxtrinlinefullplformat}[2]{% - \glsfirstlongdefaultfont{\Glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\protect\glsfirstabbrvsmfont{\glsaccessshortpl{##1}}}% - }% +\newcommand*{\@mgls@setup@do}[1]{#1} % \end{macrocode} -% The first use full form only displays the long form, but it -% typically won't be used as the \catattr{regular} attribute is set by this style. +%\end{macro} +% +%\begin{macro}{\@mgls@setup@do@not} +%\changes{1.48}{2021-11-22}{new} % \begin{macrocode} - \renewcommand*{\glsxtrfullformat}[2]{% - \glsfirstlongdefaultfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - }% - \renewcommand*{\glsxtrfullplformat}[2]{% - \glsfirstlongdefaultfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - }% - \renewcommand*{\Glsxtrfullformat}[2]{% - \glsfirstlongdefaultfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - }% - \renewcommand*{\Glsxtrfullplformat}[2]{% - \glsfirstlongdefaultfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - }% +\newcommand*{\@mgls@setup@do@not}[1]{% + \PackageError{glossaries-extra}{`setup' key not permitted inside + `mglsopts' value}{}% } % \end{macrocode} -%\end{abbrvstyle} -%\begin{abbrvstyle}{long-sm} -%Backward compatibility: +%\end{macro} +% +%\begin{macro}{\mgls@disable@setup} +%\changes{1.48}{2021-11-22}{new} % \begin{macrocode} -\@glsxtr@deprecated@abbrstyle{long-sm}{long-noshort-sm} +\newcommand*{\mgls@disable@setup}{% + \let\@mgls@setup@do\@mgls@setup@do@not +} % \end{macrocode} -%\end{abbrvstyle} +%\end{macro} % -%\begin{abbrvstyle}{long-noshort-sm-desc} -%\changes{0.5}{2015-12-07}{new} -%\changes{1.04}{2016-05-02}{renamed from \cs{long-desc-sm}} -% The smaller font will only be used if -% the short form is explicitly invoked through commands like -% \cs{glsshort}. +%\begin{macro}{\mgls@enable@setup} +%\changes{1.48}{2021-11-22}{new} % \begin{macrocode} -\newabbreviationstyle{long-noshort-sm-desc}% -{% - \GlsXtrUseAbbrStyleSetup{long-noshort-desc}% -}% -{% +\newcommand*{\mgls@enable@setup}{% + \let\@mgls@setup@do\@firstofone +} % \end{macrocode} -%\changes{1.42}{2020-02-03}{removed \cs{protect} from \cs{glsxtrsmsuffix}} +%\end{macro} +% +%\begin{macro}{\@mgls@unsetaction} +%\changes{1.48}{2021-11-22}{new} % \begin{macrocode} - \renewcommand*\glsabbrvfont[1]{\glsabbrvsmfont{##1}}% - \renewcommand*\glsfirstabbrvfont[1]{\glsfirstabbrvsmfont{##1}}% - \renewcommand*{\abbrvpluralsuffix}{\glsxtrsmsuffix}% - \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% - \renewcommand*{\glslongfont}[1]{\glslongdefaultfont{##1}}% +\newcommand\@mgls@unsetaction{0} +\define@choicekey{mgls}{multiunset}[\@mgls@unsetaction@val\@mgls@unsetaction]% + {global,local,none}{} % \end{macrocode} -% The format for subsequent use (not used when the regular attribute -% is set). +%\end{macro} +% +%\begin{macro}{\ifKV@mgls@presetlocal} +%\changes{1.48}{2021-11-22}{new} % \begin{macrocode} - \renewcommand*{\glsxtrsubsequentfmt}[2]{% - \glslongdefaultfont{\glsaccesslong{##1}\ifglsxtrinsertinside ##2\fi}% - \ifglsxtrinsertinside \else##2\fi - }% - \renewcommand*{\glsxtrsubsequentplfmt}[2]{% - \glslongdefaultfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside ##2\fi}% - \ifglsxtrinsertinside \else##2\fi - }% - \renewcommand*{\Glsxtrsubsequentfmt}[2]{% - \glslongdefaultfont{\Glsaccesslong{##1}\ifglsxtrinsertinside ##2\fi}% - \ifglsxtrinsertinside \else##2\fi - }% - \renewcommand*{\Glsxtrsubsequentplfmt}[2]{% - \glslongdefaultfont{\Glsaccesslongpl{##1}\ifglsxtrinsertinside ##2\fi}% - \ifglsxtrinsertinside \else##2\fi - }% +\define@boolkey{mgls}{presetlocal}[true]{} +\KV@mgls@presetlocalfalse % \end{macrocode} -% The inline full form displays the long format followed by the -% short form in parentheses. +%\end{macro} +% +%\begin{macro}{\@mgls@hyper} +%\changes{1.48}{2021-11-22}{new} % \begin{macrocode} - \renewcommand*{\glsxtrinlinefullformat}[2]{% - \glsfirstlongdefaultfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\protect\glsfirstabbrvsmfont{\glsaccessshort{##1}}}% - }% - \renewcommand*{\glsxtrinlinefullplformat}[2]{% - \glsfirstlongdefaultfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\protect\glsfirstabbrvsmfont{\glsaccessshortpl{##1}}}% - }% - \renewcommand*{\Glsxtrinlinefullformat}[2]{% - \glsfirstlongdefaultfont{\Glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\protect\glsfirstabbrvsmfont{\glsaccessshort{##1}}}% - }% - \renewcommand*{\Glsxtrinlinefullplformat}[2]{% - \glsfirstlongdefaultfont{\Glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\protect\glsfirstabbrvsmfont{\glsaccessshortpl{##1}}}% - }% +\newcommand*{\@mgls@hyper}{} +\define@choicekey{mgls}{hyper}[\@mgls@hyper@val\@mgls@hyper@nr]{true,false}[true]% +{% + \renewcommand*{\@mgls@hyper}{hyper=#1}% + \ifnum\@mgls@hyper@nr=1\relax + \let\@mgls@hyperlink\@secondoftwo + \else + \let\@mgls@hyperlink\@@mgls@hyperlink + \fi +} % \end{macrocode} -% The first use full form only displays the long form, but it -% typically won't be used as the \catattr{regular} attribute is set by this style. +%\end{macro} +% +%\begin{macro}{\@@mgls@hyperlink} +%\changes{1.48}{2021-11-22}{new} % \begin{macrocode} - \renewcommand*{\glsxtrfullformat}[2]{% - \glsfirstlongdefaultfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - }% - \renewcommand*{\glsxtrfullplformat}[2]{% - \glsfirstlongdefaultfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - }% - \renewcommand*{\Glsxtrfullformat}[2]{% - \glsfirstlongdefaultfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - }% - \renewcommand*{\Glsxtrfullplformat}[2]{% - \glsfirstlongdefaultfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - }% +\newcommand*{\@@mgls@hyperlink}[2]{% + \ifx\@glslink\glsdonohyperlink + #2% + \else + \glsxtr@org@dohyperlink{\glolinkprefix#1}{#2}% + \fi } % \end{macrocode} -%\end{abbrvstyle} -%\begin{abbrvstyle}{long-desc-sm} -%Backward compatibility: +%\end{macro} +% +%\begin{macro}{\@mgls@hyperlink} +%\changes{1.48}{2021-11-22}{new} % \begin{macrocode} -\@glsxtr@deprecated@abbrstyle{long-desc-sm}{long-noshort-sm-desc} +\let\@mgls@hyperlink\@@mgls@hyperlink % \end{macrocode} -%\end{abbrvstyle} +%\end{macro} % -%\begin{abbrvstyle}{short-sm-footnote} -%\changes{0.5}{2015-12-07}{new} -%\changes{1.04}{2016-05-02}{renamed from \qt{footnote-sm}} -%\changes{1.42}{2020-02-03}{added missing text key} +%\begin{macro}{\mglsforelements} +%\changes{1.48}{2021-11-22}{new} +%\begin{definition} +%\cs{mglsforelements}\marg{multi-label}\marg{cs}\marg{body} +%\end{definition} % \begin{macrocode} -\newabbreviationstyle{short-sm-footnote}% -{% +\newcommand*{\mglsforelements}[3]{% + \expandafter\@for\expandafter#2\expandafter:\expandafter + =\csname @gls@combined@#1@list\endcsname\do{#3}% +} % \end{macrocode} -% Set accessibility attributes if enabled. +%\end{macro} +% +%\begin{macro}{\mglsforotherelements} +%\changes{1.48}{2021-11-22}{new} +%\begin{definition} +%\cs{mglsforotherelements}\marg{multi-label}\marg{cs}\marg{body} +%\end{definition} % \begin{macrocode} - \glsxtrAccSuppAbbrSetNoLongAttrs\glscategorylabel +\newcommand*{\mglsforotherelements}[3]{% + \expandafter\@for\expandafter#2\expandafter:\expandafter + =\csname @gls@combined@#1@list\endcsname\do + {\expandafter\ifdefequal\csname @gls@combined@#1@main\endcsname{#2}{}{#3}}% +} % \end{macrocode} -% Setup the default fields. +%\end{macro} +% +%\begin{macro}{\mglsunsetothers} +%\changes{1.48}{2021-11-22}{new} % \begin{macrocode} - \renewcommand*{\CustomAbbreviationFields}{% - name={\glsxtrfootnotename}, - sort={\the\glsshorttok}, - description={\the\glslongtok},% - first={\protect\glsfirstabbrvsmfont{\the\glsshorttok}% - \protect\glsxtrabbrvfootnote{\the\glslabeltok}% - {\protect\glsfirstlongfootnotefont{\the\glslongtok}}},% - firstplural={\protect\glsfirstabbrvsmfont{\the\glsshortpltok}% - \protect\glsxtrabbrvfootnote{\the\glslabeltok}% - {\protect\glsfirstlongfootnotefont{\the\glslongpltok}}},% - text={\protect\glsabbrvsmfont{\the\glsshorttok}},% - plural={\protect\glsabbrvsmfont{\the\glsshortpltok}}}% +\newcommand*{\mglsunsetothers}[1]{% + \mglsforotherelements{#1}{\@gls@tmp}{\glsunset{\@gls@tmp}}% +} % \end{macrocode} -% Switch off hyperlinks on first use to prevent nested hyperlinks, -% and unset the \catattr{regular} attribute if it has been set. -%\changes{0.5.1}{2015-12-07}{switch off regular attribute if set} +%\end{macro} +% +%\begin{macro}{\mglslocalunsetothers} +%\changes{1.48}{2021-11-22}{new} % \begin{macrocode} - \renewcommand*{\GlsXtrPostNewAbbreviation}{% - \glssetattribute{\the\glslabeltok}{nohyperfirst}{true}% - \glshasattribute{\the\glslabeltok}{regular}% - {% - \glssetattribute{\the\glslabeltok}{regular}{false}% - }% - {}% - }% -}% -{% +\newcommand*{\mglslocalunsetothers}[1]{% + \mglsforotherelements{#1}{\@gls@tmp}{\glslocalunset{\@gls@tmp}}% +} % \end{macrocode} -%\changes{1.42}{2020-02-03}{removed \cs{protect} from \cs{glsxtrsmsuffix}} +%\end{macro} +% +%\begin{macro}{\mglselementreset} +%\changes{1.48}{2021-11-22}{new} % \begin{macrocode} - \renewcommand*\glsabbrvfont[1]{\glsabbrvsmfont{##1}}% - \renewcommand*\glsfirstabbrvfont[1]{\glsfirstabbrvsmfont{##1}}% - \renewcommand*{\abbrvpluralsuffix}{\glsxtrsmsuffix}% - \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongfootnotefont{##1}}% - \renewcommand*{\glslongfont}[1]{\glslongfootnotefont{##1}}% +\newcommand*{\mglselementreset}[1]{% + \ifKV@mgls@presetlocal + \glslocalreset{#1}% + \else + \glsreset{#1}% + \fi +} % \end{macrocode} -% The full format displays the short form followed by the long form -% as a footnote. +%\end{macro} +% +%\begin{macro}{\mglselementunset} +%\changes{1.48}{2021-11-22}{new} % \begin{macrocode} - \renewcommand*{\glsxtrfullformat}[2]{% - \glsfirstabbrvsmfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - \protect\glsxtrabbrvfootnote{##1}% - {\glsfirstlongfootnotefont{\glsaccesslong{##1}}}% - }% - \renewcommand*{\glsxtrfullplformat}[2]{% - \glsfirstabbrvsmfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - \protect\glsxtrabbrvfootnote{##1}% - {\glsfirstlongfootnotefont{\glsaccesslongpl{##1}}}% - }% - \renewcommand*{\Glsxtrfullformat}[2]{% - \glsfirstabbrvsmfont{\Glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - \protect\glsxtrabbrvfootnote{##1}% - {\glsfirstlongfootnotefont{\glsaccesslong{##1}}}% - }% - \renewcommand*{\Glsxtrfullplformat}[2]{% - \glsfirstabbrvsmfont{\Glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - \protect\glsxtrabbrvfootnote{##1}% - {\glsfirstlongfootnotefont{\glsaccesslongpl{##1}}}% - }% +\newcommand*{\mglselementunset}[1]{% + \ifKV@mgls@presetlocal + \glslocalunset{#1}% + \else + \glsunset{#1}% + \fi +} % \end{macrocode} -% The first use full form and the inline full form use the short -% (long) style. +%\end{macro} +% +%\begin{macro}{\@mgls@resetall} +%\changes{1.48}{2021-11-22}{new} % \begin{macrocode} - \renewcommand*{\glsxtrinlinefullformat}[2]{% - \glsfirstabbrvsmfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstlongfootnotefont{\glsaccesslong{##1}}}% - }% - \renewcommand*{\glsxtrinlinefullplformat}[2]{% - \glsfirstabbrvsmfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstlongfootnotefont{\glsaccesslongpl{##1}}}% - }% - \renewcommand*{\Glsxtrinlinefullformat}[2]{% - \glsfirstabbrvsmfont{\Glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstlongfootnotefont{\glsaccesslong{##1}}}% - }% - \renewcommand*{\Glsxtrinlinefullplformat}[2]{% - \glsfirstabbrvsmfont{\Glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstlongfootnotefont{\glsaccesslongpl{##1}}}% - }% +\newcommand*{\@mgls@resetall}{} +\define@choicekey{mgls}{resetall}% +[\@mgls@resetall@val\@mgls@resetall@nr]{false,true}[true]% +{% + \ifcase\@mgls@resetall@nr\relax + \renewcommand*{\@mgls@resetall}{}% + \or + \renewcommand*{\@mgls@resetall}{% + \@for\@gls@resetlabel:=\mglscurrentlist\do{\mglselementreset\@gls@resetlabel}}% + \renewcommand*{\@mgls@unsetall}{}% + \fi } % \end{macrocode} -%\end{abbrvstyle} -%\begin{abbrvstyle}{footnote-sm} -%Backward compatibility: +%\end{macro} +% +%\begin{macro}{\@mgls@resetmain} +%\changes{1.48}{2021-11-22}{new} % \begin{macrocode} -\@glsxtr@deprecated@abbrstyle{footnote-sm}{short-sm-footnote} +\newcommand*{\@mgls@resetmain}{} +\define@choicekey{mgls}{resetmain} +[\@mgls@resetmain@val\@mgls@resetmain@nr]{false,true}[true]% +{% + \ifcase\@mgls@resetmain@nr\relax + \renewcommand*{\@mgls@resetmain}{}% + \or + \renewcommand*{\@mgls@resetmain}{\mglselementreset\mglscurrentmainlabel}% + \renewcommand*{\@mgls@unsetmain}{}% + \fi +} % \end{macrocode} -%\end{abbrvstyle} +%\end{macro} % -%\begin{abbrvstyle}{short-sm-footnote-desc} -% Like \abbrstyle{short-footnote} but with user supplied description. -%\changes{1.42}{2020-02-03}{new} +%\begin{macro}{\@mgls@resetothers} +%\changes{1.48}{2021-11-22}{new} % \begin{macrocode} -\newabbreviationstyle{short-sm-footnote-desc}% +\newcommand*{\@mgls@resetothers}{} +\define@choicekey{mgls}{resetothers} +[\@mgls@resetothers@val\@mgls@resetothers@nr]{false,true}[true]% {% + \ifcase\@mgls@resetothers@nr\relax + \renewcommand*{\@mgls@resetothers}{}% + \or + \renewcommand*{\@mgls@resetothers}{% + \@for\@gls@resetlabel:=\mglscurrentlist\do{% + \ifx\@gls@resetlabel\mglscurrentmainlabel + \else + \mglselementreset\@gls@resetlabel + \fi + }% + }% + \renewcommand*{\@mgls@unsetothers}{}% + \fi +} % \end{macrocode} -% Set accessibility attributes if enabled. +%\end{macro} +% +%\begin{macro}{\@mgls@unsetall} +%\changes{1.48}{2021-11-22}{new} % \begin{macrocode} - \glsxtrAccSuppAbbrSetNameLongAttrs\glscategorylabel +\newcommand*{\@mgls@unsetall}{} +\define@choicekey{mgls}{unsetall}% +[\@mgls@unsetall@val\@mgls@unsetall@nr]{false,true}[true]% +{% + \ifcase\@mgls@unsetall@nr\relax + \renewcommand*{\@mgls@unsetall}{}% + \or + \renewcommand*{\@mgls@unsetall}{% + \@for\@gls@unsetlabel:=\mglscurrentlist\do{\mglselementunset\@gls@unsetlabel}}% + \renewcommand*{\@mgls@resetall}{}% + \fi +} % \end{macrocode} -% Setup the default fields. +%\end{macro} +% +%\begin{macro}{\@mgls@unsetmain} +%\changes{1.48}{2021-11-22}{new} % \begin{macrocode} - \renewcommand*{\CustomAbbreviationFields}{% - name={\glsxtrfootnotedescname}, - sort={\glsxtrfootnotedescsort}, - first={\protect\glsfirstabbrvsmfont{\the\glsshorttok}% - \protect\glsxtrabbrvfootnote{\the\glslabeltok}% - {\protect\glsfirstlongfootnotefont{\the\glslongtok}}},% - firstplural={\protect\glsfirstabbrvsmfont{\the\glsshortpltok}% - \protect\glsxtrabbrvfootnote{\the\glslabeltok}% - {\protect\glsfirstlongfootnotefont{\the\glslongpltok}}},% - text={\protect\glsabbrvsmfont{\the\glsshorttok}},% - plural={\protect\glsabbrvsmfont{\the\glsshortpltok}}}% +\newcommand*{\@mgls@unsetmain}{} +\define@choicekey{mgls}{unsetmain} +[\@mgls@unsetmain@val\@mgls@unsetmain@nr]{false,true}[true]% +{% + \ifcase\@mgls@unsetmain@nr\relax + \renewcommand*{\@mgls@unsetmain}{}% + \or + \renewcommand*{\@mgls@unsetmain}{\mglselementunset\mglscurrentmainlabel}% + \renewcommand*{\@mgls@resetmain}{}% + \fi +} % \end{macrocode} -% Switch off hyperlinks on first use to prevent nested hyperlinks, -% and unset the \catattr{regular} attribute if it has been set. -%\changes{0.5.1}{2015-12-07}{switch off regular attribute if set} +%\end{macro} +% +%\begin{macro}{\@mgls@unsetothers} +%\changes{1.48}{2021-11-22}{new} % \begin{macrocode} - \renewcommand*{\GlsXtrPostNewAbbreviation}{% - \glssetattribute{\the\glslabeltok}{nohyperfirst}{true}% - \glshasattribute{\the\glslabeltok}{regular}% - {% - \glssetattribute{\the\glslabeltok}{regular}{false}% - }% - {}% - }% -}% +\newcommand*{\@mgls@unsetothers}{} +\define@choicekey{mgls}{unsetothers} +[\@mgls@unsetothers@val\@mgls@unsetothers@nr]{false,true}[true]% {% - \GlsXtrUseAbbrStyleFmts{short-sm-footnote}% + \ifcase\@mgls@unsetothers@nr\relax + \renewcommand*{\@mgls@unsetothers}{}% + \or + \renewcommand*{\@mgls@unsetothers}{% + \@for\@gls@unsetlabel:=\mglscurrentlist\do{% + \ifx\@gls@unsetlabel\mglscurrentmainlabel + \else + \mglselementunset\@gls@unsetlabel + \fi + }% + }% + \renewcommand*{\@mgls@resetothers}{}% + \fi } % \end{macrocode} -%\end{abbrvstyle} +%\end{macro} % -%\begin{abbrvstyle}{short-sm-postfootnote} -%\changes{0.5}{2015-12-07}{new} -%\changes{1.04}{2016-05-02}{renamed from \qt{postfootnote-sm}} -%\changes{1.42}{2020-02-03}{added missing text key} +%\begin{macro}{\glsxtr@setup@docurrent} +%\changes{1.48}{2021-11-22}{new} +%Set up the commands to determine whether or not to do the current +%element. % \begin{macrocode} -\newabbreviationstyle{short-sm-postfootnote}% -{% +\newcommand{\glsxtr@setup@docurrent}{% % \end{macrocode} -% Set accessibility attributes if enabled. +% \cs{mglscurrentlabel} expands to the label of the current element. +% Should this element be skipped? % \begin{macrocode} - \glsxtrAccSuppAbbrSetNoLongAttrs\glscategorylabel + \ifx\mglscurrentlabel\mglscurrentmainlabel % \end{macrocode} -% Setup the default fields. +% Main element. Should it be skipped? % \begin{macrocode} - \renewcommand*{\CustomAbbreviationFields}{% - name={\glsxtrfootnotename}, - sort={\the\glsshorttok}, - description={\the\glslongtok},% - first={\protect\glsfirstabbrvsmfont{\the\glsshorttok}},% - firstplural={\protect\glsfirstabbrvsmfont{\the\glsshortpltok}},% - text={\protect\glsabbrvsmfont{\the\glsshorttok}},% - plural={\protect\glsabbrvsmfont{\the\glsshortpltok}}}% + \mglsisfirstuse + {% + \ifKV@glsxtrcombined@firstskipmain + \let\@mgls@do@current@element\@gobble + \else + \let\@mgls@do@current@element\@firstofone + \fi + }% + {% + \ifKV@glsxtrcombined@usedskipmain + \let\@mgls@do@current@element\@gobble + \else + \let\@mgls@do@current@element\@firstofone + \fi + }% + \else % \end{macrocode} -% Make this category insert a footnote after the link if this was -% the first use, and -% unset the \catattr{regular} attribute if it has been set. +% Other element. Should it be skipped? % \begin{macrocode} - \renewcommand*{\GlsXtrPostNewAbbreviation}{% - \csdef{glsxtrpostlink\glscategorylabel}{% - \glsxtrifwasfirstuse - {% + \mglsisfirstuse + {% + \ifKV@glsxtrcombined@firstskipothers + \let\@mgls@do@current@element\@gobble + \else + \let\@mgls@do@current@element\@firstofone + \fi + }% + {% + \ifKV@glsxtrcombined@usedskipothers + \let\@mgls@do@current@element\@gobble + \else + \let\@mgls@do@current@element\@firstofone + \fi + }% + \fi +} % \end{macrocode} -% Needs the specific font command here as the style may have been -% lost by the time the footnote occurs. +%\end{macro} +% +%\begin{macro}{\glsxtr@mgls@checklastelement} +%\changes{1.48}{2021-11-22}{new} +% If the last element is skipped, \cs{mglsiflast} needs +% adjusting. +% The first argument should be either "first" or "used". +% The second argument is the multi-element label. % \begin{macrocode} - \glsxtrdopostpunc{\protect\glsxtrabbrvfootnote{\glslabel}% - {\glsfirstlongfootnotefont{\glsentrylong{\glslabel}}}}% - }% - {}% - }% - \glshasattribute{\the\glslabeltok}{regular}% +\newcommand*{\glsxtr@mgls@checklastelement}[2]{% + \ifbool{KV@glsxtrcombined@#1skipmain}% + {% + \ifbool{KV@glsxtrcombined@#1skipothers}% {% - \glssetattribute{\the\glslabeltok}{regular}{false}% +% \end{macrocode} +% This condition has already been checked for. +% \begin{macrocode} }% - {}% - }% + {% % \end{macrocode} -% The footnote needs to be suppressed in the inline form, so -% \cs{glsxtrfull} must set the first use switch off. +% Main skipped. The last item will be the last other element. % \begin{macrocode} - \renewcommand*{\glsxtrsetupfulldefs}{% - \let\glsxtrifwasfirstuse\@secondoftwo + \ifnum\mglselementindex=\glsxtrmultilastotherindex{#2}\relax + \let\mglsiflast\@firstoftwo + \else + \let\mglsiflast\@secondoftwo + \fi + }% }% -}% -{% + {% % \end{macrocode} -%\changes{1.42}{2020-02-03}{removed \cs{protect} from \cs{glsxtrsmsuffix}} +% Main not skipped. % \begin{macrocode} - \renewcommand*\glsabbrvfont[1]{\glsabbrvsmfont{##1}}% - \renewcommand*\glsfirstabbrvfont[1]{\glsfirstabbrvsmfont{##1}}% - \renewcommand*{\abbrvpluralsuffix}{\glsxtrsmsuffix}% - \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongfootnotefont{##1}}% - \renewcommand*{\glslongfont}[1]{\glslongfootnotefont{##1}}% + \ifbool{KV@glsxtrcombined@#1skipothers}% + {% % \end{macrocode} -% The full format displays the short form. The long form is -% deferred. +% Others skipped. The main element is the only item. % \begin{macrocode} - \renewcommand*{\glsxtrfullformat}[2]{% - \glsfirstabbrvsmfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - }% - \renewcommand*{\glsxtrfullplformat}[2]{% - \glsfirstabbrvsmfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - }% - \renewcommand*{\Glsxtrfullformat}[2]{% - \glsfirstabbrvsmfont{\Glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - }% - \renewcommand*{\Glsxtrfullplformat}[2]{% - \glsfirstabbrvsmfont{\Glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - }% + \ifnum\mglselementindex=\glsxtrmultimainindex{#2}\relax + \let\mglsiflast\@firstoftwo + \else + \let\mglsiflast\@secondoftwo + \fi + }% + {% % \end{macrocode} -% The first use full form and the inline full form use the short -% (long) style. +% None skipped. This isn't the last element. % \begin{macrocode} - \renewcommand*{\glsxtrinlinefullformat}[2]{% - \glsfirstabbrvsmfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstlongfootnotefont{\glsaccesslong{##1}}}% - }% - \renewcommand*{\glsxtrinlinefullplformat}[2]{% - \glsfirstabbrvsmfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstlongfootnotefont{\glsaccesslongpl{##1}}}% - }% - \renewcommand*{\Glsxtrinlinefullformat}[2]{% - \glsfirstabbrvsmfont{\Glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstlongfootnotefont{\glsaccesslong{##1}}}% - }% - \renewcommand*{\Glsxtrinlinefullplformat}[2]{% - \glsfirstabbrvsmfont{\Glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstlongfootnotefont{\glsaccesslongpl{##1}}}% + \let\mglsiflast\@secondoftwo + }% }% } % \end{macrocode} -%\end{abbrvstyle} -%\begin{abbrvstyle}{postfootnote-sm} -%Backward compatibility: -% \begin{macrocode} -\@glsxtr@deprecated@abbrstyle{postfootnote-sm}{short-sm-postfootnote} -% \end{macrocode} -%\end{abbrvstyle} +%\end{macro} % -%\begin{abbrvstyle}{short-sm-postfootnote-desc} -% Like \abbrstyle{short-sm-postfootnote} but with user supplied description. -%\changes{1.42}{2020-02-03}{new} +%\begin{macro}{\glsxtrmglsWarnAllSkipped} +%\changes{1.48}{2021-11-22}{new} +%Warning if all elements are skipped. The first argument is the +%warning message, the second argument is the inserted content (final +%optional argument), the third command is the encapsulation command +%(which may be a hyperlink). % \begin{macrocode} -\newabbreviationstyle{short-sm-postfootnote-desc}% -{% +\newcommand{\glsxtrmglsWarnAllSkipped}[3]{% + \GlossariesExtraWarning{#1}% + #3{#2}% +} % \end{macrocode} -% Set accessibility attributes if enabled. +%\end{macro} +% +%\begin{macro}{\glsxtr@mgls@applyopts} +%\changes{1.48}{2021-11-22}{new} % \begin{macrocode} - \glsxtrAccSuppAbbrSetNameLongAttrs\glscategorylabel +\newcommand*{\glsxtr@mgls@applyopts}[1]{% + \edef\@mgls@dooptions{\noexpand\setkeys*{mgls}{\expandonce#1}}% + \@mgls@dooptions % \end{macrocode} -% Setup the default fields. +% Append any unknown options to all. % \begin{macrocode} - \renewcommand*{\CustomAbbreviationFields}{% - name={\glsxtrfootnotedescname}, - sort={\glsxtrfootnotedescsort}, - first={\protect\glsfirstabbrvsmfont{\the\glsshorttok}},% - firstplural={\protect\glsfirstabbrvsmfont{\the\glsshortpltok}},% - text={\protect\glsabbrvsmfont{\the\glsshorttok}},% - plural={\protect\glsabbrvsmfont{\the\glsshortpltok}}}% + \ifdefvoid\XKV@rm{}{\eappto\@mgls@all{,\expandonce\XKV@rm}}% % \end{macrocode} -% Make this category insert a footnote after the link if this was -% the first use, and -% unset the \catattr{regular} attribute if it has been set. +% If setup key has been used, check for pre-option keys: % \begin{macrocode} - \renewcommand*{\GlsXtrPostNewAbbreviation}{% - \csdef{glsxtrpostlink\glscategorylabel}{% - \glsxtrifwasfirstuse - {% + \ifdefvoid\@mgls@setup + {}% + {% + \edef\@mgls@dooptions{% + \noexpand\setkeys*{glsxtrcombinedpreopts}{\expandonce\@mgls@setup}}% + \mgls@disable@mglsopts + \@mgls@dooptions + \mgls@enable@mglsopts % \end{macrocode} -% Needs the specific font command here as the style may have been -% lost by the time the footnote occurs. +% Save remaining setup options. % \begin{macrocode} - \glsxtrdopostpunc{\protect\glsxtrabbrvfootnote{\glslabel}% - {\glsfirstlongfootnotefont{\glsentrylong{\glslabel}}}}% - }% - {}% - }% - \glshasattribute{\the\glslabeltok}{regular}% - {% - \glssetattribute{\the\glslabeltok}{regular}{false}% - }% - {}% + \ifx\@mgls@setupoptions\@empty + \let\@mgls@setupoptions\XKV@rm + \else + \eappto\@mgls@setupoptions{,\expandonce\XKV@rm}% + \fi }% % \end{macrocode} -% The footnote needs to be suppressed in the inline form, so -% \cs{glsxtrfull} must set the first use switch off. +% Apply gls unset/reset options. % \begin{macrocode} - \renewcommand*{\glsxtrsetupfulldefs}{% - \let\glsxtrifwasfirstuse\@secondoftwo - }% -}% -{% - \GlsXtrUseAbbrStyleFmts{short-sm-postfootnote}% -} + \@mgls@resetall + \@mgls@unsetall + \@mgls@resetmain + \@mgls@unsetmain + \@mgls@resetothers + \@mgls@unsetothers % \end{macrocode} -%\end{abbrvstyle} -% -%\subsection{Predefined Styles (Emphasized)} -% These styles use \ics{emph} for the short form. -%\begin{macro}{\glsabbrvemfont} -%\changes{1.04}{2016-05-02}{new} +% Disable. % \begin{macrocode} -\newcommand*{\glsabbrvemfont}[1]{\emph{#1}}% + \let\@mgls@resetall\@empty + \let\@mgls@resetmain\@empty + \let\@mgls@resetothers\@empty + \let\@mgls@unsetall\@empty + \let\@mgls@unsetmain\@empty + \let\@mgls@unsetothers\@empty % \end{macrocode} -%\end{macro} -%\begin{macro}{\glsfirstabbrvemfont} -%\changes{1.04}{2016-05-02}{new} +% First use flags. % \begin{macrocode} -\newcommand*{\glsfirstabbrvemfont}[1]{\glsabbrvemfont{#1}}% + \ifmglsused\mglscurrentmultilabel + {\let\mglsisfirstuse\@secondoftwo}% + {\let\mglsisfirstuse\@firstoftwo}% +} % \end{macrocode} %\end{macro} -% The default short form suffix: -%\begin{macro}{\glsxtremsuffix} -%\changes{0.5}{2015-12-07}{new} +% +%\begin{macro}{\@firstofthree} +%\changes{1.48}{2021-11-22}{new} % \begin{macrocode} -\newcommand*{\glsxtremsuffix}{\glsxtrabbrvpluralsuffix} +\providecommand{\@firstofthree}[3]{#1} % \end{macrocode} %\end{macro} -%\begin{macro}{\glsfirstlongemfont} -%\changes{1.04}{2016-05-02}{new} -%Only used by the \qt{long-em} styles. +% +%\begin{macro}{\@secondofthree} +%\changes{1.48}{2021-11-22}{new} % \begin{macrocode} -\newcommand*{\glsfirstlongemfont}[1]{\glslongemfont{#1}}% +\providecommand{\@secondofthree}[3]{#2} % \end{macrocode} %\end{macro} % -%\begin{macro}{\glslongemfont} -%\changes{1.04}{2016-05-02}{new} -%Only used by the \qt{long-em} styles. +%\begin{macro}{\@thirdofthree} +%\changes{1.48}{2021-11-22}{new} % \begin{macrocode} -\newcommand*{\glslongemfont}[1]{\emph{#1}}% +\providecommand{\@thirdofthree}[3]{#3} % \end{macrocode} %\end{macro} % -%\begin{abbrvstyle}{long-short-em} -%\changes{0.5}{2015-12-07}{new} -% The long form is just set in the default long font. -%\changes{1.42}{2020-02-03}{added missing text key} +%The main internal command for referencing multi-entries: +%\begin{macro}{\glsxtr@mgls@inner} +%\changes{1.48}{2021-11-22}{new} +%\begin{definition} +%\cs{glsxtr@mgls@inner}\marg{options}\marg{label}\marg{insert}\marg{first +%cs}\marg{not first cs}\marg{main first cs}\marg{main other cs} +%\end{definition} % \begin{macrocode} -\newabbreviationstyle{long-short-em}% -{% +\newcommand*{\glsxtr@mgls@inner}[7]{% + \let\mglslastmainlabel\@empty + \let\mglsiflastmainwasfirstuse\@firstoftwo + \let\mglsiflastmainwasplural\@secondoftwo + \let\mglsiflastmaincapscase\@firstofthree + \let\mglsiflastmainskipped\@firstoftwo + \bgroup + \ifcsundef{@gls@combined@#2@main}% + {% + \glsxtrundefaction{Multi entry `#2' hasn't been defined}% + {You need to define `#2' with \string\multiglossaryentry}% + \gdef\@mgls@post@hookdefs{% + \protected@edef\mglslastmultilabel{#2}% + \let\mglswasfirstuse\@firstoftwo + \let\mglslastcategory\@empty + \let\mglsiflastelementskipped\@firstoftwo + \let\mglsiflastelementwasfirstuse\@firstoftwo + \let\mglsiflastelementwasplural\@secondoftwo + \let\mglsiflastelementcapscase\@firstofthree + \let\mglslastelementlabel\@empty + \let\mgls@do@postlinkhook\relax + }% + }% + {% % \end{macrocode} -% Set accessibility attributes if enabled. +%\changes{1.49}{2022-10-14}{initialise hooks} +% Initialise hooks in case component entries haven't been defined +% (which may happen with \app{bib2gls}). % \begin{macrocode} - \glsxtrAccSuppAbbrSetFirstLongAttrs\glscategorylabel + \let\glsxtrifwasfirstuse\@firstoftwo + \let\glsifplural\@secondoftwo + \let\glscapscase\@firstofthree % \end{macrocode} -% Setup the default fields. +% Save information for hooks. % \begin{macrocode} - \renewcommand*{\CustomAbbreviationFields}{% - name={\glsxtrlongshortname}, - sort={\the\glsshorttok}, - first={\protect\glsfirstlongdefaultfont{\the\glslongtok}% - \protect\glsxtrfullsep{\the\glslabeltok}% - \glsxtrparen{\protect\glsfirstabbrvemfont{\the\glsshorttok}}},% - firstplural={\protect\glsfirstlongdefaultfont{\the\glslongpltok}% - \protect\glsxtrfullsep{\the\glslabeltok}% - \glsxtrparen{\protect\glsfirstabbrvemfont{\the\glsshortpltok}}},% - text={\protect\glsabbrvemfont{\the\glsshorttok}},% - plural={\protect\glsabbrvemfont{\the\glsshortpltok}},% - description={\the\glslongtok}}% - \renewcommand*{\GlsXtrPostNewAbbreviation}{% - \glshasattribute{\the\glslabeltok}{regular}% - {% - \glssetattribute{\the\glslabeltok}{regular}{false}% - }% - {}% - }% -}% -{% + \protected@edef\mglscurrentmultilabel{#2}% + \letcs\mglscurrentmainlabel{@gls@combined@#2@main}% + \letcs\mglscurrentlist{@gls@combined@#2@list}% + \letcs\mglscurrentoptions{@gls@combined@#2@options}% % \end{macrocode} -%\changes{1.42}{2020-02-03}{removed \cs{protect} from \cs{glsxtremsuffix}} +% Initialise (may be changed if \texttt{multiunset} is present): % \begin{macrocode} - \renewcommand*\glsabbrvfont[1]{\glsabbrvemfont{##1}}% - \renewcommand*\glsfirstabbrvfont[1]{\glsfirstabbrvemfont{##1}}% - \renewcommand*{\abbrvpluralsuffix}{\glsxtremsuffix}% + \ifmglsused\mglscurrentmultilabel + {\let\mglsisfirstuse\@secondoftwo}% + {\let\mglsisfirstuse\@firstoftwo}% % \end{macrocode} -% Use the default long fonts. +% Only obtain pre-option keys: % \begin{macrocode} - \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% - \renewcommand*{\glslongfont}[1]{\glslongdefaultfont{##1}}% + \edef\@mgls@dooptions{% + \noexpand\setkeys*{glsxtrcombinedpreopts}{\expandonce\mglscurrentoptions}}% + \@mgls@dooptions % \end{macrocode} -% The first use full form and the inline full form are the same for -% this style. +% Save remaining setup options. % \begin{macrocode} - \renewcommand*{\glsxtrfullformat}[2]{% - \glsfirstlongdefaultfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - \glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstabbrvemfont{\glsaccessshort{##1}}}% - }% - \renewcommand*{\glsxtrfullplformat}[2]{% - \glsfirstlongdefaultfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstabbrvemfont{\glsaccessshortpl{##1}}}% - }% - \renewcommand*{\Glsxtrfullformat}[2]{% - \glsfirstlongdefaultfont{\Glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstabbrvemfont{\glsaccessshort{##1}}}% - }% - \renewcommand*{\Glsxtrfullplformat}[2]{% - \glsfirstlongdefaultfont{\Glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstabbrvemfont{\glsaccessshortpl{##1}}}% - }% -} + \let\@mgls@setupoptions\XKV@rm % \end{macrocode} -%\end{abbrvstyle} -% -%\begin{abbrvstyle}{long-short-em-desc} -%\changes{0.5}{2015-12-07}{new} +% Apply \cs{mgls} options. % \begin{macrocode} -\newabbreviationstyle{long-short-em-desc}% -{% + \mgls@disable@setup + \ifdefvoid\@gls@combined@mglsopts + {}% + {\glsxtr@mgls@applyopts\@gls@combined@mglsopts}% + \mgls@enable@setup % \end{macrocode} -% Set accessibility attributes if enabled. +% Apply options provided in \verb|#1|. % \begin{macrocode} - \glsxtrAccSuppAbbrSetTextShortAttrs\glscategorylabel + \ifstrempty{#1}{}{\def\@mgls@options{#1}\glsxtr@mgls@applyopts\@mgls@options}% % \end{macrocode} -% Setup the default fields. +% Check for attribute settings. % \begin{macrocode} - \renewcommand*{\CustomAbbreviationFields}{% - name={\glsxtrlongshortdescname}, - sort={\glsxtrlongshortdescsort},% - first={\protect\glsfirstlongdefaultfont{\the\glslongtok}% - \protect\glsxtrfullsep{\the\glslabeltok}% - \glsxtrparen{\protect\glsfirstabbrvemfont{\the\glsshorttok}}},% - firstplural={\protect\glsfirstlongdefaultfont{\the\glslongpltok}% - \protect\glsxtrfullsep{\the\glslabeltok}% - \glsxtrparen{\protect\glsfirstabbrvemfont{\the\glsshortpltok}}},% - text={\protect\glsabbrvemfont{\the\glsshorttok}},% - plural={\protect\glsabbrvemfont{\the\glsshortpltok}}% - }% + \ifx\@gls@combined@category\empty % \end{macrocode} -% Unset the \catattr{regular} attribute if it has been set. +% No category % \begin{macrocode} - \renewcommand*{\GlsXtrPostNewAbbreviation}{% - \glshasattribute{\the\glslabeltok}{regular}% - {% - \glssetattribute{\the\glslabeltok}{regular}{false}% - }% - {}% - }% -}% -{% + \else % \end{macrocode} -% As long-short-em style: +% Attribute options: % \begin{macrocode} - \GlsXtrUseAbbrStyleFmts{long-short-em}% -} + \glshascategoryattribute{\@gls@combined@category}{multioptions}% + {% + \letcs\@mgls@attroptions{@glsxtr@categoryattr@@\@gls@combined@category + @multioptions}% % \end{macrocode} -%\end{abbrvstyle} -% -%\begin{abbrvstyle}{long-em-short-em} -%\changes{1.04}{2016-05-02}{new} -%\changes{1.42}{2020-02-03}{added missing text key} +% Only obtain pre-option keys: % \begin{macrocode} -\newabbreviationstyle{long-em-short-em}% -{% + \let\@gls@combined@mglsopts\@empty + \edef\@mgls@dooptions{% + \noexpand\setkeys*{glsxtrcombinedpreopts}{\expandonce\@mgls@attroptions}}% + \@mgls@dooptions % \end{macrocode} -% Set accessibility attributes if enabled. +% Append remaining options: % \begin{macrocode} - \glsxtrAccSuppAbbrSetFirstLongAttrs\glscategorylabel + \eappto\@mgls@setupoptions{,\expandonce\XKV@rm}% + \ifx\@gls@combined@mglsopts\@empty + \else % \end{macrocode} -% Setup the default fields. -%\cs{glslongemfont} is used in the description since \cs{glsdesc} -%doesn't set the style. +% mgls options found: % \begin{macrocode} - \renewcommand*{\CustomAbbreviationFields}{% - name={\glsxtrlongshortname}, - sort={\the\glsshorttok}, - first={\protect\glsfirstlongemfont{\the\glslongtok}% - \protect\glsxtrfullsep{\the\glslabeltok}% - \glsxtrparen{\protect\glsfirstabbrvemfont{\the\glsshorttok}}},% - firstplural={\protect\glsfirstlongemfont{\the\glslongpltok}% - \protect\glsxtrfullsep{\the\glslabeltok}% - \glsxtrparen{\protect\glsfirstabbrvemfont{\the\glsshortpltok}}},% + \let\@mgls@setup\@empty + \mgls@disable@setup + \glsxtr@mgls@applyopts\@gls@combined@mglsopts + \mgls@enable@setup + \fi + }% + {}% + \fi % \end{macrocode} -%\changes{1.15}{2017-05-10}{fixed spelling of \cs{glsabbrvfont}} +% Apply setup options. % \begin{macrocode} - text={\protect\glsabbrvemfont{\the\glsshorttok}},% - plural={\protect\glsabbrvemfont{\the\glsshortpltok}},% - description={\protect\glslongemfont{\the\glslongtok}}}% + \edef\@mgls@dooptions{% + \noexpand\setkeys{glsxtrcombined}{\expandonce\@mgls@setupoptions}}% + \@mgls@dooptions % \end{macrocode} -% Unset the \catattr{regular} attribute if it has been set. +% Provide local user-level access to category: % \begin{macrocode} - \renewcommand*{\GlsXtrPostNewAbbreviation}{% - \glshasattribute{\the\glslabeltok}{regular}% - {% - \glssetattribute{\the\glslabeltok}{regular}{false}% - }% - {}% - }% -}% -{% + \let\mglscurrentcategory\@gls@combined@category % \end{macrocode} -%\changes{1.42}{2020-02-03}{removed \cs{protect} from \cs{glsxtremsuffix}} +% Should the entire content be a hyperlink? % \begin{macrocode} - \renewcommand*{\abbrvpluralsuffix}{\glsxtremsuffix}% - \renewcommand*{\glsabbrvfont}[1]{\glsabbrvemfont{##1}}% - \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvemfont{##1}}% - \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongemfont{##1}}% - \renewcommand*{\glslongfont}[1]{\glslongemfont{##1}}% + \ifnum\@gls@combined@hyper=1\relax + \def\@mgls@combinedlink{\@mgls@hyperlink{\mglscurrentmainlabel}}% + \else + \def\@mgls@combinedlink{\@firstofone}% + \fi % \end{macrocode} -% The first use full form and the inline full form are the same for -% this style. +% Entire content encapsulator. % \begin{macrocode} - \renewcommand*{\glsxtrfullformat}[2]{% - \glsfirstlongemfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - \glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstabbrvemfont{\glsaccessshort{##1}}}% - }% - \renewcommand*{\glsxtrfullplformat}[2]{% - \glsfirstlongemfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstabbrvemfont{\glsaccessshortpl{##1}}}% - }% - \renewcommand*{\Glsxtrfullformat}[2]{% - \glsfirstlongemfont{\Glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstabbrvemfont{\glsaccessshort{##1}}}% - }% - \renewcommand*{\Glsxtrfullplformat}[2]{% - \glsfirstlongemfont{\Glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstabbrvemfont{\glsaccessshortpl{##1}}}% - }% -} + \def\@gls@combined@encapsulator##1{% + \@mgls@combinedlink{\csuse{\@gls@combined@textformat}{##1}}}% % \end{macrocode} -%\end{abbrvstyle} -% -%\begin{abbrvstyle}{long-em-short-em-desc} -%\changes{1.04}{2016-05-02}{new} +% Initialise. % \begin{macrocode} -\newabbreviationstyle{long-em-short-em-desc}% -{% + \let\@mgls@do@current@element\@firstofone % \end{macrocode} -% Set accessibility attributes if enabled. +% Check if all elements are being skipped. % \begin{macrocode} - \glsxtrAccSuppAbbrSetTextShortAttrs\glscategorylabel + \mglsisfirstuse + {% + \ifKV@glsxtrcombined@firstskipmain + \ifKV@glsxtrcombined@firstskipothers % \end{macrocode} -% Setup the default fields. +% Just do the warning and insert. This will ignore the loop. % \begin{macrocode} - \renewcommand*{\CustomAbbreviationFields}{% - name={\glsxtrlongshortdescname}, - sort={\glsxtrlongshortdescsort},% - first={\protect\glsfirstlongemfont{\the\glslongtok}% - \protect\glsxtrfullsep{\the\glslabeltok}% - \glsxtrparen{\protect\glsfirstabbrvemfont{\the\glsshorttok}}},% - firstplural={\protect\glsfirstlongemfont{\the\glslongpltok}% - \protect\glsxtrfullsep{\the\glslabeltok}% - \glsxtrparen{\protect\glsfirstabbrvemfont{\the\glsshortpltok}}},% - text={\protect\glsabbrvemfont{\the\glsshorttok}},% - plural={\protect\glsabbrvemfont{\the\glsshortpltok}}% - }% + \let\@gls@org@combined@encapsulator\@gls@combined@encapsulator + \def\@gls@combined@encapsulator##1{% + \glsxtrmglsWarnAllSkipped{All elements skipped for + first use of multi-entry `#2'}{#3}% + {\@gls@org@combined@encapsulator}% + }% + \let\@mgls@do@current@element\@gobble + \fi + \fi + }% + {% + \ifKV@glsxtrcombined@usedskipmain + \ifKV@glsxtrcombined@usedskipothers % \end{macrocode} -% Unset the \catattr{regular} attribute if it has been set. +% Just do the warning and insert. This will ignore the loop. % \begin{macrocode} - \renewcommand*{\GlsXtrPostNewAbbreviation}{% - \glshasattribute{\the\glslabeltok}{regular}% - {% - \glssetattribute{\the\glslabeltok}{regular}{false}% - }% - {}% - }% -}% -{% - \GlsXtrUseAbbrStyleFmts{long-em-short-em}% -} + \let\@gls@org@combined@encapsulator\@gls@combined@encapsulator + \def\@gls@combined@encapsulator##1{% + \glsxtrmglsWarnAllSkipped{All elements skipped for + subsequent use of multi-entry `#2'}{#3}% + {\@gls@org@combined@encapsulator}% + }% + \let\@mgls@do@current@element\@gobble + \fi + \fi + }% % \end{macrocode} -%\end{abbrvstyle} -% -%\begin{abbrvstyle}{short-em-long} -% Now the short (long) version -%\changes{0.5}{2015-12-07}{new} -%\changes{1.42}{2020-02-03}{added missing text key} +% Determine prefix and suffix. % \begin{macrocode} -\newabbreviationstyle{short-em-long}% -{% + \mglsisfirstuse + {% + \let\mglscurrentprefix\@gls@combined@firstprefix + \let\mglscurrentsuffix\@gls@combined@firstsuffix + }% + {% + \let\mglscurrentprefix\@gls@combined@usedprefix + \let\mglscurrentsuffix\@gls@combined@usedsuffix + }% % \end{macrocode} -% Set accessibility attributes if enabled. +%Set up post-link hook used after current scope. % \begin{macrocode} - \glsxtrAccSuppAbbrSetFirstLongAttrs\glscategorylabel + \xdef\@mgls@post@hookdefs{% + \noexpand\def\noexpand\mglslastmultilabel{\expandonce\mglscurrentmultilabel}% + \noexpand\def\noexpand\mglslastcategory{\mglscurrentcategory}% + }% + \ifx\@mgls@do@current@element\@gobble + \gappto\@mgls@post@hookdefs{% + \let\mglsiflastelementskipped\@firstoftwo + \let\mglslastelementlabel\@empty + \let\mglsiflastelementwasfirstuse\@firstoftwo + \let\mglsiflastelementwasplural\@secondoftwo + \let\mglsiflastelementcapscase\@firstofthree + }% + \fi + \mglsisfirstuse + {% + \gappto\@mgls@post@hookdefs{\let\mglswasfirstuse\@firstoftwo}% % \end{macrocode} -% Setup the default fields. +% Determine if the multi-entry post-link hook should be applied. % \begin{macrocode} - \renewcommand*{\CustomAbbreviationFields}{% - name={\glsxtrshortlongname}, - sort={\the\glsshorttok}, - description={\the\glslongtok},% - first={\protect\glsfirstabbrvemfont{\the\glsshorttok}% - \protect\glsxtrfullsep{\the\glslabeltok}% - \glsxtrparen{\protect\glsfirstlongdefaultfont{\the\glslongtok}}},% - firstplural={\protect\glsfirstabbrvemfont{\the\glsshortpltok}% - \protect\glsxtrfullsep{\the\glslabeltok}% - \glsxtrparen{\protect\glsfirstlongdefaultfont{\the\glslongpltok}}},% - text={\protect\glsabbrvemfont{\the\glsshorttok}},% - plural={\protect\glsabbrvemfont{\the\glsshortpltok}}}% + \ifcase\@gls@combined@mpostlink@nr\relax % \end{macrocode} -% Unset the \catattr{regular} attribute if it has been set. +% \texttt{mpostlink=false}. % \begin{macrocode} - \renewcommand*{\GlsXtrPostNewAbbreviation}{% - \glshasattribute{\the\glslabeltok}{regular}% - {% - \glssetattribute{\the\glslabeltok}{regular}{false}% - }% - {}% - }% -}% -{% + \gappto\@mgls@post@hookdefs{\let\mgls@do@postlinkhook\relax}% + \or % \end{macrocode} -% Mostly as short-long style: -%\changes{1.05}{2016-06-10}{fixed incorrect font used by long form} -%\changes{1.42}{2020-02-03}{removed \cs{protect} from \cs{glsxtremsuffix}} +% \texttt{mpostlink=true}. % \begin{macrocode} - \renewcommand*{\abbrvpluralsuffix}{\glsxtremsuffix}% - \renewcommand*\glsabbrvfont[1]{\glsabbrvemfont{##1}}% - \renewcommand*\glsfirstabbrvfont[1]{\glsfirstabbrvemfont{##1}}% - \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% - \renewcommand*{\glslongfont}[1]{\glslongdefaultfont{##1}}% + \ifcase\@gls@combined@mpostlinkelement@nr\relax + \gappto\@mgls@post@hookdefs{\let\mgls@do@postlinkhook\mglslastelementpostlinkhook}% + \or + \gappto\@mgls@post@hookdefs{\let\mgls@do@postlinkhook\mglslastmainpostlinkhook}% + \or + \gappto\@mgls@post@hookdefs{\let\mgls@do@postlinkhook\mglscustompostlinkhook}% + \fi + \or % \end{macrocode} -% The first use full form and the inline full form are the same for -% this style. +% \texttt{mpostlink=firstonly}. % \begin{macrocode} - \renewcommand*{\glsxtrfullformat}[2]{% - \glsfirstabbrvemfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - \glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstlongdefaultfont{\glsaccesslong{##1}}}% - }% - \renewcommand*{\glsxtrfullplformat}[2]{% - \glsfirstabbrvemfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - \glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstlongdefaultfont{\glsaccesslongpl{##1}}}% - }% - \renewcommand*{\Glsxtrfullformat}[2]{% - \glsfirstabbrvemfont{\Glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstlongdefaultfont{\glsaccesslong{##1}}}% - }% - \renewcommand*{\Glsxtrfullplformat}[2]{% - \glsfirstabbrvemfont{\Glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstlongdefaultfont{\glsaccesslongpl{##1}}}% - }% -} + \ifcase\@gls@combined@mpostlinkelement@nr\relax + \gappto\@mgls@post@hookdefs{\let\mgls@do@postlinkhook\mglslastelementpostlinkhook}% + \or + \gappto\@mgls@post@hookdefs{\let\mgls@do@postlinkhook\mglslastmainpostlinkhook}% + \or + \gappto\@mgls@post@hookdefs{\let\mgls@do@postlinkhook\mglscustompostlinkhook}% + \fi + \or % \end{macrocode} -%\end{abbrvstyle} -% -%\begin{abbrvstyle}{short-em-long-desc} -% As before but user provides description -%\changes{0.5}{2015-12-07}{new} +% \texttt{mpostlink=usedonly}. % \begin{macrocode} -\newabbreviationstyle{short-em-long-desc}% -{% + \gappto\@mgls@post@hookdefs{\let\mgls@do@postlinkhook\relax}% + \fi + }% + {% + \gappto\@mgls@post@hookdefs{\let\mglswasfirstuse\@secondoftwo}% % \end{macrocode} -% Set accessibility attributes if enabled. +% Determine if the multi-entry post-link hook should be applied. % \begin{macrocode} - \glsxtrAccSuppAbbrSetTextShortAttrs\glscategorylabel + \ifcase\@gls@combined@mpostlink@nr\relax % \end{macrocode} -% Setup the default fields. +% \texttt{mpostlink=false}. % \begin{macrocode} - \renewcommand*{\CustomAbbreviationFields}{% - name={\glsxtrshortlongdescname}, - sort={\glsxtrshortlongdescsort}, - first={\protect\glsfirstabbrvemfont{\the\glsshorttok}% - \protect\glsxtrfullsep{\the\glslabeltok}% - \glsxtrparen{\protect\glsfirstlongdefaultfont{\the\glslongtok}}},% - firstplural={\protect\glsfirstabbrvemfont{\the\glsshortpltok}% - \protect\glsxtrfullsep{\the\glslabeltok}% - \glsxtrparen{\protect\glsfirstlongdefaultfont{\the\glslongpltok}}},% - text={\protect\glsabbrvemfont{\the\glsshorttok}},% - plural={\protect\glsabbrvemfont{\the\glsshortpltok}}% - }% + \gappto\@mgls@post@hookdefs{\let\mgls@do@postlinkhook\relax}% + \or % \end{macrocode} -% Unset the \catattr{regular} attribute if it has been set. +% \texttt{mpostlink=true}. % \begin{macrocode} - \renewcommand*{\GlsXtrPostNewAbbreviation}{% - \glshasattribute{\the\glslabeltok}{regular}% - {% - \glssetattribute{\the\glslabeltok}{regular}{false}% - }% - {}% - }% -}% -{% - \GlsXtrUseAbbrStyleFmts{short-em-long}% -} + \ifcase\@gls@combined@mpostlinkelement@nr\relax + \gappto\@mgls@post@hookdefs{\let\mgls@do@postlinkhook\mglslastelementpostlinkhook}% + \or + \gappto\@mgls@post@hookdefs{\let\mgls@do@postlinkhook\mglslastmainpostlinkhook}% + \or + \gappto\@mgls@post@hookdefs{\let\mgls@do@postlinkhook\mglscustompostlinkhook}% + \fi + \or % \end{macrocode} -%\end{abbrvstyle} -% -%\begin{abbrvstyle}{short-em-long-em} -%\changes{1.04}{2016-05-02}{new} -%\changes{1.42}{2020-02-03}{added missing text key} +% \texttt{mpostlink=firstonly}. % \begin{macrocode} -\newabbreviationstyle{short-em-long-em}% -{% + \gappto\@mgls@post@hookdefs{\let\mgls@do@postlinkhook\relax}% + \or % \end{macrocode} -% Set accessibility attributes if enabled. +% \texttt{mpostlink=usedonly}. % \begin{macrocode} - \glsxtrAccSuppAbbrSetFirstLongAttrs\glscategorylabel + \ifcase\@gls@combined@mpostlinkelement@nr\relax + \gappto\@mgls@post@hookdefs{\let\mgls@do@postlinkhook\mglslastelementpostlinkhook}% + \or + \gappto\@mgls@post@hookdefs{\let\mgls@do@postlinkhook\mglslastmainpostlinkhook}% + \or + \gappto\@mgls@post@hookdefs{\let\mgls@do@postlinkhook\mglscustompostlinkhook}% + \fi + \fi + }% % \end{macrocode} -% Setup the default fields. -%\cs{glslongemfont} is used in the description since \cs{glsdesc} -%doesn't set the style. +% Save current post-link hook. % \begin{macrocode} - \renewcommand*{\CustomAbbreviationFields}{% - name={\glsxtrshortlongname}, - sort={\the\glsshorttok}, - description={\protect\glslongemfont{\the\glslongtok}},% - first={\protect\glsfirstabbrvemfont{\the\glsshorttok}% - \protect\glsxtrfullsep{\the\glslabeltok}% - \glsxtrparen{\protect\glsfirstlongemfont{\the\glslongtok}}},% - firstplural={\protect\glsfirstabbrvemfont{\the\glsshortpltok}% - \protect\glsxtrfullsep{\the\glslabeltok}% - \glsxtrparen{\protect\glsfirstlongemfont{\the\glslongpltok}}},% + \let\mgls@org@postlinkhook\glspostlinkhook % \end{macrocode} -%\changes{1.15}{2017-05-10}{fixed spelling of \cs{glsabbrvfont}} +% Prefix. % \begin{macrocode} - text={\protect\glsabbrvemfont{\the\glsshorttok}},% - plural={\protect\glsabbrvemfont{\the\glsshortpltok}}}% + \mglsprefix % \end{macrocode} -% Unset the \catattr{regular} attribute if it has been set. +% Initialise last element label (for \cs{mglssuffix}). % \begin{macrocode} - \renewcommand*{\GlsXtrPostNewAbbreviation}{% - \glshasattribute{\the\glslabeltok}{regular}% - {% - \glssetattribute{\the\glslabeltok}{regular}{false}% - }% - {}% - }% -}% -{% + \let\mglslastelementlabel\@empty + \@gls@combined@encapsulator + {% % \end{macrocode} -%\changes{1.42}{2020-02-03}{removed \cs{protect} from \cs{glsxtremsuffix}} +% Save previous label. % \begin{macrocode} - \renewcommand*{\abbrvpluralsuffix}{\glsxtremsuffix}% - \renewcommand*{\glsabbrvfont}[1]{\glsabbrvemfont{##1}}% - \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvemfont{##1}}% - \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongemfont{##1}}% - \renewcommand*{\glslongfont}[1]{\glslongemfont{##1}}% + \def\@mgls@previouslabel{}% + \mglselementindex=0\relax + \@for\mglscurrentlabel:=\mglscurrentlist\do{% + \advance\mglselementindex by 1\relax + \glsxtr@setup@docurrent % \end{macrocode} -% The first use full form and the inline full form are the same for -% this style. +% Is this the last element? % \begin{macrocode} - \renewcommand*{\glsxtrfullformat}[2]{% - \glsfirstabbrvemfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - \glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstlongemfont{\glsaccesslong{##1}}}% - }% - \renewcommand*{\glsxtrfullplformat}[2]{% - \glsfirstabbrvemfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - \glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstlongemfont{\glsaccesslongpl{##1}}}% - }% - \renewcommand*{\Glsxtrfullformat}[2]{% - \glsfirstabbrvemfont{\Glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstlongemfont{\glsaccesslong{##1}}}% - }% - \renewcommand*{\Glsxtrfullplformat}[2]{% - \glsfirstabbrvemfont{\Glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstlongemfont{\glsaccesslongpl{##1}}}% - }% -} + \ifx\@xfor@nextelement\@nnil + \let\mglsiflast\@firstoftwo + \else + \let\mglsiflast\@secondoftwo % \end{macrocode} -%\end{abbrvstyle} -% -%\begin{abbrvstyle}{short-em-long-em-desc} -%\changes{1.04}{2016-05-02}{new} +% Are any elements being skipped? % \begin{macrocode} -\newabbreviationstyle{short-em-long-em-desc}% -{% + \mglsisfirstuse + {% + \glsxtr@mgls@checklastelement{first}{#2}% + }% + {% + \glsxtr@mgls@checklastelement{used}{#2}% + }% + \fi % \end{macrocode} -% Set accessibility attributes if enabled. +% Should the element post-link hook be used? % \begin{macrocode} - \glsxtrAccSuppAbbrSetTextShortAttrs\glscategorylabel + \ifcase\@gls@combined@postlinks@nr\relax % \end{macrocode} -% Setup the default fields. +% \texttt{postlinks=none} % \begin{macrocode} - \renewcommand*{\CustomAbbreviationFields}{% - name={\glsxtrshortlongdescname},% - sort={\glsxtrshortlongdescsort},% - first={\protect\glsfirstabbrvemfont{\the\glsshorttok}% - \protect\glsxtrfullsep{\the\glslabeltok}% - \glsxtrparen{\protect\glsfirstlongemfont{\the\glslongtok}}},% - firstplural={\protect\glsfirstabbrvemfont{\the\glsshortpltok}% - \protect\glsxtrfullsep{\the\glslabeltok}% - \glsxtrparen{\protect\glsfirstlongemfont{\the\glslongpltok}}},% - text={\protect\glsabbrvemfont{\the\glsshorttok}},% - plural={\protect\glsabbrvemfont{\the\glsshortpltok}}% - }% + \let\glspostlinkhook\relax + \or % \end{macrocode} -% Unset the \catattr{regular} attribute if it has been set. +% \texttt{postlinks=all} % \begin{macrocode} - \renewcommand*{\GlsXtrPostNewAbbreviation}{% - \glshasattribute{\the\glslabeltok}{regular}% - {% - \glssetattribute{\the\glslabeltok}{regular}{false}% - }% - {}% - }% -}% -{% - \GlsXtrUseAbbrStyleFmts{short-em-long-em}% -} + \let\glspostlinkhook\mgls@org@postlinkhook + \or % \end{macrocode} -%\end{abbrvstyle} -% -%\begin{abbrvstyle}{short-em} -%\changes{0.5}{2015-12-07}{new} +% \texttt{postlinks=notlast} % \begin{macrocode} -\newabbreviationstyle{short-em}% -{% + \mglsiflast + {% + \let\glspostlinkhook\relax + }% + {% + \let\glspostlinkhook\mgls@org@postlinkhook + }% + \or % \end{macrocode} -% Set accessibility attributes if enabled. +% \texttt{postlinks=mainnotlast} % \begin{macrocode} - \glsxtrAccSuppAbbrSetNoLongAttrs\glscategorylabel + \ifx\mglscurrentlabel\mglscurrentmainlabel + \mglsiflast + {% + \let\glspostlinkhook\relax + }% + {% + \let\glspostlinkhook\mgls@org@postlinkhook + }% + \else + \let\glspostlinkhook\relax + \fi + \or % \end{macrocode} -% Setup the default fields. +% \texttt{postlinks=mainonly} % \begin{macrocode} - \renewcommand*{\CustomAbbreviationFields}{% - name={\glsxtrshortnolongname}, - sort={\the\glsshorttok}, - first={\protect\glsfirstabbrvemfont{\the\glsshorttok}}, - firstplural={\protect\glsfirstabbrvemfont{\the\glsshortpltok}}, - text={\protect\glsabbrvemfont{\the\glsshorttok}}, - plural={\protect\glsabbrvemfont{\the\glsshortpltok}}, - description={\the\glslongtok}}% - \renewcommand*{\GlsXtrPostNewAbbreviation}{% - \glssetattribute{\the\glslabeltok}{regular}{true}}% -}% -{% + \ifx\mglscurrentlabel\mglscurrentmainlabel + \let\glspostlinkhook\mgls@org@postlinkhook + \else + \let\glspostlinkhook\relax + \fi + \or % \end{macrocode} -%\changes{1.42}{2020-02-03}{removed \cs{protect} from \cs{glsxtremsuffix}} +% \texttt{postlinks=othernotlast} % \begin{macrocode} - \renewcommand*{\abbrvpluralsuffix}{\glsxtremsuffix}% - \renewcommand*\glsabbrvfont[1]{\glsabbrvemfont{##1}}% - \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvemfont{##1}}% - \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% - \renewcommand*{\glslongfont}[1]{\glslongdefaultfont{##1}}% + \ifx\mglscurrentlabel\mglscurrentmainlabel + \let\glspostlinkhook\relax + \else + \mglsiflast + {% + \let\glspostlinkhook\relax + }% + {% + \let\glspostlinkhook\mgls@org@postlinkhook + }% + \fi + \or % \end{macrocode} -% The inline full form displays the short form followed by the -% long form in parentheses. +% \texttt{postlinks=otheronly} % \begin{macrocode} - \renewcommand*{\glsxtrinlinefullformat}[2]{% - \protect\glsfirstabbrvemfont{\glsaccessshort{##1}% - \ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstlongdefaultfont{\glsaccesslong{##1}}}% - }% - \renewcommand*{\glsxtrinlinefullplformat}[2]{% - \protect\glsfirstabbrvemfont{\glsaccessshortpl{##1}% - \ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstlongdefaultfont{\glsaccesslongpl{##1}}}% - }% + \ifx\mglscurrentlabel\mglscurrentmainlabel + \let\glspostlinkhook\relax + \else + \let\glspostlinkhook\mgls@org@postlinkhook + \fi + \fi % \end{macrocode} -%\changes{1.21}{2017-11-03}{new} +% Save the last element for the multi-entry post-link hook. % \begin{macrocode} - \renewcommand*{\Glsxtrinlinefullformat}[2]{% - \protect\glsfirstabbrvemfont{\Glsaccessshort{##1}% - \ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstlongdefaultfont{\glsaccesslong{##1}}}% - }% - \renewcommand*{\Glsxtrinlinefullplformat}[2]{% - \protect\glsfirstabbrvemfont{\Glsaccessshortpl{##1}% - \ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstlongdefaultfont{\glsaccesslongpl{##1}}}% - }% + \mglsiflast + {% + \xappto\@mgls@post@hookdefs{% + \noexpand\def\noexpand\mglslastelementlabel + {\expandonce\mglscurrentlabel}}% + }% + {}% % \end{macrocode} -% The first use full form only displays the short form, but it -% typically won't be used as the \catattr{regular} attribute is set by this style. +% Do current element: % \begin{macrocode} - \renewcommand*{\glsxtrfullformat}[2]{% - \glsfirstabbrvemfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - }% - \renewcommand*{\glsxtrfullplformat}[2]{% - \glsfirstabbrvemfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - }% - \renewcommand*{\Glsxtrfullformat}[2]{% - \glsfirstabbrvemfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - }% - \renewcommand*{\Glsxtrfullplformat}[2]{% - \glsfirstabbrvemfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - }% -} + \@mgls@do@current@element + {% % \end{macrocode} -%\end{abbrvstyle} -% -%\begin{abbrvstyle}{short-em-nolong} -%\changes{1.04}{2016-05-02}{new} +% Pre element hook. % \begin{macrocode} -\letabbreviationstyle{short-em-nolong}{short-em} + \mglselementprehook % \end{macrocode} -%\end{abbrvstyle} -% -%\begin{abbrvstyle}{short-em-desc} -%\changes{0.5}{2015-12-07}{new} -%\changes{1.39}{2019-03-22}{bug fix: omit \gloskey{description} key as advertised in the -%manual} +% Is this the first use of the current element? % \begin{macrocode} -\newabbreviationstyle{short-em-desc}% -{% + \GlsXtrIfUnusedOrUndefined{\mglscurrentlabel}% + {\let\@mgls@current@iffirstuse\@firstoftwo}% + {\let\@mgls@current@iffirstuse\@secondoftwo}% + \ifx\mglscurrentlabel\mglscurrentmainlabel % \end{macrocode} -% Set accessibility attributes if enabled. The default name includes -% the long form but \cs{glsxtrshortdescname} could be modified to -% omit the long form, so include the \category{nameshortaccess} -% attribute. +% Main element. +% Location encap option: % \begin{macrocode} - \glsxtrAccSuppAbbrSetNoLongAttrs\glscategorylabel + \edef\@mgls@current@options{format=\@gls@combined@encapmain}% % \end{macrocode} -% Setup the default fields. +%Indexing option: % \begin{macrocode} - \renewcommand*{\CustomAbbreviationFields}{% - name={\glsxtrshortdescname}, - sort={\the\glsshorttok}, - first={\protect\glsfirstabbrvemfont{\the\glsshorttok}}, - firstplural={\protect\glsfirstabbrvemfont{\the\glsshortpltok}}, - text={\protect\glsabbrvemfont{\the\glsshorttok}}, - plural={\protect\glsabbrvemfont{\the\glsshortpltok}}}% - \renewcommand*{\GlsXtrPostNewAbbreviation}{% - \glssetattribute{\the\glslabeltok}{regular}{true}}% -}% -{% + \ifcase\@gls@combined@indexmain + \appto\@mgls@current@options{,noindex}% + \or + \appto\@mgls@current@options{,noindex=false}% + \or + \@mgls@current@iffirstuse + {\appto\@mgls@current@options{,noindex=false}}% + {\appto\@mgls@current@options{,noindex}}% + \fi % \end{macrocode} -%\changes{1.42}{2020-02-03}{removed \cs{protect} from \cs{glsxtremsuffix}} +% Hyperlink option: % \begin{macrocode} - \renewcommand*{\abbrvpluralsuffix}{\glsxtremsuffix}% - \renewcommand*\glsabbrvfont[1]{\glsabbrvemfont{##1}}% - \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvemfont{##1}}% - \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% - \renewcommand*{\glslongfont}[1]{\glslongdefaultfont{##1}}% + \ifcase\@gls@combined@hyper\relax + \appto\@mgls@current@options{,hyper=false}% none + \or + \appto\@mgls@current@options{,hyper=false}% allmain + \or + \eappto\@mgls@current@options{,\@mgls@hyper}% mainonly + \or + \eappto\@mgls@current@options{,\@mgls@hyper}% individual + \or + \appto\@mgls@current@options{,hyper=false}% otheronly + \or + \mglsisfirstuse + {% + \appto\@mgls@current@options{,hyper=false}% notmainfirst + }% + {% + \eappto\@mgls@current@options{,\@mgls@hyper}% notmainfirst + }% + \or + \eappto\@mgls@current@options{,\@mgls@hyper}% nototherfirst + \or + \mglsisfirstuse + {% + \appto\@mgls@current@options{,hyper=false}% notfirst + }% + {% + \eappto\@mgls@current@options{,\@mgls@hyper}% notfirst + }% + \fi % \end{macrocode} -% The inline full form displays the short format followed by the -% long form in parentheses. +%Append all and then main: % \begin{macrocode} - \renewcommand*{\glsxtrinlinefullformat}[2]{% - \glsfirstabbrvemfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstlongdefaultfont{\glsaccesslong{##1}}}% - }% - \renewcommand*{\glsxtrinlinefullplformat}[2]{% - \glsfirstabbrvemfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstlongdefaultfont{\glsaccesslongpl{##1}}}% - }% - \renewcommand*{\Glsxtrinlinefullformat}[2]{% - \glsfirstabbrvemfont{\Glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstlongdefaultfont{\glsaccesslong{##1}}}% - }% - \renewcommand*{\Glsxtrinlinefullplformat}[2]{% - \glsfirstabbrvemfont{\Glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstlongdefaultfont{\glsaccesslongpl{##1}}}% - }% + \eappto\@mgls@current@options{,\@mgls@all,\@mgls@main}% + \else % \end{macrocode} -% The first use full form only displays the short form, but it -% typically won't be used as the \catattr{regular} attribute is set by this style. +% Other element. +% Location encap option: % \begin{macrocode} - \renewcommand*{\glsxtrfullformat}[2]{% - \glsfirstabbrvemfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - }% - \renewcommand*{\glsxtrfullplformat}[2]{% - \glsfirstabbrvemfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - }% - \renewcommand*{\Glsxtrfullformat}[2]{% - \glsfirstabbrvemfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - }% - \renewcommand*{\Glsxtrfullplformat}[2]{% - \glsfirstabbrvemfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - }% -} + \edef\@mgls@current@options{format=\@gls@combined@encapothers}% % \end{macrocode} -%\end{abbrvstyle} -%\begin{abbrvstyle}{short-em-nolong-desc} -%\changes{1.04}{2016-05-02}{new} +% Indexing option: % \begin{macrocode} -\letabbreviationstyle{short-em-nolong-desc}{short-em-desc} + \ifcase\@gls@combined@indexothers\relax + \appto\@mgls@current@options{,noindex}% + \or + \appto\@mgls@current@options{,noindex=false}% + \or + \@mgls@current@iffirstuse + {\appto\@mgls@current@options{,noindex=false}}% + {\appto\@mgls@current@options{,noindex}}% + \fi % \end{macrocode} -%\end{abbrvstyle} -% -%\begin{abbrvstyle}{nolong-short-em} -%\changes{1.21}{2017-11-03}{new} +% Hyperlink option: % \begin{macrocode} -\newabbreviationstyle{nolong-short-em}% -{% - \GlsXtrUseAbbrStyleSetup{short-em-nolong}% -}% -{% - \GlsXtrUseAbbrStyleFmts{short-em-nolong}% + \ifcase\@gls@combined@hyper\relax + \appto\@mgls@current@options{,hyper=false}% none + \or + \appto\@mgls@current@options{,hyper=false}% allmain + \or + \appto\@mgls@current@options{,hyper=false}% mainonly + \or + \eappto\@mgls@current@options{,\@mgls@hyper}% individual + \or + \eappto\@mgls@current@options{,\@mgls@hyper}% otheronly + \or + \eappto\@mgls@current@options{,\@mgls@hyper}% notmainfirst + \or + \mglsisfirstuse + {% + \appto\@mgls@current@options{,hyper=false}% nototherfirst + }% + {% + \eappto\@mgls@current@options{,\@mgls@hyper}% nototherfirst + }% + \or + \mglsisfirstuse + {% + \appto\@mgls@current@options{,hyper=false}% notfirst + }% + {% + \eappto\@mgls@current@options{,\@mgls@hyper}% notfirst + }% + \fi % \end{macrocode} -% The inline full form displays the long form followed by the -% short form in parentheses. +%Append all and then others: % \begin{macrocode} - \renewcommand*{\glsxtrinlinefullformat}[2]{% - \protect\glsfirstlongdefaultfont{\glsaccesslong{##1}% - \ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstabbrvemfont{\glsaccessshort{##1}}}% - }% - \renewcommand*{\glsxtrinlinefullplformat}[2]{% - \protect\glsfirstlongdefaultfont{\glsaccesslongpl{##1}% - \ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstabbrvemfont{\glsaccessshortpl{##1}}}% - }% - \renewcommand*{\Glsxtrinlinefullformat}[2]{% - \protect\glsfirstlongdefaultfont{\Glsaccesslong{##1}% - \ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstabbrvemfont{\glsaccessshort{##1}}}% - }% - \renewcommand*{\Glsxtrinlinefullplformat}[2]{% - \protect\glsfirstlongdefaultfont{\Glsaccesslongpl{##1}% - \ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstabbrvemfont{\glsaccessshortpl{##1}}}% - }% -} + \eappto\@mgls@current@options{,\@mgls@all,\@mgls@others}% + \fi % \end{macrocode} -%\end{abbrvstyle} -% -%\begin{abbrvstyle}{long-noshort-em} -%\changes{0.5}{2015-12-07}{new} -%\changes{1.04}{2016-05-02}{renamed from \qt{long-em}} -% The short form is explicitly invoked through commands like -% \cs{glsshort}. +% Is this the first element? % \begin{macrocode} -\newabbreviationstyle{long-noshort-em}% -{% + \ifx\@mgls@previouslabel\empty + \ifx\mglscurrentlabel\mglscurrentmainlabel + \let\@mgls@cs#6\relax + \else + \let\@mgls@cs#4\relax + \fi + \else % \end{macrocode} -% Set accessibility attributes if enabled. +% Not the first element so add separator. % \begin{macrocode} - \glsxtrAccSuppAbbrSetNameShortAttrs\glscategorylabel + \@mgls@previous@iffirstuse + {% + \@mgls@current@iffirstuse + {\glscombinedfirstsepfirst{\@mgls@previouslabel}{\mglscurrentlabel}}% + {\glscombinedfirstsep{\@mgls@previouslabel}{\mglscurrentlabel}}% + }% + {% + \@mgls@current@iffirstuse + {\glscombinedsepfirst{\@mgls@previouslabel}{\mglscurrentlabel}}% + {\glscombinedsep{\@mgls@previouslabel}{\mglscurrentlabel}}% + }% + \ifx\mglscurrentlabel\mglscurrentmainlabel + \let\@mgls@cs#7\relax + \else + \let\@mgls@cs#5\relax + \fi + \fi % \end{macrocode} -% Setup the default fields. +% Is this the last element? % \begin{macrocode} - \renewcommand*{\CustomAbbreviationFields}{% - name={\glsxtrlongnoshortname}, - sort={\the\glsshorttok}, - first={\protect\glsfirstlongdefaultfont{\the\glslongtok}}, - firstplural={\protect\glsfirstlongdefaultfont{\the\glslongpltok}}, - text={\protect\glslongdefaultfont{\the\glslongtok}}, - plural={\protect\glslongdefaultfont{\the\glslongpltok}},% - description={\the\glslongtok}% - }% - \renewcommand*{\GlsXtrPostNewAbbreviation}{% - \glssetattribute{\the\glslabeltok}{regular}{true}}% -}% -{% + \mglsiflast + {\expandafter\@mgls@cs\expandafter{\@mgls@current@options}{\mglscurrentlabel}[#3]}% + {\expandafter\@mgls@cs\expandafter{\@mgls@current@options}{\mglscurrentlabel}[]}% % \end{macrocode} -%\changes{1.42}{2020-02-03}{removed \cs{protect} from \cs{glsxtremsuffix}} +% Is this the main element? If so, save information for post-link +% hook. % \begin{macrocode} - \renewcommand*{\abbrvpluralsuffix}{\glsxtremsuffix}% - \renewcommand*\glsabbrvfont[1]{\glsabbrvemfont{##1}}% - \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvemfont{##1}}% - \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% - \renewcommand*{\glslongfont}[1]{\glslongdefaultfont{##1}}% + \ifx\mglscurrentlabel\mglscurrentmainlabel + \xappto\@mgls@post@hookdefs{% + \noexpand\def\noexpand\mglslastmainlabel + {\expandonce\mglscurrentmainlabel}% + }% + \glsxtrifwasfirstuse + {% + \gappto\@mgls@post@hookdefs{\let\mglsiflastmainwasfirstuse\@firstoftwo}% + }% + {% + \gappto\@mgls@post@hookdefs{\let\mglsiflastmainwasfirstuse\@secondoftwo}% + }% + \glsifplural + {% + \gappto\@mgls@post@hookdefs{\let\mglsiflastmainwasplural\@firstoftwo}% + }% + {% + \gappto\@mgls@post@hookdefs{\let\mglsiflastmainwasplural\@secondoftwo}% + }% + \glscapscase + {% + \gappto\@mgls@post@hookdefs{% + \let\mglsiflastmaincapscase\@firstofthree + }% + }% + {% + \gappto\@mgls@post@hookdefs{% + \let\mglsiflastmaincapscase\@secondofthree + }% + }% + {% + \gappto\@mgls@post@hookdefs{% + \let\mglsiflastmaincapscase\@thirdofthree + }% + }% + \fi + \let\@mgls@previouslabel\mglscurrentlabel + \let\@mgls@previous@iffirstuse\@mgls@current@iffirstuse + }% % \end{macrocode} -% The format for subsequent use (not used when the regular attribute -% is set). +% Post element hook. % \begin{macrocode} - \renewcommand*{\glsxtrsubsequentfmt}[2]{% - \glslongdefaultfont{\glsaccesslong{##1}\ifglsxtrinsertinside ##2\fi}% - \ifglsxtrinsertinside \else##2\fi - }% - \renewcommand*{\glsxtrsubsequentplfmt}[2]{% - \glslongdefaultfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside ##2\fi}% - \ifglsxtrinsertinside \else##2\fi - }% - \renewcommand*{\Glsxtrsubsequentfmt}[2]{% - \glslongdefaultfont{\Glsaccesslong{##1}\ifglsxtrinsertinside ##2\fi}% - \ifglsxtrinsertinside \else##2\fi - }% - \renewcommand*{\Glsxtrsubsequentplfmt}[2]{% - \glslongdefaultfont{\Glsaccesslongpl{##1}\ifglsxtrinsertinside ##2\fi}% - \ifglsxtrinsertinside \else##2\fi - }% + \mglselementposthook + }% + \ifx\mglslastmainlabel\@empty + \gappto\@mgls@post@hookdefs{\let\mglsiflastmainskipped\@firstoftwo}% + \else + \gappto\@mgls@post@hookdefs{\let\mglsiflastmainskipped\@secondoftwo}% + \fi % \end{macrocode} -% The inline full form displays the long format followed by the -% short form in parentheses. +% Encapsulator may introduce grouping so check here. % \begin{macrocode} - \renewcommand*{\glsxtrinlinefullformat}[2]{% - \glsfirstlongdefaultfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\protect\glsfirstabbrvemfont{\glsaccessshort{##1}}}% - }% - \renewcommand*{\glsxtrinlinefullplformat}[2]{% - \glsfirstlongdefaultfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\protect\glsfirstabbrvemfont{\glsaccessshortpl{##1}}}% - }% - \renewcommand*{\Glsxtrinlinefullformat}[2]{% - \glsfirstlongdefaultfont{\Glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\protect\glsfirstabbrvemfont{\glsaccessshort{##1}}}% - }% - \renewcommand*{\Glsxtrinlinefullplformat}[2]{% - \glsfirstlongdefaultfont{\Glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\protect\glsfirstabbrvemfont{\glsaccessshortpl{##1}}}% - }% + \ifx\@mgls@do@current@element\@gobble + \gappto\@mgls@post@hookdefs{\let\mglsiflastelementskipped\@firstoftwo}% + \else + \gappto\@mgls@post@hookdefs{\let\mglsiflastelementskipped\@secondoftwo}% + \fi + \glsxtrifwasfirstuse + {% + \gappto\@mgls@post@hookdefs{\let\mglsiflastelementwasfirstuse\@firstoftwo}% + }% + {% + \gappto\@mgls@post@hookdefs{\let\mglsiflastelementwasfirstuse\@secondoftwo}% + }% + \glsifplural + {% + \gappto\@mgls@post@hookdefs{\let\mglsiflastelementwasplural\@firstoftwo}% + }% + {% + \gappto\@mgls@post@hookdefs{\let\mglsiflastelementwasplural\@secondoftwo}% + }% + \glscapscase + {% + \gappto\@mgls@post@hookdefs{% + \let\mglsiflastelementcapscase\@firstofthree + }% + }% + {% + \gappto\@mgls@post@hookdefs{% + \let\mglsiflastelementcapscase\@secondofthree + }% + }% + {% + \gappto\@mgls@post@hookdefs{% + \let\mglsiflastelementcapscase\@thirdofthree + }% + }% + }% % \end{macrocode} -% The first use full form only displays the long form, but it -% typically won't be used as the \catattr{regular} attribute is set by this style. +% Suffix needs post-link hook commands. % \begin{macrocode} - \renewcommand*{\glsxtrfullformat}[2]{% - \glsfirstlongdefaultfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - }% - \renewcommand*{\glsxtrfullplformat}[2]{% - \glsfirstlongdefaultfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - }% - \renewcommand*{\Glsxtrfullformat}[2]{% - \glsfirstlongdefaultfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - }% - \renewcommand*{\Glsxtrfullplformat}[2]{% - \glsfirstlongdefaultfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - }% -} + \@mgls@post@hookdefs + \mglssuffix % \end{macrocode} -%\end{abbrvstyle} -%\begin{abbrvstyle}{long-em} -%Backward compatibility: +%Unset multi-entry first use flag after current scope. % \begin{macrocode} -\@glsxtr@deprecated@abbrstyle{long-em}{long-noshort-em} + \ifcase\@mgls@unsetaction\relax + \xappto\@mgls@post@hookdefs{% + \noexpand\mglsunset{\expandonce\mglscurrentmultilabel}}% + \or + \xappto\@mgls@post@hookdefs{% + \noexpand\mglslocalunset{\expandonce\mglscurrentmultilabel}}% + \fi + }% + \glsxtrmglswrite{#2}% + \egroup + \@mgls@post@hookdefs + \mgls@do@postlinkhook +} % \end{macrocode} -%\end{abbrvstyle} +%\end{macro} % -%\begin{abbrvstyle}{long-em-noshort-em} -%\changes{1.04}{2016-05-02}{new} -% The short form is explicitly invoked through commands like -% \cs{glsshort}. -% \begin{macrocode} -\newabbreviationstyle{long-em-noshort-em}% -{% -% \end{macrocode} -% Set accessibility attributes if enabled. +%\begin{macro}{\mglscustompostlinkhook} +%\changes{1.48}{2021-11-22}{new} % \begin{macrocode} - \glsxtrAccSuppAbbrSetNameShortAttrs\glscategorylabel +\newcommand*{\mglscustompostlinkhook}{} % \end{macrocode} -% Setup the default fields. +%\end{macro} +% +%\begin{macro}{\mglslastelementpostlinkhook} +%\changes{1.48}{2021-11-22}{new} % \begin{macrocode} - \renewcommand*{\CustomAbbreviationFields}{% - name={\glsxtrlongnoshortname}, - sort={\the\glsshorttok}, - first={\protect\glsfirstlongemfont{\the\glslongtok}}, - firstplural={\protect\glsfirstlongemfont{\the\glslongpltok}}, - text={\protect\glslongemfont{\the\glslongtok}}, - plural={\protect\glslongemfont{\the\glslongpltok}},% - description={\protect\glslongemfont{\the\glslongtok}}% - }% - \renewcommand*{\GlsXtrPostNewAbbreviation}{% - \glssetattribute{\the\glslabeltok}{regular}{true}}% -}% -{% +\newcommand*{\mglslastelementpostlinkhook}{% + \let\glsxtrifwasfirstuse\mglsiflastelementwasfirstuse + \let\glsifplural\mglsiflastelementwasplural + \let\glscapscase\mglsiflastelementcapscase + \let\glslabel\mglslastelementlabel + \glspostlinkhook +} % \end{macrocode} -%\changes{1.42}{2020-02-03}{removed \cs{protect} from \cs{glsxtremsuffix}} +%\end{macro} +% +%\begin{macro}{\mglslastmainpostlinkhook} +%\changes{1.48}{2021-11-22}{new} % \begin{macrocode} - \renewcommand*{\abbrvpluralsuffix}{\glsxtremsuffix}% - \renewcommand*\glsabbrvfont[1]{\glsabbrvemfont{##1}}% - \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvemfont{##1}}% - \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongemfont{##1}}% - \renewcommand*{\glslongfont}[1]{\glslongemfont{##1}}% +\newcommand*{\mglslastmainpostlinkhook}{% + \let\glsxtrifwasfirstuse\mglsiflastmainwasfirstuse + \let\glsifplural\mglsiflastmainwasplural + \let\glscapscase\mglsiflastmaincapscase + \let\glslabel\mglslastmainlabel + \glspostlinkhook +} % \end{macrocode} -% The format for subsequent use (not used when the regular attribute -% is set). +%\end{macro} +% +%\begin{macro}{\mglsdefcategoryprefix} +%\changes{1.48}{2021-11-22}{new} % \begin{macrocode} - \renewcommand*{\glsxtrsubsequentfmt}[2]{% - \glslongemfont{\glsaccesslong{##1}\ifglsxtrinsertinside ##2\fi}% - \ifglsxtrinsertinside \else##2\fi - }% - \renewcommand*{\glsxtrsubsequentplfmt}[2]{% - \glslongemfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside ##2\fi}% - \ifglsxtrinsertinside \else##2\fi - }% - \renewcommand*{\Glsxtrsubsequentfmt}[2]{% - \glslongemfont{\Glsaccesslong{##1}\ifglsxtrinsertinside ##2\fi}% - \ifglsxtrinsertinside \else##2\fi - }% - \renewcommand*{\Glsxtrsubsequentplfmt}[2]{% - \glslongemfont{\Glsaccesslongpl{##1}\ifglsxtrinsertinside ##2\fi}% - \ifglsxtrinsertinside \else##2\fi - }% +\newcommand*{\mglsdefcategoryprefix}[2]{% + \csdef{mglsprefix@#1}{#2}% +} % \end{macrocode} -% The inline full form displays the long format followed by the -% short form in parentheses. +%\end{macro} +% +%\begin{macro}{\mglshascategoryprefix} +%\changes{1.48}{2021-11-22}{new} % \begin{macrocode} - \renewcommand*{\glsxtrinlinefullformat}[2]{% - \glsfirstlongemfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\protect\glsfirstabbrvemfont{\glsaccessshort{##1}}}% - }% - \renewcommand*{\glsxtrinlinefullplformat}[2]{% - \glsfirstlongemfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\protect\glsfirstabbrvemfont{\glsaccessshortpl{##1}}}% - }% - \renewcommand*{\Glsxtrinlinefullformat}[2]{% - \glsfirstlongemfont{\Glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\protect\glsfirstabbrvemfont{\glsaccessshort{##1}}}% - }% - \renewcommand*{\Glsxtrinlinefullplformat}[2]{% - \glsfirstlongemfont{\Glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\protect\glsfirstabbrvemfont{\glsaccessshortpl{##1}}}% - }% +\newcommand*{\mglshascategoryprefix}[3]{% + \ifcsdef{mglsprefix@#1}{#2}{#3}% +} % \end{macrocode} -% The first use full form only displays the long form, but it -% typically won't be used as the \catattr{regular} attribute is set by this style. +%\end{macro} +% +%\begin{macro}{\mglsusecategoryprefix} +%\changes{1.48}{2021-11-22}{new} % \begin{macrocode} - \renewcommand*{\glsxtrfullformat}[2]{% - \glsfirstlongemfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - }% - \renewcommand*{\glsxtrfullplformat}[2]{% - \glsfirstlongemfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - }% - \renewcommand*{\Glsxtrfullformat}[2]{% - \glsfirstlongemfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - }% - \renewcommand*{\Glsxtrfullplformat}[2]{% - \glsfirstlongemfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - }% +\newcommand*{\mglsusecategoryprefix}[1]{% + \csuse{mglsprefix@#1}% } % \end{macrocode} -%\end{abbrvstyle} +%\end{macro} % -%\begin{abbrvstyle}{long-em-noshort-em-noreg} -%\changes{1.17}{2017-08-09}{new} -% Like long-em-noshort-em but doesn't set the \catattr{regular} attribute. +%\begin{macro}{\mglsprefix} +%\changes{1.48}{2021-11-22}{new} % \begin{macrocode} -\newabbreviationstyle{long-em-noshort-em-noreg}% -{% +\newcommand*{\mglsprefix}{% + \ifdefempty\mglscurrentcategory + {\mglscurrentprefix}% + {% + \mglshascategoryprefix{\mglscurrentcategory}% + {\mglsusecategoryprefix{\mglscurrentcategory}}% + {\mglscurrentprefix}% + }% +} % \end{macrocode} -% Set accessibility attributes if enabled. +%\end{macro} +% +%\begin{macro}{\mglsdefcategorysuffix} +%\changes{1.48}{2021-11-22}{new} % \begin{macrocode} - \glsxtrAccSuppAbbrSetNameShortAttrs\glscategorylabel +\newcommand*{\mglsdefcategorysuffix}[2]{% + \csdef{mglssuffix@#1}{#2}% +} % \end{macrocode} -% Setup the default fields. +%\end{macro} +% +%\begin{macro}{\mglshascategorysuffix} +%\changes{1.48}{2021-11-22}{new} % \begin{macrocode} - \GlsXtrUseAbbrStyleSetup{long-em-noshort-em}% +\newcommand*{\mglshascategorysuffix}[3]{% + \ifcsdef{mglssuffix@#1}{#2}{#3}% +} % \end{macrocode} -% Unset the \catattr{regular} attribute if it has been set. +%\end{macro} +% +%\begin{macro}{\mglsusecategorysuffix} +%\changes{1.48}{2021-11-22}{new} % \begin{macrocode} - \renewcommand*{\GlsXtrPostNewAbbreviation}{% - \glshasattribute{\the\glslabeltok}{regular}% - {% - \glssetattribute{\the\glslabeltok}{regular}{false}% - }% - {}% - }% -}% -{% - \GlsXtrUseAbbrStyleFmts{long-em-noshort-em}% +\newcommand*{\mglsusecategorysuffix}[1]{% + \csuse{mglssuffix@#1}% } % \end{macrocode} -%\end{abbrvstyle} +%\end{macro} % -%\begin{abbrvstyle}{long-noshort-em-desc} -%\changes{1.04}{2016-05-02}{renamed from \qt{long-desc-em}} -%\changes{0.5}{2015-12-07}{new} -% The emphasized font will only be used if -% the short form is explicitly invoked through commands like -% \cs{glsshort}. +%\begin{macro}{\mglssuffix} +%\changes{1.48}{2021-11-22}{new} % \begin{macrocode} -\newabbreviationstyle{long-noshort-em-desc}% -{% - \GlsXtrUseAbbrStyleSetup{long-noshort-desc}% -}% -{% +\newcommand*{\mglssuffix}{% + \ifdefempty\mglscurrentcategory + {\ifdefempty{\mglscurrentsuffix}{}{\space(\mglscurrentsuffix)}}% + {% + \mglshascategorysuffix{\mglscurrentcategory}% + {\mglsusecategorysuffix{\mglscurrentcategory}}% + {\ifdefempty{\mglscurrentsuffix}{}{\space(\mglscurrentsuffix)}}% + }% +} % \end{macrocode} -%\changes{1.42}{2020-02-03}{removed \cs{protect} from \cs{glsxtremsuffix}} +%\end{macro} +% +%\begin{macro}{\mglselementprehook} +%\changes{1.48}{2021-11-22}{new} % \begin{macrocode} - \renewcommand*{\abbrvpluralsuffix}{\glsxtremsuffix}% - \renewcommand*\glsabbrvfont[1]{\glsabbrvemfont{##1}}% - \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvemfont{##1}}% - \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% - \renewcommand*{\glslongfont}[1]{\glslongdefaultfont{##1}}% +\newcommand*{\mglselementprehook}{} % \end{macrocode} -% The format for subsequent use (not used when the regular attribute -% is set). +%\end{macro} +% +%\begin{macro}{\mglselementposthook} +%\changes{1.48}{2021-11-22}{new} % \begin{macrocode} - \renewcommand*{\glsxtrsubsequentfmt}[2]{% - \glslongdefaultfont{\glsaccesslong{##1}\ifglsxtrinsertinside ##2\fi}% - \ifglsxtrinsertinside \else##2\fi - }% - \renewcommand*{\glsxtrsubsequentplfmt}[2]{% - \glslongdefaultfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside ##2\fi}% - \ifglsxtrinsertinside \else##2\fi - }% - \renewcommand*{\Glsxtrsubsequentfmt}[2]{% - \glslongdefaultfont{\Glsaccesslong{##1}\ifglsxtrinsertinside ##2\fi}% - \ifglsxtrinsertinside \else##2\fi - }% - \renewcommand*{\Glsxtrsubsequentplfmt}[2]{% - \glslongdefaultfont{\Glsaccesslongpl{##1}\ifglsxtrinsertinside ##2\fi}% - \ifglsxtrinsertinside \else##2\fi - }% +\newcommand*{\mglselementposthook}{} % \end{macrocode} -% The inline full form displays the long format followed by the -% short form in parentheses. +%\end{macro} +% +%Separators. +%\begin{macro}{\glscombinedsep} +%\changes{1.48}{2021-11-22}{new} +%Separator between two elements that have been marked as used. +%This takes the two element labels as arguments. % \begin{macrocode} - \renewcommand*{\glsxtrinlinefullformat}[2]{% - \glsfirstlongdefaultfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\protect\glsfirstabbrvemfont{\glsaccessshort{##1}}}% - }% - \renewcommand*{\glsxtrinlinefullplformat}[2]{% - \glsfirstlongdefaultfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\protect\glsfirstabbrvemfont{\glsaccessshortpl{##1}}}% - }% - \renewcommand*{\Glsxtrinlinefullformat}[2]{% - \glsfirstlongdefaultfont{\Glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\protect\glsfirstabbrvemfont{\glsaccessshort{##1}}}% - }% - \renewcommand*{\Glsxtrinlinefullplformat}[2]{% - \glsfirstlongdefaultfont{\Glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\protect\glsfirstabbrvemfont{\glsaccessshortpl{##1}}}% - }% +\newcommand*{\glscombinedsep}[2]{% + \glshasattribute{#1}{combinedsep}% + {\glsgetattribute{#1}{combinedsep}}% + { }% +} % \end{macrocode} -% The first use full form only displays the long form, but it -% typically won't be used as the \catattr{regular} attribute is set by this style. +%\end{macro} +% +%\begin{macro}{\glscombinedfirstsepfirst} +%\changes{1.48}{2021-11-22}{new} +%Separator following and preceding a first use. % \begin{macrocode} - \renewcommand*{\glsxtrfullformat}[2]{% - \glsfirstlongdefaultfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - }% - \renewcommand*{\glsxtrfullplformat}[2]{% - \glsfirstlongdefaultfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - }% - \renewcommand*{\Glsxtrfullformat}[2]{% - \glsfirstlongdefaultfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - }% - \renewcommand*{\Glsxtrfullplformat}[2]{% - \glsfirstlongdefaultfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - }% +\newcommand*{\glscombinedfirstsepfirst}[2]{% + \glshasattribute{#1}{combinedfirstsepfirst}% + {\glsgetattribute{#1}{combinedfirstsepfirst}}% + {\glscombinedsep{#1}{#2}}% } % \end{macrocode} -%\end{abbrvstyle} -%\begin{abbrvstyle}{long-desc-em} -%Backward compatibility: +%\end{macro} +% +%\begin{macro}{\glscombinedfirstsep} +%\changes{1.48}{2021-11-22}{new} +%Separator following a first use. % \begin{macrocode} -\@glsxtr@deprecated@abbrstyle{long-desc-em}{long-noshort-em-desc} +\newcommand*{\glscombinedfirstsep}[2]{% + \glshasattribute{#1}{combinedfirstsep}% + {\glsgetattribute{#1}{combinedfirstsep}}% + {\glscombinedsep{#1}{#2}}% +} % \end{macrocode} -%\end{abbrvstyle} +%\end{macro} % -%\begin{abbrvstyle}{long-em-noshort-em-desc} -%\changes{1.04}{2016-05-02}{new} -% The short form is explicitly invoked through commands like -% \cs{glsxtrshort}. The long form is emphasized. No accessibility -% attributes need to be set. +%\begin{macro}{\glscombinedsepfirst} +%\changes{1.48}{2021-11-22}{new} +%Separator preceding a first use. % \begin{macrocode} -\newabbreviationstyle{long-em-noshort-em-desc}% -{% - \renewcommand*{\CustomAbbreviationFields}{% - name={\glsxtrlongnoshortdescname}, - sort={\the\glslongtok}, - first={\protect\glsfirstlongemfont{\the\glslongtok}}, - firstplural={\protect\glsfirstlongemfont{\the\glslongpltok}}, - text={\glslongemfont{\the\glslongtok}}, - plural={\glslongemfont{\the\glslongpltok}}% - }% - \renewcommand*{\GlsXtrPostNewAbbreviation}{% - \glssetattribute{\the\glslabeltok}{regular}{true}}% -}% -{% +\newcommand*{\glscombinedsepfirst}[2]{% + \glshasattribute{#1}{combinedsepfirst}% + {\glsgetattribute{#1}{combinedsepfirst}}% + {\glscombinedsep{#1}{#2}}% +} % \end{macrocode} -%\changes{1.42}{2020-02-03}{removed \cs{protect} from \cs{glsxtremsuffix}} +%\end{macro} +% +%\begin{macro}{\glssetcombinedsepabbrvnbsp} +%\changes{1.48}{2021-11-22}{new} +%Provide shortcut for using non-breakable space following an +%abbreviation that has already been used. +%\changes{1.49}{2022-10-14}{corrected spelling of \cs{ifglshasshort}} % \begin{macrocode} - \renewcommand*{\abbrvpluralsuffix}{\glsxtremsuffix}% - \renewcommand*\glsabbrvfont[1]{\glsabbrvemfont{##1}}% - \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvemfont{##1}}% - \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongemfont{##1}}% - \renewcommand*{\glslongfont}[1]{\glslongemfont{##1}}% +\newcommand*{\glssetcombinedsepabbrvnbsp}{% + \renewcommand*{\glscombinedsep}[2]{% + \glshasattribute{##1}{combinedsep}% + {\glsgetattribute{##1}{combinedsep}}% + {\ifglshasshort{##1}{~}{ }}% + }% + \renewcommand*{\glscombinedsepfirst}[2]{% + \glshasattribute{##1}{combinedsepfirst}% + {\glsgetattribute{##1}{combinedsepfirst}}% + {\ifglshasshort{##1}{~}{ }}% + }% + \renewcommand*{\glscombinedfirstsep}[2]{% + \glshasattribute{##1}{combinedfirstsep}% + {\glsgetattribute{##1}{combinedfirstsep}}% + { }% + }% + \renewcommand*{\glscombinedfirstsepfirst}[2]{% + \glshasattribute{##1}{combinedfirstsepfirst}% + {\glsgetattribute{##1}{combinedfirstsepfirst}}% + { }% + }% +} % \end{macrocode} -% The format for subsequent use (not used when the regular attribute -% is set). +%\end{macro} +% +%\begin{macro}{\glssetcombinedsepabbrvnone} +%\changes{1.48}{2021-11-22}{new} +%Provide shortcut for using nothing if either on next use are +%abbreviations (otherwise use space). +%\changes{1.49}{2022-10-14}{corrected spelling of \cs{ifglshasshort}} % \begin{macrocode} - \renewcommand*{\glsxtrsubsequentfmt}[2]{% - \glslongemfont{\glsaccesslong{##1}\ifglsxtrinsertinside ##2\fi}% - \ifglsxtrinsertinside \else##2\fi - }% - \renewcommand*{\glsxtrsubsequentplfmt}[2]{% - \glslongemfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside ##2\fi}% - \ifglsxtrinsertinside \else##2\fi - }% - \renewcommand*{\Glsxtrsubsequentfmt}[2]{% - \glslongemfont{\Glsaccesslong{##1}\ifglsxtrinsertinside ##2\fi}% - \ifglsxtrinsertinside \else##2\fi - }% - \renewcommand*{\Glsxtrsubsequentplfmt}[2]{% - \glslongemfont{\Glsaccesslongpl{##1}\ifglsxtrinsertinside ##2\fi}% - \ifglsxtrinsertinside \else##2\fi - }% +\newcommand*{\glssetcombinedsepabbrvnone}{% + \renewcommand*{\glscombinedsep}[2]{% + \glshasattribute{##1}{combinedsep}% + {\glsgetattribute{##1}{combinedsep}}% + {\ifglshasshort{##1}{}{\ifglshasshort{##2}{}{ }}}% + }% + \renewcommand*{\glscombinedsepfirst}[2]{% + \glshasattribute{##1}{combinedsepfirst}% + {\glsgetattribute{##1}{combinedsepfirst}}% + {\ifglshasshort{##1}{}{ }}% + }% + \renewcommand*{\glscombinedfirstsep}[2]{% + \glshasattribute{##1}{combinedfirstsep}% + {\glsgetattribute{##1}{combinedfirstsep}}% + {\ifglshasshort{##2}{}{ }}% + }% + \renewcommand*{\glscombinedfirstsepfirst}[2]{% + \glshasattribute{##1}{combinedfirstsepfirst}% + {\glsgetattribute{##1}{combinedfirstsepfirst}}% + { }% + }% +} % \end{macrocode} -% The inline full form displays the long format followed by the -% short form in parentheses. +%\end{macro} +% +%\begin{macro}{\glssetcombinedsepnarrow} +%\changes{1.48}{2021-11-22}{new} +%\changes{1.49}{2022-10-14}{corrected spelling of \cs{ifglshasshort}} +%Measures both. % \begin{macrocode} - \renewcommand*{\glsxtrinlinefullformat}[2]{% - \glsfirstlongemfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\protect\glsfirstabbrvemfont{\glsaccessshort{##1}}}% +\newcommand*{\glssetcombinedsepnarrow}[2]{% + \renewcommand*{\glscombinedsep}[2]{% + \glshasattribute{##1}{combinedsep}% + {\glsgetattribute{##1}{combinedsep}}% + {% + \ifglshasshort{##1}% + {\settowidth{\dimen@}{\glsentryshort{##1}}}% + {\settowidth{\dimen@}{\glsentrytext{##1}}}% + \ifdim\dimen@<#1\relax + #2% + \else + \ifglshasshort{##2}% + {\settowidth{\dimen@}{\glsentryshort{##2}}}% + {\settowidth{\dimen@}{\glsentrytext{##2}}}% + \ifdim\dimen@<#1\relax + #2% + \else + \space + \fi + \fi }% - \renewcommand*{\glsxtrinlinefullplformat}[2]{% - \glsfirstlongemfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\protect\glsfirstabbrvemfont{\glsaccessshortpl{##1}}}% + }% + \renewcommand*{\glscombinedsepfirst}[2]{% + \glshasattribute{##1}{combinedsepfirst}% + {\glsgetattribute{##1}{combinedsepfirst}}% + {% + \ifglshasshort{##1}% + {\settowidth{\dimen@}{\glsentryshort{##1}}}% + {\settowidth{\dimen@}{\glsentrytext{##1}}}% + \ifdim\dimen@<#1\relax + #2% + \else + \ifhaslong{##2}% + {\settowidth{\dimen@}{\glsentrylong{##2}}}% + {\settowidth{\dimen@}{\glsentryfirst{##2}}}% + \ifdim\dimen@<#1\relax + #2% + \else + \space + \fi + \fi }% - \renewcommand*{\Glsxtrinlinefullformat}[2]{% - \glsfirstlongemfont{\Glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\protect\glsfirstabbrvemfont{\glsaccessshort{##1}}}% + }% + \renewcommand*{\glscombinedfirstsep}[2]{% + \glshasattribute{##1}{combinedfirstsep}% + {\glsgetattribute{##1}{combinedfirstsep}}% + {% + \ifhaslong{##1}% + {\settowidth{\dimen@}{\glsentrylong{##1}}}% + {\settowidth{\dimen@}{\glsentryfirst{##1}}}% + \ifdim\dimen@<#1\relax + #2% + \else + \ifglshasshort{##2}% + {\settowidth{\dimen@}{\glsentryshort{##2}}}% + {\settowidth{\dimen@}{\glsentrytext{##2}}}% + \ifdim\dimen@<#1\relax + #2% + \else + \space + \fi + \fi }% - \renewcommand*{\Glsxtrinlinefullplformat}[2]{% - \glsfirstlongemfont{\Glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\protect\glsfirstabbrvemfont{\glsaccessshortpl{##1}}}% + }% + \renewcommand*{\glscombinedfirstsepfirst}[2]{% + \glshasattribute{##1}{combinedfirstsepfirst}% + {\glsgetattribute{##1}{combinedfirstsepfirst}}% + {% + \ifhaslong{##1}% + {\settowidth{\dimen@}{\glsentrylong{##1}}}% + {\settowidth{\dimen@}{\glsentryfirst{##1}}}% + \ifdim\dimen@<#1\relax + #2% + \else + \ifhaslong{##2}% + {\settowidth{\dimen@}{\glsentrylong{##2}}}% + {\settowidth{\dimen@}{\glsentryfirst{##2}}}% + \ifdim\dimen@<#1\relax + #2% + \else + \space + \fi + \fi }% + }% +} % \end{macrocode} -% The first use full form only displays the long form, but it -% typically won't be used as the \catattr{regular} attribute is set by this style. +%\end{macro} +% +%\begin{macro}{\@glsxtr@mglswrite} +%\changes{1.48}{2021-11-22}{new} +%Write information to the aux file for \app{bib2gls} to pick up, but +%only need to do it once per label since it only indicates which multi-entry +%has been referenced without any additional information. % \begin{macrocode} - \renewcommand*{\glsxtrfullformat}[2]{% - \glsfirstlongemfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - }% - \renewcommand*{\glsxtrfullplformat}[2]{% - \glsfirstlongemfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - }% - \renewcommand*{\Glsxtrfullformat}[2]{% - \glsfirstlongemfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi +\newcommand{\glsxtrmglswrite}[1]{% + \ifx\@glsxtr@record@setting\@glsxtr@record@setting@off + \else + \protected@edef\@glsxtr@mglslabel{#1}% + \ifdef\@glsxtr@mglsreflist + {% + \expandafter\DTLifinlist\expandafter{\@glsxtr@mglslabel}% + {\@glsxtr@mglsreflist}{}% + {% + \xappto\@glsxtr@mglsreflist{,\expandonce\@glsxtr@mglslabel}% + \if@mgls@writeseparaterefs + \protected@write\@auxout{}{\string\@glsxtr@mglsrefs{#1}}% + \fi + }% }% - \renewcommand*{\Glsxtrfullplformat}[2]{% - \glsfirstlongemfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi + {% + \global\let\@glsxtr@mglsreflist\@glsxtr@mglslabel + \if@mgls@writeseparaterefs + \protected@write\@auxout{}{\string\@glsxtr@mglsrefs{#1}}% + \else + \AtEndDocument{\immediate\protected@write\@auxout{}% + {\string\@glsxtr@mglsrefs{\@glsxtr@mglsreflist}}}% + \fi + \@mgls@disable@writeseparateref@cond }% + \fi } % \end{macrocode} -%\end{abbrvstyle} +%\end{macro} % -%\begin{abbrvstyle}{long-em-noshort-em-desc-noreg} -%\changes{1.17}{2017-08-09}{new} -% Like long-em-noshort-em-desc but doesn't set the \catattr{regular} attribute. +%\begin{macro}{\@glsxtr@mglsrefs} +%\changes{1.48}{2021-11-22}{new} % \begin{macrocode} -\newabbreviationstyle{long-em-noshort-em-desc-noreg}% -{% - \GlsXtrUseAbbrStyleSetup{long-em-noshort-em-desc}% +\newcommand{\@glsxtr@mglsrefs}[1]{} % \end{macrocode} -% Unset the \catattr{regular} attribute if it has been set. +%\end{macro} +% +%\begin{macro}{\if@mgls@writeseparaterefs} +%\changes{1.48}{2021-11-22}{new} +%If this conditional is changed, it must be done before the first +%instance of any \cs{mgls}-like command. % \begin{macrocode} - \renewcommand*{\GlsXtrPostNewAbbreviation}{% - \glshasattribute{\the\glslabeltok}{regular}% - {% - \glssetattribute{\the\glslabeltok}{regular}{false}% - }% - {}% - }% -}% -{% - \GlsXtrUseAbbrStyleFmts{long-em-noshort-em-desc}% -} +\newif\if@mgls@writeseparaterefs \@mgls@writeseparaterefsfalse % \end{macrocode} -%\end{abbrvstyle} +%\end{macro} % -%\begin{abbrvstyle}{short-em-footnote} -%\changes{0.5}{2015-12-07}{new} -%\changes{1.04}{2015-04-30}{renamed from \qt{footnote-em}} -%\changes{1.42}{2020-02-03}{added missing text key} +%\begin{macro}{\mglsWriteSeparateRefsTrue} +%\changes{1.48}{2021-11-22}{new} % \begin{macrocode} -\newabbreviationstyle{short-em-footnote}% -{% +\newcommand{\mglsWriteSeparateRefsTrue}{\global\@mgls@writeseparaterefstrue} % \end{macrocode} -% Set accessibility attributes if enabled. +%\end{macro} +% +%\begin{macro}{\mglsWriteSeparateRefsFalse} +%\changes{1.48}{2021-11-22}{new} % \begin{macrocode} - \glsxtrAccSuppAbbrSetNoLongAttrs\glscategorylabel +\newcommand{\mglsWriteSeparateRefsFalse}{\global\@mgls@writeseparaterefsfalse} % \end{macrocode} -% Setup the default fields. +%\end{macro} +% +%\begin{macro}{\@mgls@disable@writeseparateref@cond} +%\changes{1.48}{2021-11-22}{new} % \begin{macrocode} - \renewcommand*{\CustomAbbreviationFields}{% - name={\glsxtrfootnotename}, - sort={\the\glsshorttok}, - description={\the\glslongtok},% - first={\protect\glsfirstabbrvemfont{\the\glsshorttok}% - \protect\glsxtrabbrvfootnote{\the\glslabeltok}% - {\protect\glsfirstlongfootnotefont{\the\glslongtok}}},% - firstplural={\protect\glsfirstabbrvemfont{\the\glsshortpltok}% - \protect\glsxtrabbrvfootnote{\the\glslabeltok}% - {\protect\glsfirstlongfootnotefont{\the\glslongpltok}}},% - text={\protect\glsabbrvemfont{\the\glsshorttok}},% - plural={\protect\glsabbrvemfont{\the\glsshortpltok}}}% +\newcommand*{\@mgls@disable@writeseparateref@cond}{% + \gdef\mglsWriteSeparateRefsTrue{\PackageError{glossaries-extra}% + {Too late to use \string\mglsWriteSeparateRefsTrue}% + {\string\mglsWriteSeparateRefsTrue\space can only be used before + the first instance of any \string\mgls-like command}}% + \gdef\mglsWriteSeparateRefsFalse{\PackageError{glossaries-extra}% + {Too late to use \string\mglsWriteSeparateRefsFalse}% + {\string\mglsWriteSeparateRefsFalse\space can only be used before + the first instance of any \string\mgls-like command}}% +} % \end{macrocode} -% Switch off hyperlinks on first use to prevent nested hyperlinks, -% and unset the \catattr{regular} attribute if it has been set. -%\changes{0.5.1}{2015-12-07}{switch off regular attribute if set} +%\end{macro} +% +%\begin{macro}{\glsxtr@newmgls} +%\changes{1.48}{2021-11-22}{new} % \begin{macrocode} - \renewcommand*{\GlsXtrPostNewAbbreviation}{% - \glssetattribute{\the\glslabeltok}{nohyperfirst}{true}% - \glshasattribute{\the\glslabeltok}{regular}% - {% - \glssetattribute{\the\glslabeltok}{regular}{false}% +\newcommand{\glsxtr@newmgls}[5]{% + \edef\@glsxr@newmgls@do{% + \noexpand\newrobustcmd*{\expandonce{\csname #1\endcsname}}% + {\noexpand\@gls@hyp@opt\expandonce{\csname ns@glsxtr@#1\endcsname}}% + \noexpand\newcommand*{\expandonce{\csname ns@glsxtr@#1\endcsname}}[2][]{% + \noexpand\new@ifnextchar[% + {\expandonce{\csname glsxtr@#1\endcsname}{####1}{####2}}% + {\expandonce{\csname glsxtr@#1\endcsname}{####1}{####2}[]}% + }% + \noexpand\def\expandonce{\csname glsxtr@#1\endcsname}####1####2[####3]{% + \noexpand\def\noexpand\glsxtrcurrentmglscsname{#1}% + \noexpand\glsxtr@mgls@inner{####1}{####2}{####3}% + {\noexpand#2}{\noexpand#3}{\noexpand#4}{\noexpand#5}% }% - {}% }% -}% -{% + \@glsxr@newmgls@do + \ifx\@glsxtr@record@setting\@glsxtr@record@setting@off + \else % \end{macrocode} -%\changes{1.42}{2020-02-03}{removed \cs{protect} from \cs{glsxtremsuffix}} +% Provide a way for \app{bib2gls} to recognise the command (this will +% make it easier to add extra commands without having to modify +% \app{bib2gls}). % \begin{macrocode} - \renewcommand*{\abbrvpluralsuffix}{\glsxtremsuffix}% - \renewcommand*\glsabbrvfont[1]{\glsabbrvemfont{##1}}% - \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvemfont{##1}}% - \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongfootnotefont{##1}}% - \renewcommand*{\glslongfont}[1]{\glslongfootnotefont{##1}}% + \ifdef\@glsxtr@mglslikelist + {\xappto\@glsxtr@mglslikelist{,#1}}% + {% + \gdef\@glsxtr@mglslikelist{#1}% + \AtEndDocument{\immediate\protected@write\@auxout{}% + {\string\@glsxtr@mglslike{\@glsxtr@mglslikelist}}}% + }% + \fi +} % \end{macrocode} -% The full format displays the short form followed by the long form -% as a footnote. +%\end{macro} +% +%\begin{macro}{\@glsxtr@mglslike} +%\changes{1.48}{2021-11-22}{new} % \begin{macrocode} - \renewcommand*{\glsxtrfullformat}[2]{% - \glsfirstabbrvemfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - \protect\glsxtrabbrvfootnote{##1}% - {\glsfirstlongfootnotefont{\glsaccesslong{##1}}}% - }% - \renewcommand*{\glsxtrfullplformat}[2]{% - \glsfirstabbrvemfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - \protect\glsxtrabbrvfootnote{##1}% - {\glsfirstlongfootnotefont{\glsaccesslongpl{##1}}}% - }% - \renewcommand*{\Glsxtrfullformat}[2]{% - \glsfirstabbrvemfont{\Glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - \protect\glsxtrabbrvfootnote{##1}% - {\glsfirstlongfootnotefont{\glsaccesslong{##1}}}% - }% - \renewcommand*{\Glsxtrfullplformat}[2]{% - \glsfirstabbrvemfont{\Glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - \protect\glsxtrabbrvfootnote{##1}% - {\glsfirstlongfootnotefont{\glsaccesslongpl{##1}}}% - }% +\newcommand*{\@glsxtr@mglslike}[1]{} % \end{macrocode} -% The first use full form and the inline full form use the short -% (long) style. +%\end{macro} +% +%\begin{macro}{\GlsXtrMglsOrGls} +%\begin{definition} +%\cs{GlsXtrMglsOrGls}\marg{mgls cs}\marg{gls cs}\meta{modifier}\oarg{options}\marg{label}\oarg{insert} +%\end{definition} +%\changes{1.48}{2021-11-22}{new} +%\changes{1.49}{2022-10-14}{removed spurious \cs{PLUS}} % \begin{macrocode} - \renewcommand*{\glsxtrinlinefullformat}[2]{% - \glsfirstabbrvemfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstlongfootnotefont{\glsaccesslong{##1}}}% - }% - \renewcommand*{\glsxtrinlinefullplformat}[2]{% - \glsfirstabbrvemfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstlongfootnotefont{\glsaccesslongpl{##1}}}% - }% - \renewcommand*{\Glsxtrinlinefullformat}[2]{% - \glsfirstabbrvemfont{\Glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstlongfootnotefont{\glsaccesslong{##1}}}% - }% - \renewcommand*{\Glsxtrinlinefullplformat}[2]{% - \glsfirstabbrvemfont{\Glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstlongfootnotefont{\glsaccesslongpl{##1}}}% +\newcommand*{\GlsXtrMglsOrGls}[2]{% + \def\@glsxtr@mgls@or@gls@mcs{#1}% + \def\@glsxtr@mgls@or@gls@gcs{#2}% + \@ifstar{\s@GlsXtrMglsOrGls}% + {% + \@ifnextchar+{\@firstoftwo{\p@GlsXtrMglsOrGls}}% + {% + \ifdefempty\@gls@alt@hyp@opt@char\@GlsXtrMglsOrGls\alt@GlsXtrMglsOrGls + }% }% } % \end{macrocode} -%\end{abbrvstyle} -%\begin{abbrvstyle}{footnote-em} -%Backward compatibility: -% \begin{macrocode} -\@glsxtr@deprecated@abbrstyle{footnote-em}{short-em-footnote} -% \end{macrocode} -%\end{abbrvstyle} +%\end{macro} % -%\begin{abbrvstyle}{short-em-footnote-desc} -% Like \abbrstyle{short-em-footnote} but with user supplied description. -%\changes{1.42}{2020-02-03}{new} +%\begin{macro}{\alt@GlsXtrMglsOrGls} +%\changes{1.48}{2021-11-22}{new} % \begin{macrocode} -\newabbreviationstyle{short-em-footnote-desc}% -{% +\newcommand*{\alt@GlsXtrMglsOrGls}{ + \expandafter\@ifnextchar\@gls@alt@hyp@opt@char + {\@firstoftwo{\@alt@GlsXtrMglsOrGls}}{\@GlsXtrMglsOrGls}% +} % \end{macrocode} -% Set accessibility attributes if enabled. +%\end{macro} +% +%\begin{macro}{\@GlsXtrMglsOrGls} +%\changes{1.48}{2021-11-22}{new} % \begin{macrocode} - \glsxtrAccSuppAbbrSetNameLongAttrs\glscategorylabel +\newcommand*{\@GlsXtrMglsOrGls}[2][]{% + \glsxtrifmulti{#2}% + {\@glsxtr@mgls@or@gls@mcs[#1]{#2}}% + {\@glsxtr@mgls@or@gls@gcs[#1]{#2}}% +} % \end{macrocode} -% Setup the default fields. +%\end{macro} +% +%\begin{macro}{\s@GlsXtrMglsOrGls} +%\changes{1.48}{2021-11-22}{new} % \begin{macrocode} - \renewcommand*{\CustomAbbreviationFields}{% - name={\glsxtrfootnotedescname}, - sort={\glsxtrfootnotedescsort}, - first={\protect\glsfirstabbrvemfont{\the\glsshorttok}% - \protect\glsxtrabbrvfootnote{\the\glslabeltok}% - {\protect\glsfirstlongfootnotefont{\the\glslongtok}}},% - firstplural={\protect\glsfirstabbrvemfont{\the\glsshortpltok}% - \protect\glsxtrabbrvfootnote{\the\glslabeltok}% - {\protect\glsfirstlongfootnotefont{\the\glslongpltok}}},% - text={\protect\glsabbrvemfont{\the\glsshorttok}},% - plural={\protect\glsabbrvemfont{\the\glsshortpltok}}}% +\newcommand*{\s@GlsXtrMglsOrGls}[2][]{% + \glsxtrifmulti{#2}% + {\@glsxtr@mgls@or@gls@mcs*[#1]{#2}}% + {\@glsxtr@mgls@or@gls@gcs*[#1]{#2}}% +} % \end{macrocode} -% Switch off hyperlinks on first use to prevent nested hyperlinks, -% and unset the \catattr{regular} attribute if it has been set. -%\changes{0.5.1}{2015-12-07}{switch off regular attribute if set} +%\end{macro} +% +%\begin{macro}{\p@GlsXtrMglsOrGls} +%\changes{1.48}{2021-11-22}{new} % \begin{macrocode} - \renewcommand*{\GlsXtrPostNewAbbreviation}{% - \glssetattribute{\the\glslabeltok}{nohyperfirst}{true}% - \glshasattribute{\the\glslabeltok}{regular}% - {% - \glssetattribute{\the\glslabeltok}{regular}{false}% - }% - {}% - }% -}% -{% - \GlsXtrUseAbbrStyleFmts{short-em-footnote}% +\newcommand*{\p@GlsXtrMglsOrGls}[2][]{% + \glsxtrifmulti{#2}% + {\@glsxtr@mgls@or@gls@mcs+[#1]{#2}}% + {\@glsxtr@mgls@or@gls@gcs+[#1]{#2}}% } % \end{macrocode} -%\end{abbrvstyle} +%\end{macro} % -%\begin{abbrvstyle}{short-em-postfootnote} -%\changes{0.5}{2015-12-07}{new} -%\changes{1.04}{2016-05-02}{renamed from \qt{postfootnote-em}} -%\changes{1.42}{2020-02-03}{added missing text key} -% \begin{macrocode} -\newabbreviationstyle{short-em-postfootnote}% -{% -% \end{macrocode} -% Set accessibility attributes if enabled. -% \begin{macrocode} - \glsxtrAccSuppAbbrSetNoLongAttrs\glscategorylabel -% \end{macrocode} -% Setup the default fields. +%\begin{macro}{\@alt@GlsXtrMglsOrGls} +%\changes{1.48}{2021-11-22}{new} % \begin{macrocode} - \renewcommand*{\CustomAbbreviationFields}{% - name={\glsxtrfootnotename}, - sort={\the\glsshorttok}, - description={\the\glslongtok},% - first={\protect\glsfirstabbrvemfont{\the\glsshorttok}},% - firstplural={\protect\glsfirstabbrvemfont{\the\glsshortpltok}},% - text={\protect\glsabbrvemfont{\the\glsshorttok}},% - plural={\protect\glsabbrvemfont{\the\glsshortpltok}}}% +\newcommand*{\@alt@GlsXtrMglsOrGls}[2][]{% + \glsxtrifmulti{#2}% + {\expandafter\@glsxtr@mgls@or@gls@mcs\@gls@alt@hyp@opt@char[#1]{#2}}% + {\expandafter\@glsxtr@mgls@or@gls@gcs\@gls@alt@hyp@opt@char[#1]{#2}}% +} % \end{macrocode} -% Make this category insert a footnote after the link if this was -% the first use, and -% unset the \catattr{regular} attribute if it has been set. +%\end{macro} +% +%\begin{macro}{\mgls} +%\changes{1.48}{2021-11-22}{new} +%\begin{definition} +%\cs{mgls}\oarg{options}\marg{label}\oarg{insert} +%\end{definition} +% Use \cs{gls} for all elements. % \begin{macrocode} - \renewcommand*{\GlsXtrPostNewAbbreviation}{% - \csdef{glsxtrpostlink\glscategorylabel}{% - \glsxtrifwasfirstuse - {% +\glsxtr@newmgls{mgls}{\@gls@}{\@gls@}{\@gls@}{\@gls@}% % \end{macrocode} -% Needs the specific font command here as the style may have been -% lost by the time the footnote occurs. +%\end{macro} +% +%\begin{macro}{\mglspl} +%\changes{1.48}{2021-11-22}{new} +%\begin{definition} +%\cs{mglspl}\oarg{options}\marg{label}\oarg{insert} +%\end{definition} +% Use \cs{glspl} for all elements. % \begin{macrocode} - \glsxtrdopostpunc{\protect\glsxtrabbrvfootnote{\glslabel}% - {\glsfirstlongfootnotefont{\glsentrylong{\glslabel}}}}% - }% - {}% - }% - \glshasattribute{\the\glslabeltok}{regular}% - {% - \glssetattribute{\the\glslabeltok}{regular}{false}% - }% - {}% - }% +\glsxtr@newmgls{mglspl}{\@glspl@}{\@glspl@}{\@glspl@}{\@glspl@}% % \end{macrocode} -% The footnote needs to be suppressed in the inline form, so -% \cs{glsxtrfull} must set the first use switch off. +%\end{macro} +% +%\begin{macro}{\mglsmainpl} +%\changes{1.48}{2021-11-22}{new} +%\begin{definition} +%\cs{mglsmainpl}\oarg{options}\marg{label}\oarg{insert} +%\end{definition} +% Only use \cs{glspl} for the main element, otherwise use \cs{gls}. % \begin{macrocode} - \renewcommand*{\glsxtrsetupfulldefs}{% - \let\glsxtrifwasfirstuse\@secondoftwo - }% -}% -{% +\glsxtr@newmgls{mglsmainpl}{\@gls@}{\@gls@}{\@glspl@}{\@glspl@}% % \end{macrocode} -%\changes{1.42}{2020-02-03}{removed \cs{protect} from \cs{glsxtremsuffix}} +%\end{macro} +% +%\begin{macro}{\Mgls} +%\changes{1.48}{2021-11-22}{new} +%\begin{definition} +%\cs{Mgls}\oarg{options}\marg{label}\oarg{insert} +%\end{definition} +%Use \cs{Gls} for first element and \cs{gls} for others. % \begin{macrocode} - \renewcommand*{\abbrvpluralsuffix}{\glsxtremsuffix}% - \renewcommand*\glsabbrvfont[1]{\glsabbrvemfont{##1}}% - \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvemfont{##1}}% - \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongfootnotefont{##1}}% - \renewcommand*{\glslongfont}[1]{\glslongfootnotefont{##1}}% +\glsxtr@newmgls{Mgls}{\@Gls@}{\@gls@}{\@Gls@}{\@gls@}% +\glsmfuaddmap{\mgls}{\Mgls} % \end{macrocode} -% The full format displays the short form. The long form is -% deferred. +%\end{macro} +% +%\begin{macro}{\Mglspl} +%\changes{1.48}{2021-11-22}{new} +%\begin{definition} +%\cs{Mglspl}\oarg{options}\marg{label}\oarg{insert} +%\end{definition} +%Use \cs{Glspl} for first element and \cs{glspl} for others. % \begin{macrocode} - \renewcommand*{\glsxtrfullformat}[2]{% - \glsfirstabbrvemfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - }% - \renewcommand*{\glsxtrfullplformat}[2]{% - \glsfirstabbrvemfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - }% - \renewcommand*{\Glsxtrfullformat}[2]{% - \glsfirstabbrvemfont{\Glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - }% - \renewcommand*{\Glsxtrfullplformat}[2]{% - \glsfirstabbrvemfont{\Glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - }% +\glsxtr@newmgls{Mglspl}{\@Glspl@}{\@glspl@}{\@Glspl@}{\@glspl@}% +\glsmfuaddmap{\mglspl}{\Mglspl} % \end{macrocode} -% The first use full form and the inline full form use the short -% (long) style. +%\end{macro} +% +%\begin{macro}{\Mglsmainpl} +%\changes{1.48}{2021-11-22}{new} +%\begin{definition} +%\cs{Mglsmainpl}\oarg{options}\marg{label}\oarg{insert} +%\end{definition} +%Upper case the first element, no case change for others. +%Use plural for the main element only. % \begin{macrocode} - \renewcommand*{\glsxtrinlinefullformat}[2]{% - \glsfirstabbrvemfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstlongfootnotefont{\glsaccesslong{##1}}}% - }% - \renewcommand*{\glsxtrinlinefullplformat}[2]{% - \glsfirstabbrvemfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstlongfootnotefont{\glsaccesslongpl{##1}}}% - }% - \renewcommand*{\Glsxtrinlinefullformat}[2]{% - \glsfirstabbrvemfont{\Glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstlongfootnotefont{\glsaccesslong{##1}}}% - }% - \renewcommand*{\Glsxtrinlinefullplformat}[2]{% - \glsfirstabbrvemfont{\Glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% - \glsxtrparen{\glsfirstlongfootnotefont{\glsaccesslongpl{##1}}}% - }% -} +\glsxtr@newmgls{Mglsmainpl}{\@Gls@}{\@gls@}{\@Glspl@}{\@glspl@}% +\glsmfuaddmap{\mglsmainpl}{\Mglsmainpl} % \end{macrocode} -%\end{abbrvstyle} -%\begin{abbrvstyle}{postfootnote-em} -%Backward compatibility: +%\end{macro} +% +%\begin{macro}{\MGls} +%\changes{1.48}{2021-11-22}{new} +%\begin{definition} +%\cs{MGls}\oarg{options}\marg{label}\oarg{insert} +%\end{definition} +%Use \cs{Gls} for all elements. % \begin{macrocode} -\@glsxtr@deprecated@abbrstyle{postfootnote-em}{short-em-postfootnote} +\glsxtr@newmgls{MGls}{\@Gls@}{\@Gls@}{\@Gls@}{\@Gls@}% +\glsmfublocker{\MGls} % \end{macrocode} -%\end{abbrvstyle} +%\end{macro} % -%\begin{abbrvstyle}{short-em-postfootnote-desc} -% Like \abbrstyle{short-em-postfootnote} but with user supplied description. -%\changes{1.42}{2020-02-03}{new} +%\begin{macro}{\MGlspl} +%\changes{1.48}{2021-11-22}{new} +%\begin{definition} +%\cs{MGlspl}\oarg{options}\marg{label}\oarg{insert} +%\end{definition} +%Use \cs{Glspl} for all elements. % \begin{macrocode} -\newabbreviationstyle{short-em-postfootnote-desc}% -{% +\glsxtr@newmgls{MGlspl}{\@Glspl@}{\@Glspl@}{\@Glspl@}{\@Glspl@}% +\glsmfublocker{\MGlspl} % \end{macrocode} -% Set accessibility attributes if enabled. +%\end{macro} +% +%\begin{macro}{\MGlsmainpl} +%\changes{1.48}{2021-11-22}{new} +%\begin{definition} +%\cs{MGlsmainpl}\oarg{options}\marg{label}\oarg{insert} +%\end{definition} +%Start all elements with upper case. Only use plural for main +%element. % \begin{macrocode} - \glsxtrAccSuppAbbrSetNameLongAttrs\glscategorylabel +\glsxtr@newmgls{MGlsmainpl}{\@Gls@}{\@Gls@}{\@Glspl@}{\@Glspl@}% +\glsmfublocker{\MGlsmainpl} % \end{macrocode} -% Setup the default fields. +%\end{macro} +% +%\begin{macro}{\MGLS} +%\changes{1.48}{2021-11-22}{new} +%\begin{definition} +%\cs{MGLS}\oarg{options}\marg{label}\oarg{insert} +%\end{definition} +%Use \cs{GLS} for all elements. % \begin{macrocode} - \renewcommand*{\CustomAbbreviationFields}{% - name={\glsxtrfootnotedescname}, - sort={\glsxtrfootnotedescsort}, - first={\protect\glsfirstabbrvemfont{\the\glsshorttok}},% - firstplural={\protect\glsfirstabbrvemfont{\the\glsshortpltok}},% - text={\protect\glsabbrvemfont{\the\glsshorttok}},% - plural={\protect\glsabbrvemfont{\the\glsshortpltok}}}% +\glsxtr@newmgls{MGLS}{\@GLS@}{\@GLS@}{\@GLS@}{\@GLS@}% +\glsmfublocker{\MGLS} % \end{macrocode} -% Make this category insert a footnote after the link if this was -% the first use, and -% unset the \catattr{regular} attribute if it has been set. +%\end{macro} +% +%\begin{macro}{\MGLSpl} +%\changes{1.48}{2021-11-22}{new} +%\begin{definition} +%\cs{MGLSpl}\oarg{options}\marg{label}\oarg{insert} +%\end{definition} +%Use \cs{GLSpl} for all elements. % \begin{macrocode} - \renewcommand*{\GlsXtrPostNewAbbreviation}{% - \csdef{glsxtrpostlink\glscategorylabel}{% - \glsxtrifwasfirstuse - {% +\glsxtr@newmgls{MGLSpl}{\@GLSpl@}{\@GLSpl@}{\@GLSpl@}{\@GLSpl@}% +\glsmfublocker{\MGLSpl} % \end{macrocode} -% Needs the specific font command here as the style may have been -% lost by the time the footnote occurs. +%\end{macro} +% +%\begin{macro}{\MGLSmainpl} +%\changes{1.48}{2021-11-22}{new} +%\begin{definition} +%\cs{MGLSmainpl}\oarg{options}\marg{label}\oarg{insert} +%\end{definition} +%Upper case all elements. Only use plural for main element. % \begin{macrocode} - \glsxtrdopostpunc{\protect\glsxtrabbrvfootnote{\glslabel}% - {\glsfirstlongfootnotefont{\glsentrylong{\glslabel}}}}% - }% - {}% - }% - \glshasattribute{\the\glslabeltok}{regular}% - {% - \glssetattribute{\the\glslabeltok}{regular}{false}% - }% - {}% - }% +\glsxtr@newmgls{MGLSmainpl}{\@GLS@}{\@GLS@}{\@GLSpl@}{\@GLSpl@}% +\glsmfublocker{\MGLSmainpl} % \end{macrocode} -% The footnote needs to be suppressed in the inline form, so -% \cs{glsxtrfull} must set the first use switch off. +%\end{macro} +% +%\begin{macro}{\@glslongortext@} +%\changes{1.48}{2021-11-22}{new} % \begin{macrocode} - \renewcommand*{\glsxtrsetupfulldefs}{% - \let\glsxtrifwasfirstuse\@secondoftwo - }% -}% -{% - \GlsXtrUseAbbrStyleFmts{short-em-postfootnote}% +\def\@glslongortext#1#2[#3]{% + \ifglshaslong{#2}{\@glsxtrlong{#1}{#2}[#3]}{\@glstext@{#1}{#2}[#3]}% } % \end{macrocode} -%\end{abbrvstyle} +%\end{macro} % -%\subsection{Predefined Styles (User Parentheses Hook)} -% These styles allow the user to adjust the parenthetical forms. -% These styles all test for the existence of the -% field given by: -%\begin{macro}{\glsxtruserfield} -%\changes{1.04}{2016-05-02}{new} -% Default is the useri field. +%\begin{macro}{\@glsshortortext@} +%\changes{1.48}{2021-11-22}{new} % \begin{macrocode} -\newcommand*{\glsxtruserfield}{useri} +\def\@glsshortortext#1#2[#3]{% + \ifglshasshort{#2}{\@glsxtrshort{#1}{#2}[#3]}{\@glstext@{#1}{#2}[#3]}% +} % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtruserparen} -%\changes{1.04}{2016-05-02}{new} -% The format of the parenthetical information. -% The first argument is the long/short form. The second argument -% is the entry's label. If \cs{glscurrentfieldvalue} has been -% defined, then we have at least \styfmt{glossaries} v4.23, which makes -% it easier for the user to adjust this. +%\begin{macro}{\@glsfullorfirst@} +%\changes{1.48}{2021-11-22}{new} % \begin{macrocode} -\ifdef\glscurrentfieldvalue -{ - \newcommand*{\glsxtruserparen}[2]{% - \glsxtrfullsep{#2}% - \glsxtrparen - {#1\ifglshasfield{\glsxtruserfield}{#2}{, \glscurrentfieldvalue}{}}% - } -} -{ - \newcommand*{\glsxtruserparen}[2]{% - \glsxtrfullsep{#2}% - \glsxtrparen - {#1\ifglshasfield{\glsxtruserfield}{#2}{, \@glo@thisvalue}{}}% - } +\def\@glsfullorfirst#1#2[#3]{% + \ifglshasshort{#2}{\@glsxtr@full{#1}{#2}[#3]}{\@glsfirst@{#1}{#2}[#3]}% } % \end{macrocode} %\end{macro} -% Font used for short form: -%\begin{macro}{\glsabbrvuserfont} -%\changes{1.04}{2016-05-02}{new} -%\changes{1.17}{2017-08-09}{initialised to default font} +% +%\begin{macro}{\@Glslongortext@} +%\changes{1.48}{2021-11-22}{new} % \begin{macrocode} -\newcommand*{\glsabbrvuserfont}[1]{\glsabbrvdefaultfont{#1}} +\def\@Glslongortext#1#2[#3]{% + \ifglshaslong{#2}{\@Glsxtrlong{#1}{#2}[#3]}{\@Glstext@{#1}{#2}[#3]}% +} % \end{macrocode} %\end{macro} -% Font used for short form on first use: -%\begin{macro}{\glsfirstabbrvuserfont} -%\changes{1.04}{2016-05-02}{new} +% +%\begin{macro}{\@Glsshortortext@} +%\changes{1.48}{2021-11-22}{new} % \begin{macrocode} -\newcommand*{\glsfirstabbrvuserfont}[1]{\glsabbrvuserfont{#1}} +\def\@Glsshortortext#1#2[#3]{% + \ifglshasshort{#2}{\@Glsxtrshort{#1}{#2}[#3]}{\@Glstext@{#1}{#2}[#3]}% +} % \end{macrocode} %\end{macro} -% Font used for long form: -%\begin{macro}{\glslonguserfont} -%\changes{1.04}{2016-05-02}{new} -%\changes{1.17}{2017-08-09}{initialised to default font} +% +%\begin{macro}{\@Glsfullorfirst@} +%\changes{1.48}{2021-11-22}{new} % \begin{macrocode} -\newcommand*{\glslonguserfont}[1]{\glslongdefaultfont{#1}} +\def\@Glsfullorfirst#1#2[#3]{% + \ifglshasshort{#2}{\@Glsxtr@full{#1}{#2}[#3]}{\@Glsfirst@{#1}{#2}[#3]}% +} % \end{macrocode} %\end{macro} -% Font used for long form on first use: -%\begin{macro}{\glsfirstlonguserfont} -%\changes{1.04}{2016-05-02}{new} +% +%\begin{macro}{\mglsshort} +%\changes{1.48}{2021-11-22}{new} +%\begin{definition} +%\cs{mglsshort}\oarg{options}\marg{label}\oarg{insert} +%\end{definition} +% Use short or text for all elements. % \begin{macrocode} -\newcommand*{\glsfirstlonguserfont}[1]{\glslonguserfont{#1}} +\glsxtr@newmgls{mglsshort}% +{\@glsshortortext}{\@glsshortortext}{\@glsshortortext}{\@glsshortortext}% % \end{macrocode} %\end{macro} -% The default short form suffix: -%\begin{macro}{\glsxtrusersuffix} -%\changes{1.04}{2016-05-02}{new} +% +%\begin{macro}{\mglslong} +%\changes{1.48}{2021-11-22}{new} +%\begin{definition} +%\cs{mglslong}\oarg{options}\marg{label}\oarg{insert} +%\end{definition} +% Use long or text for all elements. % \begin{macrocode} -\newcommand*{\glsxtrusersuffix}{\glsxtrabbrvpluralsuffix} +\glsxtr@newmgls{mglslong}% +{\@glslongortext}{\@glslongortext}{\@glslongortext}{\@glslongortext}% % \end{macrocode} %\end{macro} % -% Description encapsulator. -%\begin{macro}{\glsuserdescription} -%\changes{1.30}{2018-04-25}{new} -%The first argument is the description. The second argument is the -%label. +%\begin{macro}{\mglsfull} +%\changes{1.48}{2021-11-22}{new} +%\begin{definition} +%\cs{mglsfull}\oarg{options}\marg{label}\oarg{insert} +%\end{definition} +% Use full or first for all elements. % \begin{macrocode} -\newcommand*{\glsuserdescription}[2]{\glslonguserfont{#1}} +\glsxtr@newmgls{mglsfull}% +{\@glsfullorfirst}{\@glsfullorfirst}{\@glsfullorfirst}{\@glsfullorfirst}% % \end{macrocode} %\end{macro} % -%\begin{abbrvstyle}{long-short-user} -%\changes{1.04}{2016-05-02}{new} -%\changes{1.42}{2020-02-03}{added missing text key} +%\begin{macro}{\Mglsshort} +%\changes{1.48}{2021-11-22}{new} +%\begin{definition} +%\cs{Mglsshort}\oarg{options}\marg{label}\oarg{insert} +%\end{definition} +% Use short or text for all elements with initial cap on first element. % \begin{macrocode} -\newabbreviationstyle{long-short-user}% -{% +\glsxtr@newmgls{Mglsshort}% +{\@Glsshortortext}{\@glsshortortext}{\@Glsshortortext}{\@glsshortortext}% +\glsmfuaddmap{\mglsshort}{\Mglsshort} % \end{macrocode} -% Set accessibility attributes if enabled. +%\end{macro} +% +%\begin{macro}{\Mglslong} +%\changes{1.48}{2021-11-22}{new} +%\begin{definition} +%\cs{Mglslong}\oarg{options}\marg{label}\oarg{insert} +%\end{definition} +% Use long or text for all elements with initial cap on first +% element. % \begin{macrocode} - \glsxtrAccSuppAbbrSetFirstLongAttrs\glscategorylabel +\glsxtr@newmgls{Mglslong}% +{\@Glslongortext}{\@glslongortext}{\@Glslongortext}{\@glslongortext}% +\glsmfuaddmap{\mglslong}{\Mglslong} % \end{macrocode} -% Setup the default fields. +%\end{macro} +% +%\begin{macro}{\Mglsfull} +%\changes{1.48}{2021-11-22}{new} +%\begin{definition} +%\cs{Mglsfull}\oarg{options}\marg{label}\oarg{insert} +%\end{definition} +% Use full or first for all elements with initial cap on first +% element. % \begin{macrocode} - \renewcommand*{\CustomAbbreviationFields}{% - name={\glsxtrlongshortname}, - sort={\the\glsshorttok}, - first={\protect\glsfirstlonguserfont{\the\glslongtok}% - \protect\glsxtruserparen{\protect\glsfirstabbrvuserfont{\the\glsshorttok}}% - {\the\glslabeltok}},% - firstplural={\protect\glsfirstlonguserfont{\the\glslongpltok}% - \protect\glsxtruserparen - {\protect\glsfirstabbrvuserfont{\the\glsshortpltok}}{\the\glslabeltok}},% +\glsxtr@newmgls{Mglsfull}% +{\@Glsfullorfirst}{\@glsfullorfirst}{\@Glsfullorfirst}{\@glsfullorfirst}% +\glsmfuaddmap{\mglsfull}{\Mglsfull} % \end{macrocode} -%\changes{1.15}{2017-05-10}{fixed spelling of \cs{glsabbrvfont}} +%\end{macro} +% +%\begin{macro}{\mglsname} +%\changes{1.48}{2021-11-22}{new} +%\begin{definition} +%\cs{mglsname}\oarg{options}\marg{label}\oarg{insert} +%\end{definition} +% Use name for all elements. % \begin{macrocode} - text={\protect\glsabbrvuserfont{\the\glsshorttok}},% - plural={\protect\glsabbrvuserfont{\the\glsshortpltok}},% - description={\protect\glsuserdescription{\the\glslongtok}% - {\the\glslabeltok}}}% +\glsxtr@newmgls{mglsname}% + {\@glsname@}{\@glsname@}{\@glsname@}{\@glsname@}% % \end{macrocode} -% Unset the \catattr{regular} attribute if it has been set. +%\end{macro} +% +%\begin{macro}{\Mglsname} +%\changes{1.48}{2021-11-22}{new} +%\begin{definition} +%\cs{Mglsname}\oarg{options}\marg{label}\oarg{insert} +%\end{definition} +% Use name for all elements with initial cap on first +% element. % \begin{macrocode} - \renewcommand*{\GlsXtrPostNewAbbreviation}{% - \glshasattribute{\the\glslabeltok}{regular}% - {% - \glssetattribute{\the\glslabeltok}{regular}{false}% - }% - {}% - }% -}% -{% +\glsxtr@newmgls{Mglsname}% + {\@Glsname@}{\@glsname@}{\@Glsname@}{\@glsname@}% +\glsmfuaddmap{\mglsname}{\Mglsname} % \end{macrocode} -% In case the user wants to mix and match font styles, these are -% redefined here. +%\end{macro} +% +%\begin{macro}{\MGlsname} +%\changes{1.48}{2021-11-22}{new} +%\begin{definition} +%\cs{MGlsname}\oarg{options}\marg{label}\oarg{insert} +%\end{definition} +% Use name for all elements with initial cap on all +% elements. % \begin{macrocode} - \renewcommand*{\abbrvpluralsuffix}{\glsxtrusersuffix}% - \renewcommand*{\glsabbrvfont}[1]{\glsabbrvuserfont{##1}}% - \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvuserfont{##1}}% - \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlonguserfont{##1}}% - \renewcommand*{\glslongfont}[1]{\glslonguserfont{##1}}% +\glsxtr@newmgls{MGlsname}% + {\@Glsname@}{\@Glsname@}{\@Glsname@}{\@Glsname@}% +\glsmfublocker{\MGlsname} % \end{macrocode} -% The first use full form and the inline full form are the same for -% this style. +%\end{macro} +% +%\begin{macro}{\@glssymbolorgls} +%\changes{1.48}{2021-11-22}{new} % \begin{macrocode} - \renewcommand*{\glsxtrfullformat}[2]{% - \glsfirstlonguserfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - \glsxtruserparen{\glsfirstabbrvuserfont{\glsaccessshort{##1}}}{##1}% - }% - \renewcommand*{\glsxtrfullplformat}[2]{% - \glsfirstlonguserfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - \glsxtruserparen{\glsfirstabbrvuserfont{\glsaccessshortpl{##1}}}{##1}% - }% - \renewcommand*{\Glsxtrfullformat}[2]{% - \glsfirstlonguserfont{\Glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - \glsxtruserparen{\glsfirstabbrvuserfont{\glsaccessshort{##1}}}{##1}% - }% - \renewcommand*{\Glsxtrfullplformat}[2]{% - \glsfirstlonguserfont{\Glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - \glsxtruserparen{\glsfirstabbrvuserfont{\glsaccessshortpl{##1}}}{##1}% - }% +\def\@glssymbolorgls#1#2[#3]{% + \ifglshassymbol{#2}{\@glssymbol@{#1}{#2}[#3]}{\@gls@{#1}{#2}[#3]}% } % \end{macrocode} -%\end{abbrvstyle} +%\end{macro} % -%\begin{abbrvstyle}{long-postshort-user} -%\changes{1.12}{2017-02-03}{new} -%\changes{1.42}{2020-02-03}{added missing text key} -%Like \abbrstyle{long-short-user} but defers the parenthetical -%matter to after the link. +%\begin{macro}{\@glssymbolorGls} +%\changes{1.48}{2021-11-22}{new} % \begin{macrocode} -\newabbreviationstyle{long-postshort-user}% -{% +\def\@glssymbolorGls#1#2[#3]{% + \ifglshassymbol{#2}{\@glssymbol@{#1}{#2}[#3]}{\@Gls@{#1}{#2}[#3]}% +} % \end{macrocode} -% Set accessibility attributes if enabled. +%\end{macro} +% +%\begin{macro}{\mglssymbol} +%\changes{1.48}{2021-11-22}{new} +%\begin{definition} +%\cs{mglssymbol}\oarg{options}\marg{label}\oarg{insert} +%\end{definition} +% Use \cs{glssymbol} if the \gloskey{symbol} key is set otherwise +% use \cs{gls}. % \begin{macrocode} - \glsxtrAccSuppAbbrSetFirstLongAttrs\glscategorylabel +\glsxtr@newmgls{mglssymbol}% + {\@glssymbolorgls}{\@glssymbolorgls}{\@glssymbolorgls}{\@glssymbolorgls}% % \end{macrocode} -% Setup the default fields. +%\end{macro} +% +%\begin{macro}{\Mglssymbol} +%\changes{1.48}{2021-11-22}{new} +%\begin{definition} +%\cs{Mglssymbol}\oarg{options}\marg{label}\oarg{insert} +%\end{definition} +% As above but initial the first element if it's not a symbol. % \begin{macrocode} - \renewcommand*{\CustomAbbreviationFields}{% - name={\glsxtrlongshortname}, - sort={\the\glsshorttok}, - first={\protect\glsfirstlonguserfont{\the\glslongtok}},% - firstplural={\protect\glsfirstlonguserfont{\the\glslongpltok}},% +\glsxtr@newmgls{Mglssymbol}% + {\@glssymbolorGls}{\@glssymbolorgls}{\@glssymbolorGls}{\@glssymbolorgls}% +\glsmfuaddmap{\mglssymbol}{\Mglssymbol} % \end{macrocode} -%\changes{1.15}{2017-05-10}{fixed spelling of \cs{glsabbrvfont}} +%\end{macro} +% +%\begin{macro}{\MGlssymbol} +%\changes{1.48}{2021-11-22}{new} +%\begin{definition} +%\cs{MGlssymbol}\oarg{options}\marg{label}\oarg{insert} +%\end{definition} +% As above but initial each element if it's not a symbol. % \begin{macrocode} - text={\protect\glsabbrvuserfont{\the\glsshorttok}},% - plural={\protect\glsabbrvuserfont{\the\glsshortpltok}},% - description={\protect\glsuserdescription{\the\glslongtok}% - {\the\glslabeltok}}}% - \renewcommand*{\GlsXtrPostNewAbbreviation}{% - \csdef{glsxtrpostlink\glscategorylabel}{% - \glsxtrifwasfirstuse - {% - \glsxtruserparen - {\glsfirstabbrvuserfont{\glsentryshort{\glslabel}}}% - {\glslabel}% - }% - {}% - }% - \glshasattribute{\the\glslabeltok}{regular}% - {% - \glssetattribute{\the\glslabeltok}{regular}{false}% - }% - {}% - }% -}% -{% +\glsxtr@newmgls{MGlssymbol}% + {\@glssymbolorGls}{\@glssymbolorGls}{\@glssymbolorGls}{\@glssymbolorGls}% +\glsmfublocker{\MGlssymbol} % \end{macrocode} -% In case the user wants to mix and match font styles, these are -% redefined here. +%\end{macro} +% +%\begin{macro}{\mglsfield} +%\changes{1.48}{2021-11-22}{new} % \begin{macrocode} - \renewcommand*{\abbrvpluralsuffix}{\glsxtrusersuffix}% - \renewcommand*{\glsabbrvfont}[1]{\glsabbrvuserfont{##1}}% - \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvuserfont{##1}}% - \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlonguserfont{##1}}% - \renewcommand*{\glslongfont}[1]{\glslonguserfont{##1}}% +\newcommand{\mglsfield}{useri} % \end{macrocode} -%First use full form: +%\end{macro} +%\begin{macro}{\@glsfieldorgls} +%\changes{1.48}{2021-11-22}{new} % \begin{macrocode} - \renewcommand*{\glsxtrfullformat}[2]{% - \glsfirstlonguserfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - }% - \renewcommand*{\glsxtrfullplformat}[2]{% - \glsfirstlonguserfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - }% - \renewcommand*{\Glsxtrfullformat}[2]{% - \glsfirstlonguserfont{\Glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - }% - \renewcommand*{\Glsxtrfullplformat}[2]{% - \glsfirstlonguserfont{\Glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - }% +\def\@glsfieldorgls#1#2[#3]{% + \glsxtrifhasfield{\mglsfield}{#2}% + {\@glsdisp[#1]{#2}{\glscurrentfieldvalue#3}}% + {\@gls@{#1}{#2}[#3]}% +} % \end{macrocode} -% In-line format: +%\end{macro} +% +%\begin{macro}{\@Glsfieldorgls} +%\changes{1.48}{2021-11-22}{new} % \begin{macrocode} - \renewcommand*{\glsxtrinlinefullformat}[2]{% - \glsfirstlonguserfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - \glsxtruserparen{\glsfirstabbrvuserfont{\glsaccessshort{##1}}}{##1}% - }% - \renewcommand*{\glsxtrinlinefullplformat}[2]{% - \glsfirstlonguserfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - \glsxtruserparen{\glsfirstabbrvuserfont{\glsaccessshortpl{##1}}}{##1}% - }% - \renewcommand*{\Glsxtrinlinefullformat}[2]{% - \glsfirstlonguserfont{\Glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - \glsxtruserparen{\glsfirstabbrvuserfont{\glsaccessshort{##1}}}{##1}% - }% - \renewcommand*{\Glsxtrinlinefullplformat}[2]{% - \glsfirstlonguserfont{\Glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - \glsxtruserparen{\glsfirstabbrvuserfont{\glsaccessshortpl{##1}}}{##1}% - }% +\def\@Glsfieldorgls#1#2[#3]{% + \glsxtrifhasfield{\mglsfield}{#2}% + {\@glsdisp[#1]{#2}{% + \expandafter\glssentencecase\expandafter{\glscurrentfieldvalue#3}}}% + {\@Gls@{#1}{#2}[#3]}% } % \end{macrocode} -%\end{abbrvstyle} +%\end{macro} % -%Small-caps is awkward, so support for that is added. -%\begin{macro}{\glsabbrvscuserfont} +%\begin{macro}{\mglsusefield} %\changes{1.48}{2021-11-22}{new} +%\begin{definition} +%\cs{mglsusefield}\oarg{options}\marg{label}\oarg{insert} +%\end{definition} +% Use the field given by \cs{mglsfield}. % \begin{macrocode} -\newcommand*{\glsabbrvscuserfont}{\glsabbrvscfont}% +\glsxtr@newmgls{mglsusefield}% + {\@glsfieldorgls}{\@glsfieldorgls}{\@glsfieldorgls}{\@glsfieldorgls}% % \end{macrocode} %\end{macro} -%\begin{macro}{\glsfirstabbrvscuserfont} +% +%\begin{macro}{\Mglsusefield} %\changes{1.48}{2021-11-22}{new} +%\begin{definition} +%\cs{Mglsusefield}\oarg{options}\marg{label}\oarg{insert} +%\end{definition} +% As above but use initial cap for first element only. % \begin{macrocode} -\newcommand*{\glsfirstabbrvscuserfont}{\glsabbrvscuserfont}% +\glsxtr@newmgls{Mglsusefield}% + {\@Glsfieldorgls}{\@glsfieldorgls}{\@Glsfieldorgls}{\@glsfieldorgls}% +\glsmfuaddmap{\mglsusefield}{\Mglsusefield} % \end{macrocode} %\end{macro} -% The default short form suffix: -%\begin{macro}{\glsxtrscusersuffix} +% +%\begin{macro}{\MGlsusefield} %\changes{1.48}{2021-11-22}{new} +%\begin{definition} +%\cs{MGlsusefield}\oarg{options}\marg{label}\oarg{insert} +%\end{definition} +% As above but use initial cap for all elements. % \begin{macrocode} -\newcommand*{\glsxtrscusersuffix}{\glsxtrscsuffix} +\glsxtr@newmgls{MGlsusefield}% + {\@Glsfieldorgls}{\@Glsfieldorgls}{\@Glsfieldorgls}{\@Glsfieldorgls}% +\glsmfublocker{\MGlsusefield} % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrscusername} +% Use commands provided by \sty{glossaries-prefix} if it has been +% loaded. +%\begin{macro}{\mpglsWarning} %\changes{1.48}{2021-11-22}{new} -% The default name format for this style. % \begin{macrocode} -\newcommand*{\glsxtrlongshortscusername}{% - \protect\glsabbrvscuserfont{\the\glsshorttok}% +\newcommand*{\mpglsWarning}{% + \GlossariesExtraWarning{glossaries-prefix.sty is required for + \string\mpgls\space family of commands}% } % \end{macrocode} %\end{macro} % -%\begin{abbrvstyle}{long-postshort-sc-user} -%\changes{1.48}{2017-02-03}{new} -%Like \abbrstyle{long-short-sc-user} but uses smallcaps. +%\begin{macro}{\@pglsorgls} +%\changes{1.48}{2021-11-22}{new} % \begin{macrocode} -\newabbreviationstyle{long-postshort-sc-user}% -{% +\def\@pglsorgls#1#2[#3]{% + \ifdef\@pgls@{\@pgls@{#1}{#2}[#3]}{\mpglsWarning\@gls@{#1}{#2}[#3]}% +} % \end{macrocode} -% Set accessibility attributes if enabled. +%\end{macro} +% +%\begin{macro}{\@pglsorglspl} +%\changes{1.48}{2021-11-22}{new} % \begin{macrocode} - \glsxtrAccSuppAbbrSetFirstLongAttrs\glscategorylabel +\def\@pglsorglspl#1#2[#3]{% + \ifdef\@pglspl@{\@pglspl@{#1}{#2}[#3]}{\mpglsWarning\@glspl@{#1}{#2}[#3]}% +} % \end{macrocode} -% Setup the default fields. +%\end{macro} +% +%\begin{macro}{\@Pglsorgls} +%\changes{1.48}{2021-11-22}{new} % \begin{macrocode} - \renewcommand*{\CustomAbbreviationFields}{% - name={\glsxtrlongshortscusername}, - sort={\the\glsshorttok}, - first={\protect\glsfirstlonguserfont{\the\glslongtok}},% - firstplural={\protect\glsfirstlonguserfont{\the\glslongpltok}},% - text={\protect\glsabbrvscuserfont{\the\glsshorttok}},% - plural={\protect\glsabbrvscuserfont{\the\glsshortpltok}},% - description={\protect\glsuserdescription{\the\glslongtok}% - {\the\glslabeltok}}}% - \renewcommand*{\GlsXtrPostNewAbbreviation}{% - \csdef{glsxtrpostlink\glscategorylabel}{% - \glsxtrifwasfirstuse - {% - \glsxtruserparen - {\glsfirstabbrvscuserfont{\glsentryshort{\glslabel}}}% - {\glslabel}% - }% - {}% - }% - \glshasattribute{\the\glslabeltok}{regular}% - {% - \glssetattribute{\the\glslabeltok}{regular}{false}% - }% - {}% - }% -}% -{% +\def\@Pglsorgls#1#2[#3]{% + \ifdef\@Pgls@{\@Pgls@{#1}{#2}[#3]}{\mpglsWarning\@Gls@{#1}{#2}[#3]}% +} % \end{macrocode} -% In case the user wants to mix and match font styles, these are -% redefined here. +%\end{macro} +% +%\begin{macro}{\@pglsorglspl} +%\changes{1.48}{2021-11-22}{new} % \begin{macrocode} - \renewcommand*{\abbrvpluralsuffix}{\glsxtrscusersuffix}% - \renewcommand*{\glsabbrvfont}[1]{\glsabbrvscuserfont{##1}}% - \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvscuserfont{##1}}% - \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlonguserfont{##1}}% - \renewcommand*{\glslongfont}[1]{\glslonguserfont{##1}}% +\def\@pglsorglspl#1#2[#3]{% + \ifdef\@pglspl@{\@pglspl@{#1}{#2}[#3]}{\mpglsWarning\@glspl@{#1}{#2}[#3]}% +} % \end{macrocode} -%First use full form: +%\end{macro} +% +%\begin{macro}{\@Pglsorglspl} +%\changes{1.48}{2021-11-22}{new} % \begin{macrocode} - \renewcommand*{\glsxtrfullformat}[2]{% - \glsfirstlonguserfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - }% - \renewcommand*{\glsxtrfullplformat}[2]{% - \glsfirstlonguserfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - }% - \renewcommand*{\Glsxtrfullformat}[2]{% - \glsfirstlonguserfont{\Glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - }% - \renewcommand*{\Glsxtrfullplformat}[2]{% - \glsfirstlonguserfont{\Glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - }% +\def\@Pglsorglspl#1#2[#3]{% + \ifdef\@Pglspl@{\@Pglspl@{#1}{#2}[#3]}{\mpglsWarning\@Glspl@{#1}{#2}[#3]}% +} % \end{macrocode} -% In-line format: +%\end{macro} +% +%\begin{macro}{\@PGLSorgls} +%\changes{1.48}{2021-11-22}{new} % \begin{macrocode} - \renewcommand*{\glsxtrinlinefullformat}[2]{% - \glsfirstlonguserfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - \glsxtruserparen{\glsfirstabbrvscuserfont{\glsaccessshort{##1}}}{##1}% - }% - \renewcommand*{\glsxtrinlinefullplformat}[2]{% - \glsfirstlonguserfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - \glsxtruserparen{\glsfirstabbrvscuserfont{\glsaccessshortpl{##1}}}{##1}% - }% - \renewcommand*{\Glsxtrinlinefullformat}[2]{% - \glsfirstlonguserfont{\Glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - \glsxtruserparen{\glsfirstabbrvscuserfont{\glsaccessshort{##1}}}{##1}% - }% - \renewcommand*{\Glsxtrinlinefullplformat}[2]{% - \glsfirstlonguserfont{\Glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - \glsxtruserparen{\glsfirstabbrvscuserfont{\glsaccessshortpl{##1}}}{##1}% - }% +\def\@PGLSorgls#1#2[#3]{% + \ifdef\@PGLS@{\@PGLS@{#1}{#2}[#3]}{\mpglsWarning\@GLS@{#1}{#2}[#3]}% } % \end{macrocode} -%\end{abbrvstyle} +%\end{macro} % -%\begin{macro}{\glsxtrlongshortuserdescname} -%\changes{1.25}{2017-11-24}{new} +%\begin{macro}{\@PGLSorglspl} +%\changes{1.48}{2021-11-22}{new} % \begin{macrocode} -\newcommand*{\glsxtrlongshortuserdescname}{% - \protect\glslonguserfont{\the\glslongtok}% - \protect\glsxtruserparen - {\protect\glsabbrvuserfont{\the\glsshorttok}}{\the\glslabeltok}% +\def\@PGLSorglspl#1#2[#3]{% + \ifdef\@PGLSpl@{\@PGLSpl@{#1}{#2}[#3]}{\mpglsWarning\@GLSpl@{#1}{#2}[#3]}% } % \end{macrocode} %\end{macro} % -%\begin{abbrvstyle}{long-postshort-user-desc} -%\changes{1.12}{2017-02-03}{new} -%Like \abbrstyle{long-postshort-user} but the user supplies the -%description. +%\begin{macro}{\mpgls} +%\changes{1.48}{2021-11-22}{new} +%\begin{definition} +%\cs{mpgls}\oarg{options}\marg{label}\oarg{insert} +%\end{definition} +% Use \cs{pgls} for the first element and \cs{gls} for the remainder. % \begin{macrocode} -\newabbreviationstyle{long-postshort-user-desc}% -{% +\glsxtr@newmgls{mpgls}{\@pglsorgls@}{\@gls@}{\@pglsorgls@}{\@gls@}% % \end{macrocode} -% Set accessibility attributes if enabled. +%\end{macro} +% +%\begin{macro}{\mpglspl} +%\changes{1.48}{2021-11-22}{new} +%\begin{definition} +%\cs{mpglspl}\oarg{options}\marg{label}\oarg{insert} +%\end{definition} +% Use \cs{pglspl} for the first element and \cs{glspl} for the remainder. % \begin{macrocode} - \glsxtrAccSuppAbbrSetTextShortAttrs\glscategorylabel +\glsxtr@newmgls{mpglspl}{\@pglsorglspl@}{\@glspl@}{\@pglsorglspl@}{\@glspl@}% % \end{macrocode} -% Setup the default fields. +%\end{macro} +% +%\begin{macro}{\mpglsmainpl} +%\changes{1.48}{2021-11-22}{new} +%\begin{definition} +%\cs{mpglsmainpl}\oarg{options}\marg{label}\oarg{insert} +%\end{definition} +%Only use plural for main element and only use prefixing command for +%first element. % \begin{macrocode} - \renewcommand*{\CustomAbbreviationFields}{% - name={\glsxtrlongshortuserdescname}, - sort={\the\glslongtok}, - first={\protect\glsfirstlonguserfont{\the\glslongtok}},% - firstplural={\protect\glsfirstlonguserfont{\the\glslongpltok}},% +\glsxtr@newmgls{mpglsmainpl}{\@pglsorgls@}{\@gls@}{\@pglsorglspl@}{\@glspl@}% % \end{macrocode} -%\changes{1.15}{2017-05-10}{fixed spelling of \cs{glsabbrvfont}} +%\end{macro} +% +%\begin{macro}{\Mpgls} +%\changes{1.48}{2021-11-22}{new} +%\begin{definition} +%\cs{Mpgls}\oarg{options}\marg{label}\oarg{insert} +%\end{definition} +% Use \cs{Pgls} for the first element and \cs{gls} for the remainder. % \begin{macrocode} - text={\protect\glsabbrvuserfont{\the\glsshorttok}},% - plural={\protect\glsabbrvuserfont{\the\glsshortpltok}}% - }% - \renewcommand*{\GlsXtrPostNewAbbreviation}{% - \csdef{glsxtrpostlink\glscategorylabel}{% - \glsxtrifwasfirstuse - {% - \glsxtruserparen - {\glsfirstabbrvuserfont{\glsentryshort{\glslabel}}}% - {\glslabel}% - }% - {}% - }% - \glshasattribute{\the\glslabeltok}{regular}% - {% - \glssetattribute{\the\glslabeltok}{regular}{false}% - }% - {}% - }% -}% -{% - \GlsXtrUseAbbrStyleFmts{long-postshort-user}% -} +\glsxtr@newmgls{Mpgls}{\@Pglsorgls@}{\@gls@}{\@Pglsorgls@}{\@gls@}% +\glsmfuaddmap{\mpgls}{\Mpgls} % \end{macrocode} -%\end{abbrvstyle} +%\end{macro} % -%\begin{macro}{\glsxtrlongshortscuserdescname} +%\begin{macro}{\Mpglspl} %\changes{1.48}{2021-11-22}{new} +%\begin{definition} +%\cs{Mpglspl}\oarg{options}\marg{label}\oarg{insert} +%\end{definition} +% Use \cs{Pglspl} for the first element and \cs{glspl} for the remainder. % \begin{macrocode} -\newcommand*{\glsxtrlongshortscuserdescname}{% - \protect\glslonguserfont{\the\glslongtok}% - \protect\glsxtruserparen - {\protect\glsabbrvscuserfont{\the\glsshorttok}}{\the\glslabeltok}% -} +\glsxtr@newmgls{Mpglspl}{\@Pglsorglspl@}{\@glspl@}{\@Pglsorglspl@}{\@glspl@}% +\glsmfuaddmap{\mpglspl}{\Mpglspl} % \end{macrocode} %\end{macro} % -%\begin{abbrvstyle}{long-postshort-sc-user-desc} +%\begin{macro}{\Mpglsmainpl} %\changes{1.48}{2021-11-22}{new} -%Like \abbrstyle{long-postshort-sc-user} but the user supplies the -%description. +%\begin{definition} +%\cs{Mpglsmainpl}\oarg{options}\marg{label}\oarg{insert} +%\end{definition} +%Only use plural for main element and only use first letter +%uppercase prefixing command for first element. % \begin{macrocode} -\newabbreviationstyle{long-postshort-sc-user-desc}% -{% +\glsxtr@newmgls{Mpglsmainpl}{\@Pglsorgls@}{\@gls@}{\@Pglsorglspl@}{\@glspl@}% +\glsmfuaddmap{\mpglsmainpl}{\Mpglsmainpl} % \end{macrocode} -% Set accessibility attributes if enabled. +%\end{macro} +% +%\begin{macro}{\MPGls} +%\changes{1.48}{2021-11-22}{new} +%\begin{definition} +%\cs{MPGls}\oarg{options}\marg{label}\oarg{insert} +%\end{definition} +%Use \cs{Pgls} for the first element and \cs{Gls} for the remainder. % \begin{macrocode} - \glsxtrAccSuppAbbrSetTextShortAttrs\glscategorylabel +\glsxtr@newmgls{MPGls}{\@Pglsorgls@}{\@Gls@}{\@Pglsorgls@}{\@Gls@}% +\glsmfublocker{\MPGls} % \end{macrocode} -% Setup the default fields. +%\end{macro} +% +%\begin{macro}{\MPGlspl} +%\changes{1.48}{2021-11-22}{new} +%\begin{definition} +%\cs{MPGlspl}\oarg{options}\marg{label}\oarg{insert} +%\end{definition} +% Use \cs{Pglspl} for the first element and \cs{Glspl} for the remainder. % \begin{macrocode} - \renewcommand*{\CustomAbbreviationFields}{% - name={\glsxtrlongshortscuserdescname}, - sort={\the\glslongtok}, - first={\protect\glsfirstlonguserfont{\the\glslongtok}},% - firstplural={\protect\glsfirstlonguserfont{\the\glslongpltok}},% - text={\protect\glsabbrvscuserfont{\the\glsshorttok}},% - plural={\protect\glsabbrvscuserfont{\the\glsshortpltok}}% - }% - \renewcommand*{\GlsXtrPostNewAbbreviation}{% - \csdef{glsxtrpostlink\glscategorylabel}{% - \glsxtrifwasfirstuse - {% - \glsxtruserparen - {\glsfirstabbrvscuserfont{\glsentryshort{\glslabel}}}% - {\glslabel}% - }% - {}% - }% - \glshasattribute{\the\glslabeltok}{regular}% - {% - \glssetattribute{\the\glslabeltok}{regular}{false}% - }% - {}% - }% -}% -{% - \GlsXtrUseAbbrStyleFmts{long-postshort-sc-user}% -} +\glsxtr@newmgls{MPGlspl}{\@Pglsorglspl@}{\@Glspl@}{\@Pglsorglspl@}{\@Glspl@}% +\glsmfublocker{\MPGlspl} % \end{macrocode} -%\end{abbrvstyle} +%\end{macro} % +%\begin{macro}{\MPGlsmainpl} +%\changes{1.48}{2021-11-22}{new} +%\begin{definition} +%\cs{MPGlsmainpl}\oarg{options}\marg{label}\oarg{insert} +%\end{definition} +%Only use plural for main element and first letter uppercase all +%elements. +% \begin{macrocode} +\glsxtr@newmgls{MPGlsmainpl}{\@Pglsorgls@}{\@Gls@}{\@Pglsorglspl@}{\@Glspl@}% +\glsmfublocker{\MPGlsmainpl} +% \end{macrocode} +%\end{macro} % -%\begin{abbrvstyle}{short-postlong-user} -%\changes{1.12}{2017-02-03}{new} -%\changes{1.42}{2020-02-03}{added missing text key} -%Like \abbrstyle{short-long-user} but defers the parenthetical -%matter to after the link. +%\begin{macro}{\MPGLS} +%\changes{1.48}{2021-11-22}{new} +%\begin{definition} +%\cs{MPGLS}\oarg{options}\marg{label}\oarg{insert} +%\end{definition} +% Use \cs{PGLS} for the first element and \cs{GLS} for the remainder. % \begin{macrocode} -\newabbreviationstyle{short-postlong-user}% -{% +\glsxtr@newmgls{MPGLS}{\@PGLSorgls@}{\@GLS@}{\@PGLSorgls@}{\@GLS@}% +\glsmfublocker{\MPGLS} % \end{macrocode} -% Set accessibility attributes if enabled. +%\end{macro} +% +%\begin{macro}{\MPGLSpl} +%\changes{1.48}{2021-11-22}{new} +%\begin{definition} +%\cs{MPGLSpl}\oarg{options}\marg{label}\oarg{insert} +%\end{definition} +% Use \cs{PGLSpl} for the first element and \cs{GLSpl} for the remainder. % \begin{macrocode} - \glsxtrAccSuppAbbrSetFirstLongAttrs\glscategorylabel +\glsxtr@newmgls{MPGLSpl}{\@PGLSorglspl@}{\@GLSpl@}{\@PGLSorglspl@}{\@GLSpl@}% +\glsmfublocker{\MPGLSpl} % \end{macrocode} -% Setup the default fields. +%\end{macro} +% +%\begin{macro}{\MPGLSmainpl} +%\changes{1.48}{2021-11-22}{new} +%\begin{definition} +%\cs{MPGLSmainpl}\oarg{options}\marg{label}\oarg{insert} +%\end{definition} +%Only use plural for main element and uppercase all elements. % \begin{macrocode} - \renewcommand*{\CustomAbbreviationFields}{% - name={\glsxtrshortlongname}, - sort={\the\glsshorttok}, - first={\protect\glsfirstlonguserfont{\the\glslongtok}},% - firstplural={\protect\glsfirstlonguserfont{\the\glslongpltok}},% +\glsxtr@newmgls{MPGLSmainpl}{\@PGLSorgls@}{\@GLS@}{\@PGLSorglspl@}{\@GLSpl@}% +\glsmfublocker{\MPGLSmainpl} % \end{macrocode} -%\changes{1.15}{2017-05-10}{fixed spelling of \cs{glsabbrvfont}} +%\end{macro} +% +%Not currently implementing any other variations. +% +%\subsection{Multi-Lingual Support} +% Add the facility to load language modules, if they are installed, +% but none are provided with this package. +% +%\begin{macro}{\RequireGlossariesExtraLang} +%\changes{0.5.3}{2015-12-09}{new} % \begin{macrocode} - text={\protect\glsabbrvuserfont{\the\glsshorttok}},% - plural={\protect\glsabbrvuserfont{\the\glsshortpltok}},% - description={\protect\glsuserdescription{\the\glslongtok}% - {\the\glslabeltok}}}% - \renewcommand*{\GlsXtrPostNewAbbreviation}{% - \csdef{glsxtrpostlink\glscategorylabel}{% - \glsxtrifwasfirstuse - {% - \glsxtruserparen - {\glsfirstlonguserfont{\glsentrylong{\glslabel}}}% - {\glslabel}% - }% - {}% - }% - \glshasattribute{\the\glslabeltok}{regular}% - {% - \glssetattribute{\the\glslabeltok}{regular}{false}% - }% - {}% - }% -}% -{% -% \end{macrocode} -% In case the user wants to mix and match font styles, these are -% redefined here. -% \begin{macrocode} - \renewcommand*{\abbrvpluralsuffix}{\glsxtrusersuffix}% - \renewcommand*{\glsabbrvfont}[1]{\glsabbrvuserfont{##1}}% - \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvuserfont{##1}}% - \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlonguserfont{##1}}% - \renewcommand*{\glslongfont}[1]{\glslonguserfont{##1}}% -% \end{macrocode} -%First use full form: -% \begin{macrocode} - \renewcommand*{\glsxtrfullformat}[2]{% - \glsfirstabbrvuserfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - }% - \renewcommand*{\glsxtrfullplformat}[2]{% - \glsfirstabbrvuserfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - }% - \renewcommand*{\Glsxtrfullformat}[2]{% - \glsfirstabbrvuserfont{\Glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - }% - \renewcommand*{\Glsxtrfullplformat}[2]{% - \glsfirstabbrvuserfont{\Glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - }% -% \end{macrocode} -% In-line format: -% \begin{macrocode} - \renewcommand*{\glsxtrinlinefullformat}[2]{% - \glsfirstabbrvuserfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - \glsxtruserparen{\glsfirstlonguserfont{\glsaccesslong{##1}}}{##1}% - }% - \renewcommand*{\glsxtrinlinefullplformat}[2]{% - \glsfirstabbrvuserfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - \glsxtruserparen{\glsfirstlonguserfont{\glsaccesslongpl{##1}}}{##1}% - }% - \renewcommand*{\Glsxtrinlinefullformat}[2]{% - \glsfirstabbrvuserfont{\Glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - \glsxtruserparen{\glsfirstlonguserfont{\glsaccesslong{##1}}}{##1}% - }% - \renewcommand*{\Glsxtrinlinefullplformat}[2]{% - \glsfirstabbrvuserfont{\Glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - \glsxtruserparen{\glsfirstlonguserfont{\glsaccesslongpl{##1}}}{##1}% - }% +\newcommand*{\RequireGlossariesExtraLang}[1]{% + \@ifundefined{ver@glossariesxtr-#1.ldf}{\input{glossariesxtr-#1.ldf}}{}% } % \end{macrocode} -%\end{abbrvstyle} +%\end{macro} % -%\begin{macro}{\glsxtrshortlonguserdescname} -%\changes{1.25}{2017-11-24}{new} +%\begin{macro}{\ProvidesGlossariesExtraLang} +%\changes{0.5.3}{2015-12-09}{new} % \begin{macrocode} -\newcommand*{\glsxtrshortlonguserdescname}{% - \protect\glsabbrvuserfont{\the\glsshorttok}% - \protect\glsxtruserparen - {\protect\glslonguserfont{\the\glslongpltok}}% - {\the\glslabeltok}% +\newcommand*{\ProvidesGlossariesExtraLang}[1]{% + \ProvidesFile{glossariesxtr-#1.ldf}% } % \end{macrocode} %\end{macro} % -%\begin{abbrvstyle}{short-postlong-user-desc} -%\changes{1.12}{2017-02-03}{new} -%Like \abbrstyle{short-postlong-user} but leaves the user to specify -%the description. -% \begin{macrocode} -\newabbreviationstyle{short-postlong-user-desc}% -{% -% \end{macrocode} -% Set accessibility attributes if enabled. +% Load any required language modules that are available. This +% doesn't generate any warning if none are found, since they're not +% essential. (The only command that really needs defining for the +% document is \cs{abbreviationsname}, which can simply be +% redefined. However, with \app{bib2gls} it might be useful to +% provide custom rules for a particular locale.) +% +%\begin{macro}{\glsxtr@loaddialect} +%The dialect label should be stored in \cs{this@dialect} +%before using this command. +%\changes{1.27}{2018-02-26}{new} % \begin{macrocode} - \glsxtrAccSuppAbbrSetTextShortAttrs\glscategorylabel +\newcommand{\glsxtr@loaddialect}{% + \IfTrackedLanguageFileExists{\this@dialect}% + {glossariesxtr-}% prefix + {.ldf}% + {% + \RequireGlossariesExtraLang{\CurrentTrackedTag}% + }% + {}% not found % \end{macrocode} -% Setup the default fields. +% If \sty{glossaries-extra-bib2gls} has been loaded, +% \cs{@glsxtrdialecthook} will check for the associated script, +% otherwise it will do nothing. % \begin{macrocode} - \renewcommand*{\CustomAbbreviationFields}{% - name={\glsxtrshortlonguserdescname}, - sort={\the\glsshorttok}, - first={\protect\glsfirstlonguserfont{\the\glslongtok}},% - firstplural={\protect\glsfirstlonguserfont{\the\glslongpltok}},% + \@glsxtrdialecthook +} % \end{macrocode} -%\changes{1.15}{2017-05-10}{fixed spelling of \cs{glsabbrvfont}} +%\end{macro} % \begin{macrocode} - text={\protect\glsabbrvuserfont{\the\glsshorttok}},% - plural={\protect\glsabbrvuserfont{\the\glsshortpltok}}% - }% - \renewcommand*{\GlsXtrPostNewAbbreviation}{% - \csdef{glsxtrpostlink\glscategorylabel}{% - \glsxtrifwasfirstuse - {% - \glsxtruserparen - {\glsfirstlonguserfont{\glsentrylong{\glslabel}}}% - {\glslabel}% - }% - {}% - }% - \glshasattribute{\the\glslabeltok}{regular}% - {% - \glssetattribute{\the\glslabeltok}{regular}{false}% - }% - {}% +\@ifpackageloaded{tracklang} {% + \AnyTrackedLanguages + {% + \ForEachTrackedDialect{\this@dialect}{\glsxtr@loaddialect}% }% -}% -{% - \GlsXtrUseAbbrStyleFmts{short-postlong-user}% -} + {}% +} {} % \end{macrocode} -%\end{abbrvstyle} -% -%\begin{abbrvstyle}{long-short-user-desc} -%\changes{1.04}{2016-05-02}{new} +% The style needs to be set at the end to ensure that +% \cs{setglossarystyle} has been redefined and extra style commands +% have been defined. +% Load \sty{glossaries-extra-stylemods} if required. % \begin{macrocode} -\newabbreviationstyle{long-short-user-desc}% -{% +\@glsxtr@redefstyles % \end{macrocode} -% Set accessibility attributes if enabled. +% and set the style: % \begin{macrocode} - \glsxtrAccSuppAbbrSetTextShortAttrs\glscategorylabel +\@glsxtr@do@style % \end{macrocode} -% Setup the default fields. +%\iffalse % \begin{macrocode} - \renewcommand*{\CustomAbbreviationFields}{% - name={\glsxtrlongshortuserdescname}, - sort={\glsxtrlongshortdescsort},% +% % \end{macrocode} -%\changes{1.17}{2017-08-09}{corrected first forms} +%\fi +%\iffalse % \begin{macrocode} - first={\protect\glsfirstlonguserfont{\the\glslongtok}% - \protect\glsxtruserparen{\protect\glsfirstabbrvuserfont{\the\glsshorttok}}% - {\the\glslabeltok}},% - firstplural={\protect\glsfirstlonguserfont{\the\glslongpltok}% - \protect\glsxtruserparen - {\protect\glsfirstabbrvuserfont{\the\glsshortpltok}}{\the\glslabeltok}},% - text={\protect\glsabbrvfont{\the\glsshorttok}},% - plural={\protect\glsabbrvfont{\the\glsshortpltok}}% - }% +%<*glossaries-extra-abbrstyles.def> % \end{macrocode} -% Unset the \catattr{regular} attribute if it has been set. +%\fi +%\section{Predefined Abbreviation Styles (glossaries-extra-abbrstyles.def)} +%\changes{1.49}{??}{added glossaries-extra-abbrstyles.def} % \begin{macrocode} - \renewcommand*{\GlsXtrPostNewAbbreviation}{% - \glshasattribute{\the\glslabeltok}{regular}% - {% - \glssetattribute{\the\glslabeltok}{regular}{false}% - }% - {}% - }% -}% -{% - \GlsXtrUseAbbrStyleFmts{long-short-user}% -} +\ProvidesFile{glossaries-extra-abbrstyles.def}[2022/06/16 v1.48b (NLCT)] % \end{macrocode} -%\end{abbrvstyle} +%This file contains the predefined abbreviation styles. +%Some helper commands first. % -%\begin{abbrvstyle}{short-long-user} -%\changes{1.04}{2016-05-02}{new} -%\changes{1.42}{2020-02-03}{added missing text key} -% \begin{macrocode} -\newabbreviationstyle{short-long-user}% -{% -% \end{macrocode} -% Set accessibility attributes if enabled. -% \begin{macrocode} - \glsxtrAccSuppAbbrSetFirstLongAttrs\glscategorylabel -% \end{macrocode} -% Setup the default fields. -% \begin{macrocode} -% \end{macrocode} -%\cs{glslonguserfont} is used in the description since \cs{glsdesc} -%doesn't set the style. (Now in \cs{glsuserdescription}.) +%\begin{macro}{\glsxtrlongshortname} +%\changes{1.25}{2017-11-24}{new} % \begin{macrocode} - \renewcommand*{\CustomAbbreviationFields}{% - name={\glsxtrshortlongname}, - sort={\the\glsshorttok}, - description={\protect\glsuserdescription{\the\glslongtok}% - {\the\glslabeltok}},% - first={\protect\glsfirstabbrvuserfont{\the\glsshorttok}% - \protect\glsxtruserparen{\protect\glsfirstlonguserfont{\the\glslongtok}}% - {\the\glslabeltok}},% - firstplural={\protect\glsfirstabbrvuserfont{\the\glsshortpltok}% - \protect\glsxtruserparen{\protect\glsfirstlonguserfont{\the\glslongpltok}}% - {\the\glslabeltok}},% +\newcommand*{\glsxtrlongshortname}{% + \glsxpabbrvfont{\the\glsshorttok}{\glscategorylabel}% +} % \end{macrocode} -%\changes{1.15}{2017-05-10}{fixed spelling of \cs{glsabbrvfont}} +%\end{macro} +% +%Provide convenient wrappers for common formats. +%\begin{macro}{\glsxtrlongformat} +%\begin{definition} +%\cs{glsxtrlongformat}\marg{label}\marg{insert}\marg{longfmtcs} +%\end{definition} +%\changes{1.49}{??}{new} % \begin{macrocode} - text={\protect\glsabbrvuserfont{\the\glsshorttok}},% - plural={\protect\glsabbrvuserfont{\the\glsshortpltok}}}% +\newcommand*{\glsxtrlongformat}[3]{% % \end{macrocode} -% Unset the \catattr{regular} attribute if it has been set. +%Don't add inner formatting if markwords attribute set as the inner formatting +%is implemented within \cs{glsxtrword} and \cs{glsxtrwordsep}. % \begin{macrocode} - \renewcommand*{\GlsXtrPostNewAbbreviation}{% - \glshasattribute{\the\glslabeltok}{regular}% - {% - \glssetattribute{\the\glslabeltok}{regular}{false}% - }% - {}% + \glsifattribute{#1}{markwords}{true}% + {% + \ifglsxtrinsertinside + #3{\glsaccesslong{#1}\glsxtrgenentrytextfmt{#2}}% + \else + #3{\glsaccesslong{#1}}\glsxtrgenentrytextfmt{#2}% + \fi + }% + {% + \ifglsxtrinsertinside + #3{\glsaccessfmtlong{#2}{\glsxtrgenentrytextfmt}{#1}}% + \else + #3{\glsaccessfmtlong{}{\glsxtrgenentrytextfmt}{#1}}% + \glsxtrgenentrytextfmt{#2}% + \fi }% }% -{% -% \end{macrocode} -% In case the user wants to mix and match font styles, these are -% redefined here. -% \begin{macrocode} - \renewcommand*{\abbrvpluralsuffix}{\glsxtrusersuffix}% - \renewcommand*\glsabbrvfont[1]{\glsabbrvuserfont{##1}}% - \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvuserfont{##1}}% - \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlonguserfont{##1}}% - \renewcommand*{\glslongfont}[1]{\glslonguserfont{##1}}% % \end{macrocode} -% The first use full form and the inline full form are the same for -% this style. +%\end{macro} +% +%\begin{macro}{\glsxtrlongplformat} +%\begin{definition} +%\cs{glsxtrlongplformat}\marg{label}\marg{insert}\marg{longfmtcs} +%\end{definition} +%\changes{1.49}{??}{new} % \begin{macrocode} - \renewcommand*{\glsxtrfullformat}[2]{% - \glsfirstabbrvuserfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - \glsxtruserparen{\glsfirstlonguserfont{\glsaccesslong{##1}}}{##1}% - }% - \renewcommand*{\glsxtrfullplformat}[2]{% - \glsfirstabbrvuserfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - \glsxtruserparen{\glsfirstlonguserfont{\glsaccesslongpl{##1}}}{##1}% - }% - \renewcommand*{\Glsxtrfullformat}[2]{% - \glsfirstabbrvuserfont{\Glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - \glsxtruserparen{\glsfirstlonguserfont{\glsaccesslong{##1}}}{##1}% +\newcommand*{\glsxtrlongplformat}[3]{% + \glsifattribute{#1}{markwords}{true}% + {% + \ifglsxtrinsertinside + #3{\glsaccesslongpl{#1}\glsxtrgenentrytextfmt{#2}}% + \else + #3{\glsaccesslongpl{#1}}\glsxtrgenentrytextfmt{#2}% + \fi }% - \renewcommand*{\Glsxtrfullplformat}[2]{% - \glsfirstabbrvuserfont{\Glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - \glsxtruserparen{\glsfirstlonguserfont{\glsaccesslongpl{##1}}}{##1}% + {% + \ifglsxtrinsertinside + #3{\glsaccessfmtlongpl{#2}{\glsxtrgenentrytextfmt}{#1}}% + \else + #3{\glsaccessfmtlongpl{}{\glsxtrgenentrytextfmt}{#1}}% + \glsxtrgenentrytextfmt{#2}% + \fi }% -} +}% % \end{macrocode} -%\end{abbrvstyle} +%\end{macro} % -%\begin{abbrvstyle}{short-long-user-desc} -%\changes{1.04}{2016-05-02}{new} -% \begin{macrocode} -\newabbreviationstyle{short-long-user-desc}% -{% -% \end{macrocode} -% Set accessibility attributes if enabled. -% \begin{macrocode} - \glsxtrAccSuppAbbrSetTextShortAttrs\glscategorylabel -% \end{macrocode} -% Setup the default fields. -% \begin{macrocode} - \renewcommand*{\CustomAbbreviationFields}{% - name={\glsxtrshortlonguserdescname}, - sort={\glsxtrshortlongdescsort},% -% \end{macrocode} -%\changes{1.17}{2017-08-09}{corrected first forms} +%\begin{macro}{\Glsxtrlongformat} +%\begin{definition} +%\cs{Glsxtrlongformat}\marg{label}\marg{insert}\marg{longfmtcs} +%\end{definition} +%\changes{1.49}{??}{new} % \begin{macrocode} - first={\protect\glsfirstabbrvuserfont{\the\glsshorttok}% - \protect\glsxtruserparen{\protect\glsfirstlonguserfont{\the\glslongtok}}% - {\the\glslabeltok}},% - firstplural={\protect\glsfirstabbrvuserfont{\the\glsshortpltok}% - \protect\glsxtruserparen{\protect\glsfirstlonguserfont{\the\glslongpltok}}% - {\the\glslabeltok}},% - text={\protect\glsabbrvfont{\the\glsshorttok}},% - plural={\protect\glsabbrvfont{\the\glsshortpltok}}% +\newcommand*{\Glsxtrlongformat}[3]{% + \glsifattribute{#1}{markwords}{true}% + {% + \ifglsxtrinsertinside + #3{\Glsaccesslong{#1}\glsxtrgenentrytextfmt{#2}}% + \else + #3{\Glsaccesslong{#1}}\glsxtrgenentrytextfmt{#2}% + \fi }% -% \end{macrocode} -% Unset the \catattr{regular} attribute if it has been set. -% \begin{macrocode} - \renewcommand*{\GlsXtrPostNewAbbreviation}{% - \glshasattribute{\the\glslabeltok}{regular}% - {% - \glssetattribute{\the\glslabeltok}{regular}{false}% - }% - {}% + {% + \ifglsxtrinsertinside + #3{\Glsaccessfmtlong{#2}{\glsxtrgenentrytextfmt}{#1}}% + \else + #3{\Glsaccessfmtlong{}{\glsxtrgenentrytextfmt}{#1}}% + \glsxtrgenentrytextfmt{#2}% + \fi }% }% -{% - \GlsXtrUseAbbrStyleFmts{short-long-user}% -} % \end{macrocode} -%\end{abbrvstyle} -% -%\subsection{Predefined Styles (Hyphen)} -%These styles are designed to work with the \catattr{markwords} -%attribute. They check if the inserted material (provided by the final -%optional argument of commands like \cs{gls}) starts with a hyphen. -%If it does, the insert is added to the parenthetical material. -%Note that commands like \cs{glsxtrlong} set \cs{glsinsert} to empty -%with the entire link-text stored in \cs{glscustomtext}. +%\end{macro} % -%\begin{macro}{\glsxtrifhyphenstart} -%Checks if the argument starts with a hyphen. The argument may be -%\cs{glsinsert} so check for that and expand. -%\changes{1.17}{2017-08-09}{new} +%\begin{macro}{\Glsxtrlongplformat} +%\begin{definition} +%\cs{Glsxtrlongplformat}\marg{label}\marg{insert}\marg{longfmtcs} +%\end{definition} +%\changes{1.49}{??}{new} % \begin{macrocode} -\newrobustcmd*{\glsxtrifhyphenstart}[3]{% - \ifx\glsinsert#1\relax - \expandafter\@glsxtrifhyphenstart#1\relax\relax - \@end@glsxtrifhyphenstart{#2}{#3}% - \else - \@glsxtrifhyphenstart#1\relax\relax\@end@glsxtrifhyphenstart{#2}{#3}% - \fi -} +\newcommand*{\Glsxtrlongplformat}[3]{% + \glsifattribute{#1}{markwords}{true}% + {% + \ifglsxtrinsertinside + #3{\Glsaccesslongpl{#1}\glsxtrgenentrytextfmt{#2}}% + \else + #3{\Glsaccesslongpl{#1}}\glsxtrgenentrytextfmt{#2}% + \fi + }% + {% + \ifglsxtrinsertinside + #3{\Glsaccessfmtlongpl{#2}{\glsxtrgenentrytextfmt}{#1}}% + \else + #3{\Glsaccessfmtlongpl{}{\glsxtrgenentrytextfmt}{#1}}% + \glsxtrgenentrytextfmt{#2}% + \fi + }% +}% % \end{macrocode} %\end{macro} % -%\begin{macro}{\@glsxtrifhyphenstart} -%\changes{1.17}{2017-08-09}{new} +%\begin{macro}{\GLSxtrlongformat} +%\begin{definition} +%\cs{GLSxtrlongformat}\marg{label}\marg{insert}\marg{longfmtcs} +%\end{definition} +%\changes{1.49}{??}{new} % \begin{macrocode} -\def\@glsxtrifhyphenstart#1#2\@end@glsxtrifhyphenstart#3#4{% - \ifx-#1\relax#3\else #4\fi -} +\newcommand*{\GLSxtrlongformat}[3]{% + \glsifattribute{#1}{markwords}{true}% + {% + \ifglsxtrinsertinside + #3{\GLSaccesslong{#1}\mfirstucMakeUppercase{\glsxtrgenentrytextfmt{#2}}}% + \else + #3{\GLSaccesslong{#1}}\mfirstucMakeUppercase{\glsxtrgenentrytextfmt{#2}}% + \fi + }% + {% + \ifglsxtrinsertinside + #3{\GLSaccessfmtlong{#2}{\glsxtrgenentrytextfmt}{#1}}% + \else + #3{\GLSaccessfmtlong{}{\glsxtrgenentrytextfmt}{#1}}% + \mfirstucMakeUppercase{\glsxtrgenentrytextfmt{#2}}% + \fi + }% +}% % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrlonghyphenshort} -%\changes{1.17}{2017-08-09}{new} +%\begin{macro}{\GLSxtrlongplformat} %\begin{definition} -%\cs{glsxtrlonghyphenshort}\marg{label}\marg{long}\marg{short}\marg{insert} +%\cs{GLSxtrlongplformat}\marg{label}\marg{insert}\marg{longfmtcs} %\end{definition} -%The \meta{long} and \meta{short} arguments may be the plural form. -%The \meta{long} argument may also be the first letter uppercase form. -% \begin{macrocode} -\newcommand*{\glsxtrlonghyphenshort}[4]{% -% \end{macrocode} -% Grouping is needed to localise the redefinitions. +%\changes{1.49}{??}{new} % \begin{macrocode} - {% +\newcommand*{\GLSxtrlongplformat}[3]{% + \glsifattribute{#1}{markwords}{true}% + {% + \ifglsxtrinsertinside + #3{\GLSaccesslongpl{#1}\mfirstucMakeUppercase{\glsxtrgenentrytextfmt{#2}}}% + \else + #3{\GLSaccesslongpl{#1}}\mfirstucMakeUppercase{\glsxtrgenentrytextfmt{#2}}% + \fi + }% + {% + \ifglsxtrinsertinside + #3{\GLSaccessfmtlongpl{#2}{\glsxtrgenentrytextfmt}{#1}}% + \else + #3{\GLSaccessfmtlongpl{}{\glsxtrgenentrytextfmt}{#1}}% + \mfirstucMakeUppercase{\glsxtrgenentrytextfmt{#2}}% + \fi + }% +}% % \end{macrocode} -% If \meta{insert} starts with a hyphen, redefine \ics{glsxtrwordsep} -% to a hyphen. The inserted material is also inserted into the -% parenthetical part. (The inserted material is grouped as a -% precautionary measure.) No change is made to \cs{glsxtrwordsep} if -% \meta{insert} doesn't start with a hyphen. +%\end{macro} +% +%\begin{macro}{\glsxtrlongformatgrp} +%\begin{definition} +%\cs{glsxtrlongformatgrp}\marg{label}\marg{insert}\marg{longfmtcs} +%\end{definition} +%\changes{1.49}{??}{new} +%Add grouping around insert. % \begin{macrocode} - \glsxtrifhyphenstart{#4}{\def\glsxtrwordsep{-}}{}% - \glsfirstlonghyphenfont{#2\ifglsxtrinsertinside{#4}\fi}% - \ifglsxtrinsertinside\else{#4}\fi - \glsxtrfullsep{#1}% - \glsxtrparen{\glsfirstabbrvhyphenfont{#3\ifglsxtrinsertinside{#4}\fi}% - \ifglsxtrinsertinside\else{#4}\fi}% - }% -} +\newcommand*{\glsxtrlongformatgrp}[3]{% + \glsifattribute{#1}{markwords}{true}% + {% + \ifglsxtrinsertinside + #3{\glsaccesslong{#1}{\glsxtrgenentrytextfmt{#2}}}% + \else + #3{\glsaccesslong{#1}}{\glsxtrgenentrytextfmt{#2}}% + \fi + }% + {% + #3{\glsaccessfmtlong{}{\glsxtrgenentrytextfmt}{#1}}% + \ifglsxtrinsertinside + {#3{\glsxtrgenentrytextfmt{#2}}}% + \else + {\glsxtrgenentrytextfmt{#2}}% + \fi + }% +}% % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsabbrvhyphenfont} -%\changes{1.17}{2017-08-09}{new} +%\begin{macro}{\glsxtrlongplformatgrp} +%\begin{definition} +%\cs{glsxtrlongformatplgrp}\marg{label}\marg{insert}\marg{longfmtcs} +%\end{definition} +%\changes{1.49}{??}{new} +%Add grouping around insert. % \begin{macrocode} -\newcommand*{\glsabbrvhyphenfont}{\glsabbrvdefaultfont}% +\newcommand*{\glsxtrlongplformatgrp}[3]{% + \glsifattribute{#1}{markwords}{true}% + {% + \ifglsxtrinsertinside + #3{\glsaccesslongpl{#1}{\glsxtrgenentrytextfmt{#2}}}% + \else + #3{\glsaccesslongpl{#1}}{\glsxtrgenentrytextfmt{#2}}% + \fi + }% + {% + #3{\glsaccessfmtlongpl{}{\glsxtrgenentrytextfmt}{#1}}% + \ifglsxtrinsertinside + {#3{\glsxtrgenentrytextfmt{#2}}}% + \else + {\glsxtrgenentrytextfmt{#2}}% + \fi + }% +}% % \end{macrocode} %\end{macro} -%\begin{macro}{\glsfirstabbrvhyphenfont} -%\changes{1.17}{2017-08-09}{new} +% +%\begin{macro}{\Glsxtrlongformatgrp} +%\begin{definition} +%\cs{Glsxtrlongformatgrp}\marg{label}\marg{insert}\marg{longfmtcs} +%\end{definition} +%\changes{1.49}{??}{new} +%Add grouping around insert. % \begin{macrocode} -\newcommand*{\glsfirstabbrvhyphenfont}{\glsabbrvhyphenfont}% +\newcommand*{\Glsxtrlongformatgrp}[3]{% + \glsifattribute{#1}{markwords}{true}% + {% + \ifglsxtrinsertinside + #3{\Glsaccesslong{#1}{\glsxtrgenentrytextfmt{#2}}}% + \else + #3{\Glsaccesslong{#1}}{\glsxtrgenentrytextfmt{#2}}% + \fi + }% + {% + #3{\Glsaccessfmtlong{}{\glsxtrgenentrytextfmt}{#1}}% + \ifglsxtrinsertinside + {#3{\glsxtrgenentrytextfmt{#2}}}% + \else + {\glsxtrgenentrytextfmt{#2}}% + \fi + }% +}% % \end{macrocode} %\end{macro} -%\begin{macro}{\glslonghyphenfont} -%\changes{1.17}{2017-08-09}{new} +% +%\begin{macro}{\Glsxtrlongplformatgrp} +%\begin{definition} +%\cs{Glsxtrlongformatplgrp}\marg{label}\marg{insert}\marg{longfmtcs} +%\end{definition} +%\changes{1.49}{??}{new} +%Add grouping around insert. % \begin{macrocode} -\newcommand*{\glslonghyphenfont}{\glslongdefaultfont}% +\newcommand*{\Glsxtrlongplformatgrp}[3]{% + \glsifattribute{#1}{markwords}{true}% + {% + \ifglsxtrinsertinside + #3{\Glsaccesslongpl{#1}{\glsxtrgenentrytextfmt{#2}}}% + \else + #3{\Glsaccesslongpl{#1}}{\glsxtrgenentrytextfmt{#2}}% + \fi + }% + {% + #3{\Glsaccessfmtlongpl{}{\glsxtrgenentrytextfmt}{#1}}% + \ifglsxtrinsertinside + {#3{\glsxtrgenentrytextfmt{#2}}}% + \else + {\glsxtrgenentrytextfmt{#2}}% + \fi + }% +}% % \end{macrocode} %\end{macro} -%\begin{macro}{\glsfirstlonghyphenfont} -%\changes{1.17}{2017-08-09}{new} +% +%\begin{macro}{\GLSxtrlongformatgrp} +%\begin{definition} +%\cs{GLSxtrlongformatgrp}\marg{label}\marg{insert}\marg{longfmtcs} +%\end{definition} +%\changes{1.49}{??}{new} +%Add grouping around insert. % \begin{macrocode} -\newcommand*{\glsfirstlonghyphenfont}{\glslonghyphenfont}% +\newcommand*{\GLSxtrlongformatgrp}[3]{% + \glsifattribute{#1}{markwords}{true}% + {% + \ifglsxtrinsertinside + #3{\GLSaccesslong{#1}{\mfirstucMakeUppercase{\glsxtrgenentrytextfmt{#2}}}}% + \else + #3{\GLSaccesslong{#1}}{\mfirstucMakeUppercase{\glsxtrgenentrytextfmt{#2}}}% + \fi + }% + {% + #3{\GLSaccessfmtlong{}{\glsxtrgenentrytextfmt}{#1}}% + \ifglsxtrinsertinside + {\mfirstucMakeUppercase{#3{\glsxtrgenentrytextfmt{#2}}}}% + \else + {\mfirstucMakeUppercase{\glsxtrgenentrytextfmt{#2}}}% + \fi + }% +}% % \end{macrocode} %\end{macro} -% The default short form suffix: -%\begin{macro}{\glsxtrhyphensuffix} -%\changes{1.17}{2017-08-09}{new} +% +%\begin{macro}{\GLSxtrlongplformatgrp} +%\begin{definition} +%\cs{GLSxtrlongformatplgrp}\marg{label}\marg{insert}\marg{longfmtcs} +%\end{definition} +%\changes{1.49}{??}{new} +%Add grouping around insert. % \begin{macrocode} -\newcommand*{\glsxtrhyphensuffix}{\glsxtrabbrvpluralsuffix} +\newcommand*{\GLSxtrlongplformatgrp}[3]{% + \glsifattribute{#1}{markwords}{true}% + {% + \ifglsxtrinsertinside + #3{\GLSaccesslongpl{#1}{\mfirstucMakeUppercase{\glsxtrgenentrytextfmt{#2}}}}% + \else + #3{\GLSaccesslongpl{#1}}{\mfirstucMakeUppercase{\glsxtrgenentrytextfmt{#2}}}% + \fi + }% + {% + #3{\GLSaccessfmtlongpl{}{\glsxtrgenentrytextfmt}{#1}}% + \ifglsxtrinsertinside + {\mfirstucMakeUppercase{#3{\glsxtrgenentrytextfmt{#2}}}}% + \else + {\mfirstucMakeUppercase{\glsxtrgenentrytextfmt{#2}}}% + \fi + }% +}% % \end{macrocode} %\end{macro} % -%\begin{abbrvstyle}{long-hyphen-short-hyphen} -%\changes{1.17}{2017-08-09}{new} -%\changes{1.42}{2020-02-03}{added missing text key} -%Designed for use with the \catattr{markwords} attribute. +%\begin{macro}{\glsxtrshortformat} +%\begin{definition} +%\cs{glsxtrshortformat}\marg{label}\marg{insert}\marg{shortfmtcs} +%\end{definition} +%\changes{1.49}{??}{new} % \begin{macrocode} -\newabbreviationstyle{long-hyphen-short-hyphen}% -{% +\newcommand*{\glsxtrshortformat}[3]{% + \glsifattribute{#1}{markshortwords}{true}% + {% + \ifglsxtrinsertinside + #3{\glsaccessshort{#1}\glsxtrgenentrytextfmt{#2}}% + \else + #3{\glsaccessshort{#1}}\glsxtrgenentrytextfmt{#2}% + \fi + }% + {% + \ifglsxtrinsertinside + #3{\glsaccessfmtshort{#2}{\glsxtrgenentrytextfmt}{#1}}% + \else + #3{\glsaccessfmtshort{}{\glsxtrgenentrytextfmt}{#1}}% + \glsxtrgenentrytextfmt{#2}% + \fi + }% +}% % \end{macrocode} -% Set accessibility attributes if enabled. +%\end{macro} +% +%\begin{macro}{\glsxtrshortplformat} +%\begin{definition} +%\cs{glsxtrshortplformat}\marg{label}\marg{insert}\marg{shortfmtcs} +%\end{definition} +%\changes{1.49}{??}{new} % \begin{macrocode} - \glsxtrAccSuppAbbrSetFirstLongAttrs\glscategorylabel +\newcommand*{\glsxtrshortplformat}[3]{% + \glsifattribute{#1}{markshortwords}{true}% + {% + \ifglsxtrinsertinside + #3{\glsaccessshortpl{#1}\glsxtrgenentrytextfmt{#2}}% + \else + #3{\glsaccessshortpl{#1}}\glsxtrgenentrytextfmt{#2}% + \fi + }% + {% + \ifglsxtrinsertinside + #3{\glsaccessfmtshortpl{#2}{\glsxtrgenentrytextfmt}{#1}}% + \else + #3{\glsaccessfmtshortpl{}{\glsxtrgenentrytextfmt}{#1}}% + \glsxtrgenentrytextfmt{#2}% + \fi + }% +}% % \end{macrocode} -% Setup the default fields. +%\end{macro} +% +%\begin{macro}{\Glsxtrshortformat} +%\begin{definition} +%\cs{Glsxtrshortformat}\marg{label}\marg{insert}\marg{shortfmtcs} +%\end{definition} +%\changes{1.49}{??}{new} % \begin{macrocode} - \renewcommand*{\CustomAbbreviationFields}{% - name={\glsxtrlongshortname}, - sort={\the\glsshorttok}, - first={\protect\glsfirstlonghyphenfont{\the\glslongtok}% - \protect\glsxtrfullsep{\the\glslabeltok}% - \glsxtrparen{\protect\glsfirstabbrvhyphenfont{\the\glsshorttok}}},% - firstplural={\protect\glsfirstlonghyphenfont{\the\glslongpltok}% - \protect\glsxtrfullsep{\the\glslabeltok}% - \glsxtrparen{\protect\glsfirstabbrvhyphenfont{\the\glsshortpltok}}},% - text={\protect\glsabbrvhyphenfont{\the\glsshorttok}},% - plural={\protect\glsabbrvhyphenfont{\the\glsshortpltok}},% - description={\protect\glslonghyphenfont{\the\glslongtok}}}% +\newcommand*{\Glsxtrshortformat}[3]{% + \glsifattribute{#1}{markshortwords}{true}% + {% + \ifglsxtrinsertinside + #3{\Glsaccessshort{#1}\glsxtrgenentrytextfmt{#2}}% + \else + #3{\Glsaccessshort{#1}}\glsxtrgenentrytextfmt{#2}% + \fi + }% + {% + \ifglsxtrinsertinside + #3{\Glsaccessfmtshort{#2}{\glsxtrgenentrytextfmt}{#1}}% + \else + #3{\Glsaccessfmtshort{}{\glsxtrgenentrytextfmt}{#1}}% + \glsxtrgenentrytextfmt{#2}% + \fi + }% +}% % \end{macrocode} -% Unset the \catattr{regular} attribute if it has been set. +%\end{macro} +% +%\begin{macro}{\Glsxtrshortplformat} +%\begin{definition} +%\cs{Glsxtrshortplformat}\marg{label}\marg{insert}\marg{shortfmtcs} +%\end{definition} +%\changes{1.49}{??}{new} % \begin{macrocode} - \renewcommand*{\GlsXtrPostNewAbbreviation}{% - \glshasattribute{\the\glslabeltok}{regular}% - {% - \glssetattribute{\the\glslabeltok}{regular}{false}% - }% - {}% +\newcommand*{\Glsxtrshortplformat}[3]{% + \glsifattribute{#1}{markshortwords}{true}% + {% + \ifglsxtrinsertinside + #3{\Glsaccessshortpl{#1}\glsxtrgenentrytextfmt{#2}}% + \else + #3{\Glsaccessshortpl{#1}}\glsxtrgenentrytextfmt{#2}% + \fi + }% + {% + \ifglsxtrinsertinside + #3{\Glsaccessfmtshortpl{#2}{\glsxtrgenentrytextfmt}{#1}}% + \else + #3{\Glsaccessfmtshortpl{}{\glsxtrgenentrytextfmt}{#1}}% + \glsxtrgenentrytextfmt{#2}% + \fi }% }% -{% - \renewcommand*{\abbrvpluralsuffix}{\glsxtrhyphensuffix}% - \renewcommand*{\glsabbrvfont}[1]{\glsabbrvhyphenfont{##1}}% - \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvhyphenfont{##1}}% - \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlonghyphenfont{##1}}% - \renewcommand*{\glslongfont}[1]{\glslonghyphenfont{##1}}% % \end{macrocode} -% The first use full form and the inline full form are the same for -% this style. +%\end{macro} +% +%\begin{macro}{\GLSxtrshortformat} +%\begin{definition} +%\cs{GLSxtrshortformat}\marg{label}\marg{insert}\marg{shortfmtcs} +%\end{definition} +%\changes{1.49}{??}{new} % \begin{macrocode} - \renewcommand*{\glsxtrfullformat}[2]{% - \glsxtrlonghyphenshort{##1}{\glsaccesslong{##1}}{\glsaccessshort{##1}}{##2}% +\newcommand*{\GLSxtrshortformat}[3]{% + \glsifattribute{#1}{markshortwords}{true}% + {% + \ifglsxtrinsertinside + #3{\GLSaccessshort{#1}\mfirstucMakeUppercase{\glsxtrgenentrytextfmt{#2}}}% + \else + #3{\GLSaccessshort{#1}}\mfirstucMakeUppercase{\glsxtrgenentrytextfmt{#2}}% + \fi }% - \renewcommand*{\glsxtrfullplformat}[2]{% - \glsxtrlonghyphenshort{##1}{\glsaccesslongpl{##1}}% - {\glsaccessshortpl{##1}}{##2}% + {% + \ifglsxtrinsertinside + #3{\GLSaccessfmtshort{#2}{\glsxtrgenentrytextfmt}{#1}}% + \else + #3{\GLSaccessfmtshort{}{\glsxtrgenentrytextfmt}{#1}}% + \mfirstucMakeUppercase{\glsxtrgenentrytextfmt{#2}}% + \fi }% - \renewcommand*{\Glsxtrfullformat}[2]{% - \glsxtrlonghyphenshort{##1}{\Glsaccesslong{##1}}{\glsaccessshort{##1}}{##2}% +}% +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GLSxtrshortplformat} +%\begin{definition} +%\cs{GLSxtrshortplformat}\marg{label}\marg{insert}\marg{shortfmtcs} +%\end{definition} +%\changes{1.49}{??}{new} +% \begin{macrocode} +\newcommand*{\GLSxtrshortplformat}[3]{% + \glsifattribute{#1}{markshortwords}{true}% + {% + \ifglsxtrinsertinside + #3{\GLSaccessshortpl{#1}\mfirstucMakeUppercase{\glsxtrgenentrytextfmt{#2}}}% + \else + #3{\GLSaccessshortpl{#1}}\mfirstucMakeUppercase{\glsxtrgenentrytextfmt{#2}}% + \fi }% - \renewcommand*{\Glsxtrfullplformat}[2]{% - \glsxtrlonghyphenshort{##1}{\Glsaccesslongpl{##1}}% - {\glsaccessshortpl{##1}}{##2}% + {% + \ifglsxtrinsertinside + #3{\GLSaccessfmtshortpl{#2}{\glsxtrgenentrytextfmt}{#1}}% + \else + #3{\GLSaccessfmtshortpl{}{\glsxtrgenentrytextfmt}{#1}}% + \mfirstucMakeUppercase{\glsxtrgenentrytextfmt{#2}}% + \fi }% -} +}% % \end{macrocode} -%\end{abbrvstyle} +%\end{macro} % -%\begin{abbrvstyle}{long-hyphen-short-hyphen-desc} -%\changes{1.17}{2017-08-09}{new} -%Like \abbrstyle{long-hyphen-short-hyphen} but the description -%must be supplied by the user. +%\begin{macro}{\glsxtrshortformatgrp} +%\begin{definition} +%\cs{glsxtrshortformatgrp}\marg{label}\marg{insert}\marg{shortfmtcs} +%\end{definition} +%\changes{1.49}{??}{new} +%Add grouping around insert. % \begin{macrocode} -\newabbreviationstyle{long-hyphen-short-hyphen-desc}% -{% +\newcommand*{\glsxtrshortformatgrp}[3]{% + \glsifattribute{#1}{markshortwords}{true}% + {% + \ifglsxtrinsertinside + #3{\glsaccessshort{#1}{\glsxtrgenentrytextfmt{#2}}}% + \else + #3{\glsaccessshort{#1}}{\glsxtrgenentrytextfmt{#2}}% + \fi + }% + {% + #3{\glsaccessfmtshort{}{\glsxtrgenentrytextfmt}{#1}}% + \ifglsxtrinsertinside + {#3{\glsxtrgenentrytextfmt{#2}}}% + \else + {\glsxtrgenentrytextfmt{#2}}% + \fi + }% +}% % \end{macrocode} -% Set accessibility attributes if enabled. +%\end{macro} +% +%\begin{macro}{\glsxtrshortplformatgrp} +%\begin{definition} +%\cs{glsxtrshortplformatgrp}\marg{label}\marg{insert}\marg{shortfmtcs} +%\end{definition} +%\changes{1.49}{??}{new} +%Add grouping around insert. % \begin{macrocode} - \glsxtrAccSuppAbbrSetTextShortAttrs\glscategorylabel +\newcommand*{\glsxtrshortplformatgrp}[3]{% + \glsifattribute{#1}{markshortwords}{true}% + {% + \ifglsxtrinsertinside + #3{\glsaccessshortpl{#1}{\glsxtrgenentrytextfmt{#2}}}% + \else + #3{\glsaccessshortpl{#1}}{\glsxtrgenentrytextfmt{#2}}% + \fi + }% + {% + #3{\glsaccessfmtshortpl{}{\glsxtrgenentrytextfmt}{#1}}% + \ifglsxtrinsertinside + {#3{\glsxtrgenentrytextfmt{#2}}}% + \else + {\glsxtrgenentrytextfmt{#2}}% + \fi + }% +}% % \end{macrocode} -% Setup the default fields. +%\end{macro} +% +%\begin{macro}{\Glsxtrshortformatgrp} +%\begin{definition} +%\cs{Glsxtrshortformatgrp}\marg{label}\marg{insert}\marg{shortfmtcs} +%\end{definition} +%\changes{1.49}{??}{new} +%Add grouping around insert. % \begin{macrocode} - \renewcommand*{\CustomAbbreviationFields}{% - name={\glsxtrlongshortdescname}, - sort={\glsxtrlongshortdescsort}, - first={\protect\glsfirstlonghyphenfont{\the\glslongtok}% - \protect\glsxtrfullsep{\the\glslabeltok}% - \glsxtrparen{\protect\glsfirstabbrvhyphenfont{\the\glsshorttok}}},% - firstplural={\protect\glsfirstlonghyphenfont{\the\glslongpltok}% - \protect\glsxtrfullsep{\the\glslabeltok}% - \glsxtrparen{\protect\glsfirstabbrvhyphenfont{\the\glsshortpltok}}},% - text={\protect\glsabbrvhyphenfont{\the\glsshorttok}},% - plural={\protect\glsabbrvhyphenfont{\the\glsshortpltok}}% +\newcommand*{\Glsxtrshortformatgrp}[3]{% + \glsifattribute{#1}{markshortwords}{true}% + {% + \ifglsxtrinsertinside + #3{\Glsaccessshort{#1}{\glsxtrgenentrytextfmt{#2}}}% + \else + #3{\Glsaccessshort{#1}}{\glsxtrgenentrytextfmt{#2}}% + \fi + }% + {% + #3{\Glsaccessfmtshort{}{\glsxtrgenentrytextfmt}{#1}}% + \ifglsxtrinsertinside + {#3{\glsxtrgenentrytextfmt{#2}}}% + \else + {\glsxtrgenentrytextfmt{#2}}% + \fi }% +}% % \end{macrocode} -% Unset the \catattr{regular} attribute if it has been set. +%\end{macro} +% +%\begin{macro}{\Glsxtrshortplformatgrp} +%\begin{definition} +%\cs{Glsxtrshortplformatgrp}\marg{label}\marg{insert}\marg{shortfmtcs} +%\end{definition} +%\changes{1.49}{??}{new} +%Add grouping around insert. % \begin{macrocode} - \renewcommand*{\GlsXtrPostNewAbbreviation}{% - \glshasattribute{\the\glslabeltok}{regular}% - {% - \glssetattribute{\the\glslabeltok}{regular}{false}% - }% - {}% +\newcommand*{\Glsxtrshortplformatgrp}[3]{% + \glsifattribute{#1}{markshortwords}{true}% + {% + \ifglsxtrinsertinside + #3{\Glsaccessshortpl{#1}{\glsxtrgenentrytextfmt{#2}}}% + \else + #3{\Glsaccessshortpl{#1}}{\glsxtrgenentrytextfmt{#2}}% + \fi + }% + {% + #3{\Glsaccessfmtshortpl{}{\glsxtrgenentrytextfmt}{#1}}% + \ifglsxtrinsertinside + {#3{\glsxtrgenentrytextfmt{#2}}}% + \else + {\glsxtrgenentrytextfmt{#2}}% + \fi }% }% -{% - \GlsXtrUseAbbrStyleFmts{long-hyphen-short-hyphen}% -} % \end{macrocode} -%\end{abbrvstyle} +%\end{macro} % -%\begin{macro}{\glsxtrlonghyphennoshort} -%\changes{1.17}{2017-08-09}{new} +%\begin{macro}{\GLSxtrshortformatgrp} %\begin{definition} -%\cs{glsxtrlonghyphennoshort}\marg{label}\marg{long}\marg{insert} +%\cs{GLSxtrshortformatgrp}\marg{label}\marg{insert}\marg{shortfmtcs} %\end{definition} +%\changes{1.49}{??}{new} +%Add grouping around insert. % \begin{macrocode} -\newcommand*{\glsxtrlonghyphennoshort}[3]{% +\newcommand*{\GLSxtrshortformatgrp}[3]{% + \glsifattribute{#1}{markshortwords}{true}% + {% + \ifglsxtrinsertinside + #3{\GLSaccessshort{#1}{\mfirstucMakeUppercase{\glsxtrgenentrytextfmt{#2}}}}% + \else + #3{\GLSaccessshort{#1}}{\mfirstucMakeUppercase{\glsxtrgenentrytextfmt{#2}}}% + \fi + }% + {% + #3{\GLSaccessfmtshort{}{\glsxtrgenentrytextfmt}{#1}}% + \ifglsxtrinsertinside + {\mfirstucMakeUppercase{#3{\glsxtrgenentrytextfmt{#2}}}}% + \else + {\mfirstucMakeUppercase{\glsxtrgenentrytextfmt{#2}}}% + \fi + }% +}% % \end{macrocode} -% Grouping is needed to localise the redefinitions. +%\end{macro} +% +%\begin{macro}{\GLSxtrshortplformatgrp} +%\begin{definition} +%\cs{GLSxtrshortplformatgrp}\marg{label}\marg{insert}\marg{shortfmtcs} +%\end{definition} +%\changes{1.49}{??}{new} +%Add grouping around insert. % \begin{macrocode} - {% +\newcommand*{\GLSxtrshortplformatgrp}[3]{% + \glsifattribute{#1}{markshortwords}{true}% + {% + \ifglsxtrinsertinside + #3{\GLSaccessshortpl{#1}{\mfirstucMakeUppercase{\glsxtrgenentrytextfmt{#2}}}}% + \else + #3{\GLSaccessshortpl{#1}}{\mfirstucMakeUppercase{\glsxtrgenentrytextfmt{#2}}}% + \fi + }% + {% + #3{\GLSaccessfmtshortpl{}{\glsxtrgenentrytextfmt}{#1}}% + \ifglsxtrinsertinside + {\mfirstucMakeUppercase{#3{\glsxtrgenentrytextfmt{#2}}}}% + \else + {\mfirstucMakeUppercase{\glsxtrgenentrytextfmt{#2}}}% + \fi + }% +}% % \end{macrocode} -% If \meta{insert} starts with a hyphen, redefine \ics{glsxtrwordsep} -% to a hyphen. The inserted material is also inserted into the -% parenthetical part. (The inserted material is grouped as a -% precautionary measure.) No change is made to \cs{glsxtrwordsep} if -% \meta{insert} doesn't start with a hyphen. +%\end{macro} +% +%\begin{macro}{\glsxtrlongshortformat} +%\begin{definition} +%\cs{glsxtrlongshortformat}\marg{label}\marg{insert}\marg{longfmtcs}\marg{shortfmtcs} +%\end{definition} +%\changes{1.49}{??}{new} % \begin{macrocode} - \glsxtrifhyphenstart{#3}{\def\glsxtrwordsep{-}}{}% - \glsfirstlonghyphenfont{#2\ifglsxtrinsertinside{#3}\fi}% - \ifglsxtrinsertinside\else{#3}\fi - }% -} +\newcommand*{\glsxtrlongshortformat}[4]{% + \glsxtrlongformat{#1}{#2}{#3}% + \glsxtrfullsep{#1}% + \glsxtrparen{\glsxtrshortformat{#1}{}{#4}}% +}% % \end{macrocode} %\end{macro} % -%\begin{abbrvstyle}{long-hyphen-noshort-desc-noreg} -%\changes{1.17}{2017-08-09}{new} -%\changes{1.42}{2020-02-03}{added missing text key} -%This version doesn't show the short form (except -%explicitly with \cs{glsxtrshort}). Since \cs{glsxtrshort} doesn't -%support the hyphen switch, the short form just uses the default -%short-form font command. This style won't work with the -%\catattr{regular} as the regular form isn't flexible enough. -%No accessibility attributes need to be set. +%\begin{macro}{\glsxtrlongshortplformat} +%\begin{definition} +%\cs{glsxtrlongshortplformat}\marg{label}\marg{insert}\marg{longfmtcs}\marg{shortfmtcs} +%\end{definition} +%\changes{1.49}{??}{new} % \begin{macrocode} -\newabbreviationstyle{long-hyphen-noshort-desc-noreg}% -{% - \renewcommand*{\CustomAbbreviationFields}{% - name={\glsxtrlongnoshortdescname}, - sort={\expandonce\glsxtrorglong}, - first={\protect\glsfirstlonghyphenfont{\the\glslongtok}},% - firstplural={\protect\glsfirstlonghyphenfont{\the\glslongpltok}},% - text={\protect\glslonghyphenfont{\the\glslongtok}},% - plural={\protect\glslonghyphenfont{\the\glslongpltok}}% - }% +\newcommand*{\glsxtrlongshortplformat}[4]{% + \glsxtrlongplformat{#1}{#2}{#3}% + \glsxtrfullsep{#1}% + \glsxtrparen{\glsxtrshortplformat{#1}{}{#4}}% +}% % \end{macrocode} -% Unset the \catattr{regular} attribute if it has been set. +%\end{macro} +% +%\begin{macro}{\Glsxtrlongshortformat} +%\begin{definition} +%\cs{Glsxtrlongshortformat}\marg{label}\marg{insert}\marg{longfmtcs}\marg{shortfmtcs} +%\end{definition} +%\changes{1.49}{??}{new} % \begin{macrocode} - \renewcommand*{\GlsXtrPostNewAbbreviation}{% - \glshasattribute{\the\glslabeltok}{regular}% - {% - \glssetattribute{\the\glslabeltok}{regular}{false}% - }% - {}% - }% +\newcommand*{\Glsxtrlongshortformat}[4]{% + \Glsxtrlongformat{#1}{#2}{#3}% + \glsxtrfullsep{#1}% + \glsxtrparen{\glsxtrshortformat{#1}{}{#4}}% }% -{% - \GlsXtrUseAbbrStyleFmts{long-hyphen-short-hyphen}% % \end{macrocode} -% In case the user wants to mix and match font styles, these are -% redefined here. +%\end{macro} +% +%\begin{macro}{\Glsxtrlongshortplformat} +%\begin{definition} +%\cs{Glsxtrlongshortplformat}\marg{label}\marg{insert}\marg{longfmtcs}\marg{shortfmtcs} +%\end{definition} +%\changes{1.49}{??}{new} % \begin{macrocode} - \renewcommand*{\abbrvpluralsuffix}{\glsxtrabbrvpluralsuffix}% - \renewcommand*\glsabbrvfont[1]{\glsabbrvdefaultfont{##1}}% - \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvdefaultfont{##1}}% - \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlonghyphenfont{##1}}% - \renewcommand*{\glslongfont}[1]{\glslonghyphenfont{##1}}% +\newcommand*{\Glsxtrlongshortplformat}[4]{% + \Glsxtrlongplformat{#1}{#2}{#3}% + \glsxtrfullsep{#1}% + \glsxtrparen{\glsxtrshortplformat{#1}{}{#4}}% +}% % \end{macrocode} -% The format for subsequent use (not used when the regular attribute -% is set). +%\end{macro} +% +%\begin{macro}{\GLSxtrlongshortformat} +%\begin{definition} +%\cs{GLSxtrlongshortformat}\marg{label}\marg{insert}\marg{longfmtcs}\marg{shortfmtcs} +%\end{definition} +%\changes{1.49}{??}{new} % \begin{macrocode} - \renewcommand*{\glsxtrsubsequentfmt}[2]{% - \glsxtrlonghyphennoshort{##1}{\glsaccesslong{##1}}{##2}% - }% - \renewcommand*{\glsxtrsubsequentplfmt}[2]{% - \glsxtrlonghyphennoshort{##1}{\glsaccesslongpl{##1}}{##2}% - }% - \renewcommand*{\Glsxtrsubsequentfmt}[2]{% - \glsxtrlonghyphennoshort{##1}{\Glsaccesslong{##1}}{##2}% - }% - \renewcommand*{\Glsxtrsubsequentplfmt}[2]{% - \glsxtrlonghyphennoshort{##1}{\Glsaccesslongpl{##1}}{##2}% - }% +\newcommand*{\GLSxtrlongshortformat}[4]{% + \GLSxtrlongformat{#1}{#2}{#3}% + \glsxtrfullsep{#1}% + \glsxtrparen{\GLSxtrshortformat{#1}{}{#4}}% +}% % \end{macrocode} -% The inline full form displays the long format followed by the -% short form in parentheses. +%\end{macro} +% +%\begin{macro}{\GLSxtrlongshortplformat} +%\begin{definition} +%\cs{GLSxtrlongshortplformat}\marg{label}\marg{insert}\marg{longfmtcs}\marg{shortfmtcs} +%\end{definition} +%\changes{1.49}{??}{new} % \begin{macrocode} - \renewcommand*{\glsxtrinlinefullformat}[2]{% - \glsxtrlonghyphennoshort{##1}{\glsaccesslong{##1}}{##2}% - \glsxtrfullsep{##1}% - \glsxtrparen{\protect\glsfirstabbrvfont{\glsaccessshort{##1}}}% - }% - \renewcommand*{\glsxtrinlinefullplformat}[2]{% - \glsxtrlonghyphennoshort{##1}{\glsaccesslongpl{##1}}{##2}% - \glsxtrfullsep{##1}% - \glsxtrparen{\protect\glsfirstabbrvfont{\glsaccessshortpl{##1}}}% - }% - \renewcommand*{\Glsxtrinlinefullformat}[2]{% - \glsxtrlonghyphennoshort{##1}{\Glsaccesslong{##1}}{##2}% - \glsxtrfullsep{##1}% - \glsxtrparen{\protect\glsfirstabbrvfont{\glsaccessshort{##1}}}% - }% - \renewcommand*{\Glsxtrinlinefullplformat}[2]{% - \glsxtrlonghyphennoshort{##1}{\Glsaccesslongpl{##1}}{##2}% - \glsxtrfullsep{##1}% - \glsxtrparen{\protect\glsfirstabbrvfont{\glsaccessshortpl{##1}}}% - }% +\newcommand*{\GLSxtrlongshortplformat}[4]{% + \GLSxtrlongplformat{#1}{#2}{#3}% + \glsxtrfullsep{#1}% + \glsxtrparen{\GLSxtrshortplformat{#1}{}{#4}}% +}% % \end{macrocode} -% The first use full form only displays the long form. +%\end{macro} +% +%\begin{macro}{\glsxtrshortlongformat} +%\begin{definition} +%\cs{glsxtrshortlongformat}\marg{label}\marg{insert}\marg{longfmtcs}\marg{shortfmtcs} +%\end{definition} +%\changes{1.49}{??}{new} % \begin{macrocode} - \renewcommand*{\glsxtrfullformat}[2]{% - \glsxtrlonghyphennoshort{##1}{\glsaccesslong{##1}}{##2}% - }% - \renewcommand*{\glsxtrfullplformat}[2]{% - \glsxtrlonghyphennoshort{##1}{\glsaccesslongpl{##1}}{##2}% - }% - \renewcommand*{\Glsxtrfullformat}[2]{% - \glsxtrlonghyphennoshort{##1}{\Glsaccesslong{##1}}{##2}% - }% - \renewcommand*{\Glsxtrfullplformat}[2]{% - \glsxtrlonghyphennoshort{##1}{\Glsaccesslongpl{##1}}{##2}% - }% -} +\newcommand*{\glsxtrshortlongformat}[4]{% + \glsxtrshortformat{#1}{#2}{#4}% + \glsxtrfullsep{#1}% + \glsxtrparen{\glsxtrlongformat{#1}{}{#3}}% +}% % \end{macrocode} -%\end{abbrvstyle} +%\end{macro} % -%\begin{abbrvstyle}{long-hyphen-noshort-noreg} -%\changes{1.17}{2017-08-09}{new} -% It doesn't really make a great deal of sense to have a long-only -% style that doesn't have a description (unless no glossary is -% required), but the best course of -% action here is to use the short form as the name and the long -% form as the description. +%\begin{macro}{\glsxtrshortlongplformat} +%\begin{definition} +%\cs{glsxtrshortlongplformat}\marg{label}\marg{insert}\marg{longfmtcs}\marg{shortfmtcs} +%\end{definition} +%\changes{1.49}{??}{new} % \begin{macrocode} -\newabbreviationstyle{long-hyphen-noshort-noreg}% -{% +\newcommand*{\glsxtrshortlongplformat}[4]{% + \glsxtrshortplformat{#1}{#2}{#4}% + \glsxtrfullsep{#1}% + \glsxtrparen{\glsxtrlongplformat{#1}{}{#3}}% +}% % \end{macrocode} -% Set accessibility attributes if enabled. +%\end{macro} +% +%\begin{macro}{\Glsxtrshortlongformat} +%\begin{definition} +%\cs{Glsxtrshortlongformat}\marg{label}\marg{insert}\marg{longfmtcs}\marg{shortfmtcs} +%\end{definition} +%\changes{1.49}{??}{new} % \begin{macrocode} - \glsxtrAccSuppAbbrSetNameShortAttrs\glscategorylabel +\newcommand*{\Glsxtrshortlongformat}[4]{% + \Glsxtrshortformat{#1}{#2}{#4}% + \glsxtrfullsep{#1}% + \glsxtrparen{\glsxtrlongformat{#1}{}{#3}}% +}% % \end{macrocode} -% Setup the default fields. +%\end{macro} +% +%\begin{macro}{\Glsxtrshortlongplformat} +%\begin{definition} +%\cs{Glsxtrshortlongplformat}\marg{label}\marg{insert}\marg{longfmtcs}\marg{shortfmtcs} +%\end{definition} +%\changes{1.49}{??}{new} % \begin{macrocode} - \renewcommand*{\CustomAbbreviationFields}{% - name={\glsxtrlongnoshortname}, - sort={\the\glsshorttok}, - first={\protect\glsfirstlonghyphenfont{\the\glslongtok}},% - firstplural={\protect\glsfirstlonghyphenfont{\the\glslongpltok}},% - text={\protect\glslonghyphenfont{\the\glslongtok}},% - plural={\protect\glslonghyphenfont{\the\glslongpltok}},% - description={\the\glslongtok}% - }% +\newcommand*{\Glsxtrshortlongplformat}[4]{% + \Glsxtrshortplformat{#1}{#2}{#4}% + \glsxtrfullsep{#1}% + \glsxtrparen{\glsxtrlongplformat{#1}{}{#3}}% +}% % \end{macrocode} -% Unset the \catattr{regular} attribute if it has been set. +%\end{macro} +% +%\begin{macro}{\GLSxtrshortlongformat} +%\begin{definition} +%\cs{GLSxtrshortlongformat}\marg{label}\marg{insert}\marg{longfmtcs}\marg{shortfmtcs} +%\end{definition} +%\changes{1.49}{??}{new} % \begin{macrocode} - \renewcommand*{\GlsXtrPostNewAbbreviation}{% - \glshasattribute{\the\glslabeltok}{regular}% - {% - \glssetattribute{\the\glslabeltok}{regular}{false}% - }% - {}% - }% +\newcommand*{\GLSxtrshortlongformat}[4]{% + \GLSxtrshortformat{#1}{#2}{#4}% + \glsxtrfullsep{#1}% + \glsxtrparen{\GLSxtrlongformat{#1}{}{#3}}% }% -{% % \end{macrocode} -%\changes{1.40}{2019-03-31}{corrected formatting commands} +%\end{macro} +% +%\begin{macro}{\GLSxtrshortlongplformat} +%\begin{definition} +%\cs{GLSxtrshortlongplformat}\marg{label}\marg{insert}\marg{longfmtcs}\marg{shortfmtcs} +%\end{definition} +%\changes{1.49}{??}{new} % \begin{macrocode} - \GlsXtrUseAbbrStyleFmts{long-hyphen-noshort-desc-noreg}% -} +\newcommand*{\GLSxtrshortlongplformat}[4]{% + \GLSxtrshortplformat{#1}{#2}{#4}% + \glsxtrfullsep{#1}% + \glsxtrparen{\GLSxtrlongplformat{#1}{}{#3}}% +}% % \end{macrocode} -%\end{abbrvstyle} +%\end{macro} % -%\begin{macro}{\glsxtrlonghyphen} -%\changes{1.17}{2017-08-09}{new} +%\begin{macro}{\glsxtrfootnotelongformat} %\begin{definition} -%\cs{glsxtrlonghyphen}\marg{long}\marg{label}\marg{insert} +%\cs{glsxtrfootnotelongformat}\marg{label}\marg{longfmtcs} %\end{definition} -%Used by \abbrstyle{long-hyphen-postshort-hyphen}. The \meta{insert} -%is check to determine if it starts with a hyphen but isn't used -%here as it's moved to the post-link hook. +%\changes{1.49}{??}{new} % \begin{macrocode} -\newcommand*{\glsxtrlonghyphen}[3]{% +\newcommand*{\glsxtrfootnotelongformat}[2]{% + \glsxtrlongformat{#1}{}{#2}% +}% % \end{macrocode} -% Grouping is needed to localise the redefinitions. +%\end{macro} +% +%\begin{macro}{\glsxtrfootnotelongplformat} +%\begin{definition} +%\cs{glsxtrfootnotelongplformat}\marg{label}\marg{longfmtcs} +%\end{definition} +%\changes{1.49}{??}{new} % \begin{macrocode} - {% - \glsxtrifhyphenstart{#3}{\def\glsxtrwordsep{-}}{}% - \glsfirstlonghyphenfont{#1}% - }% -} +\newcommand*{\glsxtrfootnotelongplformat}[2]{% + \glsxtrlongplformat{#1}{}{#2}% +}% % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrposthyphenshort} -%\changes{1.17}{2017-08-09}{new} +%\begin{macro}{\glsxtrpostfootnotelongformat} %\begin{definition} -%\cs{glsxtrposthyphenshort}\marg{label}\marg{insert} +%\cs{glsxtrpostfootnotelongformat}\marg{label}\marg{longfmtcs} %\end{definition} -%Used in the post-link hook for the -%\abbrstyle{long-hyphen-postshort-hyphen} style. Much like -%\cs{glsxtrlonghyphenshort} but omits the \meta{long} part. This -%always uses the singular short form. +%\changes{1.49}{??}{new} % \begin{macrocode} -\newcommand*{\glsxtrposthyphenshort}[2]{% - {% - \glsxtrifhyphenstart{#2}{\def\glsxtrwordsep{-}}{}% - \ifglsxtrinsertinside{\glsfirstlonghyphenfont{#2}}\else{#2}\fi - \glsxtrfullsep{#1}% - \glsxtrparen - {\glsfirstabbrvhyphenfont{\glsentryshort{#1}\ifglsxtrinsertinside{#2}\fi}% - \ifglsxtrinsertinside\else{#2}\fi - }% - }% -} +\newcommand*{\glsxtrpostfootnotelongformat}{% + \glsxtrfootnotelongformat +}% % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrposthyphensubsequent} -%\changes{1.17}{2017-08-09}{new} +%\begin{macro}{\glsxtrpostusershortformat} %\begin{definition} -%\cs{glsxtrposthyphensubsequent}\marg{label}\marg{insert} +%\cs{glsxtruserpostshortformat}\marg{label}\marg{shortfmtcs} %\end{definition} -%Format in the post-link hook for subsequent use. The label is -%ignored by default. +%\changes{1.49}{??}{new} % \begin{macrocode} -\newcommand*{\glsxtrposthyphensubsequent}[2]{% - \glsabbrvfont{\ifglsxtrinsertinside {#2}\fi}% - \ifglsxtrinsertinside \else{#2}\fi -} +\newcommand*{\glsxtrpostusershortformat}[2]{% + \glsxtrifallcaps + {\GLSxtrusershortformat{#1}{#2}}% + {\glsxtrusershortformat{#1}{#2}}% +}% % \end{macrocode} %\end{macro} % -%\begin{abbrvstyle}{long-hyphen-postshort-hyphen} -%\changes{1.17}{2017-08-09}{new} -%\changes{1.42}{2020-02-03}{added missing text key} -%Like \abbrstyle{long-hyphen-short-hyphen} but shifts the insert -%and parenthetical material to the post-link hook. +%\begin{macro}{\glsxtrusershortformat} +%\begin{definition} +%\cs{glsxtrusershortformat}\marg{label}\marg{shortfmtcs} +%\end{definition} +%\changes{1.49}{??}{new} % \begin{macrocode} -\newabbreviationstyle{long-hyphen-postshort-hyphen}% -{% +\newcommand*{\glsxtrusershortformat}[2]{% + \glsxtruserparen{\glsxtrshortformat{#1}{}{#2}}{#1}% +}% % \end{macrocode} -% Set accessibility attributes if enabled. +%\end{macro} +% +%\begin{macro}{\glsxtrusershortplformat} +%\begin{definition} +%\cs{glsxtrusershortplformat}\marg{label}\marg{shortfmtcs} +%\end{definition} +%\changes{1.49}{??}{new} % \begin{macrocode} - \glsxtrAccSuppAbbrSetFirstLongAttrs\glscategorylabel +\newcommand*{\glsxtrusershortplformat}[2]{% + \glsxtruserparen{\glsxtrshortplformat{#1}{}{#2}}{#1}% +}% % \end{macrocode} -% Setup the default fields. +%\end{macro} +% +%\begin{macro}{\GLSxtrusershortformat} +%\begin{definition} +%\cs{GLSxtrusershortformat}\marg{label}\marg{shortfmtcs} +%\end{definition} +%\changes{1.49}{??}{new} % \begin{macrocode} - \renewcommand*{\CustomAbbreviationFields}{% - name={\glsxtrlongshortname}, - sort={\the\glsshorttok}, - first={\protect\glsfirstlonghyphenfont{\the\glslongtok}},% - firstplural={\protect\glsfirstlonghyphenfont{\the\glslongpltok}},% - text={\protect\glsabbrvhyphenfont{\the\glsshorttok}},% - plural={\protect\glsabbrvhyphenfont{\the\glsshortpltok}},% - description={\protect\glslonghyphenfont{\the\glslongtok}}}% - \renewcommand*{\GlsXtrPostNewAbbreviation}{% - \csdef{glsxtrpostlink\glscategorylabel}{% - \glsxtrifwasfirstuse - {% - \glsxtrposthyphenshort{\glslabel}{\glsinsert}% - }% - {% +\newcommand*{\GLSxtrusershortformat}[2]{% + \GLSxtruserparen{\GLSxtrshortformat{#1}{}{#2}}{#1}% +}% % \end{macrocode} -% Put the insertion into the post-link: +%\end{macro} +% +%\begin{macro}{\GLSxtrusershortplformat} +%\begin{definition} +%\cs{GLSxtrusershortplformat}\marg{label}\marg{shortfmtcs} +%\end{definition} +%\changes{1.49}{??}{new} % \begin{macrocode} - \glsxtrposthyphensubsequent{\glslabel}{\glsinsert}% - }% - }% - \glshasattribute{\the\glslabeltok}{regular}% - {% - \glssetattribute{\the\glslabeltok}{regular}{false}% - }% - {}% - }% +\newcommand*{\GLSxtrusershortplformat}[2]{% + \GLSxtruserparen{\GLSxtrshortplformat{#1}{}{#2}}{#1}% }% -{% % \end{macrocode} -% In case the user wants to mix and match font styles, these are -% redefined here. -% \begin{macrocode} - \renewcommand*{\abbrvpluralsuffix}{\glsxtrabbrvpluralsuffix}% - \renewcommand*{\glsabbrvfont}[1]{\glsabbrvhyphenfont{##1}}% - \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvhyphenfont{##1}}% - \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlonghyphenfont{##1}}% - \renewcommand*{\glslongfont}[1]{\glslonghyphenfont{##1}}% +%\end{macro} +% +%\begin{macro}{\glsxtrpostuserlongformat} +%\begin{definition} +%\cs{glsxtruserpostlongformat}\marg{label}\marg{longfmtcs} +%\end{definition} +%\changes{1.49}{??}{new} +% \begin{macrocode} +\newcommand*{\glsxtrpostuserlongformat}[2]{% + \glsxtrifallcaps + {\GLSxtruserlongformat{#1}{#2}}% + {\glsxtruserlongformat{#1}{#2}}% +}% % \end{macrocode} -% Subsequent use needs to omit the insertion: +%\end{macro} +% +%\begin{macro}{\glsxtruserlongformat} +%\begin{definition} +%\cs{glsxtruserlongformat}\marg{label}\marg{longfmtcs} +%\end{definition} +%\changes{1.49}{??}{new} % \begin{macrocode} - \renewcommand*{\glsxtrsubsequentfmt}[2]{% - \glsabbrvfont{\glsaccessshort{##1}}% - }% - \renewcommand*{\glsxtrsubsequentplfmt}[2]{% - \glsabbrvfont{\glsaccessshortpl{##1}}% - }% - \renewcommand*{\Glsxtrsubsequentfmt}[2]{% - \glsabbrvfont{\Glsaccessshort{##1}}% - }% - \renewcommand*{\Glsxtrsubsequentplfmt}[2]{% - \glsabbrvfont{\Glsaccessshortpl{##1}}% - }% +\newcommand*{\glsxtruserlongformat}[2]{% + \glsxtruserparen{\glsxtrlongformat{#1}{}{#2}}{#1}% +}% % \end{macrocode} -% First use full form: +%\end{macro} +% +%\begin{macro}{\GLSxtruserlongformat} +%\begin{definition} +%\cs{GLSxtruserlongformat}\marg{label}\marg{longfmtcs} +%\end{definition} +%\changes{1.49}{??}{new} % \begin{macrocode} - \renewcommand*{\glsxtrfullformat}[2]{% - \glsxtrlonghyphen{\glsaccesslong{##1}}{##1}{##2}% - }% - \renewcommand*{\glsxtrfullplformat}[2]{% - \glsxtrlonghyphen{\glsaccesslongpl{##1}}{##1}{##2}% - }% - \renewcommand*{\Glsxtrfullformat}[2]{% - \glsxtrlonghyphen{\Glsaccesslong{##1}}{##1}{##2}% - }% - \renewcommand*{\Glsxtrfullplformat}[2]{% - \glsxtrlonghyphen{\Glsaccesslongpl{##1}}{##1}{##2}% - }% +\newcommand*{\GLSxtruserlongformat}[2]{% + \GLSxtruserparen{\GLSxtrlongformat{#1}{}{#2}}{#1}% +}% % \end{macrocode} -% In-line format. +%\end{macro} +% +%\begin{macro}{\glsxtruserlongplformat} +%\begin{definition} +%\cs{glsxtruserlongplformat}\marg{label}\marg{longfmtcs} +%\end{definition} +%\changes{1.49}{??}{new} % \begin{macrocode} - \renewcommand*{\glsxtrinlinefullformat}[2]{% - \glsfirstlonghyphenfont{\glsaccesslong{##1}% - \ifglsxtrinsertinside{##2}\fi}% - \ifglsxtrinsertinside \else{##2}\fi - }% - \renewcommand*{\glsxtrinlinefullplformat}[2]{% - \glsfirstlonghyphenfont{\glsaccesslongpl{##1}% - \ifglsxtrinsertinside{##2}\fi}% - \ifglsxtrinsertinside \else{##2}\fi - }% - \renewcommand*{\Glsxtrinlinefullformat}[2]{% - \glsfirstlonghyphenfont{\Glsaccesslong{##1}% - \ifglsxtrinsertinside{##2}\fi}% - \ifglsxtrinsertinside \else{##2}\fi - }% - \renewcommand*{\Glsxtrinlinefullplformat}[2]{% - \glsfirstlonghyphenfont{\Glsaccesslongpl{##1}% - \ifglsxtrinsertinside{##2}\fi}% - \ifglsxtrinsertinside \else{##2}\fi - }% -} +\newcommand*{\glsxtruserlongplformat}[2]{% + \glsxtruserparen{\glsxtrlongplformat{#1}{}{#2}}{#1}% +}% % \end{macrocode} -%\end{abbrvstyle} +%\end{macro} % -%\begin{abbrvstyle}{long-hyphen-postshort-hyphen-desc} -%\changes{1.17}{2017-08-09}{new} -%Like \abbrstyle{long-hyphen-postshort-hyphen} but the description -%must be supplied by the user. +%\begin{macro}{\GLSxtruserlongplformat} +%\begin{definition} +%\cs{GLSxtruserlongplformat}\marg{label}\marg{longfmtcs} +%\end{definition} +%\changes{1.49}{??}{new} % \begin{macrocode} -\newabbreviationstyle{long-hyphen-postshort-hyphen-desc}% -{% +\newcommand*{\GLSxtruserlongplformat}[2]{% + \GLSxtruserparen{\GLSxtrlongplformat{#1}{}{#2}}{#1}% +}% % \end{macrocode} -% Set accessibility attributes if enabled. +%\end{macro} +% +%\begin{macro}{\glsxtruserlongshortformat} +%\begin{definition} +%\cs{glsxtruserlongshortformat}\marg{label}\marg{insert}\marg{longfmtcs}\marg{shortfmtcs} +%\end{definition} +%\changes{1.49}{??}{new} % \begin{macrocode} - \glsxtrAccSuppAbbrSetTextShortAttrs\glscategorylabel +\newcommand*{\glsxtruserlongshortformat}[4]{% + \glsxtrlongformat{#1}{#2}{#3}% + \glsxtrusershortformat{#1}{#4}% +}% % \end{macrocode} -% Setup the default fields. +%\end{macro} +% +%\begin{macro}{\glsxtruserlongshortplformat} +%\begin{definition} +%\cs{glsxtruserlongshortplformat}\marg{label}\marg{insert}\marg{longfmtcs}\marg{shortfmtcs} +%\end{definition} +%\changes{1.49}{??}{new} % \begin{macrocode} - \renewcommand*{\CustomAbbreviationFields}{% - name={\glsxtrlongshortdescname}, - sort={\glsxtrlongshortdescsort},% - first={\protect\glsfirstlonghyphenfont{\the\glslongtok}},% - firstplural={\protect\glsfirstlonghyphenfont{\the\glslongpltok}},% - text={\protect\glsabbrvhyphenfont{\the\glsshorttok}},% - plural={\protect\glsabbrvhyphenfont{\the\glsshortpltok}}% - }% - \renewcommand*{\GlsXtrPostNewAbbreviation}{% - \csdef{glsxtrpostlink\glscategorylabel}{% - \glsxtrifwasfirstuse - {% - \glsxtrposthyphenshort{\glslabel}{\glsinsert}% - }% - {% +\newcommand*{\glsxtruserlongshortplformat}[4]{% + \glsxtrlongplformat{#1}{#2}{#3}% + \glsxtrusershortplformat{#1}{#4}% +}% % \end{macrocode} -% Put the insertion into the post-link: +%\end{macro} +% +%\begin{macro}{\Glsxtruserlongshortformat} +%\begin{definition} +%\cs{Glsxtruserlongshortformat}\marg{label}\marg{insert}\marg{longfmtcs}\marg{shortfmtcs} +%\end{definition} +%\changes{1.49}{??}{new} % \begin{macrocode} - \glsxtrposthyphensubsequent{\glslabel}{\glsinsert}% - }% - }% - \glshasattribute{\the\glslabeltok}{regular}% - {% - \glssetattribute{\the\glslabeltok}{regular}{false}% - }% - {}% - }% +\newcommand*{\Glsxtruserlongshortformat}[4]{% + \Glsxtrlongformat{#1}{#2}{#3}% + \glsxtrusershortformat{#1}{#4}% }% -{% - \GlsXtrUseAbbrStyleFmts{long-hyphen-postshort-hyphen}% -} % \end{macrocode} -%\end{abbrvstyle} +%\end{macro} % -%\begin{macro}{\glsxtrshorthyphenlong} -%\changes{1.17}{2017-08-09}{new} +%\begin{macro}{\Glsxtruserlongshortplformat} %\begin{definition} -%\cs{glsxtrshorthyphenlong}\marg{label}\marg{short}\marg{long}\marg{insert} +%\cs{Glsxtruserlongshortplformat}\marg{label}\marg{insert}\marg{longfmtcs}\marg{shortfmtcs} %\end{definition} -%The \meta{long} and \meta{short} arguments may be the plural form. -%The \meta{long} argument may also be the first letter uppercase form. +%\changes{1.49}{??}{new} % \begin{macrocode} -\newcommand*{\glsxtrshorthyphenlong}[4]{% +\newcommand*{\Glsxtruserlongshortplformat}[4]{% + \Glsxtrlongplformat{#1}{#2}{#3}% + \glsxtrusershortplformat{#1}{#4}% +}% % \end{macrocode} -% Grouping is needed to localise the redefinitions. +%\end{macro} +% +%\begin{macro}{\GLSxtruserlongshortformat} +%\begin{definition} +%\cs{GLSxtruserlongshortformat}\marg{label}\marg{insert}\marg{longfmtcs}\marg{shortfmtcs} +%\end{definition} +%\changes{1.49}{??}{new} % \begin{macrocode} - {% +\newcommand*{\GLSxtruserlongshortformat}[4]{% + \GLSxtrlongformat{#1}{#2}{#3}% + \GLSxtrusershortformat{#1}{#4}% +}% % \end{macrocode} -% If \meta{insert} starts with a hyphen, redefine \cs{glsxtrwordsep} -% to a hyphen. The inserted material is also inserted into the -% parenthetical part. (The inserted material is grouped as a -% precautionary measure.) +%\end{macro} +% +%\begin{macro}{\GLSxtruserlongshortplformat} +%\begin{definition} +%\cs{GLSxtruserlongshortplformat}\marg{label}\marg{insert}\marg{longfmtcs}\marg{shortfmtcs} +%\end{definition} +%\changes{1.49}{??}{new} % \begin{macrocode} - \glsxtrifhyphenstart{#4}{\def\glsxtrwordsep{-}}{}% - \glsfirstabbrvhyphenfont{#2\ifglsxtrinsertinside{#4}\fi}% - \ifglsxtrinsertinside\else{#4}\fi - \glsxtrfullsep{#1}% - \glsxtrparen{\glsfirstlonghyphenfont{#3\ifglsxtrinsertinside{#4}\fi}% - \ifglsxtrinsertinside\else{#4}\fi}% - }% -} +\newcommand*{\GLSxtruserlongshortplformat}[4]{% + \GLSxtrlongplformat{#1}{#2}{#3}% + \GLSxtrusershortplformat{#1}{#4}% +}% % \end{macrocode} %\end{macro} % -%\begin{abbrvstyle}{short-hyphen-long-hyphen} -%\changes{1.17}{2017-08-09}{new} -%\changes{1.42}{2020-02-03}{added missing text key} -%Designed for use with the \catattr{markwords} attribute. +%\begin{macro}{\glsxtrusershortlongformat} +%\begin{definition} +%\cs{glsxtrusershortlongformat}\marg{label}\marg{insert}\marg{longfmtcs}\marg{shortfmtcs} +%\end{definition} +%\changes{1.49}{??}{new} % \begin{macrocode} -\newabbreviationstyle{short-hyphen-long-hyphen}% +\newcommand*{\glsxtrusershortlongformat}[4]{% + \glsxtrshortformat{#1}{#2}{#3}% + \glsxtruserlongformat{#1}{#4}% +}% +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrusershortlongplformat} +%\begin{definition} +%\cs{glsxtrusershortlongplformat}\marg{label}\marg{insert}\marg{longfmtcs}\marg{shortfmtcs} +%\end{definition} +%\changes{1.49}{??}{new} +% \begin{macrocode} +\newcommand*{\glsxtrusershortlongplformat}[4]{% + \glsxtrshortplformat{#1}{#2}{#3}% + \glsxtruserlongplformat{#1}{#4}% +}% +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\Glsxtrusershortlongformat} +%\begin{definition} +%\cs{Glsxtrusershortlongformat}\marg{label}\marg{insert}\marg{longfmtcs}\marg{shortfmtcs} +%\end{definition} +%\changes{1.49}{??}{new} +% \begin{macrocode} +\newcommand*{\Glsxtrusershortlongformat}[4]{% + \Glsxtrshortformat{#1}{#2}{#3}% + \glsxtruserlongformat{#1}{#4}% +}% +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\Glsxtrusershortlongplformat} +%\begin{definition} +%\cs{Glsxtrusershortlongplformat}\marg{label}\marg{insert}\marg{longfmtcs}\marg{shortfmtcs} +%\end{definition} +%\changes{1.49}{??}{new} +% \begin{macrocode} +\newcommand*{\Glsxtrusershortlongplformat}[4]{% + \Glsxtrshortplformat{#1}{#2}{#3}% + \glsxtruserlongplformat{#1}{#4}% +}% +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GLSxtrusershortlongformat} +%\begin{definition} +%\cs{GLSxtrusershortlongformat}\marg{label}\marg{insert}\marg{longfmtcs}\marg{shortfmtcs} +%\end{definition} +%\changes{1.49}{??}{new} +% \begin{macrocode} +\newcommand*{\GLSxtrusershortlongformat}[4]{% + \GLSxtrshortformat{#1}{#2}{#3}% + \GLSxtruserlongformat{#1}{#4}% +}% +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GLSxtrusershortlongplformat} +%\begin{definition} +%\cs{GLSxtrusershortlongplformat}\marg{label}\marg{insert}\marg{longfmtcs}\marg{shortfmtcs} +%\end{definition} +%\changes{1.49}{??}{new} +% \begin{macrocode} +\newcommand*{\GLSxtrusershortlongplformat}[4]{% + \GLSxtrshortplformat{#1}{#2}{#3}% + \GLSxtruserlongplformat{#1}{#4}% +}% +% \end{macrocode} +%\end{macro} +% +%\subsection{Predefined Styles (Default Font)} +%\changes{1.17}{2017-08-09}{removed some inconsistencies in the abbreviation +%styles} +%\begin{abbrvstyle}{long-short} +% \begin{macrocode} +\newabbreviationstyle{long-short}% {% % \end{macrocode} % Set accessibility attributes if enabled. @@ -24381,21 +30922,27 @@ defined}{}% % Setup the default fields. % \begin{macrocode} \renewcommand*{\CustomAbbreviationFields}{% - name={\glsxtrshortlongname}, + name={\glsxtrlongshortname}, sort={\the\glsshorttok}, - first={\protect\glsfirstabbrvhyphenfont{\the\glsshorttok}% + first={\glsfirstxplongfont{\the\glslongtok}{\glscategorylabel}% \protect\glsxtrfullsep{\the\glslabeltok}% - \glsxtrparen{\protect\glsfirstlonghyphenfont{\the\glslongtok}}},% - firstplural={\protect\glsfirstabbrvhyphenfont{\the\glsshortpltok}% + \protect\glsxtrparen{\glsfirstxpabbrvfont{\the\glsshorttok}{\glscategorylabel}}},% + firstplural={\glsfirstxplongfont{\the\glslongpltok}{\glscategorylabel}% \protect\glsxtrfullsep{\the\glslabeltok}% - \glsxtrparen{\protect\glsfirstlonghyphenfont{\the\glslongpltok}}},% - text={\protect\glsabbrvhyphenfont{\the\glsshorttok}},% - plural={\protect\glsabbrvhyphenfont{\the\glsshortpltok}},% - description={\protect\glslonghyphenfont{\the\glslongtok}}}% + \protect\glsxtrparen{\glsfirstxpabbrvfont{\the\glsshortpltok}{\glscategorylabel}}},% +% \end{macrocode} +%\changes{1.15}{2017-05-10}{fixed spelling of \cs{glsabbrvfont}} +%\changes{1.42}{2020-02-03}{added missing text key} +% \begin{macrocode} + plural={\glsxpabbrvfont{\the\glsshortpltok}{\glscategorylabel}},% + text={\glsxpabbrvfont{\the\glsshorttok}{\glscategorylabel}},% + description={\the\glslongtok}}% % \end{macrocode} +%\changes{0.5.1}{2015-12-07}{switch off regular attribute if set} % Unset the \catattr{regular} attribute if it has been set. % \begin{macrocode} \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glsxtrsetcomplexstyle{\the\glslabeltok}{3}% \glshasattribute{\the\glslabeltok}{regular}% {% \glssetattribute{\the\glslabeltok}{regular}{false}% @@ -24404,39 +30951,78 @@ defined}{}% }% }% {% - \renewcommand*{\abbrvpluralsuffix}{\glsxtrhyphensuffix}% - \renewcommand*{\glsabbrvfont}[1]{\glsabbrvhyphenfont{##1}}% - \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvhyphenfont{##1}}% - \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlonghyphenfont{##1}}% - \renewcommand*{\glslongfont}[1]{\glslonghyphenfont{##1}}% +% \end{macrocode} +% In case the user wants to mix and match font styles, these are +% redefined here. +% \begin{macrocode} + \renewcommand*{\abbrvpluralsuffix}{\glsxtrabbrvpluralsuffix}% + \renewcommand*{\glsabbrvfont}[1]{\glsabbrvdefaultfont{##1}}% + \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvdefaultfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslongdefaultfont{##1}}% + \renewcommand*{\glsxtrrevert}[1]{\glsxtrdefaultrevert{##1}}% % \end{macrocode} % The first use full form and the inline full form are the same for % this style. % \begin{macrocode} \renewcommand*{\glsxtrfullformat}[2]{% - \glsxtrshorthyphenlong{##1}{\glsaccessshort{##1}}{\glsaccesslong{##1}}{##2}% + \glsxtrlongshortformat{##1}{##2}% + {\glsfirstlongfont}{\glsfirstabbrvfont}% }% \renewcommand*{\glsxtrfullplformat}[2]{% - \glsxtrshorthyphenlong{##1}% - {\glsaccessshortpl{##1}}{\glsaccesslongpl{##1}}{##2}% + \glsxtrlongshortplformat{##1}{##2}% + {\glsfirstlongfont}{\glsfirstabbrvfont}% }% \renewcommand*{\Glsxtrfullformat}[2]{% - \glsxtrshorthyphenlong{##1}{\glsaccessshort{##1}}{\Glsaccesslong{##1}}{##2}% + \Glsxtrlongshortformat{##1}{##2}% + {\glsfirstlongfont}{\glsfirstabbrvfont}% }% \renewcommand*{\Glsxtrfullplformat}[2]{% - \glsxtrshorthyphenlong{##1}% - {\glsaccessshortpl{##1}}{\Glsaccesslongpl{##1}}{##2}% + \Glsxtrlongshortplformat{##1}{##2}% + {\glsfirstlongfont}{\glsfirstabbrvfont}% + }% + \renewcommand*{\GLSxtrfullformat}[2]{% + \GLSxtrlongshortformat{##1}{##2}% + {\glsfirstlongfont}{\glsfirstabbrvfont}% + }% + \renewcommand*{\GLSxtrfullplformat}[2]{% + \GLSxtrlongshortplformat{##1}{##2}% + {\glsfirstlongfont}{\glsfirstabbrvfont}% }% } % \end{macrocode} %\end{abbrvstyle} % -%\begin{abbrvstyle}{short-hyphen-long-hyphen-desc} +% Set this as the default style for general abbreviations: +% \begin{macrocode} +\setabbreviationstyle{long-short} +% \end{macrocode} +% +%\begin{macro}{\glsxtrlongshortdescsort} +%\changes{1.04}{2016-05-02}{new} +% \begin{macrocode} +\newcommand*{\glsxtrlongshortdescsort}{% + \expandonce\glsxtrorglong\space (\expandonce\glsxtrorgshort)% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrlongshortdescname} %\changes{1.17}{2017-08-09}{new} -%Like \abbrstyle{short-hyphen-long-hyphen} but the description -%must be supplied by the user. % \begin{macrocode} -\newabbreviationstyle{short-hyphen-long-hyphen-desc}% +\newcommand*{\glsxtrlongshortdescname}{% + \glsxplongfont{\the\glslongtok}{\glscategorylabel}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \protect\glsxtrparen{\glsxpabbrvfont{\the\glsshorttok}{\glscategorylabel}}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{abbrvstyle}{long-short-desc} +% User supplies description. The long form is included in the name. +%\changes{0.3}{2015-12-02}{fixed name to use \cs{glslabeltok}} +% \begin{macrocode} +\newabbreviationstyle{long-short-desc}% {% % \end{macrocode} % Set accessibility attributes if enabled. @@ -24446,21 +31032,30 @@ defined}{}% % Setup the default fields. % \begin{macrocode} \renewcommand*{\CustomAbbreviationFields}{% - name={\glsxtrshortlongdescname}, - sort={\glsxtrshortlongdescsort}, - first={\protect\glsfirstabbrvhyphenfont{\the\glsshorttok}% + name={\glsxtrlongshortdescname}, + sort={\glsxtrlongshortdescsort},% + first={\glsfirstxplongfont{\the\glslongtok}{\glscategorylabel}% \protect\glsxtrfullsep{\the\glslabeltok}% - \glsxtrparen{\protect\glsfirstlonghyphenfont{\the\glslongtok}}},% - firstplural={\protect\glsfirstabbrvhyphenfont{\the\glsshortpltok}% + \protect\glsxtrparen{\glsfirstxpabbrvfont{\the\glsshorttok}{\glscategorylabel}}},% + firstplural={\glsfirstxplongfont{\the\glslongpltok}{\glscategorylabel}% \protect\glsxtrfullsep{\the\glslabeltok}% - \glsxtrparen{\protect\glsfirstlonghyphenfont{\the\glslongpltok}}},% - text={\protect\glsabbrvhyphenfont{\the\glsshorttok}},% - plural={\protect\glsabbrvhyphenfont{\the\glsshortpltok}}% + \protect\glsxtrparen{\glsfirstxpabbrvfont{\the\glsshortpltok}{\glscategorylabel}}},% +% \end{macrocode} +%The \gloskey{text} key should only have the short form. +%\changes{1.07}{2016-08-15}{added missing text key} +% \begin{macrocode} + text={\glsxpabbrvfont{\the\glsshorttok}{\glscategorylabel}},% +% \end{macrocode} +%\changes{1.07}{2016-08-15}{fixed misspelling of \cs{glsabbrvfont}} +% \begin{macrocode} + plural={\glsxpabbrvfont{\the\glsshortpltok}{\glscategorylabel}}% }% % \end{macrocode} +%\changes{0.5.1}{2015-12-07}{switch off regular attribute if set} % Unset the \catattr{regular} attribute if it has been set. % \begin{macrocode} \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glsxtrsetcomplexstyle{\the\glslabeltok}{3}% \glshasattribute{\the\glslabeltok}{regular}% {% \glssetattribute{\the\glslabeltok}{regular}{false}% @@ -24469,63 +31064,24 @@ defined}{}% }% }% {% - \GlsXtrUseAbbrStyleFmts{short-hyphen-long-hyphen}% + \GlsXtrUseAbbrStyleFmts{long-short}% } % \end{macrocode} %\end{abbrvstyle} % -%\begin{macro}{\glsxtrshorthyphen} -%\changes{1.17}{2017-08-09}{new} -%\begin{definition} -%\cs{glsxtrshorthyphen}\marg{short}\marg{label}\marg{insert} -%\end{definition} -%Used by \abbrstyle{short-hyphen-postlong-hyphen}. The \meta{insert} -%is check to determine if it starts with a hyphen but isn't used -%here as it's moved to the post-link hook. -% \begin{macrocode} -\newcommand*{\glsxtrshorthyphen}[3]{% -% \end{macrocode} -% Grouping is needed to localise the redefinitions. -% \begin{macrocode} - {% - \glsxtrifhyphenstart{#3}{\def\glsxtrwordsep{-}}{}% - \glsfirstabbrvhyphenfont{#1}% - }% -} -% \end{macrocode} -%\end{macro} -% -%\begin{macro}{\glsxtrposthyphenlong} -%\changes{1.17}{2017-08-09}{new} -%\begin{definition} -%\cs{glsxtrposthyphenlong}\marg{label}\marg{insert} -%\end{definition} -%Used in the post-link hook for the -%\abbrstyle{short-hyphen-postlong-hyphen} style. Much like -%\cs{glsxtrshorthyphenlong} but omits the \meta{short} part. This -%always uses the singular long form. +%\begin{macro}{\glsxtrshortlongname} +%\changes{1.25}{2017-11-24}{new} % \begin{macrocode} -\newcommand*{\glsxtrposthyphenlong}[2]{% - {% - \glsxtrifhyphenstart{#2}{\def\glsxtrwordsep{-}}{}% - \ifglsxtrinsertinside{\glsfirstabbrvhyphenfont{#2}}\else{#2}\fi - \glsxtrfullsep{#1}% - \glsxtrparen - {\glsfirstlonghyphenfont{\glsentrylong{#1}\ifglsxtrinsertinside{#2}\fi}% - \ifglsxtrinsertinside\else{#2}\fi - }% - }% +\newcommand*{\glsxtrshortlongname}{% + \glsxpabbrvfont{\the\glsshorttok}{\glscategorylabel}% } % \end{macrocode} %\end{macro} % -%\begin{abbrvstyle}{short-hyphen-postlong-hyphen} -%\changes{1.17}{2017-08-09}{new} -%\changes{1.42}{2020-02-03}{added missing text key} -%Like \abbrstyle{short-hyphen-long-hyphen} but shifts the insert -%and parenthetical material to the post-link hook. +%\begin{abbrvstyle}{short-long} +% Short form followed by long form in parenthesis on first use. % \begin{macrocode} -\newabbreviationstyle{short-hyphen-postlong-hyphen}% +\newabbreviationstyle{short-long}% {% % \end{macrocode} % Set accessibility attributes if enabled. @@ -24537,24 +31093,24 @@ defined}{}% \renewcommand*{\CustomAbbreviationFields}{% name={\glsxtrshortlongname}, sort={\the\glsshorttok}, - first={\protect\glsfirstabbrvhyphenfont{\the\glsshorttok}},% - firstplural={\protect\glsfirstabbrvhyphenfont{\the\glsshortpltok}},% - text={\protect\glsabbrvhyphenfont{\the\glsshorttok}},% - plural={\protect\glsabbrvhyphenfont{\the\glsshortpltok}},% - description={\protect\glslonghyphenfont{\the\glslongtok}}}% - \renewcommand*{\GlsXtrPostNewAbbreviation}{% - \csdef{glsxtrpostlink\glscategorylabel}{% - \glsxtrifwasfirstuse - {% - \glsxtrposthyphenlong{\glslabel}{\glsinsert}% - }% - {% + description={\the\glslongtok},% + first={\glsfirstxpabbrvfont{\the\glsshorttok}{\glscategorylabel}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \protect\glsxtrparen{\glsfirstxplongfont{\the\glslongtok}{\glscategorylabel}}},% + firstplural={\glsfirstxpabbrvfont{\the\glsshortpltok}{\glscategorylabel}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \protect\glsxtrparen{\glsfirstxplongfont{\the\glslongpltok}{\glscategorylabel}}},% % \end{macrocode} -% Put the insertion into the post-link: +%\changes{1.15}{2017-05-10}{fixed spelling of \cs{glsabbrvfont}} +%\changes{1.42}{2020-02-03}{added missing text key} % \begin{macrocode} - \glsxtrposthyphensubsequent{\glslabel}{\glsinsert}% - }% - }% + text={\glsxpabbrvfont{\the\glsshorttok}{\glscategorylabel}},% + plural={\glsxpabbrvfont{\the\glsshortpltok}{\glscategorylabel}}}% +% \end{macrocode} +%\changes{0.5.1}{2015-12-07}{switch off regular attribute if set} +% Unset the \catattr{regular} attribute if it has been set. +% \begin{macrocode} + \renewcommand*{\GlsXtrPostNewAbbreviation}{% \glshasattribute{\the\glslabeltok}{regular}% {% \glssetattribute{\the\glslabeltok}{regular}{false}% @@ -24568,75 +31124,65 @@ defined}{}% % redefined here. % \begin{macrocode} \renewcommand*{\abbrvpluralsuffix}{\glsxtrabbrvpluralsuffix}% - \renewcommand*{\glsabbrvfont}[1]{\glsabbrvhyphenfont{##1}}% - \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvhyphenfont{##1}}% - \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlonghyphenfont{##1}}% - \renewcommand*{\glslongfont}[1]{\glslonghyphenfont{##1}}% -% \end{macrocode} -% Subsequent use needs to omit the insertion: -% \begin{macrocode} - \renewcommand*{\glsxtrsubsequentfmt}[2]{% - \glsabbrvfont{\glsaccessshort{##1}}% - }% - \renewcommand*{\glsxtrsubsequentplfmt}[2]{% - \glsabbrvfont{\glsaccessshortpl{##1}}% - }% - \renewcommand*{\Glsxtrsubsequentfmt}[2]{% - \glsabbrvfont{\Glsaccessshort{##1}}% - }% - \renewcommand*{\Glsxtrsubsequentplfmt}[2]{% - \glsabbrvfont{\Glsaccessshortpl{##1}}% - }% + \renewcommand*\glsabbrvfont[1]{\glsabbrvdefaultfont{##1}}% + \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvdefaultfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslongdefaultfont{##1}}% % \end{macrocode} -% First use full form: +% The first use full form and the inline full form are the same for +% this style. % \begin{macrocode} \renewcommand*{\glsxtrfullformat}[2]{% - \glsxtrshorthyphen{\glsaccessshort{##1}}{##1}{##2}% + \glsxtrshortlongformat{##1}{##2}% + {\glsfirstlongfont}{\glsfirstabbrvfont}% }% \renewcommand*{\glsxtrfullplformat}[2]{% - \glsxtrshorthyphen{\glsaccessshortpl{##1}}{##1}{##2}% + \glsxtrshortlongplformat{##1}{##2}% + {\glsfirstlongfont}{\glsfirstabbrvfont}% }% \renewcommand*{\Glsxtrfullformat}[2]{% - \glsxtrshorthyphen{\Glsaccessshort{##1}}{##1}{##2}% + \Glsxtrshortlongformat{##1}{##2}% + {\glsfirstlongfont}{\glsfirstabbrvfont}% }% \renewcommand*{\Glsxtrfullplformat}[2]{% - \glsxtrshorthyphen{\Glsaccessshortpl{##1}}{##1}{##2}% - }% -% \end{macrocode} -% In-line format. Commands like \cs{glsxtrfull} set \cs{glsinsert} -% to empty. The entire link-text (provided by the following -% commands) is stored in \cs{glscustomtext}. -% \begin{macrocode} - \renewcommand*{\glsxtrinlinefullformat}[2]{% - \glsfirstabbrvhyphenfont{\glsaccessshort{##1}% - \ifglsxtrinsertinside{##2}\fi}% - \ifglsxtrinsertinside \else{##2}\fi - }% - \renewcommand*{\glsxtrinlinefullplformat}[2]{% - \glsfirstabbrvhyphenfont{\glsaccessshortpl{##1}% - \ifglsxtrinsertinside{##2}\fi}% - \ifglsxtrinsertinside \else{##2}\fi + \Glsxtrshortlongplformat{##1}{##2}% + {\glsfirstlongfont}{\glsfirstabbrvfont}% }% - \renewcommand*{\Glsxtrinlinefullformat}[2]{% - \glsfirstabbrvhyphenfont{\Glsaccessshort{##1}% - \ifglsxtrinsertinside{##2}\fi}% - \ifglsxtrinsertinside \else{##2}\fi + \renewcommand*{\GLSxtrfullformat}[2]{% + \GLSxtrshortlongformat{##1}{##2}% + {\glsfirstlongfont}{\glsfirstabbrvfont}% }% - \renewcommand*{\Glsxtrinlinefullplformat}[2]{% - \glsfirstabbrvhyphenfont{\Glsaccessshortpl{##1}% - \ifglsxtrinsertinside{##2}\fi}% - \ifglsxtrinsertinside \else{##2}\fi + \renewcommand*{\GLSxtrfullplformat}[2]{% + \GLSxtrshortlongplformat{##1}{##2}% + {\glsfirstlongfont}{\glsfirstabbrvfont}% }% } % \end{macrocode} %\end{abbrvstyle} % -%\begin{abbrvstyle}{short-hyphen-postlong-hyphen-desc} +%\begin{macro}{\glsxtrshortlongdescsort} %\changes{1.17}{2017-08-09}{new} -%Like \abbrstyle{short-hyphen-postlong-hyphen} but the description -%must be supplied by the user. % \begin{macrocode} -\newabbreviationstyle{short-hyphen-postlong-hyphen-desc}% +\newcommand*{\glsxtrshortlongdescsort}{\expandonce\glsxtrorgshort} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrshortlongdescname} +%\changes{1.17}{2017-08-09}{new} +% \begin{macrocode} +\newcommand*{\glsxtrshortlongdescname}{% + \glsxpabbrvfont{\the\glsshorttok}{\glscategorylabel}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \protect\glsxtrparen{\glsxplongfont{\the\glslongtok}{\glscategorylabel}}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{abbrvstyle}{short-long-desc} +% User supplies description. The long form is included in the name. +%\changes{0.3}{2015-12-02}{fixed name to use \cs{glslabeltok}} +% \begin{macrocode} +\newabbreviationstyle{short-long-desc}% {% % \end{macrocode} % Set accessibility attributes if enabled. @@ -24647,25 +31193,29 @@ defined}{}% % \begin{macrocode} \renewcommand*{\CustomAbbreviationFields}{% name={\glsxtrshortlongdescname}, - sort={\glsxtrshortlongdescsort},% - first={\protect\glsfirstabbrvhyphenfont{\the\glsshorttok}},% - firstplural={\protect\glsfirstabbrvhyphenfont{\the\glsshortpltok}},% - text={\protect\glsabbrvhyphenfont{\the\glsshorttok}},% - plural={\protect\glsabbrvhyphenfont{\the\glsshortpltok}}% + sort={\glsxtrshortlongdescsort}, + first={\glsfirstxpabbrvfont{\the\glsshorttok}{\glscategorylabel}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \protect\glsxtrparen{\glsfirstxplongfont{\the\glslongtok}{\glscategorylabel}}},% + firstplural={\glsfirstxpabbrvfont{\the\glsshortpltok}{\glscategorylabel}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \protect\glsxtrparen{\glsfirstxplongfont{\the\glslongpltok}{\glscategorylabel}}},% +% \end{macrocode} +%\changes{1.07}{2016-08-15}{added text key} +% \begin{macrocode} + text={\glsxpabbrvfont{\the\glsshorttok}{\glscategorylabel}},% +% \end{macrocode} +%\changes{1.07}{2016-08-15}{fixed misspelling of \cs{glsabbrvfont} in plural +%key} +% \begin{macrocode} + plural={\glsxpabbrvfont{\the\glsshortpltok}{\glscategorylabel}}% }% - \renewcommand*{\GlsXtrPostNewAbbreviation}{% - \csdef{glsxtrpostlink\glscategorylabel}{% - \glsxtrifwasfirstuse - {% - \glsxtrposthyphenlong{\glslabel}{\glsinsert}% - }% - {% % \end{macrocode} -% Put the insertion into the post-link: +%\changes{0.5.1}{2015-12-07}{switch off regular attribute if set} +% Unset the \catattr{regular} attribute if it has been set. % \begin{macrocode} - \glsxtrposthyphensubsequent{\glslabel}{\glsinsert}% - }% - }% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glsxtrsetcomplexstyle{\the\glslabeltok}{3}% \glshasattribute{\the\glslabeltok}{regular}% {% \glssetattribute{\the\glslabeltok}{regular}{false}% @@ -24674,81 +31224,122 @@ defined}{}% }% }% {% - \GlsXtrUseAbbrStyleFmts{short-hyphen-postlong-hyphen}% + \GlsXtrUseAbbrStyleFmts{short-long}% } % \end{macrocode} %\end{abbrvstyle} % -%\subsection{Predefined Styles (No Short on First Use)} -%These styles show only the long form on first use and only the -%short form on subsequent use. -%\begin{macro}{\glsabbrvonlyfont} -%\changes{1.17}{2017-08-09}{new} +%\begin{macro}{\glsfirstlongfootnotefont} +%\changes{1.05}{2016-06-10}{new} +%Only used by the \qt{footnote} styles. % \begin{macrocode} -\newcommand*{\glsabbrvonlyfont}{\glsabbrvdefaultfont}% +\newcommand*{\glsfirstlongfootnotefont}[1]{\glslongfootnotefont{#1}}% % \end{macrocode} %\end{macro} -%\begin{macro}{\glsfirstabbrvonlyfont} -%\changes{1.17}{2017-08-09}{new} +% +%\begin{macro}{\glslongfootnotefont} +%\changes{1.05}{2016-06-10}{new} +%Only used by the \qt{footnote} styles. % \begin{macrocode} -\newcommand*{\glsfirstabbrvonlyfont}{\glsabbrvonlyfont}% +\newcommand*{\glslongfootnotefont}[1]{\glslongdefaultfont{#1}}% % \end{macrocode} %\end{macro} -%\begin{macro}{\glslongonlyfont} -%\changes{1.17}{2017-08-09}{new} +% +%\begin{macro}{\glsxtrabbrvfootnote} +%\begin{definition} +%\cs{glsxtrabbrvfootnote}\marg{label}\marg{long} +%\end{definition} +%\changes{1.07}{2016-08-15}{new} +%Command used by footnote abbreviation styles. The default +%definition ignores the first argument. The second argument +%\meta{long} includes the font changing command and may be the +%singular or plural form, depending on the command that was used +%(for example, \cs{gls} or \cs{glspl}). % \begin{macrocode} -\newcommand*{\glslongonlyfont}{\glslongdefaultfont}% +\newcommand*{\glsxtrabbrvfootnote}[2]{\footnote{#2}} % \end{macrocode} %\end{macro} -%\begin{macro}{\glsfirstlongonlyfont} -%\changes{1.17}{2017-08-09}{new} +% +%\begin{macro}{\glsxtrpostabbrvfootnote} +%\changes{1.49}{??}{new} +%Used by post-footnote style to include formatting. % \begin{macrocode} -\newcommand*{\glsfirstlongonlyfont}{\glslongonlyfont}% +\newrobustcmd*{\glsxtrpostabbrvfootnote}[2]{% + \glsxtrabbrvfootnote{#1}% + {#2\glsxtrpostfootnotelongformat{#1}{\glsfirstlongfootnotefont}}% +} % \end{macrocode} %\end{macro} -% The default short form suffix: -%\begin{macro}{\glsxtronlysuffix} -%\changes{1.17}{2017-08-09}{new} +% +%\begin{macro}{\xpglsxtrpostabbrvfootnote} +%\changes{1.49}{??}{new} +%Perform all the appropriate expansions to ensure \cs{glslabel} and +%\cs{glsxtrassignlinktextfmt} are expanded +% as they may be lost by the time the footnote occurs. % \begin{macrocode} -\newcommand*{\glsxtronlysuffix}{\glsxtrabbrvpluralsuffix} +\newcommand*{\xpglsxtrpostabbrvfootnote}{% + \expandafter\expandafter\expandafter + \glsxtrpostabbrvfootnote + \expandafter\expandafter\expandafter + {\expandafter\glslabel\expandafter}\expandafter + {\glsxtrassignlinktextfmt}% +} % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtronlyname} +%\begin{macro}{\glsxtrfootnotename} %\changes{1.25}{2017-11-24}{new} -% The default name format for this style. % \begin{macrocode} -\newcommand*{\glsxtronlyname}{% - \protect\glsabbrvonlyfont{\the\glsshorttok}% +\newcommand*{\glsxtrfootnotename}{% + \glsxpabbrvfont{\the\glsshorttok}{\glscategorylabel}% } % \end{macrocode} %\end{macro} % -%\begin{abbrvstyle}{long-only-short-only} -%\changes{1.17}{2017-08-09}{new} -%\changes{1.42}{2020-02-03}{added missing text key} +%\begin{abbrvstyle}{footnote} +% Short form followed by long form in footnote on first use. % \begin{macrocode} -\newabbreviationstyle{long-only-short-only}% +\newabbreviationstyle{footnote}% {% % \end{macrocode} -% Set accessibility attributes if enabled. +% Set accessibility attributes if enabled. (Add +% \catattr{firstshortaccess} since long form is hidden in a +% footnote on first use.) The inner formatting isn't be applied to +% the footnote text because the innertextformat key value may have +% gone out of scope by that the time the footnote text is processed. +% (Neither is the outer formatting applied.) % \begin{macrocode} - \glsxtrAccSuppAbbrSetFirstLongAttrs\glscategorylabel + \glsxtrAccSuppAbbrSetNoLongAttrs\glscategorylabel % \end{macrocode} % Setup the default fields. % \begin{macrocode} \renewcommand*{\CustomAbbreviationFields}{% - name={\glsxtronlyname}, + name={\glsxtrfootnotename}, sort={\the\glsshorttok}, - first={\protect\glsfirstlongonlyfont{\the\glslongtok}},% - firstplural={\protect\glsfirstlongonlyfont{\the\glslongpltok}},% - text={\protect\glsabbrvonlyfont{\the\glsshorttok}},% - plural={\protect\glsabbrvonlyfont{\the\glsshortpltok}},% - description={\protect\glslongonlyfont{\the\glslongtok}}}% + description={\the\glslongtok},% % \end{macrocode} -% Unset the \catattr{regular} attribute if it has been set. +%\changes{1.07}{2016-08-15}{changed first forms to use +%\cs{glsfirstlongfootnotefont}} +% \begin{macrocode} + first={\glsfirstxpabbrvfont{\the\glsshorttok}{\glscategorylabel}% + \protect\glsxtrabbrvfootnote{\the\glslabeltok}% + {\protect\glsfirstlongfootnotefont{\the\glslongtok}}},% + firstplural={\glsfirstxpabbrvfont{\the\glsshortpltok}{\glscategorylabel}% + \protect\glsxtrabbrvfootnote{\the\glslabeltok}% + {\protect\glsfirstlongfootnotefont{\the\glslongpltok}}},% +% \end{macrocode} +%\changes{1.15}{2017-05-10}{fixed spelling of \cs{glsabbrvfont}} +%\changes{1.42}{2020-02-03}{added missing text key} +% \begin{macrocode} + text={\glsxpabbrvfont{\the\glsshorttok}{\glscategorylabel}},% + plural={\glsxpabbrvfont{\the\glsshortpltok}{\glscategorylabel}}}% +% \end{macrocode} +% Switch off hyperlinks on first use to prevent nested hyperlinks, +% and unset the \catattr{regular} attribute if it has been set. +%\changes{0.5.1}{2015-12-07}{switch off regular attribute if set} % \begin{macrocode} \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glssetattribute{\the\glslabeltok}{nohyperfirst}{true}% \glshasattribute{\the\glslabeltok}{regular}% {% \glssetattribute{\the\glslabeltok}{regular}{false}% @@ -24758,103 +31349,134 @@ defined}{}% }% {% % \end{macrocode} -%\changes{1.42}{2020-02-03}{removed \cs{protect} from \cs{glsxtronlysuffix}} +% In case the user wants to mix and match font styles, these are +% redefined here. % \begin{macrocode} - \renewcommand*{\abbrvpluralsuffix}{\glsxtronlysuffix}% - \renewcommand*{\glsabbrvfont}[1]{\glsabbrvonlyfont{##1}}% - \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvonlyfont{##1}}% - \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongonlyfont{##1}}% - \renewcommand*{\glslongfont}[1]{\glslongonlyfont{##1}}% + \renewcommand*{\abbrvpluralsuffix}{\glsxtrabbrvpluralsuffix}% + \renewcommand*\glsabbrvfont[1]{\glsabbrvdefaultfont{##1}}% + \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvdefaultfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongfootnotefont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslongfootnotefont{##1}}% % \end{macrocode} -% The first use full form doesn't show the short form. +% The full format displays the short form followed by the long form +% as a footnote. % \begin{macrocode} \renewcommand*{\glsxtrfullformat}[2]{% - \glsfirstlongonlyfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi + \glsxtrshortformat{##1}{##2}{\glsfirstabbrvfont}% + \protect\glsxtrabbrvfootnote{##1}% + {\glsxtrfootnotelongformat{##1}{\glsfirstlongfootnotefont}}% }% \renewcommand*{\glsxtrfullplformat}[2]{% - \glsfirstlongonlyfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi + \glsxtrshortplformat{##1}{##2}{\glsfirstabbrvfont}% + \protect\glsxtrabbrvfootnote{##1}% + {\glsxtrfootnotelongplformat{##1}{\glsfirstlongfootnotefont}}% }% \renewcommand*{\Glsxtrfullformat}[2]{% - \glsfirstlongonlyfont{\Glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi + \Glsxtrshortformat{##1}{##2}{\glsfirstabbrvfont}% + \protect\glsxtrabbrvfootnote{##1}% + {\glsxtrfootnotelongformat{##1}{\glsfirstlongfootnotefont}}% }% \renewcommand*{\Glsxtrfullplformat}[2]{% - \glsfirstlongonlyfont{\Glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi + \Glsxtrshortplformat{##1}{##2}{\glsfirstabbrvfont}% + \protect\glsxtrabbrvfootnote{##1}% + {\glsxtrfootnotelongplformat{##1}{\glsfirstlongfootnotefont}}% + }% + \renewcommand*{\GLSxtrfullformat}[2]{% + \GLSxtrshortformat{##1}{##2}{\glsfirstabbrvfont}% + \protect\glsxtrabbrvfootnote{##1}% + {\glsxtrfootnotelongformat{##1}{\glsfirstlongfootnotefont}}% + }% + \renewcommand*{\GLSxtrfullplformat}[2]{% + \GLSxtrshortplformat{##1}{##2}{\glsfirstabbrvfont}% + \protect\glsxtrabbrvfootnote{##1}% + {\glsxtrfootnotelongplformat{##1}{\glsfirstlongfootnotefont}}% }% % \end{macrocode} -% The inline full form does show the short form. +% The first use full form and the inline full form use the short +% (long) style. % \begin{macrocode} \renewcommand*{\glsxtrinlinefullformat}[2]{% - \glsfirstlongonlyfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - \glsxtrfullsep{##1}% - \glsxtrparen{\protect\glsfirstabbrvonlyfont{\glsaccessshort{##1}}}% + \glsxtrshortlongformat{##1}{##2}% + {\glsfirstlongfootnotefont}{\glsfirstabbrvfont}% }% \renewcommand*{\glsxtrinlinefullplformat}[2]{% - \glsfirstlongonlyfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - \glsxtrfullsep{##1}% - \glsxtrparen{\protect\glsfirstabbrvonlyfont{\glsaccessshortpl{##1}}}% + \glsxtrshortlongplformat{##1}{##2}% + {\glsfirstlongfootnotefont}{\glsfirstabbrvfont}% }% \renewcommand*{\Glsxtrinlinefullformat}[2]{% - \glsfirstlongonlyfont{\Glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - \glsxtrfullsep{##1}% - \glsxtrparen{\protect\glsfirstabbrvonlyfont{\glsaccessshortpl{##1}}}% + \Glsxtrshortlongformat{##1}{##2}% + {\glsfirstlongfootnotefont}{\glsfirstabbrvfont}% }% \renewcommand*{\Glsxtrinlinefullplformat}[2]{% - \glsfirstlongonlyfont{\Glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - \glsxtrfullsep{##1}% - \glsxtrparen{\protect\glsfirstabbrvonlyfont{\Glsaccessshortpl{##1}}}% + \Glsxtrshortlongplformat{##1}{##2}% + {\glsfirstlongfootnotefont}{\glsfirstabbrvfont}% + }% + \renewcommand*{\GLSxtrinlinefullformat}[2]{% + \GLSxtrshortlongformat{##1}{##2}% + {\glsfirstlongfootnotefont}{\glsfirstabbrvfont}% + }% + \renewcommand*{\GLSxtrinlinefullplformat}[2]{% + \GLSxtrshortlongplformat{##1}{##2}% + {\glsfirstlongfootnotefont}{\glsfirstabbrvfont}% }% } % \end{macrocode} %\end{abbrvstyle} +%\begin{abbrvstyle}{short-footnote} +%\changes{1.04}{2016-05-02}{new} +% \begin{macrocode} +\letabbreviationstyle{short-footnote}{footnote} +% \end{macrocode} +%\end{abbrvstyle} % -%\begin{macro}{\glsxtronlydescsort} -%\changes{1.17}{2017-08-09}{new} +%\begin{macro}{\glsxtrfootnotedescname} +%\changes{1.42}{2020-02-03}{new} % \begin{macrocode} -\newcommand*{\glsxtronlydescsort}{\the\glslongtok} +\newcommand*{\glsxtrfootnotedescname}{% + \glsxpabbrvfont{\the\glsshorttok}{\glscategorylabel}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \protect\glsxtrparen{\glsxplongfont{\the\glslongtok}{\glscategorylabel}}% +} % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtronlydescname} -%\changes{1.17}{2017-08-09}{new} +%\begin{macro}{\glsxtrfootnotedescsort} +%\changes{1.42}{2020-02-03}{new} % \begin{macrocode} -\newcommand*{\glsxtronlydescname}{% - \protect\glslongfont{\the\glslongtok}% -} +\newcommand*{\glsxtrfootnotedescsort}{\the\glsshorttok} % \end{macrocode} %\end{macro} % -%\begin{abbrvstyle}{long-only-short-only-desc} -%\changes{1.17}{2017-08-09}{new} +%\begin{abbrvstyle}{short-footnote-desc} +% Like \abbrstyle{short-footnote} but with user supplied description. +%\changes{1.42}{2020-02-03}{new} % \begin{macrocode} -\newabbreviationstyle{long-only-short-only-desc}% +\newabbreviationstyle{short-footnote-desc}% {% % \end{macrocode} -% Set accessibility attributes if enabled. +% Set accessibility attributes if enabled % \begin{macrocode} - \glsxtrAccSuppAbbrSetTextShortAttrs\glscategorylabel + \glsxtrAccSuppAbbrSetNameLongAttrs\glscategorylabel % \end{macrocode} % Setup the default fields. % \begin{macrocode} \renewcommand*{\CustomAbbreviationFields}{% - name={\glsxtronlydescname}, - sort={\glsxtronlydescsort},% - first={\protect\glsfirstlongonlyfont{\the\glslongtok}},% - firstplural={\protect\glsfirstlongonlyfont{\the\glslongpltok}},% - text={\protect\glsabbrvonlyfont{\the\glsshorttok}},% - plural={\protect\glsabbrvonlyfont{\the\glsshortpltok}}% - }% + name={\glsxtrfootnotedescname}, + sort={\glsxtrfootnotedescsort}, + first={\glsfirstxpabbrvfont{\the\glsshorttok}{\glscategorylabel}% + \protect\glsxtrabbrvfootnote{\the\glslabeltok}% + {\protect\glsfirstlongfootnotefont{\the\glslongtok}}},% + firstplural={\glsfirstxpabbrvfont{\the\glsshortpltok}{\glscategorylabel}% + \protect\glsxtrabbrvfootnote{\the\glslabeltok}% + {\protect\glsfirstlongfootnotefont{\the\glslongpltok}}},% + text={\glsxpabbrvfont{\the\glsshorttok}{\glscategorylabel}},% + plural={\glsxpabbrvfont{\the\glsshortpltok}{\glscategorylabel}}}% % \end{macrocode} -% Unset the \catattr{regular} attribute if it has been set. +% Switch off hyperlinks on first use to prevent nested hyperlinks, +% and unset the \catattr{regular} attribute if it has been set. % \begin{macrocode} \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glssetattribute{\the\glslabeltok}{nohyperfirst}{true}% \glshasattribute{\the\glslabeltok}{regular}% {% \glssetattribute{\the\glslabeltok}{regular}{false}% @@ -24863,66 +31485,78 @@ defined}{}% }% }% {% - \GlsXtrUseAbbrStyleFmts{long-only-short-only}% + \GlsXtrUseAbbrStyleFmts{footnote}% } % \end{macrocode} %\end{abbrvstyle} % -%Small-caps is awkward, so support for that is added. -%\begin{macro}{\glsabbrvsconlyfont} -%\changes{1.48}{2021-11-22}{new} -% \begin{macrocode} -\newcommand*{\glsabbrvsconlyfont}{\glsabbrvscfont}% -% \end{macrocode} -%\end{macro} -%\begin{macro}{\glsfirstabbrvsconlyfont} -%\changes{1.48}{2021-11-22}{new} -% \begin{macrocode} -\newcommand*{\glsfirstabbrvsconlyfont}{\glsabbrvsconlyfont}% -% \end{macrocode} -%\end{macro} -% The default short form suffix: -%\begin{macro}{\glsxtrsconlysuffix} -%\changes{1.48}{2021-11-22}{new} -% \begin{macrocode} -\newcommand*{\glsxtrsconlysuffix}{\glsxtrscsuffix} -% \end{macrocode} -%\end{macro} -% -%\begin{macro}{\glsxtrsconlyname} -%\changes{1.48}{2021-11-22}{new} -% The default name format for this style. +%\begin{abbrvstyle}{footnote-desc} +%\changes{1.42}{2020-02-03}{new} +%Synonym. % \begin{macrocode} -\newcommand*{\glsxtrsconlyname}{% - \protect\glsabbrvsconlyfont{\the\glsshorttok}% -} +\letabbreviationstyle{footnote-desc}{short-footnote-desc} % \end{macrocode} -%\end{macro} +%\end{abbrvstyle} % -%\begin{abbrvstyle}{long-only-short-sc-only} -%\changes{1.48}{2021-11-22}{new} +%\begin{abbrvstyle}{postfootnote} +% Similar to \abbrstyle{footnote} but the footnote is placed afterwards, +% outside the link. This avoids nested links and can also move the +% footnote marker after any following punctuation mark. +% Pre v1.07 included \cs{footnote} in the first keys, which was +% incorrect as it caused duplicate footnotes. +%\changes{1.07}{2016-08-15}{removed \cs{footnote} from first keys} % \begin{macrocode} -\newabbreviationstyle{long-only-short-sc-only}% +\newabbreviationstyle{postfootnote}% {% % \end{macrocode} -% Set accessibility attributes if enabled. +% Set accessibility attributes if enabled. (Add +% \catattr{firstshortaccess} since long form is hidden in a +% footnote on first use.) % \begin{macrocode} - \glsxtrAccSuppAbbrSetFirstLongAttrs\glscategorylabel + \glsxtrAccSuppAbbrSetNoLongAttrs\glscategorylabel % \end{macrocode} % Setup the default fields. % \begin{macrocode} \renewcommand*{\CustomAbbreviationFields}{% - name={\glsxtrsconlyname}, + name={\glsxtrfootnotename}, sort={\the\glsshorttok}, - first={\protect\glsfirstlongonlyfont{\the\glslongtok}},% - firstplural={\protect\glsfirstlongonlyfont{\the\glslongpltok}},% - text={\protect\glsabbrvsconlyfont{\the\glsshorttok}},% - plural={\protect\glsabbrvsconlyfont{\the\glsshortpltok}},% - description={\protect\glslongonlyfont{\the\glslongtok}}}% + description={\the\glslongtok},% + first={\glsfirstxpabbrvfont{\the\glsshorttok}{\glscategorylabel}},% + firstplural={\glsfirstxpabbrvfont{\the\glsshortpltok}{\glscategorylabel}},% % \end{macrocode} -% Unset the \catattr{regular} attribute if it has been set. +%\changes{1.15}{2017-05-10}{fixed spelling of \cs{glsabbrvfont}} +%\changes{1.42}{2020-02-03}{added missing text key} +% \begin{macrocode} + text={\glsxpabbrvfont{\the\glsshorttok}{\glscategorylabel}},% + plural={\glsxpabbrvfont{\the\glsshortpltok}{\glscategorylabel}}}% +% \end{macrocode} +% Make this category insert a footnote after the link if this was +% the first use, and +% unset the \catattr{regular} attribute if it has been set. +%\changes{0.5.1}{2015-12-07}{switch off regular attribute if set} % \begin{macrocode} \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \csdef{glsxtrpostlink\glscategorylabel}{% +% \end{macrocode} +%\changes{1.02}{2016-04-25}{added redef of \cs{glsxtrsetupfulldefs}} +% The footnote needs to be suppressed in the inline form. +%Previously this was done by redefining {glsxtrsetupfulldefs} but +%that interferes with other styles. Instead, this now uses \cs{glsxtrifwasglslike} +%\changes{1.49}{??}{removed redef of \cs{glsxtrsetupfulldefs}} +% \begin{macrocode} + \glsxtrifwasglslikeandfirstuse + {% +% \end{macrocode} +% Ensure \cs{glslabel} and \cs{glsxtrassignlinktextfmt} are expanded +% as they may be lost by the time the footnote occurs. +% \begin{macrocode} + \glsxtrdopostpunc{\expandafter\expandafter\expandafter + \glsxtrpostabbrvfootnote + \expandafter\expandafter\expandafter + {\expandafter\glslabel\expandafter}\expandafter + {\glsxtrassignlinktextfmt}}% + }{}% + }% \glshasattribute{\the\glslabeltok}{regular}% {% \glssetattribute{\the\glslabeltok}{regular}{false}% @@ -24931,99 +31565,128 @@ defined}{}% }% }% {% - \renewcommand*{\abbrvpluralsuffix}{\glsxtrsconlysuffix}% - \renewcommand*{\glsabbrvfont}[1]{\glsabbrvsconlyfont{##1}}% - \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvsconlyfont{##1}}% - \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongonlyfont{##1}}% - \renewcommand*{\glslongfont}[1]{\glslongonlyfont{##1}}% % \end{macrocode} -% The first use full form doesn't show the short form. +% In case the user wants to mix and match font styles, these are +% redefined here. +% \begin{macrocode} + \renewcommand*{\abbrvpluralsuffix}{\glsxtrabbrvpluralsuffix}% + \renewcommand*\glsabbrvfont[1]{\glsabbrvdefaultfont{##1}}% + \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvdefaultfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongfootnotefont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslongfootnotefont{##1}}% +% \end{macrocode} +% The full format displays the short form. The long form is +% deferred. % \begin{macrocode} \renewcommand*{\glsxtrfullformat}[2]{% - \glsfirstlongonlyfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi + \glsxtrshortformat{##1}{##2}{\glsfirstabbrvfont}% }% \renewcommand*{\glsxtrfullplformat}[2]{% - \glsfirstlongonlyfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi + \glsxtrshortplformat{##1}{##2}{\glsfirstabbrvfont}% }% \renewcommand*{\Glsxtrfullformat}[2]{% - \glsfirstlongonlyfont{\Glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi + \Glsxtrshortformat{##1}{##2}{\glsfirstabbrvfont}% }% \renewcommand*{\Glsxtrfullplformat}[2]{% - \glsfirstlongonlyfont{\Glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi + \Glsxtrshortplformat{##1}{##2}{\glsfirstabbrvfont}% + }% + \renewcommand*{\GLSxtrfullformat}[2]{% + \GLSxtrshortformat{##1}{##2}{\glsfirstabbrvfont}% + }% + \renewcommand*{\GLSxtrfullplformat}[2]{% + \GLSxtrshortplformat{##1}{##2}{\glsfirstabbrvfont}% }% % \end{macrocode} -% The inline full form does show the short form. +% The first use full form and the inline full form use the short +% (long) style. +%\changes{1.07}{2016-08-15}{switched from \cs{glsfirstlongfont} to +%\cs{glsfirstlongfootnotefont}} % \begin{macrocode} \renewcommand*{\glsxtrinlinefullformat}[2]{% - \glsfirstlongonlyfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - \glsxtrfullsep{##1}% - \glsxtrparen{\protect\glsfirstabbrvsconlyfont{\glsaccessshort{##1}}}% + \glsxtrshortlongformat{##1}{##2}% + {\glsfirstlongfootnotefont}{\glsfirstabbrvfont}% }% \renewcommand*{\glsxtrinlinefullplformat}[2]{% - \glsfirstlongonlyfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - \glsxtrfullsep{##1}% - \glsxtrparen{\protect\glsfirstabbrvsconlyfont{\glsaccessshortpl{##1}}}% + \glsxtrshortlongplformat{##1}{##2}% + {\glsfirstlongfootnotefont}{\glsfirstabbrvfont}% }% \renewcommand*{\Glsxtrinlinefullformat}[2]{% - \glsfirstlongonlyfont{\Glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - \glsxtrfullsep{##1}% - \glsxtrparen{\protect\glsfirstabbrvsconlyfont{\glsaccessshortpl{##1}}}% + \Glsxtrshortlongformat{##1}{##2}% + {\glsfirstlongfootnotefont}{\glsfirstabbrvfont}% }% \renewcommand*{\Glsxtrinlinefullplformat}[2]{% - \glsfirstlongonlyfont{\Glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% - \ifglsxtrinsertinside\else##2\fi - \glsxtrfullsep{##1}% - \glsxtrparen{\protect\glsfirstabbrvsconlyfont{\Glsaccessshortpl{##1}}}% + \Glsxtrshortlongplformat{##1}{##2}% + {\glsfirstlongfootnotefont}{\glsfirstabbrvfont}% + }% + \renewcommand*{\GLSxtrinlinefullformat}[2]{% + \GLSxtrshortlongformat{##1}{##2}% + {\glsfirstlongfootnotefont}{\glsfirstabbrvfont}% + }% + \renewcommand*{\GLSxtrinlinefullplformat}[2]{% + \GLSxtrshortlongplformat{##1}{##2}% + {\glsfirstlongfootnotefont}{\glsfirstabbrvfont}% }% } % \end{macrocode} %\end{abbrvstyle} % -%\begin{macro}{\glsxtrsconlydescsort} -%\changes{1.48}{2021-11-22}{new} -% \begin{macrocode} -\newcommand*{\glsxtrsconlydescsort}{\glsxtronlydescsort} -% \end{macrocode} -%\end{macro} -% -%\begin{macro}{\glsxtrsconlydescname} -%\changes{1.48}{2021-11-22}{new} +%\begin{abbrvstyle}{short-postfootnote} +%\changes{1.04}{2016-05-02}{new} % \begin{macrocode} -\newcommand*{\glsxtrsconlydescname}{\glsxtronlydescname} +\letabbreviationstyle{short-postfootnote}{postfootnote} % \end{macrocode} -%\end{macro} +%\end{abbrvstyle} % -%\begin{abbrvstyle}{long-only-short-sc-only-desc} -%\changes{1.48}{2021-11-22}{new} +%\begin{abbrvstyle}{short-postfootnote-desc} +%\changes{1.42}{2020-02-03}{new} +% Like \abbrstyle{short-postfootnote} but with user supplied description. % \begin{macrocode} -\newabbreviationstyle{long-only-short-sc-only-desc}% +\newabbreviationstyle{short-postfootnote-desc}% {% % \end{macrocode} % Set accessibility attributes if enabled. % \begin{macrocode} - \glsxtrAccSuppAbbrSetTextShortAttrs\glscategorylabel + \glsxtrAccSuppAbbrSetNameLongAttrs\glscategorylabel % \end{macrocode} % Setup the default fields. % \begin{macrocode} \renewcommand*{\CustomAbbreviationFields}{% - name={\glsxtrsconlydescname}, - sort={\glsxtrsconlydescsort},% - first={\protect\glsfirstlongonlyfont{\the\glslongtok}},% - firstplural={\protect\glsfirstlongonlyfont{\the\glslongpltok}},% - text={\protect\glsabbrvsconlyfont{\the\glsshorttok}},% - plural={\protect\glsabbrvsconlyfont{\the\glsshortpltok}}% - }% + name={\glsxtrfootnotedescname}, + sort={\glsxtrfootnotedescsort}, + first={\glsfirstxpabbrvfont{\the\glsshorttok}{\glscategorylabel}},% + firstplural={\glsfirstxpabbrvfont{\the\glsshortpltok}{\glscategorylabel}},% % \end{macrocode} -% Unset the \catattr{regular} attribute if it has been set. +%\changes{1.15}{2017-05-10}{fixed spelling of \cs{glsabbrvfont}} +%\changes{1.42}{2020-02-03}{added missing text key} +% \begin{macrocode} + text={\glsxpabbrvfont{\the\glsshorttok}{\glscategorylabel}},% + plural={\glsxpabbrvfont{\the\glsshortpltok}{\glscategorylabel}}}% +% \end{macrocode} +% Make this category insert a footnote after the link if this was +% the first use, and +% unset the \catattr{regular} attribute if it has been set. +%\changes{0.5.1}{2015-12-07}{switch off regular attribute if set} +%\changes{1.02}{2016-04-25}{added redef of \cs{glsxtrsetupfulldefs}} +%Previously this was done by redefining {glsxtrsetupfulldefs} but +%that interferes with other styles. Instead, this now uses \cs{glsxtrifwasglslike} +%\changes{1.49}{??}{removed redef of \cs{glsxtrsetupfulldefs}} % \begin{macrocode} \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \csdef{glsxtrpostlink\glscategorylabel}{% + \glsxtrifwasglslikeandfirstuse + {% +% \end{macrocode} +% Ensure \cs{glslabel} and \cs{glsxtrassignlinktextfmt} are expanded +% as they may be lost by the time the footnote occurs. +% \begin{macrocode} + \glsxtrdopostpunc{\expandafter\expandafter\expandafter + \glsxtrpostabbrvfootnote + \expandafter\expandafter\expandafter + {\expandafter\glslabel\expandafter}\expandafter + {\glsxtrassignlinktextfmt}}% + }% + {}% + }% \glshasattribute{\the\glslabeltok}{regular}% {% \glssetattribute{\the\glslabeltok}{regular}{false}% @@ -25032,16015 +31695,42695 @@ defined}{}% }% }% {% - \GlsXtrUseAbbrStyleFmts{long-only-short-sc-only}% + \GlsXtrUseAbbrStyleFmts{postfootnote}% } % \end{macrocode} %\end{abbrvstyle} % -%\section{Using Entries in Headings} -% -% There are four main problems with using entries in sectioning -% commands: they can mess with the first use flag if they end up in -% the table of contents, they can add unwanted numbers to the -% entry's location list, the label is corrupted if used inside -% \ics{MakeUppercase} (which is used by the default headings style) -% and they need to be expandable for PDF bookmarks. The -% \styfmt{glossaries} package therefore recommends the use of the -% expandable commands, such as \cs{glsentryshort}, instead but this -% doesn't reflect the formatting since it doesn't include -% \cs{glsabbrvfont}. The commands below are an attempt to get around -% these problems. -% -% The PDF bookmark issue can easily be fixed with \sty{hyperref}'s -% \cs{texorpdfstring} which can simply use the expandable command -% in the PDF string case. The \TeX\ string case can now use -% \cs{glsxtrshort} with the \gloskey[glslink]{noindex} key set, which -% prevents the unwanted additions to the location list, and the -% \gloskey[glslink]{hyper} key set to false, which prevents the problem of -% nested links. This just leaves one thing left that needs to be -% dealt with, and that's what to do if the heading style -% uses \cs{MakeUppercase}. -% -% Note that \styfmt{glossaries} automatically loads \sty{textcase}, so -% the label can be protected from case change with \sty{textcase}'s -% \cs{NoCaseChange}. This means that we don't have a problem -% provided the page style uses \cs{MakeTextUppercase}, but the -% default heading page style uses \cs{MakeUppercase}. -% -% To get around this, save the original definition of \cs{markboth} -% and \cs{markright} and adjust it so that \cs{MakeUppercase} is -% temporarily redefined to \cs{MakeTextUppercase}. Some packages or -% classes redefine these commands, so we can't just assume they -% still have the original kernel definition. -% -%\begin{macro}{\markright} -% Save original definition: +%\begin{abbrvstyle}{postfootnote-desc} +%\changes{1.42}{?}{new} % \begin{macrocode} -\let\@glsxtr@org@markright\markright +\letabbreviationstyle{postfootnote-desc}{short-postfootnote-desc} % \end{macrocode} -% Redefine (grouping not added in case it interferes with the -% original code): +%\end{abbrvstyle} +% +%\begin{macro}{\glsxtrshortnolongname} +%\changes{1.25}{2017-11-24}{new} % \begin{macrocode} -\renewcommand*{\markright}[1]{% - \glsxtrmarkhook - \@glsxtr@org@markright{\@glsxtrinmark#1\@glsxtrnotinmark}% - \glsxtrrestoremarkhook +\newcommand*{\glsxtrshortnolongname}{% + \glsxpabbrvfont{\the\glsshorttok}{\glscategorylabel}% } % \end{macrocode} %\end{macro} % -%\begin{macro}{\markboth} -% Save original definition: +%\begin{abbrvstyle}{short} +% Provide a style that only displays the short form on first use, +% but the short and long form can be displayed with the \qt{full} +% commands that use the inline format. If the user supplies a +% description, the long form won't be displayed in the predefined +% glossary styles, but the post description hook can be employed to +% automatically insert it. % \begin{macrocode} -\let\@glsxtr@org@markboth\markboth +\newabbreviationstyle{short}% +{% % \end{macrocode} -% Redefine (grouping not added in case it interferes with the -% original code): +% Set accessibility attributes if enabled. % \begin{macrocode} -\renewcommand*{\markboth}[2]{% - \glsxtrmarkhook - \@glsxtr@org@markboth - {\@glsxtrinmark#1\@glsxtrnotinmark}% - {\@glsxtrinmark#2\@glsxtrnotinmark}% - \glsxtrrestoremarkhook -} + \glsxtrAccSuppAbbrSetNoLongAttrs\glscategorylabel % \end{macrocode} -%\end{macro} -% -%Also do this for \cs{@starttoc} -%\begin{macro}{\@starttoc} -% Save original definition: +% Setup the default fields. % \begin{macrocode} -\let\@glsxtr@org@@starttoc\@starttoc + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrshortnolongname}, + sort={\the\glsshorttok}, + first={\glsfirstxpabbrvfont{\the\glsshorttok}{\glscategorylabel}}, + firstplural={\glsfirstxpabbrvfont{\the\glsshortpltok}{\glscategorylabel}}, + text={\glsxpabbrvfont{\the\glsshorttok}{\glscategorylabel}}, + plural={\glsxpabbrvfont{\the\glsshortpltok}{\glscategorylabel}}, + description={\the\glslongtok}}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glssetattribute{\the\glslabeltok}{regular}{true}}% +}% +{% % \end{macrocode} -% Redefine: +% In case the user wants to mix and match font styles, these are +% redefined here. % \begin{macrocode} -\renewcommand*{\@starttoc}[1]{% - \glsxtrmarkhook - \@glsxtrinmark - \@glsxtr@org@@starttoc{#1}% - \@glsxtrnotinmark - \glsxtrrestoremarkhook -} + \renewcommand*{\abbrvpluralsuffix}{\glsxtrabbrvpluralsuffix}% + \renewcommand*\glsabbrvfont[1]{\glsabbrvdefaultfont{##1}}% + \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvdefaultfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslongdefaultfont{##1}}% % \end{macrocode} -%\end{macro} -% -% If this causes a problem provide a simple way of switching back to -% the original definitions: -%\begin{macro}{\glsxtrRevertMarks} +% The inline full form displays the short form followed by the +% long form in parentheses. +%\changes{0.2}{2015-11-30}{switched inline full form to short (long)} % \begin{macrocode} -\newcommand*{\glsxtrRevertMarks}{% - \let\markright\@glsxtr@org@markright - \let\markboth\@glsxtr@org@markboth - \let\@starttoc\@glsxtr@org@@starttoc -} + \renewcommand*{\glsxtrinlinefullformat}[2]{% + \glsxtrshortlongformat{##1}{##2}% + {\glsfirstlongfont}{\glsfirstabbrvfont}% + }% + \renewcommand*{\glsxtrinlinefullplformat}[2]{% + \glsxtrshortlongplformat{##1}{##2}% + {\glsfirstlongfont}{\glsfirstabbrvfont}% + }% + \renewcommand*{\Glsxtrinlinefullformat}[2]{% + \Glsxtrshortlongformat{##1}{##2}% + {\glsfirstlongfont}{\glsfirstabbrvfont}% + }% + \renewcommand*{\Glsxtrinlinefullplformat}[2]{% + \Glsxtrshortlongplformat{##1}{##2}% + {\glsfirstlongfont}{\glsfirstabbrvfont}% + }% + \renewcommand*{\GLSxtrinlinefullformat}[2]{% + \GLSxtrshortlongformat{##1}{##2}% + {\glsfirstlongfont}{\glsfirstabbrvfont}% + }% + \renewcommand*{\GLSxtrinlinefullplformat}[2]{% + \GLSxtrshortlongplformat{##1}{##2}% + {\glsfirstlongfont}{\glsfirstabbrvfont}% + }% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\glsxtrRevertTocMarks} -%\changes{1.31}{2018-05-09}{new} -%Just restores \cs{@starttoc}. +% The first use full form only displays the short form, but it +% typically won't be used as the \catattr{regular} attribute is set by this style. % \begin{macrocode} -\newcommand*{\glsxtrRevertTocMarks}{% - \let\@starttoc\@glsxtr@org@@starttoc + \renewcommand*{\glsxtrfullformat}[2]{% + \glsxtrshortformat{##1}{##2}{\glsfirstabbrvfont}% + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsxtrshortplformat{##1}{##2}{\glsfirstabbrvfont}% + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \Glsxtrshortformat{##1}{##2}{\glsfirstabbrvfont}% + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \Glsxtrshortplformat{##1}{##2}{\glsfirstabbrvfont}% + }% + \renewcommand*{\GLSxtrfullformat}[2]{% + \GLSxtrshortformat{##1}{##2}{\glsfirstabbrvfont}% + }% + \renewcommand*{\GLSxtrfullplformat}[2]{% + \GLSxtrshortplformat{##1}{##2}{\glsfirstabbrvfont}% + }% } % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\glsxtrifinmark} -%\changes{1.07}{2016-08-15}{new} +%\end{abbrvstyle} +% Set this as the default style for acronyms: % \begin{macrocode} -\newcommand*{\glsxtrifinmark}[2]{#2} +\setabbreviationstyle[acronym]{short} % \end{macrocode} -%\end{macro} % -%\begin{macro}{\@glsxtrinmark} -%\changes{1.07}{2016-08-15}{new} +%\begin{abbrvstyle}{short-nolong} +%\changes{1.04}{2016-05-02}{new} % \begin{macrocode} -\newrobustcmd*{\@glsxtrinmark}{% - \let\glsxtrifinmark\@firstoftwo -} +\letabbreviationstyle{short-nolong}{short} % \end{macrocode} -%\end{macro} +%\end{abbrvstyle} % -%\begin{macro}{\@glsxtrnotinmark} -%\changes{1.07}{2016-08-15}{new} +%\begin{abbrvstyle}{short-nolong-noreg} +%\changes{1.17}{2017-08-09}{new} +% Like \abbrstyle{short-nolong} but doesn't set the \catattr{regular} attribute. % \begin{macrocode} -\newrobustcmd*{\@glsxtrnotinmark}{% - \let\glsxtrifinmark\@secondoftwo -} +\newabbreviationstyle{short-nolong-noreg}% +{% + \GlsXtrUseAbbrStyleSetup{short-nolong}% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\glsxtrtitleorpdforheading} -%\changes{1.21}{2017-11-03}{new} +% Unset the \catattr{regular} attribute if it has been set. % \begin{macrocode} -\ifdef\texorpdfstring -{ - \newcommand*{\glsxtrtitleorpdforheading}[3]{\texorpdfstring{#1}{#2}} + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% + \GlsXtrUseAbbrStyleFmts{short-nolong}% } -{ - \newcommand*{\glsxtrtitleorpdforheading}[3]{#1} +% \end{macrocode} +%\end{abbrvstyle} +% +% +%\begin{macro}{\glsxtrshortdescname} +%\changes{1.17}{2017-08-09}{new} +%\changes{1.39}{2019-03-22}{corrected to show long form as advertised in the +%manual} +% \begin{macrocode} +\newcommand*{\glsxtrshortdescname}{% + \glsxpabbrvfont{\the\glsshorttok}{\glscategorylabel}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \protect\glsxtrparen{\glsxplongfont{\the\glslongtok}{\glscategorylabel}}% } % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrmarkhook} -% Hook used in new definition of \cs{markboth} and \cs{markright} -% to make some changes to apply to the marks: +%\begin{abbrvstyle}{short-desc} +% The user must supply the description in this style. The long form +% is added to the name. The \abbrstyle{short} style (possibly with the +% post-description hooks set) might be a better option. +%\changes{1.01}{2016-02-02}{fixed typo in +%\cs{glsxtrinlinefullformat} and added missing second argument} +%\changes{1.39}{2019-03-22}{corrected to omit \gloskey{description} key as advertised in the +%manual} % \begin{macrocode} -\newcommand*{\glsxtrmarkhook}{% +\newabbreviationstyle{short-desc}% +{% % \end{macrocode} -% Save current definitions: +% Set accessibility attributes if enabled. % \begin{macrocode} - \let\@glsxtr@org@MakeUppercase\MakeUppercase - \let\@glsxtr@org@glsxtrtitleorpdforheading\glsxtrtitleorpdforheading - \let\@glsxtr@org@glsxtrtitleshort\glsxtrtitleshort - \let\@glsxtr@org@glsxtrtitleshortpl\glsxtrtitleshortpl - \let\@glsxtr@org@Glsxtrtitleshort\Glsxtrtitleshort - \let\@glsxtr@org@Glsxtrtitleshortpl\Glsxtrtitleshortpl - \let\@glsxtr@org@glsxtrtitlename\glsxtrtitlename - \let\@glsxtr@org@Glsxtrtitlename\Glsxtrtitlename - \let\@glsxtr@org@glsxtrtitletext\glsxtrtitletext - \let\@glsxtr@org@Glsxtrtitletext\Glsxtrtitletext - \let\@glsxtr@org@glsxtrtitleplural\glsxtrtitleplural - \let\@glsxtr@org@Glsxtrtitleplural\Glsxtrtitleplural - \let\@glsxtr@org@glsxtrtitlefirst\glsxtrtitlefirst - \let\@glsxtr@org@Glsxtrtitlefirst\Glsxtrtitlefirst - \let\@glsxtr@org@glsxtrtitlefirstplural\glsxtrtitlefirstplural - \let\@glsxtr@org@Glsxtrtitlefirstplural\Glsxtrtitlefirstplural - \let\@glsxtr@org@glsxtrtitlelong\glsxtrtitlelong - \let\@glsxtr@org@glsxtrtitlelongpl\glsxtrtitlelongpl - \let\@glsxtr@org@Glsxtrtitlelong\Glsxtrtitlelong - \let\@glsxtr@org@Glsxtrtitlelongpl\Glsxtrtitlelongpl - \let\@glsxtr@org@glsxtrtitlefull\glsxtrtitlefull - \let\@glsxtr@org@glsxtrtitlefullpl\glsxtrtitlefullpl - \let\@glsxtr@org@Glsxtrtitlefull\Glsxtrtitlefull - \let\@glsxtr@org@Glsxtrtitlefullpl\Glsxtrtitlefullpl + \glsxtrAccSuppAbbrSetNoLongAttrs\glscategorylabel % \end{macrocode} -% New definitions +% Setup the default fields. % \begin{macrocode} - \let\glsxtrifinmark\@firstoftwo - \let\MakeUppercase\MakeTextUppercase - \let\glsxtrtitleorpdforheading\@thirdofthree - \let\glsxtrtitleshort\glsxtrheadshort - \let\glsxtrtitleshortpl\glsxtrheadshortpl - \let\Glsxtrtitleshort\Glsxtrheadshort - \let\Glsxtrtitleshortpl\Glsxtrheadshortpl - \let\glsxtrtitlename\glsxtrheadname - \let\Glsxtrtitlename\Glsxtrheadname - \let\glsxtrtitletext\glsxtrheadtext - \let\Glsxtrtitletext\Glsxtrheadtext - \let\glsxtrtitleplural\glsxtrheadplural - \let\Glsxtrtitleplural\Glsxtrheadplural - \let\glsxtrtitlefirst\glsxtrheadfirst - \let\Glsxtrtitlefirst\Glsxtrheadfirst - \let\glsxtrtitlefirstplural\glsxtrheadfirstplural - \let\Glsxtrtitlefirstplural\Glsxtrheadfirstplural - \let\glsxtrtitlelong\glsxtrheadlong - \let\glsxtrtitlelongpl\glsxtrheadlongpl - \let\Glsxtrtitlelong\Glsxtrheadlong - \let\Glsxtrtitlelongpl\Glsxtrheadlongpl - \let\glsxtrtitlefull\glsxtrheadfull - \let\glsxtrtitlefullpl\glsxtrheadfullpl - \let\Glsxtrtitlefull\Glsxtrheadfull - \let\Glsxtrtitlefullpl\Glsxtrheadfullpl -} + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrshortdescname}, + sort={\the\glsshorttok}, + first={\glsfirstxpabbrvfont{\the\glsshorttok}{\glscategorylabel}}, + firstplural={\glsfirstxpabbrvfont{\the\glsshortpltok}{\glscategorylabel}}, + text={\glsxpabbrvfont{\the\glsshorttok}{\glscategorylabel}}, + plural={\glsxpabbrvfont{\the\glsshortpltok}{\glscategorylabel}}}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glssetattribute{\the\glslabeltok}{regular}{true}}% +}% +{% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\glsxtrrestoremarkhook} -% Hook used in new definition of \cs{markboth} and \cs{markright} -% to restore the modified definitions. (This is in case the original -% \cs{markboth} and \cs{markright} shouldn't be grouped for some -% reason. There already is some grouping within those original -% definitions, but some of the code lies outside that grouping, and -% possibly there's a reason for it.) +% In case the user wants to mix and match font styles, these are +% redefined here. % \begin{macrocode} -\newcommand*{\glsxtrrestoremarkhook}{% - \let\glsxtrifinmark\@secondoftwo - \let\MakeUppercase\@glsxtr@org@MakeUppercase - \let\glsxtrtitleorpdforheading\@glsxtr@org@glsxtrtitleorpdforheading - \let\glsxtrtitleshort\@glsxtr@org@glsxtrtitleshort - \let\glsxtrtitleshortpl\@glsxtr@org@glsxtrtitleshortpl - \let\Glsxtrtitleshort\@glsxtr@org@Glsxtrtitleshort - \let\Glsxtrtitleshortpl\@glsxtr@org@Glsxtrtitleshortpl - \let\glsxtrtitlename\@glsxtr@org@glsxtrtitlename - \let\Glsxtrtitlename\@glsxtr@org@Glsxtrtitlename - \let\glsxtrtitletext\@glsxtr@org@glsxtrtitletext - \let\Glsxtrtitletext\@glsxtr@org@Glsxtrtitletext - \let\glsxtrtitleplural\@glsxtr@org@glsxtrtitleplural - \let\Glsxtrtitleplural\@glsxtr@org@Glsxtrtitleplural - \let\glsxtrtitlefirst\@glsxtr@org@glsxtrtitlefirst - \let\Glsxtrtitlefirst\@glsxtr@org@Glsxtrtitlefirst - \let\glsxtrtitlefirstplural\@glsxtr@org@glsxtrtitlefirstplural - \let\Glsxtrtitlefirstplural\@glsxtr@org@Glsxtrtitlefirstplural - \let\glsxtrtitlelong\@glsxtr@org@glsxtrtitlelong - \let\glsxtrtitlelongpl\@glsxtr@org@glsxtrtitlelongpl - \let\Glsxtrtitlelong\@glsxtr@org@Glsxtrtitlelong - \let\Glsxtrtitlelongpl\@glsxtr@org@Glsxtrtitlelongpl - \let\glsxtrtitlefull\@glsxtr@org@glsxtrtitlefull - \let\glsxtrtitlefullpl\@glsxtr@org@glsxtrtitlefullpl - \let\Glsxtrtitlefull\@glsxtr@org@Glsxtrtitlefull - \let\Glsxtrtitlefullpl\@glsxtr@org@Glsxtrtitlefullpl -} + \renewcommand*{\abbrvpluralsuffix}{\glsxtrabbrvpluralsuffix}% + \renewcommand*\glsabbrvfont[1]{\glsabbrvdefaultfont{##1}}% + \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvdefaultfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslongdefaultfont{##1}}% % \end{macrocode} -%\end{macro} -% -%\changes{0.5.1}{2015-12-07}{removed \cs{ifglsxtruseuchead}} -% Instead of using one document-wide conditional, use -% \catattr{headuc} attribute to determine whether or not to use the -% all upper case form. -% -%\begin{macro}{\glsxtrheadshort} -% Command used to display short form in the page header. -%\changes{0.5.1}{2015-12-07}{now uses headuc attribute} +% The inline full form displays the short format followed by the +% long form in parentheses. % \begin{macrocode} -\newcommand*{\glsxtrheadshort}[1]{% - \protect\NoCaseChange - {% - \glsifattribute{#1}{headuc}{true}% - {% - \GLSxtrshort[noindex,hyper=false]{#1}[]% - }% - {% - \glsxtrshort[noindex,hyper=false]{#1}[]% - }% - }% -} + \renewcommand*{\glsxtrinlinefullformat}[2]{% + \glsxtrshortlongformat{##1}{##2}% + {\glsfirstlongfont}{\glsfirstabbrvfont}% + }% + \renewcommand*{\glsxtrinlinefullplformat}[2]{% + \glsxtrshortlongplformat{##1}{##2}% + {\glsfirstlongfont}{\glsfirstabbrvfont}% + }% + \renewcommand*{\Glsxtrinlinefullformat}[2]{% + \Glsxtrshortlongformat{##1}{##2}% + {\glsfirstlongfont}{\glsfirstabbrvfont}% + }% + \renewcommand*{\Glsxtrinlinefullplformat}[2]{% + \Glsxtrshortlongplformat{##1}{##2}% + {\glsfirstlongfont}{\glsfirstabbrvfont}% + }% + \renewcommand*{\GLSxtrinlinefullformat}[2]{% + \GLSxtrshortlongformat{##1}{##2}% + {\glsfirstlongfont}{\glsfirstabbrvfont}% + }% + \renewcommand*{\GLSxtrinlinefullplformat}[2]{% + \GLSxtrshortlongplformat{##1}{##2}% + {\glsfirstlongfont}{\glsfirstabbrvfont}% + }% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\glsxtrtitleshort} -% Command to display short form of abbreviation in section title and -% table of contents. +% The first use full form only displays the short form, but it +% typically won't be used as the \catattr{regular} attribute is set by this style. % \begin{macrocode} -\newrobustcmd*{\glsxtrtitleshort}[1]{% - \glsxtrshort[noindex,hyper=false]{#1}[]% + \renewcommand*{\glsxtrfullformat}[2]{% + \glsxtrshortformat{##1}{##2}{\glsfirstabbrvfont}% + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsxtrshortplformat{##1}{##2}{\glsfirstabbrvfont}% + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \Glsxtrshortformat{##1}{##2}{\glsfirstabbrvfont}% + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \Glsxtrshortplformat{##1}{##2}{\glsfirstabbrvfont}% + }% + \renewcommand*{\GLSxtrfullformat}[2]{% + \GLSxtrshortformat{##1}{##2}{\glsfirstabbrvfont}% + }% + \renewcommand*{\GLSxtrfullplformat}[2]{% + \GLSxtrshortplformat{##1}{##2}{\glsfirstabbrvfont}% + }% } % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\glsxtrheadshortpl} -% Command used to display plural short form in the page header. -% If you want the text converted to upper case, this needs to be -% redefined to use \cs{GLSxtrshortpl} instead. If you are using a -% smallcaps style, the default fonts don't provide italic smallcaps. -%\changes{0.5.1}{2015-12-07}{now uses headuc attribute} +%\end{abbrvstyle} +%\begin{abbrvstyle}{short-nolong-desc} +%\changes{1.04}{2016-05-02}{new} % \begin{macrocode} -\newcommand*{\glsxtrheadshortpl}[1]{% - \protect\NoCaseChange - {% - \glsifattribute{#1}{headuc}{true}% - {% - \GLSxtrshortpl[noindex,hyper=false]{#1}[]% - }% - {% - \glsxtrshortpl[noindex,hyper=false]{#1}[]% - }% - }% -} +\letabbreviationstyle{short-nolong-desc}{short-desc} % \end{macrocode} -%\end{macro} +%\end{abbrvstyle} % -%\begin{macro}{\glsxtrtitleshortpl} -% Command to display plural short form of abbreviation in section title and -% table of contents. -%\changes{1.03}{2016-04-27}{bug fix: changed \cs{glsxtrshort} to -%\cs{glsxtrshortpl}} +%\begin{abbrvstyle}{short-nolong-desc-noreg} +%\changes{1.17}{2017-08-09}{new} +% Like \abbrstyle{short-nolong-desc} but doesn't set the \catattr{regular} attribute. % \begin{macrocode} -\newrobustcmd*{\glsxtrtitleshortpl}[1]{% - \glsxtrshortpl[noindex,hyper=false]{#1}[]% -} +\newabbreviationstyle{short-nolong-desc-noreg}% +{% + \GlsXtrUseAbbrStyleSetup{short-nolong-desc}% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\Glsxtrheadshort} -% Command used to display short form in the page header with the -% first letter converted to upper case. -%\changes{0.5.1}{2015-12-07}{now uses headuc attribute} +% Unset the \catattr{regular} attribute if it has been set. % \begin{macrocode} -\newcommand*{\Glsxtrheadshort}[1]{% - \protect\NoCaseChange - {% - \glsifattribute{#1}{headuc}{true}% - {% - \GLSxtrshort[noindex,hyper=false]{#1}[]% - }% - {% - \Glsxtrshort[noindex,hyper=false]{#1}[]% - }% - }% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% + \GlsXtrUseAbbrStyleFmts{short-nolong-desc}% } % \end{macrocode} -%\end{macro} +%\end{abbrvstyle} % -%\begin{macro}{\Glsxtrtitleshort} -% Command to display short form of abbreviation in section title and -% table of contents with the first letter converted to upper case. +%\begin{abbrvstyle}{nolong-short} +% Similar to \abbrstyle{short-nolong} but the full form shows the +% long form followed by the short form in parentheses. +%\changes{1.21}{2017-11-03}{new} % \begin{macrocode} -\newrobustcmd*{\Glsxtrtitleshort}[1]{% - \Glsxtrshort[noindex,hyper=false]{#1}[]% -} +\newabbreviationstyle{nolong-short}% +{% + \GlsXtrUseAbbrStyleSetup{short-nolong}% +}% +{% + \GlsXtrUseAbbrStyleFmts{short-nolong}% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\GLSxtrtitleshort} -%\changes{1.42}{2020-02-03}{new} -% Command to display short form of abbreviation in section title and -% table of contents in all upper case. +% The inline full form displays the long form followed by the +% short form in parentheses. % \begin{macrocode} -\newrobustcmd*{\GLSxtrtitleshort}[1]{% - \GLSxtrshort[noindex,hyper=false]{#1}[]% + \renewcommand*{\glsxtrinlinefullformat}[2]{% + \glsxtrlongshortformat{##1}{##2}% + {\glsfirstlongfont}{\glsfirstabbrvfont}% + }% + \renewcommand*{\glsxtrinlinefullplformat}[2]{% + \glsxtrlongshortplformat{##1}{##2}% + {\glsfirstlongfont}{\glsfirstabbrvfont}% + }% + \renewcommand*{\Glsxtrinlinefullformat}[2]{% + \Glsxtrlongshortformat{##1}{##2}% + {\glsfirstlongfont}{\glsfirstabbrvfont}% + }% + \renewcommand*{\Glsxtrinlinefullplformat}[2]{% + \Glsxtrlongshortplformat{##1}{##2}% + {\glsfirstlongfont}{\glsfirstabbrvfont}% + }% + \renewcommand*{\GLSxtrinlinefullformat}[2]{% + \GLSxtrlongshortformat{##1}{##2}% + {\glsfirstlongfont}{\glsfirstabbrvfont}% + }% + \renewcommand*{\GLSxtrinlinefullplformat}[2]{% + \GLSxtrlongshortplformat{##1}{##2}% + {\glsfirstlongfont}{\glsfirstabbrvfont}% + }% } % \end{macrocode} -%\end{macro} +%\end{abbrvstyle} % -%\begin{macro}{\Glsxtrheadshortpl} -% Command used to display plural short form in the page header with the -% first letter converted to upper case. -%\changes{0.5.1}{2015-12-07}{now uses headuc attribute} +%\begin{abbrvstyle}{nolong-short-noreg} +%\changes{1.21}{2017-11-03}{new} +% Like \abbrstyle{nolong-short} but doesn't set the \catattr{regular} attribute. % \begin{macrocode} -\newcommand*{\Glsxtrheadshortpl}[1]{% - \protect\NoCaseChange - {% - \glsifattribute{#1}{headuc}{true}% - {% - \GLSxtrshortpl[noindex,hyper=false]{#1}[]% - }% - {% - \Glsxtrshortpl[noindex,hyper=false]{#1}[]% - }% - }% -} +\newabbreviationstyle{nolong-short-noreg}% +{% + \GlsXtrUseAbbrStyleSetup{nolong-short}% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\Glsxtrtitleshortpl} -% Command to display plural short form of abbreviation in section title and -% table of contents with the first letter converted to upper case. +% Unset the \catattr{regular} attribute if it has been set. % \begin{macrocode} -\newrobustcmd*{\Glsxtrtitleshortpl}[1]{% - \Glsxtrshortpl[noindex,hyper=false]{#1}[]% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% + \GlsXtrUseAbbrStyleFmts{nolong-short}% } % \end{macrocode} -%\end{macro} +%\end{abbrvstyle} % -%\begin{macro}{\GLSxtrtitleshortpl} -%\changes{1.42}{2020-02-03}{new} -% Command to display plural short form of abbreviation in section title and -% table of contents in all upper case. +%\begin{macro}{\glsxtrlongnoshortdescname} +%\changes{1.25}{2017-11-24}{new} % \begin{macrocode} -\newrobustcmd*{\GLSxtrtitleshortpl}[1]{% - \GLSxtrshortpl[noindex,hyper=false]{#1}[]% +\newcommand*{\glsxtrlongnoshortdescname}{% + \glsxplongfont{\the\glslongtok}{\glscategorylabel}% } % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrheadname} -% As above but for the \gloskey{name} value. -%\changes{1.21}{2017-11-03}{new} +%\begin{abbrvstyle}{long-desc} +% Provide a style that only displays the long form, +% but the long and short form can be displayed with the \qt{full} +% commands that use the inline format. The predefined glossary styles +% won't show the short form. The user must supply a description for +% this style. The accessibility attributes don't need setting here. % \begin{macrocode} -\newcommand*{\glsxtrheadname}[1]{% - \protect\NoCaseChange - {% - \glsifattribute{#1}{headuc}{true}% - {% - \GLSname[noindex,hyper=false]{#1}[]% - }% - {% - \glsname[noindex,hyper=false]{#1}[]% - }% - }% -} +\newabbreviationstyle{long-desc}% +{% + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrlongnoshortdescname}, + sort={\the\glslongtok}, + first={\glsfirstxplongfont{\the\glslongtok}{\glscategorylabel}}, + firstplural={\glsfirstxplongfont{\the\glslongpltok}{\glscategorylabel}}, + text={\glsxplongfont{\the\glslongtok}{\glscategorylabel}}, + plural={\glsxplongfont{\the\glslongpltok}{\glscategorylabel}}% + }% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glssetattribute{\the\glslabeltok}{regular}{true}}% +}% +{% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\glsxtrtitlename} -% Command to display \gloskey{name} value in section title and -% table of contents. -%\changes{1.21}{2017-11-03}{new} +% In case the user wants to mix and match font styles, these are +% redefined here. % \begin{macrocode} -\newrobustcmd*{\glsxtrtitlename}[1]{% - \glsname[noindex,hyper=false]{#1}[]% -} + \renewcommand*{\abbrvpluralsuffix}{\glsxtrabbrvpluralsuffix}% + \renewcommand*\glsabbrvfont[1]{\glsabbrvdefaultfont{##1}}% + \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvdefaultfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslongdefaultfont{##1}}% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\Glsxtrheadname} -% First letter converted to upper case -%\changes{1.21}{2017-11-03}{new} +% The format for subsequent use (not used when the regular attribute +% is set). % \begin{macrocode} -\newcommand*{\Glsxtrheadname}[1]{% - \protect\NoCaseChange - {% - \glsifattribute{#1}{headuc}{true}% - {% - \GLSname[noindex,hyper=false]{#1}[]% - }% - {% - \Glsname[noindex,hyper=false]{#1}[]% - }% - }% -} + \renewcommand*{\glsxtrsubsequentfmt}[2]{% + \glsxtrlongformat{##1}{##2}{\glslongfont}% + }% + \renewcommand*{\glsxtrsubsequentplfmt}[2]{% + \glsxtrlongplformat{##1}{##2}{\glslongfont}% + }% + \renewcommand*{\Glsxtrsubsequentfmt}[2]{% + \Glsxtrlongformat{##1}{##2}{\glslongfont}% + }% + \renewcommand*{\Glsxtrsubsequentplfmt}[2]{% + \Glsxtrlongplformat{##1}{##2}{\glslongfont}% + }% + \renewcommand*{\GLSxtrsubsequentfmt}[2]{% + \GLSxtrlongformat{##1}{##2}{\glslongfont}% + }% + \renewcommand*{\GLSxtrsubsequentplfmt}[2]{% + \GLSxtrlongplformat{##1}{##2}{\glslongfont}% + }% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\Glsxtrtitlename} -% Command to display \gloskey{name} value in section title and -% table of contents with the first letter changed to upper case. -%\changes{1.21}{2017-11-03}{new} +% The inline full form displays the long format followed by the +% short form in parentheses. % \begin{macrocode} -\newrobustcmd*{\Glsxtrtitlename}[1]{% - \Glsname[noindex,hyper=false]{#1}[]% -} + \renewcommand*{\glsxtrinlinefullformat}[2]{% + \glsxtrlongshortformat{##1}{##2}% + {\glsfirstlongfont}{\glsfirstabbrvfont}% + }% + \renewcommand*{\glsxtrinlinefullplformat}[2]{% + \glsxtrlongshortplformat{##1}{##2}% + {\glsfirstlongfont}{\glsfirstabbrvfont}% + }% + \renewcommand*{\Glsxtrinlinefullformat}[2]{% + \Glsxtrlongshortformat{##1}{##2}% + {\glsfirstlongfont}{\glsfirstabbrvfont}% + }% + \renewcommand*{\Glsxtrinlinefullplformat}[2]{% + \Glsxtrlongshortplformat{##1}{##2}% + {\glsfirstlongfont}{\glsfirstabbrvfont}% + }% + \renewcommand*{\GLSxtrinlinefullformat}[2]{% + \GLSxtrlongshortformat{##1}{##2}% + {\glsfirstlongfont}{\glsfirstabbrvfont}% + }% + \renewcommand*{\GLSxtrinlinefullplformat}[2]{% + \GLSxtrlongshortplformat{##1}{##2}% + {\glsfirstlongfont}{\glsfirstabbrvfont}% + }% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\GLSxtrtitlename} -% Command to display \gloskey{name} value in section title and -% table of contents in all upper case. -%\changes{1.42}{2020-02-03}{new} +% The first use full form only displays the long form, but it +% typically won't be used as the \catattr{regular} attribute is set by this style. % \begin{macrocode} -\newrobustcmd*{\GLSxtrtitlename}[1]{% - \GLSname[noindex,hyper=false]{#1}[]% + \renewcommand*{\glsxtrfullformat}[2]{% + \glsxtrlongformat{##1}{##2}{\glsfirstlongfont}% + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsxtrlongplformat{##1}{##2}{\glsfirstlongfont}% + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \Glsxtrlongformat{##1}{##2}{\glsfirstlongfont}% + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \Glsxtrlongplformat{##1}{##2}{\glsfirstlongfont}% + }% + \renewcommand*{\GLSxtrfullformat}[2]{% + \GLSxtrlongformat{##1}{##2}{\glsfirstlongfont}% + }% + \renewcommand*{\GLSxtrfullplformat}[2]{% + \GLSxtrlongplformat{##1}{##2}{\glsfirstlongfont}% + }% } % \end{macrocode} -%\end{macro} +%\end{abbrvstyle} +%\begin{abbrvstyle}{long-noshort-desc} +%\changes{1.04}{2016-05-02}{new} +%Provide a synonym that matches similar styles. +% \begin{macrocode} +\letabbreviationstyle{long-noshort-desc}{long-desc} +% \end{macrocode} +%\end{abbrvstyle} % -%\begin{macro}{\glsxtrheadtext} -% As above but for the \gloskey{text} value. -%\changes{0.5.1}{2015-12-07}{now uses headuc attribute} +%\begin{abbrvstyle}{long-noshort-desc-noreg} +%\changes{1.17}{2017-08-09}{new} +% Like long-noshort-desc but doesn't set the \catattr{regular} attribute. % \begin{macrocode} -\newcommand*{\glsxtrheadtext}[1]{% - \protect\NoCaseChange - {% - \glsifattribute{#1}{headuc}{true}% - {% - \GLStext[noindex,hyper=false]{#1}[]% - }% - {% - \glstext[noindex,hyper=false]{#1}[]% - }% - }% +\newabbreviationstyle{long-noshort-desc-noreg}% +{% + \GlsXtrUseAbbrStyleSetup{long-noshort-desc}% +% \end{macrocode} +% Unset the \catattr{regular} attribute if it has been set. +% \begin{macrocode} + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% + \GlsXtrUseAbbrStyleFmts{long-noshort-desc}% } % \end{macrocode} -%\end{macro} +%\end{abbrvstyle} % -%\begin{macro}{\glsxtrtitletext} -% Command to display \gloskey{text} value in section title and -% table of contents. +%\begin{macro}{\glsxtrlongnoshortname} +%\changes{1.25}{2017-11-24}{new} % \begin{macrocode} -\newrobustcmd*{\glsxtrtitletext}[1]{% - \glstext[noindex,hyper=false]{#1}[]% +\newcommand*{\glsxtrlongnoshortname}{% + \glsxpabbrvfont{\the\glsshorttok}{\glscategorylabel}% } % \end{macrocode} %\end{macro} % -% -%\begin{macro}{\Glsxtrheadtext} -% First letter converted to upper case -%\changes{0.5.1}{2015-12-07}{now uses headuc attribute} +%\begin{abbrvstyle}{long} +% It doesn't really make a great deal of sense to have a long-only +% style that doesn't have a description (unless no glossary is +% required), but the best course of +% action here is to use the short form as the name and the long +% form as the description. % \begin{macrocode} -\newcommand*{\Glsxtrheadtext}[1]{% - \protect\NoCaseChange - {% - \glsifattribute{#1}{headuc}{true}% - {% - \GLStext[noindex,hyper=false]{#1}[]% - }% - {% - \Glstext[noindex,hyper=false]{#1}[]% - }% - }% -} +\newabbreviationstyle{long}% +{% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\Glsxtrtitletext} -% Command to display \gloskey{text} value in section title and -% table of contents with the first letter changed to upper case. +% Set accessibility attributes if enabled. % \begin{macrocode} -\newrobustcmd*{\Glsxtrtitletext}[1]{% - \Glstext[noindex,hyper=false]{#1}[]% -} + \glsxtrAccSuppAbbrSetNameShortAttrs\glscategorylabel % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\GLSxtrtitletext} -% Command to display \gloskey{text} value in section title and -% table of contents in all upper case. -%\changes{1.42}{2020-02-03}{new} +% Setup the default fields. % \begin{macrocode} -\newrobustcmd*{\GLSxtrtitletext}[1]{% - \GLStext[noindex,hyper=false]{#1}[]% + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrlongnoshortname}, + sort={\the\glsshorttok}, + first={\glsfirstxplongfont{\the\glslongtok}{\glscategorylabel}}, + firstplural={\glsfirstxplongfont{\the\glslongpltok}{\glscategorylabel}}, + text={\glsxplongfont{\the\glslongtok}{\glscategorylabel}}, + plural={\glsxplongfont{\the\glslongpltok}{\glscategorylabel}},% + description={\the\glslongtok}% + }% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glssetattribute{\the\glslabeltok}{regular}{true}}% +}% +{% + \GlsXtrUseAbbrStyleFmts{long-desc}% } % \end{macrocode} -%\end{macro} +%\end{abbrvstyle} % -%\begin{macro}{\glsxtrheadplural} -% As above but for the \gloskey{plural} value. -%\changes{0.5.1}{2015-12-07}{now uses headuc attribute} +%\begin{abbrvstyle}{long-noshort} +%\changes{1.04}{2016-05-02}{new} +%Provide a synonym that matches similar styles. % \begin{macrocode} -\newcommand*{\glsxtrheadplural}[1]{% - \protect\NoCaseChange - {% - \glsifattribute{#1}{headuc}{true}% - {% - \GLSplural[noindex,hyper=false]{#1}[]% - }% - {% - \glsplural[noindex,hyper=false]{#1}[]% - }% - }% -} +\letabbreviationstyle{long-noshort}{long} % \end{macrocode} -%\end{macro} +%\end{abbrvstyle} % -%\begin{macro}{\glsxtrtitleplural} -% Command to display \gloskey{plural} value in section title and -% table of contents. +%\begin{abbrvstyle}{long-noshort-noreg} +%\changes{1.17}{2017-08-09}{new} +% Like long-noshort but doesn't set the \catattr{regular} attribute. % \begin{macrocode} -\newrobustcmd*{\glsxtrtitleplural}[1]{% - \glsplural[noindex,hyper=false]{#1}[]% -} +\newabbreviationstyle{long-noshort-noreg}% +{% + \GlsXtrUseAbbrStyleSetup{long-noshort}% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\Glsxtrheadplural} -% Convert first letter to upper case. -%\changes{0.5.1}{2015-12-07}{now uses headuc attribute} +% Unset the \catattr{regular} attribute if it has been set. % \begin{macrocode} -\newcommand*{\Glsxtrheadplural}[1]{% - \protect\NoCaseChange - {% - \glsifattribute{#1}{headuc}{true}% - {% - \GLSplural[noindex,hyper=false]{#1}[]% - }% - {% - \Glsplural[noindex,hyper=false]{#1}[]% - }% - }% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% + \GlsXtrUseAbbrStyleFmts{long-noshort}% } % \end{macrocode} -%\end{macro} +%\end{abbrvstyle} % -%\begin{macro}{\Glsxtrtitleplural} -% Command to display \gloskey{plural} value in section title and -% table of contents with the first letter changed to upper case. +%\subsection{Predefined Styles (Small Capitals)} +%These styles use \cs{textsc} for the short form. +%\begin{macro}{\glsxtrscfont} +%\changes{0.5}{2015-12-07}{new} +%Maintained for backward-compatibility. % \begin{macrocode} -\newrobustcmd*{\Glsxtrtitleplural}[1]{% - \Glsplural[noindex,hyper=false]{#1}[]% -} +\newcommand*{\glsxtrscfont}[1]{\textsc{#1}} % \end{macrocode} %\end{macro} -% -%\begin{macro}{\GLSxtrtitleplural} -%\changes{1.42}{2020-02-03}{new} -% Command to display \gloskey{plural} value in section title and -% table of contents in all upper case. +%\begin{macro}{\glsabbrvscfont} +%\changes{1.17}{2017-08-09}{new} +%Added for consistent naming. % \begin{macrocode} -\newrobustcmd*{\GLSxtrtitleplural}[1]{% - \GLSplural[noindex,hyper=false]{#1}[]% -} +\newcommand*{\glsabbrvscfont}{\glsxtrscfont} % \end{macrocode} %\end{macro} -% -%\begin{macro}{\glsxtrheadfirst} -% As above but for the \gloskey{first} value. -%\changes{0.5.1}{2015-12-07}{now uses headuc attribute} +%\begin{macro}{\glsxtrfirstscfont} +%\changes{1.04}{2016-05-02}{new} +%Maintained for backward-compatibility. % \begin{macrocode} -\newcommand*{\glsxtrheadfirst}[1]{% - \protect\NoCaseChange - {% - \glsifattribute{#1}{headuc}{true}% - {% - \GLSfirst[noindex,hyper=false]{#1}[]% - }% - {% - \glsfirst[noindex,hyper=false]{#1}[]% - }% - }% -} +\newcommand*{\glsxtrfirstscfont}[1]{\glsabbrvscfont{#1}} % \end{macrocode} %\end{macro} -% -%\begin{macro}{\glsxtrtitlefirst} -% Command to display \gloskey{first} value in section title and -% table of contents. +%\begin{macro}{\glsfirstabbrvscfont} +%\changes{1.17}{2017-08-09}{new} +%Added for consistent naming. % \begin{macrocode} -\newrobustcmd*{\glsxtrtitlefirst}[1]{% - \glsfirst[noindex,hyper=false]{#1}[]% -} +\newcommand*{\glsfirstabbrvscfont}{\glsxtrfirstscfont} % \end{macrocode} %\end{macro} -% -%\begin{macro}{\Glsxtrheadfirst} -% First letter converted to upper case -%\changes{0.5.1}{2015-12-07}{now uses headuc attribute} +% and for the default short form suffix: +%\begin{macro}{\glsxtrscsuffix} +%\changes{0.5}{2015-12-07}{new} +%\changes{1.42}{2020-02-03}{added \cs{protect}} +%\cs{protect} needs to come inside \cs{glsxtrscsuffix} to avoid +%interfering with all caps. % \begin{macrocode} -\newcommand*{\Glsxtrheadfirst}[1]{% - \protect\NoCaseChange - {% - \glsifattribute{#1}{headuc}{true}% - {% - \GLSfirst[noindex,hyper=false]{#1}[]% - }% - {% - \Glsfirst[noindex,hyper=false]{#1}[]% - }% - }% -} +\newcommand*{\glsxtrscsuffix}{\protect\glstextup{\glsxtrabbrvpluralsuffix}} % \end{macrocode} %\end{macro} % -%\begin{macro}{\Glsxtrtitlefirst} -% Command to display \gloskey{first} value in section title and -% table of contents with the first letter changed to upper case. +%\begin{macro}{\glsxtrscrevert} +%\changes{1.49}{??}{new} +%Cancel smallcaps. % \begin{macrocode} -\newrobustcmd*{\Glsxtrtitlefirst}[1]{% - \Glsfirst[noindex,hyper=false]{#1}[]% -} +\newcommand*{\glsxtrscrevert}[1]{\glstextup{#1}}% % \end{macrocode} %\end{macro} % -%\begin{macro}{\GLSxtrtitlefirst} -%\changes{1.42}{2020-02-03}{new} -% Command to display \gloskey{first} value in section title and -% table of contents in all upper case. +%v1.49: the following now use commands like +%\cs{glsfirstinnerfmtabbrvfont} instead of +%\cs{glsfirstabbrvscfont} etc. This makes it easier to apply the inner +%formatting. The scoping added in v1.48 with \cs{glslinkwrcontent} +%should prevent formatting leakage in the event of nested commands. +%The only problem will be if commands like \cs{glsentryfirst} are +%used, but those aren't designed for consistent formatting. It will +%also make it easier to locally redefine \cs{glsfirstinnerfmtabbrvfont} +%to strip the formatting if those commands are used (rather than +%having to define all the possible abbreviation style formatting +%commands). Since these new commands are robust they don't need +%protecting. +% +%\begin{abbrvstyle}{long-short-sc} +%\changes{1.42}{2020-02-03}{added missing text key} % \begin{macrocode} -\newrobustcmd*{\GLSxtrtitlefirst}[1]{% - \GLSfirst[noindex,hyper=false]{#1}[]% -} +\newabbreviationstyle{long-short-sc}% +{% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\glsxtrheadfirstplural} -% As above but for the \gloskey{firstplural} value. -%\changes{0.5.1}{2015-12-07}{now uses headuc attribute} +% Set accessibility attributes if enabled. % \begin{macrocode} -\newcommand*{\glsxtrheadfirstplural}[1]{% - \protect\NoCaseChange - {% - \glsifattribute{#1}{headuc}{true}% - {% - \GLSfirstplural[noindex,hyper=false]{#1}[]% - }% - {% - \glsfirstplural[noindex,hyper=false]{#1}[]% - }% - }% -} + \glsxtrAccSuppAbbrSetFirstLongAttrs\glscategorylabel % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\glsxtrtitlefirstplural} -% Command to display \gloskey{firstplural} value in section title and -% table of contents. +% Setup the default fields. % \begin{macrocode} -\newrobustcmd*{\glsxtrtitlefirstplural}[1]{% - \glsfirstplural[noindex,hyper=false]{#1}[]% -} + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrlongshortname}, + sort={\the\glsshorttok}, + first={\glsfirstxplongfont{\the\glslongtok}{\glscategorylabel}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \protect\glsxtrparen{\glsfirstxpabbrvfont{\the\glsshorttok}{\glscategorylabel}}},% + firstplural={\glsfirstxplongfont{\the\glslongpltok}{\glscategorylabel}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \protect\glsxtrparen{\glsfirstxpabbrvfont{\the\glsshortpltok}{\glscategorylabel}}},% + text={\glsxpabbrvfont{\the\glsshorttok}{\glscategorylabel}},% + plural={\glsxpabbrvfont{\the\glsshortpltok}{\glscategorylabel}},% + description={\the\glslongtok}}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glsxtrsetcomplexstyle{\the\glslabeltok}{3}% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\Glsxtrheadfirstplural} -% First letter converted to upper case -%\changes{0.5.1}{2015-12-07}{now uses headuc attribute} +% Use smallcaps and adjust the plural suffix to revert to upright. +%\changes{1.42}{2020-02-03}{moved \cs{protect} inside \cs{glsxtrscsuffix}} % \begin{macrocode} -\newcommand*{\Glsxtrheadfirstplural}[1]{% - \protect\NoCaseChange - {% - \glsifattribute{#1}{headuc}{true}% - {% - \GLSfirstplural[noindex,hyper=false]{#1}[]% - }% - {% - \Glsfirstplural[noindex,hyper=false]{#1}[]% - }% - }% -} + \renewcommand*{\abbrvpluralsuffix}{\glsxtrscsuffix}% + \renewcommand*\glsabbrvfont[1]{\glsabbrvscfont{##1}}% + \renewcommand*\glsfirstabbrvfont[1]{\glsfirstabbrvscfont{##1}}% + \renewcommand*\glsxtrrevert[1]{\glsxtrscrevert{##1}}% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\Glsxtrtitlefirstplural} -% Command to display \gloskey{first} value in section title and -% table of contents with the first letter changed to upper case. +% Use the default long fonts. % \begin{macrocode} -\newrobustcmd*{\Glsxtrtitlefirstplural}[1]{% - \Glsfirstplural[noindex,hyper=false]{#1}[]% -} + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslongdefaultfont{##1}}% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\GLSxtrtitlefirstplural} -%\changes{1.42}{2020-02-03}{new} -% Command to display \gloskey{first} value in section title and -% table of contents in all upper case. +% The first use full form and the inline full form are the same for +% this style. % \begin{macrocode} -\newrobustcmd*{\GLSxtrtitlefirstplural}[1]{% - \GLSfirstplural[noindex,hyper=false]{#1}[]% + \renewcommand*{\glsxtrfullformat}[2]{% + \glsxtrlongshortformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvscfont}% + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsxtrlongshortplformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvscfont}% + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \Glsxtrlongshortformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvscfont}% + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \Glsxtrlongshortplformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvscfont}% + }% + \renewcommand*{\GLSxtrfullformat}[2]{% + \GLSxtrlongshortformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvscfont}% + }% + \renewcommand*{\GLSxtrfullplformat}[2]{% + \GLSxtrlongshortplformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvscfont}% + }% } % \end{macrocode} -%\end{macro} +%\end{abbrvstyle} % -%\begin{macro}{\glsxtrheadlong} -% Command used to display long form in the page header. -%\changes{1.02}{2016-04-25}{new} +%\begin{abbrvstyle}{long-short-sc-desc} % \begin{macrocode} -\newcommand*{\glsxtrheadlong}[1]{% - \protect\NoCaseChange - {% - \glsifattribute{#1}{headuc}{true}% - {% - \GLSxtrlong[noindex,hyper=false]{#1}[]% - }% - {% - \glsxtrlong[noindex,hyper=false]{#1}[]% - }% - }% -} +\newabbreviationstyle{long-short-sc-desc}% +{% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\glsxtrtitlelong} -% Command to display long form of abbreviation in section title and -% table of contents. -%\changes{1.02}{2016-04-25}{new} +% Set accessibility attributes if enabled. % \begin{macrocode} -\newrobustcmd*{\glsxtrtitlelong}[1]{% - \glsxtrlong[noindex,hyper=false]{#1}[]% -} + \glsxtrAccSuppAbbrSetTextShortAttrs\glscategorylabel % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\glsxtrheadlongpl} -% Command used to display plural long form in the page header. -% If you want the text converted to upper case, this needs to be -% redefined to use \cs{GLSxtrlongpl} instead. If you are using a -% smallcaps style, the default fonts don't provide italic smallcaps. -%\changes{1.02}{2016-04-25}{new} +% Setup the default fields. % \begin{macrocode} -\newcommand*{\glsxtrheadlongpl}[1]{% - \protect\NoCaseChange - {% - \glsifattribute{#1}{headuc}{true}% - {% - \GLSxtrlongpl[noindex,hyper=false]{#1}[]% - }% - {% - \glsxtrlongpl[noindex,hyper=false]{#1}[]% - }% - }% -} + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrlongshortdescname}, + sort={\glsxtrlongshortdescsort},% + first={\glsfirstxplongfont{\the\glslongtok}{\glscategorylabel}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \protect\glsxtrparen{\glsfirstxpabbrvfont{\the\glsshorttok}{\glscategorylabel}}},% + firstplural={\glsfirstxplongfont{\the\glslongpltok}{\glscategorylabel}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \protect\glsxtrparen{\glsfirstxpabbrvfont{\the\glsshortpltok}{\glscategorylabel}}},% + text={\glsxpabbrvfont{\the\glsshorttok}{\glscategorylabel}},% + plural={\glsxpabbrvfont{\the\glsshortpltok}{\glscategorylabel}}% + }% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\glsxtrtitlelongpl} -% Command to display plural long form of abbreviation in section title and -% table of contents. -%\changes{1.02}{2016-04-25}{new} -%\changes{1.03}{2016-04-27}{bug fix: changed \cs{glsxtrlong} to -%\cs{glsxtrlongpl}} +%\changes{0.5.1}{2015-12-07}{switch off regular attribute if set} +% Unset the \catattr{regular} attribute if it has been set. % \begin{macrocode} -\newrobustcmd*{\glsxtrtitlelongpl}[1]{% - \glsxtrlongpl[noindex,hyper=false]{#1}[]% -} + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glsxtrsetcomplexstyle{\the\glslabeltok}{3}% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\Glsxtrheadlong} -% Command used to display long form in the page header with the -% first letter converted to upper case. -%\changes{1.02}{2016-04-25}{new} +% As long-short-sc style: % \begin{macrocode} -\newcommand*{\Glsxtrheadlong}[1]{% - \protect\NoCaseChange - {% - \glsifattribute{#1}{headuc}{true}% - {% - \GLSxtrlong[noindex,hyper=false]{#1}[]% - }% - {% - \Glsxtrlong[noindex,hyper=false]{#1}[]% - }% - }% + \GlsXtrUseAbbrStyleFmts{long-short-sc}% } % \end{macrocode} -%\end{macro} +%\end{abbrvstyle} % -%\begin{macro}{\Glsxtrtitlelong} -% Command to display long form of abbreviation in section title and -% table of contents with the first letter converted to upper case. -%\changes{1.02}{2016-04-25}{new} +%\begin{abbrvstyle}{short-sc-long} +% Now the short (long) version +%\changes{1.42}{2020-02-03}{added missing text key} % \begin{macrocode} -\newrobustcmd*{\Glsxtrtitlelong}[1]{% - \Glsxtrlong[noindex,hyper=false]{#1}[]% -} +\newabbreviationstyle{short-sc-long}% +{% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\GLSxtrtitlelong} -% Command to display long form of abbreviation in section title and -% table of contents in all upper case. -%\changes{1.42}{2020-02-03}{new} +% Set accessibility attributes if enabled. % \begin{macrocode} -\newrobustcmd*{\GLSxtrtitlelong}[1]{% - \GLSxtrlong[noindex,hyper=false]{#1}[]% -} + \glsxtrAccSuppAbbrSetFirstLongAttrs\glscategorylabel % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\Glsxtrheadlongpl} -% Command used to display plural long form in the page header with the -% first letter converted to upper case. -%\changes{1.02}{2016-04-25}{new} +% Setup the default fields. % \begin{macrocode} -\newcommand*{\Glsxtrheadlongpl}[1]{% - \protect\NoCaseChange - {% - \glsifattribute{#1}{headuc}{true}% - {% - \GLSxtrlongpl[noindex,hyper=false]{#1}[]% - }% - {% - \Glsxtrlongpl[noindex,hyper=false]{#1}[]% - }% - }% -} + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrshortlongname}, + sort={\the\glsshorttok}, + description={\the\glslongtok},% + first={\glsfirstxpabbrvfont{\the\glsshorttok}{\glscategorylabel}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \protect\glsxtrparen{\glsfirstxplongfont{\the\glslongtok}{\glscategorylabel}}},% + firstplural={\glsfirstxpabbrvfont{\the\glsshortpltok}{\glscategorylabel}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \protect\glsxtrparen{\glsfirstxplongfont{\the\glslongpltok}{\glscategorylabel}}},% + text={\glsxpabbrvfont{\the\glsshorttok}{\glscategorylabel}},% + plural={\glsxpabbrvfont{\the\glsshortpltok}{\glscategorylabel}}}% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\Glsxtrtitlelongpl} -% Command to display plural long form of abbreviation in section title and -% table of contents with the first letter converted to upper case. -%\changes{1.02}{2016-04-25}{new} +% Unset the \catattr{regular} attribute if it has been set. % \begin{macrocode} -\newrobustcmd*{\Glsxtrtitlelongpl}[1]{% - \Glsxtrlongpl[noindex,hyper=false]{#1}[]% -} + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glsxtrsetcomplexstyle{\the\glslabeltok}{3}% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\GLSxtrtitlelongpl} -% Command to display plural long form of abbreviation in section title and -% table of contents in all upper case. -%\changes{1.42}{2020-02-03}{new} +% Use smallcaps and adjust the plural suffix to revert to upright. +%\changes{1.42}{2020-02-03}{moved \cs{protect} inside \cs{glsxtrscsuffix}} % \begin{macrocode} -\newrobustcmd*{\GLSxtrtitlelongpl}[1]{% - \GLSxtrlongpl[noindex,hyper=false]{#1}[]% -} + \renewcommand*{\abbrvpluralsuffix}{\glsxtrscsuffix}% + \renewcommand*\glsabbrvfont[1]{\glsabbrvscfont{##1}}% + \renewcommand*\glsfirstabbrvfont[1]{\glsfirstabbrvscfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslongdefaultfont{##1}}% + \renewcommand*\glsxtrrevert[1]{\glsxtrscrevert{##1}}% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\glsxtrheadfull} -% Command used to display full form in the page header. -%\changes{1.02}{2016-04-25}{new} +% The first use full form and the inline full form are the same for +% this style. % \begin{macrocode} -\newcommand*{\glsxtrheadfull}[1]{% - \protect\NoCaseChange - {% - \glsifattribute{#1}{headuc}{true}% - {% - \GLSxtrfull[noindex,hyper=false]{#1}[]% - }% - {% - \glsxtrfull[noindex,hyper=false]{#1}[]% - }% - }% + \renewcommand*{\glsxtrfullformat}[2]{% + \glsxtrshortlongformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvscfont}% + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsxtrshortlongplformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvscfont}% + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \Glsxtrshortlongformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvscfont}% + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \Glsxtrshortlongplformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvscfont}% + }% + \renewcommand*{\GLSxtrfullformat}[2]{% + \GLSxtrshortlongformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvscfont}% + }% + \renewcommand*{\GLSxtrfullplformat}[2]{% + \GLSxtrshortlongplformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvscfont}% + }% } % \end{macrocode} -%\end{macro} +%\end{abbrvstyle} % -%\begin{macro}{\glsxtrtitlefull} -% Command to display full form of abbreviation in section title and -% table of contents. -%\changes{1.02}{2016-04-25}{new} +%\begin{abbrvstyle}{short-sc-long-desc} +% As before but user provides description % \begin{macrocode} -\newrobustcmd*{\glsxtrtitlefull}[1]{% - \glsxtrfull[noindex,hyper=false]{#1}[]% -} +\newabbreviationstyle{short-sc-long-desc}% +{% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\glsxtrheadfullpl} -% Command used to display plural full form in the page header. -% If you want the text converted to upper case, this needs to be -% redefined to use \cs{GLSxtrfullpl} instead. If you are using a -% smallcaps style, the default fonts don't provide italic smallcaps. -%\changes{1.02}{2016-04-25}{new} +% Set accessibility attributes if enabled. % \begin{macrocode} -\newcommand*{\glsxtrheadfullpl}[1]{% - \protect\NoCaseChange - {% - \glsifattribute{#1}{headuc}{true}% - {% - \GLSxtrfullpl[noindex,hyper=false]{#1}[]% - }% - {% - \glsxtrfullpl[noindex,hyper=false]{#1}[]% - }% - }% -} + \glsxtrAccSuppAbbrSetTextShortAttrs\glscategorylabel % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\glsxtrtitlefullpl} -% Command to display plural full form of abbreviation in section title and -% table of contents. -%\changes{1.02}{2016-04-25}{new} +% Setup the default fields. % \begin{macrocode} -\newrobustcmd*{\glsxtrtitlefullpl}[1]{% - \glsxtrfullpl[noindex,hyper=false]{#1}[]% -} + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrshortlongdescname}, + sort={\glsxtrshortlongdescsort}, + first={\glsfirstxpabbrvfont{\the\glsshorttok}{\glscategorylabel}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \protect\glsxtrparen{\glsfirstxplongfont{\the\glslongtok}{\glscategorylabel}}},% + firstplural={\glsfirstxpabbrvfont{\the\glsshortpltok}{\glscategorylabel}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \protect\glsxtrparen{\glsfirstxplongfont{\the\glslongpltok}{\glscategorylabel}}},% + text={\glsxpabbrvfont{\the\glsshorttok}{\glscategorylabel}},% + plural={\glsxpabbrvfont{\the\glsshortpltok}{\glscategorylabel}}% + }% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\Glsxtrheadfull} -% Command used to display full form in the page header with the -% first letter converted to upper case. -%\changes{1.02}{2016-04-25}{new} +% Unset the \catattr{regular} attribute if it has been set. % \begin{macrocode} -\newcommand*{\Glsxtrheadfull}[1]{% - \protect\NoCaseChange - {% - \glsifattribute{#1}{headuc}{true}% - {% - \GLSxtrfull[noindex,hyper=false]{#1}[]% - }% - {% - \Glsxtrfull[noindex,hyper=false]{#1}[]% - }% - }% -} + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glsxtrsetcomplexstyle{\the\glslabeltok}{3}% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\Glsxtrtitlefull} -% Command to display full form of abbreviation in section title and -% table of contents with the first letter converted to upper case. -%\changes{1.02}{2016-04-25}{new} +% As short-sc-long style: % \begin{macrocode} -\newrobustcmd*{\Glsxtrtitlefull}[1]{% - \Glsxtrfull[noindex,hyper=false]{#1}[]% + \GlsXtrUseAbbrStyleFmts{short-sc-long}% } % \end{macrocode} -%\end{macro} +%\end{abbrvstyle} % -%\begin{macro}{\GLSxtrtitlefull} -% Command to display full form of abbreviation in section title and -% table of contents in all upper case. -%\changes{1.42}{2020-02-03}{new} +%\begin{abbrvstyle}{short-sc} % \begin{macrocode} -\newrobustcmd*{\GLSxtrtitlefull}[1]{% - \GLSxtrfull[noindex,hyper=false]{#1}[]% -} +\newabbreviationstyle{short-sc}% +{% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\Glsxtrheadfullpl} -% Command used to display plural full form in the page header with the -% first letter converted to upper case. -%\changes{1.02}{2016-04-25}{new} +% Set accessibility attributes if enabled. % \begin{macrocode} -\newcommand*{\Glsxtrheadfullpl}[1]{% - \protect\NoCaseChange - {% - \glsifattribute{#1}{headuc}{true}% - {% - \GLSxtrfullpl[noindex,hyper=false]{#1}[]% - }% - {% - \Glsxtrfullpl[noindex,hyper=false]{#1}[]% - }% - }% -} + \glsxtrAccSuppAbbrSetNoLongAttrs\glscategorylabel % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\Glsxtrtitlefullpl} -% Command to display plural full form of abbreviation in section title and -% table of contents with the first letter converted to upper case. -%\changes{1.02}{2016-04-25}{new} +% Setup the default fields. % \begin{macrocode} -\newrobustcmd*{\Glsxtrtitlefullpl}[1]{% - \Glsxtrfullpl[noindex,hyper=false]{#1}[]% -} + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrshortnolongname}, + sort={\the\glsshorttok}, + first={\glsfirstxpabbrvfont{\the\glsshorttok}{\glscategorylabel}}, + firstplural={\glsfirstxpabbrvfont{\the\glsshortpltok}{\glscategorylabel}}, + text={\glsxpabbrvfont{\the\glsshorttok}{\glscategorylabel}}, + plural={\glsxpabbrvfont{\the\glsshortpltok}{\glscategorylabel}}, + description={\the\glslongtok}}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glssetattribute{\the\glslabeltok}{regular}{true}}% +}% +{% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\GLSxtrtitlefullpl} -% Command to display plural full form of abbreviation in section title and -% table of contents in all upper case. -%\changes{1.42}{2020-02-03}{new} +% Use smallcaps and adjust the plural suffix to revert to upright. +%\changes{1.42}{2020-02-03}{moved \cs{protect} inside \cs{glsxtrscsuffix}} % \begin{macrocode} -\newrobustcmd*{\GLSxtrtitlefullpl}[1]{% - \GLSxtrfullpl[noindex,hyper=false]{#1}[]% -} + \renewcommand*{\abbrvpluralsuffix}{\glsxtrscsuffix}% + \renewcommand*\glsabbrvfont[1]{\glsabbrvscfont{##1}}% + \renewcommand*\glsfirstabbrvfont[1]{\glsfirstabbrvscfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslongdefaultfont{##1}}% + \renewcommand*\glsxtrrevert[1]{\glsxtrscrevert{##1}}% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\glsfmtshort} -% Provide a way of using the formatted short form in section -% headings. If \sty{hyperref} has been loaded, use -% \cs{texorpdfstring} for convenience in PDF bookmarks. -%\changes{0.2}{2015-11-30}{new} -%\changes{0.4}{2015-12-03}{changed to use \cs{glsxtrshort}} -%\changes{0.5}{2015-12-07}{changed to use \cs{glsxtrtitleshort}} -%\changes{0.5}{2015-12-07}{renamed from \cs{glsentryfmtshort}} +% The inline full form displays the short form followed by the +% long form in parentheses. % \begin{macrocode} -\ifdef\texorpdfstring -{ - \newcommand*{\glsfmtshort}[1]{% - \texorpdfstring - {\glsxtrtitleshort{#1}}% - {\glsentryshort{#1}}% - } -} -{ - \newcommand*{\glsfmtshort}[1]{% - \glsxtrtitleshort{#1}} -} + \renewcommand*{\glsxtrinlinefullformat}[2]{% + \glsxtrshortlongformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvscfont}% + }% + \renewcommand*{\glsxtrinlinefullplformat}[2]{% + \glsxtrshortlongplformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvscfont}% + }% % \end{macrocode} -%\end{macro} -%Similarly for the plural version. -%\begin{macro}{\glsfmtshortpl} -%\changes{0.2}{2015-11-30}{new} -%\changes{0.4}{2015-12-03}{changed to use \cs{glsxtrshortpl}} -%\changes{0.5}{2015-12-07}{changed to use \cs{glsxtrtitleshortpl}} -%\changes{0.5}{2015-12-07}{renamed from \cs{glsentryfmtshortpl}} +%\changes{1.21}{2017-11-03}{corrected first letter uppercasing} % \begin{macrocode} -\ifdef\texorpdfstring -{ - \newcommand*{\glsfmtshortpl}[1]{% - \texorpdfstring - {\glsxtrtitleshortpl{#1}}% - {\glsentryshortpl{#1}}% - } -} -{ - \newcommand*{\glsfmtshortpl}[1]{% - \glsxtrtitleshortpl{#1}} -} + \renewcommand*{\Glsxtrinlinefullformat}[2]{% + \Glsxtrshortlongformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvscfont}% + }% + \renewcommand*{\Glsxtrinlinefullplformat}[2]{% + \Glsxtrshortlongplformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvscfont}% + }% + \renewcommand*{\GLSxtrinlinefullformat}[2]{% + \GLSxtrshortlongformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvscfont}% + }% + \renewcommand*{\GLSxtrinlinefullplformat}[2]{% + \GLSxtrshortlongplformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvscfont}% + }% % \end{macrocode} -%\end{macro} -% The case-changing version isn't suitable for PDF bookmarks, so the -% PDF alternative uses the non-case-changing version. -%\begin{macro}{\Glsfmtshort} -% Singular form (first letter uppercase). -%\changes{0.2}{2015-11-30}{new} -%\changes{0.4}{2015-12-03}{changed to use \cs{Glsxtrshort}} -%\changes{0.5}{2015-12-07}{changed to use \cs{Glsxtrtitleshort}} -%\changes{0.5}{2015-12-07}{renamed from \cs{Glsentryfmtshort}} +% The first use full form only displays the short form, but it +% typically won't be used as the \catattr{regular} attribute is set by this style. % \begin{macrocode} -\ifdef\texorpdfstring -{ - \newcommand*{\Glsfmtshort}[1]{% - \texorpdfstring - {\Glsxtrtitleshort{#1}}% - {\glsentryshort{#1}}% - } -} -{ - \newcommand*{\Glsfmtshort}[1]{% - \Glsxtrtitleshort{#1}} + \renewcommand*{\glsxtrfullformat}[2]{% + \glsxtrshortformat{##1}{##2}{\glsfirstabbrvscfont}% + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsxtrshortplformat{##1}{##2}{\glsfirstabbrvscfont}% + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \Glsxtrshortformat{##1}{##2}{\glsfirstabbrvscfont}% + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \Glsxtrshortplformat{##1}{##2}{\glsfirstabbrvscfont}% + }% + \renewcommand*{\GLSxtrfullformat}[2]{% + \GLSxtrshortformat{##1}{##2}{\glsfirstabbrvscfont}% + }% + \renewcommand*{\GLSxtrfullplformat}[2]{% + \GLSxtrshortplformat{##1}{##2}{\glsfirstabbrvscfont}% + }% } % \end{macrocode} -%\end{macro} -%\begin{macro}{\Glsfmtshortpl} -%Plural form (first letter uppercase). -%\changes{0.2}{2015-11-30}{new} -%\changes{0.4}{2015-12-03}{changed to use \cs{glsxtrshortpl}} -%\changes{0.5}{2015-12-07}{changed to use \cs{Glsxtrtitleshortpl}} -%\changes{0.5}{2015-12-07}{renamed from \cs{Glsentryfmtshortpl}} +%\end{abbrvstyle} +% +%\begin{abbrvstyle}{short-sc-nolong} +%\changes{1.04}{2016-05-02}{new} % \begin{macrocode} -\ifdef\texorpdfstring -{ - \newcommand*{\Glsfmtshortpl}[1]{% - \texorpdfstring - {\Glsxtrtitleshortpl{#1}}% - {\glsentryshortpl{#1}}% - } -} -{ - \newcommand*{\Glsfmtshortpl}[1]{% - \Glsxtrtitleshortpl{#1}} -} +\letabbreviationstyle{short-sc-nolong}{short-sc} % \end{macrocode} -%\end{macro} +%\end{abbrvstyle} % -%\begin{macro}{\glsfmtname} -%As above but for the \gloskey{name} value. -%\changes{1.21}{2017-11-03}{new} +%\begin{abbrvstyle}{short-sc-desc} +%\changes{1.39}{2019-03-22}{bug fix: omit \gloskey{description} key as advertised in the +%manual} % \begin{macrocode} -\ifdef\texorpdfstring -{ - \newcommand*{\glsfmtname}[1]{% - \texorpdfstring - {\glsxtrtitlename{#1}}% - {\glsentryname{#1}}% - } -} -{ - \newcommand*{\glsfmtname}[1]{% - \glsxtrtitlename{#1}} -} +\newabbreviationstyle{short-sc-desc}% +{% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\Glsfmtname} -%First letter converted to upper case. -%\changes{1.21}{2017-11-03}{new} +% Set accessibility attributes if enabled. % \begin{macrocode} -\ifdef\texorpdfstring -{ - \newcommand*{\Glsfmtname}[1]{% - \texorpdfstring - {\Glsxtrtitlename{#1}}% - {\glsentryname{#1}}% - } -} -{ - \newcommand*{\Glsfmtname}[1]{% - \Glsxtrtitlename{#1}} -} + \glsxtrAccSuppAbbrSetNameLongAttrs\glscategorylabel % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\GLSfmtname} -%All upper case. -%\changes{1.42}{2020-02-03}{new} +% Setup the default fields. % \begin{macrocode} -\ifdef\texorpdfstring -{ - \newcommand*{\GLSfmtname}[1]{% - \texorpdfstring - {\GLSxtrtitlename{#1}}% - {\glsentryname{#1}}% - } -} -{ - \newcommand*{\GLSfmtname}[1]{% - \GLSxtrtitlename{#1}} -} + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrshortdescname}, + sort={\the\glsshorttok}, + first={\glsfirstxpabbrvfont{\the\glsshorttok}{\glscategorylabel}}, + firstplural={\glsfirstxpabbrvfont{\the\glsshortpltok}{\glscategorylabel}}, + text={\glsxpabbrvfont{\the\glsshorttok}{\glscategorylabel}}, + plural={\glsxpabbrvfont{\the\glsshortpltok}{\glscategorylabel}}}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glssetattribute{\the\glslabeltok}{regular}{true}}% +}% +{% % \end{macrocode} -%\end{macro} -% -% -%\begin{macro}{\glsfmttext} -%As above but for the \gloskey{text} value. -%\changes{0.5}{2015-12-07}{new} +% Use smallcaps and adjust the plural suffix to revert to upright. +%\changes{1.42}{2020-02-03}{moved \cs{protect} inside \cs{glsxtrscsuffix}} % \begin{macrocode} -\ifdef\texorpdfstring -{ - \newcommand*{\glsfmttext}[1]{% - \texorpdfstring - {\glsxtrtitletext{#1}}% - {\glsentrytext{#1}}% - } -} -{ - \newcommand*{\glsfmttext}[1]{% - \glsxtrtitletext{#1}} -} + \renewcommand*{\abbrvpluralsuffix}{\glsxtrscsuffix}% + \renewcommand*\glsabbrvfont[1]{\glsabbrvscfont{##1}}% + \renewcommand*\glsfirstabbrvfont[1]{\glsfirstabbrvscfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslongdefaultfont{##1}}% + \renewcommand*\glsxtrrevert[1]{\glsxtrscrevert{##1}}% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\Glsfmttext} -%First letter converted to upper case. -%\changes{0.5}{2015-12-07}{new} +% The inline full form displays the short format followed by the +% long form in parentheses. % \begin{macrocode} -\ifdef\texorpdfstring -{ - \newcommand*{\Glsfmttext}[1]{% - \texorpdfstring - {\Glsxtrtitletext{#1}}% - {\glsentrytext{#1}}% - } -} -{ - \newcommand*{\Glsfmttext}[1]{% - \Glsxtrtitletext{#1}} -} + \renewcommand*{\glsxtrinlinefullformat}[2]{% + \glsxtrshortlongformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvscfont}% + }% + \renewcommand*{\glsxtrinlinefullplformat}[2]{% + \glsxtrshortlongplformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvscfont}% + }% + \renewcommand*{\Glsxtrinlinefullformat}[2]{% + \Glsxtrshortlongformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvscfont}% + }% + \renewcommand*{\Glsxtrinlinefullplformat}[2]{% + \Glsxtrshortlongplformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvscfont}% + }% + \renewcommand*{\GLSxtrinlinefullformat}[2]{% + \GLSxtrshortlongformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvscfont}% + }% + \renewcommand*{\GLSxtrinlinefullplformat}[2]{% + \GLSxtrshortlongplformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvscfont}% + }% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\GLSfmttext} -%All upper case. -%\changes{1.42}{2020-02-03}{new} +% The first use full form only displays the short form, but it +% typically won't be used as the \catattr{regular} attribute is set by this style. % \begin{macrocode} -\ifdef\texorpdfstring -{ - \newcommand*{\GLSfmttext}[1]{% - \texorpdfstring - {\GLSxtrtitletext{#1}}% - {\glsentrytext{#1}}% - } -} -{ - \newcommand*{\GLSfmttext}[1]{% - \GLSxtrtitletext{#1}} + \renewcommand*{\glsxtrfullformat}[2]{% + \glsxtrshortformat{##1}{##2}{\glsfirstabbrvscfont}% + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsxtrshortplformat{##1}{##2}{\glsfirstabbrvscfont}% + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \Glsxtrshortformat{##1}{##2}{\glsfirstabbrvscfont}% + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \Glsxtrshortplformat{##1}{##2}{\glsfirstabbrvscfont}% + }% + \renewcommand*{\GLSxtrfullformat}[2]{% + \GLSxtrshortformat{##1}{##2}{\glsfirstabbrvscfont}% + }% + \renewcommand*{\GLSxtrfullplformat}[2]{% + \GLSxtrshortplformat{##1}{##2}{\glsfirstabbrvscfont}% + }% } % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\glsfmtplural} -%As above but for the \gloskey{plural} value. -%\changes{0.5}{2015-12-07}{new} +%\end{abbrvstyle} +%\begin{abbrvstyle}{short-sc-nolong-desc} +%\changes{1.04}{2016-05-02}{new} % \begin{macrocode} -\ifdef\texorpdfstring -{ - \newcommand*{\glsfmtplural}[1]{% - \texorpdfstring - {\glsxtrtitleplural{#1}}% - {\glsentryplural{#1}}% - } -} -{ - \newcommand*{\glsfmtplural}[1]{% - \glsxtrtitleplural{#1}} -} +\letabbreviationstyle{short-sc-nolong-desc}{short-sc-desc} % \end{macrocode} -%\end{macro} +%\end{abbrvstyle} % -%\begin{macro}{\Glsfmtplural} -%First letter converted to upper case. -%\changes{0.5}{2015-12-07}{new} +%\begin{abbrvstyle}{nolong-short-sc} +%\changes{1.21}{2017-11-03}{new} % \begin{macrocode} -\ifdef\texorpdfstring -{ - \newcommand*{\Glsfmtplural}[1]{% - \texorpdfstring - {\Glsxtrtitleplural{#1}}% - {\glsentryplural{#1}}% - } -} -{ - \newcommand*{\Glsfmtplural}[1]{% - \Glsxtrtitleplural{#1}} -} +\newabbreviationstyle{nolong-short-sc}% +{% + \GlsXtrUseAbbrStyleSetup{short-sc-nolong}% +}% +{% + \GlsXtrUseAbbrStyleFmts{short-sc-nolong}% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\GLSfmtplural} -%All upper case. -%\changes{1.42}{2020-02-03}{new} +% The inline full form displays the long form followed by the +% short form in parentheses. % \begin{macrocode} -\ifdef\texorpdfstring -{ - \newcommand*{\GLSfmtplural}[1]{% - \texorpdfstring - {\GLSxtrtitleplural{#1}}% - {\glsentryplural{#1}}% - } -} -{ - \newcommand*{\GLSfmtplural}[1]{% - \GLSxtrtitleplural{#1}} + \renewcommand*{\glsxtrinlinefullformat}[2]{% + \glsxtrlongshortformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvscfont}% + }% + \renewcommand*{\glsxtrinlinefullplformat}[2]{% + \glsxtrlongshortplformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvscfont}% + }% + \renewcommand*{\Glsxtrinlinefullformat}[2]{% + \Glsxtrlongshortformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvscfont}% + }% + \renewcommand*{\Glsxtrinlinefullplformat}[2]{% + \Glsxtrlongshortplformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvscfont}% + }% + \renewcommand*{\GLSxtrinlinefullformat}[2]{% + \GLSxtrlongshortformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvscfont}% + }% + \renewcommand*{\GLSxtrinlinefullplformat}[2]{% + \GLSxtrlongshortplformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvscfont}% + }% } % \end{macrocode} -%\end{macro} +%\end{abbrvstyle} % -%\begin{macro}{\glsfmtfirst} -%As above but for the \gloskey{first} value. -%\changes{0.5}{2015-12-07}{new} +%\begin{abbrvstyle}{long-noshort-sc} +%\changes{1.04}{2016-05-02}{renamed from \qt{long-sc}} +% The smallcaps font will only be used if +% the short form is explicitly invoked through commands like +% \cs{glsxtrshort}. No accessibility attributes needed here. % \begin{macrocode} -\ifdef\texorpdfstring -{ - \newcommand*{\glsfmtfirst}[1]{% - \texorpdfstring - {\glsxtrtitlefirst{#1}}% - {\glsentryfirst{#1}}% - } -} -{ - \newcommand*{\glsfmtfirst}[1]{% - \glsxtrtitlefirst{#1}} -} +\newabbreviationstyle{long-noshort-sc}% +{% + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrlongnoshortname}, + sort={\the\glsshorttok}, + first={\glsfirstxplongfont{\the\glslongtok}{\glscategorylabel}}, + firstplural={\glsfirstxplongfont{\the\glslongpltok}{\glscategorylabel}}, + text={\glsxplongfont{\the\glslongtok}{\glscategorylabel}}, + plural={\glsxplongfont{\the\glslongpltok}{\glscategorylabel}},% + description={\the\glslongtok}% + }% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glssetattribute{\the\glslabeltok}{regular}{true}}% +}% +{% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\Glsfmtfirst} -%First letter converted to upper case. -%\changes{0.5}{2015-12-07}{new} +% Use smallcaps and adjust the plural suffix to revert to upright. +%\changes{1.42}{2020-02-03}{moved \cs{protect} inside \cs{glsxtrscsuffix}} % \begin{macrocode} -\ifdef\texorpdfstring -{ - \newcommand*{\Glsfmtfirst}[1]{% - \texorpdfstring - {\Glsxtrtitlefirst{#1}}% - {\glsentryfirst{#1}}% - } -} -{ - \newcommand*{\Glsfmtfirst}[1]{% - \Glsxtrtitlefirst{#1}} -} + \renewcommand*{\abbrvpluralsuffix}{\glsxtrscsuffix}% + \renewcommand*\glsabbrvfont[1]{\glsabbrvscfont{##1}}% + \renewcommand*\glsfirstabbrvfont[1]{\glsfirstabbrvscfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslongdefaultfont{##1}}% + \renewcommand*\glsxtrrevert[1]{\glsxtrscrevert{##1}}% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\GLSfmtfirst} -%All upper case. -%\changes{1.42}{2020-02-03}{new} +% The format for subsequent use (not used when the regular attribute +% is set). % \begin{macrocode} -\ifdef\texorpdfstring -{ - \newcommand*{\GLSfmtfirst}[1]{% - \texorpdfstring - {\GLSxtrtitlefirst{#1}}% - {\glsentryfirst{#1}}% - } -} -{ - \newcommand*{\GLSfmtfirst}[1]{% - \Glsxtrtitlefirst{#1}} -} + \renewcommand*{\glsxtrsubsequentfmt}[2]{% + \glsxtrlongformat{##1}{##2}{\glslongdefaultfont}% + }% + \renewcommand*{\glsxtrsubsequentplfmt}[2]{% + \glsxtrlongplformat{##1}{##2}{\glslongdefaultfont}% + }% + \renewcommand*{\Glsxtrsubsequentfmt}[2]{% + \Glsxtrlongformat{##1}{##2}{\glslongdefaultfont}% + }% + \renewcommand*{\Glsxtrsubsequentplfmt}[2]{% + \Glsxtrlongplformat{##1}{##2}{\glslongdefaultfont}% + }% + \renewcommand*{\GLSxtrsubsequentfmt}[2]{% + \GLSxtrlongformat{##1}{##2}{\glslongdefaultfont}% + }% + \renewcommand*{\Glsxtrsubsequentplfmt}[2]{% + \GLSxtrlongplformat{##1}{##2}{\glslongdefaultfont}% + }% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\glsfmtfirstpl} -%As above but for the \gloskey{firstplural} value. -%\changes{0.5}{2015-12-07}{new} +% The inline full form displays the long format followed by the +% short form in parentheses. % \begin{macrocode} -\ifdef\texorpdfstring -{ - \newcommand*{\glsfmtfirstpl}[1]{% - \texorpdfstring - {\glsxtrtitlefirstplural{#1}}% - {\glsentryfirstplural{#1}}% - } -} -{ - \newcommand*{\glsfmtfirstpl}[1]{% - \glsxtrtitlefirstplural{#1}} -} + \renewcommand*{\glsxtrinlinefullformat}[2]{% + \glsxtrlongshortformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvscfont}% + }% + \renewcommand*{\glsxtrinlinefullplformat}[2]{% + \glsxtrlongshortplformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvscfont}% + }% + \renewcommand*{\Glsxtrinlinefullformat}[2]{% + \Glsxtrlongshortformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvscfont}% + }% + \renewcommand*{\Glsxtrinlinefullplformat}[2]{% + \Glsxtrlongshortplformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvscfont}% + }% + \renewcommand*{\GLSxtrinlinefullformat}[2]{% + \GLSxtrlongshortformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvscfont}% + }% + \renewcommand*{\GLSxtrinlinefullplformat}[2]{% + \GLSxtrlongshortplformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvscfont}% + }% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\Glsfmtfirstpl} -%First letter converted to upper case. -%\changes{0.5}{2015-12-07}{new} +% The first use full form only displays the long form, but it +% typically won't be used as the \catattr{regular} attribute is set by this style. % \begin{macrocode} -\ifdef\texorpdfstring -{ - \newcommand*{\Glsfmtfirstpl}[1]{% - \texorpdfstring - {\Glsxtrtitlefirstplural{#1}}% - {\glsentryfirstplural{#1}}% - } -} -{ - \newcommand*{\Glsfmtfirstpl}[1]{% - \Glsxtrtitlefirstplural{#1}} + \renewcommand*{\glsxtrfullformat}[2]{% + \glsxtrlongformat{##1}{##2}{\glsfirstlongdefaultfont}% + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsxtrlongplformat{##1}{##2}{\glsfirstlongdefaultfont}% + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \Glsxtrlongformat{##1}{##2}{\glsfirstlongdefaultfont}% + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \Glsxtrlongplformat{##1}{##2}{\glsfirstlongdefaultfont}% + }% + \renewcommand*{\GLSxtrfullformat}[2]{% + \GLSxtrlongformat{##1}{##2}{\glsfirstlongdefaultfont}% + }% + \renewcommand*{\GLSxtrfullplformat}[2]{% + \GLSxtrlongplformat{##1}{##2}{\glsfirstlongdefaultfont}% + }% } % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\GLSfmtfirstpl} -%All upper case. -%\changes{1.42}{2020-02-03}{new} +%\end{abbrvstyle} +%\begin{abbrvstyle}{long-sc} +%Backward compatibility: % \begin{macrocode} -\ifdef\texorpdfstring -{ - \newcommand*{\GLSfmtfirstpl}[1]{% - \texorpdfstring - {\GLSxtrtitlefirstplural{#1}}% - {\glsentryfirstplural{#1}}% - } -} -{ - \newcommand*{\GLSfmtfirstpl}[1]{% - \GLSxtrtitlefirstplural{#1}} -} +\@glsxtr@deprecated@abbrstyle{long-sc}{long-noshort-sc} % \end{macrocode} -%\end{macro} +%\end{abbrvstyle} % -%\begin{macro}{\glsfmtlong} -%As above but for the \gloskey{long} value. -%\changes{1.02}{2016-04-25}{new} +%\begin{abbrvstyle}{long-noshort-sc-desc} +%\changes{1.04}{2016-05-02}{renamed from \qt{long-desc-sc}} +% The smallcaps font will only be used if +% the short form is explicitly invoked through commands like +% \cs{glsxtrshort}. % \begin{macrocode} -\ifdef\texorpdfstring -{ - \newcommand*{\glsfmtlong}[1]{% - \texorpdfstring - {\glsxtrtitlelong{#1}}% - {\glsentrylong{#1}}% - } -} -{ - \newcommand*{\glsfmtlong}[1]{% - \glsxtrtitlelong{#1}} -} +\newabbreviationstyle{long-noshort-sc-desc}% +{% + \GlsXtrUseAbbrStyleSetup{long-noshort-desc}% +}% +{% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\Glsfmtlong} -%First letter converted to upper case. -%\changes{1.02}{2016-04-25}{new} +% Use smallcaps and adjust the plural suffix to revert to upright. +%\changes{1.42}{2020-02-03}{moved \cs{protect} inside \cs{glsxtrscsuffix}} % \begin{macrocode} -\ifdef\texorpdfstring -{ - \newcommand*{\Glsfmtlong}[1]{% - \texorpdfstring - {\Glsxtrtitlelong{#1}}% - {\glsentrylong{#1}}% - } -} -{ - \newcommand*{\Glsfmtlong}[1]{% - \Glsxtrtitlelong{#1}} -} + \renewcommand*{\abbrvpluralsuffix}{\glsxtrscsuffix}% + \renewcommand*\glsabbrvfont[1]{\glsabbrvscfont{##1}}% + \renewcommand*\glsfirstabbrvfont[1]{\glsfirstabbrvscfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslongdefaultfont{##1}}% + \renewcommand*\glsxtrrevert[1]{\glsxtrscrevert{##1}}% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\GLSfmtlong} -%All upper case. -%\changes{1.42}{2020-02-03}{new} +% The format for subsequent use (not used when the regular attribute +% is set). % \begin{macrocode} -\ifdef\texorpdfstring -{ - \newcommand*{\GLSfmtlong}[1]{% - \texorpdfstring - {\GLSxtrtitlelong{#1}}% - {\glsentrylong{#1}}% - } -} -{ - \newcommand*{\GLSfmtlong}[1]{% - \GLSxtrtitlelong{#1}} -} + \renewcommand*{\glsxtrsubsequentfmt}[2]{% + \glsxtrlongformat{##1}{##2}{\glslongdefaultfont}% + }% + \renewcommand*{\glsxtrsubsequentplfmt}[2]{% + \glsxtrlongplformat{##1}{##2}{\glslongdefaultfont}% + }% + \renewcommand*{\Glsxtrsubsequentfmt}[2]{% + \Glsxtrlongformat{##1}{##2}{\glslongdefaultfont}% + }% + \renewcommand*{\Glsxtrsubsequentplfmt}[2]{% + \Glsxtrlongplformat{##1}{##2}{\glslongdefaultfont}% + }% + \renewcommand*{\GLSxtrsubsequentfmt}[2]{% + \GLSxtrlongformat{##1}{##2}{\glslongdefaultfont}% + }% + \renewcommand*{\GLSxtrsubsequentplfmt}[2]{% + \GLSxtrlongplformat{##1}{##2}{\glslongdefaultfont}% + }% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\glsfmtlongpl} -%As above but for the \gloskey{longplural} value. -%\changes{1.02}{2016-04-25}{new} +% The inline full form displays the long format followed by the +% short form in parentheses. % \begin{macrocode} -\ifdef\texorpdfstring -{ - \newcommand*{\glsfmtlongpl}[1]{% - \texorpdfstring - {\glsxtrtitlelongpl{#1}}% - {\glsentrylongpl{#1}}% - } -} -{ - \newcommand*{\glsfmtlongpl}[1]{% - \glsxtrtitlelongpl{#1}} -} + \renewcommand*{\glsxtrinlinefullformat}[2]{% + \glsxtrlongshortformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvscfont}% + }% + \renewcommand*{\glsxtrinlinefullplformat}[2]{% + \glsxtrlongshortplformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvscfont}% + }% + \renewcommand*{\Glsxtrinlinefullformat}[2]{% + \Glsxtrlongshortformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvscfont}% + }% + \renewcommand*{\Glsxtrinlinefullplformat}[2]{% + \Glsxtrlongshortplformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvscfont}% + }% + \renewcommand*{\GLSxtrinlinefullformat}[2]{% + \GLSxtrlongshortformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvscfont}% + }% + \renewcommand*{\GLSxtrinlinefullplformat}[2]{% + \GLSxtrlongshortplformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvscfont}% + }% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\Glsfmtlongpl} -%First letter converted to upper case. -%\changes{1.02}{2016-04-25}{new} +% The first use full form only displays the long form, but it +% typically won't be used as the \catattr{regular} attribute is set by this style. % \begin{macrocode} -\ifdef\texorpdfstring -{ - \newcommand*{\Glsfmtlongpl}[1]{% - \texorpdfstring - {\Glsxtrtitlelongpl{#1}}% - {\glsentrylongpl{#1}}% - } -} -{ - \newcommand*{\Glsfmtlongpl}[1]{% - \Glsxtrtitlelongpl{#1}} + \renewcommand*{\glsxtrfullformat}[2]{% + \glsxtrlongformat{##1}{##2}{\glsfirstlongdefaultfont}% + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsxtrlongplformat{##1}{##2}{\glsfirstlongdefaultfont}% + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \Glsxtrlongformat{##1}{##2}{\glsfirstlongdefaultfont}% + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \Glsxtrlongplformat{##1}{##2}{\glsfirstlongdefaultfont}% + }% + \renewcommand*{\GLSxtrfullformat}[2]{% + \GLSxtrlongformat{##1}{##2}{\glsfirstlongdefaultfont}% + }% + \renewcommand*{\GLSxtrfullplformat}[2]{% + \GLSxtrlongplformat{##1}{##2}{\glsfirstlongdefaultfont}% + }% } % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\GLSfmtlongpl} -%All upper case. -%\changes{1.42}{2020-02-03}{new} +%\end{abbrvstyle} +%\begin{abbrvstyle}{long-desc-sc} +%Backward compatibility: % \begin{macrocode} -\ifdef\texorpdfstring -{ - \newcommand*{\GLSfmtlongpl}[1]{% - \texorpdfstring - {\GLSxtrtitlelongpl{#1}}% - {\glsentrylongpl{#1}}% - } -} -{ - \newcommand*{\GLSfmtlongpl}[1]{% - \GLSxtrtitlelongpl{#1}} -} +\@glsxtr@deprecated@abbrstyle{long-desc-sc}{long-noshort-sc-desc} % \end{macrocode} -%\end{macro} +%\end{abbrvstyle} % -%\begin{macro}{\glspdffmtfull} -%\changes{1.42}{2020-02-03}{new} -%Can't use \cs{glsxtrinlinefullformat} in PDF bookmarks as it's not -%fully expandable. This command is for the PDF part of -%\cs{texorpdfstring} for the full form. +%\begin{abbrvstyle}{short-sc-footnote} +%\changes{0.5}{2015-12-07}{new} +%\changes{1.04}{2016-05-02}{renamed from \qt{footnote-sc}} +%\changes{1.42}{2020-02-03}{added missing text key} % \begin{macrocode} -\newcommand*{\glspdffmtfull}[1]{\glsentrylong{#1} (\glsentryshort{#1})}% +\newabbreviationstyle{short-sc-footnote}% +{% % \end{macrocode} -%\end{macro} -%\begin{macro}{\glspdffmtfullpl} -%\changes{1.42}{2020-02-03}{new} -%Likewise for plural. +% Set accessibility attributes if enabled. % \begin{macrocode} -\newcommand*{\glspdffmtfullpl}[1]{\glsentrylongpl{#1} (\glsentryshortpl{#1})}% + \glsxtrAccSuppAbbrSetNoLongAttrs\glscategorylabel % \end{macrocode} -%\end{macro} -%\begin{macro}{\glsfmtfull} -%In-line full format. -%\changes{1.02}{2016-04-25}{new} -%\changes{1.42}{2020-02-03}{switched pdf case to use \cs{glspdffmtfull}} +% Setup the default fields. % \begin{macrocode} -\ifdef\texorpdfstring -{ - \newcommand*{\glsfmtfull}[1]{% - \texorpdfstring - {\glsxtrtitlefull{#1}}% - {\glspdffmtfull{#1}}% - } -} -{ - \newcommand*{\glsfmtfull}[1]{% - \glsxtrtitlefull{#1}} -} + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrfootnotename}, + sort={\the\glsshorttok}, + description={\the\glslongtok},% + first={\glsfirstxpabbrvfont{\the\glsshorttok}{\glscategorylabel}% + \protect\glsxtrabbrvfootnote{\the\glslabeltok}% + {\protect\glsfirstlongfootnotefont{\the\glslongtok}}},% + firstplural={\glsfirstxpabbrvfont{\the\glsshortpltok}{\glscategorylabel}% + \protect\glsxtrabbrvfootnote{\the\glslabeltok}% + {\protect\glsfirstlongfootnotefont{\the\glslongpltok}}},% + text={\glsxpabbrvfont{\the\glsshorttok}{\glscategorylabel}},% + plural={\glsxpabbrvfont{\the\glsshortpltok}{\glscategorylabel}}}% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\Glsfmtfull} -%First letter converted to upper case. -%\changes{1.02}{2016-04-25}{new} -%\changes{1.42}{2020-02-03}{switched pdf case to use \cs{glspdffmtfull}} +% Switch off hyperlinks on first use to prevent nested hyperlinks, +% and unset the \catattr{regular} attribute if it has been set. +%\changes{0.5.1}{2015-12-07}{switch off regular attribute if set} % \begin{macrocode} -\ifdef\texorpdfstring -{ - \newcommand*{\Glsfmtfull}[1]{% - \texorpdfstring - {\Glsxtrtitlefull{#1}}% - {\glspdffmtfull{#1}{}}% - } -} -{ - \newcommand*{\Glsfmtfull}[1]{% - \Glsxtrtitlefull{#1}} -} + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glssetattribute{\the\glslabeltok}{nohyperfirst}{true}% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\GLSfmtfull} -%All upper case. -%\changes{1.42}{2020-02-03}{new} +% Use smallcaps and adjust the plural suffix to revert to upright. +%\changes{1.42}{2020-02-03}{moved \cs{protect} inside \cs{glsxtrscsuffix}} % \begin{macrocode} -\ifdef\texorpdfstring -{ - \newcommand*{\GLSfmtfull}[1]{% - \texorpdfstring - {\GLSxtrtitlefull{#1}}% - {\glspdffmtfull{#1}}% - } -} -{ - \newcommand*{\GLSfmtfull}[1]{% - \GLSxtrtitlefull{#1}} -} + \renewcommand*{\abbrvpluralsuffix}{\glsxtrscsuffix}% + \renewcommand*\glsabbrvfont[1]{\glsabbrvscfont{##1}}% + \renewcommand*\glsfirstabbrvfont[1]{\glsfirstabbrvscfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongfootnotefont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslongfootnotefont{##1}}% + \renewcommand*\glsxtrrevert[1]{\glsxtrscrevert{##1}}% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\glsfmtfullpl} -%In-line full plural format. -%\changes{1.02}{2016-04-25}{new} -%\changes{1.42}{2020-02-03}{switched pdf case to use \cs{glspdffmtfullpl}} +% The full format displays the short form followed by the long form +% as a footnote. % \begin{macrocode} -\ifdef\texorpdfstring -{ - \newcommand*{\glsfmtfullpl}[1]{% - \texorpdfstring - {\glsxtrtitlefullpl{#1}}% - {\glspdffmtfullpl{#1}}% - } -} -{ - \newcommand*{\glsfmtfullpl}[1]{% - \glsxtrtitlefullpl{#1}} -} + \renewcommand*{\glsxtrfullformat}[2]{% + \glsxtrshortformat{##1}{##2}{\glsfirstabbrvscfont}% + \protect\glsxtrabbrvfootnote{##1}% + {\glsxtrfootnotelongformat{##1}{\glsfirstlongfootnotefont}}% + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsxtrshortplformat{##1}{##2}{\glsfirstabbrvscfont}% + \protect\glsxtrabbrvfootnote{##1}% + {\glsxtrfootnotelongplformat{##1}{\glsfirstlongfootnotefont}}% + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \Glsxtrshortformat{##1}{##2}{\glsfirstabbrvscfont}% + \protect\glsxtrabbrvfootnote{##1}% + {\glsxtrfootnotelongformat{##1}{\glsfirstlongfootnotefont}}% + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \Glsxtrshortplformat{##1}{##2}{\glsfirstabbrvscfont}% + \protect\glsxtrabbrvfootnote{##1}% + {\glsxtrfootnotelongplformat{##1}{\glsfirstlongfootnotefont}}% + }% + \renewcommand*{\GLSxtrfullformat}[2]{% + \GLSxtrshortformat{##1}{##2}{\glsfirstabbrvscfont}% + \protect\glsxtrabbrvfootnote{##1}% + {\glsxtrfootnotelongformat{##1}{\glsfirstlongfootnotefont}}% + }% + \renewcommand*{\GLSxtrfullplformat}[2]{% + \GLSxtrshortplformat{##1}{##2}{\glsfirstabbrvscfont}% + \protect\glsxtrabbrvfootnote{##1}% + {\glsxtrfootnotelongplformat{##1}{\glsfirstlongfootnotefont}}% + }% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\Glsfmtfullpl} -%First letter converted to upper case. -%\changes{1.02}{2016-04-25}{new} -%\changes{1.42}{2020-02-03}{switched pdf case to use \cs{glspdffmtfullpl}} +% The first use full form and the inline full form use the short +% (long) style. % \begin{macrocode} -\ifdef\texorpdfstring -{ - \newcommand*{\Glsfmtfullpl}[1]{% - \texorpdfstring - {\Glsxtrtitlefullpl{#1}}% - {\glspdffmtfullpl{#1}{}}% - } -} -{ - \newcommand*{\Glsfmtfullpl}[1]{% - \Glsxtrtitlefullpl{#1}} + \renewcommand*{\glsxtrinlinefullformat}[2]{% + \glsxtrshortlongformat{##1}{##2}% + {\glsfirstlongfootnotefont}{\glsfirstabbrvscfont}% + }% + \renewcommand*{\glsxtrinlinefullplformat}[2]{% + \glsxtrshortlongplformat{##1}{##2}% + {\glsfirstlongfootnotefont}{\glsfirstabbrvscfont}% + }% + \renewcommand*{\Glsxtrinlinefullformat}[2]{% + \Glsxtrshortlongformat{##1}{##2}% + {\glsfirstlongfootnotefont}{\glsfirstabbrvscfont}% + }% + \renewcommand*{\Glsxtrinlinefullplformat}[2]{% + \Glsxtrshortlongplformat{##1}{##2}% + {\glsfirstlongfootnotefont}{\glsfirstabbrvscfont}% + }% + \renewcommand*{\GLSxtrinlinefullformat}[2]{% + \GLSxtrshortlongformat{##1}{##2}% + {\glsfirstlongfootnotefont}{\glsfirstabbrvscfont}% + }% + \renewcommand*{\GLSxtrinlinefullplformat}[2]{% + \GLSxtrshortlongplformat{##1}{##2}% + {\glsfirstlongfootnotefont}{\glsfirstabbrvscfont}% + }% } % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\GLSfmtfullpl} -%All upper case. -%\changes{1.42}{2020-02-03}{new} +%\end{abbrvstyle} +%\begin{abbrvstyle}{footnote-sc} +%Backward compatibility: % \begin{macrocode} -\ifdef\texorpdfstring -{ - \newcommand*{\GLSfmtfullpl}[1]{% - \texorpdfstring - {\GLSxtrtitlefullpl{#1}}% - {\glspdffmtfullpl{#1}{}}% - } -} -{ - \newcommand*{\GLSfmtfullpl}[1]{% - \GLSxtrtitlefullpl{#1}} -} +\@glsxtr@deprecated@abbrstyle{footnote-sc}{short-sc-footnote} % \end{macrocode} -%\end{macro} -% -%\section{Multi (Combined/Compound) Entries} -%(I'd rather call these combined or compound entries but \cs{cgls} is -%already taken.) -% -%New to version 1.48, the commands here provide a way of referencing -%multiple entries as a single unit. For example, biological -%organisms are often referred to by their genus and species, such as -%\emph{Clostridium botulinum} and \emph{Clostridium perfringens} -%(where the genus is Clostridium). The genus is often abbreviated -%after first use, regardless of which species in the genus is being -%referenced. For example, \qt{\emph{Clostridium botulinum} and -%\emph{C. perfringens}}. This can't be supported by any abbreviation -%styles unless the genus and species names are defined separately. -%For example: -%\begin{verbatim} -%\setabbreviationstyle{long-only-short-only} -%\newabbreviation{clostridium}{C.}{Clostridium} -%\newglossaryentry{botulinum}{name={botulinum},description={}} -%\newglossaryentry{perfringens}{name={perfringens},description={}} -%\end{verbatim} -%This means that the entries then need to be referenced using a -%rather cumbersome method: -%\begin{verbatim} -%\gls{clostridium} \gls{botulinum} and \gls{clostridum} -%\gls{perfringens} -%\end{verbatim} -%This section provides a command that will provide a way of defining -%a label that represents a combination of entries (which must all be -%first defined). For example: -%\begin{verbatim} -%\multiglossaryentry{cbot}{clostridium,botulinum} -%\end{verbatim} -%This label can then be referenced using \cs{mgls}, which internally -%uses \cs{gls} for each component. The last component in the list is -%considered the \qt{main} component (not to be confused with the -%main glossary). If this isn't the case, the label of the main -%component should be added in the optional argument before the label -%list. Note that the multi-label (\texttt{cbot} in this case) can't be -%referenced using commands like \cs{gls}. +%\end{abbrvstyle} % -%First define the general set of options that should be applied to -%all multi-entries. These can be set with: -%\begin{macro}{\multiglossaryentrysetup} -%\changes{1.48}{2021-11-22}{new} +%\begin{abbrvstyle}{short-sc-footnote-desc} +% Like \abbrstyle{short-sc-footnote} but with user supplied description. +%\changes{1.42}{2020-02-03}{new} % \begin{macrocode} -\newcommand*{\multiglossaryentrysetup}[1]{\setkeys{glsxtrcombined}{#1}} +\newabbreviationstyle{short-sc-footnote-desc}% +{% % \end{macrocode} -%\end{macro} -%\begin{macro}{\@gls@combined@indexmain} -%\changes{1.48}{2021-11-22}{new} -%Numeric value: 0=false (don't index main component), 1=true (always -%index main component), 2=first (only index main component on first -%use). Default: 1 (true); +% Set accessibility attributes if enabled. % \begin{macrocode} -\newcommand*{\@gls@combined@indexmain}{1} -\define@choicekey{glsxtrcombined}{indexmain}% - [\@gls@combined@indexmain@val\@gls@combined@indexmain] - {false,true,first}[true]{} + \glsxtrAccSuppAbbrSetNameLongAttrs\glscategorylabel % \end{macrocode} -%\end{macro} -%\begin{macro}{\@gls@combined@indexothers} -%\changes{1.48}{2021-11-22}{new} -%Numeric value: 0=false (don't index other components), 1=true (always -%index other components), 2=first (only index other components on first -%use). Default: 2 (first); +% Setup the default fields. % \begin{macrocode} -\newcommand*{\@gls@combined@indexothers}{2} -\define@choicekey{glsxtrcombined}{indexothers}% - [\@gls@combined@indexothers@val\@gls@combined@indexothers] - {false,true,first}[true]{} -% \end{macrocode} -%\end{macro} -%\begin{macro}{\@gls@combined@hyper} -%\changes{1.48}{2021-11-22}{new} -%Numeric value: 0=none (\cs{mgls} doesn't create a hyperlink), -% 1=allmain (all content hyperlinks to the main component), -% 2=mainonly (only the main component has a hyperlink), -% 3=individual (each component has a hyperlink to their own target). -% Default: 3. -% \begin{macrocode} -\newcommand*{\@gls@combined@hyper}{3} -\define@choicekey{glsxtrcombined}{hyper}% - [\@gls@combined@hyper@val\@gls@combined@hyper] - {none,allmain,mainonly,individual,otheronly,notmainfirst,nototherfirst,notfirst}{} + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrfootnotedescname}, + sort={\glsxtrfootnotedescsort}, + first={\glsfirstxpabbrvfont{\the\glsshorttok}{\glscategorylabel}% + \protect\glsxtrabbrvfootnote{\the\glslabeltok}% + {\protect\glsfirstlongfootnotefont{\the\glslongtok}}},% + firstplural={\glsfirstxpabbrvfont{\the\glsshortpltok}{\glscategorylabel}% + \protect\glsxtrabbrvfootnote{\the\glslabeltok}% + {\protect\glsfirstlongfootnotefont{\the\glslongpltok}}},% + text={\glsxpabbrvfont{\the\glsshorttok}{\glscategorylabel}},% + plural={\glsxpabbrvfont{\the\glsshortpltok}{\glscategorylabel}}}% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\@gls@combined@encapmain} -%\changes{1.48}{2021-11-22}{new} -%Location encap value for main component (corresponding to format key in \cs{gls}). +% Switch off hyperlinks on first use to prevent nested hyperlinks, +% and unset the \catattr{regular} attribute if it has been set. +%\changes{0.5.1}{2015-12-07}{switch off regular attribute if set} % \begin{macrocode} -\newcommand*{\@gls@combined@encapmain}{glsnumberformat} -\define@key{glsxtrcombined}{encapmain}{% - \renewcommand*{\@gls@combined@encapmain}{#1}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glssetattribute{\the\glslabeltok}{nohyperfirst}{true}% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% + \GlsXtrUseAbbrStyleFmts{short-sc-footnote}% } % \end{macrocode} -%\end{macro} +%\end{abbrvstyle} % -%\begin{macro}{\@gls@combined@encapothers} -%\changes{1.48}{2021-11-22}{new} -%Location encap value for other components (corresponding to format key in \cs{gls}). +%\begin{abbrvstyle}{short-sc-postfootnote} +%\changes{0.5}{2015-12-07}{new} +%\changes{1.04}{2016-05-02}{renamed from \qt{postfootnote-sc}} +%\changes{1.42}{2020-02-03}{added missing text key} % \begin{macrocode} -\newcommand*{\@gls@combined@encapothers}{glsnumberformat} -\define@key{glsxtrcombined}{encapothers}{% - \renewcommand*{\@gls@combined@encapothers}{#1}% -} +\newabbreviationstyle{short-sc-postfootnote}% +{% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\@gls@combined@textformat} -%\changes{1.48}{2021-11-22}{new} -%Encapsulate entire content with the command identified by the given -%control sequence name. +% Set accessibility attributes if enabled. % \begin{macrocode} -\newcommand*{\@gls@combined@textformat}{@firstofone} -\define@key{glsxtrcombined}{textformat}{% - \renewcommand*{\@gls@combined@textformat}{#1}% -} + \glsxtrAccSuppAbbrSetNoLongAttrs\glscategorylabel % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\@gls@combined@category} -%\changes{1.48}{2021-11-22}{new} -%Assign a category to the combined set. +% Setup the default fields. % \begin{macrocode} -\newcommand*{\@gls@combined@category}{} -\define@key{glsxtrcombined}{category}{% - \renewcommand*{\@gls@combined@category}{#1}% -} + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrfootnotename}, + sort={\the\glsshorttok}, + description={\the\glslongtok},% + first={\glsfirstxpabbrvfont{\the\glsshorttok}{\glscategorylabel}},% + firstplural={\glsfirstxpabbrvfont{\the\glsshortpltok}{\glscategorylabel}},% + text={\glsxpabbrvfont{\the\glsshorttok}{\glscategorylabel}},% + plural={\glsxpabbrvfont{\the\glsshortpltok}{\glscategorylabel}}}% % \end{macrocode} -%Pre-options family: +% Make this category insert a footnote after the link if this was +% the first use, and +% unset the \catattr{regular} attribute if it has been set. +% The footnote needs to be suppressed in the inline form. +%Previously this was done by redefining {glsxtrsetupfulldefs} but +%that interferes with other styles. Instead, this now uses \cs{glsxtrifwasglslike} +%\changes{1.49}{??}{removed redef of \cs{glsxtrsetupfulldefs}} % \begin{macrocode} -\define@key{glsxtrcombinedpreopts}{category}{% - \renewcommand*{\@gls@combined@category}{#1}% -} + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \csdef{glsxtrpostlink\glscategorylabel}{% + \glsxtrifwasglslikeandfirstuse + {% + \glsxtrdopostpunc{\xpglsxtrpostabbrvfootnote}% + }% + {}% + }% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\@gls@combined@mglsopts} -%\changes{1.48}{2021-11-22}{new} -%Default options to pass to \cs{mgls}. +% Use smallcaps and adjust the plural suffix to revert to upright. +%\changes{1.42}{2020-02-03}{moved \cs{protect} inside \cs{glsxtrscsuffix}} % \begin{macrocode} -\newcommand*{\@gls@combined@mglsopts}{} -\define@key{glsxtrcombined}{mglsopts}{% - \renewcommand*{\@gls@combined@mglsopts}{#1}% -} -\define@key{glsxtrcombinedpreopts}{mglsopts}{% - \@gls@combined@mglsopts@do - {% - \renewcommand*{\@gls@combined@mglsopts}{#1}% - }% -} + \renewcommand*{\abbrvpluralsuffix}{\glsxtrscsuffix}% + \renewcommand*\glsabbrvfont[1]{\glsabbrvscfont{##1}}% + \renewcommand*\glsfirstabbrvfont[1]{\glsfirstabbrvscfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongfootnotefont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslongfootnotefont{##1}}% + \renewcommand*\glsxtrrevert[1]{\glsxtrscrevert{##1}}% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\@gls@combined@mglsopts@do} -%\changes{1.48}{2021-11-22}{new} +% The full format displays the short form. The long form is +% deferred. % \begin{macrocode} -\newcommand*{\@gls@combined@mglsopts@do}[1]{#1} + \renewcommand*{\glsxtrfullformat}[2]{% + \glsxtrshortformat{##1}{##2}{\glsfirstabbrvscfont}% + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsxtrshortplformat{##1}{##2}{\glsfirstabbrvscfont}% + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \Glsxtrshortformat{##1}{##2}{\glsfirstabbrvscfont}% + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \Glsxtrshortplformat{##1}{##2}{\glsfirstabbrvscfont}% + }% + \renewcommand*{\GLSxtrfullformat}[2]{% + \GLSxtrshortformat{##1}{##2}{\glsfirstabbrvscfont}% + }% + \renewcommand*{\GLSxtrfullplformat}[2]{% + \GLSxtrshortplformat{##1}{##2}{\glsfirstabbrvscfont}% + }% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\mgls@disable@mglsopts} -%\changes{1.48}{2021-11-22}{new} +% The first use full form and the inline full form use the short +% (long) style. % \begin{macrocode} -\newcommand*{\mgls@disable@mglsopts}{% - \let\@gls@combined@mglsopts@do\@gls@combined@mglsopts@do@not + \renewcommand*{\glsxtrinlinefullformat}[2]{% + \glsxtrshortlongformat{##1}{##2}% + {\glsfirstlongfootnotefont}{\glsfirstabbrvscfont}% + }% + \renewcommand*{\glsxtrinlinefullplformat}[2]{% + \glsxtrshortlongplformat{##1}{##2}% + {\glsfirstlongfootnotefont}{\glsfirstabbrvscfont}% + }% + \renewcommand*{\Glsxtrinlinefullformat}[2]{% + \Glsxtrshortlongformat{##1}{##2}% + {\glsfirstlongfootnotefont}{\glsfirstabbrvscfont}% + }% + \renewcommand*{\Glsxtrinlinefullplformat}[2]{% + \Glsxtrshortlongplformat{##1}{##2}% + {\glsfirstlongfootnotefont}{\glsfirstabbrvscfont}% + }% + \renewcommand*{\GLSxtrinlinefullformat}[2]{% + \GLSxtrshortlongformat{##1}{##2}% + {\glsfirstlongfootnotefont}{\glsfirstabbrvscfont}% + }% + \renewcommand*{\GLSxtrinlinefullplformat}[2]{% + \GLSxtrshortlongplformat{##1}{##2}% + {\glsfirstlongfootnotefont}{\glsfirstabbrvscfont}% + }% } % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\mgls@enable@mglsopts} -%\changes{1.48}{2021-11-22}{new} +%\end{abbrvstyle} +%\begin{abbrvstyle}{postfootnote-sc} +%Backward compatibility: % \begin{macrocode} -\newcommand*{\mgls@enable@mglsopts}{% - \let\@gls@combined@mglsopts@do\@firstofone -} +\@glsxtr@deprecated@abbrstyle{postfootnote-sc}{short-sc-postfootnote} % \end{macrocode} -%\end{macro} +%\end{abbrvstyle} % -%\begin{macro}{\@gls@combined@mglsopts@do} -%\changes{1.48}{2021-11-22}{new} +%\begin{abbrvstyle}{short-sc-postfootnote-desc} +% Like \abbrstyle{short-sc-footnote} but with user supplied description. +%\changes{1.42}{2020-02-03}{new} % \begin{macrocode} -\newcommand*{\@gls@combined@mglsopts@do@not}[1]{% - \PackageError{glossaries-extra}{`mglsopts' key not permitted inside - `setup' value}{}% -} +\newabbreviationstyle{short-sc-postfootnote-desc}% +{% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\@gls@combined@firstprefix} -%\changes{1.48}{2021-11-22}{new} -%Prefix for multi-entry first use. +% Set accessibility attributes if enabled. % \begin{macrocode} -\newcommand*{\@gls@combined@firstprefix}{} -\define@key{glsxtrcombined}{firstprefix}{% - \renewcommand*{\@gls@combined@firstprefix}{#1}% -} + \glsxtrAccSuppAbbrSetNameLongAttrs\glscategorylabel % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\@gls@combined@usedprefix} -%\changes{1.48}{2021-11-22}{new} -%Prefix for multi-entry subsequent first use. +% Setup the default fields. % \begin{macrocode} -\newcommand*{\@gls@combined@usedprefix}{} -\define@key{glsxtrcombined}{usedprefix}{% - \renewcommand*{\@gls@combined@usedprefix}{#1}% -} + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrfootnotedescname}, + sort={\glsxtrfootnotedescsort}, + first={\glsfirstxpabbrvfont{\the\glsshorttok}{\glscategorylabel}},% + firstplural={\glsfirstxpabbrvfont{\the\glsshortpltok}{\glscategorylabel}},% + text={\glsxpabbrvfont{\the\glsshorttok}{\glscategorylabel}},% + plural={\glsxpabbrvfont{\the\glsshortpltok}{\glscategorylabel}}}% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\@gls@combined@firstsuffix} -%\changes{1.48}{2021-11-22}{new} -%Suffix for multi-entry first use. +% Make this category insert a footnote after the link if this was +% the first use, and +% unset the \catattr{regular} attribute if it has been set. +% The footnote needs to be suppressed in the inline form. +%Previously this was done by redefining {glsxtrsetupfulldefs} but +%that interferes with other styles. Instead, this now uses \cs{glsxtrifwasglslike} +%\changes{1.49}{??}{removed redef of \cs{glsxtrsetupfulldefs}} % \begin{macrocode} -\newcommand*{\@gls@combined@firstsuffix}{} -\define@key{glsxtrcombined}{firstsuffix}{% - \renewcommand*{\@gls@combined@firstsuffix}{#1}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \csdef{glsxtrpostlink\glscategorylabel}{% + \glsxtrifwasglslikeandfirstuse + {% + \glsxtrdopostpunc{\xpglsxtrpostabbrvfootnote}% + }% + {}% + }% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% + \GlsXtrUseAbbrStyleFmts{short-sc-postfootnote}% } % \end{macrocode} -%\end{macro} +%\end{abbrvstyle} % -%\begin{macro}{\@gls@combined@usedsuffix} -%\changes{1.48}{2021-11-22}{new} -%Suffix for multi-entry subsequent first use. +%\subsection{Predefined Styles (Fake Small Capitals)} +% These styles require the \sty{relsize} package, which must be +% loaded by the user. These styles all use: +%\begin{macro}{\glsxtrsmfont} +%\changes{0.5}{2015-12-07}{new} +%Maintained for backward compatibility. % \begin{macrocode} -\newcommand*{\@gls@combined@usedsuffix}{} -\define@key{glsxtrcombined}{usedsuffix}{% - \renewcommand*{\@gls@combined@usedsuffix}{#1}% -} +\newcommand*{\glsxtrsmfont}[1]{\textsmaller{#1}} % \end{macrocode} %\end{macro} -% -%\begin{macro}{\@gls@combined@firstskipmain} -%\changes{1.48}{2021-11-22}{new} -%Skip the main element on first use (multi-entry first use not -%element first use). +%\begin{macro}{\glsabbrvsmfont} +%\changes{1.17}{2017-08-09}{new} +%Added for consistent naming. % \begin{macrocode} -\define@boolkey{glsxtrcombined}{firstskipmain}[true]{} -\KV@glsxtrcombined@firstskipmainfalse +\newcommand*{\glsabbrvsmfont}{\glsxtrsmfont} % \end{macrocode} %\end{macro} -% -%\begin{macro}{\@gls@combined@firstskipothers} -%\changes{1.48}{2021-11-22}{new} -%Skip the other elements on first use (multi-entry first use not -%element first use). +%\begin{macro}{\glsxtrfirstsmfont} +%\changes{1.04}{2016-05-02}{new} +%Maintained for backward compatibility. % \begin{macrocode} -\define@boolkey{glsxtrcombined}{firstskipothers}[true]{} -\KV@glsxtrcombined@firstskipothersfalse +\newcommand*{\glsxtrfirstsmfont}[1]{\glsabbrvsmfont{#1}} % \end{macrocode} %\end{macro} -% -%\begin{macro}{\@gls@combined@usedskipmain} -%\changes{1.48}{2021-11-22}{new} -%Skip the main element on subsequent use (multi-entry subsequent use not -%element subsequent use). +%\begin{macro}{\glsfirstabbrvsmfont} +%\changes{1.17}{2017-08-09}{new} +%Added for consistent naming. % \begin{macrocode} -\define@boolkey{glsxtrcombined}{usedskipmain}[true]{} -\KV@glsxtrcombined@usedskipmainfalse +\newcommand*{\glsfirstabbrvsmfont}{\glsxtrfirstsmfont} % \end{macrocode} %\end{macro} -% -%\begin{macro}{\@gls@combined@usedskipothers} -%\changes{1.48}{2021-11-22}{new} -%Skip the other elements on subsequent use (multi-entry subsequent use not -%element subsequent use). +% and for the default short form suffix: +%\begin{macro}{\glsxtrsmsuffix} +%\changes{0.5}{2015-12-07}{new} % \begin{macrocode} -\define@boolkey{glsxtrcombined}{usedskipothers}[true]{} -\KV@glsxtrcombined@usedskipothersfalse +\newcommand*{\glsxtrsmsuffix}{\glsxtrabbrvpluralsuffix} % \end{macrocode} %\end{macro} -% -%\begin{macro}{\@gls@combined@postlinks} -%\changes{1.48}{2021-11-22}{new} -%Determine whether or not to use the individual element post-link hooks. +%\begin{macro}{\glsxtrsmrevert} +%\changes{1.49}{??}{new} % \begin{macrocode} -\newcommand*{\@gls@combined@postlinks@nr}{0} -\define@choicekey{glsxtrcombined}{postlinks}% - [\@gls@combined@postlinks@val\@gls@combined@postlinks@nr] - {none,all,notlast,mainnotlast,mainonly,othernotlast,otheronly}{} +\newcommand*{\glsxtrsmrevert}[1]{\textlarger{#1}} % \end{macrocode} %\end{macro} % -%\begin{macro}{\@gls@combined@mpostlink} -%\changes{1.48}{2021-11-22}{new} -%Determine whether or not to use the multi-entry post-link hook. +%\begin{abbrvstyle}{long-short-sm} +%\changes{0.5}{2015-12-07}{new} +%\changes{1.42}{2020-02-03}{added missing text key} % \begin{macrocode} -\newcommand*{\@gls@combined@mpostlink@nr}{1} -\define@choicekey{glsxtrcombined}{mpostlink}% - [\@gls@combined@mpostlink@val\@gls@combined@mpostlink@nr] - {false,true,firstonly,usedonly}[true]{} +\newabbreviationstyle{long-short-sm}% +{% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\@gls@combined@mpostlinkelement} -%\changes{1.48}{2021-11-22}{new} -%Determine which element to use for the post-link hook. +% Set accessibility attributes if enabled. % \begin{macrocode} -\newcommand*{\@gls@combined@mpostlinkelement@nr}{0} -\define@choicekey{glsxtrcombined}{mpostlinkelement}% - [\@gls@combined@mpostlinkelement@val\@gls@combined@mpostlinkelement@nr] - {last,main,custom}{} + \glsxtrAccSuppAbbrSetFirstLongAttrs\glscategorylabel % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\glsxtrifmulti} -%\changes{1.48}{2021-11-22}{new} +% Setup the default fields. % \begin{macrocode} -\newcommand*{\glsxtrifmulti}[3]{\ifcsdef{@gls@combined@#1@main}{#2}{#3}} + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrlongshortname}, + sort={\the\glsshorttok}, + first={\glsfirstxplongfont{\the\glslongtok}{\glscategorylabel}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \protect\glsxtrparen{\glsfirstxpabbrvfont{\the\glsshorttok}{\glscategorylabel}}},% + firstplural={\glsfirstxplongfont{\the\glslongpltok}{\glscategorylabel}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \protect\glsxtrparen{\glsfirstxpabbrvfont{\the\glsshortpltok}{\glscategorylabel}}},% + text={\glsxpabbrvfont{\the\glsshorttok}{\glscategorylabel}},% + plural={\glsxpabbrvfont{\the\glsshortpltok}{\glscategorylabel}},% + description={\the\glslongtok}}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glsxtrsetcomplexstyle{\the\glslabeltok}{3}% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\glsxtrmultimain} -%\changes{1.48}{2021-11-22}{new} +%\changes{1.42}{2020-02-03}{removed \cs{protect} from \cs{glsxtrsmsuffix}} % \begin{macrocode} -\newcommand*{\glsxtrmultimain}[1]{\csuse{@gls@combined@#1@main}} + \renewcommand*\glsabbrvfont[1]{\glsabbrvsmfont{##1}}% + \renewcommand*\glsfirstabbrvfont[1]{\glsfirstabbrvsmfont{##1}}% + \renewcommand*{\abbrvpluralsuffix}{\glsxtrsmsuffix}% + \renewcommand*\glsxtrrevert[1]{\glsxtrsmrevert{##1}}% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\glsxtrmultilist} -%\changes{1.48}{2021-11-22}{new} +% Use the default long fonts. % \begin{macrocode} -\newcommand*{\glsxtrmultilist}[1]{\csuse{@gls@combined@#1@list}} + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslongdefaultfont{##1}}% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\glsxtrmultitotalelements} -%\changes{1.48}{2021-11-22}{new} -%Total number of elements. +% The first use full form and the inline full form are the same for +% this style. % \begin{macrocode} -\newcommand*{\glsxtrmultitotalelements}[1]{\csuse{@gls@combined@#1@total}} + \renewcommand*{\glsxtrfullformat}[2]{% + \glsxtrlongshortformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvsmfont}% + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsxtrlongshortplformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvsmfont}% + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \Glsxtrlongshortformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvsmfont}% + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \Glsxtrlongshortplformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvsmfont}% + }% + \renewcommand*{\GLSxtrfullformat}[2]{% + \GLSxtrlongshortformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvsmfont}% + }% + \renewcommand*{\GLSxtrfullplformat}[2]{% + \GLSxtrlongshortplformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvsmfont}% + }% +} % \end{macrocode} -%\end{macro} +%\end{abbrvstyle} % -%\begin{macro}{\glsxtrmultimainindex} -%\changes{1.48}{2021-11-22}{new} -%Index of main element (starting from 1). If the main element is the -%last element in the list then this should equal the total number of -%elements. +%\begin{abbrvstyle}{long-short-sm-desc} +%\changes{0.5}{2015-12-07}{new} % \begin{macrocode} -\newcommand*{\glsxtrmultimainindex}[1]{\csuse{@gls@combined@#1@mainindex}} +\newabbreviationstyle{long-short-sm-desc}% +{% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\glsxtrmultilastotherindex} -%\changes{1.48}{2021-11-22}{new} -%Index of the last non-main element. +% Set accessibility attributes if enabled. % \begin{macrocode} -\newcommand*{\glsxtrmultilastotherindex}[1]{\csuse{@gls@combined@#1@lastotherindex}} + \glsxtrAccSuppAbbrSetTextShortAttrs\glscategorylabel % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\ifmultiglossaryentryglobal} -%\changes{1.48}{2021-11-22}{new} -%Make definitions global. +% Setup the default fields. % \begin{macrocode} -\newif\ifmultiglossaryentryglobal -\multiglossaryentryglobalfalse + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrlongshortdescname}, + sort={\glsxtrlongshortdescsort},% + first={\glsfirstxplongfont{\the\glslongtok}{\glscategorylabel}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \protect\glsxtrparen{\glsfirstxpabbrvfont{\the\glsshorttok}{\glscategorylabel}}},% + firstplural={\glsfirstxplongfont{\the\glslongpltok}{\glscategorylabel}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \protect\glsxtrparen{\glsfirstxpabbrvfont{\the\glsshortpltok}{\glscategorylabel}}},% + text={\glsxpabbrvfont{\the\glsshorttok}{\glscategorylabel}},% + plural={\glsxpabbrvfont{\the\glsshortpltok}{\glscategorylabel}}% + }% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\mglselementindex} -%\changes{1.48}{2021-11-22}{new} -% Count register to keep track of the current element index. +% Unset the \catattr{regular} attribute if it has been set. % \begin{macrocode} -\newcount\mglselementindex + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glsxtrsetcomplexstyle{\the\glslabeltok}{3}% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\multiglossaryentry} -%\changes{1.48}{2021-11-22}{new} -%\begin{definition} -%\cs{multiglossaryentry}\oarg{options}\marg{multi-label}\oarg{main label}\marg{label -%list} -%\end{definition} -%Defines the label \meta{multi-label} that can be used in \cs{mgls}. +% As long-short-sm style: % \begin{macrocode} -\newrobustcmd{\multiglossaryentry}[1][]{% - \def\@gls@combined@current@opts{#1}% - \ifnum\@glsxtr@docdefval=1\relax - \let\@multi@glossentry@donext\@defmultiglossaryentry - \else - \let\@multi@glossentry@donext\@multiglossaryentry - \fi - \@multi@glossentry@donext + \GlsXtrUseAbbrStyleFmts{long-short-sm}% } % \end{macrocode} -%\end{macro} +%\end{abbrvstyle} % -%\begin{macro}{\@multiglossaryentry} -%\changes{1.48}{2021-11-22}{new} +%\begin{abbrvstyle}{short-sm-long} +% Now the short (long) version +%\changes{0.5}{2015-12-07}{new} +%\changes{1.42}{2020-02-03}{added missing text key} % \begin{macrocode} -\newcommand*{\@multiglossaryentry}[1]{% - \def\@gls@combined@current@label{#1}% - \@multi@glossaryentry -} +\newabbreviationstyle{short-sm-long}% +{% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\@multi@glossaryentry} -%\changes{1.48}{2021-11-22}{new} -% Check for existence. +% Set accessibility attributes if enabled. % \begin{macrocode} -\newcommand*{\@multi@glossaryentry}[2][]{% - \ifcsdef{@gls@combined@\@gls@combined@current@label @main}% - {\PackageError{glossaries-extra}% - {Multi-entry label `\@gls@combined@current@label' already defined}% - {}% - }% - {% - \@multi@glossary@entry{#1}{#2}% - }% -} + \glsxtrAccSuppAbbrSetFirstLongAttrs\glscategorylabel % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\@defmultiglossaryentry} -%\changes{1.48}{2021-11-22}{new} -%Used if document definitions are on. +% Setup the default fields. % \begin{macrocode} -\newcommand*{\@defmultiglossaryentry}[1]{% - \def\@gls@combined@current@label{#1}% - \@def@multi@glossaryentry -} + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrshortlongname}, + sort={\the\glsshorttok}, + description={\the\glslongtok},% + first={\glsfirstxpabbrvfont{\the\glsshorttok}{\glscategorylabel}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \protect\glsxtrparen{\glsfirstxplongfont{\the\glslongtok}{\glscategorylabel}}},% + firstplural={\glsfirstxpabbrvfont{\the\glsshortpltok}{\glscategorylabel}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \protect\glsxtrparen{\glsfirstxplongfont{\the\glslongpltok}{\glscategorylabel}}},% + text={\glsxpabbrvfont{\the\glsshorttok}{\glscategorylabel}},% + plural={\glsxpabbrvfont{\the\glsshortpltok}{\glscategorylabel}}}% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\@def@multi@glossaryentry} -%\changes{1.48}{2021-11-22}{new} -%Used if document definitions are on. +% Unset the \catattr{regular} attribute if it has been set. % \begin{macrocode} -\newcommand*{\@def@multi@glossaryentry}[2][]{% - \let\@def@multi@glossaryentry@do\@multi@glossary@entry - \ifundef\@glsxtr@docdefs@multilist - {% - \gdef\@glsxtr@docdefs@multilist{}% - \listxadd - {\@glsxtr@docdefs@multilist}{\expandonce\@gls@combined@current@label}% - }% - {% - \xifinlist{\@gls@combined@current@label}{\@glsxtr@docdefs@multilist}% - {% - \PackageError{glossaries-extra}% - {Multi-entry label `\@gls@combined@current@label' already defined}% - {}% - \let\@def@multi@glossaryentry@do\@gobbletwo - }% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glsxtrsetcomplexstyle{\the\glslabeltok}{3}% + \glshasattribute{\the\glslabeltok}{regular}% {% - \listxadd - {\@glsxtr@docdefs@multilist}{\expandonce\@gls@combined@current@label}% + \glssetattribute{\the\glslabeltok}{regular}{false}% }% + {}% }% - \@def@multi@glossaryentry@do{#1}{#2}% -} +}% +{% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\@multi@glossary@doifexists} -%\changes{1.48}{2021-11-22}{new} +%\changes{1.42}{2020-02-03}{removed \cs{protect} from \cs{glsxtrsmsuffix}} % \begin{macrocode} -\newcommand*{\@multi@glossary@doifexists}{\glsdoifexists} + \renewcommand*\glsabbrvfont[1]{\glsabbrvsmfont{##1}}% + \renewcommand*\glsfirstabbrvfont[1]{\glsfirstabbrvsmfont{##1}}% + \renewcommand*{\abbrvpluralsuffix}{\glsxtrsmsuffix}% + \renewcommand*\glsxtrrevert[1]{\glsxtrsmrevert{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslongdefaultfont{##1}}% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\providemultiglossaryentry} -%\changes{1.48}{2021-11-22}{new} -%\begin{definition} -%\cs{providemultiglossaryentry}\oarg{options}\marg{multi-label}\oarg{main label}\marg{label -%list} -%\end{definition} -%Defines a multi-entry unless it has already been defined. +% The first use full form and the inline full form are the same for +% this style. % \begin{macrocode} -\newrobustcmd{\providemultiglossaryentry}[2][]{% - \def\@gls@combined@current@opts{#1}% - \def\@gls@combined@current@label{#2}% - \ifcsdef{@gls@combined@\@gls@combined@current@label @main}% - {\def\@multi@glossentry@donext{\@provide@multi@glossaryentry@noop}}% - {% - \ifnum\@glsxtr@docdefval=1\relax - \def\@multi@glossentry@donext{\@def@multi@glossaryentry}% - \else - \def\@multi@glossentry@donext{\@multi@glossaryentry}% - \fi - }% - \@multi@glossentry@donext + \renewcommand*{\glsxtrfullformat}[2]{% + \glsxtrshortlongformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvsmfont}% + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsxtrshortlongplformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvsmfont}% + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \Glsxtrshortlongformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvsmfont}% + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \Glsxtrshortlongplformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvsmfont}% + }% + \renewcommand*{\GLSxtrfullformat}[2]{% + \GLSxtrshortlongformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvsmfont}% + }% + \renewcommand*{\GLSxtrfullplformat}[2]{% + \GLSxtrshortlongplformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvsmfont}% + }% } % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\@provide@multi@glossaryentry@noop} -%\changes{1.48}{2021-11-22}{new} -% Do nothing. -% \begin{macrocode} -\newcommand*{\@provide@multi@glossaryentry@noop}[2][]{} -% \end{macrocode} -%\end{macro} -% -%\begin{macro}{\@multi@glossaryentry@list} -%\changes{1.48}{2021-11-22}{new} -% List of all defined multi-entry sets. -% \begin{macrocode} -\newcommand*{\@multi@glossaryentry@list}{} -% \end{macrocode} -%\end{macro} +%\end{abbrvstyle} % -%\begin{macro}{\@multi@glossary@entry} -%\changes{1.48}{2021-11-22}{new} +%\begin{abbrvstyle}{short-sm-long-desc} +% As before but user provides description +%\changes{0.5}{2015-12-07}{new} % \begin{macrocode} -\newcommand*{\@multi@glossary@entry}[2]{% - \protected@edef\@gls@combined@current@main{#1}% +\newabbreviationstyle{short-sm-long-desc}% +{% % \end{macrocode} -% Fully expand list. +% Set accessibility attributes if enabled. % \begin{macrocode} - \protected@edef\@gls@combined@currentlist{#2}% + \glsxtrAccSuppAbbrSetTextShortAttrs\glscategorylabel % \end{macrocode} -% Count items in list, check they are all defined, and find last item at the same time. +% Setup the default fields. % \begin{macrocode} - \mglselementindex=0\relax - \@for\@gls@tmp:=\@gls@combined@currentlist\do{% - \advance\mglselementindex by 1\relax - \@multi@glossary@doifexists{\@gls@tmp}{}% - \let\@gls@combined@finalitem\@gls@tmp - \ifdefvoid\@gls@combined@current@main - {}% - {% - \ifx\@gls@combined@current@main\@gls@tmp - \ifmultiglossaryentryglobal - \global\cslet{@gls@combined@\@gls@combined@current@label @main}% - \@gls@combined@current@main - \csxdef{@gls@combined@\@gls@combined@current@label @mainindex}% - {\the\mglselementindex}% - \else - \cslet{@gls@combined@\@gls@combined@current@label @main}% - \@gls@combined@current@main - \csedef{@gls@combined@\@gls@combined@current@label @mainindex}% - {\the\mglselementindex}% - \fi - \else - \ifmultiglossaryentryglobal - \csxdef{@gls@combined@\@gls@combined@current@label @lastotherindex}% - {\the\mglselementindex}% - \else - \csedef{@gls@combined@\@gls@combined@current@label @lastotherindex}% - {\the\mglselementindex}% - \fi - \fi - }% + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrshortlongdescname}, + sort={\glsxtrshortlongdescsort}, + first={\glsfirstxpabbrvfont{\the\glsshorttok}{\glscategorylabel}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \protect\glsxtrparen{\glsfirstxplongfont{\the\glslongtok}{\glscategorylabel}}},% + firstplural={\glsfirstxpabbrvfont{\the\glsshortpltok}{\glscategorylabel}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \protect\glsxtrparen{\glsfirstxplongfont{\the\glslongpltok}{\glscategorylabel}}},% + text={\glsxpabbrvfont{\the\glsshorttok}{\glscategorylabel}},% + plural={\glsxpabbrvfont{\the\glsshortpltok}{\glscategorylabel}}% }% - \ifmultiglossaryentryglobal - \csxdef{@gls@combined@\@gls@combined@current@label @total}% - {\the\mglselementindex}% - \else - \csedef{@gls@combined@\@gls@combined@current@label @total}% - {\the\mglselementindex}% - \fi - \ifnum\mglselementindex<2\relax - \PackageError{glossaries-extra}{At least 2 labels required in - multi-entry element list (\number\mglselementindex\space found)}{}% - \else - \ifdefvoid\@gls@combined@current@main - {}% - {% -% \end{macrocode} -% If \cs{@gls@combined@\meta{label}@main} hasn't been set then it -% wasn't included in the list. -% \begin{macrocode} - \ifcsundef{@gls@combined@\@gls@combined@current@label @main}% - {\PackageError{glossaries-extra}% - {Main element `\@gls@combined@current@main' not found in list}% - {The final element `\@gls@combined@finalitem' will be used instead} % \end{macrocode} -% Set to empty so that the default (final element) is used instead. +% Unset the \catattr{regular} attribute if it has been set. % \begin{macrocode} - \let\@gls@combined@current@main\@empty - }% - {}% - }% - \ifdefvoid\@gls@combined@current@main + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glsxtrsetcomplexstyle{\the\glslabeltok}{3}% + \glshasattribute{\the\glslabeltok}{regular}% {% -% \end{macrocode} -% Set main to final element. -% \begin{macrocode} - \ifmultiglossaryentryglobal - \global\cslet{@gls@combined@\@gls@combined@current@label @main}% - \@gls@combined@finalitem - \global\csletcs{@gls@combined@\@gls@combined@current@label @mainindex}% - {@gls@combined@\@gls@combined@current@label @total}% - \csxdef{@gls@combined@\@gls@combined@current@label @lastotherindex}% - {\the\numexpr\mglselementindex-1 }% - \else - \cslet{@gls@combined@\@gls@combined@current@label @main}% - \@gls@combined@finalitem - \csletcs{@gls@combined@\@gls@combined@current@label @mainindex}% - {@gls@combined@\@gls@combined@current@label @total}% - \csedef{@gls@combined@\@gls@combined@current@label @lastotherindex}% - {\the\numexpr\mglselementindex-1 }% - \fi + \glssetattribute{\the\glslabeltok}{regular}{false}% }% {}% - \ifmultiglossaryentryglobal + }% +}% +{% % \end{macrocode} -% Globally define element list. +% As short-sm-long style: % \begin{macrocode} - \global\cslet{@gls@combined@\@gls@combined@current@label @list}% - \@gls@combined@currentlist + \GlsXtrUseAbbrStyleFmts{short-sm-long}% +} % \end{macrocode} -% Globally define options. +%\end{abbrvstyle} +% +%\begin{abbrvstyle}{short-sm} +%\changes{0.5}{2015-12-07}{new} % \begin{macrocode} - \protected@csxdef{@gls@combined@\@gls@combined@current@label @options}% - {\@gls@combined@current@opts}% +\newabbreviationstyle{short-sm}% +{% % \end{macrocode} -% Global conditional definition. +% Set accessibility attributes if enabled. % \begin{macrocode} - \expandafter\@ifdefinable - \csname if@gls@combined@\@gls@combined@current@label @flag\endcsname - {\expandafter\global\expandafter - \newif\csname if@gls@combined@\@gls@combined@current@label @flag\endcsname}% - \expandafter\global - \csname @gls@combined@\@gls@combined@current@label @flagfalse\endcsname - \else + \glsxtrAccSuppAbbrSetNameLongAttrs\glscategorylabel % \end{macrocode} -% Locally define element list. +% Setup the default fields. % \begin{macrocode} - \cslet{@gls@combined@\@gls@combined@current@label @list}% - \@gls@combined@currentlist + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrshortnolongname}, + sort={\the\glsshorttok}, + first={\glsfirstxpabbrvfont{\the\glsshorttok}{\glscategorylabel}}, + firstplural={\glsfirstxpabbrvfont{\the\glsshortpltok}{\glscategorylabel}}, + text={\glsxpabbrvfont{\the\glsshorttok}{\glscategorylabel}}, + plural={\glsxpabbrvfont{\the\glsshortpltok}{\glscategorylabel}}, + description={\the\glslongtok}}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glssetattribute{\the\glslabeltok}{regular}{true}}% +}% +{% % \end{macrocode} -% Locally define options. +%\changes{1.42}{2020-02-03}{removed \cs{protect} from \cs{glsxtrsmsuffix}} % \begin{macrocode} - \protected@csedef{@gls@combined@\@gls@combined@current@label @options}% - {\@gls@combined@current@opts}% + \renewcommand*\glsabbrvfont[1]{\glsabbrvsmfont{##1}}% + \renewcommand*\glsfirstabbrvfont[1]{\glsfirstabbrvsmfont{##1}}% + \renewcommand*{\abbrvpluralsuffix}{\glsxtrsmsuffix}% + \renewcommand*\glsxtrrevert[1]{\glsxtrsmrevert{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslongdefaultfont{##1}}% % \end{macrocode} -% Local conditional definition. +% The inline full form displays the short form followed by the +% long form in parentheses. % \begin{macrocode} - \newboolean{@gls@combined@\@gls@combined@current@label @flag}% - \csname @gls@combined@\@gls@combined@current@label @flagfalse\endcsname - \fi - \fi - \writemultiglossentry - {\@gls@combined@current@opts}{\@gls@combined@current@label}% - {\csuse{@gls@combined@\@gls@combined@current@label @main}}{#2}% + \renewcommand*{\glsxtrinlinefullformat}[2]{% + \glsxtrshortlongformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvsmfont}% + }% + \renewcommand*{\glsxtrinlinefullplformat}[2]{% + \glsxtrshortlongplformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvsmfont}% + }% % \end{macrocode} -%Append label to list. +%\changes{1.21}{2017-11-03}{corrected first letter uppercasing} % \begin{macrocode} - \ifmultiglossaryentryglobal - \ifdefempty\@multi@glossaryentry@list - {\let\@multi@glossaryentry@list\@gls@combined@current@label}% - {% - \eappto\@multi@glossaryentry@list{,\expandonce\@gls@combined@current@label}% - }% - \else - \ifdefempty\@multi@glossaryentry@list - {\global\let\@multi@glossaryentry@list\@gls@combined@current@label}% - {% - \xappto\@multi@glossaryentry@list{,\expandonce\@gls@combined@current@label}% - }% - \fi -} + \renewcommand*{\Glsxtrinlinefullformat}[2]{% + \Glsxtrshortlongformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvsmfont}% + }% + \renewcommand*{\Glsxtrinlinefullplformat}[2]{% + \Glsxtrshortlongplformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvsmfont}% + }% + \renewcommand*{\GLSxtrinlinefullformat}[2]{% + \GLSxtrshortlongformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvsmfont}% + }% + \renewcommand*{\GLSxtrinlinefullplformat}[2]{% + \GLSxtrshortlongplformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvsmfont}% + }% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\@glsxtr@multientry} -%\begin{definition} -%\cs{@glsxtr@multientry}\marg{options}\marg{multilabel}\marg{main}\marg{list} -%\end{definition} -%Information for aux file. Useful for \app{bib2gls} and also for -%\pkgopt{docdef}. -%\changes{1.48}{2021-11-22}{new} +% The first use full form only displays the short form, but it +% typically won't be used as the \catattr{regular} attribute is set by this style. % \begin{macrocode} -\newcommand*{\@glsxtr@multientry}[4]{% - \ifnum\@glsxtr@docdefval=1\relax - \bgroup - \def\@gls@combined@current@opts{#1}% - \def\@gls@combined@current@label{#2}% - \let\@multi@glossary@doifexists\@secondoftwo - \let\writemultiglossentry\@gobblefour - \multiglossaryentryglobaltrue - \@multi@glossary@entry{#3}{#4}% - \egroup - \fi + \renewcommand*{\glsxtrfullformat}[2]{% + \glsxtrshortformat{##1}{##2}{\glsfirstabbrvsmfont}% + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsxtrshortplformat{##1}{##2}{\glsfirstabbrvsmfont}% + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \Glsxtrshortformat{##1}{##2}{\glsfirstabbrvsmfont}% + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \Glsxtrshortplformat{##1}{##2}{\glsfirstabbrvsmfont}% + }% + \renewcommand*{\GLSxtrfullformat}[2]{% + \GLSxtrshortformat{##1}{##2}{\glsfirstabbrvsmfont}% + }% + \renewcommand*{\GLSxtrfullplformat}[2]{% + \GLSxtrshortplformat{##1}{##2}{\glsfirstabbrvsmfont}% + }% } % \end{macrocode} -%\end{macro} +%\end{abbrvstyle} % -%\begin{macro}{\writemultiglossentry} -%\changes{1.48}{2021-11-22}{new} -%This can be redefined to do nothing if the information isn't -%required. +%\begin{abbrvstyle}{short-sm-nolong} +%\changes{1.04}{2016-05-02}{new} % \begin{macrocode} -\newcommand*{\writemultiglossentry}[4]{% - \protected@write\@auxout{}{\string\@glsxtr@multientry{#1}{#2}{#3}{#4}}% -} +\letabbreviationstyle{short-sm-nolong}{short-sm} % \end{macrocode} -%\end{macro} +%\end{abbrvstyle} % -%\begin{macro}{\ifmglsused} -%\changes{1.48}{2021-11-22}{new} -% Determines whether or not the multi-entry set has been referenced -% by commands like \cs{mgls} or \cs{mglsname}. +%\begin{abbrvstyle}{short-sm-desc} +%\changes{0.5}{2015-12-07}{new} +%\changes{1.39}{2019-03-22}{corrected to omit \gloskey{description} key as advertised in the +%manual} % \begin{macrocode} -\newcommand*{\ifmglsused}[3]{% - \ifbool{@gls@combined@#1@flag}{#2}{#3}% -} +\newabbreviationstyle{short-sm-desc}% +{% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\mglsunset} -%\changes{1.48}{2021-11-22}{new} -%Unset the flag. +% Set accessibility attributes if enabled. % \begin{macrocode} -\newcommand*{\mglsunset}[1]{% - \gls@ifnotmeasuring - {% - \glsxtrifmulti{#1}{\@mglsunset{#1}}% - {% - \glsxtrundefaction{Multi entry `#1' hasn't been defined}% - {You need to define `#1' with \string\multiglossaryentry}% - }% - }% -} + \glsxtrAccSuppAbbrSetNoLongAttrs\glscategorylabel % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\@mglsunset} -%\changes{1.48}{2021-11-22}{new} +% Setup the default fields. % \begin{macrocode} -\newcommand*{\@mglsunset}[1]{% - \expandafter\global\csname @gls@combined@#1@flagtrue\endcsname -} + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrshortdescname}, + sort={\the\glsshorttok}, + first={\glsfirstxpabbrvfont{\the\glsshorttok}{\glscategorylabel}}, + firstplural={\glsfirstxpabbrvfont{\the\glsshortpltok}{\glscategorylabel}}, + text={\glsxpabbrvfont{\the\glsshorttok}{\glscategorylabel}}, + plural={\glsxpabbrvfont{\the\glsshortpltok}{\glscategorylabel}}}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glssetattribute{\the\glslabeltok}{regular}{true}}% +}% +{% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\mglsreset} -%\changes{1.48}{2021-11-22}{new} -%Unset the flag. +%\changes{1.42}{2020-02-03}{removed \cs{protect} from \cs{glsxtrsmsuffix}} % \begin{macrocode} -\newcommand*{\mglsreset}[1]{% - \gls@ifnotmeasuring - {% - \glsxtrifmulti{#1}{\@mglsreset{#1}}% - {% - \glsxtrundefaction{Multi entry `#1' hasn't been defined}% - {You need to define `#1' with \string\multiglossaryentry}% - }% - }% -} + \renewcommand*\glsabbrvfont[1]{\glsabbrvsmfont{##1}}% + \renewcommand*\glsfirstabbrvfont[1]{\glsfirstabbrvsmfont{##1}}% + \renewcommand*{\abbrvpluralsuffix}{\glsxtrsmsuffix}% + \renewcommand*\glsxtrrevert[1]{\glsxtrsmrevert{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslongdefaultfont{##1}}% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\@mglsreset} -%\changes{1.48}{2021-11-22}{new} +% The inline full form displays the short format followed by the +% long form in parentheses. % \begin{macrocode} -\newcommand*{\@mglsreset}[1]{% - \expandafter\global\csname @gls@combined@#1@flagfalse\endcsname -} + \renewcommand*{\glsxtrinlinefullformat}[2]{% + \glsxtrshortlongformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvsmfont}% + }% + \renewcommand*{\glsxtrinlinefullplformat}[2]{% + \glsxtrshortlongplformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvsmfont}% + }% + \renewcommand*{\Glsxtrinlinefullformat}[2]{% + \Glsxtrshortlongformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvsmfont}% + }% + \renewcommand*{\Glsxtrinlinefullplformat}[2]{% + \Glsxtrshortlongplformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvsmfont}% + }% + \renewcommand*{\GLSxtrinlinefullformat}[2]{% + \GLSxtrshortlongformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvsmfont}% + }% + \renewcommand*{\GLSxtrinlinefullplformat}[2]{% + \GLSxtrshortlongplformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvsmfont}% + }% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\mglslocalunset} -%\changes{1.48}{2021-11-22}{new} -%Unset the flag. +% The first use full form only displays the short form, but it +% typically won't be used as the \catattr{regular} attribute is set by this style. % \begin{macrocode} -\newcommand*{\mglslocalunset}[1]{% - \gls@ifnotmeasuring - {% - \glsxtrifmulti{#1}{\@mglslocalunset{#1}}% - {% - \glsxtrundefaction{Multi entry `#1' hasn't been defined}% - {You need to define `#1' with \string\multiglossaryentry}% - }% - }% + \renewcommand*{\glsxtrfullformat}[2]{% + \glsxtrshortformat{##1}{##2}{\glsfirstabbrvsmfont}% + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsxtrshortplformat{##1}{##2}{\glsfirstabbrvsmfont}% + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \Glsxtrshortformat{##1}{##2}{\glsfirstabbrvsmfont}% + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \Glsxtrshortplformat{##1}{##2}{\glsfirstabbrvsmfont}% + }% + \renewcommand*{\GLSxtrfullformat}[2]{% + \GLSxtrshortformat{##1}{##2}{\glsfirstabbrvsmfont}% + }% + \renewcommand*{\GLSxtrfullplformat}[2]{% + \GLSxtrshortplformat{##1}{##2}{\glsfirstabbrvsmfont}% + }% } % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\@mglslocalunset} -%\changes{1.48}{2021-11-22}{new} +%\end{abbrvstyle} +%\begin{abbrvstyle}{short-sm-nolong-desc} +%\changes{1.04}{2016-05-02}{new} % \begin{macrocode} -\newcommand*{\@mglslocalunset}[1]{% - \csname @gls@combined@#1@flagtrue\endcsname -} +\letabbreviationstyle{short-sm-nolong-desc}{short-sm-desc} % \end{macrocode} -%\end{macro} +%\end{abbrvstyle} % -%\begin{macro}{\mglslocalreset} -%\changes{1.48}{2021-11-22}{new} -%Unset the flag. +%\begin{abbrvstyle}{nolong-short-sm} +%\changes{1.21}{2017-11-03}{new} % \begin{macrocode} -\newcommand*{\mglslocalreset}[1]{% - \gls@ifnotmeasuring - {% - \glsxtrifmulti{#1}{\@mglslocalreset{#1}}% - {% - \glsxtrundefaction{Multi entry `#1' hasn't been defined}% - {You need to define `#1' with \string\multiglossaryentry}% - }% - }% -} +\newabbreviationstyle{nolong-short-sm}% +{% + \GlsXtrUseAbbrStyleSetup{short-sm-nolong}% +}% +{% + \GlsXtrUseAbbrStyleFmts{short-sm-nolong}% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\@mglslocalreset} -%\changes{1.48}{2021-11-22}{new} +% The inline full form displays the long form followed by the +% short form in parentheses. % \begin{macrocode} -\newcommand*{\@mglslocalreset}[1]{% - \csname @gls@combined@#1@flagfalse\endcsname + \renewcommand*{\glsxtrinlinefullformat}[2]{% + \glsxtrlongshortformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvsmfont}% + }% + \renewcommand*{\glsxtrinlinefullplformat}[2]{% + \glsxtrlongshortplformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvsmfont}% + }% + \renewcommand*{\Glsxtrinlinefullformat}[2]{% + \Glsxtrlongshortformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvsmfont}% + }% + \renewcommand*{\Glsxtrinlinefullplformat}[2]{% + \Glsxtrlongshortplformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvsmfont}% + }% + \renewcommand*{\GLSxtrinlinefullformat}[2]{% + \GLSxtrlongshortformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvsmfont}% + }% + \renewcommand*{\GLSxtrinlinefullplformat}[2]{% + \GLSxtrlongshortplformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvsmfont}% + }% } % \end{macrocode} -%\end{macro} +%\end{abbrvstyle} % -%\begin{macro}{\mglsunsetall} -%\changes{1.48}{2021-11-22}{new} -%Unset all. +%\begin{abbrvstyle}{long-noshort-sm} +%\changes{0.5}{2015-12-07}{new} +%\changes{1.04}{2016-05-02}{renamed from \qt{long-sm}} +% The smallcaps font will only be used if +% the short form is explicitly invoked through commands like +% \cs{glsxtrshort}. % \begin{macrocode} -\newcommand*{\mglsunsetall}{% - \@for\@mgls@thislabel:=\@multi@glossaryentry@list\do{\mglsunset\@mgls@thislabel}% -}% +\newabbreviationstyle{long-noshort-sm}% +{% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\mglsresetall} -%\changes{1.48}{2021-11-22}{new} -%Reset all. +% Set accessibility attributes if enabled. % \begin{macrocode} -\newcommand*{\mglsresetall}{% - \@for\@mgls@thislabel:=\@multi@glossaryentry@list\do{\mglsreset\@mgls@thislabel}% -}% + \glsxtrAccSuppAbbrSetNameShortAttrs\glscategorylabel % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\mglsSetMain} -%\changes{1.48}{2021-11-22}{new} -%\begin{definition} -%\cs{mglsSetName}\marg{multi-label}\marg{new main} -%\end{definition} -%Allow the main label to be changed (local). +% Setup the default fields. % \begin{macrocode} -\newrobustcmd{\mglsSetMain}[2]{% - \ifcsundef{@gls@combined@#1@main}% - {\PackageError{glossaries-extra}{Multi-entry label `#1' not defined}{}}% - {% - \protected@edef\@gls@combined@current@main{#2}% - \letcs\@gls@combined@currentlist{@gls@combined@#1@list}% + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrlongnoshortname}, + sort={\the\glsshorttok}, + first={\glsfirstxplongfont{\the\glslongtok}{\glscategorylabel}}, + firstplural={\glsfirstxplongfont{\the\glslongpltok}{\glscategorylabel}}, + text={\glsxplongfont{\the\glslongtok}{\glscategorylabel}}, + plural={\glsxplongfont{\the\glslongpltok}{\glscategorylabel}},% + description={\the\glslongtok}% + }% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glssetattribute{\the\glslabeltok}{regular}{true}}% +}% +{% % \end{macrocode} -% Check that the given label is in the list of elements and update -% main and last other element index. +%\changes{1.42}{2020-02-03}{removed \cs{protect} from \cs{glsxtrsmsuffix}} % \begin{macrocode} - \mglselementindex=0\relax - \count@=0\relax - \@for\@gls@tmp:=\@gls@combined@currentlist\do{% - \advance\mglselementindex by 1\relax - \ifx\@gls@combined@current@main\@gls@tmp - \count@=\mglselementindex\relax - \let\@gls@combined@finalitem\@gls@tmp - \ifmultiglossaryentryglobal - \global\cslet{@gls@combined@#1@main}\@gls@combined@current@main - \csxdef{@gls@combined@#1@mainindex}{\the\mglselementindex}% - \else - \cslet{@gls@combined@#1@main}\@gls@combined@current@main - \csedef{@gls@combined@#1@mainindex}{\the\mglselementindex}% - \fi - \else - \ifmultiglossaryentryglobal - \csxdef{@gls@combined@#1@lastotherindex}{\the\mglselementindex}% - \else - \csedef{@gls@combined@#1@lastotherindex}{\the\mglselementindex}% - \fi - \fi - }% - \ifnum\count@=0\relax - \PackageError{glossaries-extra}{Label `#2' is not in `#1' set - (\@gls@combined@currentlist)}{}% + \renewcommand*\glsabbrvfont[1]{\glsabbrvsmfont{##1}}% + \renewcommand*\glsfirstabbrvfont[1]{\glsfirstabbrvsmfont{##1}}% + \renewcommand*{\abbrvpluralsuffix}{\glsxtrsmsuffix}% + \renewcommand*\glsxtrrevert[1]{\glsxtrsmrevert{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslongdefaultfont{##1}}% % \end{macrocode} -% Default to final item. +% The format for subsequent use (not used when the regular attribute +% is set). % \begin{macrocode} - \ifmultiglossaryentryglobal - \global\cslet{@gls@combined@#1@main}\@gls@combined@finalitem - \csxdef{@gls@combined@#1@mainindex}{\the\mglselementindex}% - \csxdef{@gls@combined@#1@lastotherindex}{% - \number\numexpr\mglselementindex-1 }% - \else - \cslet{@gls@combined@#1@main}\@gls@combined@finalitem - \csedef{@gls@combined@#1@mainindex}{\the\mglselementindex}% - \csedef{@gls@combined@#1@lastotherindex}{% - \number\numexpr\mglselementindex-1 }% - \fi - \fi + \renewcommand*{\glsxtrsubsequentfmt}[2]{% + \glsxtrlongformat{##1}{##2}{\glslongdefaultfont}% + }% + \renewcommand*{\glsxtrsubsequentplfmt}[2]{% + \glsxtrlongplformat{##1}{##2}{\glslongdefaultfont}% + }% + \renewcommand*{\Glsxtrsubsequentfmt}[2]{% + \Glsxtrlongformat{##1}{##2}{\glslongdefaultfont}% + }% + \renewcommand*{\Glsxtrsubsequentplfmt}[2]{% + \Glsxtrlongplformat{##1}{##2}{\glslongdefaultfont}% + }% + \renewcommand*{\GLSxtrsubsequentfmt}[2]{% + \GLSxtrlongformat{##1}{##2}{\glslongdefaultfont}% + }% + \renewcommand*{\GLSxtrsubsequentplfmt}[2]{% + \GLSxtrlongplformat{##1}{##2}{\glslongdefaultfont}% }% -} % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\mglsSetOptions} -%\changes{1.48}{2021-11-22}{new} -%\begin{definition} -%\cs{mglsSetOptions}\marg{multi-label}\marg{new options} -%\end{definition} -%Allow the options to be changed (local). No expansion is applied. +% The inline full form displays the long format followed by the +% short form in parentheses. % \begin{macrocode} -\newrobustcmd{\mglsSetOptions}[2]{% - \ifcsundef{@gls@combined@#1@main}% - {\PackageError{glossaries-extra}{Multi-entry label `#1' not defined}{}}% - {% - \csdef{@gls@combined@#1@options}{#2}% + \renewcommand*{\glsxtrinlinefullformat}[2]{% + \glsxtrlongshortformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvsmfont}% + }% + \renewcommand*{\glsxtrinlinefullplformat}[2]{% + \glsxtrlongshortplformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvsmfont}% + }% + \renewcommand*{\Glsxtrinlinefullformat}[2]{% + \Glsxtrlongshortformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvsmfont}% + }% + \renewcommand*{\Glsxtrinlinefullplformat}[2]{% + \Glsxtrlongshortplformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvsmfont}% + }% + \renewcommand*{\GLSxtrinlinefullformat}[2]{% + \GLSxtrlongshortformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvsmfont}% + }% + \renewcommand*{\GLSxtrinlinefullplformat}[2]{% + \GLSxtrlongshortplformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvsmfont}% }% -} % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\mglsAddOptions} -%\changes{1.48}{2021-11-22}{new} -%\begin{definition} -%\cs{mglsAddOptions}\marg{multi-label}\marg{extra options} -%\end{definition} -%Allow the options to be changed (local). No expansion is applied. +% The first use full form only displays the long form, but it +% typically won't be used as the \catattr{regular} attribute is set by this style. % \begin{macrocode} -\newrobustcmd{\mglsAddOptions}[2]{% - \ifcsundef{@gls@combined@#1@main}% - {\PackageError{glossaries-extra}{Multi-entry label `#1' not defined}{}}% - {% - \ifcsempty{@gls@combined@#1@options}% - {\csdef{@gls@combined@#1@options}{#2}}% - {\csappto{@gls@combined@#1@options}{,#2}}% + \renewcommand*{\glsxtrfullformat}[2]{% + \glsxtrlongformat{##1}{##2}{\glsfirstlongdefaultfont}% + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsxtrlongplformat{##1}{##2}{\glsfirstlongdefaultfont}% + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \Glsxtrlongformat{##1}{##2}{\glsfirstlongdefaultfont}% + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \Glsxtrlongplformat{##1}{##2}{\glsfirstlongdefaultfont}% + }% + \renewcommand*{\GLSxtrfullformat}[2]{% + \GLSxtrlongformat{##1}{##2}{\glsfirstlongdefaultfont}% + }% + \renewcommand*{\GLSxtrfullplformat}[2]{% + \GLSxtrlongplformat{##1}{##2}{\glsfirstlongdefaultfont}% }% } % \end{macrocode} -%\end{macro} -% -%Options for \cs{mgls}: -%\begin{macro}{\@mgls@all} -%\changes{1.48}{2021-11-22}{new} -%Options to apply to all elements. +%\end{abbrvstyle} +%\begin{abbrvstyle}{long-sm} +%Backward compatibility: % \begin{macrocode} -\newcommand*{\@mgls@all}{} -\define@key{mgls}{all}{\renewcommand*{\@mgls@all}{#1}} +\@glsxtr@deprecated@abbrstyle{long-sm}{long-noshort-sm} % \end{macrocode} -%\end{macro} +%\end{abbrvstyle} % -%\begin{macro}{\@mgls@main} -%\changes{1.48}{2021-11-22}{new} -%Options to apply to the main element only. +%\begin{abbrvstyle}{long-noshort-sm-desc} +%\changes{0.5}{2015-12-07}{new} +%\changes{1.04}{2016-05-02}{renamed from \cs{long-desc-sm}} +% The smaller font will only be used if +% the short form is explicitly invoked through commands like +% \cs{glsxtrshort}. % \begin{macrocode} -\newcommand*{\@mgls@main}{} -\define@key{mgls}{main}{\renewcommand*{\@mgls@main}{#1}} +\newabbreviationstyle{long-noshort-sm-desc}% +{% + \GlsXtrUseAbbrStyleSetup{long-noshort-desc}% +}% +{% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\@mgls@others} -%\changes{1.48}{2021-11-22}{new} -%Options to apply to the other (no main) elements. +%\changes{1.42}{2020-02-03}{removed \cs{protect} from \cs{glsxtrsmsuffix}} % \begin{macrocode} -\newcommand*{\@mgls@others}{} -\define@key{mgls}{others}{\renewcommand*{\@mgls@others}{#1}} + \renewcommand*\glsabbrvfont[1]{\glsabbrvsmfont{##1}}% + \renewcommand*\glsfirstabbrvfont[1]{\glsfirstabbrvsmfont{##1}}% + \renewcommand*{\abbrvpluralsuffix}{\glsxtrsmsuffix}% + \renewcommand*\glsxtrrevert[1]{\glsxtrsmrevert{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslongdefaultfont{##1}}% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\@mgls@setup} -%\changes{1.48}{2021-11-22}{new} -%Options to apply to \cs{multiglossaryentrysetup}. +% The format for subsequent use (not used when the regular attribute +% is set). % \begin{macrocode} -\newcommand*{\@mgls@setup}{} -\define@key{mgls}{setup}{% - \@mgls@setup@do{\renewcommand*{\@mgls@setup}{#1}}% -} + \renewcommand*{\glsxtrsubsequentfmt}[2]{% + \glsxtrlongformat{##1}{##2}{\glslongdefaultfont}% + }% + \renewcommand*{\glsxtrsubsequentplfmt}[2]{% + \glsxtrlongplformat{##1}{##2}{\glslongdefaultfont}% + }% + \renewcommand*{\Glsxtrsubsequentfmt}[2]{% + \Glsxtrlongformat{##1}{##2}{\glslongdefaultfont}% + }% + \renewcommand*{\Glsxtrsubsequentplfmt}[2]{% + \Glsxtrlongplformat{##1}{##2}{\glslongdefaultfont}% + }% + \renewcommand*{\GLSxtrsubsequentfmt}[2]{% + \GLSxtrlongformat{##1}{##2}{\glslongdefaultfont}% + }% + \renewcommand*{\GLSxtrsubsequentplfmt}[2]{% + \GLSxtrlongplformat{##1}{##2}{\glslongdefaultfont}% + }% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\@mgls@setup@do} -%\changes{1.48}{2021-11-22}{new} +% The inline full form displays the long format followed by the +% short form in parentheses. % \begin{macrocode} -\newcommand*{\@mgls@setup@do}[1]{#1} + \renewcommand*{\glsxtrinlinefullformat}[2]{% + \glsxtrlongshortformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvsmfont}% + }% + \renewcommand*{\glsxtrinlinefullplformat}[2]{% + \glsxtrlongshortplformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvsmfont}% + }% + \renewcommand*{\Glsxtrinlinefullformat}[2]{% + \Glsxtrlongshortformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvsmfont}% + }% + \renewcommand*{\Glsxtrinlinefullplformat}[2]{% + \Glsxtrlongshortplformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvsmfont}% + }% + \renewcommand*{\GLSxtrinlinefullformat}[2]{% + \GLSxtrlongshortformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvsmfont}% + }% + \renewcommand*{\GLSxtrinlinefullplformat}[2]{% + \GLSxtrlongshortplformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvsmfont}% + }% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\@mgls@setup@do@not} -%\changes{1.48}{2021-11-22}{new} +% The first use full form only displays the long form, but it +% typically won't be used as the \catattr{regular} attribute is set by this style. % \begin{macrocode} -\newcommand*{\@mgls@setup@do@not}[1]{% - \PackageError{glossaries-extra}{`setup' key not permitted inside - `mglsopts' value}{}% + \renewcommand*{\glsxtrfullformat}[2]{% + \glsxtrlongformat{##1}{##2}{\glsfirstlongdefaultfont}% + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsxtrlongplformat{##1}{##2}{\glsfirstlongdefaultfont}% + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \Glsxtrlongformat{##1}{##2}{\glsfirstlongdefaultfont}% + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \Glsxtrlongplformat{##1}{##2}{\glsfirstlongdefaultfont}% + }% + \renewcommand*{\GLSxtrfullformat}[2]{% + \GLSxtrlongformat{##1}{##2}{\glsfirstlongdefaultfont}% + }% + \renewcommand*{\GLSxtrfullplformat}[2]{% + \GLSxtrlongplformat{##1}{##2}{\glsfirstlongdefaultfont}% + }% } % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\mgls@disable@setup} -%\changes{1.48}{2021-11-22}{new} +%\end{abbrvstyle} +%\begin{abbrvstyle}{long-desc-sm} +%Backward compatibility: % \begin{macrocode} -\newcommand*{\mgls@disable@setup}{% - \let\@mgls@setup@do\@mgls@setup@do@not -} +\@glsxtr@deprecated@abbrstyle{long-desc-sm}{long-noshort-sm-desc} % \end{macrocode} -%\end{macro} +%\end{abbrvstyle} % -%\begin{macro}{\mgls@enable@setup} -%\changes{1.48}{2021-11-22}{new} +%\begin{abbrvstyle}{short-sm-footnote} +%\changes{0.5}{2015-12-07}{new} +%\changes{1.04}{2016-05-02}{renamed from \qt{footnote-sm}} +%\changes{1.42}{2020-02-03}{added missing text key} % \begin{macrocode} -\newcommand*{\mgls@enable@setup}{% - \let\@mgls@setup@do\@firstofone -} +\newabbreviationstyle{short-sm-footnote}% +{% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\@mgls@unsetaction} -%\changes{1.48}{2021-11-22}{new} +% Set accessibility attributes if enabled. % \begin{macrocode} -\newcommand\@mgls@unsetaction{0} -\define@choicekey{mgls}{multiunset}[\@mgls@unsetaction@val\@mgls@unsetaction]% - {global,local,none}{} + \glsxtrAccSuppAbbrSetNoLongAttrs\glscategorylabel % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\ifKV@mgls@presetlocal} -%\changes{1.48}{2021-11-22}{new} +% Setup the default fields. % \begin{macrocode} -\define@boolkey{mgls}{presetlocal}[true]{} -\KV@mgls@presetlocalfalse + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrfootnotename}, + sort={\the\glsshorttok}, + description={\the\glslongtok},% + first={\glsfirstxpabbrvfont{\the\glsshorttok}{\glscategorylabel}% + \protect\glsxtrabbrvfootnote{\the\glslabeltok}% + {\protect\glsfirstlongfootnotefont{\the\glslongtok}}},% + firstplural={\glsfirstxpabbrvfont{\the\glsshortpltok}{\glscategorylabel}% + \protect\glsxtrabbrvfootnote{\the\glslabeltok}% + {\protect\glsfirstlongfootnotefont{\the\glslongpltok}}},% + text={\glsxpabbrvfont{\the\glsshorttok}{\glscategorylabel}},% + plural={\glsxpabbrvfont{\the\glsshortpltok}{\glscategorylabel}}}% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\@mgls@hyper} -%\changes{1.48}{2021-11-22}{new} +% Switch off hyperlinks on first use to prevent nested hyperlinks, +% and unset the \catattr{regular} attribute if it has been set. +%\changes{0.5.1}{2015-12-07}{switch off regular attribute if set} % \begin{macrocode} -\newcommand*{\@mgls@hyper}{} -\define@choicekey{mgls}{hyper}[\@mgls@hyper@val\@mgls@hyper@nr]{true,false}[true]% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glssetattribute{\the\glslabeltok}{nohyperfirst}{true}% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% {% - \renewcommand*{\@mgls@hyper}{hyper=#1}% - \ifnum\@mgls@hyper@nr=1\relax - \let\@mgls@hyperlink\@secondoftwo - \else - \let\@mgls@hyperlink\@@mgls@hyperlink - \fi -} -% \end{macrocode} -%\end{macro} -% -%\begin{macro}{\@@mgls@hyperlink} -%\changes{1.48}{2021-11-22}{new} -% \begin{macrocode} -\newcommand*{\@@mgls@hyperlink}[2]{% - \ifx\@glslink\glsdonohyperlink - #2% - \else - \glsxtr@org@dohyperlink{\glolinkprefix#1}{#2}% - \fi -} % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\@mgls@hyperlink} -%\changes{1.48}{2021-11-22}{new} +%\changes{1.42}{2020-02-03}{removed \cs{protect} from \cs{glsxtrsmsuffix}} % \begin{macrocode} -\let\@mgls@hyperlink\@@mgls@hyperlink + \renewcommand*\glsabbrvfont[1]{\glsabbrvsmfont{##1}}% + \renewcommand*\glsfirstabbrvfont[1]{\glsfirstabbrvsmfont{##1}}% + \renewcommand*{\abbrvpluralsuffix}{\glsxtrsmsuffix}% + \renewcommand*\glsxtrrevert[1]{\glsxtrsmrevert{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongfootnotefont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslongfootnotefont{##1}}% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\mglsforelements} -%\changes{1.48}{2021-11-22}{new} -%\begin{definition} -%\cs{mglsforelements}\marg{multi-label}\marg{cs}\marg{body} -%\end{definition} +% The full format displays the short form followed by the long form +% as a footnote. % \begin{macrocode} -\newcommand*{\mglsforelements}[3]{% - \expandafter\@for\expandafter#2\expandafter:\expandafter - =\csname @gls@combined@#1@list\endcsname\do{#3}% -} + \renewcommand*{\glsxtrfullformat}[2]{% + \glsxtrshortformat{##1}{##2}{\glsfirstabbrvsmfont}% + \protect\glsxtrabbrvfootnote{##1}% + {\glsxtrfootnotelongformat{##1}{\glsfirstlongfootnotefont}}% + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsxtrshortplformat{##1}{##2}{\glsfirstabbrvsmfont}% + \protect\glsxtrabbrvfootnote{##1}% + {\glsxtrfootnotelongplformat{##1}{\glsfirstlongfootnotefont}}% + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \Glsxtrshortformat{##1}{##2}{\glsfirstabbrvsmfont}% + \protect\glsxtrabbrvfootnote{##1}% + {\glsxtrfootnotelongformat{##1}{\glsfirstlongfootnotefont}}% + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \Glsxtrshortplformat{##1}{##2}{\glsfirstabbrvsmfont}% + \protect\glsxtrabbrvfootnote{##1}% + {\glsxtrfootnotelongplformat{##1}{\glsfirstlongfootnotefont}}% + }% + \renewcommand*{\GLSxtrfullformat}[2]{% + \GLSxtrshortformat{##1}{##2}{\glsfirstabbrvsmfont}% + \protect\glsxtrabbrvfootnote{##1}% + {\glsxtrfootnotelongformat{##1}{\glsfirstlongfootnotefont}}% + }% + \renewcommand*{\GLSxtrfullplformat}[2]{% + \GLSxtrshortplformat{##1}{##2}{\glsfirstabbrvsmfont}% + \protect\glsxtrabbrvfootnote{##1}% + {\glsxtrfootnotelongplformat{##1}{\glsfirstlongfootnotefont}}% + }% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\mglsforotherelements} -%\changes{1.48}{2021-11-22}{new} -%\begin{definition} -%\cs{mglsforotherelements}\marg{multi-label}\marg{cs}\marg{body} -%\end{definition} +% The first use full form and the inline full form use the short +% (long) style. % \begin{macrocode} -\newcommand*{\mglsforotherelements}[3]{% - \expandafter\@for\expandafter#2\expandafter:\expandafter - =\csname @gls@combined@#1@list\endcsname\do - {\expandafter\ifdefequal\csname @gls@combined@#1@main\endcsname{#2}{}{#3}}% + \renewcommand*{\glsxtrinlinefullformat}[2]{% + \glsxtrshortlongformat{##1}{##2}% + {\glsfirstlongfootnotefont}{\glsfirstabbrvsmfont}% + }% + \renewcommand*{\glsxtrinlinefullplformat}[2]{% + \glsxtrshortlongplformat{##1}{##2}% + {\glsfirstlongfootnotefont}{\glsfirstabbrvsmfont}% + }% + \renewcommand*{\Glsxtrinlinefullformat}[2]{% + \Glsxtrshortlongformat{##1}{##2}% + {\glsfirstlongfootnotefont}{\glsfirstabbrvsmfont}% + }% + \renewcommand*{\Glsxtrinlinefullplformat}[2]{% + \Glsxtrshortlongplformat{##1}{##2}% + {\glsfirstlongfootnotefont}{\glsfirstabbrvsmfont}% + }% + \renewcommand*{\GLSxtrinlinefullformat}[2]{% + \GLSxtrshortlongformat{##1}{##2}% + {\glsfirstlongfootnotefont}{\glsfirstabbrvsmfont}% + }% + \renewcommand*{\GLSxtrinlinefullplformat}[2]{% + \GLSxtrshortlongplformat{##1}{##2}% + {\glsfirstlongfootnotefont}{\glsfirstabbrvsmfont}% + }% } % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\mglsunsetothers} -%\changes{1.48}{2021-11-22}{new} +%\end{abbrvstyle} +%\begin{abbrvstyle}{footnote-sm} +%Backward compatibility: % \begin{macrocode} -\newcommand*{\mglsunsetothers}[1]{% - \mglsforotherelements{#1}{\@gls@tmp}{\glsunset{\@gls@tmp}}% -} +\@glsxtr@deprecated@abbrstyle{footnote-sm}{short-sm-footnote} % \end{macrocode} -%\end{macro} +%\end{abbrvstyle} % -%\begin{macro}{\mglslocalunsetothers} -%\changes{1.48}{2021-11-22}{new} +%\begin{abbrvstyle}{short-sm-footnote-desc} +% Like \abbrstyle{short-footnote} but with user supplied description. +%\changes{1.42}{2020-02-03}{new} % \begin{macrocode} -\newcommand*{\mglslocalunsetothers}[1]{% - \mglsforotherelements{#1}{\@gls@tmp}{\glslocalunset{\@gls@tmp}}% -} +\newabbreviationstyle{short-sm-footnote-desc}% +{% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\mglselementreset} -%\changes{1.48}{2021-11-22}{new} +% Set accessibility attributes if enabled. % \begin{macrocode} -\newcommand*{\mglselementreset}[1]{% - \ifKV@mgls@presetlocal - \glslocalreset{#1}% - \else - \glsreset{#1}% - \fi -} + \glsxtrAccSuppAbbrSetNameLongAttrs\glscategorylabel % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\mglselementunset} -%\changes{1.48}{2021-11-22}{new} +% Setup the default fields. % \begin{macrocode} -\newcommand*{\mglselementunset}[1]{% - \ifKV@mgls@presetlocal - \glslocalunset{#1}% - \else - \glsunset{#1}% - \fi -} + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrfootnotedescname}, + sort={\glsxtrfootnotedescsort}, + first={\glsfirstxpabbrvfont{\the\glsshorttok}{\glscategorylabel}% + \protect\glsxtrabbrvfootnote{\the\glslabeltok}% + {\protect\glsfirstlongfootnotefont{\the\glslongtok}}},% + firstplural={\glsfirstxpabbrvfont{\the\glsshortpltok}{\glscategorylabel}% + \protect\glsxtrabbrvfootnote{\the\glslabeltok}% + {\protect\glsfirstlongfootnotefont{\the\glslongpltok}}},% + text={\glsxpabbrvfont{\the\glsshorttok}{\glscategorylabel}},% + plural={\glsxpabbrvfont{\the\glsshortpltok}{\glscategorylabel}}}% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\@mgls@resetall} -%\changes{1.48}{2021-11-22}{new} +% Switch off hyperlinks on first use to prevent nested hyperlinks, +% and unset the \catattr{regular} attribute if it has been set. +%\changes{0.5.1}{2015-12-07}{switch off regular attribute if set} % \begin{macrocode} -\newcommand*{\@mgls@resetall}{} -\define@choicekey{mgls}{resetall}% -[\@mgls@resetall@val\@mgls@resetall@nr]{false,true}[true]% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glssetattribute{\the\glslabeltok}{nohyperfirst}{true}% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% {% - \ifcase\@mgls@resetall@nr\relax - \renewcommand*{\@mgls@resetall}{}% - \or - \renewcommand*{\@mgls@resetall}{% - \@for\@gls@resetlabel:=\mglscurrentlist\do{\mglselementreset\@gls@resetlabel}}% - \renewcommand*{\@mgls@unsetall}{}% - \fi + \GlsXtrUseAbbrStyleFmts{short-sm-footnote}% } % \end{macrocode} -%\end{macro} +%\end{abbrvstyle} % -%\begin{macro}{\@mgls@resetmain} -%\changes{1.48}{2021-11-22}{new} +%\begin{abbrvstyle}{short-sm-postfootnote} +%\changes{0.5}{2015-12-07}{new} +%\changes{1.04}{2016-05-02}{renamed from \qt{postfootnote-sm}} +%\changes{1.42}{2020-02-03}{added missing text key} % \begin{macrocode} -\newcommand*{\@mgls@resetmain}{} -\define@choicekey{mgls}{resetmain} -[\@mgls@resetmain@val\@mgls@resetmain@nr]{false,true}[true]% +\newabbreviationstyle{short-sm-postfootnote}% {% - \ifcase\@mgls@resetmain@nr\relax - \renewcommand*{\@mgls@resetmain}{}% - \or - \renewcommand*{\@mgls@resetmain}{\mglselementreset\mglscurrentmainlabel}% - \renewcommand*{\@mgls@unsetmain}{}% - \fi -} % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\@mgls@resetothers} -%\changes{1.48}{2021-11-22}{new} +% Set accessibility attributes if enabled. % \begin{macrocode} -\newcommand*{\@mgls@resetothers}{} -\define@choicekey{mgls}{resetothers} -[\@mgls@resetothers@val\@mgls@resetothers@nr]{false,true}[true]% -{% - \ifcase\@mgls@resetothers@nr\relax - \renewcommand*{\@mgls@resetothers}{}% - \or - \renewcommand*{\@mgls@resetothers}{% - \@for\@gls@resetlabel:=\mglscurrentlist\do{% - \ifx\@gls@resetlabel\mglscurrentmainlabel - \else - \mglselementreset\@gls@resetlabel - \fi - }% - }% - \renewcommand*{\@mgls@unsetothers}{}% - \fi -} + \glsxtrAccSuppAbbrSetNoLongAttrs\glscategorylabel % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\@mgls@unsetall} -%\changes{1.48}{2021-11-22}{new} +% Setup the default fields. % \begin{macrocode} -\newcommand*{\@mgls@unsetall}{} -\define@choicekey{mgls}{unsetall}% -[\@mgls@unsetall@val\@mgls@unsetall@nr]{false,true}[true]% -{% - \ifcase\@mgls@unsetall@nr\relax - \renewcommand*{\@mgls@unsetall}{}% - \or - \renewcommand*{\@mgls@unsetall}{% - \@for\@gls@unsetlabel:=\mglscurrentlist\do{\mglselementunset\@gls@unsetlabel}}% - \renewcommand*{\@mgls@resetall}{}% - \fi -} + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrfootnotename}, + sort={\the\glsshorttok}, + description={\the\glslongtok},% + first={\glsfirstxpabbrvfont{\the\glsshorttok}{\glscategorylabel}},% + firstplural={\glsfirstxpabbrvfont{\the\glsshortpltok}{\glscategorylabel}},% + text={\glsxpabbrvfont{\the\glsshorttok}{\glscategorylabel}},% + plural={\glsxpabbrvfont{\the\glsshortpltok}{\glscategorylabel}}}% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\@mgls@unsetmain} -%\changes{1.48}{2021-11-22}{new} +% Make this category insert a footnote after the link if this was +% the first use, and +% unset the \catattr{regular} attribute if it has been set. +% The footnote needs to be suppressed in the inline form. +%Previously this was done by redefining {glsxtrsetupfulldefs} but +%that interferes with other styles. Instead, this now uses \cs{glsxtrifwasglslike} +%\changes{1.49}{??}{removed redef of \cs{glsxtrsetupfulldefs}} % \begin{macrocode} -\newcommand*{\@mgls@unsetmain}{} -\define@choicekey{mgls}{unsetmain} -[\@mgls@unsetmain@val\@mgls@unsetmain@nr]{false,true}[true]% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \csdef{glsxtrpostlink\glscategorylabel}{% + \glsxtrifwasglslikeandfirstuse + {% + \glsxtrdopostpunc{\xpglsxtrpostabbrvfootnote}% + }% + {}% + }% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% {% - \ifcase\@mgls@unsetmain@nr\relax - \renewcommand*{\@mgls@unsetmain}{}% - \or - \renewcommand*{\@mgls@unsetmain}{\mglselementunset\mglscurrentmainlabel}% - \renewcommand*{\@mgls@resetmain}{}% - \fi -} % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\@mgls@unsetothers} -%\changes{1.48}{2021-11-22}{new} +%\changes{1.42}{2020-02-03}{removed \cs{protect} from \cs{glsxtrsmsuffix}} % \begin{macrocode} -\newcommand*{\@mgls@unsetothers}{} -\define@choicekey{mgls}{unsetothers} -[\@mgls@unsetothers@val\@mgls@unsetothers@nr]{false,true}[true]% -{% - \ifcase\@mgls@unsetothers@nr\relax - \renewcommand*{\@mgls@unsetothers}{}% - \or - \renewcommand*{\@mgls@unsetothers}{% - \@for\@gls@unsetlabel:=\mglscurrentlist\do{% - \ifx\@gls@unsetlabel\mglscurrentmainlabel - \else - \mglselementunset\@gls@unsetlabel - \fi - }% - }% - \renewcommand*{\@mgls@resetothers}{}% - \fi + \renewcommand*\glsabbrvfont[1]{\glsabbrvsmfont{##1}}% + \renewcommand*\glsfirstabbrvfont[1]{\glsfirstabbrvsmfont{##1}}% + \renewcommand*{\abbrvpluralsuffix}{\glsxtrsmsuffix}% + \renewcommand*\glsxtrrevert[1]{\glsxtrsmrevert{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongfootnotefont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslongfootnotefont{##1}}% +% \end{macrocode} +% The full format displays the short form. The long form is +% deferred. +% \begin{macrocode} + \renewcommand*{\glsxtrfullformat}[2]{% + \glsxtrshortformat{##1}{##2}{\glsfirstabbrvsmfont}% + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsxtrshortplformat{##1}{##2}{\glsfirstabbrvsmfont}% + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \Glsxtrshortformat{##1}{##2}{\glsfirstabbrvsmfont}% + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \Glsxtrshortplformat{##1}{##2}{\glsfirstabbrvsmfont}% + }% + \renewcommand*{\GLSxtrfullformat}[2]{% + \GLSxtrshortformat{##1}{##2}{\glsfirstabbrvsmfont}% + }% + \renewcommand*{\GLSxtrfullplformat}[2]{% + \GLSxtrshortplformat{##1}{##2}{\glsfirstabbrvsmfont}% + }% +% \end{macrocode} +% The first use full form and the inline full form use the short +% (long) style. +% \begin{macrocode} + \renewcommand*{\glsxtrinlinefullformat}[2]{% + \glsxtrshortlongformat{##1}{##2}% + {\glsfirstlongfootnotefont}{\glsfirstabbrvsmfont}% + }% + \renewcommand*{\glsxtrinlinefullplformat}[2]{% + \glsxtrshortlongplformat{##1}{##2}% + {\glsfirstlongfootnotefont}{\glsfirstabbrvsmfont}% + }% + \renewcommand*{\Glsxtrinlinefullformat}[2]{% + \Glsxtrshortlongformat{##1}{##2}% + {\glsfirstlongfootnotefont}{\glsfirstabbrvsmfont}% + }% + \renewcommand*{\Glsxtrinlinefullplformat}[2]{% + \Glsxtrshortlongplformat{##1}{##2}% + {\glsfirstlongfootnotefont}{\glsfirstabbrvsmfont}% + }% + \renewcommand*{\GLSxtrinlinefullformat}[2]{% + \GLSxtrshortlongformat{##1}{##2}% + {\glsfirstlongfootnotefont}{\glsfirstabbrvsmfont}% + }% + \renewcommand*{\GLSxtrinlinefullplformat}[2]{% + \GLSxtrshortlongplformat{##1}{##2}% + {\glsfirstlongfootnotefont}{\glsfirstabbrvsmfont}% + }% } % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\glsxtr@setup@docurrent} -%\changes{1.48}{2021-11-22}{new} -%Set up the commands to determine whether or not to do the current -%element. +%\end{abbrvstyle} +%\begin{abbrvstyle}{postfootnote-sm} +%Backward compatibility: % \begin{macrocode} -\newcommand{\glsxtr@setup@docurrent}{% +\@glsxtr@deprecated@abbrstyle{postfootnote-sm}{short-sm-postfootnote} % \end{macrocode} -% \cs{mglscurrentlabel} expands to the label of the current element. -% Should this element be skipped? +%\end{abbrvstyle} +% +%\begin{abbrvstyle}{short-sm-postfootnote-desc} +% Like \abbrstyle{short-sm-postfootnote} but with user supplied description. +%\changes{1.42}{2020-02-03}{new} % \begin{macrocode} - \ifx\mglscurrentlabel\mglscurrentmainlabel +\newabbreviationstyle{short-sm-postfootnote-desc}% +{% % \end{macrocode} -% Main element. Should it be skipped? +% Set accessibility attributes if enabled. % \begin{macrocode} - \mglsisfirstuse - {% - \ifKV@glsxtrcombined@firstskipmain - \let\@mgls@do@current@element\@gobble - \else - \let\@mgls@do@current@element\@firstofone - \fi - }% - {% - \ifKV@glsxtrcombined@usedskipmain - \let\@mgls@do@current@element\@gobble - \else - \let\@mgls@do@current@element\@firstofone - \fi - }% - \else + \glsxtrAccSuppAbbrSetNameLongAttrs\glscategorylabel % \end{macrocode} -% Other element. Should it be skipped? +% Setup the default fields. % \begin{macrocode} - \mglsisfirstuse - {% - \ifKV@glsxtrcombined@firstskipothers - \let\@mgls@do@current@element\@gobble - \else - \let\@mgls@do@current@element\@firstofone - \fi - }% - {% - \ifKV@glsxtrcombined@usedskipothers - \let\@mgls@do@current@element\@gobble - \else - \let\@mgls@do@current@element\@firstofone - \fi - }% - \fi -} + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrfootnotedescname}, + sort={\glsxtrfootnotedescsort}, + first={\glsfirstxpabbrvfont{\the\glsshorttok}{\glscategorylabel}},% + firstplural={\glsfirstxpabbrvfont{\the\glsshortpltok}{\glscategorylabel}},% + text={\glsxpabbrvfont{\the\glsshorttok}{\glscategorylabel}},% + plural={\glsxpabbrvfont{\the\glsshortpltok}{\glscategorylabel}}}% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\glsxtr@mgls@checklastelement} -%\changes{1.48}{2021-11-22}{new} -% If the last element is skipped, \cs{mglsiflast} needs -% adjusting. -% The first argument should be either "first" or "used". -% The second argument is the multi-element label. +% Make this category insert a footnote after the link if this was +% the first use, and +% unset the \catattr{regular} attribute if it has been set. +% The footnote needs to be suppressed in the inline form. +%Previously this was done by redefining {glsxtrsetupfulldefs} but +%that interferes with other styles. Instead, this now uses \cs{glsxtrifwasglslike} +%\changes{1.49}{??}{removed redef of \cs{glsxtrsetupfulldefs}} % \begin{macrocode} -\newcommand*{\glsxtr@mgls@checklastelement}[2]{% - \ifbool{KV@glsxtrcombined@#1skipmain}% - {% - \ifbool{KV@glsxtrcombined@#1skipothers}% - {% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \csdef{glsxtrpostlink\glscategorylabel}{% + \glsxtrifwasglslikeandfirstuse + {% % \end{macrocode} -% This condition has already been checked for. +% Ensure \cs{glslabel} is expanded as it may be +% lost by the time the footnote occurs. % \begin{macrocode} + \glsxtrdopostpunc{\xpglsxtrpostabbrvfootnote}% + }% + {}% }% + \glshasattribute{\the\glslabeltok}{regular}% {% -% \end{macrocode} -% Main skipped. The last item will be the last other element. -% \begin{macrocode} - \ifnum\mglselementindex=\glsxtrmultilastotherindex{#2}\relax - \let\mglsiflast\@firstoftwo - \else - \let\mglsiflast\@secondoftwo - \fi + \glssetattribute{\the\glslabeltok}{regular}{false}% }% + {}% }% - {% +}% +{% + \GlsXtrUseAbbrStyleFmts{short-sm-postfootnote}% +} % \end{macrocode} -% Main not skipped. +%\end{abbrvstyle} +% +%\subsection{Predefined Styles (Emphasized)} +% These styles use \cs{emph} for the short form. +%\begin{macro}{\glsabbrvemfont} +%\changes{1.04}{2016-05-02}{new} % \begin{macrocode} - \ifbool{KV@glsxtrcombined@#1skipothers}% - {% +\newcommand*{\glsabbrvemfont}[1]{\emph{#1}}% % \end{macrocode} -% Others skipped. The main element is the only item. +%\end{macro} +%\begin{macro}{\glsfirstabbrvemfont} +%\changes{1.04}{2016-05-02}{new} % \begin{macrocode} - \ifnum\mglselementindex=\glsxtrmultimainindex{#2}\relax - \let\mglsiflast\@firstoftwo - \else - \let\mglsiflast\@secondoftwo - \fi - }% - {% +\newcommand*{\glsfirstabbrvemfont}[1]{\glsabbrvemfont{#1}}% % \end{macrocode} -% None skipped. This isn't the last element. +%\end{macro} +% The default short form suffix: +%\begin{macro}{\glsxtremsuffix} +%\changes{0.5}{2015-12-07}{new} % \begin{macrocode} - \let\mglsiflast\@secondoftwo - }% - }% -} +\newcommand*{\glsxtremsuffix}{\glsxtrabbrvpluralsuffix} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\glsfirstlongemfont} +%\changes{1.04}{2016-05-02}{new} +%Only used by the \qt{long-em} styles. +% \begin{macrocode} +\newcommand*{\glsfirstlongemfont}[1]{\glslongemfont{#1}}% % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrmglsWarnAllSkipped} -%\changes{1.48}{2021-11-22}{new} -%Warning if all elements are skipped. The first argument is the -%warning message, the second argument is the inserted content (final -%optional argument), the third command is the encapsulation command -%(which may be a hyperlink). +%\begin{macro}{\glslongemfont} +%\changes{1.04}{2016-05-02}{new} +%Only used by the \qt{long-em} styles. % \begin{macrocode} -\newcommand{\glsxtrmglsWarnAllSkipped}[3]{% - \GlossariesExtraWarning{#1}% - #3{#2}% -} +\newcommand*{\glslongemfont}[1]{\emph{#1}}% % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtr@mgls@applyopts} -%\changes{1.48}{2021-11-22}{new} +%\begin{macro}{\glsxtremrevert} +%\changes{1.49}{??}{new} % \begin{macrocode} -\newcommand*{\glsxtr@mgls@applyopts}[1]{% - \edef\@mgls@dooptions{\noexpand\setkeys*{mgls}{\expandonce#1}}% - \@mgls@dooptions +\newcommand*{\glsxtremrevert}[1]{\textup{#1}}% % \end{macrocode} -% Append any unknown options to all. +%\end{macro} +% +%\begin{abbrvstyle}{long-short-em} +%\changes{0.5}{2015-12-07}{new} +% The long form is just set in the default long font. +%\changes{1.42}{2020-02-03}{added missing text key} % \begin{macrocode} - \ifdefvoid\XKV@rm{}{\eappto\@mgls@all{,\expandonce\XKV@rm}}% +\newabbreviationstyle{long-short-em}% +{% % \end{macrocode} -% If setup key has been used, check for pre-option keys: +% Set accessibility attributes if enabled. % \begin{macrocode} - \ifdefvoid\@mgls@setup - {}% - {% - \edef\@mgls@dooptions{% - \noexpand\setkeys*{glsxtrcombinedpreopts}{\expandonce\@mgls@setup}}% - \mgls@disable@mglsopts - \@mgls@dooptions - \mgls@enable@mglsopts + \glsxtrAccSuppAbbrSetFirstLongAttrs\glscategorylabel % \end{macrocode} -% Save remaining setup options. +% Setup the default fields. % \begin{macrocode} - \ifx\@mgls@setupoptions\@empty - \let\@mgls@setupoptions\XKV@rm - \else - \eappto\@mgls@setupoptions{,\expandonce\XKV@rm}% - \fi + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrlongshortname}, + sort={\the\glsshorttok}, + first={\glsfirstxplongfont{\the\glslongtok}{\glscategorylabel}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \protect\glsxtrparen{\glsfirstxpabbrvfont{\the\glsshorttok}{\glscategorylabel}}},% + firstplural={\glsfirstxplongfont{\the\glslongpltok}{\glscategorylabel}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \protect\glsxtrparen{\glsfirstxpabbrvfont{\the\glsshortpltok}{\glscategorylabel}}},% + text={\glsxpabbrvfont{\the\glsshorttok}{\glscategorylabel}},% + plural={\glsxpabbrvfont{\the\glsshortpltok}{\glscategorylabel}},% + description={\the\glslongtok}}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glsxtrsetcomplexstyle{\the\glslabeltok}{3}% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% }% +}% +{% % \end{macrocode} -% Apply gls unset/reset options. +%\changes{1.42}{2020-02-03}{removed \cs{protect} from \cs{glsxtremsuffix}} % \begin{macrocode} - \@mgls@resetall - \@mgls@unsetall - \@mgls@resetmain - \@mgls@unsetmain - \@mgls@resetothers - \@mgls@unsetothers + \renewcommand*\glsabbrvfont[1]{\glsabbrvemfont{##1}}% + \renewcommand*\glsfirstabbrvfont[1]{\glsfirstabbrvemfont{##1}}% + \renewcommand*{\abbrvpluralsuffix}{\glsxtremsuffix}% + \renewcommand*\glsxtrrevert[1]{\glsxtremrevert{##1}}% % \end{macrocode} -% Disable. +% Use the default long fonts. % \begin{macrocode} - \let\@mgls@resetall\@empty - \let\@mgls@resetmain\@empty - \let\@mgls@resetothers\@empty - \let\@mgls@unsetall\@empty - \let\@mgls@unsetmain\@empty - \let\@mgls@unsetothers\@empty + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslongdefaultfont{##1}}% % \end{macrocode} -% First use flags. +% The first use full form and the inline full form are the same for +% this style. % \begin{macrocode} - \ifmglsused\mglscurrentmultilabel - {\let\mglsisfirstuse\@secondoftwo}% - {\let\mglsisfirstuse\@firstoftwo}% + \renewcommand*{\glsxtrfullformat}[2]{% + \glsxtrlongshortformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvemfont}% + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsxtrlongshortplformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvemfont}% + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \Glsxtrlongshortformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvemfont}% + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \Glsxtrlongshortplformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvemfont}% + }% + \renewcommand*{\GLSxtrfullformat}[2]{% + \GLSxtrlongshortformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvemfont}% + }% + \renewcommand*{\GLSxtrfullplformat}[2]{% + \GLSxtrlongshortplformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvemfont}% + }% } % \end{macrocode} -%\end{macro} +%\end{abbrvstyle} % -%\begin{macro}{\@firstofthree} -%\changes{1.48}{2021-11-22}{new} +%\begin{abbrvstyle}{long-short-em-desc} +%\changes{0.5}{2015-12-07}{new} % \begin{macrocode} -\providecommand{\@firstofthree}[3]{#1} +\newabbreviationstyle{long-short-em-desc}% +{% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\@secondofthree} -%\changes{1.48}{2021-11-22}{new} +% Set accessibility attributes if enabled. % \begin{macrocode} -\providecommand{\@secondofthree}[3]{#2} + \glsxtrAccSuppAbbrSetTextShortAttrs\glscategorylabel % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\@thirdofthree} -%\changes{1.48}{2021-11-22}{new} +% Setup the default fields. % \begin{macrocode} -\providecommand{\@thirdofthree}[3]{#3} + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrlongshortdescname}, + sort={\glsxtrlongshortdescsort},% + first={\glsfirstxplongfont{\the\glslongtok}{\glscategorylabel}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \protect\glsxtrparen{\glsfirstxpabbrvfont{\the\glsshorttok}{\glscategorylabel}}},% + firstplural={\glsfirstxplongfont{\the\glslongpltok}{\glscategorylabel}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \protect\glsxtrparen{\glsfirstxpabbrvfont{\the\glsshortpltok}{\glscategorylabel}}},% + text={\glsxpabbrvfont{\the\glsshorttok}{\glscategorylabel}},% + plural={\glsxpabbrvfont{\the\glsshortpltok}{\glscategorylabel}}% + }% % \end{macrocode} -%\end{macro} -% -%The main internal command for referencing multi-entries: -%\begin{macro}{\glsxtr@mgls@inner} -%\changes{1.48}{2021-11-22}{new} -%\begin{definition} -%\cs{glsxtr@mgls@inner}\marg{options}\marg{label}\marg{insert}\marg{first -%cs}\marg{not first cs}\marg{main first cs}\marg{main other cs} -%\end{definition} +% Unset the \catattr{regular} attribute if it has been set. % \begin{macrocode} -\newcommand*{\glsxtr@mgls@inner}[7]{% - \let\mglslastmainlabel\@empty - \let\mglsiflastmainwasfirstuse\@firstoftwo - \let\mglsiflastmainwasplural\@secondoftwo - \let\mglsiflastmaincapscase\@firstofthree - \let\mglsiflastmainskipped\@firstoftwo - \bgroup - \ifcsundef{@gls@combined@#2@main}% - {% - \glsxtrundefaction{Multi entry `#2' hasn't been defined}% - {You need to define `#2' with \string\multiglossaryentry}% - \gdef\@mgls@post@hookdefs{% - \protected@edef\mglslastmultilabel{#2}% - \let\mglswasfirstuse\@firstoftwo - \let\mglslastcategory\@empty - \let\mglsiflastelementskipped\@firstoftwo - \let\mglsiflastelementwasfirstuse\@firstoftwo - \let\mglsiflastelementwasplural\@secondoftwo - \let\mglsiflastelementcapscase\@firstofthree - \let\mglslastelementlabel\@empty - \let\mgls@do@postlinkhook\relax - }% - }% - {% - \protected@edef\mglscurrentmultilabel{#2}% - \letcs\mglscurrentmainlabel{@gls@combined@#2@main}% - \letcs\mglscurrentlist{@gls@combined@#2@list}% - \letcs\mglscurrentoptions{@gls@combined@#2@options}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glsxtrsetcomplexstyle{\the\glslabeltok}{3}% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% % \end{macrocode} -% Initialise (may be changed if \texttt{multiunset} is present): +% As long-short-em style: % \begin{macrocode} - \ifmglsused\mglscurrentmultilabel - {\let\mglsisfirstuse\@secondoftwo}% - {\let\mglsisfirstuse\@firstoftwo}% + \GlsXtrUseAbbrStyleFmts{long-short-em}% +} % \end{macrocode} -% Only obtain pre-option keys: +%\end{abbrvstyle} +% +%\begin{abbrvstyle}{long-em-short-em} +%\changes{1.04}{2016-05-02}{new} +%\changes{1.42}{2020-02-03}{added missing text key} % \begin{macrocode} - \edef\@mgls@dooptions{% - \noexpand\setkeys*{glsxtrcombinedpreopts}{\expandonce\mglscurrentoptions}}% - \@mgls@dooptions +\newabbreviationstyle{long-em-short-em}% +{% % \end{macrocode} -% Save remaining setup options. +% Set accessibility attributes if enabled. % \begin{macrocode} - \let\@mgls@setupoptions\XKV@rm + \glsxtrAccSuppAbbrSetFirstLongAttrs\glscategorylabel % \end{macrocode} -% Apply \cs{mgls} options. +% Setup the default fields. +%\cs{glslongemfont} is used in the description since \cs{glsdesc} +%doesn't set the style. % \begin{macrocode} - \mgls@disable@setup - \ifdefvoid\@gls@combined@mglsopts - {}% - {\glsxtr@mgls@applyopts\@gls@combined@mglsopts}% - \mgls@enable@setup + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrlongshortname}, + sort={\the\glsshorttok}, + first={\glsfirstxplongfont{\the\glslongtok}{\glscategorylabel}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \protect\glsxtrparen{\glsfirstxpabbrvfont{\the\glsshorttok}{\glscategorylabel}}},% + firstplural={\glsfirstxplongfont{\the\glslongpltok}{\glscategorylabel}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \protect\glsxtrparen{\glsfirstxpabbrvfont{\the\glsshortpltok}{\glscategorylabel}}},% % \end{macrocode} -% Apply options provided in \verb|#1|. +%\changes{1.15}{2017-05-10}{fixed spelling of \cs{glsabbrvfont}} % \begin{macrocode} - \ifstrempty{#1}{}{\def\@mgls@options{#1}\glsxtr@mgls@applyopts\@mgls@options}% + text={\glsxpabbrvfont{\the\glsshorttok}{\glscategorylabel}},% + plural={\glsxpabbrvfont{\the\glsshortpltok}{\glscategorylabel}},% + description={\protect\glslongemfont{\the\glslongtok}}}% % \end{macrocode} -% Check for attribute settings. +% Unset the \catattr{regular} attribute if it has been set. % \begin{macrocode} - \ifx\@gls@combined@category\empty + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glsexclapplyinnerfmtfield{\the\glslabeltok}{desc}% + \glsxtrsetcomplexstyle{\the\glslabeltok}{3}% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% % \end{macrocode} -% No category +%\changes{1.42}{2020-02-03}{removed \cs{protect} from \cs{glsxtremsuffix}} % \begin{macrocode} - \else + \renewcommand*{\abbrvpluralsuffix}{\glsxtremsuffix}% + \renewcommand*\glsxtrrevert[1]{\glsxtremrevert{##1}}% + \renewcommand*{\glsabbrvfont}[1]{\glsabbrvemfont{##1}}% + \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvemfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongemfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslongemfont{##1}}% % \end{macrocode} -% Attribute options: +% The first use full form and the inline full form are the same for +% this style. % \begin{macrocode} - \glshascategoryattribute{\@gls@combined@category}{multioptions}% - {% - \letcs\@mgls@attroptions{@glsxtr@categoryattr@@\@gls@combined@category - @multioptions}% + \renewcommand*{\glsxtrfullformat}[2]{% + \glsxtrlongshortformat{##1}{##2}% + {\glsfirstlongemfont}{\glsfirstabbrvemfont}% + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsxtrlongshortplformat{##1}{##2}% + {\glsfirstlongemfont}{\glsfirstabbrvemfont}% + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \Glsxtrlongshortformat{##1}{##2}% + {\glsfirstlongemfont}{\glsfirstabbrvemfont}% + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \Glsxtrlongshortplformat{##1}{##2}% + {\glsfirstlongemfont}{\glsfirstabbrvemfont}% + }% + \renewcommand*{\GLSxtrfullformat}[2]{% + \GLSxtrlongshortformat{##1}{##2}% + {\glsfirstlongemfont}{\glsfirstabbrvemfont}% + }% + \renewcommand*{\GLSxtrfullplformat}[2]{% + \GLSxtrlongshortplformat{##1}{##2}% + {\glsfirstlongemfont}{\glsfirstabbrvemfont}% + }% +} % \end{macrocode} -% Only obtain pre-option keys: +%\end{abbrvstyle} +% +%\begin{abbrvstyle}{long-em-short-em-desc} +%\changes{1.04}{2016-05-02}{new} % \begin{macrocode} - \let\@gls@combined@mglsopts\@empty - \edef\@mgls@dooptions{% - \noexpand\setkeys*{glsxtrcombinedpreopts}{\expandonce\@mgls@attroptions}}% - \@mgls@dooptions +\newabbreviationstyle{long-em-short-em-desc}% +{% % \end{macrocode} -% Append remaining options: +% Set accessibility attributes if enabled. % \begin{macrocode} - \eappto\@mgls@setupoptions{,\expandonce\XKV@rm}% - \ifx\@gls@combined@mglsopts\@empty - \else + \glsxtrAccSuppAbbrSetTextShortAttrs\glscategorylabel % \end{macrocode} -% mgls options found: +% Setup the default fields. % \begin{macrocode} - \let\@mgls@setup\@empty - \mgls@disable@setup - \glsxtr@mgls@applyopts\@gls@combined@mglsopts - \mgls@enable@setup - \fi - }% - {}% - \fi + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrlongshortdescname}, + sort={\glsxtrlongshortdescsort},% + first={\glsfirstxplongfont{\the\glslongtok}{\glscategorylabel}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \protect\glsxtrparen{\glsfirstxpabbrvfont{\the\glsshorttok}{\glscategorylabel}}},% + firstplural={\glsfirstxplongfont{\the\glslongpltok}{\glscategorylabel}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \protect\glsxtrparen{\glsfirstxpabbrvfont{\the\glsshortpltok}{\glscategorylabel}}},% + text={\glsxpabbrvfont{\the\glsshorttok}{\glscategorylabel}},% + plural={\glsxpabbrvfont{\the\glsshortpltok}{\glscategorylabel}}% + }% % \end{macrocode} -% Apply setup options. +% Unset the \catattr{regular} attribute if it has been set. % \begin{macrocode} - \edef\@mgls@dooptions{% - \noexpand\setkeys{glsxtrcombined}{\expandonce\@mgls@setupoptions}}% - \@mgls@dooptions + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glsxtrsetcomplexstyle{\the\glslabeltok}{3}% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% + \GlsXtrUseAbbrStyleFmts{long-em-short-em}% +} % \end{macrocode} -% Provide local user-level access to category: +%\end{abbrvstyle} +% +%\begin{abbrvstyle}{short-em-long} +% Now the short (long) version +%\changes{0.5}{2015-12-07}{new} +%\changes{1.42}{2020-02-03}{added missing text key} % \begin{macrocode} - \let\mglscurrentcategory\@gls@combined@category +\newabbreviationstyle{short-em-long}% +{% % \end{macrocode} -% Should the entire content be a hyperlink? +% Set accessibility attributes if enabled. % \begin{macrocode} - \ifnum\@gls@combined@hyper=1\relax - \def\@mgls@combinedlink{\@mgls@hyperlink{\mglscurrentmainlabel}}% - \else - \def\@mgls@combinedlink{\@firstofone}% - \fi + \glsxtrAccSuppAbbrSetFirstLongAttrs\glscategorylabel % \end{macrocode} -% Entire content encapsulator. +% Setup the default fields. % \begin{macrocode} - \def\@gls@combined@encapsulator##1{% - \@mgls@combinedlink{\csuse{\@gls@combined@textformat}{##1}}}% + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrshortlongname}, + sort={\the\glsshorttok}, + description={\the\glslongtok},% + first={\glsfirstxpabbrvfont{\the\glsshorttok}{\glscategorylabel}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \protect\glsxtrparen{\glsfirstxplongfont{\the\glslongtok}{\glscategorylabel}}},% + firstplural={\glsfirstxpabbrvfont{\the\glsshortpltok}{\glscategorylabel}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \protect\glsxtrparen{\glsfirstxplongfont{\the\glslongpltok}{\glscategorylabel}}},% + text={\glsxpabbrvfont{\the\glsshorttok}{\glscategorylabel}},% + plural={\glsxpabbrvfont{\the\glsshortpltok}{\glscategorylabel}}}% % \end{macrocode} -% Initialise. +% Unset the \catattr{regular} attribute if it has been set. % \begin{macrocode} - \let\@mgls@do@current@element\@firstofone + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glsxtrsetcomplexstyle{\the\glslabeltok}{3}% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% % \end{macrocode} -% Check if all elements are being skipped. +% Mostly as short-long style: +%\changes{1.05}{2016-06-10}{fixed incorrect font used by long form} +%\changes{1.42}{2020-02-03}{removed \cs{protect} from \cs{glsxtremsuffix}} % \begin{macrocode} - \mglsisfirstuse - {% - \ifKV@glsxtrcombined@firstskipmain - \ifKV@glsxtrcombined@firstskipothers + \renewcommand*{\abbrvpluralsuffix}{\glsxtremsuffix}% + \renewcommand*\glsxtrrevert[1]{\glsxtremrevert{##1}}% + \renewcommand*\glsabbrvfont[1]{\glsabbrvemfont{##1}}% + \renewcommand*\glsfirstabbrvfont[1]{\glsfirstabbrvemfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslongdefaultfont{##1}}% % \end{macrocode} -% Just do the warning and insert. This will ignore the loop. +% The first use full form and the inline full form are the same for +% this style. % \begin{macrocode} - \let\@gls@org@combined@encapsulator\@gls@combined@encapsulator - \def\@gls@combined@encapsulator##1{% - \glsxtrmglsWarnAllSkipped{All elements skipped for - first use of multi-entry `#2'}{#3}% - {\@gls@org@combined@encapsulator}% - }% - \let\@mgls@do@current@element\@gobble - \fi - \fi - }% - {% - \ifKV@glsxtrcombined@usedskipmain - \ifKV@glsxtrcombined@usedskipothers + \renewcommand*{\glsxtrfullformat}[2]{% + \glsxtrshortlongformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvemfont}% + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsxtrshortlongplformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvemfont}% + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \Glsxtrshortlongformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvemfont}% + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \Glsxtrshortlongplformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvemfont}% + }% + \renewcommand*{\GLSxtrfullformat}[2]{% + \GLSxtrshortlongformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvemfont}% + }% + \renewcommand*{\GLSxtrfullplformat}[2]{% + \GLSxtrshortlongplformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvemfont}% + }% +} % \end{macrocode} -% Just do the warning and insert. This will ignore the loop. +%\end{abbrvstyle} +% +%\begin{abbrvstyle}{short-em-long-desc} +% As before but user provides description +%\changes{0.5}{2015-12-07}{new} % \begin{macrocode} - \let\@gls@org@combined@encapsulator\@gls@combined@encapsulator - \def\@gls@combined@encapsulator##1{% - \glsxtrmglsWarnAllSkipped{All elements skipped for - subsequent use of multi-entry `#2'}{#3}% - {\@gls@org@combined@encapsulator}% - }% - \let\@mgls@do@current@element\@gobble - \fi - \fi - }% +\newabbreviationstyle{short-em-long-desc}% +{% % \end{macrocode} -% Determine prefix and suffix. +% Set accessibility attributes if enabled. % \begin{macrocode} - \mglsisfirstuse - {% - \let\mglscurrentprefix\@gls@combined@firstprefix - \let\mglscurrentsuffix\@gls@combined@firstsuffix - }% - {% - \let\mglscurrentprefix\@gls@combined@usedprefix - \let\mglscurrentsuffix\@gls@combined@usedsuffix - }% + \glsxtrAccSuppAbbrSetTextShortAttrs\glscategorylabel % \end{macrocode} -%Set up post-link hook used after current scope. +% Setup the default fields. % \begin{macrocode} - \xdef\@mgls@post@hookdefs{% - \noexpand\def\noexpand\mglslastmultilabel{\expandonce\mglscurrentmultilabel}% - \noexpand\def\noexpand\mglslastcategory{\mglscurrentcategory}% - }% - \ifx\@mgls@do@current@element\@gobble - \gappto\@mgls@post@hookdefs{% - \let\mglsiflastelementskipped\@firstoftwo - \let\mglslastelementlabel\@empty - \let\mglsiflastelementwasfirstuse\@firstoftwo - \let\mglsiflastelementwasplural\@secondoftwo - \let\mglsiflastelementcapscase\@firstofthree - }% - \fi - \mglsisfirstuse - {% - \gappto\@mgls@post@hookdefs{\let\mglswasfirstuse\@firstoftwo}% + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrshortlongdescname}, + sort={\glsxtrshortlongdescsort}, + first={\glsfirstxpabbrvfont{\the\glsshorttok}{\glscategorylabel}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \protect\glsxtrparen{\glsfirstxplongfont{\the\glslongtok}{\glscategorylabel}}},% + firstplural={\glsfirstxpabbrvfont{\the\glsshortpltok}{\glscategorylabel}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \protect\glsxtrparen{\glsfirstxplongfont{\the\glslongpltok}{\glscategorylabel}}},% + text={\glsxpabbrvfont{\the\glsshorttok}{\glscategorylabel}},% + plural={\glsxpabbrvfont{\the\glsshortpltok}{\glscategorylabel}}% + }% % \end{macrocode} -% Determine if the multi-entry post-link hook should be applied. +% Unset the \catattr{regular} attribute if it has been set. % \begin{macrocode} - \ifcase\@gls@combined@mpostlink@nr\relax + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glsxtrsetcomplexstyle{\the\glslabeltok}{3}% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% + \GlsXtrUseAbbrStyleFmts{short-em-long}% +} % \end{macrocode} -% \texttt{mpostlink=false}. +%\end{abbrvstyle} +% +%\begin{abbrvstyle}{short-em-long-em} +%\changes{1.04}{2016-05-02}{new} +%\changes{1.42}{2020-02-03}{added missing text key} % \begin{macrocode} - \gappto\@mgls@post@hookdefs{\let\mgls@do@postlinkhook\relax}% - \or +\newabbreviationstyle{short-em-long-em}% +{% % \end{macrocode} -% \texttt{mpostlink=true}. +% Set accessibility attributes if enabled. % \begin{macrocode} - \ifcase\@gls@combined@mpostlinkelement@nr\relax - \gappto\@mgls@post@hookdefs{\let\mgls@do@postlinkhook\mglslastelementpostlinkhook}% - \or - \gappto\@mgls@post@hookdefs{\let\mgls@do@postlinkhook\mglslastmainpostlinkhook}% - \or - \gappto\@mgls@post@hookdefs{\let\mgls@do@postlinkhook\mglscustompostlinkhook}% - \fi - \or + \glsxtrAccSuppAbbrSetFirstLongAttrs\glscategorylabel % \end{macrocode} -% \texttt{mpostlink=firstonly}. +% Setup the default fields. +%\cs{glslongemfont} is used in the description since \cs{glsdesc} +%doesn't set the style. % \begin{macrocode} - \ifcase\@gls@combined@mpostlinkelement@nr\relax - \gappto\@mgls@post@hookdefs{\let\mgls@do@postlinkhook\mglslastelementpostlinkhook}% - \or - \gappto\@mgls@post@hookdefs{\let\mgls@do@postlinkhook\mglslastmainpostlinkhook}% - \or - \gappto\@mgls@post@hookdefs{\let\mgls@do@postlinkhook\mglscustompostlinkhook}% - \fi - \or + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrshortlongname}, + sort={\the\glsshorttok}, + description={\protect\glslongemfont{\the\glslongtok}},% + first={\glsfirstxpabbrvfont{\the\glsshorttok}{\glscategorylabel}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \protect\glsxtrparen{\glsfirstxplongfont{\the\glslongtok}{\glscategorylabel}}},% + firstplural={\glsfirstxpabbrvfont{\the\glsshortpltok}{\glscategorylabel}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \protect\glsxtrparen{\glsfirstxplongfont{\the\glslongpltok}{\glscategorylabel}}},% % \end{macrocode} -% \texttt{mpostlink=usedonly}. +%\changes{1.15}{2017-05-10}{fixed spelling of \cs{glsabbrvfont}} % \begin{macrocode} - \gappto\@mgls@post@hookdefs{\let\mgls@do@postlinkhook\relax}% - \fi - }% - {% - \gappto\@mgls@post@hookdefs{\let\mglswasfirstuse\@secondoftwo}% + text={\glsxpabbrvfont{\the\glsshorttok}{\glscategorylabel}},% + plural={\glsxpabbrvfont{\the\glsshortpltok}{\glscategorylabel}}}% % \end{macrocode} -% Determine if the multi-entry post-link hook should be applied. +% Unset the \catattr{regular} attribute if it has been set. % \begin{macrocode} - \ifcase\@gls@combined@mpostlink@nr\relax + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glsexclapplyinnerfmtfield{\the\glslabeltok}{desc}% + \glsxtrsetcomplexstyle{\the\glslabeltok}{3}% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% % \end{macrocode} -% \texttt{mpostlink=false}. +%\changes{1.42}{2020-02-03}{removed \cs{protect} from \cs{glsxtremsuffix}} % \begin{macrocode} - \gappto\@mgls@post@hookdefs{\let\mgls@do@postlinkhook\relax}% - \or + \renewcommand*{\abbrvpluralsuffix}{\glsxtremsuffix}% + \renewcommand*\glsxtrrevert[1]{\glsxtremrevert{##1}}% + \renewcommand*{\glsabbrvfont}[1]{\glsabbrvemfont{##1}}% + \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvemfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongemfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslongemfont{##1}}% % \end{macrocode} -% \texttt{mpostlink=true}. +% The first use full form and the inline full form are the same for +% this style. % \begin{macrocode} - \ifcase\@gls@combined@mpostlinkelement@nr\relax - \gappto\@mgls@post@hookdefs{\let\mgls@do@postlinkhook\mglslastelementpostlinkhook}% - \or - \gappto\@mgls@post@hookdefs{\let\mgls@do@postlinkhook\mglslastmainpostlinkhook}% - \or - \gappto\@mgls@post@hookdefs{\let\mgls@do@postlinkhook\mglscustompostlinkhook}% - \fi - \or + \renewcommand*{\glsxtrfullformat}[2]{% + \glsxtrshortlongformat{##1}{##2}% + {\glsfirstlongemfont}{\glsfirstabbrvemfont}% + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsxtrshortlongplformat{##1}{##2}% + {\glsfirstlongemfont}{\glsfirstabbrvemfont}% + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \Glsxtrshortlongformat{##1}{##2}% + {\glsfirstlongemfont}{\glsfirstabbrvemfont}% + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \Glsxtrshortlongplformat{##1}{##2}% + {\glsfirstlongemfont}{\glsfirstabbrvemfont}% + }% + \renewcommand*{\GLSxtrfullformat}[2]{% + \GLSxtrshortlongformat{##1}{##2}% + {\glsfirstlongemfont}{\glsfirstabbrvemfont}% + }% + \renewcommand*{\GLSxtrfullplformat}[2]{% + \GLSxtrshortlongplformat{##1}{##2}% + {\glsfirstlongemfont}{\glsfirstabbrvemfont}% + }% +} % \end{macrocode} -% \texttt{mpostlink=firstonly}. +%\end{abbrvstyle} +% +%\begin{abbrvstyle}{short-em-long-em-desc} +%\changes{1.04}{2016-05-02}{new} % \begin{macrocode} - \gappto\@mgls@post@hookdefs{\let\mgls@do@postlinkhook\relax}% - \or +\newabbreviationstyle{short-em-long-em-desc}% +{% % \end{macrocode} -% \texttt{mpostlink=usedonly}. +% Set accessibility attributes if enabled. % \begin{macrocode} - \ifcase\@gls@combined@mpostlinkelement@nr\relax - \gappto\@mgls@post@hookdefs{\let\mgls@do@postlinkhook\mglslastelementpostlinkhook}% - \or - \gappto\@mgls@post@hookdefs{\let\mgls@do@postlinkhook\mglslastmainpostlinkhook}% - \or - \gappto\@mgls@post@hookdefs{\let\mgls@do@postlinkhook\mglscustompostlinkhook}% - \fi - \fi - }% + \glsxtrAccSuppAbbrSetTextShortAttrs\glscategorylabel % \end{macrocode} -% Save current post-link hook. +% Setup the default fields. % \begin{macrocode} - \let\mgls@org@postlinkhook\glspostlinkhook + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrshortlongdescname},% + sort={\glsxtrshortlongdescsort},% + first={\glsfirstxpabbrvfont{\the\glsshorttok}{\glscategorylabel}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \protect\glsxtrparen{\glsfirstxplongfont{\the\glslongtok}{\glscategorylabel}}},% + firstplural={\glsfirstxpabbrvfont{\the\glsshortpltok}{\glscategorylabel}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \protect\glsxtrparen{\glsfirstxplongfont{\the\glslongpltok}{\glscategorylabel}}},% + text={\glsxpabbrvfont{\the\glsshorttok}{\glscategorylabel}},% + plural={\glsxpabbrvfont{\the\glsshortpltok}{\glscategorylabel}}% + }% % \end{macrocode} -% Prefix. +% Unset the \catattr{regular} attribute if it has been set. % \begin{macrocode} - \mglsprefix + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glsxtrsetcomplexstyle{\the\glslabeltok}{3}% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% + \GlsXtrUseAbbrStyleFmts{short-em-long-em}% +} % \end{macrocode} -% Initialise last element label (for \cs{mglssuffix}). +%\end{abbrvstyle} +% +%\begin{abbrvstyle}{short-em} +%\changes{0.5}{2015-12-07}{new} % \begin{macrocode} - \let\mglslastelementlabel\@empty - \@gls@combined@encapsulator - {% +\newabbreviationstyle{short-em}% +{% % \end{macrocode} -% Save previous label. +% Set accessibility attributes if enabled. % \begin{macrocode} - \def\@mgls@previouslabel{}% - \mglselementindex=0\relax - \@for\mglscurrentlabel:=\mglscurrentlist\do{% - \advance\mglselementindex by 1\relax - \glsxtr@setup@docurrent + \glsxtrAccSuppAbbrSetNoLongAttrs\glscategorylabel % \end{macrocode} -% Is this the last element? +% Setup the default fields. % \begin{macrocode} - \ifx\@xfor@nextelement\@nnil - \let\mglsiflast\@firstoftwo - \else - \let\mglsiflast\@secondoftwo + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrshortnolongname}, + sort={\the\glsshorttok}, + first={\glsfirstxpabbrvfont{\the\glsshorttok}{\glscategorylabel}}, + firstplural={\glsfirstxpabbrvfont{\the\glsshortpltok}{\glscategorylabel}}, + text={\glsxpabbrvfont{\the\glsshorttok}{\glscategorylabel}}, + plural={\glsxpabbrvfont{\the\glsshortpltok}{\glscategorylabel}}, + description={\the\glslongtok}}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glssetattribute{\the\glslabeltok}{regular}{true}}% +}% +{% % \end{macrocode} -% Are any elements being skipped? +%\changes{1.42}{2020-02-03}{removed \cs{protect} from \cs{glsxtremsuffix}} % \begin{macrocode} - \mglsisfirstuse - {% - \glsxtr@mgls@checklastelement{first}{#2}% - }% - {% - \glsxtr@mgls@checklastelement{used}{#2}% - }% - \fi + \renewcommand*{\abbrvpluralsuffix}{\glsxtremsuffix}% + \renewcommand*\glsxtrrevert[1]{\glsxtremrevert{##1}}% + \renewcommand*\glsabbrvfont[1]{\glsabbrvemfont{##1}}% + \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvemfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslongdefaultfont{##1}}% % \end{macrocode} -% Should the element post-link hook be used? +% The inline full form displays the short form followed by the +% long form in parentheses. % \begin{macrocode} - \ifcase\@gls@combined@postlinks@nr\relax + \renewcommand*{\glsxtrinlinefullformat}[2]{% + \glsxtrshortlongformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvemfont}% + }% + \renewcommand*{\glsxtrinlinefullplformat}[2]{% + \glsxtrshortlongplformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvemfont}% + }% + \renewcommand*{\Glsxtrinlinefullformat}[2]{% + \Glsxtrshortlongformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvemfont}% + }% + \renewcommand*{\Glsxtrinlinefullplformat}[2]{% + \Glsxtrshortlongplformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvemfont}% + }% + \renewcommand*{\GLSxtrinlinefullformat}[2]{% + \GLSxtrshortlongformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvemfont}% + }% + \renewcommand*{\GLSxtrinlinefullplformat}[2]{% + \GLSxtrshortlongplformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvemfont}% + }% % \end{macrocode} -% \texttt{postlinks=none} +% The first use full form only displays the short form, but it +% typically won't be used as the \catattr{regular} attribute is set by this style. % \begin{macrocode} - \let\glspostlinkhook\relax - \or + \renewcommand*{\glsxtrfullformat}[2]{% + \glsxtrshortformat{##1}{##2}{\glsfirstabbrvemfont}% + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsxtrshortplformat{##1}{##2}{\glsfirstabbrvemfont}% + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \Glsxtrshortformat{##1}{##2}{\glsfirstabbrvemfont}% + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \Glsxtrshortplformat{##1}{##2}{\glsfirstabbrvemfont}% + }% + \renewcommand*{\GLSxtrfullformat}[2]{% + \GLSxtrshortformat{##1}{##2}{\glsfirstabbrvemfont}% + }% + \renewcommand*{\GLSxtrfullplformat}[2]{% + \GLSxtrshortplformat{##1}{##2}{\glsfirstabbrvemfont}% + }% +} % \end{macrocode} -% \texttt{postlinks=all} +%\end{abbrvstyle} +% +%\begin{abbrvstyle}{short-em-nolong} +%\changes{1.04}{2016-05-02}{new} % \begin{macrocode} - \let\glspostlinkhook\mgls@org@postlinkhook - \or +\letabbreviationstyle{short-em-nolong}{short-em} % \end{macrocode} -% \texttt{postlinks=notlast} +%\end{abbrvstyle} +% +%\begin{abbrvstyle}{short-em-desc} +%\changes{0.5}{2015-12-07}{new} +%\changes{1.39}{2019-03-22}{bug fix: omit \gloskey{description} key as advertised in the +%manual} % \begin{macrocode} - \mglsiflast - {% - \let\glspostlinkhook\relax - }% - {% - \let\glspostlinkhook\mgls@org@postlinkhook - }% - \or +\newabbreviationstyle{short-em-desc}% +{% % \end{macrocode} -% \texttt{postlinks=mainnotlast} +% Set accessibility attributes if enabled. The default name includes +% the long form but \cs{glsxtrshortdescname} could be modified to +% omit the long form, so include the \category{nameshortaccess} +% attribute. % \begin{macrocode} - \ifx\mglscurrentlabel\mglscurrentmainlabel - \mglsiflast - {% - \let\glspostlinkhook\relax - }% - {% - \let\glspostlinkhook\mgls@org@postlinkhook - }% - \else - \let\glspostlinkhook\relax - \fi - \or + \glsxtrAccSuppAbbrSetNoLongAttrs\glscategorylabel % \end{macrocode} -% \texttt{postlinks=mainonly} +% Setup the default fields. % \begin{macrocode} - \ifx\mglscurrentlabel\mglscurrentmainlabel - \let\glspostlinkhook\mgls@org@postlinkhook - \else - \let\glspostlinkhook\relax - \fi - \or + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrshortdescname}, + sort={\the\glsshorttok}, + first={\glsfirstxpabbrvfont{\the\glsshorttok}{\glscategorylabel}}, + firstplural={\glsfirstxpabbrvfont{\the\glsshortpltok}{\glscategorylabel}}, + text={\glsxpabbrvfont{\the\glsshorttok}{\glscategorylabel}}, + plural={\glsxpabbrvfont{\the\glsshortpltok}{\glscategorylabel}}}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glssetattribute{\the\glslabeltok}{regular}{true}}% +}% +{% % \end{macrocode} -% \texttt{postlinks=othernotlast} +%\changes{1.42}{2020-02-03}{removed \cs{protect} from \cs{glsxtremsuffix}} % \begin{macrocode} - \ifx\mglscurrentlabel\mglscurrentmainlabel - \let\glspostlinkhook\relax - \else - \mglsiflast - {% - \let\glspostlinkhook\relax - }% - {% - \let\glspostlinkhook\mgls@org@postlinkhook - }% - \fi - \or + \renewcommand*{\abbrvpluralsuffix}{\glsxtremsuffix}% + \renewcommand*\glsxtrrevert[1]{\glsxtremrevert{##1}}% + \renewcommand*\glsabbrvfont[1]{\glsabbrvemfont{##1}}% + \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvemfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslongdefaultfont{##1}}% % \end{macrocode} -% \texttt{postlinks=otheronly} +% The inline full form displays the short format followed by the +% long form in parentheses. % \begin{macrocode} - \ifx\mglscurrentlabel\mglscurrentmainlabel - \let\glspostlinkhook\relax - \else - \let\glspostlinkhook\mgls@org@postlinkhook - \fi - \fi + \renewcommand*{\glsxtrinlinefullformat}[2]{% + \glsxtrshortlongformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvemfont}% + }% + \renewcommand*{\glsxtrinlinefullplformat}[2]{% + \glsxtrshortlongplformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvemfont}% + }% + \renewcommand*{\Glsxtrinlinefullformat}[2]{% + \Glsxtrshortlongformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvemfont}% + }% + \renewcommand*{\Glsxtrinlinefullplformat}[2]{% + \Glsxtrshortlongplformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvemfont}% + }% + \renewcommand*{\GLSxtrinlinefullformat}[2]{% + \GLSxtrshortlongformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvemfont}% + }% + \renewcommand*{\GLSxtrinlinefullplformat}[2]{% + \GLSxtrshortlongplformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvemfont}% + }% % \end{macrocode} -% Save the last element for the multi-entry post-link hook. +% The first use full form only displays the short form, but it +% typically won't be used as the \catattr{regular} attribute is set by this style. % \begin{macrocode} - \mglsiflast - {% - \xappto\@mgls@post@hookdefs{% - \noexpand\def\noexpand\mglslastelementlabel - {\expandonce\mglscurrentlabel}}% - }% - {}% + \renewcommand*{\glsxtrfullformat}[2]{% + \glsxtrshortformat{##1}{##2}{\glsfirstabbrvemfont}% + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsxtrshortplformat{##1}{##2}{\glsfirstabbrvemfont}% + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \Glsxtrshortformat{##1}{##2}{\glsfirstabbrvemfont}% + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \Glsxtrshortplformat{##1}{##2}{\glsfirstabbrvemfont}% + }% + \renewcommand*{\GLSxtrfullformat}[2]{% + \GLSxtrshortformat{##1}{##2}{\glsfirstabbrvemfont}% + }% + \renewcommand*{\GLSxtrfullplformat}[2]{% + \GLSxtrshortplformat{##1}{##2}{\glsfirstabbrvemfont}% + }% +} % \end{macrocode} -% Do current element: +%\end{abbrvstyle} +%\begin{abbrvstyle}{short-em-nolong-desc} +%\changes{1.04}{2016-05-02}{new} % \begin{macrocode} - \@mgls@do@current@element - {% +\letabbreviationstyle{short-em-nolong-desc}{short-em-desc} % \end{macrocode} -% Pre element hook. +%\end{abbrvstyle} +% +%\begin{abbrvstyle}{nolong-short-em} +%\changes{1.21}{2017-11-03}{new} % \begin{macrocode} - \mglselementprehook -% \end{macrocode} -% Is this the first use of the current element? -% \begin{macrocode} - \GlsXtrIfUnusedOrUndefined{\mglscurrentlabel}% - {\let\@mgls@current@iffirstuse\@firstoftwo}% - {\let\@mgls@current@iffirstuse\@secondoftwo}% - \ifx\mglscurrentlabel\mglscurrentmainlabel +\newabbreviationstyle{nolong-short-em}% +{% + \GlsXtrUseAbbrStyleSetup{short-em-nolong}% +}% +{% + \GlsXtrUseAbbrStyleFmts{short-em-nolong}% % \end{macrocode} -% Main element. -% Location encap option: +% The inline full form displays the long form followed by the +% short form in parentheses. % \begin{macrocode} - \edef\@mgls@current@options{format=\@gls@combined@encapmain}% + \renewcommand*{\glsxtrinlinefullformat}[2]{% + \glsxtrlongshortformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvemfont}% + }% + \renewcommand*{\glsxtrinlinefullplformat}[2]{% + \glsxtrlongshortplformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvemfont}% + }% + \renewcommand*{\Glsxtrinlinefullformat}[2]{% + \Glsxtrlongshortformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvemfont}% + }% + \renewcommand*{\Glsxtrinlinefullplformat}[2]{% + \Glsxtrlongshortplformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvemfont}% + }% + \renewcommand*{\GLSxtrinlinefullformat}[2]{% + \GLSxtrlongshortformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvemfont}% + }% + \renewcommand*{\GLSxtrinlinefullplformat}[2]{% + \GLSxtrlongshortplformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvemfont}% + }% +} % \end{macrocode} -%Indexing option: +%\end{abbrvstyle} +% +%\begin{abbrvstyle}{long-noshort-em} +%\changes{0.5}{2015-12-07}{new} +%\changes{1.04}{2016-05-02}{renamed from \qt{long-em}} +% The short form is explicitly invoked through commands like +% \cs{glsxtrshort}. % \begin{macrocode} - \ifcase\@gls@combined@indexmain - \appto\@mgls@current@options{,noindex}% - \or - \appto\@mgls@current@options{,noindex=false}% - \or - \@mgls@current@iffirstuse - {\appto\@mgls@current@options{,noindex=false}}% - {\appto\@mgls@current@options{,noindex}}% - \fi +\newabbreviationstyle{long-noshort-em}% +{% % \end{macrocode} -% Hyperlink option: +% Set accessibility attributes if enabled. % \begin{macrocode} - \ifcase\@gls@combined@hyper\relax - \appto\@mgls@current@options{,hyper=false}% none - \or - \appto\@mgls@current@options{,hyper=false}% allmain - \or - \eappto\@mgls@current@options{,\@mgls@hyper}% mainonly - \or - \eappto\@mgls@current@options{,\@mgls@hyper}% individual - \or - \appto\@mgls@current@options{,hyper=false}% otheronly - \or - \mglsisfirstuse - {% - \appto\@mgls@current@options{,hyper=false}% notmainfirst - }% - {% - \eappto\@mgls@current@options{,\@mgls@hyper}% notmainfirst - }% - \or - \eappto\@mgls@current@options{,\@mgls@hyper}% nototherfirst - \or - \mglsisfirstuse - {% - \appto\@mgls@current@options{,hyper=false}% notfirst - }% - {% - \eappto\@mgls@current@options{,\@mgls@hyper}% notfirst - }% - \fi + \glsxtrAccSuppAbbrSetNameShortAttrs\glscategorylabel % \end{macrocode} -%Append all and then main: +% Setup the default fields. % \begin{macrocode} - \eappto\@mgls@current@options{,\@mgls@all,\@mgls@main}% - \else + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrlongnoshortname}, + sort={\the\glsshorttok}, + first={\glsfirstxplongfont{\the\glslongtok}{\glscategorylabel}}, + firstplural={\glsfirstxplongfont{\the\glslongpltok}{\glscategorylabel}}, + text={\glsxplongfont{\the\glslongtok}{\glscategorylabel}}, + plural={\glsxplongfont{\the\glslongpltok}{\glscategorylabel}},% + description={\the\glslongtok}% + }% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glssetattribute{\the\glslabeltok}{regular}{true}}% +}% +{% % \end{macrocode} -% Other element. -% Location encap option: +%\changes{1.42}{2020-02-03}{removed \cs{protect} from \cs{glsxtremsuffix}} % \begin{macrocode} - \edef\@mgls@current@options{format=\@gls@combined@encapothers}% + \renewcommand*{\abbrvpluralsuffix}{\glsxtremsuffix}% + \renewcommand*\glsxtrrevert[1]{\glsxtremrevert{##1}}% + \renewcommand*\glsabbrvfont[1]{\glsabbrvemfont{##1}}% + \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvemfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslongdefaultfont{##1}}% % \end{macrocode} -% Indexing option: +% The format for subsequent use (not used when the regular attribute +% is set). % \begin{macrocode} - \ifcase\@gls@combined@indexothers\relax - \appto\@mgls@current@options{,noindex}% - \or - \appto\@mgls@current@options{,noindex=false}% - \or - \@mgls@current@iffirstuse - {\appto\@mgls@current@options{,noindex=false}}% - {\appto\@mgls@current@options{,noindex}}% - \fi + \renewcommand*{\glsxtrsubsequentfmt}[2]{% + \glsxtrlongformat{##1}{##2}{\glslongdefaultfont}% + }% + \renewcommand*{\glsxtrsubsequentplfmt}[2]{% + \glsxtrlongplformat{##1}{##2}{\glslongdefaultfont}% + }% + \renewcommand*{\Glsxtrsubsequentfmt}[2]{% + \Glsxtrlongformat{##1}{##2}{\glslongdefaultfont}% + }% + \renewcommand*{\Glsxtrsubsequentplfmt}[2]{% + \Glsxtrlongplformat{##1}{##2}{\glslongdefaultfont}% + }% + \renewcommand*{\GLSxtrsubsequentfmt}[2]{% + \GLSxtrlongformat{##1}{##2}{\glslongdefaultfont}% + }% + \renewcommand*{\GLSxtrsubsequentplfmt}[2]{% + \GLSxtrlongplformat{##1}{##2}{\glslongdefaultfont}% + }% % \end{macrocode} -% Hyperlink option: +% The inline full form displays the long format followed by the +% short form in parentheses. % \begin{macrocode} - \ifcase\@gls@combined@hyper\relax - \appto\@mgls@current@options{,hyper=false}% none - \or - \appto\@mgls@current@options{,hyper=false}% allmain - \or - \appto\@mgls@current@options{,hyper=false}% mainonly - \or - \eappto\@mgls@current@options{,\@mgls@hyper}% individual - \or - \eappto\@mgls@current@options{,\@mgls@hyper}% otheronly - \or - \eappto\@mgls@current@options{,\@mgls@hyper}% notmainfirst - \or - \mglsisfirstuse - {% - \appto\@mgls@current@options{,hyper=false}% nototherfirst - }% - {% - \eappto\@mgls@current@options{,\@mgls@hyper}% nototherfirst - }% - \or - \mglsisfirstuse - {% - \appto\@mgls@current@options{,hyper=false}% notfirst - }% - {% - \eappto\@mgls@current@options{,\@mgls@hyper}% notfirst - }% - \fi + \renewcommand*{\glsxtrinlinefullformat}[2]{% + \glsxtrlongshortformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvemfont}% + }% + \renewcommand*{\glsxtrinlinefullplformat}[2]{% + \glsxtrlongshortplformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvemfont}% + }% + \renewcommand*{\Glsxtrinlinefullformat}[2]{% + \Glsxtrlongshortformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvemfont}% + }% + \renewcommand*{\Glsxtrinlinefullplformat}[2]{% + \Glsxtrlongshortplformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvemfont}% + }% + \renewcommand*{\GLSxtrinlinefullformat}[2]{% + \GLSxtrlongshortformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvemfont}% + }% + \renewcommand*{\GLSxtrinlinefullplformat}[2]{% + \GLSxtrlongshortplformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvemfont}% + }% % \end{macrocode} -%Append all and then others: +% The first use full form only displays the long form, but it +% typically won't be used as the \catattr{regular} attribute is set by this style. % \begin{macrocode} - \eappto\@mgls@current@options{,\@mgls@all,\@mgls@others}% - \fi + \renewcommand*{\glsxtrfullformat}[2]{% + \glsxtrlongformat{##1}{##2}{\glsfirstlongdefaultfont}% + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsxtrlongplformat{##1}{##2}{\glsfirstlongdefaultfont}% + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \Glsxtrlongformat{##1}{##2}{\glsfirstlongdefaultfont}% + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \Glsxtrlongplformat{##1}{##2}{\glsfirstlongdefaultfont}% + }% + \renewcommand*{\GLSxtrfullformat}[2]{% + \GLSxtrlongformat{##1}{##2}{\glsfirstlongdefaultfont}% + }% + \renewcommand*{\GLSxtrfullplformat}[2]{% + \GLSxtrlongplformat{##1}{##2}{\glsfirstlongdefaultfont}% + }% +} % \end{macrocode} -% Is this the first element? +%\end{abbrvstyle} +%\begin{abbrvstyle}{long-em} +%Backward compatibility: % \begin{macrocode} - \ifx\@mgls@previouslabel\empty - \ifx\mglscurrentlabel\mglscurrentmainlabel - \let\@mgls@cs#6\relax - \else - \let\@mgls@cs#4\relax - \fi - \else +\@glsxtr@deprecated@abbrstyle{long-em}{long-noshort-em} % \end{macrocode} -% Not the first element so add separator. +%\end{abbrvstyle} +% +%\begin{abbrvstyle}{long-em-noshort-em} +%\changes{1.04}{2016-05-02}{new} +% The short form is explicitly invoked through commands like +% \cs{glsxtrshort}. % \begin{macrocode} - \@mgls@previous@iffirstuse - {% - \@mgls@current@iffirstuse - {\glscombinedfirstsepfirst{\@mgls@previouslabel}{\mglscurrentlabel}}% - {\glscombinedfirstsep{\@mgls@previouslabel}{\mglscurrentlabel}}% - }% - {% - \@mgls@current@iffirstuse - {\glscombinedsepfirst{\@mgls@previouslabel}{\mglscurrentlabel}}% - {\glscombinedsep{\@mgls@previouslabel}{\mglscurrentlabel}}% - }% - \ifx\mglscurrentlabel\mglscurrentmainlabel - \let\@mgls@cs#7\relax - \else - \let\@mgls@cs#5\relax - \fi - \fi +\newabbreviationstyle{long-em-noshort-em}% +{% % \end{macrocode} -% Is this the last element? +% Set accessibility attributes if enabled. % \begin{macrocode} - \mglsiflast - {\expandafter\@mgls@cs\expandafter{\@mgls@current@options}{\mglscurrentlabel}[#3]}% - {\expandafter\@mgls@cs\expandafter{\@mgls@current@options}{\mglscurrentlabel}[]}% + \glsxtrAccSuppAbbrSetNameShortAttrs\glscategorylabel % \end{macrocode} -% Is this the main element? If so, save information for post-link -% hook. +% Setup the default fields. % \begin{macrocode} - \ifx\mglscurrentlabel\mglscurrentmainlabel - \xappto\@mgls@post@hookdefs{% - \noexpand\def\noexpand\mglslastmainlabel - {\expandonce\mglscurrentmainlabel}% - }% - \glsxtrifwasfirstuse - {% - \gappto\@mgls@post@hookdefs{\let\mglsiflastmainwasfirstuse\@firstoftwo}% - }% - {% - \gappto\@mgls@post@hookdefs{\let\mglsiflastmainwasfirstuse\@secondoftwo}% - }% - \glsifplural - {% - \gappto\@mgls@post@hookdefs{\let\mglsiflastmainwasplural\@firstoftwo}% - }% - {% - \gappto\@mgls@post@hookdefs{\let\mglsiflastmainwasplural\@secondoftwo}% - }% - \glscapscase - {% - \gappto\@mgls@post@hookdefs{% - \let\mglsiflastmaincapscase\@firstofthree - }% - }% - {% - \gappto\@mgls@post@hookdefs{% - \let\mglsiflastmaincapscase\@secondofthree - }% - }% - {% - \gappto\@mgls@post@hookdefs{% - \let\mglsiflastmaincapscase\@thirdofthree - }% - }% - \fi - \let\@mgls@previouslabel\mglscurrentlabel - \let\@mgls@previous@iffirstuse\@mgls@current@iffirstuse - }% + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrlongnoshortname}, + sort={\the\glsshorttok}, + first={\glsfirstxplongfont{\the\glslongtok}{\glscategorylabel}}, + firstplural={\glsfirstxplongfont{\the\glslongpltok}{\glscategorylabel}}, + text={\glsxplongfont{\the\glslongtok}{\glscategorylabel}}, + plural={\glsxplongfont{\the\glslongpltok}{\glscategorylabel}},% + description={\protect\glslongemfont{\the\glslongtok}}% + }% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glsexclapplyinnerfmtfield{\the\glslabeltok}{desc}% + \glssetattribute{\the\glslabeltok}{regular}{true}}% +}% +{% % \end{macrocode} -% Post element hook. +%\changes{1.42}{2020-02-03}{removed \cs{protect} from \cs{glsxtremsuffix}} % \begin{macrocode} - \mglselementposthook - }% - \ifx\mglslastmainlabel\@empty - \gappto\@mgls@post@hookdefs{\let\mglsiflastmainskipped\@firstoftwo}% - \else - \gappto\@mgls@post@hookdefs{\let\mglsiflastmainskipped\@secondoftwo}% - \fi + \renewcommand*{\abbrvpluralsuffix}{\glsxtremsuffix}% + \renewcommand*\glsxtrrevert[1]{\glsxtremrevert{##1}}% + \renewcommand*\glsabbrvfont[1]{\glsabbrvemfont{##1}}% + \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvemfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongemfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslongemfont{##1}}% % \end{macrocode} -% Encapsulator may introduce grouping so check here. +% The format for subsequent use (not used when the regular attribute +% is set). % \begin{macrocode} - \ifx\@mgls@do@current@element\@gobble - \gappto\@mgls@post@hookdefs{\let\mglsiflastelementskipped\@firstoftwo}% - \else - \gappto\@mgls@post@hookdefs{\let\mglsiflastelementskipped\@secondoftwo}% - \fi - \glsxtrifwasfirstuse - {% - \gappto\@mgls@post@hookdefs{\let\mglsiflastelementwasfirstuse\@firstoftwo}% - }% - {% - \gappto\@mgls@post@hookdefs{\let\mglsiflastelementwasfirstuse\@secondoftwo}% - }% - \glsifplural - {% - \gappto\@mgls@post@hookdefs{\let\mglsiflastelementwasplural\@firstoftwo}% - }% - {% - \gappto\@mgls@post@hookdefs{\let\mglsiflastelementwasplural\@secondoftwo}% - }% - \glscapscase - {% - \gappto\@mgls@post@hookdefs{% - \let\mglsiflastelementcapscase\@firstofthree - }% - }% - {% - \gappto\@mgls@post@hookdefs{% - \let\mglsiflastelementcapscase\@secondofthree - }% - }% - {% - \gappto\@mgls@post@hookdefs{% - \let\mglsiflastelementcapscase\@thirdofthree - }% - }% - }% + \renewcommand*{\glsxtrsubsequentfmt}[2]{% + \glsxtrlongformat{##1}{##2}{\glslongemfont}% + }% + \renewcommand*{\glsxtrsubsequentplfmt}[2]{% + \glsxtrlongplformat{##1}{##2}{\glslongemfont}% + }% + \renewcommand*{\Glsxtrsubsequentfmt}[2]{% + \Glsxtrlongformat{##1}{##2}{\glslongemfont}% + }% + \renewcommand*{\Glsxtrsubsequentplfmt}[2]{% + \Glsxtrlongplformat{##1}{##2}{\glslongemfont}% + }% + \renewcommand*{\GLSxtrsubsequentfmt}[2]{% + \GLSxtrlongformat{##1}{##2}{\glslongemfont}% + }% + \renewcommand*{\GLSxtrsubsequentplfmt}[2]{% + \GLSxtrlongplformat{##1}{##2}{\glslongemfont}% + }% % \end{macrocode} -% Suffix needs post-link hook commands. +% The inline full form displays the long format followed by the +% short form in parentheses. % \begin{macrocode} - \@mgls@post@hookdefs - \mglssuffix + \renewcommand*{\glsxtrinlinefullformat}[2]{% + \glsxtrlongshortformat{##1}{##2}% + {\glsfirstlongemfont}{\glsfirstabbrvemfont}% + }% + \renewcommand*{\glsxtrinlinefullplformat}[2]{% + \glsxtrlongshortplformat{##1}{##2}% + {\glsfirstlongemfont}{\glsfirstabbrvemfont}% + }% + \renewcommand*{\Glsxtrinlinefullformat}[2]{% + \Glsxtrlongshortformat{##1}{##2}% + {\glsfirstlongemfont}{\glsfirstabbrvemfont}% + }% + \renewcommand*{\Glsxtrinlinefullplformat}[2]{% + \Glsxtrlongshortplformat{##1}{##2}% + {\glsfirstlongemfont}{\glsfirstabbrvemfont}% + }% + \renewcommand*{\GLSxtrinlinefullformat}[2]{% + \GLSxtrlongshortformat{##1}{##2}% + {\glsfirstlongemfont}{\glsfirstabbrvemfont}% + }% + \renewcommand*{\GLSxtrinlinefullplformat}[2]{% + \GLSxtrlongshortplformat{##1}{##2}% + {\glsfirstlongemfont}{\glsfirstabbrvemfont}% + }% % \end{macrocode} -%Unset multi-entry first use flag after current scope. +% The first use full form only displays the long form, but it +% typically won't be used as the \catattr{regular} attribute is set by this style. % \begin{macrocode} - \ifcase\@mgls@unsetaction\relax - \xappto\@mgls@post@hookdefs{% - \noexpand\mglsunset{\expandonce\mglscurrentmultilabel}}% - \or - \xappto\@mgls@post@hookdefs{% - \noexpand\mglslocalunset{\expandonce\mglscurrentmultilabel}}% - \fi - }% - \glsxtrmglswrite{#2}% - \egroup - \@mgls@post@hookdefs - \mgls@do@postlinkhook + \renewcommand*{\glsxtrfullformat}[2]{% + \glsxtrlongformat{##1}{##2}{\glsfirstlongemfont}% + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsxtrlongplformat{##1}{##2}{\glsfirstlongemfont}% + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \Glsxtrlongformat{##1}{##2}{\glsfirstlongemfont}% + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \Glsxtrlongplformat{##1}{##2}{\glsfirstlongemfont}% + }% + \renewcommand*{\GLSxtrfullformat}[2]{% + \GLSxtrlongformat{##1}{##2}{\glsfirstlongemfont}% + }% + \renewcommand*{\GLSxtrfullplformat}[2]{% + \GLSxtrlongplformat{##1}{##2}{\glsfirstlongemfont}% + }% } % \end{macrocode} -%\end{macro} +%\end{abbrvstyle} % -%\begin{macro}{\mglscustompostlinkhook} -%\changes{1.48}{2021-11-22}{new} +%\begin{abbrvstyle}{long-em-noshort-em-noreg} +%\changes{1.17}{2017-08-09}{new} +% Like long-em-noshort-em but doesn't set the \catattr{regular} attribute. % \begin{macrocode} -\newcommand*{\mglscustompostlinkhook}{} +\newabbreviationstyle{long-em-noshort-em-noreg}% +{% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\mglslastelementpostlinkhook} -%\changes{1.48}{2021-11-22}{new} +% Set accessibility attributes if enabled. % \begin{macrocode} -\newcommand*{\mglslastelementpostlinkhook}{% - \let\glsxtrifwasfirstuse\mglsiflastelementwasfirstuse - \let\glsifplural\mglsiflastelementwasplural - \let\glscapscase\mglsiflastelementcapscase - \let\glslabel\mglslastelementlabel - \glspostlinkhook -} + \glsxtrAccSuppAbbrSetNameShortAttrs\glscategorylabel % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\mglslastmainpostlinkhook} -%\changes{1.48}{2021-11-22}{new} +% Setup the default fields. % \begin{macrocode} -\newcommand*{\mglslastmainpostlinkhook}{% - \let\glsxtrifwasfirstuse\mglsiflastmainwasfirstuse - \let\glsifplural\mglsiflastmainwasplural - \let\glscapscase\mglsiflastmaincapscase - \let\glslabel\mglslastmainlabel - \glspostlinkhook -} + \GlsXtrUseAbbrStyleSetup{long-em-noshort-em}% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\mglsdefcategoryprefix} -%\changes{1.48}{2021-11-22}{new} +% Unset the \catattr{regular} attribute if it has been set. % \begin{macrocode} -\newcommand*{\mglsdefcategoryprefix}[2]{% - \csdef{mglsprefix@#1}{#2}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% + \GlsXtrUseAbbrStyleFmts{long-em-noshort-em}% } % \end{macrocode} -%\end{macro} +%\end{abbrvstyle} % -%\begin{macro}{\mglshascategoryprefix} -%\changes{1.48}{2021-11-22}{new} +%\begin{abbrvstyle}{long-noshort-em-desc} +%\changes{1.04}{2016-05-02}{renamed from \qt{long-desc-em}} +%\changes{0.5}{2015-12-07}{new} +% The emphasized font will only be used if +% the short form is explicitly invoked through commands like +% \cs{glsxtrshort}. % \begin{macrocode} -\newcommand*{\mglshascategoryprefix}[3]{% - \ifcsdef{mglsprefix@#1}{#2}{#3}% -} +\newabbreviationstyle{long-noshort-em-desc}% +{% + \GlsXtrUseAbbrStyleSetup{long-noshort-desc}% +}% +{% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\mglsusecategoryprefix} -%\changes{1.48}{2021-11-22}{new} +%\changes{1.42}{2020-02-03}{removed \cs{protect} from \cs{glsxtremsuffix}} % \begin{macrocode} -\newcommand*{\mglsusecategoryprefix}[1]{% - \csuse{mglsprefix@#1}% -} + \renewcommand*{\abbrvpluralsuffix}{\glsxtremsuffix}% + \renewcommand*\glsxtrrevert[1]{\glsxtremrevert{##1}}% + \renewcommand*\glsabbrvfont[1]{\glsabbrvemfont{##1}}% + \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvemfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslongdefaultfont{##1}}% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\mglsprefix} -%\changes{1.48}{2021-11-22}{new} +% The format for subsequent use (not used when the regular attribute +% is set). % \begin{macrocode} -\newcommand*{\mglsprefix}{% - \ifdefempty\mglscurrentcategory - {\mglscurrentprefix}% - {% - \mglshascategoryprefix{\mglscurrentcategory}% - {\mglsusecategoryprefix{\mglscurrentcategory}}% - {\mglscurrentprefix}% - }% -} + \renewcommand*{\glsxtrsubsequentfmt}[2]{% + \glsxtrlongformat{##1}{##2}{\glslongdefaultfont}% + }% + \renewcommand*{\glsxtrsubsequentplfmt}[2]{% + \glsxtrlongplformat{##1}{##2}{\glslongdefaultfont}% + }% + \renewcommand*{\Glsxtrsubsequentfmt}[2]{% + \Glsxtrlongformat{##1}{##2}{\glslongdefaultfont}% + }% + \renewcommand*{\Glsxtrsubsequentplfmt}[2]{% + \Glsxtrlongplformat{##1}{##2}{\glslongdefaultfont}% + }% + \renewcommand*{\GLSxtrsubsequentfmt}[2]{% + \GLSxtrlongformat{##1}{##2}{\glslongdefaultfont}% + }% + \renewcommand*{\GLSxtrsubsequentplfmt}[2]{% + \GLSxtrlongplformat{##1}{##2}{\glslongdefaultfont}% + }% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\mglsdefcategorysuffix} -%\changes{1.48}{2021-11-22}{new} +% The inline full form displays the long format followed by the +% short form in parentheses. % \begin{macrocode} -\newcommand*{\mglsdefcategorysuffix}[2]{% - \csdef{mglssuffix@#1}{#2}% -} + \renewcommand*{\glsxtrinlinefullformat}[2]{% + \glsxtrlongshortformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvemfont}% + }% + \renewcommand*{\glsxtrinlinefullplformat}[2]{% + \glsxtrlongshortplformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvemfont}% + }% + \renewcommand*{\Glsxtrinlinefullformat}[2]{% + \Glsxtrlongshortformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvemfont}% + }% + \renewcommand*{\Glsxtrinlinefullplformat}[2]{% + \Glsxtrlongshortplformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvemfont}% + }% + \renewcommand*{\GLSxtrinlinefullformat}[2]{% + \GLSxtrlongshortformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvemfont}% + }% + \renewcommand*{\GLSxtrinlinefullplformat}[2]{% + \GLSxtrlongshortplformat{##1}{##2}% + {\glsfirstlongdefaultfont}{\glsfirstabbrvemfont}% + }% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\mglshascategorysuffix} -%\changes{1.48}{2021-11-22}{new} +% The first use full form only displays the long form, but it +% typically won't be used as the \catattr{regular} attribute is set by this style. % \begin{macrocode} -\newcommand*{\mglshascategorysuffix}[3]{% - \ifcsdef{mglssuffix@#1}{#2}{#3}% -} + \renewcommand*{\glsxtrfullformat}[2]{% + \glsxtrlongformat{##1}{##2}{\glsfirstlongdefaultfont}% + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsxtrlongplformat{##1}{##2}{\glsfirstlongdefaultfont}% + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \Glsxtrlongformat{##1}{##2}{\glsfirstlongdefaultfont}% + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \Glsxtrlongplformat{##1}{##2}{\glsfirstlongdefaultfont}% + }% + \renewcommand*{\GLSxtrfullformat}[2]{% + \GLSxtrlongformat{##1}{##2}{\glsfirstlongdefaultfont}% + }% + \renewcommand*{\GLSxtrfullplformat}[2]{% + \GLSxtrlongplformat{##1}{##2}{\glsfirstlongdefaultfont}% + }% +} % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\mglsusecategorysuffix} -%\changes{1.48}{2021-11-22}{new} +%\end{abbrvstyle} +%\begin{abbrvstyle}{long-desc-em} +%Backward compatibility: % \begin{macrocode} -\newcommand*{\mglsusecategorysuffix}[1]{% - \csuse{mglssuffix@#1}% -} +\@glsxtr@deprecated@abbrstyle{long-desc-em}{long-noshort-em-desc} % \end{macrocode} -%\end{macro} +%\end{abbrvstyle} % -%\begin{macro}{\mglssuffix} -%\changes{1.48}{2021-11-22}{new} +%\begin{abbrvstyle}{long-em-noshort-em-desc} +%\changes{1.04}{2016-05-02}{new} +% The short form is explicitly invoked through commands like +% \cs{glsxtrshort}. The long form is emphasized. No accessibility +% attributes need to be set. % \begin{macrocode} -\newcommand*{\mglssuffix}{% - \ifdefempty\mglscurrentcategory - {\ifdefempty{\mglscurrentsuffix}{}{\space(\mglscurrentsuffix)}}% - {% - \mglshascategorysuffix{\mglscurrentcategory}% - {\mglsusecategorysuffix{\mglscurrentcategory}}% - {\ifdefempty{\mglscurrentsuffix}{}{\space(\mglscurrentsuffix)}}% - }% -} +\newabbreviationstyle{long-em-noshort-em-desc}% +{% + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrlongnoshortdescname}, + sort={\the\glslongtok}, + first={\glsfirstxplongfont{\the\glslongtok}{\glscategorylabel}}, + firstplural={\glsfirstxplongfont{\the\glslongpltok}{\glscategorylabel}}, + text={\glsxplongfont{\the\glslongtok}{\glscategorylabel}}, + plural={\glsxplongfont{\the\glslongpltok}{\glscategorylabel}}% + }% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glssetattribute{\the\glslabeltok}{regular}{true}}% +}% +{% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\mglselementprehook} -%\changes{1.48}{2021-11-22}{new} +%\changes{1.42}{2020-02-03}{removed \cs{protect} from \cs{glsxtremsuffix}} % \begin{macrocode} -\newcommand*{\mglselementprehook}{} + \renewcommand*{\abbrvpluralsuffix}{\glsxtremsuffix}% + \renewcommand*\glsxtrrevert[1]{\glsxtremrevert{##1}}% + \renewcommand*\glsabbrvfont[1]{\glsabbrvemfont{##1}}% + \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvemfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongemfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslongemfont{##1}}% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\mglselementposthook} -%\changes{1.48}{2021-11-22}{new} +% The format for subsequent use (not used when the regular attribute +% is set). % \begin{macrocode} -\newcommand*{\mglselementposthook}{} + \renewcommand*{\glsxtrsubsequentfmt}[2]{% + \glsxtrlongformat{##1}{##2}{\glslongemfont}% + }% + \renewcommand*{\glsxtrsubsequentplfmt}[2]{% + \glsxtrlongplformat{##1}{##2}{\glslongemfont}% + }% + \renewcommand*{\Glsxtrsubsequentfmt}[2]{% + \Glsxtrlongformat{##1}{##2}{\glslongemfont}% + }% + \renewcommand*{\Glsxtrsubsequentplfmt}[2]{% + \Glsxtrlongplformat{##1}{##2}{\glslongemfont}% + }% + \renewcommand*{\GLSxtrsubsequentfmt}[2]{% + \GLSxtrlongformat{##1}{##2}{\glslongemfont}% + }% + \renewcommand*{\GLSxtrsubsequentplfmt}[2]{% + \GLSxtrlongplformat{##1}{##2}{\glslongemfont}% + }% % \end{macrocode} -%\end{macro} -% -%Separators. -%\begin{macro}{\glscombinedsep} -%\changes{1.48}{2021-11-22}{new} -%Separator between two elements that have been marked as used. -%This takes the two element labels as arguments. +% The inline full form displays the long format followed by the +% short form in parentheses. % \begin{macrocode} -\newcommand*{\glscombinedsep}[2]{% - \glshasattribute{#1}{combinedsep}% - {\glsgetattribute{#1}{combinedsep}}% - { }% -} + \renewcommand*{\glsxtrinlinefullformat}[2]{% + \glsxtrlongshortformat{##1}{##2}% + {\glsfirstlongemfont}{\glsfirstabbrvemfont}% + }% + \renewcommand*{\glsxtrinlinefullplformat}[2]{% + \glsxtrlongshortplformat{##1}{##2}% + {\glsfirstlongemfont}{\glsfirstabbrvemfont}% + }% + \renewcommand*{\Glsxtrinlinefullformat}[2]{% + \Glsxtrlongshortformat{##1}{##2}% + {\glsfirstlongemfont}{\glsfirstabbrvemfont}% + }% + \renewcommand*{\Glsxtrinlinefullplformat}[2]{% + \Glsxtrlongshortplformat{##1}{##2}% + {\glsfirstlongemfont}{\glsfirstabbrvemfont}% + }% + \renewcommand*{\GLSxtrinlinefullformat}[2]{% + \GLSxtrlongshortformat{##1}{##2}% + {\glsfirstlongemfont}{\glsfirstabbrvemfont}% + }% + \renewcommand*{\GLSxtrinlinefullplformat}[2]{% + \GLSxtrlongshortplformat{##1}{##2}% + {\glsfirstlongemfont}{\glsfirstabbrvemfont}% + }% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\glscombinedfirstsepfirst} -%\changes{1.48}{2021-11-22}{new} -%Separator following and preceding a first use. +% The first use full form only displays the long form, but it +% typically won't be used as the \catattr{regular} attribute is set by this style. % \begin{macrocode} -\newcommand*{\glscombinedfirstsepfirst}[2]{% - \glshasattribute{#1}{combinedfirstsepfirst}% - {\glsgetattribute{#1}{combinedfirstsepfirst}}% - {\glscombinedsep{#1}{#2}}% + \renewcommand*{\glsxtrfullformat}[2]{% + \glsxtrlongformat{##1}{##2}{\glsfirstlongemfont}% + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsxtrlongplformat{##1}{##2}{\glsfirstlongemfont}% + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \Glsxtrlongformat{##1}{##2}{\glsfirstlongemfont}% + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \Glsxtrlongplformat{##1}{##2}{\glsfirstlongemfont}% + }% + \renewcommand*{\GLSxtrfullformat}[2]{% + \GLSxtrlongformat{##1}{##2}{\glsfirstlongemfont}% + }% + \renewcommand*{\GLSxtrfullplformat}[2]{% + \GLSxtrlongplformat{##1}{##2}{\glsfirstlongemfont}% + }% } % \end{macrocode} -%\end{macro} +%\end{abbrvstyle} % -%\begin{macro}{\glscombinedfirstsep} -%\changes{1.48}{2021-11-22}{new} -%Separator following a first use. +%\begin{abbrvstyle}{long-em-noshort-em-desc-noreg} +%\changes{1.17}{2017-08-09}{new} +% Like long-em-noshort-em-desc but doesn't set the \catattr{regular} attribute. % \begin{macrocode} -\newcommand*{\glscombinedfirstsep}[2]{% - \glshasattribute{#1}{combinedfirstsep}% - {\glsgetattribute{#1}{combinedfirstsep}}% - {\glscombinedsep{#1}{#2}}% -} +\newabbreviationstyle{long-em-noshort-em-desc-noreg}% +{% + \GlsXtrUseAbbrStyleSetup{long-em-noshort-em-desc}% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\glscombinedsepfirst} -%\changes{1.48}{2021-11-22}{new} -%Separator preceding a first use. +% Unset the \catattr{regular} attribute if it has been set. % \begin{macrocode} -\newcommand*{\glscombinedsepfirst}[2]{% - \glshasattribute{#1}{combinedsepfirst}% - {\glsgetattribute{#1}{combinedsepfirst}}% - {\glscombinedsep{#1}{#2}}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% + \GlsXtrUseAbbrStyleFmts{long-em-noshort-em-desc}% } % \end{macrocode} -%\end{macro} +%\end{abbrvstyle} % -%\begin{macro}{\glssetcombinedsepabbrvnbsp} -%\changes{1.48}{2021-11-22}{new} -%Provide shortcut for using non-breakable space following an -%abbreviation that has already been used. +%\begin{abbrvstyle}{short-em-footnote} +%\changes{0.5}{2015-12-07}{new} +%\changes{1.04}{2015-04-30}{renamed from \qt{footnote-em}} +%\changes{1.42}{2020-02-03}{added missing text key} % \begin{macrocode} -\newcommand*{\glssetcombinedsepabbrvnbsp}{% - \renewcommand*{\glscombinedsep}[2]{% - \glshasattribute{##1}{combinedsep}% - {\glsgetattribute{##1}{combinedsep}}% - {\ifhasshort{##1}{~}{ }}% - }% - \renewcommand*{\glscombinedsepfirst}[2]{% - \glshasattribute{##1}{combinedsepfirst}% - {\glsgetattribute{##1}{combinedsepfirst}}% - {\ifhasshort{##1}{~}{ }}% - }% - \renewcommand*{\glscombinedfirstsep}[2]{% - \glshasattribute{##1}{combinedfirstsep}% - {\glsgetattribute{##1}{combinedfirstsep}}% - { }% - }% - \renewcommand*{\glscombinedfirstsepfirst}[2]{% - \glshasattribute{##1}{combinedfirstsepfirst}% - {\glsgetattribute{##1}{combinedfirstsepfirst}}% - { }% - }% -} +\newabbreviationstyle{short-em-footnote}% +{% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\glssetcombinedsepabbrvnone} -%\changes{1.48}{2021-11-22}{new} -%Provide shortcut for using nothing if either on next use are -%abbreviations (otherwise use space). +% Set accessibility attributes if enabled. % \begin{macrocode} -\newcommand*{\glssetcombinedsepabbrvnone}{% - \renewcommand*{\glscombinedsep}[2]{% - \glshasattribute{##1}{combinedsep}% - {\glsgetattribute{##1}{combinedsep}}% - {\ifhasshort{##1}{}{\ifhasshort{##2}{}{ }}}% - }% - \renewcommand*{\glscombinedsepfirst}[2]{% - \glshasattribute{##1}{combinedsepfirst}% - {\glsgetattribute{##1}{combinedsepfirst}}% - {\ifhasshort{##1}{}{ }}% - }% - \renewcommand*{\glscombinedfirstsep}[2]{% - \glshasattribute{##1}{combinedfirstsep}% - {\glsgetattribute{##1}{combinedfirstsep}}% - {\ifhasshort{##2}{}{ }}% - }% - \renewcommand*{\glscombinedfirstsepfirst}[2]{% - \glshasattribute{##1}{combinedfirstsepfirst}% - {\glsgetattribute{##1}{combinedfirstsepfirst}}% - { }% - }% -} + \glsxtrAccSuppAbbrSetNoLongAttrs\glscategorylabel % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\glssetcombinedsepnarrow} -%\changes{1.48}{2021-11-22}{new} -%Measures both. +% Setup the default fields. % \begin{macrocode} -\newcommand*{\glssetcombinedsepnarrow}[2]{% - \renewcommand*{\glscombinedsep}[2]{% - \glshasattribute{##1}{combinedsep}% - {\glsgetattribute{##1}{combinedsep}}% - {% - \ifhasshort{##1}% - {\settowidth{\dimen@}{\glsentryshort{##1}}}% - {\settowidth{\dimen@}{\glsentrytext{##1}}}% - \ifdim\dimen@<#1\relax - #2% - \else - \ifhasshort{##2}% - {\settowidth{\dimen@}{\glsentryshort{##2}}}% - {\settowidth{\dimen@}{\glsentrytext{##2}}}% - \ifdim\dimen@<#1\relax - #2% - \else - \space - \fi - \fi + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrfootnotename}, + sort={\the\glsshorttok}, + description={\the\glslongtok},% + first={\glsfirstxpabbrvfont{\the\glsshorttok}{\glscategorylabel}% + \protect\glsxtrabbrvfootnote{\the\glslabeltok}% + {\protect\glsfirstlongfootnotefont{\the\glslongtok}}},% + firstplural={\glsfirstxpabbrvfont{\the\glsshortpltok}{\glscategorylabel}% + \protect\glsxtrabbrvfootnote{\the\glslabeltok}% + {\protect\glsfirstlongfootnotefont{\the\glslongpltok}}},% + text={\glsxpabbrvfont{\the\glsshorttok}{\glscategorylabel}},% + plural={\glsxpabbrvfont{\the\glsshortpltok}{\glscategorylabel}}}% +% \end{macrocode} +% Switch off hyperlinks on first use to prevent nested hyperlinks, +% and unset the \catattr{regular} attribute if it has been set. +%\changes{0.5.1}{2015-12-07}{switch off regular attribute if set} +% \begin{macrocode} + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glssetattribute{\the\glslabeltok}{nohyperfirst}{true}% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% }% - }% - \renewcommand*{\glscombinedsepfirst}[2]{% - \glshasattribute{##1}{combinedsepfirst}% - {\glsgetattribute{##1}{combinedsepfirst}}% - {% - \ifhasshort{##1}% - {\settowidth{\dimen@}{\glsentryshort{##1}}}% - {\settowidth{\dimen@}{\glsentrytext{##1}}}% - \ifdim\dimen@<#1\relax - #2% - \else - \ifhaslong{##2}% - {\settowidth{\dimen@}{\glsentrylong{##2}}}% - {\settowidth{\dimen@}{\glsentryfirst{##2}}}% - \ifdim\dimen@<#1\relax - #2% - \else - \space - \fi - \fi +}% +{% +% \end{macrocode} +%\changes{1.42}{2020-02-03}{removed \cs{protect} from \cs{glsxtremsuffix}} +% \begin{macrocode} + \renewcommand*{\abbrvpluralsuffix}{\glsxtremsuffix}% + \renewcommand*\glsxtrrevert[1]{\glsxtremrevert{##1}}% + \renewcommand*\glsabbrvfont[1]{\glsabbrvemfont{##1}}% + \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvemfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongfootnotefont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslongfootnotefont{##1}}% +% \end{macrocode} +% The full format displays the short form followed by the long form +% as a footnote. +% \begin{macrocode} + \renewcommand*{\glsxtrfullformat}[2]{% + \glsxtrshortformat{##1}{##2}{\glsfirstabbrvemfont}% + \protect\glsxtrabbrvfootnote{##1}% + {\glsxtrfootnotelongformat{##1}{\glsfirstlongfootnotefont}}% }% - }% - \renewcommand*{\glscombinedfirstsep}[2]{% - \glshasattribute{##1}{combinedfirstsep}% - {\glsgetattribute{##1}{combinedfirstsep}}% - {% - \ifhaslong{##1}% - {\settowidth{\dimen@}{\glsentrylong{##1}}}% - {\settowidth{\dimen@}{\glsentryfirst{##1}}}% - \ifdim\dimen@<#1\relax - #2% - \else - \ifhasshort{##2}% - {\settowidth{\dimen@}{\glsentryshort{##2}}}% - {\settowidth{\dimen@}{\glsentrytext{##2}}}% - \ifdim\dimen@<#1\relax - #2% - \else - \space - \fi - \fi + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsxtrshortplformat{##1}{##2}{\glsfirstabbrvemfont}% + \protect\glsxtrabbrvfootnote{##1}% + {\glsxtrfootnotelongplformat{##1}{\glsfirstlongfootnotefont}}% }% - }% - \renewcommand*{\glscombinedfirstsepfirst}[2]{% - \glshasattribute{##1}{combinedfirstsepfirst}% - {\glsgetattribute{##1}{combinedfirstsepfirst}}% - {% - \ifhaslong{##1}% - {\settowidth{\dimen@}{\glsentrylong{##1}}}% - {\settowidth{\dimen@}{\glsentryfirst{##1}}}% - \ifdim\dimen@<#1\relax - #2% - \else - \ifhaslong{##2}% - {\settowidth{\dimen@}{\glsentrylong{##2}}}% - {\settowidth{\dimen@}{\glsentryfirst{##2}}}% - \ifdim\dimen@<#1\relax - #2% - \else - \space - \fi - \fi + \renewcommand*{\Glsxtrfullformat}[2]{% + \Glsxtrshortformat{##1}{##2}{\glsfirstabbrvemfont}% + \protect\glsxtrabbrvfootnote{##1}% + {\glsxtrfootnotelongformat{##1}{\glsfirstlongfootnotefont}}% + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \Glsxtrshortplformat{##1}{##2}{\glsfirstabbrvemfont}% + \protect\glsxtrabbrvfootnote{##1}% + {\glsxtrfootnotelongplformat{##1}{\glsfirstlongfootnotefont}}% + }% + \renewcommand*{\GLSxtrfullformat}[2]{% + \GLSxtrshortformat{##1}{##2}{\glsfirstabbrvemfont}% + \protect\glsxtrabbrvfootnote{##1}% + {\glsxtrfootnotelongformat{##1}{\glsfirstlongfootnotefont}}% + }% + \renewcommand*{\GLSxtrfullplformat}[2]{% + \GLSxtrshortplformat{##1}{##2}{\glsfirstabbrvemfont}% + \protect\glsxtrabbrvfootnote{##1}% + {\glsxtrfootnotelongplformat{##1}{\glsfirstlongfootnotefont}}% }% - }% -} % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\@glsxtr@mglswrite} -%\changes{1.48}{2021-11-22}{new} -%Write information to the aux file for \app{bib2gls} to pick up, but -%only need to do it once per label since it only indicates which multi-entry -%has been referenced without any additional information. +% The first use inline full form uses the short (long) style. % \begin{macrocode} -\newcommand{\glsxtrmglswrite}[1]{% - \ifx\@glsxtr@record@setting\@glsxtr@record@setting@off - \else - \protected@edef\@glsxtr@mglslabel{#1}% - \ifdef\@glsxtr@mglsreflist - {% - \expandafter\DTLifinlist\expandafter{\@glsxtr@mglslabel}% - {\@glsxtr@mglsreflist}{}% - {% - \xappto\@glsxtr@mglsreflist{,\expandonce\@glsxtr@mglslabel}% - \if@mgls@writeseparaterefs - \protected@write\@auxout{}{\string\@glsxtr@mglsrefs{#1}}% - \fi - }% + \renewcommand*{\glsxtrinlinefullformat}[2]{% + \glsxtrshortlongformat{##1}{##2}% + {\glsfirstlongfootnotefont}{\glsfirstabbrvemfont}% }% - {% - \global\let\@glsxtr@mglsreflist\@glsxtr@mglslabel - \if@mgls@writeseparaterefs - \protected@write\@auxout{}{\string\@glsxtr@mglsrefs{#1}}% - \else - \AtEndDocument{\immediate\protected@write\@auxout{}% - {\string\@glsxtr@mglsrefs{\@glsxtr@mglsreflist}}}% - \fi - \@mgls@disable@writeseparateref@cond + \renewcommand*{\glsxtrinlinefullplformat}[2]{% + \glsxtrshortlongplformat{##1}{##2}% + {\glsfirstlongfootnotefont}{\glsfirstabbrvemfont}% + }% + \renewcommand*{\Glsxtrinlinefullformat}[2]{% + \Glsxtrshortlongformat{##1}{##2}% + {\glsfirstlongfootnotefont}{\glsfirstabbrvemfont}% + }% + \renewcommand*{\Glsxtrinlinefullplformat}[2]{% + \Glsxtrshortlongplformat{##1}{##2}% + {\glsfirstlongfootnotefont}{\glsfirstabbrvemfont}% + }% + \renewcommand*{\GLSxtrinlinefullformat}[2]{% + \GLSxtrshortlongformat{##1}{##2}% + {\glsfirstlongfootnotefont}{\glsfirstabbrvemfont}% + }% + \renewcommand*{\GLSxtrinlinefullplformat}[2]{% + \GLSxtrshortlongplformat{##1}{##2}% + {\glsfirstlongfootnotefont}{\glsfirstabbrvemfont}% }% - \fi } % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\@glsxtr@mglsrefs} -%\changes{1.48}{2021-11-22}{new} +%\end{abbrvstyle} +%\begin{abbrvstyle}{footnote-em} +%Backward compatibility: % \begin{macrocode} -\newcommand{\@glsxtr@mglsrefs}[1]{} +\@glsxtr@deprecated@abbrstyle{footnote-em}{short-em-footnote} % \end{macrocode} -%\end{macro} +%\end{abbrvstyle} % -%\begin{macro}{\if@mgls@writeseparaterefs} -%\changes{1.48}{2021-11-22}{new} -%If this conditional is changed, it must be done before the first -%instance of any \cs{mgls}-like command. +%\begin{abbrvstyle}{short-em-footnote-desc} +% Like \abbrstyle{short-em-footnote} but with user supplied description. +%\changes{1.42}{2020-02-03}{new} % \begin{macrocode} -\newif\if@mgls@writeseparaterefs \@mgls@writeseparaterefsfalse +\newabbreviationstyle{short-em-footnote-desc}% +{% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\mglsWriteSeparateRefsTrue} -%\changes{1.48}{2021-11-22}{new} +% Set accessibility attributes if enabled. % \begin{macrocode} -\newcommand{\mglsWriteSeparateRefsTrue}{\global\@mgls@writeseparaterefstrue} + \glsxtrAccSuppAbbrSetNameLongAttrs\glscategorylabel % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\mglsWriteSeparateRefsFalse} -%\changes{1.48}{2021-11-22}{new} +% Setup the default fields. % \begin{macrocode} -\newcommand{\mglsWriteSeparateRefsFalse}{\global\@mgls@writeseparaterefsfalse} + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrfootnotedescname}, + sort={\glsxtrfootnotedescsort}, + first={\glsfirstxpabbrvfont{\the\glsshorttok}{\glscategorylabel}% + \protect\glsxtrabbrvfootnote{\the\glslabeltok}% + {\protect\glsfirstlongfootnotefont{\the\glslongtok}}},% + firstplural={\glsfirstxpabbrvfont{\the\glsshortpltok}{\glscategorylabel}% + \protect\glsxtrabbrvfootnote{\the\glslabeltok}% + {\protect\glsfirstlongfootnotefont{\the\glslongpltok}}},% + text={\glsxpabbrvfont{\the\glsshorttok}{\glscategorylabel}},% + plural={\glsxpabbrvfont{\the\glsshortpltok}{\glscategorylabel}}}% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\@mgls@disable@writeseparateref@cond} -%\changes{1.48}{2021-11-22}{new} +% Switch off hyperlinks on first use to prevent nested hyperlinks, +% and unset the \catattr{regular} attribute if it has been set. +%\changes{0.5.1}{2015-12-07}{switch off regular attribute if set} % \begin{macrocode} -\newcommand*{\@mgls@disable@writeseparateref@cond}{% - \gdef\mglsWriteSeparateRefsTrue{\PackageError{glossaries-extra}% - {Too late to use \string\mglsWriteSeparateRefsTrue}% - {\string\mglsWriteSeparateRefsTrue\space can only be used before - the first instance of any \string\mgls-like command}}% - \gdef\mglsWriteSeparateRefsFalse{\PackageError{glossaries-extra}% - {Too late to use \string\mglsWriteSeparateRefsFalse}% - {\string\mglsWriteSeparateRefsFalse\space can only be used before - the first instance of any \string\mgls-like command}}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glssetattribute{\the\glslabeltok}{nohyperfirst}{true}% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% + \GlsXtrUseAbbrStyleFmts{short-em-footnote}% } % \end{macrocode} -%\end{macro} +%\end{abbrvstyle} % -%\begin{macro}{\glsxtr@newmgls} -%\changes{1.48}{2021-11-22}{new} +%\begin{abbrvstyle}{short-em-postfootnote} +%\changes{0.5}{2015-12-07}{new} +%\changes{1.04}{2016-05-02}{renamed from \qt{postfootnote-em}} +%\changes{1.42}{2020-02-03}{added missing text key} % \begin{macrocode} -\newcommand{\glsxtr@newmgls}[5]{% - \edef\@glsxr@newmgls@do{% - \noexpand\newrobustcmd*{\expandonce{\csname #1\endcsname}}% - {\noexpand\@gls@hyp@opt\expandonce{\csname ns@glsxtr@#1\endcsname}}% - \noexpand\newcommand*{\expandonce{\csname ns@glsxtr@#1\endcsname}}[2][]{% - \noexpand\new@ifnextchar[% - {\expandonce{\csname glsxtr@#1\endcsname}{####1}{####2}}% - {\expandonce{\csname glsxtr@#1\endcsname}{####1}{####2}[]}% - }% - \noexpand\def\expandonce{\csname glsxtr@#1\endcsname}####1####2[####3]{% - \noexpand\def\noexpand\glsxtrcurrentmglscsname{#1}% - \noexpand\glsxtr@mgls@inner{####1}{####2}{####3}% - {\noexpand#2}{\noexpand#3}{\noexpand#4}{\noexpand#5}% - }% - }% - \@glsxr@newmgls@do - \ifx\@glsxtr@record@setting\@glsxtr@record@setting@off - \else +\newabbreviationstyle{short-em-postfootnote}% +{% % \end{macrocode} -% Provide a way for \app{bib2gls} to recognise the command (this will -% make it easier to add extra commands without having to modify -% \app{bib2gls}). +% Set accessibility attributes if enabled. % \begin{macrocode} - \ifdef\@glsxtr@mglslikelist - {\xappto\@glsxtr@mglslikelist{,#1}}% - {% - \gdef\@glsxtr@mglslikelist{#1}% - \AtEndDocument{\immediate\protected@write\@auxout{}% - {\string\@glsxtr@mglslike{\@glsxtr@mglslikelist}}}% - }% - \fi -} + \glsxtrAccSuppAbbrSetNoLongAttrs\glscategorylabel % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\@glsxtr@mglslike} -%\changes{1.48}{2021-11-22}{new} +% Setup the default fields. % \begin{macrocode} -\newcommand*{\@glsxtr@mglslike}[1]{} + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrfootnotename}, + sort={\the\glsshorttok}, + description={\the\glslongtok},% + first={\glsfirstxpabbrvfont{\the\glsshorttok}{\glscategorylabel}},% + firstplural={\glsfirstxpabbrvfont{\the\glsshortpltok}{\glscategorylabel}},% + text={\glsxpabbrvfont{\the\glsshorttok}{\glscategorylabel}},% + plural={\glsxpabbrvfont{\the\glsshortpltok}{\glscategorylabel}}}% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\GlsXtrMglsOrGls} -%\begin{definition} -%\cs{GlsXtrMglsOrGls}\marg{mgls cs}\marg{gls cs}\meta{modifier}\oarg{options}\marg{label}\oarg{insert} -%\end{definition} -%\changes{1.48}{2021-11-22}{new} +% Make this category insert a footnote after the link if this was +% the first use, and +% unset the \catattr{regular} attribute if it has been set. +%Previously this was done by redefining {glsxtrsetupfulldefs} but +%that interferes with other styles. Instead, this now uses \cs{glsxtrifwasglslike} +%\changes{1.49}{??}{removed redef of \cs{glsxtrsetupfulldefs}} % \begin{macrocode} -\newcommand*{\GlsXtrMglsOrGls}[2]{% - \def\@glsxtr@mgls@or@gls@mcs{#1}% - \def\@glsxtr@mgls@or@gls@gcs{#2}% - \@ifstar{\s@GlsXtrMglsOrGls}% - {% - \@ifnextchar+{\PLUS\@firstoftwo{\p@GlsXtrMglsOrGls}}% - {% - \ifdefempty\@gls@alt@hyp@opt@char\@GlsXtrMglsOrGls\alt@GlsXtrMglsOrGls - }% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \csdef{glsxtrpostlink\glscategorylabel}{% + \glsxtrifwasglslikeandfirstuse + {% +% \end{macrocode} +% Ensure \cs{glslabel} is expanded as it may be +% lost by the time the footnote occurs. +% \begin{macrocode} + \glsxtrdopostpunc{\xpglsxtrpostabbrvfootnote}% + }% + {}% + }% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% +% \end{macrocode} +%\changes{1.42}{2020-02-03}{removed \cs{protect} from \cs{glsxtremsuffix}} +% \begin{macrocode} + \renewcommand*{\abbrvpluralsuffix}{\glsxtremsuffix}% + \renewcommand*\glsxtrrevert[1]{\glsxtremrevert{##1}}% + \renewcommand*\glsabbrvfont[1]{\glsabbrvemfont{##1}}% + \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvemfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongfootnotefont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslongfootnotefont{##1}}% +% \end{macrocode} +% The full format displays the short form. The long form is +% deferred. +% \begin{macrocode} + \renewcommand*{\glsxtrfullformat}[2]{% + \glsxtrshortformat{##1}{##2}{\glsfirstabbrvemfont}% + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsxtrshortplformat{##1}{##2}{\glsfirstabbrvemfont}% + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \Glsxtrshortformat{##1}{##2}{\glsfirstabbrvemfont}% + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \Glsxtrshortplformat{##1}{##2}{\glsfirstabbrvemfont}% + }% + \renewcommand*{\GLSxtrfullformat}[2]{% + \GLSxtrshortformat{##1}{##2}{\glsfirstabbrvemfont}% + }% + \renewcommand*{\GLSxtrfullplformat}[2]{% + \GLSxtrshortplformat{##1}{##2}{\glsfirstabbrvemfont}% + }% +% \end{macrocode} +% The inline full form uses the short (long) style. +% \begin{macrocode} + \renewcommand*{\glsxtrinlinefullformat}[2]{% + \glsxtrshortlongformat{##1}{##2}% + {\glsfirstlongfootnotefont}{\glsfirstabbrvemfont}% + }% + \renewcommand*{\glsxtrinlinefullplformat}[2]{% + \glsxtrshortlongplformat{##1}{##2}% + {\glsfirstlongfootnotefont}{\glsfirstabbrvemfont}% + }% + \renewcommand*{\Glsxtrinlinefullformat}[2]{% + \Glsxtrshortlongformat{##1}{##2}% + {\glsfirstlongfootnotefont}{\glsfirstabbrvemfont}% + }% + \renewcommand*{\Glsxtrinlinefullplformat}[2]{% + \Glsxtrshortlongplformat{##1}{##2}% + {\glsfirstlongfootnotefont}{\glsfirstabbrvemfont}% + }% + \renewcommand*{\GLSxtrinlinefullformat}[2]{% + \GLSxtrshortlongformat{##1}{##2}% + {\glsfirstlongfootnotefont}{\glsfirstabbrvemfont}% + }% + \renewcommand*{\GLSxtrinlinefullplformat}[2]{% + \GLSxtrshortlongplformat{##1}{##2}% + {\glsfirstlongfootnotefont}{\glsfirstabbrvemfont}% }% } % \end{macrocode} -%\end{macro} +%\end{abbrvstyle} +%\begin{abbrvstyle}{postfootnote-em} +%Backward compatibility: +% \begin{macrocode} +\@glsxtr@deprecated@abbrstyle{postfootnote-em}{short-em-postfootnote} +% \end{macrocode} +%\end{abbrvstyle} % -%\begin{macro}{\alt@GlsXtrMglsOrGls} -%\changes{1.48}{2021-11-22}{new} +%\begin{abbrvstyle}{short-em-postfootnote-desc} +% Like \abbrstyle{short-em-postfootnote} but with user supplied description. +%\changes{1.42}{2020-02-03}{new} % \begin{macrocode} -\newcommand*{\alt@GlsXtrMglsOrGls}{ - \expandafter\@ifnextchar\@gls@alt@hyp@opt@char - {\@firstoftwo{\@alt@GlsXtrMglsOrGls}}{\@GlsXtrMglsOrGls}% +\newabbreviationstyle{short-em-postfootnote-desc}% +{% +% \end{macrocode} +% Set accessibility attributes if enabled. +% \begin{macrocode} + \glsxtrAccSuppAbbrSetNameLongAttrs\glscategorylabel +% \end{macrocode} +% Setup the default fields. +% \begin{macrocode} + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrfootnotedescname}, + sort={\glsxtrfootnotedescsort}, + first={\glsfirstxpabbrvfont{\the\glsshorttok}{\glscategorylabel}},% + firstplural={\glsfirstxpabbrvfont{\the\glsshortpltok}{\glscategorylabel}},% + text={\glsxpabbrvfont{\the\glsshorttok}{\glscategorylabel}},% + plural={\glsxpabbrvfont{\the\glsshortpltok}{\glscategorylabel}}}% +% \end{macrocode} +% Make this category insert a footnote after the link if this was +% the first use, and +% unset the \catattr{regular} attribute if it has been set. +%Previously this was done by redefining {glsxtrsetupfulldefs} but +%that interferes with other styles. Instead, this now uses \cs{glsxtrifwasglslike} +%\changes{1.49}{??}{removed redef of \cs{glsxtrsetupfulldefs}} +% \begin{macrocode} + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \csdef{glsxtrpostlink\glscategorylabel}{% + \glsxtrifwasglslikeandfirstuse + {% + \glsxtrdopostpunc{\xpglsxtrpostabbrvfootnote}% + }% + {}% + }% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% + \GlsXtrUseAbbrStyleFmts{short-em-postfootnote}% } % \end{macrocode} -%\end{macro} +%\end{abbrvstyle} % -%\begin{macro}{\@GlsXtrMglsOrGls} -%\changes{1.48}{2021-11-22}{new} +%\subsection{Predefined Styles (User Parentheses Hook)} +% These styles allow the user to adjust the parenthetical forms. +% These styles all test for the existence of the +% field given by: +%\begin{macro}{\glsxtruserfield} +%\changes{1.04}{2016-05-02}{new} +% Default is the useri field. % \begin{macrocode} -\newcommand*{\@GlsXtrMglsOrGls}[2][]{% - \glsxtrifmulti{#2}% - {\@glsxtr@mgls@or@gls@mcs[#1]{#2}}% - {\@glsxtr@mgls@or@gls@gcs[#1]{#2}}% -} +\newcommand*{\glsxtruserfield}{useri} % \end{macrocode} %\end{macro} % -%\begin{macro}{\s@GlsXtrMglsOrGls} -%\changes{1.48}{2021-11-22}{new} +%\begin{macro}{\glsxtruserparensep} +%\changes{1.49}{??}{new} +% Separator used inside parenthetical content. % \begin{macrocode} -\newcommand*{\s@GlsXtrMglsOrGls}[2][]{% - \glsxtrifmulti{#2}% - {\@glsxtr@mgls@or@gls@mcs*[#1]{#2}}% - {\@glsxtr@mgls@or@gls@gcs*[#1]{#2}}% -} +\newcommand*{\glsxtruserparensep}{, } % \end{macrocode} %\end{macro} % -%\begin{macro}{\p@GlsXtrMglsOrGls} -%\changes{1.48}{2021-11-22}{new} +%\begin{macro}{\glsxtruserfieldfmt} +%\changes{1.49}{??}{new} +% Used to format the value of the field given by \cs{glsxtruserfield}. % \begin{macrocode} -\newcommand*{\p@GlsXtrMglsOrGls}[2][]{% - \glsxtrifmulti{#2}% - {\@glsxtr@mgls@or@gls@mcs+[#1]{#2}}% - {\@glsxtr@mgls@or@gls@gcs+[#1]{#2}}% -} +\newcommand*{\glsxtruserfieldfmt}[1]{#1} % \end{macrocode} %\end{macro} % -%\begin{macro}{\@alt@GlsXtrMglsOrGls} -%\changes{1.48}{2021-11-22}{new} +%\begin{macro}{\glsxtruserparen} +%\changes{1.04}{2016-05-02}{new} +% The format of the parenthetical information. +% The first argument is the long/short form. The second argument +% is the entry's label. If \cs{glscurrentfieldvalue} has been +% defined, then we have at least \sty{glossaries} v4.23, which makes +% it easier for the user to adjust this. % \begin{macrocode} -\newcommand*{\@alt@GlsXtrMglsOrGls}[2][]{% - \glsxtrifmulti{#2}% - {\expandafter\@glsxtr@mgls@or@gls@mcs\@gls@alt@hyp@opt@char[#1]{#2}}% - {\expandafter\@glsxtr@mgls@or@gls@gcs\@gls@alt@hyp@opt@char[#1]{#2}}% +\ifdef\glscurrentfieldvalue +{ + \newcommand*{\glsxtruserparen}[2]{% + \glsxtrfullsep{#2}% + \glsxtrparen + {#1\ifglshasfield{\glsxtruserfield}{#2}% + {\expandafter\glsxtrgenentrytextfmt\expandafter{\glsxtruserparensep}% + \glsxtruserfieldfmt{\expandafter\glsxtrgenentrytextfmt\expandafter{\glscurrentfieldvalue}}% + }{}% + }% + } +} +{ + \newcommand*{\glsxtruserparen}[2]{% + \glsxtrfullsep{#2}% + \glsxtrparen + {#1\ifglshasfield{\glsxtruserfield}{#2}% + {\expandafter\glsxtrgenentrytextfmt\expandafter{\glsxtruserparensep}% + \glsxtruserfieldfmt{\expandafter\glsxtrgenentrytextfmt\expandafter{\@glo@thisvalue}}% + }{}% + }% + } } % \end{macrocode} %\end{macro} % -%\begin{macro}{\mgls} -%\changes{1.48}{2021-11-22}{new} -%\begin{definition} -%\cs{mgls}\oarg{options}\marg{label}\oarg{insert} -%\end{definition} -% Use \cs{gls} for all elements. +%\begin{macro}{\GLSxtruserparen} +%\changes{1.49}{??}{new} +% As above but converts the user supplied information to all-caps. +% The first argument should be provided in all-caps if required. % \begin{macrocode} -\glsxtr@newmgls{mgls}{\@gls@}{\@gls@}{\@gls@}{\@gls@}% +\ifdef\glscurrentfieldvalue +{ + \newcommand*{\GLSxtruserparen}[2]{% + \glsxtrfullsep{#2}% + \glsxtrparen + {#1\ifglshasfield{\glsxtruserfield}{#2}% + {\expandafter\glsxtrgenentrytextfmt\expandafter{\glsxtruserparensep}% + \glsxtruserfieldfmt{\expandafter\mfirstucMakeUppercase\expandafter{\expandafter + \glsxtrgenentrytextfmt\expandafter{\glscurrentfieldvalue}}}% + }{}% + }% + } +} +{ + \newcommand*{\GLSxtruserparen}[2]{% + \glsxtrfullsep{#2}% + \glsxtrparen + {#1\ifglshasfield{\glsxtruserfield}{#2}% + {\expandafter\glsxtrgenentrytextfmt\expandafter{\glsxtruserparensep}% + \glsxtruserfieldfmt{\expandafter\mfirstucMakeUppercase\expandafter{\expandafter + \glsxtrgenentrytextfmt\expandafter{\@glo@thisvalue}}}% + }{}% + }% + } +} % \end{macrocode} %\end{macro} -% -%\begin{macro}{\mglspl} -%\changes{1.48}{2021-11-22}{new} -%\begin{definition} -%\cs{mglspl}\oarg{options}\marg{label}\oarg{insert} -%\end{definition} -% Use \cs{glspl} for all elements. +% Font used for short form: +%\begin{macro}{\glsabbrvuserfont} +%\changes{1.04}{2016-05-02}{new} +%\changes{1.17}{2017-08-09}{initialised to default font} % \begin{macrocode} -\glsxtr@newmgls{mglspl}{\@glspl@}{\@glspl@}{\@glspl@}{\@glspl@}% +\newcommand*{\glsabbrvuserfont}[1]{\glsabbrvdefaultfont{#1}} % \end{macrocode} %\end{macro} -% -%\begin{macro}{\mglsmainpl} -%\changes{1.48}{2021-11-22}{new} -%\begin{definition} -%\cs{mglsmainpl}\oarg{options}\marg{label}\oarg{insert} -%\end{definition} -% Only use \cs{glspl} for the main element, otherwise use \cs{gls}. +% Font used for short form on first use: +%\begin{macro}{\glsfirstabbrvuserfont} +%\changes{1.04}{2016-05-02}{new} % \begin{macrocode} -\glsxtr@newmgls{mglsmainpl}{\@gls@}{\@gls@}{\@glspl@}{\@glspl@}% +\newcommand*{\glsfirstabbrvuserfont}[1]{\glsabbrvuserfont{#1}} % \end{macrocode} %\end{macro} -% -%\begin{macro}{\Mgls} -%\changes{1.48}{2021-11-22}{new} -%\begin{definition} -%\cs{Mgls}\oarg{options}\marg{label}\oarg{insert} -%\end{definition} -%Use \cs{Gls} for first element and \cs{gls} for others. +% Font used for long form: +%\begin{macro}{\glslonguserfont} +%\changes{1.04}{2016-05-02}{new} +%\changes{1.17}{2017-08-09}{initialised to default font} % \begin{macrocode} -\glsxtr@newmgls{Mgls}{\@Gls@}{\@gls@}{\@Gls@}{\@gls@}% +\newcommand*{\glslonguserfont}[1]{\glslongdefaultfont{#1}} % \end{macrocode} %\end{macro} -% -%\begin{macro}{\Mglspl} -%\changes{1.48}{2021-11-22}{new} -%\begin{definition} -%\cs{Mglspl}\oarg{options}\marg{label}\oarg{insert} -%\end{definition} -%Use \cs{Glspl} for first element and \cs{glspl} for others. +% Font used for long form on first use: +%\begin{macro}{\glsfirstlonguserfont} +%\changes{1.04}{2016-05-02}{new} % \begin{macrocode} -\glsxtr@newmgls{Mglspl}{\@Glspl@}{\@glspl@}{\@Glspl@}{\@glspl@}% +\newcommand*{\glsfirstlonguserfont}[1]{\glslonguserfont{#1}} % \end{macrocode} %\end{macro} -% -%\begin{macro}{\Mglsmainpl} -%\changes{1.48}{2021-11-22}{new} -%\begin{definition} -%\cs{Mglsmainpl}\oarg{options}\marg{label}\oarg{insert} -%\end{definition} -%Upper case the first element, no case change for others. -%Use plural for the main element only. +% The default short form suffix: +%\begin{macro}{\glsxtrusersuffix} +%\changes{1.04}{2016-05-02}{new} % \begin{macrocode} -\glsxtr@newmgls{Mglsmainpl}{\@Gls@}{\@gls@}{\@Glspl@}{\@glspl@}% +\newcommand*{\glsxtrusersuffix}{\glsxtrabbrvpluralsuffix} % \end{macrocode} %\end{macro} % -%\begin{macro}{\MGls} -%\changes{1.48}{2021-11-22}{new} -%\begin{definition} -%\cs{MGls}\oarg{options}\marg{label}\oarg{insert} -%\end{definition} -%Use \cs{Gls} for all elements. +% Description encapsulator. +%\begin{macro}{\glsuserdescription} +%\changes{1.30}{2018-04-25}{new} +%The first argument is the description. The second argument is the +%label. % \begin{macrocode} -\glsxtr@newmgls{MGls}{\@Gls@}{\@Gls@}{\@Gls@}{\@Gls@}% +\newcommand*{\glsuserdescription}[2]{\glslonguserfont{#1}} % \end{macrocode} %\end{macro} % -%\begin{macro}{\MGlspl} -%\changes{1.48}{2021-11-22}{new} -%\begin{definition} -%\cs{MGlspl}\oarg{options}\marg{label}\oarg{insert} -%\end{definition} -%Use \cs{Glspl} for all elements. +%\begin{abbrvstyle}{long-short-user} +%\changes{1.04}{2016-05-02}{new} +%\changes{1.42}{2020-02-03}{added missing text key} % \begin{macrocode} -\glsxtr@newmgls{MGlspl}{\@Glspl@}{\@Glspl@}{\@Glspl@}{\@Glspl@}% +\newabbreviationstyle{long-short-user}% +{% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\MGlsmainpl} -%\changes{1.48}{2021-11-22}{new} -%\begin{definition} -%\cs{MGlsmainpl}\oarg{options}\marg{label}\oarg{insert} -%\end{definition} -%Start all elements with upper case. Only use plural for main -%element. +% Set accessibility attributes if enabled. % \begin{macrocode} -\glsxtr@newmgls{MGlsmainpl}{\@Gls@}{\@Gls@}{\@Glspl@}{\@Glspl@}% + \glsxtrAccSuppAbbrSetFirstLongAttrs\glscategorylabel % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\MGLS} -%\changes{1.48}{2021-11-22}{new} -%\begin{definition} -%\cs{MGLS}\oarg{options}\marg{label}\oarg{insert} -%\end{definition} -%Use \cs{GLS} for all elements. +% Setup the default fields. % \begin{macrocode} -\glsxtr@newmgls{MGLS}{\@GLS@}{\@GLS@}{\@GLS@}{\@GLS@}% + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrlongshortname}, + sort={\the\glsshorttok}, + first={\protect\glsfirstlonguserfont{\the\glslongtok}% + \protect\glsxtruserparen{\protect\glsfirstabbrvuserfont{\the\glsshorttok}}% + {\the\glslabeltok}},% + firstplural={\protect\glsfirstlonguserfont{\the\glslongpltok}% + \protect\glsxtruserparen + {\protect\glsfirstabbrvuserfont{\the\glsshortpltok}}{\the\glslabeltok}},% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\MGLSpl} -%\changes{1.48}{2021-11-22}{new} -%\begin{definition} -%\cs{MGLSpl}\oarg{options}\marg{label}\oarg{insert} -%\end{definition} -%Use \cs{GLSpl} for all elements. +%\changes{1.15}{2017-05-10}{fixed spelling of \cs{glsabbrvfont}} % \begin{macrocode} -\glsxtr@newmgls{MGLSpl}{\@GLSpl@}{\@GLSpl@}{\@GLSpl@}{\@GLSpl@}% + text={\protect\glsabbrvuserfont{\the\glsshorttok}},% + plural={\protect\glsabbrvuserfont{\the\glsshortpltok}},% + description={\protect\glsuserdescription{\the\glslongtok}% + {\the\glslabeltok}}}% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\MGLSmainpl} -%\changes{1.48}{2021-11-22}{new} -%\begin{definition} -%\cs{MGLSmainpl}\oarg{options}\marg{label}\oarg{insert} -%\end{definition} -%Upper case all elements. Only use plural for main element. +% Unset the \catattr{regular} attribute if it has been set. % \begin{macrocode} -\glsxtr@newmgls{MGLSmainpl}{\@GLS@}{\@GLS@}{\@GLSpl@}{\@GLSpl@}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glsexclapplyinnerfmtfield{\the\glslabeltok}{desc}% + \glsxtrsetcomplexstyle{\the\glslabeltok}{2}% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\@glslongortext@} -%\changes{1.48}{2021-11-22}{new} +% In case the user wants to mix and match font styles, these are +% redefined here. % \begin{macrocode} -\def\@glslongortext#1#2[#3]{% - \ifglshaslong{#2}{\@glsxtrlong{#1}{#2}[#3]}{\@glstext@{#1}{#2}[#3]}% -} + \renewcommand*{\abbrvpluralsuffix}{\glsxtrusersuffix}% + \renewcommand*{\glsabbrvfont}[1]{\glsabbrvuserfont{##1}}% + \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvuserfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlonguserfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslonguserfont{##1}}% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\@glsshortortext@} -%\changes{1.48}{2021-11-22}{new} +% The first use full form and the inline full form are the same for +% this style. % \begin{macrocode} -\def\@glsshortortext#1#2[#3]{% - \ifglshasshort{#2}{\@glsxtrshort{#1}{#2}[#3]}{\@glstext@{#1}{#2}[#3]}% + \renewcommand*{\glsxtrfullformat}[2]{% + \glsxtruserlongshortformat{##1}{##2}% + {\glsfirstlonguserfont}{\glsfirstabbrvuserfont}% + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsxtruserlongshortplformat{##1}{##2}% + {\glsfirstlonguserfont}{\glsfirstabbrvuserfont}% + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \Glsxtruserlongshortformat{##1}{##2}% + {\glsfirstlonguserfont}{\glsfirstabbrvuserfont}% + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \Glsxtruserlongshortplformat{##1}{##2}% + {\glsfirstlonguserfont}{\glsfirstabbrvuserfont}% + }% + \renewcommand*{\GLSxtrfullformat}[2]{% + \GLSxtruserlongshortformat{##1}{##2}% + {\glsfirstlonguserfont}{\glsfirstabbrvuserfont}% + }% + \renewcommand*{\GLSxtrfullplformat}[2]{% + \GLSxtruserlongshortplformat{##1}{##2}% + {\glsfirstlonguserfont}{\glsfirstabbrvuserfont}% + }% } % \end{macrocode} -%\end{macro} +%\end{abbrvstyle} % -%\begin{macro}{\@glsfullorfirst@} -%\changes{1.48}{2021-11-22}{new} +%\begin{abbrvstyle}{long-postshort-user} +%\changes{1.12}{2017-02-03}{new} +%\changes{1.42}{2020-02-03}{added missing text key} +%Like \abbrstyle{long-short-user} but defers the parenthetical +%matter to after the link. % \begin{macrocode} -\def\@glsfullorfirst#1#2[#3]{% - \ifglshasshort{#2}{\@glsxtr@full{#1}{#2}[#3]}{\@glsfirst@{#1}{#2}[#3]}% -} +\newabbreviationstyle{long-postshort-user}% +{% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\@Glslongortext@} -%\changes{1.48}{2021-11-22}{new} +% Set accessibility attributes if enabled. % \begin{macrocode} -\def\@Glslongortext#1#2[#3]{% - \ifglshaslong{#2}{\@Glsxtrlong{#1}{#2}[#3]}{\@Glstext@{#1}{#2}[#3]}% -} + \glsxtrAccSuppAbbrSetFirstLongAttrs\glscategorylabel % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\@Glsshortortext@} -%\changes{1.48}{2021-11-22}{new} +% Setup the default fields. % \begin{macrocode} -\def\@Glsshortortext#1#2[#3]{% - \ifglshasshort{#2}{\@Glsxtrshort{#1}{#2}[#3]}{\@Glstext@{#1}{#2}[#3]}% + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrlongshortname}, + sort={\the\glsshorttok}, + first={\protect\glsfirstlonguserfont{\the\glslongtok}},% + firstplural={\protect\glsfirstlonguserfont{\the\glslongpltok}},% +% \end{macrocode} +%\changes{1.15}{2017-05-10}{fixed spelling of \cs{glsabbrvfont}} +% \begin{macrocode} + text={\protect\glsabbrvuserfont{\the\glsshorttok}},% + plural={\protect\glsabbrvuserfont{\the\glsshortpltok}},% + description={\protect\glsuserdescription{\the\glslongtok}% + {\the\glslabeltok}}}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glsexclapplyinnerfmtfield{\the\glslabeltok}{desc}% + \csdef{glsxtrpostlink\glscategorylabel}{% + \glsxtrifwasfirstuse + {% + \glsxtrpostusershortformat{\glslabel}{\glsfirstabbrvuserfont}% + }% + {}% + }% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% +% \end{macrocode} +% In case the user wants to mix and match font styles, these are +% redefined here. +% \begin{macrocode} + \renewcommand*{\abbrvpluralsuffix}{\glsxtrusersuffix}% + \renewcommand*{\glsabbrvfont}[1]{\glsabbrvuserfont{##1}}% + \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvuserfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlonguserfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslonguserfont{##1}}% +% \end{macrocode} +%First use full form: +% \begin{macrocode} + \renewcommand*{\glsxtrfullformat}[2]{% + \glsxtrlongformat{##1}{##2}{\glsfirstlonguserfont}% + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsxtrlongplformat{##1}{##2}{\glsfirstlonguserfont}% + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \Glsxtrlongformat{##1}{##2}{\glsfirstlonguserfont}% + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \Glsxtrlongplformat{##1}{##2}{\glsfirstlonguserfont}% + }% + \renewcommand*{\GLSxtrfullformat}[2]{% + \GLSxtrlongformat{##1}{##2}{\glsfirstlonguserfont}% + }% + \renewcommand*{\GLSxtrfullplformat}[2]{% + \GLSxtrlongplformat{##1}{##2}{\glsfirstlonguserfont}% + }% } % \end{macrocode} -%\end{macro} +%\end{abbrvstyle} % -%\begin{macro}{\@Glsfullorfirst@} +%Small-caps is awkward, so support for that is added. +%\begin{macro}{\glsabbrvscuserfont} %\changes{1.48}{2021-11-22}{new} % \begin{macrocode} -\def\@Glsfullorfirst#1#2[#3]{% - \ifglshasshort{#2}{\@Glsxtr@full{#1}{#2}[#3]}{\@Glsfirst@{#1}{#2}[#3]}% -} +\newcommand*{\glsabbrvscuserfont}{\glsabbrvscfont}% % \end{macrocode} %\end{macro} -% -%\begin{macro}{\mglsshort} +%\begin{macro}{\glsfirstabbrvscuserfont} %\changes{1.48}{2021-11-22}{new} -%\begin{definition} -%\cs{mglsshort}\oarg{options}\marg{label}\oarg{insert} -%\end{definition} -% Use short or text for all elements. % \begin{macrocode} -\glsxtr@newmgls{mglsshort}% -{\@glsshortortext}{\@glsshortortext}{\@glsshortortext}{\@glsshortortext}% +\newcommand*{\glsfirstabbrvscuserfont}{\glsabbrvscuserfont}% % \end{macrocode} %\end{macro} -% -%\begin{macro}{\mglslong} +% The default short form suffix: +%\begin{macro}{\glsxtrscusersuffix} %\changes{1.48}{2021-11-22}{new} -%\begin{definition} -%\cs{mglslong}\oarg{options}\marg{label}\oarg{insert} -%\end{definition} -% Use long or text for all elements. % \begin{macrocode} -\glsxtr@newmgls{mglslong}% -{\@glslongortext}{\@glslongortext}{\@glslongortext}{\@glslongortext}% +\newcommand*{\glsxtrscusersuffix}{\glsxtrscsuffix} % \end{macrocode} %\end{macro} -% -%\begin{macro}{\mglsfull} -%\changes{1.48}{2021-11-22}{new} -%\begin{definition} -%\cs{mglsfull}\oarg{options}\marg{label}\oarg{insert} -%\end{definition} -% Use full or first for all elements. +%\begin{macro}{\glsxtrscuserrevert} +%\changes{1.49}{??}{new} % \begin{macrocode} -\glsxtr@newmgls{mglsfull}% -{\@glsfullorfirst}{\@glsfullorfirst}{\@glsfullorfirst}{\@glsfullorfirst}% +\newcommand*{\glsxtrscuserrevert}{\glsxtrscrevert} % \end{macrocode} %\end{macro} % -%\begin{macro}{\Mglsshort} +%\begin{macro}{\glsxtrlongshortscusername} %\changes{1.48}{2021-11-22}{new} -%\begin{definition} -%\cs{Mglsshort}\oarg{options}\marg{label}\oarg{insert} -%\end{definition} -% Use short or text for all elements with initial cap on first element. +% The default name format for this style. % \begin{macrocode} -\glsxtr@newmgls{Mglsshort}% -{\@Glsshortortext}{\@glsshortortext}{\@Glsshortortext}{\@glsshortortext}% +\newcommand*{\glsxtrlongshortscusername}{% + \protect\glsabbrvscuserfont{\the\glsshorttok}% +} % \end{macrocode} %\end{macro} % -%\begin{macro}{\Mglslong} +%\begin{abbrvstyle}{long-postshort-sc-user} %\changes{1.48}{2021-11-22}{new} -%\begin{definition} -%\cs{Mglslong}\oarg{options}\marg{label}\oarg{insert} -%\end{definition} -% Use long or text for all elements with initial cap on first -% element. +%Like \abbrstyle{long-postshort-sc-user} but uses smallcaps. % \begin{macrocode} -\glsxtr@newmgls{Mglslong}% -{\@Glslongortext}{\@glslongortext}{\@Glslongortext}{\@glslongortext}% +\newabbreviationstyle{long-postshort-sc-user}% +{% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\Mglsfull} -%\changes{1.48}{2021-11-22}{new} -%\begin{definition} -%\cs{Mglsfull}\oarg{options}\marg{label}\oarg{insert} -%\end{definition} -% Use full or first for all elements with initial cap on first -% element. +% Set accessibility attributes if enabled. % \begin{macrocode} -\glsxtr@newmgls{Mglsfull}% -{\@Glsfullorfirst}{\@glsfullorfirst}{\@Glsfullorfirst}{\@glsfullorfirst}% + \glsxtrAccSuppAbbrSetFirstLongAttrs\glscategorylabel % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\mglsname} -%\changes{1.48}{2021-11-22}{new} -%\begin{definition} -%\cs{mglsname}\oarg{options}\marg{label}\oarg{insert} -%\end{definition} -% Use name for all elements. +% Setup the default fields. % \begin{macrocode} -\glsxtr@newmgls{mglsname}% - {\@glsname@}{\@glsname@}{\@glsname@}{\@glsname@}% + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrlongshortscusername}, + sort={\the\glsshorttok}, + first={\protect\glsfirstlonguserfont{\the\glslongtok}},% + firstplural={\protect\glsfirstlonguserfont{\the\glslongpltok}},% + text={\protect\glsabbrvscuserfont{\the\glsshorttok}},% + plural={\protect\glsabbrvscuserfont{\the\glsshortpltok}},% + description={\protect\glsuserdescription{\the\glslongtok}% + {\the\glslabeltok}}}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glsexclapplyinnerfmtfield{\the\glslabeltok}{desc}% + \csdef{glsxtrpostlink\glscategorylabel}{% + \glsxtrifwasfirstuse + {% + \glsxtrpostusershortformat{\glslabel}{\glsfirstabbrvscuserfont}% + }% + {}% + }% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\Mglsname} -%\changes{1.48}{2021-11-22}{new} -%\begin{definition} -%\cs{Mglsname}\oarg{options}\marg{label}\oarg{insert} -%\end{definition} -% Use name for all elements with initial cap on first -% element. +% In case the user wants to mix and match font styles, these are +% redefined here. % \begin{macrocode} -\glsxtr@newmgls{Mglsname}% - {\@Glsname@}{\@glsname@}{\@Glsname@}{\@glsname@}% + \renewcommand*{\abbrvpluralsuffix}{\glsxtrscusersuffix}% + \renewcommand*{\glsabbrvfont}[1]{\glsabbrvscuserfont{##1}}% + \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvscuserfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlonguserfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslonguserfont{##1}}% + \renewcommand*\glsxtrrevert[1]{\glsxtrscuserrevert{##1}}% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\MGlsname} -%\changes{1.48}{2021-11-22}{new} -%\begin{definition} -%\cs{MGlsname}\oarg{options}\marg{label}\oarg{insert} -%\end{definition} -% Use name for all elements with initial cap on all -% elements. +%First use full form: % \begin{macrocode} -\glsxtr@newmgls{MGlsname}% - {\@Glsname@}{\@Glsname@}{\@Glsname@}{\@Glsname@}% + \renewcommand*{\glsxtrfullformat}[2]{% + \glsxtrlongformat{##1}{##2}{\glsfirstlonguserfont}% + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsxtrlongplformat{##1}{##2}{\glsfirstlonguserfont}% + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \Glsxtrlongformat{##1}{##2}{\glsfirstlonguserfont}% + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \Glsxtrlongplformat{##1}{##2}{\glsfirstlonguserfont}% + }% + \renewcommand*{\GLSxtrfullformat}[2]{% + \GLSxtrlongformat{##1}{##2}{\glsfirstlonguserfont}% + }% + \renewcommand*{\GLSxtrfullplformat}[2]{% + \GLSxtrlongplformat{##1}{##2}{\glsfirstlonguserfont}% + }% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\@glssymbolorgls} -%\changes{1.48}{2021-11-22}{new} +% In-line format: % \begin{macrocode} -\def\@glssymbolorgls#1#2[#3]{% - \ifglshassymbol{#2}{\@glssymbol@{#1}{#2}[#3]}{\@gls@{#1}{#2}[#3]}% + \renewcommand*{\glsxtrinlinefullformat}[2]{% + \glsxtruserlongshortformat{##1}{##2}% + {\glsfirstlonguserfont}{\glsfirstabbrvscuserfont}% + }% + \renewcommand*{\glsxtrinlinefullplformat}[2]{% + \glsxtruserlongshortplformat{##1}{##2}% + {\glsfirstlonguserfont}{\glsfirstabbrvscuserfont}% + }% + \renewcommand*{\Glsxtrinlinefullformat}[2]{% + \Glsxtruserlongshortformat{##1}{##2}% + {\glsfirstlonguserfont}{\glsfirstabbrvscuserfont}% + }% + \renewcommand*{\Glsxtrinlinefullplformat}[2]{% + \Glsxtruserlongshortplformat{##1}{##2}% + {\glsfirstlonguserfont}{\glsfirstabbrvscuserfont}% + }% + \renewcommand*{\GLSxtrinlinefullformat}[2]{% + \GLSxtruserlongshortformat{##1}{##2}% + {\glsfirstlonguserfont}{\glsfirstabbrvscuserfont}% + }% + \renewcommand*{\GLSxtrinlinefullplformat}[2]{% + \GLSxtruserlongshortplformat{##1}{##2}% + {\glsfirstlonguserfont}{\glsfirstabbrvscuserfont}% + }% } % \end{macrocode} -%\end{macro} +%\end{abbrvstyle} % -%\begin{macro}{\@glssymbolorGls} -%\changes{1.48}{2021-11-22}{new} +%\begin{macro}{\glsxtrlongshortuserdescname} +%\changes{1.25}{2017-11-24}{new} % \begin{macrocode} -\def\@glssymbolorGls#1#2[#3]{% - \ifglshassymbol{#2}{\@glssymbol@{#1}{#2}[#3]}{\@Gls@{#1}{#2}[#3]}% +\newcommand*{\glsxtrlongshortuserdescname}{% + \protect\glslonguserfont{\the\glslongtok}% + \protect\glsxtruserparen + {\protect\glsabbrvuserfont{\the\glsshorttok}}{\the\glslabeltok}% } % \end{macrocode} %\end{macro} % -%\begin{macro}{\mglssymbol} -%\changes{1.48}{2021-11-22}{new} -%\begin{definition} -%\cs{mglssymbol}\oarg{options}\marg{label}\oarg{insert} -%\end{definition} -% Use \cs{glssymbol} if the \gloskey{symbol} key is set otherwise -% use \cs{gls}. -% \begin{macrocode} -\glsxtr@newmgls{mglssymbol}% - {\@glssymbolorgls}{\@glssymbolorgls}{\@glssymbolorgls}{\@glssymbolorgls}% -% \end{macrocode} -%\end{macro} -% -%\begin{macro}{\Mglssymbol} -%\changes{1.48}{2021-11-22}{new} -%\begin{definition} -%\cs{Mglssymbol}\oarg{options}\marg{label}\oarg{insert} -%\end{definition} -% As above but initial the first element if it's not a symbol. +%\begin{abbrvstyle}{long-postshort-user-desc} +%\changes{1.12}{2017-02-03}{new} +%Like \abbrstyle{long-postshort-user} but the user supplies the +%description. % \begin{macrocode} -\glsxtr@newmgls{Mglssymbol}% - {\@glssymbolorGls}{\@glssymbolorgls}{\@glssymbolorGls}{\@glssymbolorgls}% +\newabbreviationstyle{long-postshort-user-desc}% +{% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\MGlssymbol} -%\changes{1.48}{2021-11-22}{new} -%\begin{definition} -%\cs{MGlssymbol}\oarg{options}\marg{label}\oarg{insert} -%\end{definition} -% As above but initial each element if it's not a symbol. +% Set accessibility attributes if enabled. % \begin{macrocode} -\glsxtr@newmgls{MGlssymbol}% - {\@glssymbolorGls}{\@glssymbolorGls}{\@glssymbolorGls}{\@glssymbolorGls}% + \glsxtrAccSuppAbbrSetTextShortAttrs\glscategorylabel % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\mglsfield} -%\changes{1.48}{2021-11-22}{new} +% Setup the default fields. % \begin{macrocode} -\newcommand{\mglsfield}{useri} + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrlongshortuserdescname}, + sort={\the\glslongtok}, + first={\protect\glsfirstlonguserfont{\the\glslongtok}},% + firstplural={\protect\glsfirstlonguserfont{\the\glslongpltok}},% % \end{macrocode} -%\end{macro} -%\begin{macro}{\@glsfieldorgls} -%\changes{1.48}{2021-11-22}{new} +%\changes{1.15}{2017-05-10}{fixed spelling of \cs{glsabbrvfont}} % \begin{macrocode} -\def\@glsfieldorgls#1#2[#3]{% - \glsxtrifhasfield{\mglsfield}{#2}% - {\@glsdisp[#1]{#2}{\glscurrentfieldvalue#3}}% - {\@gls@{#1}{#2}[#3]}% + text={\protect\glsabbrvuserfont{\the\glsshorttok}},% + plural={\protect\glsabbrvuserfont{\the\glsshortpltok}}% + }% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \csdef{glsxtrpostlink\glscategorylabel}{% + \glsxtrifwasfirstuse + {% + \glsxtrpostusershortformat{\glslabel}{\glsfirstabbrvuserfont}% + }% + {}% + }% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% + \GlsXtrUseAbbrStyleFmts{long-postshort-user}% } % \end{macrocode} -%\end{macro} +%\end{abbrvstyle} % -%\begin{macro}{\@Glsfieldorgls} +%\begin{macro}{\glsxtrlongshortscuserdescname} %\changes{1.48}{2021-11-22}{new} % \begin{macrocode} -\def\@Glsfieldorgls#1#2[#3]{% - \glsxtrifhasfield{\mglsfield}{#2}% - {\@glsdisp[#1]{#2}{\xmakefirstuc\glscurrentfieldvalue#3}}% - {\@Gls@{#1}{#2}[#3]}% +\newcommand*{\glsxtrlongshortscuserdescname}{% + \protect\glslonguserfont{\the\glslongtok}% + \protect\glsxtruserparen + {\protect\glsabbrvscuserfont{\the\glsshorttok}}{\the\glslabeltok}% } % \end{macrocode} %\end{macro} % -%\begin{macro}{\mglsusefield} +%\begin{abbrvstyle}{long-postshort-sc-user-desc} %\changes{1.48}{2021-11-22}{new} -%\begin{definition} -%\cs{mglsusefield}\oarg{options}\marg{label}\oarg{insert} -%\end{definition} -% Use the field given by \cs{\mglsfield}. +%Like \abbrstyle{long-postshort-sc-user} but the user supplies the +%description. % \begin{macrocode} -\glsxtr@newmgls{mglsusefield}% - {\@glsfieldorgls}{\@glsfieldorgls}{\@glsfieldorgls}{\@glsfieldorgls}% +\newabbreviationstyle{long-postshort-sc-user-desc}% +{% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\Mglsusefield} -%\changes{1.48}{2021-11-22}{new} -%\begin{definition} -%\cs{Mglsusefield}\oarg{options}\marg{label}\oarg{insert} -%\end{definition} -% As above but use initial cap for first element only. +% Set accessibility attributes if enabled. % \begin{macrocode} -\glsxtr@newmgls{Mglsusefield}% - {\@Glsfieldorgls}{\@glsfieldorgls}{\@Glsfieldorgls}{\@glsfieldorgls}% + \glsxtrAccSuppAbbrSetTextShortAttrs\glscategorylabel % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\MGlsusefield} -%\changes{1.48}{2021-11-22}{new} -%\begin{definition} -%\cs{MGlsusefield}\oarg{options}\marg{label}\oarg{insert} -%\end{definition} -% As above but use initial cap for all elements. +% Setup the default fields. % \begin{macrocode} -\glsxtr@newmgls{MGlsusefield}% - {\@Glsfieldorgls}{\@Glsfieldorgls}{\@Glsfieldorgls}{\@Glsfieldorgls}% + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrlongshortscuserdescname}, + sort={\the\glslongtok}, + first={\protect\glsfirstlonguserfont{\the\glslongtok}},% + firstplural={\protect\glsfirstlonguserfont{\the\glslongpltok}},% + text={\protect\glsabbrvscuserfont{\the\glsshorttok}},% + plural={\protect\glsabbrvscuserfont{\the\glsshortpltok}}% + }% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \csdef{glsxtrpostlink\glscategorylabel}{% + \glsxtrifwasfirstuse + {% + \glsxtrpostusershortformat{\glslabel}{\glsfirstabbrvscuserfont}% + }% + {}% + }% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% + \GlsXtrUseAbbrStyleFmts{long-postshort-sc-user}% +} % \end{macrocode} -%\end{macro} +%\end{abbrvstyle} % -% Use commands provided by \sty{glossaries-prefix} if it has been -% loaded. -%\begin{macro}{\mpglsWarning} -%\changes{1.48}{2021-11-22}{new} +% +%\begin{abbrvstyle}{short-postlong-user} +%\changes{1.12}{2017-02-03}{new} +%\changes{1.42}{2020-02-03}{added missing text key} +%Like \abbrstyle{short-long-user} but defers the parenthetical +%matter to after the link. % \begin{macrocode} -\newcommand*{\mpglsWarning}{% - \GlossariesExtraWarning{glossaries-prefix.sty is required for - \string\mpgls\space family of commands (either load after - glossaries-extra.sty or use the `prefix' package option)}% -} +\newabbreviationstyle{short-postlong-user}% +{% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\@pglsorgls} -%\changes{1.48}{2021-11-22}{new} +% Set accessibility attributes if enabled. % \begin{macrocode} -\def\@pglsorgls#1#2[#3]{% - \ifdef\@pgls@{\@pgls@{#1}{#2}[#3]}{\mpglsWarning\@gls@{#1}{#2}[#3]}% -} + \glsxtrAccSuppAbbrSetFirstLongAttrs\glscategorylabel % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\@pglsorglspl} -%\changes{1.48}{2021-11-22}{new} +% Setup the default fields. % \begin{macrocode} -\def\@pglsorglspl#1#2[#3]{% - \ifdef\@pglspl@{\@pglspl@{#1}{#2}[#3]}{\mpglsWarning\@glspl@{#1}{#2}[#3]}% -} + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrshortlongname}, + sort={\the\glsshorttok}, + first={\protect\glsfirstlonguserfont{\the\glslongtok}},% + firstplural={\protect\glsfirstlonguserfont{\the\glslongpltok}},% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\@Pglsorgls} -%\changes{1.48}{2021-11-22}{new} +%\changes{1.15}{2017-05-10}{fixed spelling of \cs{glsabbrvfont}} % \begin{macrocode} -\def\@Pglsorgls#1#2[#3]{% - \ifdef\@Pgls@{\@Pgls@{#1}{#2}[#3]}{\mpglsWarning\@Gls@{#1}{#2}[#3]}% -} + text={\protect\glsabbrvuserfont{\the\glsshorttok}},% + plural={\protect\glsabbrvuserfont{\the\glsshortpltok}},% + description={\protect\glsuserdescription{\the\glslongtok}% + {\the\glslabeltok}}}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glsexclapplyinnerfmtfield{\the\glslabeltok}{desc}% + \csdef{glsxtrpostlink\glscategorylabel}{% + \glsxtrifwasfirstuse + {% + \glsxtrpostuserlongformat{\glslabel}{\glsfirstlonguserfont}% + }% + {}% + }% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\@pglsorglspl} -%\changes{1.48}{2021-11-22}{new} +% In case the user wants to mix and match font styles, these are +% redefined here. % \begin{macrocode} -\def\@pglsorglspl#1#2[#3]{% - \ifdef\@pglspl@{\@pglspl@{#1}{#2}[#3]}{\mpglsWarning\@glspl@{#1}{#2}[#3]}% -} + \renewcommand*{\abbrvpluralsuffix}{\glsxtrusersuffix}% + \renewcommand*{\glsabbrvfont}[1]{\glsabbrvuserfont{##1}}% + \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvuserfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlonguserfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslonguserfont{##1}}% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\@Pglsorglspl} -%\changes{1.48}{2021-11-22}{new} +%First use full form: % \begin{macrocode} -\def\@Pglsorglspl#1#2[#3]{% - \ifdef\@Pglspl@{\@Pglspl@{#1}{#2}[#3]}{\mpglsWarning\@Glspl@{#1}{#2}[#3]}% -} + \renewcommand*{\glsxtrfullformat}[2]{% + \glsxtrshortformat{##1}{##2}{\glsfirstabbrvuserfont}% + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsxtrshortplformat{##1}{##2}{\glsfirstabbrvuserfont}% + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \Glsxtrshortformat{##1}{##2}{\glsfirstabbrvuserfont}% + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \Glsxtrshortplformat{##1}{##2}{\glsfirstabbrvuserfont}% + }% + \renewcommand*{\GLSxtrfullformat}[2]{% + \GLSxtrshortformat{##1}{##2}{\glsfirstabbrvuserfont}% + }% + \renewcommand*{\GLSxtrfullplformat}[2]{% + \GLSxtrshortplformat{##1}{##2}{\glsfirstabbrvuserfont}% + }% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\@PGLSorgls} -%\changes{1.48}{2021-11-22}{new} +% In-line format should be the same. % \begin{macrocode} -\def\@PGLSorgls#1#2[#3]{% - \ifdef\@PGLS@{\@PGLS@{#1}{#2}[#3]}{\mpglsWarning\@GLS@{#1}{#2}[#3]}% } % \end{macrocode} -%\end{macro} +%\end{abbrvstyle} % -%\begin{macro}{\@PGLSorglspl} -%\changes{1.48}{2021-11-22}{new} +%\begin{macro}{\glsxtrshortlonguserdescname} +%\changes{1.25}{2017-11-24}{new} % \begin{macrocode} -\def\@PGLSorglspl#1#2[#3]{% - \ifdef\@PGLSpl@{\@PGLSpl@{#1}{#2}[#3]}{\mpglsWarning\@GLSpl@{#1}{#2}[#3]}% +\newcommand*{\glsxtrshortlonguserdescname}{% + \protect\glsabbrvuserfont{\the\glsshorttok}% + \protect\glsxtruserparen + {\protect\glslonguserfont{\the\glslongpltok}}% + {\the\glslabeltok}% } % \end{macrocode} %\end{macro} % -%\begin{macro}{\mpgls} -%\changes{1.48}{2021-11-22}{new} -%\begin{definition} -%\cs{mpgls}\oarg{options}\marg{label}\oarg{insert} -%\end{definition} -% Use \cs{pgls} for the first element and \cs{gls} for the remainder. +%\begin{abbrvstyle}{short-postlong-user-desc} +%\changes{1.12}{2017-02-03}{new} +%Like \abbrstyle{short-postlong-user} but leaves the user to specify +%the description. % \begin{macrocode} -\glsxtr@newmgls{mpgls}{\@pglsorgls@}{\@gls@}{\@pglsorgls@}{\@gls@}% +\newabbreviationstyle{short-postlong-user-desc}% +{% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\mpglspl} -%\changes{1.48}{2021-11-22}{new} -%\begin{definition} -%\cs{mpglspl}\oarg{options}\marg{label}\oarg{insert} -%\end{definition} -% Use \cs{pglspl} for the first element and \cs{glspl} for the remainder. +% Set accessibility attributes if enabled. % \begin{macrocode} -\glsxtr@newmgls{mpglspl}{\@pglsorglspl@}{\@glspl@}{\@pglsorglspl@}{\@glspl@}% + \glsxtrAccSuppAbbrSetTextShortAttrs\glscategorylabel % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\mpglsmainpl} -%\changes{1.48}{2021-11-22}{new} -%\begin{definition} -%\cs{mpglsmainpl}\oarg{options}\marg{label}\oarg{insert} -%\end{definition} -%Only use plural for main element and only use prefixing command for -%first element. +% Setup the default fields. % \begin{macrocode} -\glsxtr@newmgls{mpglsmainpl}{\@pglsorgls@}{\@gls@}{\@pglsorglspl@}{\@glspl@}% + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrshortlonguserdescname}, + sort={\the\glsshorttok}, + first={\protect\glsfirstlonguserfont{\the\glslongtok}},% + firstplural={\protect\glsfirstlonguserfont{\the\glslongpltok}},% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\Mpgls} -%\changes{1.48}{2021-11-22}{new} -%\begin{definition} -%\cs{Mpgls}\oarg{options}\marg{label}\oarg{insert} -%\end{definition} -% Use \cs{Pgls} for the first element and \cs{gls} for the remainder. +%\changes{1.15}{2017-05-10}{fixed spelling of \cs{glsabbrvfont}} % \begin{macrocode} -\glsxtr@newmgls{Mpgls}{\@Pglsorgls@}{\@gls@}{\@Pglsorgls@}{\@gls@}% + text={\protect\glsabbrvuserfont{\the\glsshorttok}},% + plural={\protect\glsabbrvuserfont{\the\glsshortpltok}}% + }% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \csdef{glsxtrpostlink\glscategorylabel}{% + \glsxtrifwasfirstuse + {% + \glsxtrpostuserlongformat{\glslabel}{\glsfirstlonguserfont}% + }% + {}% + }% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% + \GlsXtrUseAbbrStyleFmts{short-postlong-user}% +} % \end{macrocode} -%\end{macro} +%\end{abbrvstyle} % -%\begin{macro}{\Mpglspl} -%\changes{1.48}{2021-11-22}{new} -%\begin{definition} -%\cs{Mpglspl}\oarg{options}\marg{label}\oarg{insert} -%\end{definition} -% Use \cs{Pglspl} for the first element and \cs{glspl} for the remainder. +%\begin{abbrvstyle}{long-short-user-desc} +%\changes{1.04}{2016-05-02}{new} % \begin{macrocode} -\glsxtr@newmgls{Mpglspl}{\@Pglsorglspl@}{\@glspl@}{\@Pglsorglspl@}{\@glspl@}% +\newabbreviationstyle{long-short-user-desc}% +{% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\Mpglsmainpl} -%\changes{1.48}{2021-11-22}{new} -%\begin{definition} -%\cs{Mpglsmainpl}\oarg{options}\marg{label}\oarg{insert} -%\end{definition} -%Only use plural for main element and only use first letter -%uppercase prefixing command for first element. +% Set accessibility attributes if enabled. % \begin{macrocode} -\glsxtr@newmgls{Mpglsmainpl}{\@Pglsorgls@}{\@gls@}{\@Pglsorglspl@}{\@glspl@}% + \glsxtrAccSuppAbbrSetTextShortAttrs\glscategorylabel % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\MPGls} -%\changes{1.48}{2021-11-22}{new} -%\begin{definition} -%\cs{MPGls}\oarg{options}\marg{label}\oarg{insert} -%\end{definition} -%Use \cs{Pgls} for the first element and \cs{Gls} for the remainder. +% Setup the default fields. % \begin{macrocode} -\glsxtr@newmgls{MPGls}{\@Pglsorgls@}{\@Gls@}{\@Pglsorgls@}{\@Gls@}% + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrlongshortuserdescname}, + sort={\glsxtrlongshortdescsort},% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\MPGlspl} -%\changes{1.48}{2021-11-22}{new} -%\begin{definition} -%\cs{MPGlspl}\oarg{options}\marg{label}\oarg{insert} -%\end{definition} -% Use \cs{Pglspl} for the first element and \cs{Glspl} for the remainder. +%\changes{1.17}{2017-08-09}{corrected first forms} % \begin{macrocode} -\glsxtr@newmgls{MPGlspl}{\@Pglsorglspl@}{\@Glspl@}{\@Pglsorglspl@}{\@Glspl@}% + first={\protect\glsfirstlonguserfont{\the\glslongtok}% + \protect\glsxtruserparen{\protect\glsfirstabbrvuserfont{\the\glsshorttok}}% + {\the\glslabeltok}},% + firstplural={\protect\glsfirstlonguserfont{\the\glslongpltok}% + \protect\glsxtruserparen + {\protect\glsfirstabbrvuserfont{\the\glsshortpltok}}{\the\glslabeltok}},% + text={\protect\glsabbrvfont{\the\glsshorttok}},% + plural={\protect\glsabbrvfont{\the\glsshortpltok}}% + }% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\MPGlsmainpl} -%\changes{1.48}{2021-11-22}{new} -%\begin{definition} -%\cs{MPGlsmainpl}\oarg{options}\marg{label}\oarg{insert} -%\end{definition} -%Only use plural for main element and first letter uppercase all -%elements. +% Unset the \catattr{regular} attribute if it has been set. % \begin{macrocode} -\glsxtr@newmgls{MPGlsmainpl}{\@Pglsorgls@}{\@Gls@}{\@Pglsorglspl@}{\@Glspl@}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glsxtrsetcomplexstyle{\the\glslabeltok}{2}% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% + \GlsXtrUseAbbrStyleFmts{long-short-user}% +} % \end{macrocode} -%\end{macro} +%\end{abbrvstyle} % -%\begin{macro}{\MPGLS} -%\changes{1.48}{2021-11-22}{new} -%\begin{definition} -%\cs{MPGLS}\oarg{options}\marg{label}\oarg{insert} -%\end{definition} -% Use \cs{PGLS} for the first element and \cs{GLS} for the remainder. +%\begin{abbrvstyle}{short-long-user} +%\changes{1.04}{2016-05-02}{new} +%\changes{1.42}{2020-02-03}{added missing text key} % \begin{macrocode} -\glsxtr@newmgls{MPGLS}{\@PGLSorgls@}{\@GLS@}{\@PGLSorgls@}{\@GLS@}% +\newabbreviationstyle{short-long-user}% +{% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\MPGLSpl} -%\changes{1.48}{2021-11-22}{new} -%\begin{definition} -%\cs{MPGLSpl}\oarg{options}\marg{label}\oarg{insert} -%\end{definition} -% Use \cs{PGLSpl} for the first element and \cs{GLSpl} for the remainder. +% Set accessibility attributes if enabled. % \begin{macrocode} -\glsxtr@newmgls{MPGLSpl}{\@PGLSorglspl@}{\@GLSpl@}{\@PGLSorglspl@}{\@GLSpl@}% + \glsxtrAccSuppAbbrSetFirstLongAttrs\glscategorylabel % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\MPGLSmainpl} -%\changes{1.48}{2021-11-22}{new} -%\begin{definition} -%\cs{MPGLSmainpl}\oarg{options}\marg{label}\oarg{insert} -%\end{definition} -%Only use plural for main element and uppercase all elements. +% Setup the default fields. % \begin{macrocode} -\glsxtr@newmgls{MPGLSmainpl}{\@PGLSorgls@}{\@GLS@}{\@PGLSorglspl@}{\@GLSpl@}% % \end{macrocode} -%\end{macro} -% -%Not currently implementing any other variations. -% -%\section{Multi-Lingual Support} -% Add the facility to load language modules, if they are installed, -% but none are provided with this package. -% -%\begin{macro}{\RequireGlossariesExtraLang} -%\changes{0.5.3}{2015-12-09}{new} +%\cs{glslonguserfont} is used in the description since \cs{glsdesc} +%doesn't set the style. (Now in \cs{glsuserdescription}.) % \begin{macrocode} -\newcommand*{\RequireGlossariesExtraLang}[1]{% - \@ifundefined{ver@glossariesxtr-#1.ldf}{\input{glossariesxtr-#1.ldf}}{}% -} + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrshortlongname}, + sort={\the\glsshorttok}, + description={\protect\glsuserdescription{\the\glslongtok}% + {\the\glslabeltok}},% + first={\protect\glsfirstabbrvuserfont{\the\glsshorttok}% + \protect\glsxtruserparen{\protect\glsfirstlonguserfont{\the\glslongtok}}% + {\the\glslabeltok}},% + firstplural={\protect\glsfirstabbrvuserfont{\the\glsshortpltok}% + \protect\glsxtruserparen{\protect\glsfirstlonguserfont{\the\glslongpltok}}% + {\the\glslabeltok}},% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\ProvidesGlossariesExtraLang} -%\changes{0.5.3}{2015-12-09}{new} +%\changes{1.15}{2017-05-10}{fixed spelling of \cs{glsabbrvfont}} % \begin{macrocode} -\newcommand*{\ProvidesGlossariesExtraLang}[1]{% - \ProvidesFile{glossariesxtr-#1.ldf}% -} + text={\protect\glsabbrvuserfont{\the\glsshorttok}},% + plural={\protect\glsabbrvuserfont{\the\glsshortpltok}}}% % \end{macrocode} -%\end{macro} -% -% Load any required language modules that are available. This -% doesn't generate any warning if none are found, since they're not -% essential. (The only command that really needs defining for the -% document is \ics{abbreviationsname}, which can simply be -% redefined. However, with \app{bib2gls} it might be useful to -% provide custom rules for a particular locale.) -% -%\begin{macro}{\glsxtr@loaddialect} -%The dialect label should be stored in \cs{this@dialect} -%before using this command. -%\changes{1.27}{2018-02-26}{new} +% Unset the \catattr{regular} attribute if it has been set. % \begin{macrocode} -\newcommand{\glsxtr@loaddialect}{% - \IfTrackedLanguageFileExists{\this@dialect}% - {glossariesxtr-}% prefix - {.ldf}% - {% - \RequireGlossariesExtraLang{\CurrentTrackedTag}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glsexclapplyinnerfmtfield{\the\glslabeltok}{desc}% + \glsxtrsetcomplexstyle{\the\glslabeltok}{2}% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% }% - {}% not found +}% +{% % \end{macrocode} -% If \sty{glossaries-extra-bib2gls} has been loaded, -% \cs{@glsxtrdialecthook} will check for the associated script, -% otherwise it will do nothing. +% In case the user wants to mix and match font styles, these are +% redefined here. % \begin{macrocode} - \@glsxtrdialecthook -} + \renewcommand*{\abbrvpluralsuffix}{\glsxtrusersuffix}% + \renewcommand*\glsabbrvfont[1]{\glsabbrvuserfont{##1}}% + \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvuserfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlonguserfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslonguserfont{##1}}% % \end{macrocode} -%\end{macro} +% The first use full form and the inline full form are the same for +% this style. % \begin{macrocode} -\@ifpackageloaded{tracklang} {% - \AnyTrackedLanguages - {% - \ForEachTrackedDialect{\this@dialect}{\glsxtr@loaddialect}% + \renewcommand*{\glsxtrfullformat}[2]{% + \glsxtrusershortlongformat{##1}{##2}% + {\glsfirstlonguserfont}{\glsfirstabbrvuserfont}% }% - {}% -} {} + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsxtrusershortlongplformat{##1}{##2}% + {\glsfirstlonguserfont}{\glsfirstabbrvuserfont}% + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \Glsxtrusershortlongformat{##1}{##2}% + {\glsfirstlonguserfont}{\glsfirstabbrvuserfont}% + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \Glsxtrusershortlongplformat{##1}{##2}% + {\glsfirstlonguserfont}{\glsfirstabbrvuserfont}% + }% + \renewcommand*{\GLSxtrfullformat}[2]{% + \GLSxtrusershortlongformat{##1}{##2}% + {\glsfirstlonguserfont}{\glsfirstabbrvuserfont}% + }% + \renewcommand*{\GLSxtrfullplformat}[2]{% + \GLSxtrusershortlongplformat{##1}{##2}% + {\glsfirstlonguserfont}{\glsfirstabbrvuserfont}% + }% +} % \end{macrocode} -% Load \sty{glossaries-extra-stylemods} if required. +%\end{abbrvstyle} +% +%\begin{abbrvstyle}{short-long-user-desc} +%\changes{1.04}{2016-05-02}{new} % \begin{macrocode} -\@glsxtr@redefstyles +\newabbreviationstyle{short-long-user-desc}% +{% % \end{macrocode} -% and set the style: +% Set accessibility attributes if enabled. % \begin{macrocode} -\@glsxtr@do@style + \glsxtrAccSuppAbbrSetTextShortAttrs\glscategorylabel % \end{macrocode} -%\iffalse +% Setup the default fields. % \begin{macrocode} -% + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrshortlonguserdescname}, + sort={\glsxtrshortlongdescsort},% % \end{macrocode} -%\fi -%\iffalse +%\changes{1.17}{2017-08-09}{corrected first forms} % \begin{macrocode} -%<*glossaries-extra-bib2gls.sty> + first={\protect\glsfirstabbrvuserfont{\the\glsshorttok}% + \protect\glsxtruserparen{\protect\glsfirstlonguserfont{\the\glslongtok}}% + {\the\glslabeltok}},% + firstplural={\protect\glsfirstabbrvuserfont{\the\glsshortpltok}% + \protect\glsxtruserparen{\protect\glsfirstlonguserfont{\the\glslongpltok}}% + {\the\glslabeltok}},% + text={\protect\glsabbrvfont{\the\glsshorttok}},% + plural={\protect\glsabbrvfont{\the\glsshortpltok}}% + }% % \end{macrocode} -%\fi -%\changes{1.27}{2018-02-26}{added glossaries-extra-bib2gls.sty} -%\section{glossaries-extra-bib2gls.sty} -%This package provides additional support for \app{bib2gls} and is -%automatically loaded by the record option. +% Unset the \catattr{regular} attribute if it has been set. % \begin{macrocode} -\NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{glossaries-extra-bib2gls}[2021/11/22 v1.48 (NLCT)] + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glsxtrsetcomplexstyle{\the\glslabeltok}{2}% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% + \GlsXtrUseAbbrStyleFmts{short-long-user}% +} % \end{macrocode} -%Provide convenient shortcut commands for predefined glossary types. -%\begin{macro}{\printunsrtacronyms} -%\changes{1.40}{2019-03-31}{new} +%\end{abbrvstyle} +% +%\subsection{Predefined Styles (Hyphen)} +%These styles are designed to work with the \catattr{markwords} +%attribute. They check if the inserted material (provided by the final +%optional argument of commands like \cs{gls}) starts with a hyphen. +%If it does, the insert is added to the parenthetical material. +%Note that commands like \cs{glsxtrlong} set \cs{glsinsert} to empty +%with the entire link-text stored in \cs{glscustomtext}. +% +%\begin{macro}{\glsxtrifhyphenstart} +%Checks if the argument starts with a hyphen. The argument may be +%\cs{glsinsert} so check for that and expand. +%\changes{1.17}{2017-08-09}{new} % \begin{macrocode} -\ifglsacronym - \providecommand*{\printunsrtacronyms}[1][]{% - \printunsrtglossary[type=\acronymtype,#1]}% -\fi +\newrobustcmd*{\glsxtrifhyphenstart}[3]{% + \ifx\glsinsert#1\relax + \expandafter\@glsxtrifhyphenstart#1\relax\relax + \@end@glsxtrifhyphenstart{#2}{#3}% + \else + \@glsxtrifhyphenstart#1\relax\relax\@end@glsxtrifhyphenstart{#2}{#3}% + \fi +} % \end{macrocode} %\end{macro} % -%\begin{macro}{\printunsrtindex} -%\changes{1.40}{2019-03-31}{new} +%\begin{macro}{\@glsxtrifhyphenstart} +%\changes{1.17}{2017-08-09}{new} % \begin{macrocode} -\ifglossaryexists{index} -{ - \providecommand*{\printunsrtindex}[1][]{% - \printunsrtglossary[type=index,#1]}% -}{} +\def\@glsxtrifhyphenstart#1#2\@end@glsxtrifhyphenstart#3#4{% + \ifx-#1\relax#3\else #4\fi +} % \end{macrocode} %\end{macro} % -%\begin{macro}{\printunsrtsymbols} -%\changes{1.40}{2019-03-31}{new} +%\begin{macro}{\glsxtrlonghyphenshort} +%\changes{1.17}{2017-08-09}{new} +%\begin{definition} +%\cs{glsxtrlonghyphenshort}\marg{label}\marg{long}\marg{short}\marg{insert} +%\end{definition} +%The \meta{long} and \meta{short} arguments may be the plural form. +%The \meta{long} argument may also be the first letter uppercase form. +%This unfortunately doesn't fit in with the new \cs{glsxtrshortformat} +%etc commands, but is retained for backward-compatibility. +%This means that the inserted part has to have a separate encapsulation for the +%inner format. The \meta{long} and \meta{short} arguments will need to include +%the inner format. % \begin{macrocode} -\ifglossaryexists{symbols} -{ - \providecommand*{\printunsrtsymbols}[1][]{% - \printunsrtglossary[type=symbols,#1]}% -}{} +\newcommand*{\glsxtrlonghyphenshort}[4]{% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\printunsrtnumbers} -%\changes{1.40}{2019-03-31}{new} +% Grouping is needed to localise the redefinitions. % \begin{macrocode} -\ifglossaryexists{numbers} -{ - \providecommand*{\printunsrtnumbers}[1][]{% - \printunsrtglossary[type=numbers,#1]}% -}{} + {% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\printunsrtabbreviations} -%\changes{1.40}{2019-03-31}{new} +% If \meta{insert} starts with a hyphen, redefine \cs{glsxtrwordsep} +% to a hyphen. The inserted material is also inserted into the +% parenthetical part. (The inserted material is grouped as a +% precautionary measure.) No change is made to \cs{glsxtrwordsep} if +% \meta{insert} doesn't start with a hyphen. % \begin{macrocode} -\ifglossaryexists{abbreviations} -{ - \providecommand*{\printunsrtabbreviations}[1][]{% - \printunsrtglossary[type=abbreviations,#1]}% -}{} + \glsxtrifhyphenstart{#4}{\let\glsxtrwordsep\glsxtrwordsephyphen}{}% + \glsfirstlonghyphenfont{#2\ifglsxtrinsertinside + {\glsxtrgenentrytextfmt{#4}}\fi}% + \ifglsxtrinsertinside\else{\glsxtrgenentrytextfmt{#4}}\fi + \glsxtrfullsep{#1}% + \glsxtrparen{\glsfirstabbrvhyphenfont{#3\ifglsxtrinsertinside + {\glsxtrgenentrytextfmt{#4}}\fi}% + \ifglsxtrinsertinside\else{\glsxtrgenentrytextfmt{#4}}\fi}% + }% +} % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsdisplaynumberlist} -%\changes{1.42}{2020-02-03}{added} -%Allow \cs{glsdisplaynumberlist} and make it robust. +%\begin{macro}{\GLSxtrlonghyphenshort} +%\changes{1.49}{??}{new} +%As above but convert the insert to uppercase. The long and short +%should already have the case-change applied. % \begin{macrocode} -\renewcommand*{\glsdisplaynumberlist}[1]{% - \glsdoifexists{#1}% - {% - {\let\bibglsdelimN\glsnumlistsep - \let\bibglslastDelimN\glsnumlistlastsep - \glsxtrusefield{#1}{location}% - }% - }% +\newcommand*{\GLSxtrlonghyphenshort}[4]{% + {% + \glsxtrifhyphenstart{#4}{\let\glsxtrwordsep\glsxtrwordsephyphen}{}% + \glsfirstlonghyphenfont{#2\ifglsxtrinsertinside + {\mfirstucMakeUppercase{\glsxtrgenentrytextfmt{#4}}}\fi}% + \ifglsxtrinsertinside\else + {\mfirstucMakeUppercase{\glsxtrgenentrytextfmt{#4}}}% + \fi + \glsxtrfullsep{#1}% + \glsxtrparen{\glsfirstabbrvhyphenfont{#3\ifglsxtrinsertinside + {\mfirstucMakeUppercase{\glsxtrgenentrytextfmt{#4}}}\fi}% + \ifglsxtrinsertinside\else + {\mfirstucMakeUppercase{\glsxtrgenentrytextfmt{#4}}}% + \fi}% + }% } -\robustify\glsdisplaynumberlist % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsentrynumberlist} -%\changes{1.42}{2020-02-03}{added} +%\begin{macro}{\glsxtrshorthyphennolong} +%\changes{1.49}{??}{new} +%\begin{definition} +%\cs{glsxtrshorthyphennolong}\marg{label}\marg{short}\marg{insert} +%\end{definition} +%The \meta{short} argument may be the plural form and may also be the first letter uppercase form. +% +%As \cs{glsxtrlonghyphenshort} but where only the short form should +%be shown. % \begin{macrocode} -\renewcommand*{\glsentrynumberlist}[1]{\glsxtrusefield{#1}{location}} +\newcommand*{\glsxtrshorthyphennolong}[3]{% % \end{macrocode} -%\end{macro} -% -%These are some convenient macros for use with custom rules. -%\begin{macro}{\glshex} -%\changes{1.21}{2017-11-03}{new} +% Grouping is needed to localise the redefinitions. % \begin{macrocode} -\newcommand*{\glshex}{\string\u} + {% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\glscapturedgroup} -%\changes{1.31}{2018-05-09}{new} +% If \meta{insert} starts with a hyphen, redefine \cs{glsxtrwordsep} +% to a hyphen. % \begin{macrocode} -\newcommand*{\glscapturedgroup}{\string\$} + \glsxtrifhyphenstart{#3}{\let\glsxtrwordsep\glsxtrwordsephyphen}{}% + \glsfirstabbrvhyphenfont{#2\ifglsxtrinsertinside + {\glsxtrgenentrytextfmt{#3}}\fi}% + \ifglsxtrinsertinside\else{\glsxtrgenentrytextfmt{#3}}\fi + }% +} % \end{macrocode} %\end{macro} % -%\begin{macro}{\GlsXtrIfHasNonZeroChildCount} -%\changes{1.31}{2018-05-09}{new} -%\changes{1.47}{2021-11-04}{added starred version} -%For use with \app{bib2gls}'s \texttt{save-child-count} resource option. +%\begin{macro}{\GLSxtrshorthyphennolong} +%\changes{1.49}{??}{new} +%As above but all-caps. % \begin{macrocode} -\newcommand*{\GlsXtrIfHasNonZeroChildCount}{% - \@ifstar\s@GlsXtrIfHasNonZeroChildCount\@GlsXtrIfHasNonZeroChildCount +\newcommand*{\GLSxtrshorthyphennolong}[3]{% + {% + \glsxtrifhyphenstart{#3}{\let\glsxtrwordsep\glsxtrwordsephyphen}{}% + \glsfirstabbrvhyphenfont{#2\ifglsxtrinsertinside + {\mfirstucMakeUppercase{\glsxtrgenentrytextfmt{#3}}}\fi}% + \ifglsxtrinsertinside\else + {\mfirstucMakeUppercase{\glsxtrgenentrytextfmt{#3}}}% + \fi + }% } % \end{macrocode} %\end{macro} % -%\begin{macro}{\@GlsXtrIfHasNonZeroChildCount} -%\changes{1.47}{2021-11-04}{new} +%\begin{macro}{\glsabbrvhyphenfont} +%\changes{1.17}{2017-08-09}{new} % \begin{macrocode} -\newcommand*{\@GlsXtrIfHasNonZeroChildCount}[3]{% - \@GlsXtrIfFieldNonZero{childcount}{#1}{#2}{#3}% -} +\newcommand*{\glsabbrvhyphenfont}{\glsabbrvdefaultfont}% % \end{macrocode} %\end{macro} -% -%\begin{macro}{\s@GlsXtrIfHasNonZeroChildCount} -%\changes{1.47}{2021-11-04}{new} +%\begin{macro}{\glsfirstabbrvhyphenfont} +%\changes{1.17}{2017-08-09}{new} % \begin{macrocode} -\newcommand*{\s@GlsXtrIfHasNonZeroChildCount}[3]{% - \s@GlsXtrIfFieldNonZero{childcount}{#1}{#2}{#3}% -} +\newcommand*{\glsfirstabbrvhyphenfont}{\glsabbrvhyphenfont}% % \end{macrocode} %\end{macro} -% -%\begin{macro}{\glsxtrprovidecommand} -%\changes{1.27}{2018-02-26}{new} -%For use in \texttt{@preamble}, this behaves like -%\cs{providecommand} in the document but like \cs{renewcommand} -%in \app{bib2gls}. +%\begin{macro}{\glslonghyphenfont} +%\changes{1.17}{2017-08-09}{new} % \begin{macrocode} -\newcommand*{\glsxtrprovidecommand}{\providecommand} +\newcommand*{\glslonghyphenfont}{\glslongdefaultfont}% % \end{macrocode} %\end{macro} -% -%\begin{macro}{\glsrenewcommand} -%\changes{1.37}{2018-11-30}{new} -%Like \cs{renewcommand} but only generates a warning rather than an -%error if the command isn't defined. +%\begin{macro}{\glsfirstlonghyphenfont} +%\changes{1.17}{2017-08-09}{new} % \begin{macrocode} -\newcommand*{\glsrenewcommand}{\@star@or@long\glsxtr@renewcommand} +\newcommand*{\glsfirstlonghyphenfont}{\glslonghyphenfont}% % \end{macrocode} %\end{macro} -% -%\begin{macro}{\glsxtr@renewcommand} -%\changes{1.37}{2018-11-30}{new} +% The default short form suffix: +%\begin{macro}{\glsxtrhyphensuffix} +%\changes{1.17}{2017-08-09}{new} % \begin{macrocode} -\newcommand*{\glsxtr@renewcommand}[1]{% - \begingroup \escapechar\m@ne\xdef\@gtempa{{\string#1}}\endgroup - \expandafter\@ifundefined\@gtempa - {% - \GlossariesExtraWarning{can't redefine \noexpand#1(not already defined)}% - }% - \relax - \relax - \let\@ifdefinable\@rc@ifdefinable - \new@command#1% -} +\newcommand*{\glsxtrhyphensuffix}{\glsxtrabbrvpluralsuffix} % \end{macrocode} %\end{macro} -% -%\begin{macro}{\glsxtr@wrglossarylocation} -%\changes{1.29}{2018-04-09}{new} -%For use with \pkgopt{indexcounter} and \app{bib2gls}. +%\begin{macro}{\glsxtrlonghyphenshortsort} +%\changes{1.49}{??}{new} % \begin{macrocode} -\newcommand*{\glsxtr@wrglossarylocation}[2]{#1} +\newcommand*{\glsxtrlonghyphenshortsort}{\expandonce\glsxtrorgshort} % \end{macrocode} %\end{macro} % -%\begin{macro}{\GlsXtrIndexCounterLink} -%\changes{1.29}{2018-04-09}{new} -%\begin{definition} -%\cs{GlsXtrIndexCounterLink}\marg{text}\marg{label} -%\end{definition} -%For use with \pkgopt{indexcounter} and \app{bib2gls}. +%\begin{abbrvstyle}{long-hyphen-short-hyphen} +%\changes{1.17}{2017-08-09}{new} +%\changes{1.42}{2020-02-03}{added missing text key} +%Designed for use with the \catattr{markwords} attribute. % \begin{macrocode} -\ifdef\hyperref +\newabbreviationstyle{long-hyphen-short-hyphen}% {% - \newcommand*{\GlsXtrIndexCounterLink}[2]{% - \glsxtrifhasfield{indexcounter}{#2}% - {\hyperref[wrglossary.\glscurrentfieldvalue]{#1}}% - {#1}% - } -} -{ - \newcommand*{\GlsXtrIndexCounterLink}[2]{#1} -} % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\GlsXtrDualField} -%\changes{1.30}{2018-04-25}{new} -%\begin{definition} -%\cs{GlsXtrDualField} -%\end{definition} -%The internal field used to store the dual label. The -%\texttt{dual-field} defaults to \texttt{dual} if no value is -%supplied so that's used as the default. +% Set accessibility attributes if enabled. % \begin{macrocode} -\newcommand*{\GlsXtrDualField}{dual} + \glsxtrAccSuppAbbrSetFirstLongAttrs\glscategorylabel % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\GlsXtrDualBackLink} -%\changes{1.30}{2018-04-25}{new} -%\begin{definition} -%\cs{GlsXtrDualBackLink}\marg{text}\marg{label} -%\end{definition} -%Adds a hyperlink to the dual entry. +% Setup the default fields. % \begin{macrocode} -\newcommand*{\GlsXtrDualBackLink}[2]{% - \glsxtrifhasfield{\GlsXtrDualField}{#2}% - {\glshyperlink[#1]{\glscurrentfieldvalue}}% - {#2}% -} + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrlongshortname}, + sort={\glsxtrlonghyphenshortsort}, + first={\protect\glsfirstlonghyphenfont{\the\glslongtok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \protect\glsxtrparen{\protect\glsfirstabbrvhyphenfont{\the\glsshorttok}}},% + firstplural={\protect\glsfirstlonghyphenfont{\the\glslongpltok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \protect\glsxtrparen{\protect\glsfirstabbrvhyphenfont{\the\glsshortpltok}}},% + text={\protect\glsabbrvhyphenfont{\the\glsshorttok}},% + plural={\protect\glsabbrvhyphenfont{\the\glsshortpltok}},% + description={\protect\glslonghyphenfont{\the\glslongtok}}}% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\GlsXtrBibTeXEntryAliases} -%\changes{1.29}{2018-04-09}{new} -%Convenient shortcut for use with \texttt{entry-type-aliases} to -%alias standard \BibTeX\ entry types to \texttt{@bibtexentry}. +% Unset the \catattr{regular} attribute if it has been set. % \begin{macrocode} -\newcommand*{\GlsXtrBibTeXEntryAliases}{% - article=bibtexentry, - book=bibtexentry, - booklet=bibtexentry, - conference=bibtexentry, - inbook=bibtexentry, - incollection=bibtexentry, - inproceedings=bibtexentry, - manual=bibtexentry, - mastersthesis=bibtexentry, - misc=bibtexentry, - phdthesis=bibtexentry, - proceedings=bibtexentry, - techreport=bibtexentry, - unpublished=bibtexentry -} + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glsexclapplyinnerfmtfield{\the\glslabeltok}{desc}% + \glsxtrsetcomplexstyle{\the\glslabeltok}{3}% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% + \renewcommand*{\abbrvpluralsuffix}{\glsxtrhyphensuffix}% + \renewcommand*{\glsabbrvfont}[1]{\glsabbrvhyphenfont{##1}}% + \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvhyphenfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlonghyphenfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslonghyphenfont{##1}}% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\GlsXtrProvideBibTeXFields} -%\changes{1.29}{2018-04-09}{new} -%Convenient shortcut to define the standard \BibTeX\ fields. +% The first use full form and the inline full form are the same for +% this style. % \begin{macrocode} -\newcommand*{\GlsXtrProvideBibTeXFields}{% - \glsaddstoragekey{address}{}{\glsxtrbibaddress}% - \glsaddstoragekey{author}{}{\glsxtrbibauthor}% - \glsaddstoragekey{booktitle}{}{\glsxtrbibbooktitle}% - \glsaddstoragekey{chapter}{}{\glsxtrbibchapter}% - \glsaddstoragekey{edition}{}{\glsxtrbibedition}% - \glsaddstoragekey{howpublished}{}{\glsxtrbibhowpublished}% - \glsaddstoragekey{institution}{}{\glsxtrbibinstitution}% - \glsaddstoragekey{journal}{}{\glsxtrbibjournal}% - \glsaddstoragekey{month}{}{\glsxtrbibmonth}% - \glsaddstoragekey{note}{}{\glsxtrbibnote}% - \glsaddstoragekey{number}{}{\glsxtrbibnumber}% - \glsaddstoragekey{organization}{}{\glsxtrbiborganization}% - \glsaddstoragekey{pages}{}{\glsxtrbibpages}% - \glsaddstoragekey{publisher}{}{\glsxtrbibpublisher}% - \glsaddstoragekey{school}{}{\glsxtrbibschool}% - \glsaddstoragekey{series}{}{\glsxtrbibseries}% - \glsaddstoragekey{title}{}{\glsxtrbibtitle}% - \glsaddstoragekey{bibtextype}{}{\glsxtrbibtype}% - \glsaddstoragekey{volume}{}{\glsxtrbibvolume}% -} -% \end{macrocode} -%\end{macro} -% -%Multiple supplementary references are only supported with -%\app{bib2gls}. -%\begin{macro}{\glsxtrmultisupplocation} -%\changes{1.36}{2018-08-18}{new} -%This is like \cs{glsxtrsupphypernumber} but the second argument is -%the external file name (which isn't obtained from the -%\catattr{externallocation} attribute). The third argument is the -%formatting (encap) control sequence \emph{name}. This is ignored by -%default, but is set by \app{bib2gls} to the original encap in case -%it's required. -% \begin{macrocode} -\newcommand*{\glsxtrmultisupplocation}[3]{% - {% - \def\glsxtrsupplocationurl{#2}% - \glshypernumber{#1}% - }% -} -% \end{macrocode} -%\end{macro} -% -%\begin{macro}{\glsxtrdisplaysupploc} -%\changes{1.36}{2018-08-18}{new} -%\begin{definition} -%\cs{glsxtrdisplaysupploc}\marg{prefix}\marg{counter}\marg{format}\marg{src}\marg{location} -%\end{definition} -%This is like \cs{glsnoidxdisplayloc} but is used for supplementary -%locations and so requires an extra argument. -% \begin{macrocode} -\newcommand*\glsxtrdisplaysupploc[5]{% - \setentrycounter[#1]{#2}% - \glsxtrmultisupplocation{#5}{#4}{#3}% -} -% \end{macrocode} -%\end{macro} -% -%\begin{macro}{\glsxtrdisplaylocnameref} -%\changes{1.37}{2018-11-30}{new} -%\cs{glsxtrdisplaylocnameref}\marg{prefix}\marg{counter}\marg{format}\marg{location}\marg{name}\marg{href}\marg{hcounter}\marg{external -%file} -%Used with the \sty[nameref]{record} package option. The \meta{href} -%argument was obtained from \cs{@currentHref} and the -%\meta{hcounter} argument was obtained from \cs{theHentrycounter}, -%which is more reliable. -%If \sty{hyperref} hasn't been loaded, this just behaves like \cs{glsnoidxdisplayloc}. -% \begin{macrocode} -\ifundef\hyperlink -{ - \newcommand*{\glsxtrdisplaylocnameref}[8]{% - \glsnoidxdisplayloc{#1}{#2}{#3}{#4}% - } -} -{ + \renewcommand*{\glsxtrfullformat}[2]{% + \glsxtrlonghyphenshort{##1}% + {% + \glsifattribute{##1}{markwords}{true}% + {% + \glsaccesslong{##1}% + }% + {% + \glsaccessfmtlong{}{\glsxtrgenentrytextfmt}{##1}% + }% + }% + {% + \glsifattribute{##1}{markshortwords}{true}% + {% + \glsaccessshort{##1}% + }% + {% + \glsaccessfmtshort{}{\glsxtrgenentrytextfmt}{##1}% + }% + }% + {##2}% + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsxtrlonghyphenshort{##1}% + {% + \glsifattribute{##1}{markwords}{true}% + {% + \glsaccesslongpl{##1}% + }% + {% + \glsaccessfmtlongpl{}{\glsxtrgenentrytextfmt}{##1}% + }% + }% + {% + \glsifattribute{##1}{markshortwords}{true}% + {% + \glsaccessshortpl{##1}% + }% + {% + \glsaccessfmtshortpl{}{\glsxtrgenentrytextfmt}{##1}% + }% + }% + {##2}% + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \glsxtrlonghyphenshort{##1}% + {% + \glsifattribute{##1}{markwords}{true}% + {% + \Glsaccesslong{##1}% + }% + {% + \Glsaccessfmtlong{}{\glsxtrgenentrytextfmt}{##1}% + }% + }% + {% + \glsifattribute{##1}{markshortwords}{true}% + {% + \glsaccessshort{##1}% + }% + {% + \glsaccessfmtshort{}{\glsxtrgenentrytextfmt}{##1}% + }% + }% + {##2}% + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \glsxtrlonghyphenshort{##1}% + {% + \glsifattribute{##1}{markwords}{true}% + {% + \Glsaccesslongpl{##1}% + }% + {% + \Glsaccessfmtlongpl{}{\glsxtrgenentrytextfmt}{##1}% + }% + }% + {% + \glsifattribute{##1}{markshortwords}{true}% + {% + \glsaccessshortpl{##1}% + }% + {% + \glsaccessfmtshortpl{}{\glsxtrgenentrytextfmt}{##1}% + }% + }% + {##2}% + }% + \renewcommand*{\GLSxtrfullformat}[2]{% + \GLSxtrlonghyphenshort{##1}% + {% + \glsifattribute{##1}{markwords}{true}% + {% + \GLSaccesslong{##1}% + }% + {% + \GLSaccessfmtlong{}{\glsxtrgenentrytextfmt}{##1}% + }% + }% + {% + \glsifattribute{##1}{markshortwords}{true}% + {% + \GLSaccessshort{##1}% + }% + {% + \GLSaccessfmtshort{}{\glsxtrgenentrytextfmt}{##1}% + }% + }% + {##2}% + }% + \renewcommand*{\GLSxtrfullplformat}[2]{% + \GLSxtrlonghyphenshort{##1}% + {% + \glsifattribute{##1}{markwords}{true}% + {% + \GLSaccesslongpl{##1}% + }% + {% + \GLSaccessfmtlongpl{}{\glsxtrgenentrytextfmt}{##1}% + }% + }% + {% + \glsifattribute{##1}{markshortwords}{true}% + {% + \GLSaccessshortpl{##1}% + }% + {% + \GLSaccessfmtshortpl{}{\glsxtrgenentrytextfmt}{##1}% + }% + }% + {##2}% + }% % \end{macrocode} -% Default action uses \meta{hcounter}. Equations and pages typically don't -% have a title, so check the counter name (otherwise the title may -% section or chapter title, which may be confusing). As from v1.42, -% this now checks if the control sequence -% \cs{glsxtr\meta{counter}locfmt} is defined. +%Subsequent form also needs checking for a hyphen in case the short +%form has spaces. % \begin{macrocode} - \newcommand*{\glsxtrdisplaylocnameref}[8]{% - \ifcsdef{glsxtr#2locfmt}% - {\glsxtrnamereflink{#3}{\csuse{glsxtr#2locfmt}{#4}{#5}}{#2.#7}{#8}}% + \renewcommand*{\glsxtrsubsequentfmt}[2]{% + \glsxtrshorthyphennolong{##1}% {% - \ifstrempty{#5}% + \glsifattribute{##1}{markshortwords}{true}% {% -% \end{macrocode} -%No title, so just use the location as the link text. -% \begin{macrocode} - \glsxtrnamereflink{#3}{#4}{#2.#7}{#8}% + \glsaccessshort{##1}% }% {% - \ifstrequal{#2}{page}% - {\glsxtrnamereflink{#3}{#4}{#2.#7}{#8}}% - {\glsxtrnamereflink{#3}{#5}{#2.#7}{#8}}% + \glsaccessfmtshort{}{\glsxtrgenentrytextfmt}{##1}% }% }% - } + {##2}% + }% + \renewcommand*{\glsxtrsubsequentplfmt}[2]{% + \glsxtrshorthyphennolong{##1}% + {% + \glsifattribute{##1}{markshortwords}{true}% + {% + \glsaccessshortpl{##1}% + }% + {% + \glsaccessfmtshortpl{}{\glsxtrgenentrytextfmt}{##1}% + }% + }% + {##2}% + }% + \renewcommand*{\Glsxtrsubsequentfmt}[2]{% + \glsxtrshorthyphennolong{##1}% + {% + \glsifattribute{##1}{markshortwords}{true}% + {% + \Glsaccessshort{##1}% + }% + {% + \Glsaccessfmtshort{}{\glsxtrgenentrytextfmt}{##1}% + }% + }% + {##2}% + }% + \renewcommand*{\Glsxtrsubsequentplfmt}[2]{% + \glsxtrshorthyphennolong{##1}% + {% + \glsifattribute{##1}{markshortwords}{true}% + {% + \Glsaccessshortpl{##1}% + }% + {% + \Glsaccessfmtshortpl{}{\glsxtrgenentrytextfmt}{##1}% + }% + }% + {##2}% + }% + \renewcommand*{\GLSxtrsubsequentfmt}[2]{% + \GLSxtrshorthyphennolong{##1}% + {% + \glsifattribute{##1}{markshortwords}{true}% + {% + \GLSaccessshort{##1}% + }% + {% + \GLSaccessfmtshort{}{\glsxtrgenentrytextfmt}{##1}% + }% + }% + {##2}% + }% + \renewcommand*{\GLSxtrsubsequentplfmt}[2]{% + \GLSxtrshorthyphennolong{##1}% + {% + \glsifattribute{##1}{markshortwords}{true}% + {% + \GLSaccessshortpl{##1}% + }% + {% + \GLSaccessfmtshortpl{}{\glsxtrgenentrytextfmt}{##1}% + }% + }% + {##2}% + }% } % \end{macrocode} -%\end{macro} +%\end{abbrvstyle} % -%\begin{macro}{\glsxtrequationlocfmt} -%\changes{1.42}{2020-02-03}{new} -%\begin{definition} -%\cs{glsxtrequationlocfmt}\marg{location}\marg{title} -%\end{definition} +%\begin{abbrvstyle}{long-hyphen-short-hyphen-desc} +%\changes{1.17}{2017-08-09}{new} +%Like \abbrstyle{long-hyphen-short-hyphen} but the description +%must be supplied by the user. % \begin{macrocode} -\newcommand*{\glsxtrequationlocfmt}[2]{(#1)} +\newabbreviationstyle{long-hyphen-short-hyphen-desc}% +{% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\glsxtrnamereflink} -%\changes{1.37}{2018-11-30}{new} -%\begin{definition} -%\cs{glsxtrfmtnamereflink}\marg{format}\marg{title}\marg{href}\marg{external -%file} -%\end{definition} +% Set accessibility attributes if enabled. % \begin{macrocode} -\newcommand*{\glsxtrnamereflink}[4]{% + \glsxtrAccSuppAbbrSetTextShortAttrs\glscategorylabel % \end{macrocode} -%Locally change \cs{glshypernumber} to \cs{@firstofone} to -%remove the normal location hyperlink. +% Setup the default fields. % \begin{macrocode} - \begingroup - \let\glshypernumber\@firstofone + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrlongshortdescname}, + sort={\glsxtrlongshortdescsort}, + first={\protect\glsfirstlonghyphenfont{\the\glslongtok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \protect\glsxtrparen{\protect\glsfirstabbrvhyphenfont{\the\glsshorttok}}},% + firstplural={\protect\glsfirstlonghyphenfont{\the\glslongpltok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \protect\glsxtrparen{\protect\glsfirstabbrvhyphenfont{\the\glsshortpltok}}},% + text={\protect\glsabbrvhyphenfont{\the\glsshorttok}},% + plural={\protect\glsabbrvhyphenfont{\the\glsshortpltok}}% + }% % \end{macrocode} -%If the \meta{external file} argument is empty, an internal link is used, -%otherwise an external one is needed. +% Unset the \catattr{regular} attribute if it has been set. % \begin{macrocode} - \ifstrempty{#4}% - {\glsxtrfmtinternalnameref{#3}{#1}{#2}}% - {\glsxtrfmtexternalnameref{#3}{#1}{#2}{#4}}% - \endgroup + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glsxtrsetcomplexstyle{\the\glslabeltok}{3}% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% + \GlsXtrUseAbbrStyleFmts{long-hyphen-short-hyphen}% } % \end{macrocode} -%\end{macro} +%\end{abbrvstyle} % -%\begin{macro}{\glsxtrnameloclink} -%\changes{1.37}{2018-11-30}{new} +%\begin{macro}{\glsxtrlonghyphennoshort} +%\changes{1.17}{2017-08-09}{new} %\begin{definition} -%\cs{glsxtrnamerefloclink}\marg{prefix}\marg{counter}\marg{format}\marg{location}\marg{text}\marg{external -%file} +%\cs{glsxtrlonghyphennoshort}\marg{label}\marg{long}\marg{insert} %\end{definition} -%Like \cs{@gls@numberlink}, this creates a hyperlink to the -%target obtained from the prefix, counter and location but uses -%\meta{text} as the hyperlink text. As with regular indexing, this -%will fail if the target name can't be formed by prefixing the -%location value. +%As with \cs{glsxtrlonghyphenshort} this doesn't fit in with the +%new \cs{glsxtrshortformat} so the inserted part has to have a separate encapsulation for the +%inner format. The \meta{long} argument will need to include +%the inner format. % \begin{macrocode} -\newcommand{\glsxtrnameloclink}[6]{% - \begingroup - \setentrycounter[#1]{#2}% - \def\glsxtr@locationhypertext{#5}% - \let\glshypernumber\@firstofone - \def\@glsnumberformat{#3}% - \def\glsxtrsupplocationurl{#6}% - \toks@={}% - \@glsxtr@bibgls@removespaces#4 \@nil - \endgroup -} +\newcommand*{\glsxtrlonghyphennoshort}[3]{% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\@glsxtr@bibgls@removespaces} -%\changes{1.37}{2018-11-30}{new} +% Grouping is needed to localise the redefinitions. % \begin{macrocode} -\def\@glsxtr@bibgls@removespaces#1 #2\@nil{% - \toks@=\expandafter{\the\toks@#1}% - \ifx\\#2\\% + {% % \end{macrocode} -%\changes{1.46}{2021-09-20}{changed \cs{x} to \cs{@glo@tmp}} +% If \meta{insert} starts with a hyphen, redefine \cs{glsxtrwordsep} +% to a hyphen. The inserted material is also inserted into the +% parenthetical part. (The inserted material is grouped as a +% precautionary measure.) No change is made to \cs{glsxtrwordsep} if +% \meta{insert} doesn't start with a hyphen. % \begin{macrocode} - \edef\@glo@tmp{\the\toks@}% - \ifx\@glo@tmp\empty - \else - \protected@edef\@glo@tmp{\glsentrycounter\@glo@counterprefix\the\toks@}% - \ifdefvoid\glsxtrsupplocationurl - {% - \expandafter\glsxtrfmtinternalnameref\expandafter{\@glo@tmp}% - {\@glsnumberformat}{\glsxtr@locationhypertext}% - }% - {% - \expandafter\glsxtrfmtexternalnameref\expandafter{\@glo@tmp}% - {\@glsnumberformat}{\glsxtr@locationhypertext}{\glsxtrsupplocationurl}% - }% - \fi - \else - \@gls@ReturnAfterFi{% - \@glsxtr@bibgls@removespaces#2\@nil - }% - \fi + \glsxtrifhyphenstart{#3}{\let\glsxtrwordsep\glsxtrwordsephyphen}{}% + \glsfirstlonghyphenfont{#2\ifglsxtrinsertinside + {\glsxtrgenentrytextfmt{#3}}\fi}% + \ifglsxtrinsertinside\else{\glsxtrgenentrytextfmt{#3}}\fi + }% } % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrfmtinternalnameref} -%\changes{1.37}{2018-11-30}{new} -%\begin{definition} -%\cs{glsxtrfmtinternalnameloc}\marg{target}\marg{format}\marg{title} -%\end{definition} -% +%\begin{macro}{\GLSxtrlonghyphennoshort} +%\changes{1.49}{??}{new} +%As above but convert insert to all-caps. % \begin{macrocode} -\newcommand*{\glsxtrfmtinternalnameref}[3]{% - \csuse{#2}{\glsdohyperlink{#1}{#3}}% +\newcommand*{\GLSxtrlonghyphennoshort}[3]{% + {% + \glsxtrifhyphenstart{#3}{\let\glsxtrwordsep\glsxtrwordsephyphen}{}% + \glsfirstlonghyphenfont{#2\ifglsxtrinsertinside + {\mfirstucMakeUppercase{\glsxtrgenentrytextfmt{#3}}}\fi}% + \ifglsxtrinsertinside\else + {\mfirstucMakeUppercase{\glsxtrgenentrytextfmt{#3}}}% + \fi + }% } % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrfmtexternalnameref} -%\changes{1.37}{2018-11-30}{new} -%\begin{definition} -%\cs{glsxtrfmtexternalnameloc}\marg{target}\marg{format}\marg{title}\marg{file} -%\end{definition} +%\begin{macro}{\glsxtrlonghyphennoshortdescsort} +%\changes{1.49}{??}{new} % \begin{macrocode} -\newcommand*{\glsxtrfmtexternalnameref}[4]{% - \csuse{#2}{\hyperref{#4}{}{#1}{#3}}% -} +\newcommand*{\glsxtrlonghyphennoshortdescsort}{\expandonce\glsxtrorglong} % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrSetWidest} -%\changes{1.37}{2018-11-30}{new} -%\begin{definition} -%\cs{glsxtrSetWidest}\marg{type}\marg{level}\marg{text} -%\end{definition} -%As from \gls{bib2gls} v1.8, this is used by the \texttt{set-widest} -%resource option for the \glostyle{alttree} and the styles -%provided by the \sty{glossary-longextra} package. +%\begin{abbrvstyle}{long-hyphen-noshort-desc-noreg} +%\changes{1.17}{2017-08-09}{new} +%\changes{1.42}{2020-02-03}{added missing text key} +%This version doesn't show the short form (except +%explicitly with \cs{glsxtrshort}). Since \cs{glsxtrshort} doesn't +%support the hyphen switch, the short form just uses the default +%short-form font command. This style won't work with the +%\catattr{regular} as the regular form isn't flexible enough. +%No accessibility attributes need to be set. % \begin{macrocode} -\newcommand*{\glsxtrSetWidest}[3]{% +\newabbreviationstyle{long-hyphen-noshort-desc-noreg}% +{% + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrlongnoshortdescname}, + sort={\glsxtrlonghyphennoshortdescsort}, + first={\protect\glsfirstlonghyphenfont{\the\glslongtok}},% + firstplural={\protect\glsfirstlonghyphenfont{\the\glslongpltok}},% + text={\protect\glslonghyphenfont{\the\glslongtok}},% + plural={\protect\glslonghyphenfont{\the\glslongpltok}}% + }% % \end{macrocode} -%Check which style options have been provided. (The style packages -%may not have been loaded.) +% Unset the \catattr{regular} attribute if it has been set. % \begin{macrocode} - \ifdef\glsupdatewidest - {% - \ifdef\glslongextraUpdateWidest + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glshasattribute{\the\glslabeltok}{regular}% {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% % \end{macrocode} -%Relevant style packages all loaded. -%If the \meta{type} has been given, append to glossary preamble. +% In case the user wants to mix and match font styles, these are +% redefined here. % \begin{macrocode} - \ifstrempty{#1} + \renewcommand*{\abbrvpluralsuffix}{\glsxtrabbrvpluralsuffix}% + \renewcommand*\glsabbrvfont[1]{\glsabbrvdefaultfont{##1}}% + \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvdefaultfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlonghyphenfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslonghyphenfont{##1}}% +% \end{macrocode} +% The inline full form displays the long format followed by the +% short form in parentheses (as long-hyphen-short-hyphen). +% \begin{macrocode} + \renewcommand*{\glsxtrinlinefullformat}[2]{% + \glsxtrlonghyphenshort{##1}% + {% + \glsifattribute{##1}{markwords}{true}% + {% + \glsaccesslong{##1}% + }% + {% + \glsaccessfmtlong{}{\glsxtrgenentrytextfmt}{##1}% + }% + }% + {% + \glsifattribute{##1}{markshortwords}{true}% + {% + \glsaccessshort{##1}% + }% + {% + \glsaccessfmtshort{}{\glsxtrgenentrytextfmt}{##1}% + }% + }% + {##2}% + }% + \renewcommand*{\glsxtrinlinefullplformat}[2]{% + \glsxtrlonghyphenshort{##1}% + {% + \glsifattribute{##1}{markwords}{true}% + {% + \glsaccesslongpl{##1}% + }% + {% + \glsaccessfmtlongpl{}{\glsxtrgenentrytextfmt}{##1}% + }% + }% + {% + \glsifattribute{##1}{markshortwords}{true}% + {% + \glsaccessshortpl{##1}% + }% + {% + \glsaccessfmtshortpl{}{\glsxtrgenentrytextfmt}{##1}% + }% + }% + {##2}% + }% + \renewcommand*{\Glsxtrinlinefullformat}[2]{% + \glsxtrlonghyphenshort{##1}% + {% + \glsifattribute{##1}{markwords}{true}% + {% + \Glsaccesslong{##1}% + }% + {% + \Glsaccessfmtlong{}{\glsxtrgenentrytextfmt}{##1}% + }% + }% + {% + \glsifattribute{##1}{markshortwords}{true}% + {% + \glsaccessshort{##1}% + }% + {% + \glsaccessfmtshort{}{\glsxtrgenentrytextfmt}{##1}% + }% + }% + {##2}% + }% + \renewcommand*{\Glsxtrinlinefullplformat}[2]{% + \glsxtrlonghyphenshort{##1}% + {% + \glsifattribute{##1}{markwords}{true}% + {% + \Glsaccesslongpl{##1}% + }% + {% + \Glsaccessfmtlongpl{}{\glsxtrgenentrytextfmt}{##1}% + }% + }% + {% + \glsifattribute{##1}{markshortwords}{true}% + {% + \glsaccessshortpl{##1}% + }% + {% + \glsaccessfmtshortpl{}{\glsxtrgenentrytextfmt}{##1}% + }% + }% + {##2}% + }% + \renewcommand*{\GLSxtrinlinefullformat}[2]{% + \GLSxtrlonghyphenshort{##1}% + {% + \glsifattribute{##1}{markwords}{true}% + {% + \GLSaccesslong{##1}% + }% + {% + \GLSaccessfmtlong{}{\glsxtrgenentrytextfmt}{##1}% + }% + }% + {% + \glsifattribute{##1}{markshortwords}{true}% + {% + \GLSaccessshort{##1}% + }% + {% + \GLSaccessfmtshort{}{\glsxtrgenentrytextfmt}{##1}% + }% + }% + {##2}% + }% + \renewcommand*{\GLSxtrinlinefullplformat}[2]{% + \GLSxtrlonghyphenshort{##1}% + {% + \glsifattribute{##1}{markwords}{true}% + {% + \GLSaccesslongpl{##1}% + }% + {% + \GLSaccessfmtlongpl{}{\glsxtrgenentrytextfmt}{##1}% + }% + }% + {% + \glsifattribute{##1}{markshortwords}{true}% + {% + \GLSaccessshortpl{##1}% + }% + {% + \GLSaccessfmtshortpl{}{\glsxtrgenentrytextfmt}{##1}% + }% + }% + {##2}% + }% +% \end{macrocode} +% The first use full form only displays the long form. +% \begin{macrocode} + \renewcommand*{\glsxtrfullformat}[2]{% + \glsxtrlonghyphennoshort{##1}% + {% + \glsifattribute{##1}{markwords}{true}% {% - \glsupdatewidest[#2]{#3}% - \ifnum#2=0\relax - \glslongextraUpdateWidest{#3}% - \else - \glslongextraUpdateWidestChild{#2}{#3}% - \fi + \glsaccesslong{##1}% }% {% - \apptoglossarypreamble[#1]{\glsupdatewidest[#2]{#3}}% - \ifnum#2=0\relax - \apptoglossarypreamble[#1]{\glslongextraUpdateWidest{#3}}% - \else - \apptoglossarypreamble[#1]{\glslongextraUpdateWidestChild{#2}{#3}}% - \fi + \glsaccessfmtlong{}{\glsxtrgenentrytextfmt}{##1}% }% }% + {##2}% + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsxtrlonghyphennoshort{##1}% {% -% \end{macrocode} -%Only \glostyle{alttree}. -% \begin{macrocode} - \ifstrempty{#1} + \glsifattribute{##1}{markwords}{true}% {% - \glsupdatewidest[#2]{#3}% + \glsaccesslongpl{##1}% }% {% - \apptoglossarypreamble[#1]{\glsupdatewidest[#2]{#3}}% + \glsaccessfmtlongpl{}{\glsxtrgenentrytextfmt}{##1}% }% }% + {##2}% }% - {% -% \end{macrocode} -%\cs{glsupdatewidest} hasn't been defined. This could just mean -%that the \sty{glossaries-extra-stylemods} package hasn't been -%loaded. -% \begin{macrocode} - \ifdef\glssetwidest + \renewcommand*{\Glsxtrfullformat}[2]{% + \glsxtrlonghyphennoshort{##1}% {% - \ifdef\glslongextraUpdateWidest + \glsifattribute{##1}{markwords}{true}% {% -% \end{macrocode} -%Relevant \sty{glossary-tree} and \sty{glossary-longextra} have been loaded. -%If the \meta{type} has been given, append to glossary preamble. -% \begin{macrocode} - \ifstrempty{#1} - {% - \glssetwidest[#2]{#3}% - \ifnum#2=0\relax - \glslongextraUpdateWidest{#3}% - \else - \glslongextraUpdateWidestChild{#2}{#3}% - \fi - }% - {% - \apptoglossarypreamble[#1]{\glssetwidest[#2]{#3}}% - \ifnum#2=0\relax - \apptoglossarypreamble[#1]{\glslongextraUpdateWidest{#3}}% - \else - \apptoglossarypreamble[#1]{\glslongextraUpdateWidestChild{#2}{#3}}% - \fi - }% + \Glsaccesslong{##1}% }% {% -% \end{macrocode} -%Only \glostyle{alttree}. -% \begin{macrocode} - \ifstrempty{#1} - {% - \glssetwidest[#2]{#3}% - }% - {% - \apptoglossarypreamble[#1]{\glssetwidest[#2]{#3}}% - }% + \Glsaccessfmtlong{}{\glsxtrgenentrytextfmt}{##1}% }% }% + {##2}% + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \glsxtrlonghyphennoshort{##1}% {% - \ifdef\glslongextraUpdateWidest + \glsifattribute{##1}{markwords}{true}% {% -% \end{macrocode} -%\sty{glossary-longextra} has been loaded. -% \begin{macrocode} - \ifstrempty{#1} - {% - \ifnum#2=0\relax - \glslongextraUpdateWidest{#3}% - \else - \glslongextraUpdateWidestChild{#2}{#3}% - \fi - }% - {% - \ifnum#2=0\relax - \apptoglossarypreamble[#1]{\glslongextraUpdateWidest{#3}}% - \else - \apptoglossarypreamble[#1]{\glslongextraUpdateWidestChild{#2}{#3}}% - \fi - }% + \Glsaccesslongpl{##1}% + }% + {% + \Glsaccessfmtlongpl{}{\glsxtrgenentrytextfmt}{##1}% }% + }% + {##2}% + }% + \renewcommand*{\GLSxtrfullformat}[2]{% + \GLSxtrlonghyphennoshort{##1}% + {% + \glsifattribute{##1}{markwords}{true}% + {% + \GLSaccesslong{##1}% + }% + {% + \GLSaccessfmtlong{}{\glsxtrgenentrytextfmt}{##1}% + }% + }% + {##2}% + }% + \renewcommand*{\GLSxtrfullplformat}[2]{% + \GLSxtrlonghyphennoshort{##1}% + {% + \glsifattribute{##1}{markwords}{true}% + {% + \GLSaccesslongpl{##1}% + }% + {% + \GLSaccessfmtlongpl{}{\glsxtrgenentrytextfmt}{##1}% + }% + }% + {##2}% + }% % \end{macrocode} -%Neither \sty{glossary-tree} nor \sty{glossary-longextra} have been -%loaded. Do nothing. +% The format for subsequent use (not used when the regular attribute +% is set). % \begin{macrocode} - {}% + \renewcommand*{\glsxtrsubsequentfmt}[2]{% + \glsxtrlonghyphennoshort{##1}% + {% + \glsifattribute{##1}{markwords}{true}% + {% + \glsaccesslong{##1}% + }% + {% + \glsaccessfmtlong{}{\glsxtrgenentrytextfmt}{##1}% + }% + }% + {##2}% + }% + \renewcommand*{\glsxtrsubsequentplfmt}[2]{% + \glsxtrlonghyphennoshort{##1}% + {% + \glsifattribute{##1}{markwords}{true}% + {% + \glsaccesslongpl{##1}% + }% + {% + \glsaccessfmtlongpl{}{\glsxtrgenentrytextfmt}{##1}% + }% + }% + {##2}% + }% + \renewcommand*{\Glsxtrsubsequentfmt}[2]{% + \glsxtrlonghyphennoshort{##1}% + {% + \glsifattribute{##1}{markwords}{true}% + {% + \Glsaccesslong{##1}% + }% + {% + \Glsaccessfmtlong{}{\glsxtrgenentrytextfmt}{##1}% + }% + }% + {##2}% + }% + \renewcommand*{\Glsxtrsubsequentplfmt}[2]{% + \glsxtrlonghyphennoshort{##1}% + {% + \glsifattribute{##1}{markwords}{true}% + {% + \Glsaccesslongpl{##1}% + }% + {% + \Glsaccessfmtlongpl{}{\glsxtrgenentrytextfmt}{##1}% + }% + }% + {##2}% + }% + \renewcommand*{\GLSxtrsubsequentfmt}[2]{% + \GLSxtrlonghyphennoshort{##1}% + {% + \glsifattribute{##1}{markwords}{true}% + {% + \GLSaccesslong{##1}% + }% + {% + \GLSaccessfmtlong{}{\glsxtrgenentrytextfmt}{##1}% + }% + }% + {##2}% + }% + \renewcommand*{\GLSxtrsubsequentplfmt}[2]{% + \GLSxtrlonghyphennoshort{##1}% + {% + \glsifattribute{##1}{markwords}{true}% + {% + \GLSaccesslongpl{##1}% + }% + {% + \GLSaccessfmtlongpl{}{\glsxtrgenentrytextfmt}{##1}% + }% }% + {##2}% }% } % \end{macrocode} -%\end{macro} +%\end{abbrvstyle} % -%\begin{macro}{\glsxtrSetWidestFallback} -%\changes{1.37}{2018-11-30}{new} -%\begin{definition} -%\cs{glsxtrSetWidestFallback}\marg{max depth}\marg{list} -%\end{definition} -%Used when \gls{bib2gls} can't determine the widest name. -%The \meta{list} argument is a comma-separated list of glossary -%labels. The \meta{max depth} refers to the maximum hierarchical -%depth. This will either be 0 (only top-level entries) or 2 -%(up to two child-levels). +%\begin{macro}{\glsxtrlonghyphennoshortsort} +%\changes{1.49}{??}{new} % \begin{macrocode} -\newcommand*{\glsxtrSetWidestFallback}[2]{% - \ifnum#1=0\relax - \ifdef\glsFindWidestTopLevelName - {% - \glsFindWidestTopLevelName[#2]% - }% - {% - \GlossariesExtraWarning{You need stylemods={tree} to - provide a fallback for set-widest}% - }% - \else - \ifdef\glsFindWidestLevelTwo - {% - \glsFindWidestLevelTwo[#2]% - \ifdef\glslongextraUpdateWidestChild - {% - \glslongextraUpdateWidestChild{#1}{\csuse{@glswidestnamei}}% - \glslongextraUpdateWidestChild{#1}{\csuse{@glswidestnameii}}% - }% - {}% - }% - {% - \GlossariesExtraWarning{You need stylemods={tree} to - provide a fallback for set-widest}% - }% - \fi -} +\newcommand*{\glsxtrlonghyphennoshortsort}{\expandonce\glsxtrorgshort} % \end{macrocode} %\end{macro} % -%\begin{macro}{\@glsxtr@labelprefixes} -%\changes{1.37}{2018-11-30}{new} -%List of label prefixes. +%\begin{abbrvstyle}{long-hyphen-noshort-noreg} +%\changes{1.17}{2017-08-09}{new} +% It doesn't really make a great deal of sense to have a long-only +% style that doesn't have a description (unless no glossary is +% required), but the best course of +% action here is to use the short form as the name and the long +% form as the description. % \begin{macrocode} -\newcommand*{\@glsxtr@labelprefixes}{} +\newabbreviationstyle{long-hyphen-noshort-noreg}% +{% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\glsxtrclearlabelprefixes} -%\changes{1.37}{2018-11-30}{new} -%List of label prefixes. +% Set accessibility attributes if enabled. % \begin{macrocode} -\newcommand*{\glsxtrclearlabelprefixes}{% - \renewcommand*{\@glsxtr@labelprefixes}{}% -} + \glsxtrAccSuppAbbrSetNameShortAttrs\glscategorylabel % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\glsxtraddlabelprefix} -%\changes{1.37}{2018-11-30}{new} -%Add prefix to the list. -%These should be added in the order of precedence with the last one -%as a fallback. This doesn't check against -%duplicates as it may be useful to replicate a prefix at the end as -%the fallback. +% Setup the default fields. % \begin{macrocode} -\newcommand*{\glsxtraddlabelprefix}[1]{% - \ifstrempty{#1}% - {\glsxtraddlabelprefix{\empty}}% - {% - \ifdefempty\@glsxtr@labelprefixes - {\def\@glsxtr@labelprefixes{#1}}% - {\appto\@glsxtr@labelprefixes{,#1}}% + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrlongnoshortname}, + sort={\glsxtrlonghyphennoshortsort}, + first={\protect\glsfirstlonghyphenfont{\the\glslongtok}},% + firstplural={\protect\glsfirstlonghyphenfont{\the\glslongpltok}},% + text={\protect\glslonghyphenfont{\the\glslongtok}},% + plural={\protect\glslonghyphenfont{\the\glslongpltok}},% + description={\the\glslongtok}% }% -} % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\glsxtrprependlabelprefix} -%\changes{1.37}{2018-11-30}{new} -%Inserts at the start of the list. +% Unset the \catattr{regular} attribute if it has been set. % \begin{macrocode} -\newcommand*{\glsxtrprependlabelprefix}[1]{% - \ifstrempty{#1}% - {\glsxtrprependlabelprefix{\empty}}% - {% - \ifdefempty\@glsxtr@labelprefixes - {\def\@glsxtr@labelprefixes{#1}}% - {\preto\@glsxtr@labelprefixes{#1,}}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% }% +}% +{% +% \end{macrocode} +%\changes{1.40}{2019-03-31}{corrected formatting commands} +% \begin{macrocode} + \GlsXtrUseAbbrStyleFmts{long-hyphen-noshort-desc-noreg}% } % \end{macrocode} -%\end{macro} +%\end{abbrvstyle} % -%\begin{macro}{\glsxtrifinlabelprefixlist} -%\changes{1.37}{2018-11-30}{new} +%\begin{macro}{\glsxtrlonghyphen} +%\changes{1.17}{2017-08-09}{new} %\begin{definition} -%\cs{glsxtrifinlabelprefixlist}\marg{prefix}\marg{true}\marg{false} +%\cs{glsxtrlonghyphen}\marg{long}\marg{label}\marg{insert} %\end{definition} -%Test if the given prefix is in the list. +%Used by \abbrstyle{long-hyphen-postshort-hyphen}. The \meta{insert} +%is check to determine if it starts with a hyphen but isn't used +%here as it's moved to the post-link hook. +% +%The \meta{long} argument will need to include +%the inner format. % \begin{macrocode} -\newcommand*{\glsxtrifinlabelprefixlist}[3]{% - \ifstrempty{#1}% - {\glsxtrifinlabelprefixlist{\empty}{#2}{#3}}% - {% - \DTLifinlist{#1}{\@glsxtr@labelprefixes}{#2}{#3}% - }% -} +\newcommand*{\glsxtrlonghyphen}[3]{% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\@glsxtr@prefixlabellist} -%\changes{1.37}{2018-11-30}{new} -%This is provided for the benefit of \gls{bib2gls}. It's possible -%that the user may add more prefixes after the start of the -%document, but that can lead to inconsistencies. The final element -%of the list (the fallback) is the only prefix of interest for \gls{bib2gls}. +% Grouping is needed to localise the redefinitions. % \begin{macrocode} -\AtBeginDocument{% - \protected@write\@auxout{}{\string\providecommand{\string\@glsxtr@prefixlabellist}[1]{}}% - \protected@write\@auxout{}{\string\@glsxtr@prefixlabellist{\@glsxtr@labelprefixes}}% + {% + \glsxtrifhyphenstart{#3}{\let\glsxtrwordsep\glsxtrwordsephyphen}{}% + \glsfirstlonghyphenfont{#1}% + }% } % \end{macrocode} %\end{macro} % -%\begin{macro}{\@glsxtr@get@prefixedlabel} -%\changes{1.37}{2018-11-30}{new} -%Iterate through all the prefixes and find the first -%prefix and label combination that exists. If none found, this could -%mean that it's the first \LaTeX\ run, so the last prefix in the -%list needs to be the fallback one. Grouping is used in case -%of a nested for loop. -% \begin{macrocode} -\newcommand*{\@glsxtr@get@prefixedlabel}[1]{% - \begingroup -% \end{macrocode} -%Initialise to the unprefixed label in the event that the list is -%empty. -%\changes{1.46}{2021-09-20}{changed \cs{edef} to \cs{protected@edef}} +%\begin{macro}{\glsxtrposthyphenshort} +%\changes{1.17}{2017-08-09}{new} +%\begin{definition} +%\cs{glsxtrposthyphenshort}\marg{label}\marg{insert} +%\end{definition} +%Used in the post-link hook for the +%\abbrstyle{long-hyphen-postshort-hyphen} style. Much like +%\cs{glsxtrlonghyphenshort} but omits the \meta{long} part. This +%always uses the singular short form. % \begin{macrocode} - \protected@edef\@gls@thislabel{#1}% - \@for\@glsxtr@prefix:=\@glsxtr@labelprefixes\do +\newcommand*{\glsxtrposthyphenshort}[2]{% {% - \protected@edef\@gls@thislabel{\@glsxtr@prefix#1}% - \ifglsentryexists{\@gls@thislabel}{\@endfortrue}{}% + \glsxtrifhyphenstart{#2}{\let\glsxtrwordsep\glsxtrwordsephyphen}{}% + \ifglsxtrinsertinside + {\glsfirstlonghyphenfont{\glsxtrgenentrytextfmt{#2}}}% + \else + {\glsxtrgenentrytextfmt{#2}}% + \fi + \glsxtrfullsep{#1}% + \glsxtrparen + {% + \glsxtrshortformat{#1}{#2}{\glsfirstabbrvhyphenfont}% + }% }% -% \end{macrocode} -%\changes{1.46}{2021-09-20}{changed \cs{x} to \cs{@glo@tmp}} -% \begin{macrocode} - \edef\@glo@tmp{\endgroup\noexpand\def\noexpand\@gls@thislabel{\@gls@thislabel}}\@glo@tmp } % \end{macrocode} %\end{macro} % -%\begin{macro}{\dgls} -%\changes{1.37}{2018-11-30}{new} -%Like \cs{gls} but tries the prefixes. (Can't use \cs{pgls} as -%that's provided by \sty{glossaries-prefix}.) Since this command -%is designed for \app{bib2gls}'s dual entry system, the \qt{d} -%stands for \qt{dual}. +%\begin{macro}{\GLSxtrposthyphenshort} +%\changes{1.49}{??}{new} +%As above but all caps. % \begin{macrocode} -\newrobustcmd*{\dgls}{\@gls@hyp@opt\@dgls} +\newcommand*{\GLSxtrposthyphenshort}[2]{% + {% + \glsxtrifhyphenstart{#2}{\let\glsxtrwordsep\glsxtrwordsephyphen}{}% + \ifglsxtrinsertinside + {\glsfirstlonghyphenfont{\mfirstucMakeUppercase{\glsxtrgenentrytextfmt{#2}}}}% + \else + {\mfirstucMakeUppercase{\glsxtrgenentrytextfmt{#2}}}% + \fi + \glsxtrfullsep{#1}% + \glsxtrparen + {% + \GLSxtrshortformat{#1}{#2}{\glsfirstabbrvhyphenfont}% + }% + }% +} % \end{macrocode} %\end{macro} % -%\begin{macro}{\@dgls} -%\changes{1.37}{2018-11-30}{new} +%\begin{macro}{\glsxtrposthyphenshortpl} +%\changes{1.49}{??}{new} +%As above but plural. % \begin{macrocode} -\newcommand*{\@dgls}[2][]{% - \@glsxtr@get@prefixedlabel{#2}% - \new@ifnextchar[{\@gls@{#1}{\@gls@thislabel}}{\@gls@{#1}{\@gls@thislabel}[]}% +\newcommand*{\glsxtrposthyphenshortpl}[2]{% + {% + \glsxtrifhyphenstart{#2}{\let\glsxtrwordsep\glsxtrwordsephyphen}{}% + \ifglsxtrinsertinside + {\glsfirstlonghyphenfont{\glsxtrgenentrytextfmt{#2}}}% + \else + {\glsxtrgenentrytextfmt{#2}}% + \fi + \glsxtrfullsep{#1}% + \glsxtrparen + {% + \glsxtrshortplformat{#1}{#2}{\glsfirstabbrvhyphenfont}% + }% + }% } % \end{macrocode} %\end{macro} % -%\begin{macro}{\dglspl} +%\begin{macro}{\GLSxtrposthyphenshortpl} +%\changes{1.49}{??}{new} +%As above but all caps. % \begin{macrocode} -\newrobustcmd*{\dglspl}{\@gls@hyp@opt\@dglspl} +\newcommand*{\GLSxtrposthyphenshortpl}[2]{% + {% + \glsxtrifhyphenstart{#2}{\let\glsxtrwordsep\glsxtrwordsephyphen}{}% + \ifglsxtrinsertinside + {\glsfirstlonghyphenfont{\mfirstucMakeUppercase{\glsxtrgenentrytextfmt{#2}}}}% + \else + {\mfirstucMakeUppercase{\glsxtrgenentrytextfmt{#2}}}% + \fi + \glsxtrfullsep{#1}% + \glsxtrparen + {% + \GLSxtrshortplformat{#1}{#2}{\glsfirstabbrvhyphenfont}% + }% + }% +} % \end{macrocode} %\end{macro} % -%\begin{macro}{\@dglspl} -%\changes{1.37}{2018-11-30}{new} +%\begin{macro}{\xpglsxtrposthyphenshort} +%\changes{1.49}{??}{new} +%Expand placeholders and check for all caps. % \begin{macrocode} -\newcommand*{\@dglspl}[2][]{% - \@glsxtr@get@prefixedlabel{#2}% - \new@ifnextchar[{\@glspl@{#1}{\@gls@thislabel}}{\@glspl@{#1}{\@gls@thislabel}[]}% +\newcommand*{\xpglsxtrposthyphenshort}{% + \glsxtrifallcaps + {% + \expandafter\GLSxtrposthyphenshort\expandafter\glslabel + \expandafter{\glsinsert}% + }% + {% + \expandafter\glsxtrposthyphenshort\expandafter\glslabel + \expandafter{\glsinsert}% + }% } % \end{macrocode} %\end{macro} % -%\begin{macro}{\dGls} +%\begin{macro}{\glsxtrposthyphensubsequent} +%\changes{1.17}{2017-08-09}{new} +%\begin{definition} +%\cs{glsxtrposthyphensubsequent}\marg{label}\marg{insert} +%\end{definition} +%Format in the post-link hook for subsequent use. The label is +%ignored by default. This just does the insert part with appropriate formatting. % \begin{macrocode} -\newrobustcmd*{\dGls}{\@gls@hyp@opt\@dGls} +\newcommand*{\glsxtrposthyphensubsequent}[2]{% + \ifglsxtrinsertinside + \glsabbrvfont{{\glsxtrgenentrytextfmt{#2}}}% + \else + {\glsxtrgenentrytextfmt{#2}}% + \fi +} % \end{macrocode} %\end{macro} % -%\begin{macro}{\@dGls} -%\changes{1.37}{2018-11-30}{new} +%\begin{macro}{\GLSxtrposthyphensubsequent} +%\changes{1.49}{??}{new} +%As above but all caps. % \begin{macrocode} -\newcommand*{\@dGls}[2][]{% - \@glsxtr@get@prefixedlabel{#2}% - \new@ifnextchar[{\@Gls@{#1}{\@gls@thislabel}}{\@Gls@{#1}{\@gls@thislabel}[]}% +\newcommand*{\GLSxtrposthyphensubsequent}[2]{% + \ifglsxtrinsertinside + \glsabbrvfont{{\mfirstucMakeUppercase{\glsxtrgenentrytextfmt{#2}}}}% + \else + {\mfirstucMakeUppercase{\glsxtrgenentrytextfmt{#2}}}% + \fi } % \end{macrocode} %\end{macro} % -%\begin{macro}{\dGlspl} +%\begin{macro}{\xpglsxtrposthyphensubsequent} +%\changes{1.49}{??}{new} +%Expand placeholders and check for all caps. % \begin{macrocode} -\newrobustcmd*{\dGlspl}{\@gls@hyp@opt\@dGlspl} +\newcommand*{\xpglsxtrposthyphensubsequent}{% + \glsxtrifallcaps + {% + \expandafter\GLSxtrposthyphensubsequent\expandafter\glslabel + \expandafter{\glsinsert}% + }% + {% + \expandafter\glsxtrposthyphensubsequent\expandafter\glslabel + \expandafter{\glsinsert}% + }% +} % \end{macrocode} %\end{macro} % -%\begin{macro}{\@dGlspl} -%\changes{1.37}{2018-11-30}{new} +%\begin{macro}{\glsxtrshorthyphennoinsert} +%\changes{1.17}{2017-08-09}{new} +%\begin{definition} +%\cs{glsxtrshorthyphennoinsert}\marg{label}\marg{short}\marg{insert} +%\end{definition} +%As with \cs{glsxtrshorthyphennolong} but doesn't actually show the +%insert. % \begin{macrocode} -\newcommand*{\@dGlspl}[2][]{% - \@glsxtr@get@prefixedlabel{#2}% - \new@ifnextchar[{\@Glspl@{#1}{\@gls@thislabel}}{\@Glspl@{#1}{\@gls@thislabel}[]}% -} +\newcommand*{\glsxtrshorthyphennoinsert}[3]{% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\dGLS} -%\changes{1.37}{2018-11-30}{new} +% Grouping is needed to localise the redefinitions. % \begin{macrocode} -\newrobustcmd*{\dGLS}{\@gls@hyp@opt\@dGLS} + {% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\@dGLS} -%\changes{1.37}{2018-11-30}{new} +% If \meta{insert} starts with a hyphen, redefine \cs{glsxtrwordsep} +% to a hyphen. % \begin{macrocode} -\newcommand*{\@dGLS}[2][]{% - \@glsxtr@get@prefixedlabel{#2}% - \new@ifnextchar[{\@GLS@{#1}{\@gls@thislabel}}{\@GLS@{#1}{\@gls@thislabel}[]}% + \glsxtrifhyphenstart{#3}{\let\glsxtrwordsep\glsxtrwordsephyphen}{}% + \glsfirstabbrvhyphenfont{#2}% + }% } % \end{macrocode} %\end{macro} % -%\begin{macro}{\dGLSpl} -%\changes{1.37}{2018-11-30}{new} +%\begin{abbrvstyle}{long-hyphen-postshort-hyphen} +%\changes{1.17}{2017-08-09}{new} +%\changes{1.42}{2020-02-03}{added missing text key} +%Like \abbrstyle{long-hyphen-short-hyphen} but shifts the insert +%and parenthetical material to the post-link hook. % \begin{macrocode} -\newrobustcmd*{\dGLSpl}{\@gls@hyp@opt\@dGLSpl} +\newabbreviationstyle{long-hyphen-postshort-hyphen}% +{% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\@dGLSpl} -%\changes{1.37}{2018-11-30}{new} +% Set accessibility attributes if enabled. % \begin{macrocode} -\newcommand*{\@dGLSpl}[2][]{% - \@glsxtr@get@prefixedlabel{#2}% - \new@ifnextchar[{\@GLSpl@{#1}{\@gls@thislabel}}{\@GLSpl@{#1}{\@gls@thislabel}[]}% -} + \glsxtrAccSuppAbbrSetFirstLongAttrs\glscategorylabel % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\dglslink} -%\changes{1.37}{2018-11-30}{new} -%Like \cs{glslink} but tries the prefixes. +% Setup the default fields. % \begin{macrocode} -\newrobustcmd*{\dglslink}[3][]{% - \@glsxtr@get@prefixedlabel{#2}% - \glslink[#1]{\@gls@thislabel}{#3}% -} + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrlongshortname}, + sort={\glsxtrlonghyphenshortsort}, + first={\protect\glsfirstlonghyphenfont{\the\glslongtok}},% + firstplural={\protect\glsfirstlonghyphenfont{\the\glslongpltok}},% + text={\protect\glsabbrvhyphenfont{\the\glsshorttok}},% + plural={\protect\glsabbrvhyphenfont{\the\glsshortpltok}},% + description={\protect\glslonghyphenfont{\the\glslongtok}}}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glsexclapplyinnerfmtfield{\the\glslabeltok}{desc}% + \csdef{glsxtrpostlink\glscategorylabel}{% + \glsxtrifwasfirstuse + {% + \xpglsxtrposthyphenshort + }% + {% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\dglsdisp} -%\changes{1.37}{2018-11-30}{new} -%Like \cs{glsdisp} but tries the prefixes. +% Put the insertion into the post-link: % \begin{macrocode} -\newrobustcmd*{\dglsdisp}[3][]{% - \@glsxtr@get@prefixedlabel{#2}% - \glsdisp[#1]{\@gls@thislabel}{#3}% -} + \xpglsxtrposthyphensubsequent + }% + }% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% % \end{macrocode} -%\end{macro} -% -%Multi (compound/combined) entry commands used by \app{bib2gls}. -%\begin{macro}{\glsxtrmultientryadjustedname} -%\begin{definition} -%\cs{glsxtrmultientryadjustedname}\marg{list1}\marg{name}\marg{list2}\marg{label} -%\end{definition} -%\changes{1.48}{2021-11-22}{new} -%This command is used by \app{bib2gls} when it adjusts the name -%field of an entry that's been identified as a main entry in the -%multi-entry set \meta{label}. -% -%The final argument \meta{label} is the multi-entry label from which -%the set was obtained. The first -%argument \meta{list1} is the list of other labels that come before -%the main label. The third argument \meta{list2} is the remaining -%list of other labels. The \meta{name} argument is the previous name before -%adjustment. +% In case the user wants to mix and match font styles, these are +% redefined here. % \begin{macrocode} -\newrobustcmd*{\glsxtrmultientryadjustedname}[4]{% - \bgroup - \let\@glsxtrmultientryadjustednamesep\glsxtrmultientryadjustednamesep - \let\@glsxtrmultientryadjustednamepresep\glsxtrmultientryadjustednamepresep - \let\@glsxtrmultientryadjustednamepostsep\glsxtrmultientryadjustednamepostsep - \let\@glsxtrmultientryadjustednameother\glsxtrmultientryadjustednameother - \let\@glsxtrmultientryadjustednamefmt\glsxtrmultientryadjustednamefmt - \let\@glsxtrmultientryadjustednamefirstother\glsxtrmultientryadjustednameother - \let\@glsxtrmultientryadjustednamefirstfmt\glsxtrmultientryadjustednamefmt - \@glsxtrmultientryadjustedname{#1}{#2}{#3}{#4}% - \egroup -} + \renewcommand*{\abbrvpluralsuffix}{\glsxtrabbrvpluralsuffix}% + \renewcommand*{\glsabbrvfont}[1]{\glsabbrvhyphenfont{##1}}% + \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvhyphenfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlonghyphenfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslonghyphenfont{##1}}% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\Glsxtrmultientryadjustedname} -%\changes{1.48}{2021-11-22}{new} -%First letter upper case +% Subsequent use needs to omit the insertion but it needs to perform +% the space-hyphen substitution: % \begin{macrocode} -\newrobustcmd*{\Glsxtrmultientryadjustedname}[4]{% - \bgroup - \let\@glsxtrmultientryadjustednamesep\glsxtrmultientryadjustednamesep - \let\@glsxtrmultientryadjustednamepresep\glsxtrmultientryadjustednamepresep - \let\@glsxtrmultientryadjustednamepostsep\glsxtrmultientryadjustednamepostsep - \let\@glsxtrmultientryadjustednameother\glsxtrmultientryadjustednameother - \let\@glsxtrmultientryadjustednamefmt\glsxtrmultientryadjustednamefmt - \let\@glsxtrmultientryadjustednamefirstother\Glsxtrmultientryadjustednameother - \let\@glsxtrmultientryadjustednamefirstfmt\Glsxtrmultientryadjustednamefmt - \@glsxtrmultientryadjustedname{#1}{#2}{#3}{#4}% - \egroup -} -% \end{macrocode} -%\end{macro} -% -%\begin{macro}{\GlsXtrmultientryadjustedname} -%\changes{1.48}{2021-11-22}{new} -%Title case -% \begin{macrocode} -\newrobustcmd*{\GlsXtrmultientryadjustedname}[4]{% - \bgroup - \let\@glsxtrmultientryadjustednamesep\glsxtrmultientryadjustednamesep - \let\@glsxtrmultientryadjustednamepresep\glsxtrmultientryadjustednamepresep - \let\@glsxtrmultientryadjustednamepostsep\glsxtrmultientryadjustednamepostsep - \let\@glsxtrmultientryadjustednameother\GlsXtrmultientryadjustednameother - \let\@glsxtrmultientryadjustednamefmt\GlsXtrmultientryadjustednamefmt - \let\@glsxtrmultientryadjustednamefirstother\GlsXtrmultientryadjustednameother - \let\@glsxtrmultientryadjustednamefirstfmt\GlsXtrmultientryadjustednamefmt - \@glsxtrmultientryadjustedname{#1}{#2}{#3}{#4}% - \egroup -} -% \end{macrocode} -%\end{macro} -% -%\begin{macro}{\GLSxtrmultientryadjustedname} -%\changes{1.48}{2021-11-22}{new} -%All caps. -% \begin{macrocode} -\newrobustcmd*{\GLSxtrmultientryadjustedname}[4]{% - \bgroup - \let\@glsxtrmultientryadjustednamesep\glsxtrmultientryadjustednamesep - \let\@glsxtrmultientryadjustednamepresep\glsxtrmultientryadjustednamepresep - \let\@glsxtrmultientryadjustednamepostsep\glsxtrmultientryadjustednamepostsep - \let\@glsxtrmultientryadjustednameother\GLSxtrmultientryadjustednameother - \let\@glsxtrmultientryadjustednamefmt\GLSxtrmultientryadjustednamefmt - \let\@glsxtrmultientryadjustednamefirstother\GLSxtrmultientryadjustednameother - \let\@glsxtrmultientryadjustednamefirstfmt\GLSxtrmultientryadjustednamefmt - \@glsxtrmultientryadjustedname{#1}{#2}{#3}{#4}% - \egroup -} + \renewcommand*{\glsxtrsubsequentfmt}[2]{% + \glsxtrshorthyphennoinsert{##1}% + {% + \glsifattribute{##1}{markshortwords}{true}% + {% + \glsaccessshort{##1}% + }% + {% + \glsaccessfmtshort{}{\glsxtrgenentrytextfmt}{##1}% + }% + }% + {##2}% + }% + \renewcommand*{\glsxtrsubsequentplfmt}[2]{% + \glsxtrshorthyphennoinsert{##1}% + {% + \glsifattribute{##1}{markshortwords}{true}% + {% + \glsaccessshortpl{##1}% + }% + {% + \glsaccessfmtshortpl{}{\glsxtrgenentrytextfmt}{##1}% + }% + }% + {##2}% + }% + \renewcommand*{\Glsxtrsubsequentfmt}[2]{% + \glsxtrshorthyphennoinsert{##1}% + {% + \glsifattribute{##1}{markshortwords}{true}% + {% + \Glsaccessshort{##1}% + }% + {% + \Glsaccessfmtshort{}{\glsxtrgenentrytextfmt}{##1}% + }% + }% + {##2}% + }% + \renewcommand*{\Glsxtrsubsequentplfmt}[2]{% + \glsxtrshorthyphennoinsert{##1}% + {% + \glsifattribute{##1}{markshortwords}{true}% + {% + \Glsaccessshortpl{##1}% + }% + {% + \Glsaccessfmtshortpl{}{\glsxtrgenentrytextfmt}{##1}% + }% + }% + {##2}% + }% + \renewcommand*{\GLSxtrsubsequentfmt}[2]{% + \glsxtrshorthyphennoinsert{##1}% + {% + \glsifattribute{##1}{markshortwords}{true}% + {% + \GLSaccessshort{##1}% + }% + {% + \GLSaccessfmtshort{}{\glsxtrgenentrytextfmt}{##1}% + }% + }% + {##2}% + }% + \renewcommand*{\GLSxtrsubsequentplfmt}[2]{% + \glsxtrshorthyphennoinsert{##1}% + {% + \glsifattribute{##1}{markshortwords}{true}% + {% + \GLSaccessshortpl{##1}% + }% + {% + \GLSaccessfmtshortpl{}{\glsxtrgenentrytextfmt}{##1}% + }% + }% + {##2}% + }% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\@glsxtrmultientryadjustedname} -%\changes{1.48}{2021-11-22}{new} +% First use full form: % \begin{macrocode} -\newcommand*{\@glsxtrmultientryadjustedname}[4]{% - \letcs\mglscurrentmainlabel{@gls@combined@#4@main}% - \letcs\mglscurrentmainlist{@gls@combined@#4@list}% - \letcs\mglscurrentmainoptions{@gls@combined@#4@options}% - \ifblank{#1}% - {% - \@glsxtrmultientryadjustednamefirstfmt{#2}% + \renewcommand*{\glsxtrfullformat}[2]{% + \glsxtrlonghyphen + {% + \glsifattribute{##1}{markwords}{true}% + {% + \glsaccesslong{##1}% + }% + {% + \glsaccessfmtlong{}{\glsxtrgenentrytextfmt}{##1}% + }% + }% + {##1}{##2}% }% - {% - \def\@mgls@previouslabel{}% - \let\@gls@xtradjustedother\@glsxtrmultientryadjustednamefirstother - \@for\mglscurrentlabel:=#1\do{% - \ifx\@mgls@previouslabel\empty - \else - \@glsxtrmultientryadjustednamesep{\@mgls@previouslabel}{\mglscurrentlabel}% - \fi - \@gls@xtradjustedother{\mglscurrentlabel}% - \let\@mgls@previouslabel\mglscurrentlabel - \let\@gls@xtradjustedother\@glsxtrmultientryadjustednameother + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsxtrlonghyphen + {% + \glsifattribute{##1}{markwords}{true}% + {% + \glsaccesslongpl{##1}% + }% + {% + \glsaccessfmtlongpl{}{\glsxtrgenentrytextfmt}{##1}% + }% }% - \@glsxtrmultientryadjustednamepresep{\@mgls@previouslabel}{\mglscurrentmainlabel}% - \@glsxtrmultientryadjustednamefmt{#2}% + {##1}{##2}% }% - \ifblank{#3}% - {}% - {% - \let\@mgls@previouslabel\mglscurrentmainlabel - \let\@gls@xtrmultientryadjustednamesep\@glsxtrmultientryadjustednamepostsep - \@for\mglscurrentlabel:=#3\do{% - \@gls@xtrmultientryadjustednamesep{\@mgls@previouslabel}{\mglscurrentlabel}% - \@glsxtrmultientryadjustednameother{\mglscurrentlabel}% - \let\@mgls@previouslabel\mglscurrentlabel - \let\@gls@xtrmultientryadjustednamesep\@glsxtrmultientryadjustednamesep + \renewcommand*{\Glsxtrfullformat}[2]{% + \glsxtrlonghyphen + {% + \glsifattribute{##1}{markwords}{true}% + {% + \Glsaccesslong{##1}% + }% + {% + \Glsaccessfmtlong{}{\glsxtrgenentrytextfmt}{##1}% + }% }% + {##1}{##2}% + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \glsxtrlonghyphen + {% + \glsifattribute{##1}{markwords}{true}% + {% + \Glsaccesslongpl{##1}% + }% + {% + \Glsaccessfmtlongpl{}{\glsxtrgenentrytextfmt}{##1}% + }% + }% + {##1}{##2}% + }% + \renewcommand*{\GLSxtrfullformat}[2]{% + \glsxtrlonghyphen + {% + \glsifattribute{##1}{markwords}{true}% + {% + \GLSaccesslong{##1}% + }% + {% + \GLSaccessfmtlong{}{\glsxtrgenentrytextfmt}{##1}% + }% + }% + {##1}{##2}% + }% + \renewcommand*{\GLSxtrfullplformat}[2]{% + \glsxtrlonghyphen + {% + \glsifattribute{##1}{markwords}{true}% + {% + \GLSaccesslongpl{##1}% + }% + {% + \GLSaccessfmtlongpl{}{\glsxtrgenentrytextfmt}{##1}% + }% + }% + {##1}{##2}% }% -} % \end{macrocode} -%\end{macro} -%\begin{macro}{\glsxtrmultientryadjustednamesep} -%\changes{1.48}{2021-11-22}{new} +% In-line format. % \begin{macrocode} -\newcommand*{\glsxtrmultientryadjustednamesep}{\glscombinedfirstsepfirst} + \renewcommand*{\glsxtrinlinefullformat}[2]{% + \glsxtrlongformatgrp{##1}{##2}{\glsfirstlonghyphenfont}% + }% + \renewcommand*{\glsxtrinlinefullplformat}[2]{% + \glsxtrlongplformatgrp{##1}{##2}{\glsfirstlonghyphenfont}% + }% + \renewcommand*{\Glsxtrinlinefullformat}[2]{% + \Glsxtrlongformatgrp{##1}{##2}{\glsfirstlonghyphenfont}% + }% + \renewcommand*{\Glsxtrinlinefullplformat}[2]{% + \Glsxtrlongplformatgrp{##1}{##2}{\glsfirstlonghyphenfont}% + }% + \renewcommand*{\GLSxtrinlinefullformat}[2]{% + \GLSxtrlongformatgrp{##1}{##2}{\glsfirstlonghyphenfont}% + }% + \renewcommand*{\GLSxtrinlinefullplformat}[2]{% + \GLSxtrlongplformatgrp{##1}{##2}{\glsfirstlonghyphenfont}% + }% +} % \end{macrocode} -%\end{macro} +%\end{abbrvstyle} % -%\begin{macro}{\glsxtrmultientryadjustednamepresep} -%\changes{1.48}{2021-11-22}{new} -% Separator before main name. +%\begin{abbrvstyle}{long-hyphen-postshort-hyphen-desc} +%\changes{1.17}{2017-08-09}{new} +%Like \abbrstyle{long-hyphen-postshort-hyphen} but the description +%must be supplied by the user. % \begin{macrocode} -\newcommand*{\glsxtrmultientryadjustednamepresep}{\glsxtrmultientryadjustednamesep} +\newabbreviationstyle{long-hyphen-postshort-hyphen-desc}% +{% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\glsxtrmultientryadjustednamepostsep} -%\changes{1.48}{2021-11-22}{new} -% Separator after main name. +% Set accessibility attributes if enabled. % \begin{macrocode} -\newcommand*{\glsxtrmultientryadjustednamepostsep}{\glsxtrmultientryadjustednamesep} + \glsxtrAccSuppAbbrSetTextShortAttrs\glscategorylabel % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\glsxtrmultientryadjustednamefmt} -%\changes{1.48}{2021-11-22}{new} +% Setup the default fields. % \begin{macrocode} -\newcommand*{\glsxtrmultientryadjustednamefmt}[1]{#1} + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrlongshortdescname}, + sort={\glsxtrlongshortdescsort},% + first={\protect\glsfirstlonghyphenfont{\the\glslongtok}},% + firstplural={\protect\glsfirstlonghyphenfont{\the\glslongpltok}},% + text={\protect\glsabbrvhyphenfont{\the\glsshorttok}},% + plural={\protect\glsabbrvhyphenfont{\the\glsshortpltok}}% + }% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \csdef{glsxtrpostlink\glscategorylabel}{% + \glsxtrifwasfirstuse + {% + \xpglsxtrposthyphenshort + }% + {% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\glsxtrmultientryadjustednameother} -%\changes{1.48}{2021-11-22}{new} +% Put the insertion into the post-link: % \begin{macrocode} -\newcommand*{\glsxtrmultientryadjustednameother}[1]{\glsentryname{#1}} + \xpglsxtrposthyphensubsequent + }% + }% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% + \GlsXtrUseAbbrStyleFmts{long-hyphen-postshort-hyphen}% +} % \end{macrocode} -%\end{macro} +%\end{abbrvstyle} % -%\begin{macro}{\Glsxtrmultientryadjustednamefmt} -%\changes{1.48}{2021-11-22}{new} -% \begin{macrocode} -\newcommand*{\Glsxtrmultientryadjustednamefmt}[1]{\makefirstuc{#1}} -% \end{macrocode} -%\end{macro} +%\begin{macro}{\glsxtrshorthyphenlong} +%\changes{1.17}{2017-08-09}{new} +%\begin{definition} +%\cs{glsxtrshorthyphenlong}\marg{label}\marg{short}\marg{long}\marg{insert} +%\end{definition} +%The \meta{long} and \meta{short} arguments may be the plural form. +%The \meta{long} argument may also be the first letter uppercase form. % -%\begin{macro}{\Glsxtrmultientryadjustednameother} -%\changes{1.48}{2021-11-22}{new} +%As with \cs{glsxtrlonghyphenshort} this doesn't fit in with the +%new \cs{glsxtrshortformat} so the inserted part has to have a separate encapsulation for the +%inner format. The \meta{long} argument will need to include +%the inner format. % \begin{macrocode} -\newcommand*{\Glsxtrmultientryadjustednameother}[1]{\Glsentryname{#1}} +\newcommand*{\glsxtrshorthyphenlong}[4]{% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\GlsXtrmultientryadjustednameother} -%\changes{1.48}{2021-11-22}{new} +% Grouping is needed to localise the redefinitions. % \begin{macrocode} -\newcommand*{\GlsXtrmultientryadjustednameother}[1]{% - \glsentrytitlecase{#1}{name}} + {% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\GlsXtrmultientryadjustednamefmt} -%\changes{1.48}{2021-11-22}{new} +% If \meta{insert} starts with a hyphen, redefine \cs{glsxtrwordsep} +% to a hyphen. The inserted material is also inserted into the +% parenthetical part. (The inserted material is grouped as a +% precautionary measure.) % \begin{macrocode} -\ifdef\glscapitalisewords -{% - \newcommand*{\GlsXtrmultientryadjustednamefmt}[1]{\glscapitalisewords{#1}} -} -{ - \newcommand*{\GlsXtrmultientryadjustednamefmt}[1]{\capitalisewords{#1}} + \glsxtrifhyphenstart{#4}{\let\glsxtrwordsep\glsxtrwordsephyphen}{}% + \glsfirstabbrvhyphenfont{#2\ifglsxtrinsertinside + {\glsxtrgenentrytextfmt{#4}}\fi}% + \ifglsxtrinsertinside\else{\glsxtrgenentrytextfmt{#4}}\fi + \glsxtrfullsep{#1}% + \glsxtrparen{\glsfirstlonghyphenfont{#3% + \ifglsxtrinsertinside{\glsxtrgenentrytextfmt{#4}}\fi}% + \ifglsxtrinsertinside\else{\glsxtrgenentrytextfmt{#4}}\fi}% + }% } % \end{macrocode} %\end{macro} % -%\begin{macro}{\GLSxtrmultientryadjustednameother} -%\changes{1.48}{2021-11-22}{new} +%\begin{macro}{\GLSxtrshorthyphenlong} +%\changes{1.49}{??}{new} +%As above but convert insert to all-caps. The long and short form +%arguments should be provided as all-caps. % \begin{macrocode} -\newcommand*{\GLSxtrmultientryadjustednameother}[1]{% - \mfirstucMakeUppercase{\glsentryname{#1}}} +\newcommand*{\GLSxtrshorthyphenlong}[4]{% + {% + \glsxtrifhyphenstart{#4}{\let\glsxtrwordsep\glsxtrwordsephyphen}{}% + \glsfirstabbrvhyphenfont{#2\ifglsxtrinsertinside + {\mfirstucMakeUppercase{\glsxtrgenentrytextfmt{#4}}}\fi}% + \ifglsxtrinsertinside\else + {\mfirstucMakeUppercase{\glsxtrgenentrytextfmt{#4}}}% + \fi + \glsxtrfullsep{#1}% + \glsxtrparen{\glsfirstlonghyphenfont{#3% + \ifglsxtrinsertinside{\mfirstucMakeUppercase{\glsxtrgenentrytextfmt{#4}}}\fi}% + \ifglsxtrinsertinside\else + {\mfirstucMakeUppercase{\glsxtrgenentrytextfmt{#4}}}% + \fi}% + }% +} % \end{macrocode} %\end{macro} % -%\begin{macro}{\GLSxtrmultientryadjustednamefmt} -%\changes{1.48}{2021-11-22}{new} +%\begin{macro}{\glsxtrshorthyphenlongsort} +%\changes{1.49}{??}{new} % \begin{macrocode} -\newcommand*{\GLSxtrmultientryadjustednamefmt}[1]{\mfirstucMakeUppercase{#1}} +\newcommand*{\glsxtrshorthyphenlongsort}{\expandonce\glsxtrorgshort} % \end{macrocode} %\end{macro} % -%Provide missing Greek letters for use in maths mode. -%These commands are recognised by \app{bib2gls} and will be mapped to the -%Mathematical Greek Italic letters. This ensures that the Greek -%letters that have the same shape as Latin letters are kept -%with the other mathematical Greek letters for sorting purposes. -%The \LaTeX\ version of these commands (provided here) use an upright font -%for capitals and italic for lower case to provide a better match -%with the other Greek symbols provided by the kernel. -% -%\begin{macro}{\Alpha} -%\changes{1.27}{2018-02-26}{new} +%\begin{abbrvstyle}{short-hyphen-long-hyphen} +%\changes{1.17}{2017-08-09}{new} +%\changes{1.42}{2020-02-03}{added missing text key} +%Designed for use with the \catattr{markwords} attribute. % \begin{macrocode} -\providecommand*{\Alpha}{\mathrm{A}} +\newabbreviationstyle{short-hyphen-long-hyphen}% +{% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\Beta} -%\changes{1.27}{2018-02-26}{new} +% Set accessibility attributes if enabled. % \begin{macrocode} -\providecommand*{\Beta}{\mathrm{B}} + \glsxtrAccSuppAbbrSetFirstLongAttrs\glscategorylabel % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\Epsilon} -%\changes{1.27}{2018-02-26}{new} +% Setup the default fields. % \begin{macrocode} -\providecommand*{\Epsilon}{\mathrm{E}} + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrshortlongname}, + sort={\glsxtrshorthyphenlongsort}, + first={\protect\glsfirstabbrvhyphenfont{\the\glsshorttok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \protect\glsxtrparen{\protect\glsfirstlonghyphenfont{\the\glslongtok}}},% + firstplural={\protect\glsfirstabbrvhyphenfont{\the\glsshortpltok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \protect\glsxtrparen{\protect\glsfirstlonghyphenfont{\the\glslongpltok}}},% + text={\protect\glsabbrvhyphenfont{\the\glsshorttok}},% + plural={\protect\glsabbrvhyphenfont{\the\glsshortpltok}},% + description={\protect\glslonghyphenfont{\the\glslongtok}}}% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\Zeta} -%\changes{1.27}{2018-02-26}{new} +% Unset the \catattr{regular} attribute if it has been set. % \begin{macrocode} -\providecommand*{\Zeta}{\mathrm{Z}} + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glsexclapplyinnerfmtfield{\the\glslabeltok}{desc}% + \glsxtrsetcomplexstyle{\the\glslabeltok}{3}% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% + \renewcommand*{\abbrvpluralsuffix}{\glsxtrhyphensuffix}% + \renewcommand*{\glsabbrvfont}[1]{\glsabbrvhyphenfont{##1}}% + \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvhyphenfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlonghyphenfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslonghyphenfont{##1}}% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\Eta} -%\changes{1.27}{2018-02-26}{new} +% The first use full form and the inline full form are the same for +% this style. % \begin{macrocode} -\providecommand*{\Eta}{\mathrm{H}} + \renewcommand*{\glsxtrfullformat}[2]{% + \glsxtrshorthyphenlong{##1}% + {% + \glsifattribute{##1}{markshortwords}{true}% + {% + \glsaccessshort{##1}% + }% + {% + \glsaccessfmtshort{}{\glsxtrgenentrytextfmt}{##1}% + }% + }% + {% + \glsifattribute{##1}{markwords}{true}% + {% + \glsaccesslong{##1}% + }% + {% + \glsaccessfmtlong{}{\glsxtrgenentrytextfmt}{##1}% + }% + }% + {##2}% + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsxtrshorthyphenlong{##1}% + {% + \glsifattribute{##1}{markshortwords}{true}% + {% + \glsaccessshortpl{##1}% + }% + {% + \glsaccessfmtshortpl{}{\glsxtrgenentrytextfmt}{##1}% + }% + }% + {% + \glsifattribute{##1}{marklongwords}{true}% + {% + \glsaccesslongpl{##1}% + }% + {% + \glsaccessfmtlongpl{}{\glsxtrgenentrytextfmt}{##1}% + }% + }% + {##2}% + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \glsxtrshorthyphenlong{##1}% + {% + \glsifattribute{##1}{markshortwords}{true}% + {% + \Glsaccessshort{##1}% + }% + {% + \Glsaccessfmtshort{}{\glsxtrgenentrytextfmt}{##1}% + }% + }% + {% + \glsifattribute{##1}{markwords}{true}% + {% + \glsaccesslong{##1}% + }% + {% + \glsaccessfmtlong{}{\glsxtrgenentrytextfmt}{##1}% + }% + }% + {##2}% + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \glsxtrshorthyphenlong{##1}% + {% + \glsifattribute{##1}{markshortwords}{true}% + {% + \Glsaccessshortpl{##1}% + }% + {% + \Glsaccessfmtshortpl{}{\glsxtrgenentrytextfmt}{##1}% + }% + }% + {% + \glsifattribute{##1}{markwords}{true}% + {% + \glsaccesslongpl{##1}% + }% + {% + \glsaccessfmtlongpl{}{\glsxtrgenentrytextfmt}{##1}% + }% + }% + {##2}% + }% + \renewcommand*{\GLSxtrfullformat}[2]{% + \GLSxtrshorthyphenlong{##1}% + {% + \glsifattribute{##1}{markshortwords}{true}% + {% + \GLSaccessshort{##1}% + }% + {% + \GLSaccessfmtshort{}{\glsxtrgenentrytextfmt}{##1}% + }% + }% + {% + \glsifattribute{##1}{markwords}{true}% + {% + \GLSaccesslong{##1}% + }% + {% + \GLSaccessfmtlong{}{\glsxtrgenentrytextfmt}{##1}% + }% + }% + {##2}% + }% + \renewcommand*{\GLSxtrfullplformat}[2]{% + \GLSxtrshorthyphenlong{##1}% + {% + \glsifattribute{##1}{markshortwords}{true}% + {% + \GLSaccessshortpl{##1}% + }% + {% + \GLSaccessfmtshortpl{}{\glsxtrgenentrytextfmt}{##1}% + }% + }% + {% + \glsifattribute{##1}{markwords}{true}% + {% + \GLSaccesslongpl{##1}% + }% + {% + \GLSaccessfmtlongpl{}{\glsxtrgenentrytextfmt}{##1}% + }% + }% + {##2}% + }% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\Iota} -%\changes{1.27}{2018-02-26}{new} +%Subsequent form also needs checking for a hyphen in case the short +%form has spaces. % \begin{macrocode} -\providecommand*{\Iota}{\mathrm{I}} + \renewcommand*{\glsxtrsubsequentfmt}[2]{% + \glsxtrshorthyphennolong{##1}% + {% + \glsifattribute{##1}{markshortwords}{true}% + {% + \glsaccessshort{##1}% + }% + {% + \glsaccessfmtshort{}{\glsxtrgenentrytextfmt}{##1}% + }% + }% + {##2}% + }% + \renewcommand*{\glsxtrsubsequentplfmt}[2]{% + \glsxtrshorthyphennolong{##1}% + {% + \glsifattribute{##1}{markshortwords}{true}% + {% + \glsaccessshortpl{##1}% + }% + {% + \glsaccessfmtshortpl{}{\glsxtrgenentrytextfmt}{##1}% + }% + }% + {##2}% + }% + \renewcommand*{\Glsxtrsubsequentfmt}[2]{% + \glsxtrshorthyphennolong{##1}% + {% + \glsifattribute{##1}{markshortwords}{true}% + {% + \Glsaccessshort{##1}% + }% + {% + \Glsaccessfmtshort{}{\glsxtrgenentrytextfmt}{##1}% + }% + }% + {##2}% + }% + \renewcommand*{\Glsxtrsubsequentplfmt}[2]{% + \glsxtrshorthyphennolong{##1}% + {% + \glsifattribute{##1}{markshortwords}{true}% + {% + \Glsaccessshortpl{##1}% + }% + {% + \Glsaccessfmtshortpl{}{\glsxtrgenentrytextfmt}{##1}% + }% + }% + {##2}% + }% + \renewcommand*{\GLSxtrsubsequentfmt}[2]{% + \GLSxtrshorthyphennolong{##1}% + {% + \glsifattribute{##1}{markshortwords}{true}% + {% + \GLSaccessshort{##1}% + }% + {% + \GLSaccessfmtshort{}{\glsxtrgenentrytextfmt}{##1}% + }% + }% + {##2}% + }% + \renewcommand*{\GLSxtrsubsequentplfmt}[2]{% + \GLSxtrshorthyphennolong{##1}% + {% + \glsifattribute{##1}{markshortwords}{true}% + {% + \GLSaccessshortpl{##1}% + }% + {% + \GLSaccessfmtshortpl{}{\glsxtrgenentrytextfmt}{##1}% + }% + }% + {##2}% + }% +} % \end{macrocode} -%\end{macro} +%\end{abbrvstyle} % -%\begin{macro}{\Kappa} -%\changes{1.27}{2018-02-26}{new} +%\begin{abbrvstyle}{short-hyphen-long-hyphen-desc} +%\changes{1.17}{2017-08-09}{new} +%Like \abbrstyle{short-hyphen-long-hyphen} but the description +%must be supplied by the user. % \begin{macrocode} -\providecommand*{\Kappa}{\mathrm{K}} +\newabbreviationstyle{short-hyphen-long-hyphen-desc}% +{% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\Mu} -%\changes{1.27}{2018-02-26}{new} +% Set accessibility attributes if enabled. % \begin{macrocode} -\providecommand*{\Mu}{\mathrm{M}} + \glsxtrAccSuppAbbrSetTextShortAttrs\glscategorylabel % \end{macrocode} -%\end{macro} +% Setup the default fields. +% \begin{macrocode} + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrshortlongdescname}, + sort={\glsxtrshortlongdescsort}, + first={\protect\glsfirstabbrvhyphenfont{\the\glsshorttok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \protect\glsxtrparen{\protect\glsfirstlonghyphenfont{\the\glslongtok}}},% + firstplural={\protect\glsfirstabbrvhyphenfont{\the\glsshortpltok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \protect\glsxtrparen{\protect\glsfirstlonghyphenfont{\the\glslongpltok}}},% + text={\protect\glsabbrvhyphenfont{\the\glsshorttok}},% + plural={\protect\glsabbrvhyphenfont{\the\glsshortpltok}}% + }% +% \end{macrocode} +% Unset the \catattr{regular} attribute if it has been set. +% \begin{macrocode} + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glsxtrsetcomplexstyle{\the\glslabeltok}{3}% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% + \GlsXtrUseAbbrStyleFmts{short-hyphen-long-hyphen}% +} +% \end{macrocode} +%\end{abbrvstyle} % -%\begin{macro}{\Nu} -%\changes{1.27}{2018-02-26}{new} +%\begin{macro}{\glsxtrshorthyphen} +%\changes{1.17}{2017-08-09}{new} +%\begin{definition} +%\cs{glsxtrshorthyphen}\marg{short}\marg{label}\marg{insert} +%\end{definition} +%Used by \abbrstyle{short-hyphen-postlong-hyphen}. The \meta{insert} +%is checked to determine if it starts with a hyphen but isn't used +%here as it's moved to the post-link hook. % \begin{macrocode} -\providecommand*{\Nu}{\mathrm{N}} +\newcommand*{\glsxtrshorthyphen}[3]{% +% \end{macrocode} +% Grouping is needed to localise the redefinitions. +% \begin{macrocode} + {% + \glsxtrifhyphenstart{#3}{\let\glsxtrwordsep\glsxtrwordsephyphen}{}% + \glsfirstabbrvhyphenfont{#1}% + }% +} % \end{macrocode} %\end{macro} % -%\begin{macro}{\Omicron} -%\changes{1.27}{2018-02-26}{new} +%\begin{macro}{\glsxtrposthyphenlong} +%\changes{1.17}{2017-08-09}{new} +%\begin{definition} +%\cs{glsxtrposthyphenlong}\marg{label}\marg{insert} +%\end{definition} +%Used in the post-link hook for the +%\abbrstyle{short-hyphen-postlong-hyphen} style. Much like +%\cs{glsxtrshorthyphenlong} but omits the \meta{short} part. This +%always uses the singular long form. % \begin{macrocode} -\providecommand*{\Omicron}{\mathrm{O}} +\newcommand*{\glsxtrposthyphenlong}[2]{% + {% + \glsxtrifhyphenstart{#2}{\let\glsxtrwordsep\glsxtrwordsephyphen}{}% + \ifglsxtrinsertinside + {\glsfirstabbrvhyphenfont{\glsxtrgenentrytextfmt{#2}}}% + \else + {\glsxtrgenentrytextfmt{#2}}% + \fi + \glsxtrfullsep{#1}% + \glsxtrparen + {\glsxtrlongformatgrp{#1}{#2}{\glsfirstlonghyphenfont}}% + }% +} % \end{macrocode} %\end{macro} % -%\begin{macro}{\Rho} -%\changes{1.27}{2018-02-26}{new} +%\begin{macro}{\GLSxtrposthyphenlong} +%\changes{1.49}{??}{new} +%As above but all-caps. % \begin{macrocode} -\providecommand*{\Rho}{\mathrm{P}} +\newcommand*{\GLSxtrposthyphenlong}[2]{% + {% + \glsxtrifhyphenstart{#2}{\let\glsxtrwordsep\glsxtrwordsephyphen}{}% + \ifglsxtrinsertinside + {\glsfirstabbrvhyphenfont{\mfirstucMakeUppercase{\glsxtrgenentrytextfmt{#2}}}}% + \else + {\mfirstucMakeUppercase{\glsxtrgenentrytextfmt{#2}}}% + \fi + \glsxtrfullsep{#1}% + \glsxtrparen + {\GLSxtrlongformatgrp{#1}{#2}{\glsfirstlonghyphenfont}}% + }% +} % \end{macrocode} %\end{macro} % -%\begin{macro}{\Tau} -%\changes{1.27}{2018-02-26}{new} +%Plural versions in case they are required. +%\begin{macro}{\glsxtrposthyphenlongpl} +%\changes{1.49}{??}{new} % \begin{macrocode} -\providecommand*{\Tau}{\mathrm{T}} +\newcommand*{\glsxtrposthyphenlongpl}[2]{% + {% + \glsxtrifhyphenstart{#2}{\let\glsxtrwordsep\glsxtrwordsephyphen}{}% + \ifglsxtrinsertinside + {\glsfirstabbrvhyphenfont{\glsxtrgenentrytextfmt{#2}}}% + \else + {\glsxtrgenentrytextfmt{#2}}% + \fi + \glsxtrfullsep{#1}% + \glsxtrparen + {\glsxtrlongplformatgrp{#1}{#2}{\glsfirstlonghyphenfont}}% + }% +} % \end{macrocode} %\end{macro} % -%\begin{macro}{\Chi} -%\changes{1.27}{2018-02-26}{new} +%\begin{macro}{\GLSxtrposthyphenlongpl} +%\changes{1.49}{??}{new} +%As above but all-caps. % \begin{macrocode} -\providecommand*{\Chi}{\mathrm{X}} +\newcommand*{\GLSxtrposthyphenlongpl}[2]{% + {% + \glsxtrifhyphenstart{#2}{\let\glsxtrwordsep\glsxtrwordsephyphen}{}% + \ifglsxtrinsertinside + {\glsfirstabbrvhyphenfont{\mfirstucMakeUppercase{\glsxtrgenentrytextfmt{#2}}}}% + \else + {\mfirstucMakeUppercase{\glsxtrgenentrytextfmt{#2}}}% + \fi + \glsxtrfullsep{#1}% + \glsxtrparen + {\GLSxtrlongplformatgrp{#1}{#2}{\glsfirstlonghyphenfont}}% + }% +} % \end{macrocode} %\end{macro} % -%\begin{macro}{\Digamma} -%\changes{1.27}{2018-02-26}{new} +%\begin{macro}{\xpglsxtrposthyphenlong} +%\changes{1.49}{??}{new} +%Expand placeholders and check for all caps. % \begin{macrocode} -\providecommand*{\Digamma}{\mathrm{F}} +\newcommand*{\xpglsxtrposthyphenlong}{% + \glsxtrifallcaps + {% + \expandafter\GLSxtrposthyphenlong\expandafter\glslabel + \expandafter{\glsinsert}% + }% + {% + \expandafter\glsxtrposthyphenlong\expandafter\glslabel + \expandafter{\glsinsert}% + }% +} % \end{macrocode} %\end{macro} % -%\begin{macro}{\omicron} -%\changes{1.27}{2018-02-26}{new} +%\begin{abbrvstyle}{short-hyphen-postlong-hyphen} +%\changes{1.17}{2017-08-09}{new} +%\changes{1.42}{2020-02-03}{added missing text key} +%Like \abbrstyle{short-hyphen-long-hyphen} but shifts the insert +%and parenthetical material to the post-link hook. % \begin{macrocode} -\providecommand*{\omicron}{\mathit{o}} +\newabbreviationstyle{short-hyphen-postlong-hyphen}% +{% % \end{macrocode} -%\end{macro} +% Set accessibility attributes if enabled. +% \begin{macrocode} + \glsxtrAccSuppAbbrSetFirstLongAttrs\glscategorylabel +% \end{macrocode} +% Setup the default fields. +% \begin{macrocode} + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrshortlongname}, + sort={\glsxtrshorthyphenlongsort}, + first={\protect\glsfirstabbrvhyphenfont{\the\glsshorttok}},% + firstplural={\protect\glsfirstabbrvhyphenfont{\the\glsshortpltok}},% + text={\protect\glsabbrvhyphenfont{\the\glsshorttok}},% + plural={\protect\glsabbrvhyphenfont{\the\glsshortpltok}},% + description={\protect\glslonghyphenfont{\the\glslongtok}}}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glsexclapplyinnerfmtfield{\the\glslabeltok}{desc}% + \csdef{glsxtrpostlink\glscategorylabel}{% + \glsxtrifwasfirstuse + {% + \xpglsxtrposthyphenlong + }% + {% +% \end{macrocode} +% Put the insertion into the post-link: +% \begin{macrocode} + \xpglsxtrposthyphensubsequent + }% + }% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% +% \end{macrocode} +% In case the user wants to mix and match font styles, these are +% redefined here. +% \begin{macrocode} + \renewcommand*{\abbrvpluralsuffix}{\glsxtrabbrvpluralsuffix}% + \renewcommand*{\glsabbrvfont}[1]{\glsabbrvhyphenfont{##1}}% + \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvhyphenfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlonghyphenfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslonghyphenfont{##1}}% +% \end{macrocode} +% Subsequent use needs to omit the insertion but it needs to perform +% the space-hyphen substitution: +% \begin{macrocode} + \renewcommand*{\glsxtrsubsequentfmt}[2]{% + \glsxtrshorthyphennoinsert{##1}% + {% + \glsifattribute{##1}{markshortwords}{true}% + {% + \glsaccessshort{##1}% + }% + {% + \glsaccessfmtshort{}{\glsxtrgenentrytextfmt}{##1}% + }% + }% + {##2}% + }% + \renewcommand*{\glsxtrsubsequentplfmt}[2]{% + \glsxtrshorthyphennoinsert{##1}% + {% + \glsifattribute{##1}{markshortwords}{true}% + {% + \glsaccessshortpl{##1}% + }% + {% + \glsaccessfmtshortpl{}{\glsxtrgenentrytextfmt}{##1}% + }% + }% + {##2}% + }% + \renewcommand*{\Glsxtrsubsequentfmt}[2]{% + \glsxtrshorthyphennoinsert{##1}% + {% + \glsifattribute{##1}{markshortwords}{true}% + {% + \Glsaccessshort{##1}% + }% + {% + \Glsaccessfmtshort{}{\glsxtrgenentrytextfmt}{##1}% + }% + }% + {##2}% + }% + \renewcommand*{\Glsxtrsubsequentplfmt}[2]{% + \glsxtrshorthyphennoinsert{##1}% + {% + \glsifattribute{##1}{markshortwords}{true}% + {% + \Glsaccessshortpl{##1}% + }% + {% + \Glsaccessfmtshortpl{}{\glsxtrgenentrytextfmt}{##1}% + }% + }% + {##2}% + }% + \renewcommand*{\GLSxtrsubsequentfmt}[2]{% + \glsxtrshorthyphennoinsert{##1}% + {% + \glsifattribute{##1}{markshortwords}{true}% + {% + \GLSaccessshort{##1}% + }% + {% + \GLSaccessfmtshort{}{\glsxtrgenentrytextfmt}{##1}% + }% + }% + {##2}% + }% + \renewcommand*{\GLSxtrsubsequentplfmt}[2]{% + \glsxtrshorthyphennoinsert{##1}% + {% + \glsifattribute{##1}{markshortwords}{true}% + {% + \GLSaccessshortpl{##1}% + }% + {% + \GLSaccessfmtshortpl{}{\glsxtrgenentrytextfmt}{##1}% + }% + }% + {##2}% + }% +% \end{macrocode} +% First use full form: +% \begin{macrocode} + \renewcommand*{\glsxtrfullformat}[2]{% + \glsxtrshorthyphen + {% + \glsifattribute{##1}{markshortwords}{true}% + {% + \glsaccessshort{##1}% + }% + {% + \glsaccessfmtshort{}{\glsxtrgenentrytextfmt}{##1}% + }% + }% + {##1}{##2}% + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsxtrshorthyphen + {% + \glsifattribute{##1}{markshortwords}{true}% + {% + \glsaccessshortpl{##1}% + }% + {% + \glsaccessfmtshortpl{}{\glsxtrgenentrytextfmt}{##1}% + }% + }% + {##1}{##2}% + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \glsxtrshorthyphen + {% + \glsifattribute{##1}{markshortwords}{true}% + {% + \Glsaccessshort{##1}% + }% + {% + \Glsaccessfmtshort{}{\glsxtrgenentrytextfmt}{##1}% + }% + }% + {##1}{##2}% + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \glsxtrshorthyphen + {% + \glsifattribute{##1}{markshortwords}{true}% + {% + \Glsaccessshortpl{##1}% + }% + {% + \Glsaccessfmtshortpl{}{\glsxtrgenentrytextfmt}{##1}% + }% + }{##1}{##2}% + }% + \renewcommand*{\GLSxtrfullformat}[2]{% + \glsxtrshorthyphen + {% + \glsifattribute{##1}{markshortwords}{true}% + {% + \GLSaccessshort{##1}% + }% + {% + \GLSaccessfmtshort{}{\glsxtrgenentrytextfmt}{##1}% + }% + }% + {##1}{##2}% + }% + \renewcommand*{\GLSxtrfullplformat}[2]{% + \glsxtrshorthyphen + {% + \glsifattribute{##1}{markshortwords}{true}% + {% + \GLSaccessshortpl{##1}% + }% + {% + \GLSaccessfmtshortpl{}{\glsxtrgenentrytextfmt}{##1}% + }% + }{##1}{##2}% + }% +% \end{macrocode} +% In-line format. Commands like \cs{glsxtrfull} set \cs{glsinsert} +% to empty. The entire link-text (provided by the following +% commands) is stored in \cs{glscustomtext}. Note that unless the +% insert is saved, it won't appear in the post-link hook. +% \begin{macrocode} + \renewcommand*{\glsxtrinlinefullformat}[2]{% + \glsxtrshortformatgrp{##1}{##2}{\glsfirstabbrvhyphenfont}% + }% + \renewcommand*{\glsxtrinlinefullplformat}[2]{% + \glsxtrshortplformatgrp{##1}{##2}{\glsfirstabbrvhyphenfont}% + }% + \renewcommand*{\Glsxtrinlinefullformat}[2]{% + \Glsxtrshortformatgrp{##1}{##2}{\glsfirstabbrvhyphenfont}% + }% + \renewcommand*{\Glsxtrinlinefullplformat}[2]{% + \Glsxtrshortplformatgrp{##1}{##2}{\glsfirstabbrvhyphenfont}% + }% + \renewcommand*{\GLSxtrinlinefullformat}[2]{% + \GLSxtrshortformatgrp{##1}{##2}{\glsfirstabbrvhyphenfont}% + }% + \renewcommand*{\GLSxtrinlinefullplformat}[2]{% + \GLSxtrshortplformatgrp{##1}{##2}{\glsfirstabbrvhyphenfont}% + }% +} +% \end{macrocode} +%\end{abbrvstyle} % -%Provide corresponding upright characters if \sty{upgreek} has been -%loaded. (The upper case characters are the same as above.) +%\begin{abbrvstyle}{short-hyphen-postlong-hyphen-desc} +%\changes{1.17}{2017-08-09}{new} +%Like \abbrstyle{short-hyphen-postlong-hyphen} but the description +%must be supplied by the user. % \begin{macrocode} -\@ifpackageloaded{upgreek}% -{ +\newabbreviationstyle{short-hyphen-postlong-hyphen-desc}% +{% % \end{macrocode} -%\begin{macro}{\Upalpha} -%\changes{1.27}{2018-02-26}{new} +% Set accessibility attributes if enabled. % \begin{macrocode} - \providecommand*{\Upalpha}{\mathrm{A}} + \glsxtrAccSuppAbbrSetTextShortAttrs\glscategorylabel % \end{macrocode} -%\end{macro} +% Setup the default fields. +% \begin{macrocode} + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrshortlongdescname}, + sort={\glsxtrshortlongdescsort},% + first={\protect\glsfirstabbrvhyphenfont{\the\glsshorttok}},% + firstplural={\protect\glsfirstabbrvhyphenfont{\the\glsshortpltok}},% + text={\protect\glsabbrvhyphenfont{\the\glsshorttok}},% + plural={\protect\glsabbrvhyphenfont{\the\glsshortpltok}}% + }% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \csdef{glsxtrpostlink\glscategorylabel}{% + \glsxtrifwasfirstuse + {% + \xpglsxtrposthyphenlong + }% + {% +% \end{macrocode} +% Put the insertion into the post-link: +% \begin{macrocode} + \xpglsxtrposthyphensubsequent + }% + }% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% + \GlsXtrUseAbbrStyleFmts{short-hyphen-postlong-hyphen}% +} +% \end{macrocode} +%\end{abbrvstyle} % -%\begin{macro}{\Upbeta} -%\changes{1.27}{2018-02-26}{new} +%\subsection{Predefined Styles (No Short on First Use)} +%These styles show only the long form on first use and only the +%short form on subsequent use. +%\begin{macro}{\glsabbrvonlyfont} +%\changes{1.17}{2017-08-09}{new} % \begin{macrocode} - \providecommand*{\Upbeta}{\mathrm{B}} +\newcommand*{\glsabbrvonlyfont}{\glsabbrvdefaultfont}% % \end{macrocode} %\end{macro} -% -%\begin{macro}{\Upepsilon} -%\changes{1.27}{2018-02-26}{new} +%\begin{macro}{\glsfirstabbrvonlyfont} +%\changes{1.17}{2017-08-09}{new} % \begin{macrocode} - \providecommand*{\Upepsilon}{\mathrm{E}} +\newcommand*{\glsfirstabbrvonlyfont}{\glsabbrvonlyfont}% % \end{macrocode} %\end{macro} -% -%\begin{macro}{\Upzeta} -%\changes{1.27}{2018-02-26}{new} +%\begin{macro}{\glslongonlyfont} +%\changes{1.17}{2017-08-09}{new} % \begin{macrocode} - \providecommand*{\Upzeta}{\mathrm{Z}} +\newcommand*{\glslongonlyfont}{\glslongdefaultfont}% % \end{macrocode} %\end{macro} -% -%\begin{macro}{\Upeta} -%\changes{1.27}{2018-02-26}{new} +%\begin{macro}{\glsfirstlongonlyfont} +%\changes{1.17}{2017-08-09}{new} % \begin{macrocode} - \providecommand*{\Upeta}{\mathrm{H}} +\newcommand*{\glsfirstlongonlyfont}{\glslongonlyfont}% % \end{macrocode} %\end{macro} -% -%\begin{macro}{\Upiota} -%\changes{1.27}{2018-02-26}{new} +% The default short form suffix: +%\begin{macro}{\glsxtronlysuffix} +%\changes{1.17}{2017-08-09}{new} % \begin{macrocode} - \providecommand*{\Upiota}{\mathrm{I}} +\newcommand*{\glsxtronlysuffix}{\glsxtrabbrvpluralsuffix} % \end{macrocode} %\end{macro} % -%\begin{macro}{\Upkappa} -%\changes{1.27}{2018-02-26}{new} +%\begin{macro}{\glsxtronlyname} +%\changes{1.25}{2017-11-24}{new} +% The default name format for this style. % \begin{macrocode} - \providecommand*{\Upkappa}{\mathrm{K}} +\newcommand*{\glsxtronlyname}{% + \protect\glsabbrvonlyfont{\the\glsshorttok}% +} % \end{macrocode} %\end{macro} % -%\begin{macro}{\Upmu} -%\changes{1.27}{2018-02-26}{new} +%\begin{abbrvstyle}{long-only-short-only} +%\changes{1.17}{2017-08-09}{new} +%\changes{1.42}{2020-02-03}{added missing text key} % \begin{macrocode} - \providecommand*{\Upmu}{\mathrm{M}} +\newabbreviationstyle{long-only-short-only}% +{% % \end{macrocode} -%\end{macro} +% Set accessibility attributes if enabled. +% \begin{macrocode} + \glsxtrAccSuppAbbrSetFirstLongAttrs\glscategorylabel +% \end{macrocode} +% Setup the default fields. +% \begin{macrocode} + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtronlyname}, + sort={\the\glsshorttok}, + first={\glsfirstxplongfont{\the\glslongtok}{\glscategorylabel}},% + firstplural={\glsfirstxplongfont{\the\glslongpltok}{\glscategorylabel}},% + text={\glsxpabbrvfont{\the\glsshorttok}{\glscategorylabel}},% + plural={\glsxpabbrvfont{\the\glsshortpltok}{\glscategorylabel}},% + description={\protect\glslongonlyfont{\the\glslongtok}}}% +% \end{macrocode} +% Unset the \catattr{regular} attribute if it has been set. +% \begin{macrocode} + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glsexclapplyinnerfmtfield{\the\glslabeltok}{desc}% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% +% \end{macrocode} +%\changes{1.42}{2020-02-03}{removed \cs{protect} from \cs{glsxtronlysuffix}} +% \begin{macrocode} + \renewcommand*{\abbrvpluralsuffix}{\glsxtronlysuffix}% + \renewcommand*{\glsabbrvfont}[1]{\glsabbrvonlyfont{##1}}% + \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvonlyfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongonlyfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslongonlyfont{##1}}% +% \end{macrocode} +% The first use full form doesn't show the short form. +% \begin{macrocode} + \renewcommand*{\glsxtrfullformat}[2]{% + \glsxtrlongformat{##1}{##2}{\glsfirstlongonlyfont}% + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsxtrlongplformat{##1}{##2}{\glsfirstlongonlyfont}% + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \Glsxtrlongformat{##1}{##2}{\glsfirstlongonlyfont}% + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \Glsxtrlongplformat{##1}{##2}{\glsfirstlongonlyfont}% + }% + \renewcommand*{\GLSxtrfullformat}[2]{% + \GLSxtrlongformat{##1}{##2}{\glsfirstlongonlyfont}% + }% + \renewcommand*{\GLSxtrfullplformat}[2]{% + \GLSxtrlongplformat{##1}{##2}{\glsfirstlongonlyfont}% + }% +% \end{macrocode} +% The inline full form does show the short form. +% \begin{macrocode} + \renewcommand*{\glsxtrinlinefullformat}[2]{% + \glsxtrlongshortformat{##1}{##2}% + {\glsfirstlongonlyfont}{\glsfirstabbrvonlyfont}% + }% + \renewcommand*{\glsxtrinlinefullplformat}[2]{% + \glsxtrlongshortplformat{##1}{##2}% + {\glsfirstlongonlyfont}{\glsfirstabbrvonlyfont}% + }% + \renewcommand*{\Glsxtrinlinefullformat}[2]{% + \Glsxtrlongshortformat{##1}{##2}% + {\glsfirstlongonlyfont}{\glsfirstabbrvonlyfont}% + }% + \renewcommand*{\Glsxtrinlinefullplformat}[2]{% + \Glsxtrlongshortplformat{##1}{##2}% + {\glsfirstlongonlyfont}{\glsfirstabbrvonlyfont}% + }% + \renewcommand*{\GLSxtrinlinefullformat}[2]{% + \GLSxtrlongshortformat{##1}{##2}% + {\glsfirstlongonlyfont}{\glsfirstabbrvonlyfont}% + }% + \renewcommand*{\GLSxtrinlinefullplformat}[2]{% + \GLSxtrlongshortplformat{##1}{##2}% + {\glsfirstlongonlyfont}{\glsfirstabbrvonlyfont}% + }% +} +% \end{macrocode} +%\end{abbrvstyle} % -%\begin{macro}{\Upnu} -%\changes{1.27}{2018-02-26}{new} +%\begin{macro}{\glsxtronlydescsort} +%\changes{1.17}{2017-08-09}{new} % \begin{macrocode} - \providecommand*{\Upnu}{\mathrm{N}} +\newcommand*{\glsxtronlydescsort}{\the\glslongtok} % \end{macrocode} %\end{macro} % -%\begin{macro}{\Upomicron} -%\changes{1.27}{2018-02-26}{new} +%\begin{macro}{\glsxtronlydescname} +%\changes{1.17}{2017-08-09}{new} % \begin{macrocode} - \providecommand*{\Upomicron}{\mathrm{O}} +\newcommand*{\glsxtronlydescname}{% + \protect\glslongfont{\the\glslongtok}% +} % \end{macrocode} %\end{macro} % -%\begin{macro}{\Uprho} -%\changes{1.27}{2018-02-26}{new} +%\begin{abbrvstyle}{long-only-short-only-desc} +%\changes{1.17}{2017-08-09}{new} % \begin{macrocode} - \providecommand*{\Uprho}{\mathrm{P}} +\newabbreviationstyle{long-only-short-only-desc}% +{% % \end{macrocode} -%\end{macro} +% Set accessibility attributes if enabled. +% \begin{macrocode} + \glsxtrAccSuppAbbrSetTextShortAttrs\glscategorylabel +% \end{macrocode} +% Setup the default fields. +% \begin{macrocode} + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtronlydescname}, + sort={\glsxtronlydescsort},% + first={\glsfirstxplongfont{\the\glslongtok}{\glscategorylabel}},% + firstplural={\glsfirstxplongfont{\the\glslongpltok}{\glscategorylabel}},% + text={\glsxpabbrvfont{\the\glsshorttok}{\glscategorylabel}},% + plural={\glsxpabbrvfont{\the\glsshortpltok}{\glscategorylabel}}% + }% +% \end{macrocode} +% Unset the \catattr{regular} attribute if it has been set. +% \begin{macrocode} + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% + \GlsXtrUseAbbrStyleFmts{long-only-short-only}% +} +% \end{macrocode} +%\end{abbrvstyle} % -%\begin{macro}{\Uptau} -%\changes{1.27}{2018-02-26}{new} +%Small-caps is awkward, so support for that is added. +%\begin{macro}{\glsabbrvsconlyfont} +%\changes{1.48}{2021-11-22}{new} % \begin{macrocode} - \providecommand*{\Uptau}{\mathrm{T}} +\newcommand*{\glsabbrvsconlyfont}{\glsabbrvscfont}% % \end{macrocode} %\end{macro} -% -%\begin{macro}{\Upchi} -%\changes{1.27}{2018-02-26}{new} +%\begin{macro}{\glsfirstabbrvsconlyfont} +%\changes{1.48}{2021-11-22}{new} % \begin{macrocode} - \providecommand*{\Upchi}{\mathrm{X}} +\newcommand*{\glsfirstabbrvsconlyfont}{\glsabbrvsconlyfont}% % \end{macrocode} %\end{macro} -% -%\begin{macro}{\upomicron} -%\changes{1.27}{2018-02-26}{new} +% The default short form suffix: +%\begin{macro}{\glsxtrsconlysuffix} +%\changes{1.48}{2021-11-22}{new} % \begin{macrocode} - \providecommand*{\upomicron}{\mathrm{o}} +\newcommand*{\glsxtrsconlysuffix}{\glsxtrscsuffix} % \end{macrocode} %\end{macro} % +%\begin{macro}{\glsxtrsconlyrevert} +%\changes{1.49}{??}{new} % \begin{macrocode} -}% -{}% upgreek.sty not loaded +\newcommand*{\glsxtrsconlyrevert}{\glsxtrscrevert} % \end{macrocode} +%\end{macro} % -%This package provides some basic rules, but it's not intended for -%complete coverage of all locales. The CLDR should provide the -%appropriate locale-sensitive rules. These macros are primarily to -%help construct custom rules to include, for example, Greek maths symbols -%mixed with Latin. For the full rule syntax, see the Java API for -%\href{https://docs.oracle.com/javase/8/docs/api/java/text/RuleBasedCollator.html}{RuleBaseCollator} % -%If you want to provide a rule-block for a particular locale to -%allow for customization within that locale, create a file called -%\texttt{glossariesxtr-\meta{tag}.ldf} (where \meta{tag} identifies -%the locale) and add similar commands. See the description -%of \cs{IfTrackedLanguageFileExists} in the \sty{tracklang} manual -%for the allowed forms of \meta{tag}. The simplest is to just use -%the root language label or ISO code. The file will then be automatically loaded -%by \styfmt{glossaries-extra} if the document has support for that -%language. -% -%When combining these blocks of rules, remember to separate them -%with the appropriate character. For example: -%\begin{verbatim} -%sort-rule={\glsxtrcontrolrules -% ;\glsxtrspacerules -% ;\glsxtrnonprintablerules -% ;\glsxtrcombiningdiacriticrules -% ,\glsxtrhyphenrules -% <\glsxtrgeneralpuncrules -% <\glsxtrdigitrules -% <\glsxtrfractionrules -% <\glsxtrGeneralLatinIVrules -% <\glsxtrMathItalicGreekIrules -%} -%\end{verbatim} -% -%\begin{macro}{\glsxtrcontrolrules} -%\changes{1.27}{2018-02-26}{new} -%These are control characters that are usually placed at the start -%of a rule in the `ignored characters' section. These control -%characters are unlikely to appear in any entry fields but are -%provided for completeness. -%\cs{string} is used for punctuation characters in case they've been -%made active. +%\begin{macro}{\glsxtrsconlyname} +%\changes{1.48}{2021-11-22}{new} +% The default name format for this style. % \begin{macrocode} -\newcommand*{\glsxtrcontrolrules}{% - \string'\glshex 200B\string'\string=\glshex 200C\string=\glshex 200D - \string=\glshex 200E\string=\glshex 200F\string=\glshex 0000\string=\glshex 0001 - \string=\glshex 0002\string=\glshex 0003\string=\glshex 0004\string=\glshex 0005 - \string=\glshex 0006\string=\glshex 0007\string=\glshex 0008 - \string=\string'\glshex 0009\string'\string=\string'\glshex 000B\string' - \string=\glshex 000E\string=\glshex 000F\string=\string'\glshex -0010\string'\string=\glshex 0011 - \string=\glshex 0012\string=\glshex 0013\string=\glshex 0014\string=\glshex 0015 - \string=\glshex 0016\string=\glshex 0017\string=\glshex 0018\string=\glshex 0019 - \string=\glshex 001A\string=\glshex 001B\string=\glshex 001C\string=\glshex 001D - \string=\glshex 001E\string=\glshex 001F\string=\glshex 007F\string=\glshex 0080 - \string=\glshex 0081\string=\glshex 0082\string=\glshex 0083\string=\glshex 0084 - \string=\glshex 0085\string=\glshex 0086\string=\glshex 0087\string=\glshex 0088 - \string=\glshex 0089\string=\glshex 008A\string=\glshex 008B\string=\glshex 008C - \string=\glshex 008D\string=\glshex 008E\string=\glshex 008F\string=\glshex 0090 - \string=\glshex 0091\string=\glshex 0092\string=\glshex 0093\string=\glshex 0094 - \string=\glshex 0095\string=\glshex 0096\string=\glshex 0097\string=\glshex 0098 - \string=\glshex 0099\string=\glshex 009A\string=\glshex 009B\string=\glshex 009C - \string=\glshex 009D\string=\glshex 009E\string=\glshex 009F +\newcommand*{\glsxtrsconlyname}{% + \protect\glsabbrvsconlyfont{\the\glsshorttok}% } % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrspacerules} -%\changes{1.27}{2018-02-26}{new} -%These are space characters. +%\begin{abbrvstyle}{long-only-short-sc-only} +%\changes{1.48}{2021-11-22}{new} % \begin{macrocode} -\newcommand*{\glsxtrspacerules}{% - \string' \string'\string; - \string'\glshex 00A0\string'\string; - \string'\glshex 2000\string'\string; - \string'\glshex 2001\string'\string; - \string'\glshex 2002\string'\string; - \string'\glshex 2003\string'\string; - \string'\glshex 2004\string'\string; - \string'\glshex 2005\string'\string; - \string'\glshex 2006\string'\string; - \string'\glshex 2007\string'\string; - \string'\glshex 2008\string'\string; - \string'\glshex 2009\string'\string; - \string'\glshex 200A\string'\string; - \string'\glshex 3000\string' +\newabbreviationstyle{long-only-short-sc-only}% +{% +% \end{macrocode} +% Set accessibility attributes if enabled. +% \begin{macrocode} + \glsxtrAccSuppAbbrSetFirstLongAttrs\glscategorylabel +% \end{macrocode} +% Setup the default fields. +% \begin{macrocode} + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrsconlyname}, + sort={\the\glsshorttok}, + first={\glsfirstxplongfont{\the\glslongtok}{\glscategorylabel}},% + firstplural={\glsfirstxplongfont{\the\glslongpltok}{\glscategorylabel}},% + text={\protect\glsabbrvsconlyfont{\the\glsshorttok}},% + plural={\protect\glsabbrvsconlyfont{\the\glsshortpltok}},% + description={\protect\glslongonlyfont{\the\glslongtok}}}% +% \end{macrocode} +% Unset the \catattr{regular} attribute if it has been set. +% \begin{macrocode} + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glsexclapplyinnerfmtfield{\the\glslabeltok}{desc}% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% + \renewcommand*{\abbrvpluralsuffix}{\glsxtrsconlysuffix}% + \renewcommand*{\glsabbrvfont}[1]{\glsabbrvsconlyfont{##1}}% + \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvsconlyfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongonlyfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslongonlyfont{##1}}% + \renewcommand*\glsxtrrevert[1]{\glsxtrsconlyrevert{##1}}% +% \end{macrocode} +% The first use full form doesn't show the short form. +% \begin{macrocode} + \renewcommand*{\glsxtrfullformat}[2]{% + \glsxtrlongformat{##1}{##2}{\glsfirstlongonlyfont}% + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsxtrlongplformat{##1}{##2}{\glsfirstlongonlyfont}% + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \Glsxtrlongformat{##1}{##2}{\glsfirstlongonlyfont}% + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \Glsxtrlongplformat{##1}{##2}{\glsfirstlongonlyfont}% + }% + \renewcommand*{\GLSxtrfullformat}[2]{% + \GLSxtrlongformat{##1}{##2}{\glsfirstlongonlyfont}% + }% + \renewcommand*{\GLSxtrfullplformat}[2]{% + \GLSxtrlongplformat{##1}{##2}{\glsfirstlongonlyfont}% + }% +% \end{macrocode} +% The inline full form does show the short form. +% \begin{macrocode} + \renewcommand*{\glsxtrinlinefullformat}[2]{% + \glsxtrlongshortformat{##1}{##2}% + {\glsfirstlongonlyfont}{\glsfirstabbrvsconlyfont}% + }% + \renewcommand*{\glsxtrinlinefullplformat}[2]{% + \glsxtrlongshortplformat{##1}{##2}% + {\glsfirstlongonlyfont}{\glsfirstabbrvsconlyfont}% + }% + \renewcommand*{\Glsxtrinlinefullformat}[2]{% + \Glsxtrlongshortformat{##1}{##2}% + {\glsfirstlongonlyfont}{\glsfirstabbrvsconlyfont}% + }% + \renewcommand*{\Glsxtrinlinefullplformat}[2]{% + \Glsxtrlongshortplformat{##1}{##2}% + {\glsfirstlongonlyfont}{\glsfirstabbrvsconlyfont}% + }% + \renewcommand*{\GLSxtrinlinefullformat}[2]{% + \GLSxtrlongshortformat{##1}{##2}% + {\glsfirstlongonlyfont}{\glsfirstabbrvsconlyfont}% + }% + \renewcommand*{\GLSxtrinlinefullplformat}[2]{% + \GLSxtrlongshortplformat{##1}{##2}% + {\glsfirstlongonlyfont}{\glsfirstabbrvsconlyfont}% + }% } % \end{macrocode} +%\end{abbrvstyle} +% +%\begin{macro}{\glsxtrsconlydescsort} +%\changes{1.48}{2021-11-22}{new} +% \begin{macrocode} +\newcommand*{\glsxtrsconlydescsort}{\glsxtronlydescsort} +% \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrnonprintablerules} -%\changes{1.27}{2018-02-26}{new} -%These are non-printable characters (BOM, tabs, line feed and carriage -%return). +%\begin{macro}{\glsxtrsconlydescname} +%\changes{1.48}{2021-11-22}{new} % \begin{macrocode} -\newcommand*{\glsxtrnonprintablerules}{% - \string'\glshex FEFF\string'\string; - \string'\glshex 000A\string'\string; - \string'\glshex 0009\string'\string; - \string'\glshex 000C\string'\string; - \string'\glshex 000B\string' -} +\newcommand*{\glsxtrsconlydescname}{\glsxtronlydescname} % \end{macrocode} %\end{macro} - -%\begin{macro}{\glsxtrcombiningdiacriticrules} -%\changes{1.27}{2018-02-26}{new} -%Combining diacritic marks. This is split into multiple macros. +% +%\begin{abbrvstyle}{long-only-short-sc-only-desc} +%\changes{1.48}{2021-11-22}{new} % \begin{macrocode} -\newcommand*{\glsxtrcombiningdiacriticrules}{% - \glsxtrcombiningdiacriticIrules\string; - \glsxtrcombiningdiacriticIIrules\string; - \glsxtrcombiningdiacriticIIIrules\string; - \glsxtrcombiningdiacriticIVrules +\newabbreviationstyle{long-only-short-sc-only-desc}% +{% +% \end{macrocode} +% Set accessibility attributes if enabled. +% \begin{macrocode} + \glsxtrAccSuppAbbrSetTextShortAttrs\glscategorylabel +% \end{macrocode} +% Setup the default fields. +% \begin{macrocode} + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrsconlydescname}, + sort={\glsxtrsconlydescsort},% + first={\glsfirstxplongfont{\the\glslongtok}{\glscategorylabel}},% + firstplural={\glsfirstxplongfont{\the\glslongpltok}{\glscategorylabel}},% + text={\glsxpabbrvfont{\the\glsshorttok}{\glscategorylabel}},% + plural={\glsxpabbrvfont{\the\glsshortpltok}{\glscategorylabel}}% + }% +% \end{macrocode} +% Unset the \catattr{regular} attribute if it has been set. +% \begin{macrocode} + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% + \GlsXtrUseAbbrStyleFmts{long-only-short-sc-only}% } % \end{macrocode} +%\end{abbrvstyle} +% +%\iffalse +% \begin{macrocode} +% +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} +%<*glossaries-extra-bib2gls.sty> +% \end{macrocode} +%\fi +%\section{Commands Specific to bib2gls (glossaries-extra-bib2gls.sty)} +%\changes{1.27}{2018-02-26}{added glossaries-extra-bib2gls.sty} +%This package provides additional support for \app{bib2gls} and is +%automatically loaded by the record option. +% \begin{macrocode} +\NeedsTeXFormat{LaTeX2e} +% \end{macrocode} +% Rollback releases: +% \begin{macrocode} +\DeclareRelease{v1.48}{2021-11-22}{glossaries-extra-bib2gls-2021-11-22.sty} +\DeclareCurrentRelease{v1.49}{2022-10-14} +% \end{macrocode} +% Declare package: +% \begin{macrocode} +\ProvidesPackage{glossaries-extra-bib2gls}[2022/10/14 v1.49 (NLCT)] +% \end{macrocode} +%Provide convenient shortcut commands for predefined glossary types. +%\begin{macro}{\printunsrtacronyms} +%\changes{1.40}{2019-03-31}{new} +% \begin{macrocode} +\ifglsacronym + \providecommand*{\printunsrtacronyms}[1][]{% + \printunsrtglossary[type=\acronymtype,#1]}% +\fi +% \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrcombiningdiacriticIrules} -%\changes{1.27}{2018-02-26}{new} -%First set of combining diacritic marks. +%\begin{macro}{\printunsrtindex} +%\changes{1.40}{2019-03-31}{new} % \begin{macrocode} -\newcommand*{\glsxtrcombiningdiacriticIrules}{% - \glshex 0301\string;% combining acute - \glshex 0300\string;% combining grave - \glshex 0306\string;% combining breve - \glshex 0302\string;% combining circumflex - \glshex 030C\string;% combining caron - \glshex 030A\string;% combining ring - \glshex 030D\string;% combining vertical line above - \glshex 0308\string;% combining diaeresis - \glshex 030B\string;% combining double acute - \glshex 0303\string;% combining tilde - \glshex 0307\string;% combining dot above - \glshex 0304% combining macron -} +\ifglossaryexists{index} +{ + \providecommand*{\printunsrtindex}[1][]{% + \printunsrtglossary[type=index,#1]}% +}{} % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrcombiningdiacriticIIrules} -%\changes{1.27}{2018-02-26}{new} -%Second set of combining diacritic marks. +%\begin{macro}{\printunsrtsymbols} +%\changes{1.40}{2019-03-31}{new} % \begin{macrocode} -\newcommand*{\glsxtrcombiningdiacriticIIrules}{% - \glshex 0337\string;% combining short solidus overlay - \glshex 0327\string;% combining cedilla - \glshex 0328\string;% combining ogonek - \glshex 0323\string;% combining dot below - \glshex 0332\string;% combining low line - \glshex 0305\string;% combining overline - \glshex 0309\string;% combining hook above - \glshex 030E\string;% combining double vertical line above - \glshex 030F\string;% combining double grave accent - \glshex 0310\string;% combining candrabindu - \glshex 0311\string;% combining inverted breve - \glshex 0312\string;% combining turned comma above - \glshex 0313\string;% combining comma above - \glshex 0314\string;% combining reversed comma above - \glshex 0315\string;% combining comma above right - \glshex 0316\string;% combining grave accent below - \glshex 0317% combining acute accent below -} +\ifglossaryexists{symbols} +{ + \providecommand*{\printunsrtsymbols}[1][]{% + \printunsrtglossary[type=symbols,#1]}% +}{} % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrcombiningdiacriticIIIrules} -%\changes{1.27}{2018-02-26}{new} -%Third set of combining diacritic marks. +%\begin{macro}{\printunsrtnumbers} +%\changes{1.40}{2019-03-31}{new} % \begin{macrocode} -\newcommand*{\glsxtrcombiningdiacriticIIIrules}{% - \glshex 0318\string;% combining left tack below - \glshex 0319\string;% combining right tack below - \glshex 031A\string;% combining left angle above - \glshex 031B\string;% combining horn - \glshex 031C\string;% combining left half ring below - \glshex 031D\string;% combining up tack below - \glshex 031E\string;% combining down tack below - \glshex 031F\string;% combining plus sign below - \glshex 0320\string;% combining minus sign below - \glshex 0321\string;% combining palatalized hook below - \glshex 0322\string;% combining retroflex hook below - \glshex 0324\string;% combining diaresis below - \glshex 0325\string;% combining ring below - \glshex 0326\string;% combining comma below - \glshex 0329\string;% combining vertical line below - \glshex 032A\string;% combining bridge below - \glshex 032B\string;% combining inverted double arch below - \glshex 032C\string;% combining caron below - \glshex 032D\string;% combining circumflex accent below - \glshex 032E\string;% combining breve below - \glshex 032F\string;% combining inverted breve below - \glshex 0330\string;% combining tilde below - \glshex 0331\string;% combining macron below - \glshex 0333\string;% combining double low line - \glshex 0334\string;% combining tilde overlay - \glshex 0335\string;% combining short stroke overlay - \glshex 0336\string;% combining long stroke overlay - \glshex 0338\string;% combining long solidus overlay - \glshex 0339\string;% combining combining right half ring below - \glshex 033A\string;% combining inverted bridge below - \glshex 033B\string;% combining square below - \glshex 033C\string;% combining seagull below - \glshex 033D\string;% combining x above - \glshex 033E\string;% combining vertical tilde - \glshex 033F\string;% combining double overline - \glshex 0342\string;% combining Greek perispomeni - \glshex 0344\string;% combining Greek dialytika tonos - \glshex 0345\string;% combining Greek ypogegrammeni - \glshex 0360\string;% combining double tilde - \glshex 0361\string;% combining double inverted breve - \glshex 0483\string;% combining Cyrillic titlo - \glshex 0484\string;% combining Cyrillic palatalization - \glshex 0485\string;% combining Cyrillic dasia pneumata - \glshex 0486% combining Cyrillic psili pneumata -} +\ifglossaryexists{numbers} +{ + \providecommand*{\printunsrtnumbers}[1][]{% + \printunsrtglossary[type=numbers,#1]}% +}{} % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrcombiningdiacriticIVrules} -%\changes{1.27}{2018-02-26}{new} -%Fourth set of combining diacritic marks. +%\begin{macro}{\printunsrtabbreviations} +%\changes{1.40}{2019-03-31}{new} % \begin{macrocode} -\newcommand*{\glsxtrcombiningdiacriticIVrules}{% - \glshex 20D0\string;% combining left harpoon above - \glshex 20D1\string;% combining right harpoon above - \glshex 20D2\string;% combining long vertical line overlay - \glshex 20D3\string;% combining short vertical line overlay - \glshex 20D4\string;% combining anticlockwise arrow above - \glshex 20D5\string;% combining clockwise arrow above - \glshex 20D6\string;% combining left arrow above - \glshex 20D7\string;% combining right arrow above - \glshex 20D8\string;% combining ring overlay - \glshex 20D9\string;% combining clockwise ring overlay - \glshex 20DA\string;% combining anticlockwise ring overlay - \glshex 20DB\string;% combining three dots above - \glshex 20DC\string;% combining four dots above - \glshex 20DD\string;% combining enclosing circle - \glshex 20DE\string;% combining enclosing square - \glshex 20DF\string;% combining enclosing diamond - \glshex 20E0\string;% combining enclosing circle backslash - \glshex 20E1% combining left right arrow above -} +\ifglossaryexists{abbreviations} +{ + \providecommand*{\printunsrtabbreviations}[1][]{% + \printunsrtglossary[type=abbreviations,#1]}% +}{} % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrhyphenrules} -%\changes{1.27}{2018-02-26}{new} -%Hyphens. +%\begin{macro}{\glsdisplaynumberlist} +%\changes{1.42}{2020-02-03}{added} +%Allow \cs{glsdisplaynumberlist} and make it robust. % \begin{macrocode} -\newcommand*{\glsxtrhyphenrules}{% - \string'\string-\string'\string;% ASCII hyphen - \glshex 00AD\string;% soft hyphen - \glshex 2010\string;% hyphen - \glshex 2011\string;% non-breaking hyphen - \glshex 2012\string;% figure dash - \glshex 2013\string;% en dash - \glshex 2014\string;% em dash - \glshex 2015\string;% horizontal bar - \glshex 2212\string=\glshex 207B\string=\glshex 208B% minus sign +\renewcommand*{\glsdisplaynumberlist}[1]{% + \glsdoifexists{#1}% + {% + {\let\bibglsdelimN\glsnumlistsep + \let\bibglslastDelimN\glsnumlistlastsep + \glsxtrusefield{#1}{location}% + }% + }% } +\robustify\glsdisplaynumberlist % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrgeneralpuncrules} -%\changes{1.27}{2018-02-26}{new} -%General punctuation. +%\begin{macro}{\glsentrynumberlist} +%\changes{1.42}{2020-02-03}{added} % \begin{macrocode} -\newcommand*{\glsxtrgeneralpuncrules}{% - \glsxtrgeneralpuncIrules - \string<\glsxtrcurrencyrules - \string<\glsxtrgeneralpuncIIrules -} +\renewcommand*{\glsentrynumberlist}[1]{\glsxtrusefield{#1}{location}} % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrgeneralpuncIrules} -%\changes{1.27}{2018-02-26}{new} -%First set of general punctuation. +%\begin{macro}{\IfTeXParserLib} +%\changes{1.49}{2022-10-14}{new} +%This is defined by the \TeX\ parser library to behave like +%\cs{@firstoftwo}. May be used to provide different code in fields +%that may be interpreted. % \begin{macrocode} -\newcommand*{\glsxtrgeneralpuncIrules}{% - \string'\glshex 005F\string'% underscore - \string<\glshex 00AF% macron - \string<\string'\glshex 002C\string'% comma - \string<\string'\glshex 003B\string'% semi-colon - \string<\string'\glshex 003A\string'% colon - \string<\string'\glshex 0021\string'% exclamation mark - \string<\glshex 00A1% inverted exclamation mark - \string<\string'\glshex 003F\string'% question mark - \string<\glshex 00BF% inverted question mark - \string<\string'\glshex 002F\string'% solidus - \string<\string'\glshex 002E\string'% full stop - \string<\glshex 00B4% acute accent - \string<\string'\glshex 0060\string'% grave accent - \string<\string'\glshex 005E\string'% circumflex accent - \string<\glshex 00A8% diaersis - \string<\string'\glshex 007E\string'% tilde - \string<\glshex 00B7% middle dot - \string<\glshex 00B8% cedilla - \string<\string'\glshex 0027\string'% straight apostrophe - \string<\string'\glshex 0022\string'% straight double quote - \string<\glshex 00AB% left guillemet - \string<\glshex 00BB% right guillemet - \string<\string'\glshex 0028\string'% left parenthesis - \string=\glshex 207D\string=\glshex 208D% super/subscript left parenthesis - \string<\string'\glshex 0029\string'% right parenthesis - \string=\glshex 207E\string=\glshex 208E% super/subscript right parenthesis - \string<\string'\glshex 005B\string'% left square bracket - \string<\string'\glshex 005D\string'% right square bracket - \string<\string'\glshex 007B\string'% left curly bracket - \string<\string'\glshex 007D\string'% right curly bracket - \string<\glshex 00A7% section sign - \string<\glshex 00B6% pilcrow sign - \string<\glshex 00A9% copyright sign - \string<\glshex 00AE% registered sign - \string<\string'\glshex 0040\string'% at sign -} +\providecommand{\IfTeXParserLib}[2]{#2} % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrcurrencyrules} -%\changes{1.27}{2018-02-26}{new} -%General punctuation. +%These are some convenient macros for use with custom rules. +%\begin{macro}{\glshex} +%\changes{1.21}{2017-11-03}{new} % \begin{macrocode} -\newcommand*{\glsxtrcurrencyrules}{% - \glshex 00A4% currency sign - \string<\glshex 0E3F% Thai currency symbol baht - \string<\glshex 00A2% cent sign - \string<\glshex 20A1% colon sign - \string<\glshex 20A2% cruzeiro sign - \string<\string'\glshex 0024\string'% dollar sign - \string<\glshex 20AB% dong sign - \string<\glshex 20AC% euro sign - \string<\glshex 20A3% French franc sign - \string<\glshex 20A4% lira sign - \string<\glshex 20A5% mill sign - \string<\glshex 20A6% naira sign - \string<\glshex 20A7% peseta sign - \string<\glshex 00A3% pound sign - \string<\glshex 20A8% rupee sign - \string<\glshex 20AA% new sheqel sign - \string<\glshex 20A9% won sign - \string<\glshex 00A5% yen sign -} +\newcommand*{\glshex}{\string\u} % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrgeneralpuncIIrules} -%\changes{1.27}{2018-02-26}{new} -%Second set of general punctuation. +%\begin{macro}{\glscapturedgroup} +%\changes{1.31}{2018-05-09}{new} % \begin{macrocode} -\newcommand*{\glsxtrgeneralpuncIIrules}{% - \string'\glshex 002A\string'% asterisk - \string<\string'\glshex 005C\string'% backslash - \string<\string'\glshex 0026\string'% ampersand - \string<\string'\glshex 0023\string'% hash sign - \string<\string'\glshex 0025\string'% percent sign - \string<\string'\glshex 002B\string'% plus sign - \string=\glshex 207A\string=\glshex 208A% super/subscript plus sign - \string<\glshex 00B1% plus-minus sign - \string<\glshex 00F7% division sign - \string<\glshex 00D7% multiplication sign - \string<\string'\glshex 003C\string'% less-than sign - \string<\string'\glshex 003D\string'% equals sign - \string<\string'\glshex 003E\string'% greater-than sign - \string<\glshex 00AC% not sign - \string<\string'\glshex 007C\string'% vertical bar (pipe) - \string<\glshex 00A6% broken bar - \string<\glshex 00B0% degree sign - \string<\glshex 00B5% micron sign +\newcommand*{\glscapturedgroup}{\string\$} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glshashchar} +%\changes{1.49}{2022-10-14}{new} +% Expands to a literal hash character (similar to \cs{glsbackslash}) +% \begin{macrocode} +\ifdef\glshashchar +{} +{\edef\glshashchar{\expandafter\@gobble\string\#}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GlsXtrIfHasNonZeroChildCount} +%\changes{1.31}{2018-05-09}{new} +%\changes{1.47}{2021-11-04}{added starred version} +%For use with \app{bib2gls}'s \texttt{save-child-count} resource option. +% \begin{macrocode} +\newcommand*{\GlsXtrIfHasNonZeroChildCount}{% + \@ifstar\s@GlsXtrIfHasNonZeroChildCount\@GlsXtrIfHasNonZeroChildCount } % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrGeneralLatinIrules} -%\changes{1.27}{2018-02-26}{new} -%Basic Latin alphabet. +%\begin{macro}{\@GlsXtrIfHasNonZeroChildCount} +%\changes{1.47}{2021-11-04}{new} % \begin{macrocode} -\newcommand*{\glsxtrGeneralLatinIrules}{% - \glsxtrLatinA - \string1\relax + \ifGlsXtrPrefixLabelFallbackLast + \else % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\glsxtrUpDigamma} -%\changes{1.27}{2018-02-26}{new} +% Fallback on first label. % \begin{macrocode} -\newcommand*{\glsxtrUpDigamma}{% - \glshex 03DD,% lower case digamma - \glshex 03DC% upper case digamma -} + \let\@gls@thislabel\@glsxtr@prefixedfirstlabel + \fi + \else % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\glsxtrUpZeta} -%\changes{1.27}{2018-02-26}{new} +% Only one prefix so assume that one. % \begin{macrocode} -\newcommand*{\glsxtrUpZeta}{% - \glshex 03B6,% lower case zeta - \glshex 0396% upper case zeta -} + \let\@glsxtr@prefixedlist\@empty + \fi + \fi % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\glsxtrUpEta} -%\changes{1.27}{2018-02-26}{new} +%\changes{1.46}{2021-09-20}{changed \cs{x} to \cs{@glo@tmp}} % \begin{macrocode} -\newcommand*{\glsxtrUpEta}{% - \glshex 03B7,% lower case eta - \glshex 0397% upper case eta + \edef\@glo@tmp{\endgroup + \noexpand\def\noexpand\@glsxtr@prefixedlist{\expandonce\@glsxtr@prefixedlist}% + \noexpand\def\noexpand\@gls@thislabel{\expandonce\@gls@thislabel}}\@glo@tmp } % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrUpTheta} -%\changes{1.27}{2018-02-26}{new} +%\begin{macro}{\@@dgls@} +%\changes{1.49}{2022-10-14}{new} +%Used by all the \cs{dgls}-like commands to find the first match. % \begin{macrocode} -\newcommand*{\glsxtrUpTheta}{% - \glshex 03B8% lower case theta - \string=\glshex 03D1,% lower case theta variant - \glshex 0398% upper case theta +\newcommand*{\@@dgls@}[3]{% + \@glsxtr@get@prefixedlabel{#2}% + \ifx\@glsxtr@prefixedlist\@empty + \let\@dgls@@next#3% + \else + \let\@dgls@@next\@glsxtr@dglsnomatch + \fi + \new@ifnextchar[{\@dgls@@next{#1}{\@gls@thislabel}}% + {\@dgls@@next{#1}{\@gls@thislabel}[]}% } % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrUpIota} -%\changes{1.27}{2018-02-26}{new} +%\begin{macro}{\dgls} +%\changes{1.37}{2018-11-30}{new} +%Like \cs{gls} but tries the prefixes. (Can't use \cs{pgls} as +%that's provided by \sty{glossaries-prefix}.) Since this command +%is designed for \app{bib2gls}'s dual entry system, the \qt{d} +%stands for \qt{dual}. % \begin{macrocode} -\newcommand*{\glsxtrUpIota}{% - \glshex 03B9,% lower case iota - \glshex 0399% upper case iota -} +\newrobustcmd*{\dgls}{\@gls@hyp@opt\@dgls} % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrUpKappa} -%\changes{1.27}{2018-02-26}{new} +%\begin{macro}{\@dgls} +%\changes{1.37}{2018-11-30}{new} % \begin{macrocode} -\newcommand*{\glsxtrUpKappa}{% - \glshex 03BA% lower case kappa - \string=\glshex 03F0,% lower case kappa variant - \glshex 039A% upper case kappa -} +\newcommand*{\@dgls}[2][]{\@@dgls@{#1}{#2}{\@gls@}} % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrUpLambda} -%\changes{1.27}{2018-02-26}{new} +%\begin{macro}{\dglspl} % \begin{macrocode} -\newcommand*{\glsxtrUpLambda}{% - \glshex 03BB,% lower lambda - \glshex 039B% upper case lambda -} +\newrobustcmd*{\dglspl}{\@gls@hyp@opt\@dglspl} % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrUpMu} -%\changes{1.27}{2018-02-26}{new} +%\begin{macro}{\@dglspl} +%\changes{1.37}{2018-11-30}{new} % \begin{macrocode} -\newcommand*{\glsxtrUpMu}{% - \glshex 03BC,% lower case mu - \glshex 039C% upper case mu -} +\newcommand*{\@dglspl}[2][]{\@@dgls@{#1}{#2}{\@glspl@}} % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrUpNu} -%\changes{1.27}{2018-02-26}{new} +%\begin{macro}{\dGls} % \begin{macrocode} -\newcommand*{\glsxtrUpNu}{% - \glshex 03BD,% lower case nu - \glshex 039D% upper case nu -} +\newrobustcmd*{\dGls}{\@gls@hyp@opt\@dGls} +\glsmfuaddmap{\dgls}{\dGls} % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrUpXi} -%\changes{1.27}{2018-02-26}{new} +%\begin{macro}{\@dGls} +%\changes{1.37}{2018-11-30}{new} % \begin{macrocode} -\newcommand*{\glsxtrUpXi}{% - \glshex 03BE,% lower case xi - \glshex 039E% upper case xi -} +\newcommand*{\@dGls}[2][]{\@@dgls@{#1}{#2}{\@Gls@}} % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrUpOmicron} -%\changes{1.27}{2018-02-26}{new} +%\begin{macro}{\dGlspl} % \begin{macrocode} -\newcommand*{\glsxtrUpOmicron}{% - \glshex 03BF,% lower case omicron - \glshex 039F% upper case omicron -} +\newrobustcmd*{\dGlspl}{\@gls@hyp@opt\@dGlspl} +\glsmfuaddmap{\dglspl}{\dGlspl} % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrUpPi} -%\changes{1.27}{2018-02-26}{new} +%\begin{macro}{\@dGlspl} +%\changes{1.37}{2018-11-30}{new} % \begin{macrocode} -\newcommand*{\glsxtrUpPi}{% - \glshex 03C0% lower case pi - \string=\glshex 03D6,% lower case pi variant - \glshex 03A0% upper case pi -} +\newcommand*{\@dGlspl}[2][]{\@@dgls@{#1}{#2}{\@Glspl@}} % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrUpRho} -%\changes{1.27}{2018-02-26}{new} +%\begin{macro}{\dGLS} +%\changes{1.37}{2018-11-30}{new} % \begin{macrocode} -\newcommand*{\glsxtrUpRho}{% - \glshex 03C1% lower case rho - \string=\glshex 03F1,% lower case rho variant - \glshex 03A1% upper case rho -} +\newrobustcmd*{\dGLS}{\@gls@hyp@opt\@dGLS} +\glsmfublocker{\dGLS} % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrUpSigma} -%\changes{1.27}{2018-02-26}{new} +%\begin{macro}{\@dGLS} +%\changes{1.37}{2018-11-30}{new} % \begin{macrocode} -\newcommand*{\glsxtrUpSigma}{% - \glshex 03C2% lower case sigma - \string=\glshex 03C3,% lower case sigma - \glshex 03A3% upper case sigma -} +\newcommand*{\@dGLS}[2][]{\@@dgls@{#1}{#2}{\@GLS@}} % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrUpTau} -%\changes{1.27}{2018-02-26}{new} +%\begin{macro}{\dGLSpl} +%\changes{1.37}{2018-11-30}{new} % \begin{macrocode} -\newcommand*{\glsxtrUpTau}{% - \glshex 03C4,% lower case tau - \glshex 03A4% upper case tau -} +\newrobustcmd*{\dGLSpl}{\@gls@hyp@opt\@dGLSpl} +\glsmfublocker{\dGLSpl} % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrUpUpsilon} -%\changes{1.27}{2018-02-26}{new} +%\begin{macro}{\@dGLSpl} +%\changes{1.37}{2018-11-30}{new} % \begin{macrocode} -\newcommand*{\glsxtrUpUpsilon}{% - \glshex 03C5,% lower case upsilon - \glshex 03A5% upper case upsilon -} +\newcommand*{\@dGLSpl}[2][]{\@@dgls@{#1}{#2}{\@GLSpl@}} % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrUpPhi} -%\changes{1.27}{2018-02-26}{new} +%\begin{macro}{\dglslink} +%\changes{1.37}{2018-11-30}{new} +%Like \cs{glslink} but tries the prefixes. % \begin{macrocode} -\newcommand*{\glsxtrUpPhi}{% - \glshex 03C6% lower case phi - \string=\glshex 03D5,% lower case phi variant - \glshex 03A6% upper case phi -} +\newrobustcmd*{\dglslink}{\@gls@hyp@opt\@dglslink} % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrUpChi} -%\changes{1.27}{2018-02-26}{new} +%\begin{macro}{\@dglslink} +%\changes{1.49}{2022-10-14}{new} % \begin{macrocode} -\newcommand*{\glsxtrUpChi}{% - \glshex 03C7,% lower case chi - \glshex 03A7% upper case chi +\newcommand*{\@dglslink}[3][]{% + \@glsxtr@get@prefixedlabel{#2}% + \glslink[#1]{\@gls@thislabel}{#3}% } % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrUpPsi} -%\changes{1.27}{2018-02-26}{new} +%\begin{macro}{\dGlslink} +%\changes{1.49}{2022-10-14}{new} +%Sentence-case version to provide a mapping. % \begin{macrocode} -\newcommand*{\glsxtrUpPsi}{% - \glshex 03C8,% lower case psi - \glshex 03A8% upper case psi -} +\newrobustcmd*{\dGlslink}{\@gls@hyp@opt\@dGlslink} +\glsmfuaddmap{\dglslink}{\dGlslink} % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrUpOmega} -%\changes{1.27}{2018-02-26}{new} +%\begin{macro}{\@dGlslink} +%\changes{1.49}{2022-10-14}{new} % \begin{macrocode} -\newcommand*{\glsxtrUpOmega}{% - \glshex 03C9,% lower case omega - \glshex 03A9% upper case omega +\newcommand*{\@dGlslink}[3][]{% + \dglslink[#1]{#2}{\glssentencecase{#3}}% } % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrMathItalicAlpha} -%\changes{1.27}{2018-02-26}{new} +%\begin{macro}{\dglsdisp} +%\changes{1.37}{2018-11-30}{new} +%Like \cs{glsdisp} but tries the prefixes. % \begin{macrocode} -\newcommand*{\glsxtrMathItalicAlpha}{% - \glshex 1D6FC,% lower case alpha (maths italic) - \glshex 1D6E2% upper case alpha (maths italic) -} +\newrobustcmd*{\dglsdisp}{\@gls@hyp@opt\@dglsdisp} % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrMathItalicBeta} -%\changes{1.27}{2018-02-26}{new} +%\begin{macro}{\@dglsdisp} +%\changes{1.49}{2022-10-14}{new} +%Like \cs{glsdisp} but tries the prefixes. % \begin{macrocode} -\newcommand*{\glsxtrMathItalicBeta}{% - \glshex 1D6FD,% lower case beta (maths italic) - \glshex 1D6E3% upper case beta (maths italic) +\newcommand*{\@dglsdisp}[3][]{% + \@glsxtr@get@prefixedlabel{#2}% + \glsdisp[#1]{\@gls@thislabel}{#3}% } % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrMathItalicGamma} -%\changes{1.27}{2018-02-26}{new} +%\begin{macro}{\dGlsdisp} +%\changes{1.49}{2022-10-14}{new} +%Sentence-case version to provide a mapping. % \begin{macrocode} -\newcommand*{\glsxtrMathItalicGamma}{% - \glshex 1D6FE,% lower case gamma (maths italic) - \glshex 1D6E4% upper case gamma (maths italic) -} +\newrobustcmd*{\dGlsdisp}{\@gls@hyp@opt\@dGlsdisp} +\glsmfuaddmap{\dglsdisp}{\dGlsdisp} % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrMathItalicDelta} -%\changes{1.27}{2018-02-26}{new} +%\begin{macro}{\@dGlsdisp} +%\changes{1.49}{2022-10-14}{new} % \begin{macrocode} -\newcommand*{\glsxtrMathItalicDelta}{% - \glshex 1D6FF,% lower case delta (maths italic) - \glshex 1D6E5% upper case delta (maths italic) +\newcommand*{\@dGlsdisp}[3][]{% + \dglsdisp[#1]{#2}{\glssentencecase{#3}}% } % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrMathItalicEpsilon} -%\changes{1.27}{2018-02-26}{new} +%Similar to the above but searches for a match with the given field +%set. +%\begin{macro}{\@glsxtr@get@prefixedlabel@field} +%\changes{1.49}{2022-10-14}{new} +%The second argument is the field's internal label. % \begin{macrocode} -\newcommand*{\glsxtrMathItalicEpsilon}{% - \glshex 1D700% lower case epsilon (maths italic) - \string=\glshex 1D716,% lower case epsilon variant (maths italic) - \glshex 1D6E6% upper case epsilon (maths italic) -} +\newcommand*{\@glsxtr@get@prefixedlabel@field}[2]{% + \protected@edef\dglsfieldcurrentfieldlabel{#2}% + \let\dglsfieldactualfieldlabel\dglsfieldcurrentfieldlabel % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\glsxtrMathItalicZeta} -%\changes{1.27}{2018-02-26}{new} +% Grouping is used in case of a nested for loop. % \begin{macrocode} -\newcommand*{\glsxtrMathItalicZeta}{% - \glshex 1D701,% lower case zeta (maths italic) - \glshex 1D6E7% upper case zeta (maths italic) + \begingroup +% \end{macrocode} +%Initialise to the unprefixed label in the event that the list is +%empty. +% \begin{macrocode} + \protected@edef\@gls@thislabel{#1}% +% \end{macrocode} +%Save the first label. +% \begin{macrocode} + \let\@glsxtr@prefixedfirstlabel\@gls@thislabel + \def\@glsxtr@set@prefixedfirstlabel{% + \let\@glsxtr@prefixedfirstlabel\@gls@thislabel + \let\@glsxtr@set@prefixedfirstlabel\relax + }% +% \end{macrocode} +%Initialise fallback label. +% \begin{macrocode} + \let\@gls@fallbacklabel\relax +% \end{macrocode} +%List of labels in the event that no combination is found. +% \begin{macrocode} + \let\@glsxtr@prefixedlist\@empty +% \end{macrocode} +% Iterate over all labels. +% \begin{macrocode} + \count@=0\relax + \@for\@glsxtr@prefix:=\@glsxtr@labelprefixes\do + {% + \advance\count@ by 1\relax + \protected@edef\@gls@thislabel{\@glsxtr@prefix#1}% + \@glsxtr@set@prefixedfirstlabel +% \end{macrocode} +% Check if this label exists. +% \begin{macrocode} + \ifglsentryexists{\@gls@thislabel}% + {% +% \end{macrocode} +% Found a label that exists. Has the field been set? +% \begin{macrocode} + \ifcsvoid{glo@\glsdetoklabel{\@gls@thislabel}@#2}% + {% +% \end{macrocode} +%Field hasn't been set. Has a fallback been set yet? +% \begin{macrocode} + \ifx\@gls@fallbacklabel\relax + \ifcsvoid + {glo@\glsdetoklabel{\@gls@thislabel}@\dglsfieldfallbackfieldlabel}% + {}% + {% + \let\@gls@fallbacklabel\@gls@thislabel + }% + \fi + }% + {% + \@endfortrue +% \end{macrocode} +% The field has been set. Clear the list. +% \begin{macrocode} + \let\@glsxtr@prefixedlist\@empty + }% + }% + {% +% \end{macrocode} +% Append or prepend to list. +% \begin{macrocode} + \ifdefempty\@glsxtr@prefixedlist + {\let\@glsxtr@prefixedlist\@gls@thislabel}% + {% + \ifGlsXtrPrefixLabelFallbackLast + \epreto\@glsxtr@prefixedlist{\expandonce\@gls@thislabel,}% + \else + \eappto\@glsxtr@prefixedlist{,\expandonce\@gls@thislabel}% + \fi + }% + }% + }% + \if@endfor +% \end{macrocode} +% Loop ended prematurely, which means label was found. +% \begin{macrocode} + \else +% \end{macrocode} +% Label not found. Was the fallback field found? +% \begin{macrocode} + \ifx\@gls@fallbacklabel\relax +% \end{macrocode} +% No field fallback found. +% \begin{macrocode} + \ifnum\count@>1\relax + \ifGlsXtrPrefixLabelFallbackLast + \else +% \end{macrocode} +% Fallback on first label. +% \begin{macrocode} + \let\@gls@thislabel\@glsxtr@prefixedfirstlabel + \fi + \else +% \end{macrocode} +% Only one prefix so assume that one. +% \begin{macrocode} + \let\@glsxtr@prefixedlist\@empty + \fi + \else +% \end{macrocode} +% Fallback field was found. +% \begin{macrocode} + \let\@gls@thislabel\@gls@fallbacklabel + \let\dglsfieldactualfieldlabel\dglsfieldfallbackfieldlabel + \fi + \fi +% \end{macrocode} +%\changes{1.46}{2021-09-20}{changed \cs{x} to \cs{@glo@tmp}} +% \begin{macrocode} + \edef\@glo@tmp{\endgroup + \noexpand\def\noexpand\@glsxtr@prefixedlist{\expandonce\@glsxtr@prefixedlist}% + \noexpand\def\noexpand\@gls@thislabel{\expandonce\@gls@thislabel}% + \noexpand\def\noexpand\dglsfieldactualfieldlabel + {\expandonce\dglsfieldactualfieldlabel}% + }% + \@glo@tmp } % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrMathItalicEta} -%\changes{1.27}{2018-02-26}{new} +%\begin{macro}{\@@dgls@@field} +%\changes{1.49}{2022-10-14}{new} +%\begin{definition} +%\cs{@@dgls@@field}\marg{options}\marg{label}\marg{field}\marg{cs} +%\end{definition} % \begin{macrocode} -\newcommand*{\glsxtrMathItalicEta}{% - \glshex 1D702,% lower case eta (maths italic) - \glshex 1D6E8% upper case eta (maths italic) +\newcommand*{\@@dgls@@field}[4]{% + \@glsxtr@get@prefixedlabel@field{#2}{#3}% + \ifx\@glsxtr@prefixedlist\@empty + \let\@dgls@@next#4% + \else + \let\@dgls@@next\@glsxtr@dglsnomatch + \fi + \new@ifnextchar[{\@dgls@@next{#1}{\@gls@thislabel}}% + {\@dgls@@next{#1}{\@gls@thislabel}[]}% } % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrMathItalicTheta} -%\changes{1.27}{2018-02-26}{new} +%\begin{macro}{\dglsfieldcurrentfieldlabel} +%\changes{1.49}{2022-10-14}{new} +%Set by the \cs{dglsfield} commands to the current field label. +%This is the field requested in the argument of \cs{dglsfield}. % \begin{macrocode} -\newcommand*{\glsxtrMathItalicTheta}{% - \glshex 1D703% lower case theta (maths italic) - \string=\glshex 1D717,% lower case theta variant (maths italic) - \glshex 1D6E9% upper case theta (maths italic) - \string=\glshex 1D6F3% upper case theta variant (maths italic) -} +\newcommand*{\dglsfieldcurrentfieldlabel}{} % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrMathItalicIota} -%\changes{1.27}{2018-02-26}{new} +%\begin{macro}{\dglsfieldfallbackfieldlabel} +%\changes{1.49}{2022-10-14}{new} +%The field to use if the required field isn't set. % \begin{macrocode} -\newcommand*{\glsxtrMathItalicIota}{% - \glshex 1D704,% lower case iota (maths italic) - \glshex 1D6EA% upper case iota (maths italic) -} +\newcommand*{\dglsfieldfallbackfieldlabel}{text} % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrMathItalicKappa} -%\changes{1.27}{2018-02-26}{new} +%\begin{macro}{\dglsfieldactualfieldlabel} +%\changes{1.49}{2022-10-14}{new} +%This is the field that's actually used. % \begin{macrocode} -\newcommand*{\glsxtrMathItalicKappa}{% - \glshex 1D705% lower case kappa (maths italic) - \string=\glshex 1D718,% lower case kappa variant (maths italic) - \glshex 1D6EB% upper case kappa (maths italic) -} +\newcommand*{\dglsfieldactualfieldlabel}{\dglsfieldcurrentfieldlabel} % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrMathItalicLambda} -%\changes{1.27}{2018-02-26}{new} +%\begin{macro}{\dglsfield} +%\changes{1.49}{2022-10-14}{new} +%\begin{definition} +%\cs{dglsfield}\oarg{options}\marg{label}\marg{field}\oarg{insert} +%\end{definition} % \begin{macrocode} -\newcommand*{\glsxtrMathItalicLambda}{% - \glshex 1D706,% lower case lambda (maths italic) - \glshex 1D6EC% upper case lambda (maths italic) -} +\newrobustcmd*{\dglsfield}{\@gls@hyp@opt\@dglsfield} % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrMathItalicMu} -%\changes{1.27}{2018-02-26}{new} +%\begin{macro}{\@dglsfield} +%\changes{1.49}{2022-10-14}{new} % \begin{macrocode} -\newcommand*{\glsxtrMathItalicMu}{% - \glshex 1D707,% lower case mu (maths italic) - \glshex 1D6ED% upper case mu (maths italic) -} +\newcommand*{\@dglsfield}[3][]{% + \@@dgls@@field{#1}{#2}{#3}{\@dgls@field}} % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrMathItalicNu} -%\changes{1.27}{2018-02-26}{new} +%\begin{macro}{\@dgls@field} +%\changes{1.49}{2022-10-14}{new} % \begin{macrocode} -\newcommand*{\glsxtrMathItalicNu}{% - \glshex 1D708,% lower case nu (maths italic) - \glshex 1D6EE% upper case nu (maths italic) +\def\@dgls@field#1#2[#3]{% + \@gls@field@link{#1}{#2}{\glsxtrusefield{#2}{\dglsfieldactualfieldlabel}#3}% } % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrMathItalicXi} -%\changes{1.27}{2018-02-26}{new} +%\begin{macro}{\dGlsfield} +%\changes{1.49}{2022-10-14}{new} +%\begin{definition} +%\cs{dGlsfield}\oarg{options}\marg{label}\marg{field}\oarg{insert} +%\end{definition} % \begin{macrocode} -\newcommand*{\glsxtrMathItalicXi}{% - \glshex 1D709,% lower case xi (maths italic) - \glshex 1D6EF% upper case xi (maths italic) -} +\newrobustcmd*{\dGlsfield}{\@gls@hyp@opt\@dGlsfield} +\glsmfuaddmap{\dglsfield}{\dGlsfield} % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrMathItalicOmicron} -%\changes{1.27}{2018-02-26}{new} +%\begin{macro}{\@dGlsfield} +%\changes{1.49}{2022-10-14}{new} % \begin{macrocode} -\newcommand*{\glsxtrMathItalicOmicron}{% - \glshex 1D70A,% lower case omicron (maths italic) - \glshex 1D6F0% upper case omicron (maths italic) +\newcommand*{\@dGlsfield}[3][]{% + \@@dgls@@field{#1}{#2}{#3}{\@dGls@field}% } % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrMathItalicPi} -%\changes{1.27}{2018-02-26}{new} +%\begin{macro}{\@dGls@field} +%\changes{1.49}{2022-10-14}{new} % \begin{macrocode} -\newcommand*{\glsxtrMathItalicPi}{% - \glshex 1D70B% lower case pi (maths italic) - \string=\glshex 1D71B,% lower case pi variant (maths italic) - \glshex 1D6F1% upper case pi (maths italic) +\def\@dGls@field#1#2[#3]{% + \@gls@field@link{#1}{#2}{\Glsxtrusefield{#2}{\dglsfieldactualfieldlabel}#3}% } % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrMathItalicRho} -%\changes{1.27}{2018-02-26}{new} +%\begin{macro}{\dGLSfield} +%\changes{1.49}{2022-10-14}{new} +%\begin{definition} +%\cs{dGlsfield}\oarg{options}\marg{label}\marg{field}\oarg{insert} +%\end{definition} % \begin{macrocode} -\newcommand*{\glsxtrMathItalicRho}{% - \glshex 1D70C% lower case rho (maths italic) - \string=\glshex 1D71A,% lower case rho variant (maths italic) - \glshex 1D6F2% upper case rho (maths italic) -} +\newrobustcmd*{\dGLSfield}{\@gls@hyp@opt\@dGLSfield} +\glsmfublocker{\dGLSfield} % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrMathItalicSigma} -%\changes{1.27}{2018-02-26}{new} +%\begin{macro}{\@dGLSfield} +%\changes{1.49}{2022-10-14}{new} % \begin{macrocode} -\newcommand*{\glsxtrMathItalicSigma}{% - \glshex 1D70D% lower case final sigma (maths italic) - \string=\glshex 1D70E,% lower case sigma (maths italic) - \glshex 1D6F4% upper case sigma (maths italic) +\newcommand*{\@dGLSfield}[3][]{% + \@@dgls@@field{#1}{#2}{#3}{\@dGLS@field}% } % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrMathItalicTau} -%\changes{1.27}{2018-02-26}{new} +%\begin{macro}{\@dGLS@field} +%\changes{1.49}{2022-10-14}{new} % \begin{macrocode} -\newcommand*{\glsxtrMathItalicTau}{% - \glshex 1D70F,% lower case tau (maths italic) - \glshex 1D6F5% upper case tau (maths italic) +\def\@dGLS@field#1#2[#3]{% + \@gls@field@link{#1}{#2}{\GLSxtrusefield{#2}{\dglsfieldactualfieldlabel}#3}% } % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrMathItalicUpsilon} -%\changes{1.27}{2018-02-26}{new} +%\begin{macro}{\d@inner@glsfield} +%\changes{1.49}{2022-10-14}{new} +%\begin{definition} +%\cs{d@inner@glsfield}\marg{default options}\marg{field}\meta{modifier}% +%\oarg{options}\marg{label}\oarg{insert} +%\end{definition} % \begin{macrocode} -\newcommand*{\glsxtrMathItalicUpsilon}{% - \glshex 1D710,% lower case upsilon (maths italic) - \glshex 1D6F6% upper case upsilon (maths italic) +\newrobustcmd*{\d@inner@glsfield}[2]{% + \ifstrempty{#1} + {\def\@d@inner@glsfield@opts{}}% + {\def\@d@inner@glsfield@opts{#1,}}% + \def\dglsfieldcurrentfieldlabel{#2}% + \@gls@hyp@opt\@d@inner@glsfield } % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrMathItalicPhi} -%\changes{1.27}{2018-02-26}{new} +%\begin{macro}{\@d@inner@glsfield} +%\changes{1.49}{2022-10-14}{new} % \begin{macrocode} -\newcommand*{\glsxtrMathItalicPhi}{% - \glshex 1D711% lower case phi (maths italic) - \string=\glshex 1D719,% lower case phi variant (maths italic) - \glshex 1D6F7% upper case phi (maths italic) -} +\newcommand*{\@d@inner@glsfield}[2][]{% + \expandafter\@@dgls@@field\expandafter + {\@d@inner@glsfield@opts#1}{#2}{\dglsfieldcurrentfieldlabel}{\@dgls@field}} % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrMathItalicChi} -%\changes{1.27}{2018-02-26}{new} +%\begin{macro}{\d@inner@Glsfield} +%\changes{1.49}{2022-10-14}{new} % \begin{macrocode} -\newcommand*{\glsxtrMathItalicChi}{% - \glshex 1D712,% lower case chi (maths italic) - \glshex 1D6F8% upper case chi (maths italic) +\newrobustcmd*{\d@inner@Glsfield}[2]{% + \ifstrempty{#1} + {\def\@d@inner@glsfield@opts{}}% + {\def\@d@inner@glsfield@opts{#1,}}% + \def\dglsfieldcurrentfieldlabel{#2}% + \@gls@hyp@opt\@d@inner@Glsfield } % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrMathItalicPsi} -%\changes{1.27}{2018-02-26}{new} +%\begin{macro}{\@d@inner@Glsfield} +%\changes{1.49}{2022-10-14}{new} % \begin{macrocode} -\newcommand*{\glsxtrMathItalicPsi}{% - \glshex 1D713,% lower case psi (maths italic) - \glshex 1D6F9% upper case psi (maths italic) -} +\newcommand*{\@d@inner@Glsfield}[2][]{% + \expandafter\@@dgls@@field\expandafter + {\@d@inner@glsfield@opts#1}{#2}{\dglsfieldcurrentfieldlabel}{\@dGls@field}} % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrMathItalicOmega} -%\changes{1.27}{2018-02-26}{new} +%\begin{macro}{\d@inner@GLSfield} +%\changes{1.49}{2022-10-14}{new} % \begin{macrocode} -\newcommand*{\glsxtrMathItalicOmega}{% - \glshex 1D714,% lower case omega (maths italic) - \glshex 1D6FA% upper case omega (maths italic) +\newrobustcmd*{\d@inner@GLSfield}[2]{% + \ifstrempty{#1} + {\def\@d@inner@glsfield@opts{}}% + {\def\@d@inner@glsfield@opts{#1,}}% + \def\dglsfieldcurrentfieldlabel{#2}% + \@gls@hyp@opt\@d@inner@GLSfield } % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrMathItalicPartial} -%\changes{1.27}{2018-02-26}{new} +%\begin{macro}{\@d@inner@GLSfield} +%\changes{1.49}{2022-10-14}{new} % \begin{macrocode} -\newcommand*{\glsxtrMathItalicPartial}{% - \glshex 1D715% partial differential (maths italic) -} +\newcommand*{\@d@inner@GLSfield}[2][]{% + \expandafter\@@dgls@@field\expandafter + {\@d@inner@glsfield@opts#1}{#2}{\dglsfieldcurrentfieldlabel}{\@dGLS@field}} % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrMathItalicNabla} -%\changes{1.27}{2018-02-26}{new} +%\begin{macro}{\newdglsfield} +%\changes{1.49}{2022-10-14}{new} +%\begin{definition} +%\cs{newdglsfield}\oarg{options}\marg{field}\marg{cs} +%\end{definition} % \begin{macrocode} -\newcommand*{\glsxtrMathItalicNabla}{% - \glshex 1D6FB% nabla (maths italic) +\newrobustcmd*{\newdglsfield}[3][]{% + \newrobustcmd*{#3}{\d@inner@glsfield{#1}{#2}}% } % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrdigitrules} -%\changes{1.27}{2018-02-26}{new} -%Digits from the Basic Latin set and subscript and superscript digit -%rules. +%\begin{macro}{\newdglsfieldlike} +%\changes{1.49}{2022-10-14}{new} +%\begin{definition} +%\cs{newdglsfieldlike}\oarg{options}\marg{field}\marg{cs}\marg{Cs}\marg{CS} +%\end{definition} % \begin{macrocode} -\newcommand*{\glsxtrdigitrules}{% - 0\string=\glshex 2080\string=\glshex 2070 - \string<1\string=\glshex 2081\string=\glshex 00B9 - \string<2\string=\glshex 2082\string=\glshex 00B2 - \string<3\string=\glshex 2083\string=\glshex 00B3 - \string<4\string=\glshex 2084\string=\glshex 2074 - \string<5\string=\glshex 2085\string=\glshex 2075 - \string<6\string=\glshex 2086\string=\glshex 2076 - \string<7\string=\glshex 2087\string=\glshex 2077 - \string<8\string=\glshex 2088\string=\glshex 2078 - \string<9\string=\glshex 2089\string=\glshex 2079 +\newrobustcmd*{\newdglsfieldlike}[5][]{% + \newrobustcmd*{#3}{\d@inner@glsfield{#1}{#2}}% + \newrobustcmd*{#4}{\d@inner@Glsfield{#1}{#2}}% + \newrobustcmd*{#5}{\d@inner@GLSfield{#1}{#2}}% + \glsmfuaddmap{#3}{#4}% + \glsmfublocker{#5}% } % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrBasicDigitrules} -%\changes{1.27}{2018-02-26}{new} -%Digits from the Basic Latin set. +%Multi (compound/combined) entry commands used by \app{bib2gls}. +%\begin{macro}{\glsxtrmultientryadjustedname} +%\begin{definition} +%\cs{glsxtrmultientryadjustedname}\marg{list1}\marg{name}\marg{list2}\marg{label} +%\end{definition} +%\changes{1.48}{2021-11-22}{new} +%This command is used by \app{bib2gls} when it adjusts the name +%field of an entry that's been identified as a main entry in the +%multi-entry set \meta{label}. +% +%The final argument \meta{label} is the multi-entry label from which +%the set was obtained. The first +%argument \meta{list1} is the list of other labels that come before +%the main label. The third argument \meta{list2} is the remaining +%list of other labels. The \meta{name} argument is the previous name before +%adjustment. % \begin{macrocode} -\newcommand*{\glsxtrBasicDigitrules}{% - 0\string<1\string<2\string<3\string<4% - \string<5\string<6\string<7\string<8\string<9% +\newrobustcmd*{\glsxtrmultientryadjustedname}[4]{% + \bgroup + \let\@glsxtrmultientryadjustednamesep\glsxtrmultientryadjustednamesep + \let\@glsxtrmultientryadjustednamepresep\glsxtrmultientryadjustednamepresep + \let\@glsxtrmultientryadjustednamepostsep\glsxtrmultientryadjustednamepostsep + \let\@glsxtrmultientryadjustednameother\glsxtrmultientryadjustednameother + \let\@glsxtrmultientryadjustednamefmt\glsxtrmultientryadjustednamefmt + \let\@glsxtrmultientryadjustednamefirstother\glsxtrmultientryadjustednameother + \let\@glsxtrmultientryadjustednamefirstfmt\glsxtrmultientryadjustednamefmt + \@glsxtrmultientryadjustedname{#1}{#2}{#3}{#4}% + \egroup } % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrSubScriptDigitrules} -%\changes{1.27}{2018-02-26}{new} -%Subscript digits. +%\begin{macro}{\Glsxtrmultientryadjustedname} +%\changes{1.48}{2021-11-22}{new} +%First letter upper case % \begin{macrocode} -\newcommand*{\glsxtrSubScriptDigitrules}{% - \glshex 2080% subscript 0 - \string<\glshex 2081% subscript 1 - \string<\glshex 2082% subscript 2 - \string<\glshex 2083% subscript 3 - \string<\glshex 2084% subscript 4 - \string<\glshex 2085% subscript 5 - \string<\glshex 2086% subscript 6 - \string<\glshex 2087% subscript 7 - \string<\glshex 2088% subscript 8 - \string<\glshex 2089% subscript 9 +\newrobustcmd*{\Glsxtrmultientryadjustedname}[4]{% + \bgroup + \let\@glsxtrmultientryadjustednamesep\glsxtrmultientryadjustednamesep + \let\@glsxtrmultientryadjustednamepresep\glsxtrmultientryadjustednamepresep + \let\@glsxtrmultientryadjustednamepostsep\glsxtrmultientryadjustednamepostsep + \let\@glsxtrmultientryadjustednameother\glsxtrmultientryadjustednameother + \let\@glsxtrmultientryadjustednamefmt\glsxtrmultientryadjustednamefmt + \let\@glsxtrmultientryadjustednamefirstother\Glsxtrmultientryadjustednameother + \let\@glsxtrmultientryadjustednamefirstfmt\Glsxtrmultientryadjustednamefmt + \@glsxtrmultientryadjustedname{#1}{#2}{#3}{#4}% + \egroup } +\glsmfuaddmap{\glsxtrmultientryadjustedname}{\Glsxtrmultientryadjustedname} % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrSuperScriptDigitrules} -%\changes{1.27}{2018-02-26}{new} -%Superscript digits. +%\begin{macro}{\GlsXtrmultientryadjustedname} +%\changes{1.48}{2021-11-22}{new} +%Title case % \begin{macrocode} -\newcommand*{\glsxtrSuperScriptDigitrules}{% - \glshex 2070% superscript 0 - \string<\glshex 00B9% superscript 1 - \string<\glshex 00B2% superscript 2 - \string<\glshex 00B3% superscript 3 - \string<\glshex 2074% superscript 4 - \string<\glshex 2075% superscript 5 - \string<\glshex 2076% superscript 6 - \string<\glshex 2077% superscript 7 - \string<\glshex 2078% superscript 8 - \string<\glshex 2079% superscript 9 +\newrobustcmd*{\GlsXtrmultientryadjustedname}[4]{% + \bgroup + \let\@glsxtrmultientryadjustednamesep\glsxtrmultientryadjustednamesep + \let\@glsxtrmultientryadjustednamepresep\glsxtrmultientryadjustednamepresep + \let\@glsxtrmultientryadjustednamepostsep\glsxtrmultientryadjustednamepostsep + \let\@glsxtrmultientryadjustednameother\GlsXtrmultientryadjustednameother + \let\@glsxtrmultientryadjustednamefmt\GlsXtrmultientryadjustednamefmt + \let\@glsxtrmultientryadjustednamefirstother\GlsXtrmultientryadjustednameother + \let\@glsxtrmultientryadjustednamefirstfmt\GlsXtrmultientryadjustednamefmt + \@glsxtrmultientryadjustedname{#1}{#2}{#3}{#4}% + \egroup } +\glsmfublocker{\GlsXtrmultientryadjustedname} % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrfractionrules} -%\changes{1.27}{2018-02-26}{new} -%Vulgar fractions. +%\begin{macro}{\GLSxtrmultientryadjustedname} +%\changes{1.48}{2021-11-22}{new} +%All caps. % \begin{macrocode} -\newcommand*{\glsxtrfractionrules}{% - \glshex 215F% fraction numerator one (1/) - \string<\glshex 2189% zero thirds (0/3 = 0) - \string<\glshex 2152% one tenth (1/10 = 0.1) - \string<\glshex 2151% one ninth (1/9 ~ 0.111) - \string<\glshex 215B% one eighth (1/8 = 0.125) - \string<\glshex 2150% one seventh (1/7 ~ 0.143) - \string<\glshex 2159% one sixth (1/6 ~ 0.167) - \string<\glshex 2155% one fifth (1/5 = 0.2) - \string<\glshex 00BC% one quarter (1/4 = 0.25) - \string<\glshex 2153% one third (1/3 ~ 0.333) - \string<\glshex 215C% three eighths (3/8 = 0.375) - \string<\glshex 2156% two fifths (2/5 = 0.4) - \string<\glshex 00BD% one half (1/2 = 0.5) - \string<\glshex 2157% three fifths (3/5 = 0.6) - \string<\glshex 215D% five eighths (5/8 = 0.625) - \string<\glshex 2154% two thirds (2/3 ~ 0.667) - \string<\glshex 00BE% three quarters (3/4 = 0.75) - \string<\glshex 2158% four fifths (4/5 = 0.8) - \string<\glshex 215A% five sixths (5/6 ~ 0.833) - \string<\glshex 215E% seven eighths (7/8 = 0.875) +\newrobustcmd*{\GLSxtrmultientryadjustedname}[4]{% + \bgroup + \let\@glsxtrmultientryadjustednamesep\glsxtrmultientryadjustednamesep + \let\@glsxtrmultientryadjustednamepresep\glsxtrmultientryadjustednamepresep + \let\@glsxtrmultientryadjustednamepostsep\glsxtrmultientryadjustednamepostsep + \let\@glsxtrmultientryadjustednameother\GLSxtrmultientryadjustednameother + \let\@glsxtrmultientryadjustednamefmt\GLSxtrmultientryadjustednamefmt + \let\@glsxtrmultientryadjustednamefirstother\GLSxtrmultientryadjustednameother + \let\@glsxtrmultientryadjustednamefirstfmt\GLSxtrmultientryadjustednamefmt + \@glsxtrmultientryadjustedname{#1}{#2}{#3}{#4}% + \egroup } +\glsmfublocker{\GLSxtrmultientryadjustedname} % \end{macrocode} %\end{macro} % -%\begin{macro}{\@glsxtrdialecthook} -%Check for scripts associated with the document dialects. -%\changes{1.28}{2018-03-06}{save and restore \cs{TrackLangRequireDialectPrefix}} +%\begin{macro}{\@glsxtrmultientryadjustedname} +%\changes{1.48}{2021-11-22}{new} % \begin{macrocode} -\renewcommand{\@glsxtrdialecthook}{% - \ifundef\CurrentTrackedScript +\newcommand*{\@glsxtrmultientryadjustedname}[4]{% + \letcs\mglscurrentmainlabel{@gls@combined@#4@main}% + \letcs\mglscurrentmainlist{@gls@combined@#4@list}% + \letcs\mglscurrentmainoptions{@gls@combined@#4@options}% + \ifblank{#1}% {% - \TrackLangIfHasDefaultScript{\CurrentTrackedLanguage}% - {% - \edef\CurrentTrackedScript{% - \TrackLangGetDefaultScript\CurrentTrackedLanguage}% + \@glsxtrmultientryadjustednamefirstfmt{#2}% + }% + {% + \def\@mgls@previouslabel{}% + \let\@gls@xtradjustedother\@glsxtrmultientryadjustednamefirstother + \@for\mglscurrentlabel:=#1\do{% + \ifx\@mgls@previouslabel\empty + \else + \@glsxtrmultientryadjustednamesep{\@mgls@previouslabel}{\mglscurrentlabel}% + \fi + \@gls@xtradjustedother{\mglscurrentlabel}% + \let\@mgls@previouslabel\mglscurrentlabel + \let\@gls@xtradjustedother\@glsxtrmultientryadjustednameother }% - {}% + \@glsxtrmultientryadjustednamepresep{\@mgls@previouslabel}{\mglscurrentmainlabel}% + \@glsxtrmultientryadjustednamefmt{#2}% }% + \ifblank{#3}% {}% - \ifdef\CurrentTrackedScript {% - \let\gls@orgTrackLangRequireDialectPrefix\TrackLangRequireDialectPrefix - \def\TrackLangRequireDialectPrefix{glossariesxtr-}% - \let\CurrentTrackedTag\CurrentTrackedScript - \IfFileExists{\TrackLangRequireDialectPrefix\CurrentTrackedTag.ldf} - {\RequireGlossariesExtraLang{\CurrentTrackedTag}}% - {}% - \let\TrackLangRequireDialectPrefix\gls@orgTrackLangRequireDialectPrefix + \let\@mgls@previouslabel\mglscurrentmainlabel + \let\@gls@xtrmultientryadjustednamesep\@glsxtrmultientryadjustednamepostsep + \@for\mglscurrentlabel:=#3\do{% + \@gls@xtrmultientryadjustednamesep{\@mgls@previouslabel}{\mglscurrentlabel}% + \@glsxtrmultientryadjustednameother{\mglscurrentlabel}% + \let\@mgls@previouslabel\mglscurrentlabel + \let\@gls@xtrmultientryadjustednamesep\@glsxtrmultientryadjustednamesep + }% }% - {}% } % \end{macrocode} %\end{macro} -%If \cs{glsxtr@loaddialect} has been defined, then -%\sty{glossaries-extra-bib2gls} has been loaded after -%\sty{glossaries-extra}. (For example, through -%\ics{glossariesextrasetup}.) Not recommended, but if this has been -%done try to find the associated language resources. +%\begin{macro}{\glsxtrmultientryadjustednamesep} +%\changes{1.48}{2021-11-22}{new} % \begin{macrocode} -\ifdef\glsxtr@loaddialect -{% - \@ifpackageloaded{tracklang} - {% - \AnyTrackedLanguages - {% - \ForEachTrackedDialect{\this@dialect}{\glsxtr@loaddialect}% - }% - {}% - } - {} -} -{} +\newcommand*{\glsxtrmultientryadjustednamesep}{\glscombinedfirstsepfirst} % \end{macrocode} -%\iffalse +%\end{macro} +% +%\begin{macro}{\glsxtrmultientryadjustednamepresep} +%\changes{1.48}{2021-11-22}{new} +% Separator before main name. % \begin{macrocode} -% +\newcommand*{\glsxtrmultientryadjustednamepresep}{\glsxtrmultientryadjustednamesep} % \end{macrocode} -%\fi -%\iffalse +%\end{macro} +% +%\begin{macro}{\glsxtrmultientryadjustednamepostsep} +%\changes{1.48}{2021-11-22}{new} +% Separator after main name. % \begin{macrocode} -%<*glossaries-extra-stylemods.sty> +\newcommand*{\glsxtrmultientryadjustednamepostsep}{\glsxtrmultientryadjustednamesep} % \end{macrocode} -%\fi -%\chapter{Style Adjustments (\styfmt{glossaries-extra-stylemods.sty})} -% This package adjusts the predefined styles so that they include the post -% description hook. Also, some other minor adjustments may be made -% to make existing styles more flexible. +%\end{macro} % -%\section{Package Initialisation} -% First identify package: +%\begin{macro}{\glsxtrmultientryadjustednamefmt} +%\changes{1.48}{2021-11-22}{new} % \begin{macrocode} -\NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{glossaries-extra-stylemods}[2021/11/22 v1.48 (NLCT)] +\newcommand*{\glsxtrmultientryadjustednamefmt}[1]{#1} % \end{macrocode} -% Provide package options to automatically load required predefined -% styles. The simplest method is to just test for the existence of -% the file \texttt{glossary-}\meta{option}\texttt{.sty}. Packages -% can't be loaded whilst the options are being processed, so save -% the list in \cs{@glsxtr@loadstyles}. -%\begin{macro}{\@glsxtr@loadstyles} +%\end{macro} +% +%\begin{macro}{\glsxtrmultientryadjustednameother} +%\changes{1.48}{2021-11-22}{new} % \begin{macrocode} -\newcommand*{\@glsxtr@loadstyles}{} +\newcommand*{\glsxtrmultientryadjustednameother}[1]{\glsentryname{#1}} % \end{macrocode} %\end{macro} % -%\begin{option}{all} -%\changes{1.21}{2017-11-03}{new} -%\changes{1.38}{2018-12-01}{added \styfmt{glossary-longextra}} -%\changes{1.40}{2019-03-22}{added \styfmt{glossary-topic}} -%Provide all known styles. +%\begin{macro}{\Glsxtrmultientryadjustednamefmt} +%\changes{1.48}{2021-11-22}{new} % \begin{macrocode} -\DeclareOption{all}{% - \appto\@glsxtr@loadstyles{% - \RequirePackage{glossary-inline}% - \RequirePackage{glossary-list}% - \RequirePackage{glossary-tree}% - \RequirePackage{glossary-mcols}% - \RequirePackage{glossary-long}% - \RequirePackage{glossary-longragged}% - \RequirePackage{glossary-longbooktabs}% - \RequirePackage{glossary-super}% - \RequirePackage{glossary-superragged}% - \RequirePackage{glossary-bookindex}% - \RequirePackage{glossary-longextra}% - \RequirePackage{glossary-topic}% - } -} +\newcommand*{\Glsxtrmultientryadjustednamefmt}[1]{\glssentencecase{#1}} % \end{macrocode} -%\end{option} +%\end{macro} % +%\begin{macro}{\Glsxtrmultientryadjustednameother} +%\changes{1.48}{2021-11-22}{new} % \begin{macrocode} -\DeclareOption*{% - \IfFileExists{glossary-\CurrentOption.sty} - {\eappto\@glsxtr@loadstyles{% - \noexpand\RequirePackage{glossary-\CurrentOption}}% - }% - {% - \PackageError{glossaries-extra-styles}% - {Unknown option `\CurrentOption'}{}% - }% -} +\newcommand*{\Glsxtrmultientryadjustednameother}[1]{\Glsentryname{#1}} % \end{macrocode} -% Process the package options: +%\end{macro} +% +%\begin{macro}{\GlsXtrmultientryadjustednameother} +%\changes{1.48}{2021-11-22}{new} % \begin{macrocode} -\ProcessOptions +\newcommand*{\GlsXtrmultientryadjustednameother}[1]{% + \glsentrytitlecase{#1}{name}} % \end{macrocode} +%\end{macro} % -% Load the required packages: +%\begin{macro}{\GlsXtrmultientryadjustednamefmt} +%\changes{1.48}{2021-11-22}{new} % \begin{macrocode} -\@glsxtr@loadstyles -% \end{macrocode} -% Adjust the styles so that they all have the post description hook. -% Also, instead of having a hard-coded \cs{space} before the -% location, use: -%\begin{macro}{\glsxtrprelocation} -%\changes{1.21}{2017-11-03}{new} -%This uses \cs{providecommand} as the same command is also -%provided by \sty{glossary-bookindex}. +\ifdef\glscapitalisewords +{% + \newcommand*{\GlsXtrmultientryadjustednamefmt}[1]{\glscapitalisewords{#1}} +} +{ + \newcommand*{\GlsXtrmultientryadjustednamefmt}[1]{\capitalisewords{#1}} +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GLSxtrmultientryadjustednameother} +%\changes{1.48}{2021-11-22}{new} % \begin{macrocode} -\providecommand*{\glsxtrprelocation}{\space} +\newcommand*{\GLSxtrmultientryadjustednameother}[1]{% + \glsuppercase{\glsentryname{#1}}} % \end{macrocode} %\end{macro} % -%In case we have an old version of \sty{glossaries}: -%\begin{macro}{\renewglossarystyle} +%\begin{macro}{\GLSxtrmultientryadjustednamefmt} +%\changes{1.48}{2021-11-22}{new} % \begin{macrocode} -\providecommand{\renewglossarystyle}[2]{% - \ifcsundef{@glsstyle@#1}% - {% - \PackageError{glossaries-extra}{Glossary style `#1' isn't already defined}{}% - }% - {% - \csdef{@glsstyle@#1}{#2}% - }% -} +\newcommand*{\GLSxtrmultientryadjustednamefmt}[1]{\glsuppercase{#1}} % \end{macrocode} %\end{macro} % -%\section{List-Like Styles} -% The list-like styles mostly already use the post description hook. -% Only the \glostyle{listdotted} style need modifying to add this. +%Provide missing Greek letters for use in maths mode. +%These commands are recognised by \app{bib2gls} and will be mapped to the +%Mathematical Greek Italic letters. This ensures that the Greek +%letters that have the same shape as Latin letters are kept +%with the other mathematical Greek letters for sorting purposes. +%The \LaTeX\ version of these commands (provided here) use an upright font +%for capitals and italic for lower case to provide a better match +%with the other Greek symbols provided by the kernel. +% +%\begin{macro}{\Alpha} +%\changes{1.27}{2018-02-26}{new} % \begin{macrocode} -\ifdef{\@glsstyle@listdotted} -{% - \renewglossarystyle{listdotted}{% - \setglossarystyle{list}% - \renewcommand*{\glossentry}[2]{% - \item[]\makebox[\glslistdottedwidth][l]{% - \glsentryitem{##1}% - \glstarget{##1}{\glossentryname{##1}}% - \unskip\leaders\hbox to 2.9mm{\hss.}\hfill\strut}% - \glossentrydesc{##1}\glspostdescription}% - \renewcommand*{\subglossentry}[3]{% - \item[]\makebox[\glslistdottedwidth][l]{% - \glssubentryitem{##2}% - \glstarget{##2}{\glossentryname{##2}}% - \unskip\leaders\hbox to 2.9mm{\hss.}\hfill\strut}% - \glossentrydesc{##2}\glspostdescription}% - } -} -{% +\providecommand*{\Alpha}{\mathrm{A}} % \end{macrocode} -% Assume the style isn't required if it hasn't already been defined. +%\end{macro} +% +%\begin{macro}{\Beta} +%\changes{1.27}{2018-02-26}{new} % \begin{macrocode} -} +\providecommand*{\Beta}{\mathrm{B}} % \end{macrocode} -% The \glostyle{sublistdotted} style doesn't display the description -% for top-level entries. Sub-level entries use the -% \glostyle{listdottedstyle}. +%\end{macro} % -%The other list styles would be easier to adapt if the space -%before the number list wasn't hard coded. -%\changes{1.21}{2017-11-03}{modified list to remove hard coded \cs{space}} +%\begin{macro}{\Epsilon} +%\changes{1.27}{2018-02-26}{new} % \begin{macrocode} -\ifdef{\@glsstyle@list} -{% +\providecommand*{\Epsilon}{\mathrm{E}} % \end{macrocode} -%\begin{macro}{\glslistprelocation} -%\changes{1.21}{2017-11-03}{new} -%Space before number list for top-level entries. +%\end{macro} +% +%\begin{macro}{\Zeta} +%\changes{1.27}{2018-02-26}{new} % \begin{macrocode} - \newcommand{\glslistprelocation}{\glsxtrprelocation} +\providecommand*{\Zeta}{\mathrm{Z}} % \end{macrocode} %\end{macro} -%\begin{macro}{\glslistchildprelocation} -%\changes{1.21}{2017-11-03}{new} -%Space before number list for child entries. +% +%\begin{macro}{\Eta} +%\changes{1.27}{2018-02-26}{new} % \begin{macrocode} - \newcommand{\glslistchildprelocation}{\glslistprelocation} +\providecommand*{\Eta}{\mathrm{H}} % \end{macrocode} %\end{macro} -%\begin{macro}{\glslistchildpostlocation} -%\changes{1.21}{2017-11-03}{new} -%Full stop after number list. +% +%\begin{macro}{\Iota} +%\changes{1.27}{2018-02-26}{new} % \begin{macrocode} - \newcommand{\glslistchildpostlocation}{.} +\providecommand*{\Iota}{\mathrm{I}} % \end{macrocode} %\end{macro} -%\begin{macro}{\glslistdesc} -%\changes{1.31}{2018-05-09}{new} +% +%\begin{macro}{\Kappa} +%\changes{1.27}{2018-02-26}{new} % \begin{macrocode} - \newcommand{\glslistdesc}[1]{\glossentrydesc{#1}\glspostdescription} +\providecommand*{\Kappa}{\mathrm{K}} % \end{macrocode} %\end{macro} -%\begin{macro}{\glslistgroupskip} -%\changes{1.41}{2019-04-09}{new} +% +%\begin{macro}{\Mu} +%\changes{1.27}{2018-02-26}{new} % \begin{macrocode} - \newcommand{\glslistgroupskip}{\nobreak\indexspace\nobreak} +\providecommand*{\Mu}{\mathrm{M}} % \end{macrocode} %\end{macro} -%\begin{macro}{\glslistitem} -%\changes{1.47}{2021-11-04}{new} +% +%\begin{macro}{\Nu} +%\changes{1.27}{2018-02-26}{new} % \begin{macrocode} - \newcommand{\glslistitem}[1]{% - \item[\glsentryitem{#1}% - \glstarget{#1}{\glossentryname{#1}}]% - } +\providecommand*{\Nu}{\mathrm{N}} % \end{macrocode} %\end{macro} -%\begin{macro}{\glslistinit} -%\changes{1.47}{2021-11-04}{new} -%This command was only added to \sty{glossary-list} v4.48 so provide -%it if it hasn't been defined: +% +%\begin{macro}{\Omicron} +%\changes{1.27}{2018-02-26}{new} % \begin{macrocode} - \providecommand{\glslistinit}{% - \ifdef\GetTitleStringDisableCommands - {% - \GetTitleStringSetup{expand}% - \GetTitleStringDisableCommands{% - \let\glsentryitem\@gobble - \let\glstarget\@secondoftwo - \let\glossentryname\glslistexpandedname - \let\glslistgroupheaderfmt\@firstofone - \let\glsgetgrouptitle\@firstofone +\providecommand*{\Omicron}{\mathrm{O}} % \end{macrocode} -%Technically this has an optional argument but it's not used in the -%list styles. +%\end{macro} +% +%\begin{macro}{\Rho} +%\changes{1.27}{2018-02-26}{new} % \begin{macrocode} - \let\glsnavhypertarget\@secondoftwo - \let\glsnavigation\relax - }% - }% - {}% - } +\providecommand*{\Rho}{\mathrm{P}} % \end{macrocode} %\end{macro} -%\begin{macro}{\glslistexpandedname} -%\changes{1.47}{2021-11-04}{new} -%This command was only added to \sty{glossary-list} v4.48 so provide -%it if it hasn't been defined. The original definition uses -%\cs{glsunexpandedfieldvalue} which -%was added to \sty{glossaries} v4.48 (so if \cs{glslistexpandedname} -%hasn't been defined then neither will \cs{glsunexpandedfieldvalue}). +% +%\begin{macro}{\Tau} +%\changes{1.27}{2018-02-26}{new} % \begin{macrocode} - \providecommand{\glslistexpandedname}[1]{% - \ifcsname glo@\glsdetoklabel{#1}@name\endcsname - \expandafter\expandonce\csname glo@\glsdetoklabel{#1}@name\expandafter\endcsname - \fi - } +\providecommand*{\Tau}{\mathrm{T}} % \end{macrocode} %\end{macro} -%Redefine \glostyle{list} to use these commands. +% +%\begin{macro}{\Chi} +%\changes{1.27}{2018-02-26}{new} % \begin{macrocode} - \renewglossarystyle{list}{% - \renewenvironment{theglossary}% - {\glslistinit\begin{description}}{\end{description}}% - \renewcommand*{\glossaryheader}{}% - \renewcommand*{\glsgroupheading}[1]{}% - \renewcommand*{\glossentry}[2]{% - \glslistitem{##1}\glslistdesc{##1}\glslistprelocation ##2}% - \renewcommand*{\subglossentry}[3]{% - \glssubentryitem{##2}% - \glstarget{##2}{\strut}\space - \glslistdesc{##2}% - \glslistchildprelocation ##3\glslistchildpostlocation}% - \renewcommand*{\glsgroupskip}{\ifglsnogroupskip\else\glslistgroupskip\fi}% - } -} -{} +\providecommand*{\Chi}{\mathrm{X}} % \end{macrocode} -%Similarly for \glostyle{altlist}. Since it requires \glostyle{list}, -%the new commands should have been defined above. +%\end{macro} +% +%\begin{macro}{\Digamma} +%\changes{1.27}{2018-02-26}{new} % \begin{macrocode} -\ifdef{\@glsstyle@altlist} -{% +\providecommand*{\Digamma}{\mathrm{F}} % \end{macrocode} -%\begin{macro}{\glsaltlistitem} -%\changes{1.47}{2021-11-04}{new} +%\end{macro} +% +%\begin{macro}{\omicron} +%\changes{1.27}{2018-02-26}{new} % \begin{macrocode} - \newcommand{\glsaltlistitem}[1]{% - \glslistitem{#1}% - \mbox{}\par\nobreak\@afterheading - } +\providecommand*{\omicron}{\mathit{o}} % \end{macrocode} %\end{macro} +% +%Provide corresponding upright characters if \sty{upgreek} has been +%loaded. (The upper case characters are the same as above.) % \begin{macrocode} - \renewglossarystyle{altlist}{% - \setglossarystyle{list}% - \renewcommand*{\glossentry}[2]{% - \glsaltlistitem{##1}% - \glslistdesc{##1}\glslistprelocation ##2}% - \renewcommand{\subglossentry}[3]{% - \par - \glssubentryitem{##2}% - \glstarget{##2}{\strut}\glslistdesc{##2}% - \glslistchildprelocation ##3}% - } -} -{} +\@ifpackageloaded{upgreek}% +{ % \end{macrocode} -%Redefine \glostyle{listgroup} so that it discourages a break -%after group headings. -%\changes{1.21}{2017-11-03}{redefined \texttt{listgroup} to discourage -%breaks after group headings} +%\begin{macro}{\Upalpha} +%\changes{1.27}{2018-02-26}{new} % \begin{macrocode} -\ifdef{\@glsstyle@listgroup} -{% + \providecommand*{\Upalpha}{\mathrm{A}} % \end{macrocode} -%\begin{macro}{\glslistgroupafterheader} -%\changes{1.47}{2021-11-04}{new} +%\end{macro} +% +%\begin{macro}{\Upbeta} +%\changes{1.27}{2018-02-26}{new} % \begin{macrocode} - \newcommand{\glslistgroupheaderitem}[2]{\item[{#2}]} - \newcommand{\glslistgroupafterheader}{% - \mbox{}\par\nobreak\@afterheading - } + \providecommand*{\Upbeta}{\mathrm{B}} % \end{macrocode} %\end{macro} +% +%\begin{macro}{\Upepsilon} +%\changes{1.27}{2018-02-26}{new} % \begin{macrocode} - \renewglossarystyle{listgroup}{% - \setglossarystyle{list}% - \renewcommand*{\glsgroupheading}[1]{% - \glslistgroupheaderitem{##1}{\glslistgroupheaderfmt{\glsgetgrouptitle{##1}}}% - \glslistgroupafterheader - }% - } -} -{} + \providecommand*{\Upepsilon}{\mathrm{E}} % \end{macrocode} -%Similarly for \glostyle{listhypergroup}. -%\changes{1.21}{2017-11-03}{redefined \texttt{listhypergroup} to discourage -%breaks after group headings} +%\end{macro} +% +%\begin{macro}{\Upzeta} +%\changes{1.27}{2018-02-26}{new} % \begin{macrocode} -\ifdef{\@glsstyle@listhypergroup} -{% - \renewglossarystyle{listhypergroup}{% - \setglossarystyle{list}% - \renewcommand*{\glossaryheader}{% - \glslistnavigationitem{\glsnavigation}}% - \renewcommand*{\glsgroupheading}[1]{% - \glslistgroupheaderitem{##1}{\glslistgroupheaderfmt - {\glsnavhypertarget{##1}{\glsgetgrouptitle{##1}}}}% - \glslistgroupafterheader - }% - } -} -{} + \providecommand*{\Upzeta}{\mathrm{Z}} % \end{macrocode} -%Similarly for \glostyle{altlistgroup}. -%\changes{1.21}{2017-11-03}{redefined \texttt{altlistgroup} to discourage -%breaks after group headings} +%\end{macro} +% +%\begin{macro}{\Upeta} +%\changes{1.27}{2018-02-26}{new} % \begin{macrocode} -\ifdef{\@glsstyle@altlistgroup} -{% - \renewglossarystyle{altlistgroup}{% - \setglossarystyle{altlist}% - \renewcommand*{\glsgroupheading}[1]{% - \glslistgroupheaderitem{##1}% - {\glslistgroupheaderfmt{\glsgetgrouptitle{##1}}}% - \glslistgroupafterheader - }% - } -} -{} + \providecommand*{\Upeta}{\mathrm{H}} % \end{macrocode} -%Similarly for \glostyle{altlisthypergroup}. -%\changes{1.21}{2017-11-03}{redefined \texttt{altlisthypergroup} to discourage -%breaks after group headings} +%\end{macro} +% +%\begin{macro}{\Upiota} +%\changes{1.27}{2018-02-26}{new} % \begin{macrocode} -\ifdef{\@glsstyle@altlisthypergroup} -{% - \renewglossarystyle{altlisthypergroup}{% - \setglossarystyle{altlist}% - \renewcommand*{\glossaryheader}{% - \glslistnavigationitem{\glsnavigation}}% - \renewcommand*{\glsgroupheading}[1]{% - \glslistgroupheaderitem{##1}{\glslistgroupheaderfmt - {\glsnavhypertarget{##1}{\glsgetgrouptitle{##1}}}}% - \glslistgroupafterheader - }% - } -} -{} + \providecommand*{\Upiota}{\mathrm{I}} % \end{macrocode} +%\end{macro} % -%\section{Longtable Styles} -% The three and four column styles require adjustment to add the -% post-description hook. The two column styles need the hard-coded -% \cs{space} changed to \cs{glsxtrprelocation}. +%\begin{macro}{\Upkappa} +%\changes{1.27}{2018-02-26}{new} % \begin{macrocode} -\ifcsdef{@glsstyle@long} -{% - \renewglossarystyle{long}{% - \renewenvironment{theglossary}% - {\begin{longtable}{lp{\glsdescwidth}}}% - {\end{longtable}}% - \renewcommand*{\glossaryheader}{}% - \renewcommand*{\glsgroupheading}[1]{}% - \renewcommand{\glossentry}[2]{% - \glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}} & - \glossentrydesc{##1}\glspostdescription - \glsxtrprelocation ##2\tabularnewline - }% - \renewcommand{\subglossentry}[3]{% - & - \glssubentryitem{##2}% - \glstarget{##2}{\strut}\glossentrydesc{##2}\glspostdescription - \glsxtrprelocation ##3\tabularnewline - }% - \ifglsnogroupskip - \renewcommand*{\glsgroupskip}{}% - \else - \renewcommand*{\glsgroupskip}{ & \tabularnewline}% - \fi - } -} -{} + \providecommand*{\Upkappa}{\mathrm{K}} % \end{macrocode} -%Three column style: +%\end{macro} +% +%\begin{macro}{\Upmu} +%\changes{1.27}{2018-02-26}{new} % \begin{macrocode} -\ifcsdef{@glsstyle@long3col} -{% - \renewglossarystyle{long3col}{% - \renewenvironment{theglossary}% - {\begin{longtable}{lp{\glsdescwidth}p{\glspagelistwidth}}}% - {\end{longtable}}% - \renewcommand*{\glossaryheader}{}% - \renewcommand*{\glsgroupheading}[1]{}% - \renewcommand{\glossentry}[2]{% - \glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}} & - \glossentrydesc{##1}\glspostdescription & ##2\tabularnewline - }% - \renewcommand{\subglossentry}[3]{% - & - \glssubentryitem{##2}% - \glstarget{##2}{\strut}\glossentrydesc{##2}\glspostdescription & - ##3\tabularnewline - }% + \providecommand*{\Upmu}{\mathrm{M}} % \end{macrocode} -%Conditional needs to be outside of \cs{glsgroupskip} otherwise it -%can cause \qt{Incomplete \cs{iftrue}} errors. -%\changes{1.21}{2017-11-03}{moved conditional outside of \cs{glsgroupskip}} +%\end{macro} +% +%\begin{macro}{\Upnu} +%\changes{1.27}{2018-02-26}{new} % \begin{macrocode} - \ifglsnogroupskip - \renewcommand*{\glsgroupskip}{}% - \else - \renewcommand*{\glsgroupskip}{& &\tabularnewline}% - \fi - } -} -{} + \providecommand*{\Upnu}{\mathrm{N}} % \end{macrocode} -% Four column style: +%\end{macro} +% +%\begin{macro}{\Upomicron} +%\changes{1.27}{2018-02-26}{new} % \begin{macrocode} -\ifcsdef{@glsstyle@long4col} -{% - \renewglossarystyle{long4col}{% - \renewenvironment{theglossary}% - {\begin{longtable}{llll}}% - {\end{longtable}}% - \renewcommand*{\glossaryheader}{}% - \renewcommand*{\glsgroupheading}[1]{}% - \renewcommand{\glossentry}[2]{% - \glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}} & - \glossentrydesc{##1}\glspostdescription & - \glossentrysymbol{##1} & - ##2\tabularnewline - }% - \renewcommand{\subglossentry}[3]{% - & - \glssubentryitem{##2}% - \glstarget{##2}{\strut}\glossentrydesc{##2}\glspostdescription & - \glossentrysymbol{##2} & ##3\tabularnewline - }% + \providecommand*{\Upomicron}{\mathrm{O}} % \end{macrocode} -%\changes{1.21}{2017-11-03}{moved conditional outside of \cs{glsgroupskip}} +%\end{macro} +% +%\begin{macro}{\Uprho} +%\changes{1.27}{2018-02-26}{new} % \begin{macrocode} - \ifglsnogroupskip - \renewcommand*{\glsgroupskip}{}% - \else - \renewcommand*{\glsgroupskip}{& & &\tabularnewline}% - \fi - } -} -{} + \providecommand*{\Uprho}{\mathrm{P}} % \end{macrocode} +%\end{macro} % -%The styles in \sty{glossary-longbooktabs} are all based on the -%styles in \sty{glossary-long}, so no adjustments are needed for -%that package. +%\begin{macro}{\Uptau} +%\changes{1.27}{2018-02-26}{new} +% \begin{macrocode} + \providecommand*{\Uptau}{\mathrm{T}} +% \end{macrocode} +%\end{macro} % -%\section{Long Ragged Styles} -% The three and four column styles require adjustment for the -% post-description hook, but not the two column styles. However, the -% two-column styles need to have \cs{space} replaced with -% \cs{glsxtrprelocation}. +%\begin{macro}{\Upchi} +%\changes{1.27}{2018-02-26}{new} % \begin{macrocode} -\ifcsdef{@glsstyle@longragged} -{% - \renewglossarystyle{longragged}{% - \renewenvironment{theglossary}% - {\begin{longtable}{l>{\raggedright}p{\glsdescwidth}}}% - {\end{longtable}}% - \renewcommand*{\glossaryheader}{}% - \renewcommand*{\glsgroupheading}[1]{}% - \renewcommand{\glossentry}[2]{% - \glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}} & - \glossentrydesc{##1}\glspostdescription\glsxtrprelocation ##2% - \tabularnewline - }% - \renewcommand{\subglossentry}[3]{% - & - \glssubentryitem{##2}% - \glstarget{##2}{\strut}\glossentrydesc{##2}% - \glspostdescription\glsxtrprelocation ##3% - \tabularnewline - }% - \ifglsnogroupskip - \renewcommand*{\glsgroupskip}{}% - \else - \renewcommand*{\glsgroupskip}{ & \tabularnewline}% - \fi - } -} -{} + \providecommand*{\Upchi}{\mathrm{X}} % \end{macrocode} -%Three and four column styles don't use \cs{glsxtrprelocation} since the number -%list is in its own column. +%\end{macro} +% +%\begin{macro}{\upomicron} +%\changes{1.27}{2018-02-26}{new} % \begin{macrocode} -\ifcsdef{@glsstyle@longragged3col} -{% - \renewglossarystyle{longragged3col}{% - \renewenvironment{theglossary}% - {\begin{longtable}{l>{\raggedright}p{\glsdescwidth}% - >{\raggedright}p{\glspagelistwidth}}}% - {\end{longtable}}% - \renewcommand*{\glossaryheader}{}% - \renewcommand*{\glsgroupheading}[1]{}% - \renewcommand{\glossentry}[2]{% - \glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}} & - \glossentrydesc{##1}\glspostdescription & ##2\tabularnewline - }% - \renewcommand{\subglossentry}[3]{% - & - \glssubentryitem{##2}% - \glstarget{##2}{\strut}\glossentrydesc{##2}\glspostdescription & - ##3\tabularnewline - }% -% \end{macrocode} -%\changes{1.21}{2017-11-03}{moved conditional outside of \cs{glsgroupskip}} -% \begin{macrocode} - \ifglsnogroupskip - \renewcommand*{\glsgroupskip}{}% - \else - \renewcommand*{\glsgroupskip}{& &\tabularnewline}% - \fi - } -} -{} + \providecommand*{\upomicron}{\mathrm{o}} % \end{macrocode} -% Four column style: +%\end{macro} +% % \begin{macrocode} -\ifcsdef{@glsstyle@altlongragged4col} -{% - \renewglossarystyle{altlongragged4col}{% - \renewenvironment{theglossary}% - {\begin{longtable}{l>{\raggedright}p{\glsdescwidth}l% - >{\raggedright}p{\glspagelistwidth}}}% - {\end{longtable}}% - \renewcommand*{\glossaryheader}{}% - \renewcommand*{\glsgroupheading}[1]{}% - \renewcommand{\glossentry}[2]{% - \glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}} & - \glossentrydesc{##1}\glspostdescription & \glossentrysymbol{##1} & - ##2\tabularnewline - }% - \renewcommand{\subglossentry}[3]{% - & - \glssubentryitem{##2}% - \glstarget{##2}{\strut}\glossentrydesc{##2}\glspostdescription & - \glossentrysymbol{##2} & ##3\tabularnewline - }% +}% +{}% upgreek.sty not loaded % \end{macrocode} -%\changes{1.21}{2017-11-03}{moved conditional outside of \cs{glsgroupskip}} +% +%This package provides some basic rules, but it's not intended for +%complete coverage of all locales. The CLDR should provide the +%appropriate locale-sensitive rules. These macros are primarily to +%help construct custom rules to include, for example, Greek maths symbols +%mixed with Latin. For the full rule syntax, see the Java API for +%\href{https://docs.oracle.com/javase/8/docs/api/java/text/RuleBasedCollator.html}{RuleBaseCollator} +% +%If you want to provide a rule-block for a particular locale to +%allow for customization within that locale, create a file called +%\texttt{glossariesxtr-\meta{tag}.ldf} (where \meta{tag} identifies +%the locale) and add similar commands. See the description +%of \cs{IfTrackedLanguageFileExists} in the \sty{tracklang} manual +%for the allowed forms of \meta{tag}. The simplest is to just use +%the root language label or ISO code. The file will then be automatically loaded +%by \sty{glossaries-extra} if the document has support for that +%language. +% +%When combining these blocks of rules, remember to separate them +%with the appropriate character. For example: +%\begin{verbatim} +%sort-rule={\glsxtrcontrolrules +% ;\glsxtrspacerules +% ;\glsxtrnonprintablerules +% ;\glsxtrcombiningdiacriticrules +% ;\glsxtrhyphenrules +% <\glsxtrgeneralpuncrules +% <\glsxtrdigitrules +% <\glsxtrfractionrules +% <\glsxtrGeneralLatinIVrules +% <\glsxtrMathItalicGreekIrules +%} +%\end{verbatim} +% +%\begin{macro}{\glsxtrIgnorableRules} +%\changes{1.49}{2022-10-14}{new} +%A shortcut command for common ignorable characters. % \begin{macrocode} - \ifglsnogroupskip - \renewcommand*{\glsgroupskip}{}% - \else - \renewcommand*{\glsgroupskip}{& & &\tabularnewline}% - \fi - } +\newcommand{\glsxtrIgnorableRules}{% + \glsxtrcontrolrules + \string;\glsxtrspacerules + \string;\glsxtrnonprintablerules } -{} % \end{macrocode} +%\end{macro} % -%\section{Supertabular Styles} -% The three and four column styles require adjustment to add the -% post-description hook. The two column styles need the hard-coded -% \cs{space} changed to \cs{glsxtrprelocation}. +%\begin{macro}{\glsxtrGeneralInitRules} +%\changes{1.49}{2022-10-14}{new} +%A shortcut command for common initial rules for ignorables, +%diacritics, punctuation and digits. % \begin{macrocode} -\ifcsdef{@glsstyle@super} -{% - \renewglossarystyle{super}{% - \renewenvironment{theglossary}% - {\tablehead{}\tabletail{}% - \begin{supertabular}{lp{\glsdescwidth}}}% - {\end{supertabular}}% - \renewcommand*{\glossaryheader}{}% - \renewcommand*{\glsgroupheading}[1]{}% - \renewcommand{\glossentry}[2]{% - \glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}} & - \glossentrydesc{##1}\glspostdescription - \glsxtrprelocation ##2\tabularnewline - }% - \renewcommand{\subglossentry}[3]{% - & - \glssubentryitem{##2}% - \glstarget{##2}{\strut}\glossentrydesc{##2}\glspostdescription - \glsxtrprelocation ##3\tabularnewline - }% - \ifglsnogroupskip - \renewcommand*{\glsgroupskip}{}% - \else - \renewcommand*{\glsgroupskip}{& \tabularnewline}% - \fi - } +\newcommand{\glsxtrGeneralInitRules}{% + \glsxtrIgnorableRules + \string;\glsxtrcombiningdiacriticrules + \string;\glsxtrhyphenrules + \string<\glsxtrgeneralpuncrules + \string<\glsxtrdigitrules + \string<\glsxtrfractionrules } -{} % \end{macrocode} -%Three column style: +%\end{macro} +% +%\begin{macro}{\glsxtrcontrolrules} +%\changes{1.27}{2018-02-26}{new} +%These are control characters that are usually placed at the start +%of a rule in the `ignored characters' section. These control +%characters are unlikely to appear in any entry fields but are +%provided for completeness. +%\cs{string} is used for punctuation characters in case they've been +%made active. % \begin{macrocode} -\ifcsdef{@glsstyle@super3col} -{% - \renewglossarystyle{super3col}{% - \renewenvironment{theglossary}% - {\tablehead{}\tabletail{}% - \begin{supertabular}{lp{\glsdescwidth}p{\glspagelistwidth}}}% - {\end{supertabular}}% - \renewcommand*{\glossaryheader}{}% - \renewcommand*{\glsgroupheading}[1]{}% - \renewcommand{\glossentry}[2]{% - \glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}} & - \glossentrydesc{##1}\glspostdescription & ##2\tabularnewline - }% - \renewcommand{\subglossentry}[3]{% - & - \glssubentryitem{##2}% - \glstarget{##2}{\strut}\glossentrydesc{##2}\glspostdescription & - ##3\tabularnewline - }% +\newcommand*{\glsxtrcontrolrules}{% + \string'\glshex 200B\string'\string=\glshex 200C\string=\glshex 200D + \string=\glshex 200E\string=\glshex 200F\string=\glshex 0000\string=\glshex 0001 + \string=\glshex 0002\string=\glshex 0003\string=\glshex 0004\string=\glshex 0005 + \string=\glshex 0006\string=\glshex 0007\string=\glshex 0008 + \string=\string'\glshex 0009\string'\string=\string'\glshex 000B\string' + \string=\glshex 000E\string=\glshex 000F\string=\string'\glshex +0010\string'\string=\glshex 0011 + \string=\glshex 0012\string=\glshex 0013\string=\glshex 0014\string=\glshex 0015 + \string=\glshex 0016\string=\glshex 0017\string=\glshex 0018\string=\glshex 0019 + \string=\glshex 001A\string=\glshex 001B\string=\glshex 001C\string=\glshex 001D + \string=\glshex 001E\string=\glshex 001F\string=\glshex 007F\string=\glshex 0080 + \string=\glshex 0081\string=\glshex 0082\string=\glshex 0083\string=\glshex 0084 + \string=\glshex 0085\string=\glshex 0086\string=\glshex 0087\string=\glshex 0088 + \string=\glshex 0089\string=\glshex 008A\string=\glshex 008B\string=\glshex 008C + \string=\glshex 008D\string=\glshex 008E\string=\glshex 008F\string=\glshex 0090 + \string=\glshex 0091\string=\glshex 0092\string=\glshex 0093\string=\glshex 0094 + \string=\glshex 0095\string=\glshex 0096\string=\glshex 0097\string=\glshex 0098 + \string=\glshex 0099\string=\glshex 009A\string=\glshex 009B\string=\glshex 009C + \string=\glshex 009D\string=\glshex 009E\string=\glshex 009F +} % \end{macrocode} -%\changes{1.21}{2017-11-03}{moved conditional outside of \cs{glsgroupskip}} +%\end{macro} +% +%\begin{macro}{\glsxtrspacerules} +%\changes{1.27}{2018-02-26}{new} +%These are space characters. % \begin{macrocode} - \ifglsnogroupskip - \renewcommand*{\glsgroupskip}{}% - \else - \renewcommand*{\glsgroupskip}{ & &\tabularnewline}% - \fi - } +\newcommand*{\glsxtrspacerules}{% + \string' \string'\string; + \string'\glshex 00A0\string'\string; + \string'\glshex 2000\string'\string; + \string'\glshex 2001\string'\string; + \string'\glshex 2002\string'\string; + \string'\glshex 2003\string'\string; + \string'\glshex 2004\string'\string; + \string'\glshex 2005\string'\string; + \string'\glshex 2006\string'\string; + \string'\glshex 2007\string'\string; + \string'\glshex 2008\string'\string; + \string'\glshex 2009\string'\string; + \string'\glshex 200A\string'\string; + \string'\glshex 3000\string' } -{} % \end{macrocode} -% Four column styles: +%\end{macro} +% +%\begin{macro}{\glsxtrnonprintablerules} +%\changes{1.27}{2018-02-26}{new} +%These are non-printable characters (BOM, tabs, line feed and carriage +%return). % \begin{macrocode} -\ifcsdef{@glsstyle@super4col} -{% - \renewglossarystyle{super4col}{% - \renewenvironment{theglossary}% - {\tablehead{}\tabletail{}% - \begin{supertabular}{llll}}{% - \end{supertabular}}% - \renewcommand*{\glossaryheader}{}% - \renewcommand*{\glsgroupheading}[1]{}% - \renewcommand{\glossentry}[2]{% - \glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}} & - \glossentrydesc{##1}\glspostdescription & - \glossentrysymbol{##1} & ##2\tabularnewline - }% - \renewcommand{\subglossentry}[3]{% - & - \glssubentryitem{##2}% - \glstarget{##2}{\strut}\glossentrydesc{##2}\glspostdescription & - \glossentrysymbol{##2} & ##3\tabularnewline - }% +\newcommand*{\glsxtrnonprintablerules}{% + \string'\glshex FEFF\string'\string; + \string'\glshex 000A\string'\string; + \string'\glshex 0009\string'\string; + \string'\glshex 000C\string'\string; + \string'\glshex 000B\string' +} % \end{macrocode} -%\changes{1.21}{2017-11-03}{moved conditional outside of \cs{glsgroupskip}} +%\end{macro} + +%\begin{macro}{\glsxtrcombiningdiacriticrules} +%\changes{1.27}{2018-02-26}{new} +%Combining diacritic marks. This is split into multiple macros. % \begin{macrocode} - \ifglsnogroupskip - \renewcommand*{\glsgroupskip}{}% - \else - \renewcommand*{\glsgroupskip}{& & &\tabularnewline}% - \fi - } +\newcommand*{\glsxtrcombiningdiacriticrules}{% + \glsxtrcombiningdiacriticIrules\string; + \glsxtrcombiningdiacriticIIrules\string; + \glsxtrcombiningdiacriticIIIrules\string; + \glsxtrcombiningdiacriticIVrules } -{} % \end{macrocode} +%\end{macro} % -%\section{Super Ragged Styles} -% The three and four column styles require adjustment for the -% post-description hook, but not the two column styles. However, the -% two-column styles need to have \cs{space} replaced with -% \cs{glsxtrprelocation}. +%\begin{macro}{\glsxtrcombiningdiacriticIrules} +%\changes{1.27}{2018-02-26}{new} +%First set of combining diacritic marks. % \begin{macrocode} -\ifcsdef{@glsstyle@superragged} -{% - \renewglossarystyle{superragged}{% - \renewenvironment{theglossary}% - {\tablehead{}\tabletail{}% - \begin{supertabular}{l>{\raggedright}p{\glsdescwidth}}}% - {\end{supertabular}}% - \renewcommand*{\glossaryheader}{}% - \renewcommand*{\glsgroupheading}[1]{}% - \renewcommand{\glossentry}[2]{% - \glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}} & - \glossentrydesc{##1}\glspostdescription\glsxtrprelocation ##2% - \tabularnewline - }% - \renewcommand{\subglossentry}[3]{% - & - \glssubentryitem{##2}% - \glstarget{##2}{\strut}\glossentrydesc{##2}\glspostdescription - \glsxtrprelocation ##3% - \tabularnewline - }% - \ifglsnogroupskip - \renewcommand*{\glsgroupskip}{}% - \else - \renewcommand*{\glsgroupskip}{& \tabularnewline}% - \fi - } +\newcommand*{\glsxtrcombiningdiacriticIrules}{% + \glshex 0301\string;% combining acute + \glshex 0300\string;% combining grave + \glshex 0306\string;% combining breve + \glshex 0302\string;% combining circumflex + \glshex 030C\string;% combining caron + \glshex 030A\string;% combining ring + \glshex 030D\string;% combining vertical line above + \glshex 0308\string;% combining diaeresis + \glshex 030B\string;% combining double acute + \glshex 0303\string;% combining tilde + \glshex 0307\string;% combining dot above + \glshex 0304% combining macron } -{} -% \end{macrocode} -%Three column style: -% \begin{macrocode} -\ifcsdef{@glsstyle@superragged3col} -{% - \renewglossarystyle{superragged3col}{% - \renewenvironment{theglossary}% - {\tablehead{}\tabletail{}% - \begin{supertabular}{l>{\raggedright}p{\glsdescwidth}% - >{\raggedright}p{\glspagelistwidth}}}% - {\end{supertabular}}% - \renewcommand*{\glossaryheader}{}% - \renewcommand*{\glsgroupheading}[1]{}% - \renewcommand{\glossentry}[2]{% - \glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}} & - \glossentrydesc{##1}\glspostdescription & - ##2\tabularnewline - }% - \renewcommand{\subglossentry}[3]{% - & - \glssubentryitem{##2}% - \glstarget{##2}{\strut}\glossentrydesc{##2}\glspostdescription & - ##3\tabularnewline - }% % \end{macrocode} -%\changes{1.21}{2017-11-03}{moved conditional outside of \cs{glsgroupskip}} +%\end{macro} +% +%\begin{macro}{\glsxtrcombiningdiacriticIIrules} +%\changes{1.27}{2018-02-26}{new} +%Second set of combining diacritic marks. % \begin{macrocode} - \ifglsnogroupskip - \renewcommand*{\glsgroupskip}{}% - \else - \renewcommand*{\glsgroupskip}{ & &\tabularnewline}% - \fi - } +\newcommand*{\glsxtrcombiningdiacriticIIrules}{% + \glshex 0337\string;% combining short solidus overlay + \glshex 0327\string;% combining cedilla + \glshex 0328\string;% combining ogonek + \glshex 0323\string;% combining dot below + \glshex 0332\string;% combining low line + \glshex 0305\string;% combining overline + \glshex 0309\string;% combining hook above + \glshex 030E\string;% combining double vertical line above + \glshex 030F\string;% combining double grave accent + \glshex 0310\string;% combining candrabindu + \glshex 0311\string;% combining inverted breve + \glshex 0312\string;% combining turned comma above + \glshex 0313\string;% combining comma above + \glshex 0314\string;% combining reversed comma above + \glshex 0315\string;% combining comma above right + \glshex 0316\string;% combining grave accent below + \glshex 0317% combining acute accent below } -{} % \end{macrocode} -% Four columns: +%\end{macro} +% +%\begin{macro}{\glsxtrcombiningdiacriticIIIrules} +%\changes{1.27}{2018-02-26}{new} +%Third set of combining diacritic marks. % \begin{macrocode} -\ifcsdef{@glsstyle@altsuperragged4col} -{% - \renewglossarystyle{altsuperragged4col}{% - \renewenvironment{theglossary}% - {\tablehead{}\tabletail{}% - \begin{supertabular}{l>{\raggedright}p{\glsdescwidth}l% - >{\raggedright}p{\glspagelistwidth}}}% - {\end{supertabular}}% - \renewcommand*{\glossaryheader}{}% - \renewcommand{\glossentry}[2]{% - \glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}} & - \glossentrydesc{##1}\glspostdescription & - \glossentrysymbol{##1} & ##2\tabularnewline - }% - \renewcommand{\subglossentry}[3]{% - & - \glssubentryitem{##2}% - \glstarget{##2}{\strut}\glossentrydesc{##2}\glspostdescription & - \glossentrysymbol{##2} & ##3\tabularnewline - }% +\newcommand*{\glsxtrcombiningdiacriticIIIrules}{% + \glshex 0318\string;% combining left tack below + \glshex 0319\string;% combining right tack below + \glshex 031A\string;% combining left angle above + \glshex 031B\string;% combining horn + \glshex 031C\string;% combining left half ring below + \glshex 031D\string;% combining up tack below + \glshex 031E\string;% combining down tack below + \glshex 031F\string;% combining plus sign below + \glshex 0320\string;% combining minus sign below + \glshex 0321\string;% combining palatalized hook below + \glshex 0322\string;% combining retroflex hook below + \glshex 0324\string;% combining diaresis below + \glshex 0325\string;% combining ring below + \glshex 0326\string;% combining comma below + \glshex 0329\string;% combining vertical line below + \glshex 032A\string;% combining bridge below + \glshex 032B\string;% combining inverted double arch below + \glshex 032C\string;% combining caron below + \glshex 032D\string;% combining circumflex accent below + \glshex 032E\string;% combining breve below + \glshex 032F\string;% combining inverted breve below + \glshex 0330\string;% combining tilde below + \glshex 0331\string;% combining macron below + \glshex 0333\string;% combining double low line + \glshex 0334\string;% combining tilde overlay + \glshex 0335\string;% combining short stroke overlay + \glshex 0336\string;% combining long stroke overlay + \glshex 0338\string;% combining long solidus overlay + \glshex 0339\string;% combining combining right half ring below + \glshex 033A\string;% combining inverted bridge below + \glshex 033B\string;% combining square below + \glshex 033C\string;% combining seagull below + \glshex 033D\string;% combining x above + \glshex 033E\string;% combining vertical tilde + \glshex 033F\string;% combining double overline + \glshex 0342\string;% combining Greek perispomeni + \glshex 0344\string;% combining Greek dialytika tonos + \glshex 0345\string;% combining Greek ypogegrammeni + \glshex 0360\string;% combining double tilde + \glshex 0361\string;% combining double inverted breve + \glshex 0483\string;% combining Cyrillic titlo + \glshex 0484\string;% combining Cyrillic palatalization + \glshex 0485\string;% combining Cyrillic dasia pneumata + \glshex 0486% combining Cyrillic psili pneumata +} % \end{macrocode} -%\changes{1.21}{2017-11-03}{moved conditional outside of \cs{glsgroupskip}} +%\end{macro} +% +%\begin{macro}{\glsxtrcombiningdiacriticIVrules} +%\changes{1.27}{2018-02-26}{new} +%Fourth set of combining diacritic marks. % \begin{macrocode} - \ifglsnogroupskip - \renewcommand*{\glsgroupskip}{}% - \else - \renewcommand*{\glsgroupskip}{& & &\tabularnewline}% - \fi - } +\newcommand*{\glsxtrcombiningdiacriticIVrules}{% + \glshex 20D0\string;% combining left harpoon above + \glshex 20D1\string;% combining right harpoon above + \glshex 20D2\string;% combining long vertical line overlay + \glshex 20D3\string;% combining short vertical line overlay + \glshex 20D4\string;% combining anticlockwise arrow above + \glshex 20D5\string;% combining clockwise arrow above + \glshex 20D6\string;% combining left arrow above + \glshex 20D7\string;% combining right arrow above + \glshex 20D8\string;% combining ring overlay + \glshex 20D9\string;% combining clockwise ring overlay + \glshex 20DA\string;% combining anticlockwise ring overlay + \glshex 20DB\string;% combining three dots above + \glshex 20DC\string;% combining four dots above + \glshex 20DD\string;% combining enclosing circle + \glshex 20DE\string;% combining enclosing square + \glshex 20DF\string;% combining enclosing diamond + \glshex 20E0\string;% combining enclosing circle backslash + \glshex 20E1% combining left right arrow above } -{} % \end{macrocode} +%\end{macro} % -%\section{Inline Style} -% The \glostyle{inline} style is dealt with slightly differently. -% The \cs{glspostdescription} hook is actually in -% \cs{glspostinline}, which is called at the end of the glossary. -% The original definition of \cs{glspostinline} also includes a -% space, which is unnecessary. Here, instead of redefining the -% \glostyle{inline} style, just redefine \cs{glspostinline} and -% \cs{glsinlinedescformat}. +%\begin{macro}{\glsxtrhyphenrules} +%\changes{1.27}{2018-02-26}{new} +%Hyphens. % \begin{macrocode} -\ifdef{\@glsstyle@inline} -{% - \renewcommand*{\glspostinline}{.\spacefactor\sfcode`\.} +\newcommand*{\glsxtrhyphenrules}{% + \string'\string-\string'\string;% ASCII hyphen + \glshex 00AD\string;% soft hyphen + \glshex 2010\string;% hyphen + \glshex 2011\string;% non-breaking hyphen + \glshex 2012\string;% figure dash + \glshex 2013\string;% en dash + \glshex 2014\string;% em dash + \glshex 2015\string;% horizontal bar + \glshex 2212\string=\glshex 207B\string=\glshex 208B% minus sign +} % \end{macrocode} -% Just use \cs{glsxtrpostdescription} instead of -% \cs{glspostdescription}. +%\end{macro} +% +%\begin{macro}{\glsxtrgeneralpuncrules} +%\changes{1.27}{2018-02-26}{new} +%General punctuation. % \begin{macrocode} - \renewcommand*{\glsinlinedescformat}[3]{% - \space#1\glsxtrpostdescription} - \renewcommand*{\glsinlinesubdescformat}[3]{% - #1\glsxtrpostdescription} +\newcommand*{\glsxtrgeneralpuncrules}{% + \glsxtrgeneralpuncIrules + \string<\glsxtrcurrencyrules + \string<\glsxtrgeneralpuncIIrules +} % \end{macrocode} -% The default settings don't show the location lists, so there's no -% adjustment for \cs{glsxtrprelocation}. +%\end{macro} +% +%\begin{macro}{\glsxtrgeneralpuncIrules} +%\changes{1.27}{2018-02-26}{new} +%First set of general punctuation. % \begin{macrocode} +\newcommand*{\glsxtrgeneralpuncIrules}{% + \glsxtrgeneralpuncmarksrules + \string<\glsxtrgeneralpuncaccentsrules + \string<\glsxtrgeneralpuncquoterules + \string<\glsxtrgeneralpuncbracketrules + \string<\glsxtrgeneralpuncsignrules } -{} % \end{macrocode} +%\end{macro} % -%\section{Tree Styles} -% Redefine both \cs{glstreenamefmt} and \cs{glstreegroupheaderfmt} -% in terms of \cs{glstreedefaultnamefmt} to make it easier to change -% both at the same time or only change one without affecting the -% other. +%\begin{macro}{\glsxtrgeneralpuncmarksrules} +%\changes{1.49}{2022-10-14}{new} +%Punctuation marks subset. % \begin{macrocode} -\ifdef\glstreenamefmt -{ -% \end{macrocode} -%\begin{macro}{\glstreedefaultnamefmt} -%\changes{1.31}{2018-05-09}{new} -% \begin{macrocode} - \newcommand{\glstreedefaultnamefmt}[1]{\textbf{#1}} +\newcommand*{\glsxtrgeneralpuncmarksrules}{% + \string'\glshex 005F\string'% underscore + \string<\glshex 00AF% macron + \string<\string'\glshex 002C\string'% comma + \string<\string'\glshex 003B\string'% semi-colon + \string<\string'\glshex 003A\string'% colon + \string<\string'\glshex 0021\string'% exclamation mark + \string<\glshex 00A1% inverted exclamation mark + \string<\string'\glshex 003F\string'% question mark + \string<\glshex 00BF% inverted question mark + \string<\string'\glshex 002F\string'% solidus + \string<\string'\glshex 002E\string'% full stop +} % \end{macrocode} %\end{macro} -%\begin{macro}{\glstreenamefmt} -%\changes{1.31}{2018-05-09}{added redefinition} +% +%\begin{macro}{\glsxtrgeneralpuncaccentsrules} +%\changes{1.49}{2022-10-14}{new} +%Punctuation marks subset: accent characters. % \begin{macrocode} - \renewcommand{\glstreenamefmt}[1]{\glstreedefaultnamefmt{#1}} +\newcommand*{\glsxtrgeneralpuncaccentsrules}{% + \glshex 00B4% acute accent + \string<\string'\glshex 0060\string'% grave accent + \string<\string'\glshex 005E\string'% circumflex accent + \string<\glshex 00A8% diaersis + \string<\string'\glshex 007E\string'% tilde + \string<\glshex 00B7% middle dot + \string<\glshex 00B8% cedilla +} % \end{macrocode} %\end{macro} -%\begin{macro}{\glstreegroupheaderfmt} -%\changes{1.31}{2018-05-09}{added redefinition} -%This command was only introduced to \sty{glossary-tree} v4.22, so -%it may not be defined. +% +%\begin{macro}{\glsxtrgeneralpuncquoterules} +%\changes{1.49}{2022-10-14}{new} +%Punctuation marks subset: quotes. % \begin{macrocode} - \def\glstreegroupheaderfmt#1{\glstreedefaultnamefmt{#1}} +\newcommand*{\glsxtrgeneralpuncquoterules}{% + \string'\glshex 0027\string'% straight apostrophe + \string<\string'\glshex 0022\string'% straight double quote + \string<\glshex 00AB% left guillemet + \string<\glshex 00BB% right guillemet +} % \end{macrocode} %\end{macro} -%\begin{macro}{\glstreenavigationfmt} -%\changes{1.31}{2018-05-09}{added redefinition} -%This command was only introduced to \sty{glossary-tree} v4.22, so -%it may not be defined. +% +%\begin{macro}{\glsxtrgeneralpuncbracketrules} +%\changes{1.49}{2022-10-14}{new} +%Punctuation marks subset: brackets. % \begin{macrocode} - \def\glstreenavigationfmt#1{\glstreedefaultnamefmt{#1}} +\newcommand*{\glsxtrgeneralpuncbracketrules}{% + \string'\glshex 0028\string'% left parenthesis + \string=\glshex 207D\string=\glshex 208D% super/subscript left parenthesis + \string<\string'\glshex 0029\string'% right parenthesis + \string=\glshex 207E\string=\glshex 208E% super/subscript right parenthesis + \string<\string'\glshex 005B\string'% left square bracket + \string<\string'\glshex 005D\string'% right square bracket + \string<\string'\glshex 007B\string'% left curly bracket + \string<\string'\glshex 007D\string'% right curly bracket +} % \end{macrocode} %\end{macro} -%\begin{macro}{\glstreePreHeader} -%\changes{1.41}{2019-04-09}{new} -%Takes the label as the first argument and title as the second -%argument so this can be modified to add a bookmark. +% +%\begin{macro}{\glsxtrgeneralpuncsignrules} +%\changes{1.49}{2022-10-14}{new} +%Punctuation marks subset: signs. % \begin{macrocode} - \newcommand{\glstreePreHeader}[2]{} +\newcommand*{\glsxtrgeneralpuncsignrules}{% + \glshex 00A7% section sign + \string<\glshex 00B6% pilcrow sign + \string<\glshex 00A9% copyright sign + \string<\glshex 00AE% registered sign + \string<\string'\glshex 0040\string'% at sign +} % \end{macrocode} %\end{macro} +% +%\begin{macro}{\glsxtrcurrencyrules} +%\changes{1.27}{2018-02-26}{new} +%General punctuation. % \begin{macrocode} +\newcommand*{\glsxtrcurrencyrules}{% + \glshex 00A4% currency sign + \string<\glshex 0E3F% Thai currency symbol baht + \string<\glshex 00A2% cent sign + \string<\glshex 20A1% colon sign + \string<\glshex 20A2% cruzeiro sign + \string<\string'\glshex 0024\string'% dollar sign + \string<\glshex 20AB% dong sign + \string<\glshex 20AC% euro sign + \string<\glshex 20A3% French franc sign + \string<\glshex 20A4% lira sign + \string<\glshex 20A5% mill sign + \string<\glshex 20A6% naira sign + \string<\glshex 20A7% peseta sign + \string<\glshex 00A3% pound sign + \string<\glshex 20A8% rupee sign + \string<\glshex 20AA% new sheqel sign + \string<\glshex 20A9% won sign + \string<\glshex 00A5% yen sign } -{} -% \end{macrocode} -% The \glostyle{index} style is redefined so that the space before -% the number list isn't hard coded. -%\changes{1.21}{2017-11-03}{modified index to remove hard coded \cs{space}} -% \begin{macrocode} -\ifdef{\@glsstyle@index} -{ -% \end{macrocode} -%\begin{macro}{\glstreeprelocation} -%\changes{1.21}{2017-11-03}{new} -%The space before the number list for top-level entries. This is -%shared by the other tree styles. -% \begin{macrocode} - \newcommand*{\glstreeprelocation}{\glsxtrprelocation} % \end{macrocode} %\end{macro} -%\begin{macro}{\glstreechildprelocation} -%\changes{1.21}{2017-11-03}{new} -%The space before the number list for child entries. This is -%shared by the other tree styles. +% +%\begin{macro}{\glsxtrgeneralpuncIIrules} +%\changes{1.27}{2018-02-26}{new} +%Second set of general punctuation. % \begin{macrocode} - \newcommand*{\glstreechildprelocation}{\glstreeprelocation} +\newcommand*{\glsxtrgeneralpuncIIrules}{% + \string'\glshex 002A\string'% asterisk + \string<\string'\glshex 005C\string'% backslash + \string<\string'\glshex 0026\string'% ampersand + \string<\string'\glshex 0023\string'% hash sign + \string<\string'\glshex 0025\string'% percent sign + \string<\string'\glshex 002B\string'% plus sign + \string=\glshex 207A\string=\glshex 208A% super/subscript plus sign + \string<\glshex 00B1% plus-minus sign + \string<\glshex 00F7% division sign + \string<\glshex 00D7% multiplication sign + \string<\string'\glshex 003C\string'% less-than sign + \string<\string'\glshex 003D\string'% equals sign + \string<\string'\glshex 003E\string'% greater-than sign + \string<\glshex 00AC% not sign + \string<\string'\glshex 007C\string'% vertical bar (pipe) + \string<\glshex 00A6% broken bar + \string<\glshex 00B0% degree sign + \string<\glshex 00B5% micron sign +} % \end{macrocode} %\end{macro} -%Don't prohibit a page break at the start of a new group if there's -%no header. -%\begin{macro}{\glstreegroupskip} -%\changes{1.41}{2019-04-09}{new} +% +%\begin{macro}{\glsxtrGeneralLatinIrules} +%\changes{1.27}{2018-02-26}{new} +%Basic Latin alphabet. % \begin{macrocode} - \newcommand{\glstreegroupskip}{\indexspace} +\newcommand*{\glsxtrGeneralLatinIrules}{% + \glsxtrLatinA + \string\dimen@ - \csdef{@glswidestname\romannumeral#1}{#2}% - \fi - }% - } +\newcommand*{\glsxtrMathUpGreekIrules}{% + \glsxtrUpAlpha + \string<\glsxtrUpBeta + \string<\glsxtrUpGamma + \string<\glsxtrUpDelta + \string<\glsxtrUpEpsilon + \string<\glsxtrUpDigamma + \string<\glsxtrUpZeta + \string<\glsxtrUpEta + \string<\glsxtrUpTheta + \string<\glsxtrUpIota + \string<\glsxtrUpKappa + \string<\glsxtrUpLambda + \string<\glsxtrUpMu + \string<\glsxtrUpNu + \string<\glsxtrUpXi + \string<\glsxtrUpOmicron + \string<\glsxtrUpPi + \string<\glsxtrUpRho + \string<\glsxtrUpSigma + \string<\glsxtrUpTau + \string<\glsxtrUpUpsilon + \string<\glsxtrUpPhi + \string<\glsxtrUpChi + \string<\glsxtrUpPsi + \string<\glsxtrUpOmega +} % \end{macrocode} %\end{macro} % -%\begin{macro}{\gglsupdatewidest} -%\changes{1.23}{2017-11-12}{new} -%As above but global definition. +%\begin{macro}{\glsxtrMathUpGreekIIrules} +%\changes{1.27}{2018-02-26}{new} +%Doesn't include digamma. % \begin{macrocode} - \newcommand*{\gglsupdatewidest}[2][0]{% - \ifcsundef{@glswidestname\romannumeral#1}% - {\csgdef{@glswidestname\romannumeral#1}{#2}}% - {% - \settowidth{\dimen@}{\csuse{@glswidestname\romannumeral#1}}% - \settowidth{\dimen@ii}{#2}% - \ifdim\dimen@ii>\dimen@ - \csgdef{@glswidestname\romannumeral#1}{#2}% - \fi - }% - } +\newcommand*{\glsxtrMathUpGreekIIrules}{% + \glsxtrUpAlpha + \string<\glsxtrUpBeta + \string<\glsxtrUpGamma + \string<\glsxtrUpDelta + \string<\glsxtrUpEpsilon + \string<\glsxtrUpZeta + \string<\glsxtrUpEta + \string<\glsxtrUpTheta + \string<\glsxtrUpIota + \string<\glsxtrUpKappa + \string<\glsxtrUpLambda + \string<\glsxtrUpMu + \string<\glsxtrUpNu + \string<\glsxtrUpXi + \string<\glsxtrUpOmicron + \string<\glsxtrUpPi + \string<\glsxtrUpRho + \string<\glsxtrUpSigma + \string<\glsxtrUpTau + \string<\glsxtrUpUpsilon + \string<\glsxtrUpPhi + \string<\glsxtrUpChi + \string<\glsxtrUpPsi + \string<\glsxtrUpOmega +} % \end{macrocode} %\end{macro} % -%\begin{macro}{\eglsupdatewidest} -%\changes{1.23}{2017-11-12}{new} -%As \cs{glsupdatewidest} but expands value. +%\begin{macro}{\glsxtrMathItalicGreekIrules} +%\changes{1.27}{2018-02-26}{new} +%Includes (upright) digamma between epsilon and zeta (there isn't +%an italic digamma), so don't mix with \cs{glsxtrMathUpGreekIrules} +%or there may be unexpected results. % \begin{macrocode} - \newcommand*{\eglsupdatewidest}[2][0]{% - \ifcsundef{@glswidestname\romannumeral#1}% - {\protected@csedef{@glswidestname\romannumeral#1}{#2}}% - {% - \settowidth{\dimen@}{\csuse{@glswidestname\romannumeral#1}}% - \settowidth{\dimen@ii}{#2}% - \ifdim\dimen@ii>\dimen@ - \protected@csedef{@glswidestname\romannumeral#1}{#2}% - \fi - }% - } +\newcommand*{\glsxtrMathItalicGreekIrules}{% + \glsxtrMathItalicAlpha + \string<\glsxtrMathItalicBeta + \string<\glsxtrMathItalicGamma + \string<\glsxtrMathItalicDelta + \string<\glsxtrMathItalicEpsilon + \string<\glsxtrUpDigamma + \string<\glsxtrMathItalicZeta + \string<\glsxtrMathItalicEta + \string<\glsxtrMathItalicTheta + \string<\glsxtrMathItalicIota + \string<\glsxtrMathItalicKappa + \string<\glsxtrMathItalicLambda + \string<\glsxtrMathItalicMu + \string<\glsxtrMathItalicNu + \string<\glsxtrMathItalicXi + \string<\glsxtrMathItalicOmicron + \string<\glsxtrMathItalicPi + \string<\glsxtrMathItalicRho + \string<\glsxtrMathItalicSigma + \string<\glsxtrMathItalicTau + \string<\glsxtrMathItalicUpsilon + \string<\glsxtrMathItalicPhi + \string<\glsxtrMathItalicChi + \string<\glsxtrMathItalicPsi + \string<\glsxtrMathItalicOmega +} % \end{macrocode} %\end{macro} % -%\begin{macro}{\xglsupdatewidest} -%\changes{1.23}{2017-11-12}{new} -%As above but global. +%\begin{macro}{\glsxtrMathItalicGreekIIrules} +%\changes{1.27}{2018-02-26}{new} +%Doesn't include digamma. % \begin{macrocode} - \newcommand*{\xglsupdatewidest}[2][0]{% - \ifcsundef{@glswidestname\romannumeral#1}% - {\protected@csxdef{@glswidestname\romannumeral#1}{#2}}% - {% - \settowidth{\dimen@}{\csuse{@glswidestname\romannumeral#1}}% - \settowidth{\dimen@ii}{#2}% - \ifdim\dimen@ii>\dimen@ - \protected@csxdef{@glswidestname\romannumeral#1}{#2}% - \fi - }% - } +\newcommand*{\glsxtrMathItalicGreekIIrules}{% + \glsxtrMathItalicAlpha + \string<\glsxtrMathItalicBeta + \string<\glsxtrMathItalicGamma + \string<\glsxtrMathItalicDelta + \string<\glsxtrMathItalicEpsilon + \string<\glsxtrMathItalicZeta + \string<\glsxtrMathItalicEta + \string<\glsxtrMathItalicTheta + \string<\glsxtrMathItalicIota + \string<\glsxtrMathItalicKappa + \string<\glsxtrMathItalicLambda + \string<\glsxtrMathItalicMu + \string<\glsxtrMathItalicNu + \string<\glsxtrMathItalicXi + \string<\glsxtrMathItalicOmicron + \string<\glsxtrMathItalicPi + \string<\glsxtrMathItalicRho + \string<\glsxtrMathItalicSigma + \string<\glsxtrMathItalicTau + \string<\glsxtrMathItalicUpsilon + \string<\glsxtrMathItalicPhi + \string<\glsxtrMathItalicChi + \string<\glsxtrMathItalicPsi + \string<\glsxtrMathItalicOmega +} % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsgetwidestname} -%\changes{1.05}{2016-06-10}{new} -% Provide a user-level macro to obtain the widest top-level name. +%\begin{macro}{\glsxtrMathItalicUpperGreekIrules} +%\changes{1.27}{2018-02-26}{new} +%Upper case only (includes upright digamma). % \begin{macrocode} - \newcommand*{\glsgetwidestname}{\@glswidestname} +\newcommand*{\glsxtrMathItalicUpperGreekIrules}{% + \glshex 1D6E2% upper case alpha (maths italic) + \string<\glshex 1D6E3% upper case beta (maths italic) + \string<\glshex 1D6E4% upper case gamma (maths italic) + \string<\glshex 1D6E5% upper case delta (maths italic) + \string<\glshex 1D6E6% upper case epsilon (maths italic) + \string<\glshex 03DC% upper case digamma + \string<\glshex 1D6E7% upper case zeta (maths italic) + \string<\glshex 1D6E8% upper case eta (maths italic) + \string<\glshex 1D6E9% upper case theta (maths italic) + \string=\glshex 1D6F3% upper case theta variant (maths italic) + \string<\glshex 1D6EA% upper case iota (maths italic) + \string<\glshex 1D6EB% upper case kappa (maths italic) + \string<\glshex 1D6EC% upper case lambda (maths italic) + \string<\glshex 1D6ED% upper case mu (maths italic) + \string<\glshex 1D6EE% upper case nu (maths italic) + \string<\glshex 1D6EF% upper case xi (maths italic) + \string<\glshex 1D6F0% upper case omicron (maths italic) + \string<\glshex 1D6F1% upper case pi (maths italic) + \string<\glshex 1D6F2% upper case rho (maths italic) + \string<\glshex 1D6F4% upper case sigma (maths italic) + \string<\glshex 1D6F5% upper case tau (maths italic) + \string<\glshex 1D6F6% upper case upsilon (maths italic) + \string<\glshex 1D6F7% upper case phi (maths italic) + \string<\glshex 1D6F8% upper case chi (maths italic) + \string<\glshex 1D6F9% upper case psi (maths italic) + \string<\glshex 1D6FA% upper case omega (maths italic) +} % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsgetwidestsubname} -%\changes{1.05}{2016-06-10}{new} -% Provide a user-level macro to obtain the widest sub-entry name. +%\begin{macro}{\glsxtrMathItalicUpperGreekIIrules} +%\changes{1.27}{2018-02-26}{new} +%Upper case only (doesn't include upright digamma). % \begin{macrocode} - \newcommand*{\glsgetwidestsubname}[1]{% - \ifcsundef{@glswidestname\romannumeral#1}% - {\@glswidestname}% - {\csuse{@glswidestname\romannumeral#1}}% - } +\newcommand*{\glsxtrMathItalicUpperGreekIIrules}{% + \glshex 1D6E2% upper case alpha (maths italic) + \string<\glshex 1D6E3% upper case beta (maths italic) + \string<\glshex 1D6E4% upper case gamma (maths italic) + \string<\glshex 1D6E5% upper case delta (maths italic) + \string<\glshex 1D6E6% upper case epsilon (maths italic) + \string<\glshex 1D6E7% upper case zeta (maths italic) + \string<\glshex 1D6E8% upper case eta (maths italic) + \string<\glshex 1D6E9% upper case theta (maths italic) + \string=\glshex 1D6F3% upper case theta variant (maths italic) + \string<\glshex 1D6EA% upper case iota (maths italic) + \string<\glshex 1D6EB% upper case kappa (maths italic) + \string<\glshex 1D6EC% upper case lambda (maths italic) + \string<\glshex 1D6ED% upper case mu (maths italic) + \string<\glshex 1D6EE% upper case nu (maths italic) + \string<\glshex 1D6EF% upper case xi (maths italic) + \string<\glshex 1D6F0% upper case omicron (maths italic) + \string<\glshex 1D6F1% upper case pi (maths italic) + \string<\glshex 1D6F2% upper case rho (maths italic) + \string<\glshex 1D6F4% upper case sigma (maths italic) + \string<\glshex 1D6F5% upper case tau (maths italic) + \string<\glshex 1D6F6% upper case upsilon (maths italic) + \string<\glshex 1D6F7% upper case phi (maths italic) + \string<\glshex 1D6F8% upper case chi (maths italic) + \string<\glshex 1D6F9% upper case psi (maths italic) + \string<\glshex 1D6FA% upper case omega (maths italic) +} % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsFindWidestTopLevelName} -%CamelCase is easier for long command names. Provide a CamelCase -%synonym of \ics{glsfindwidesttoplevelname}. +%\begin{macro}{\glsxtrMathItalicLowerGreekIrules} +%\changes{1.27}{2018-02-26}{new} +%Lower case only (includes upright digamma). % \begin{macrocode} - \let\glsFindWidestTopLevelName\glsfindwidesttoplevelname +\newcommand*{\glsxtrMathItalicLowerGreekIrules}{% + \glshex 1D6FC% lower case alpha (maths italic) + \string<\glshex 1D6FD% lower case beta (maths italic) + \string<\glshex 1D6FE% lower case gamma (maths italic) + \string<\glshex 1D6FF% lower case delta (maths italic) + \string<\glshex 1D700% lower case epsilon (maths italic) + \string=\glshex 1D716% lower case epsilon variant (maths italic) + \string<\glshex 03DD% lower case digamma + \string<\glshex 1D701% lower case zeta (maths italic) + \string<\glshex 1D702% lower case eta (maths italic) + \string<\glshex 1D703% lower case theta (maths italic) + \string=\glshex 1D717% lower case theta variant (maths italic) + \string<\glshex 1D704% lower case iota (maths italic) + \string<\glshex 1D705% lower case kappa (maths italic) + \string=\glshex 1D718% lower case kappa variant (maths italic) + \string<\glshex 1D706% lower case lambda (maths italic) + \string<\glshex 1D707% lower case mu (maths italic) + \string<\glshex 1D708% lower case nu (maths italic) + \string<\glshex 1D709% lower case xi (maths italic) + \string<\glshex 1D70A% lower case omicron (maths italic) + \string<\glshex 1D70B% lower case pi (maths italic) + \string=\glshex 1D71B% lower case pi variant (maths italic) + \string<\glshex 1D70C% lower case rho (maths italic) + \string=\glshex 1D71A% lower case rho variant (maths italic) + \string<\glshex 1D70D% lower case final sigma (maths italic) + \string=\glshex 1D70E% lower case sigma (maths italic) + \string<\glshex 1D70F% lower case tau (maths italic) + \string<\glshex 1D710% lower case upsilon (maths italic) + \string<\glshex 1D711% lower case phi (maths italic) + \string=\glshex 1D719% lower case phi variant (maths italic) + \string<\glshex 1D712% lower case chi (maths italic) + \string<\glshex 1D713% lower case psi (maths italic) + \string<\glshex 1D714% lower case omega (maths italic) +} % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsFindWidestUsedTopLevelName} -%\changes{1.05}{2016-06-10}{new} -% Like \cs{glsfindwidesttoplevelname} but has an additional check -% that the entry has been used. Only useful if the glossaries occur -% at the end of the document, in which case this command should go -% at the start of the glossary. Alternatively, place at the end of -% the document and save for the next run. +%\begin{macro}{\glsxtrMathItalicLowerGreekIIrules} +%\changes{1.27}{2018-02-26}{new} +%Lower case only (doesn't includes upright digamma). % \begin{macrocode} - \newrobustcmd*{\glsFindWidestUsedTopLevelName}[1][\@glo@types]{% - \dimen@=0pt\relax - \gls@tmplen=0pt\relax - \forallglossaries[#1]{\@gls@type}% - {% - \forglsentries[\@gls@type]{\@glo@label}% - {% - \ifglsused{\@glo@label}% - {% - \ifglshasparent{\@glo@label}% - {}% - {% - \settowidth{\dimen@}% - {\glstreenamefmt{\glsentryname{\@glo@label}}}% - \ifdim\dimen@>\gls@tmplen - \gls@tmplen=\dimen@ - \eglssetwidest{\glsentryname{\@glo@label}}% - \fi - }% - }% - {}% - }% - }% - } +\newcommand*{\glsxtrMathItalicLowerGreekIIrules}{% + \glshex 1D6FC% lower case alpha (maths italic) + \string<\glshex 1D6FD% lower case beta (maths italic) + \string<\glshex 1D6FE% lower case gamma (maths italic) + \string<\glshex 1D6FF% lower case delta (maths italic) + \string<\glshex 1D700% lower case epsilon (maths italic) + \string=\glshex 1D716% lower case epsilon variant (maths italic) + \string<\glshex 1D701% lower case zeta (maths italic) + \string<\glshex 1D702% lower case eta (maths italic) + \string<\glshex 1D703% lower case theta (maths italic) + \string=\glshex 1D717% lower case theta variant (maths italic) + \string<\glshex 1D704% lower case iota (maths italic) + \string<\glshex 1D705% lower case kappa (maths italic) + \string=\glshex 1D718% lower case kappa variant (maths italic) + \string<\glshex 1D706% lower case lambda (maths italic) + \string<\glshex 1D707% lower case mu (maths italic) + \string<\glshex 1D708% lower case nu (maths italic) + \string<\glshex 1D709% lower case xi (maths italic) + \string<\glshex 1D70A% lower case omicron (maths italic) + \string<\glshex 1D70B% lower case pi (maths italic) + \string=\glshex 1D71B% lower case pi variant (maths italic) + \string<\glshex 1D70C% lower case rho (maths italic) + \string=\glshex 1D71A% lower case rho variant (maths italic) + \string<\glshex 1D70D% lower case final sigma (maths italic) + \string=\glshex 1D70E% lower case sigma (maths italic) + \string<\glshex 1D70F% lower case tau (maths italic) + \string<\glshex 1D710% lower case upsilon (maths italic) + \string<\glshex 1D711% lower case phi (maths italic) + \string=\glshex 1D719% lower case phi variant (maths italic) + \string<\glshex 1D712% lower case chi (maths italic) + \string<\glshex 1D713% lower case psi (maths italic) + \string<\glshex 1D714% lower case omega (maths italic) +} % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsFindWidestUsedAnyName} -%\changes{1.05}{2016-06-10}{new} -% Like the above but doesn't check the parent key. Useful if all -% levels should have the same width for the name. +%\begin{macro}{\glsxtrMathGreekIrules} +%\changes{1.27}{2018-02-26}{new} +%Includes both upright and italic with digamma between epsilon and +%zeta. % \begin{macrocode} - \newrobustcmd*{\glsFindWidestUsedAnyName}[1][\@glo@types]{% - \dimen@=0pt\relax - \gls@tmplen=0pt\relax - \forallglossaries[#1]{\@gls@type}% - {% - \forglsentries[\@gls@type]{\@glo@label}% - {% - \ifglsused{\@glo@label}% - {% - \settowidth{\dimen@}% - {\glstreenamefmt{\glsentryname{\@glo@label}}}% - \ifdim\dimen@>\gls@tmplen - \gls@tmplen=\dimen@ - \eglssetwidest{\glsentryname{\@glo@label}}% - \fi - }% - {}% - }% - }% - } +\newcommand*{\glsxtrMathGreekIrules}{% + \glsxtrMathItalicAlpha + \string;\glsxtrUpAlpha + \string<\glsxtrMathItalicBeta + \string;\glsxtrUpBeta + \string<\glsxtrMathItalicGamma + \string;\glsxtrUpGamma + \string<\glsxtrMathItalicDelta + \string;\glsxtrUpDelta + \string<\glsxtrMathItalicEpsilon + \string;\glsxtrUpEpsilon + \string<\glsxtrUpDigamma + \string<\glsxtrMathItalicZeta + \string;\glsxtrUpZeta + \string<\glsxtrMathItalicEta + \string;\glsxtrUpEta + \string<\glsxtrMathItalicTheta + \string;\glsxtrUpTheta + \string<\glsxtrMathItalicIota + \string;\glsxtrUpIota + \string<\glsxtrMathItalicKappa + \string;\glsxtrUpKappa + \string<\glsxtrMathItalicLambda + \string;\glsxtrUpLambda + \string<\glsxtrMathItalicMu + \string;\glsxtrUpMu + \string<\glsxtrMathItalicNu + \string;\glsxtrUpNu + \string<\glsxtrMathItalicXi + \string;\glsxtrUpXi + \string<\glsxtrMathItalicOmicron + \string;\glsxtrUpOmicron + \string<\glsxtrMathItalicPi + \string;\glsxtrUpPi + \string<\glsxtrMathItalicRho + \string;\glsxtrUpRho + \string<\glsxtrMathItalicSigma + \string;\glsxtrUpSigma + \string<\glsxtrMathItalicTau + \string;\glsxtrUpTau + \string<\glsxtrMathItalicUpsilon + \string;\glsxtrUpUpsilon + \string<\glsxtrMathItalicPhi + \string;\glsxtrUpPhi + \string<\glsxtrMathItalicChi + \string;\glsxtrUpChi + \string<\glsxtrMathItalicPsi + \string;\glsxtrUpPsi + \string<\glsxtrMathItalicOmega + \string;\glsxtrUpOmega +} % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsFindWidestAnyName} -%\changes{1.05}{2016-06-10}{new} -% Like the above but doesn't check is the entry has been used. +%\begin{macro}{\glsxtrMathGreekIIrules} +%\changes{1.27}{2018-02-26}{new} +%Includes both upright and italic (digamma not included). % \begin{macrocode} - \newrobustcmd*{\glsFindWidestAnyName}[1][\@glo@types]{% - \dimen@=0pt\relax - \gls@tmplen=0pt\relax - \forallglossaries[#1]{\@gls@type}% - {% - \forglsentries[\@gls@type]{\@glo@label}% - {% - \settowidth{\dimen@}% - {\glstreenamefmt{\glsentryname{\@glo@label}}}% - \ifdim\dimen@>\gls@tmplen - \gls@tmplen=\dimen@ - \eglssetwidest{\glsentryname{\@glo@label}}% - \fi - }% - }% - } +\newcommand*{\glsxtrMathGreekIIrules}{% + \glsxtrMathItalicAlpha + \string;\glsxtrUpAlpha + \string<\glsxtrMathItalicBeta + \string;\glsxtrUpBeta + \string<\glsxtrMathItalicGamma + \string;\glsxtrUpGamma + \string<\glsxtrMathItalicDelta + \string;\glsxtrUpDelta + \string<\glsxtrMathItalicEpsilon + \string;\glsxtrUpEpsilon + \string<\glsxtrMathItalicZeta + \string;\glsxtrUpZeta + \string<\glsxtrMathItalicEta + \string;\glsxtrUpEta + \string<\glsxtrMathItalicTheta + \string;\glsxtrUpTheta + \string<\glsxtrMathItalicIota + \string;\glsxtrUpIota + \string<\glsxtrMathItalicKappa + \string;\glsxtrUpKappa + \string<\glsxtrMathItalicLambda + \string;\glsxtrUpLambda + \string<\glsxtrMathItalicMu + \string;\glsxtrUpMu + \string<\glsxtrMathItalicNu + \string;\glsxtrUpNu + \string<\glsxtrMathItalicXi + \string;\glsxtrUpXi + \string<\glsxtrMathItalicOmicron + \string;\glsxtrUpOmicron + \string<\glsxtrMathItalicPi + \string;\glsxtrUpPi + \string<\glsxtrMathItalicRho + \string;\glsxtrUpRho + \string<\glsxtrMathItalicSigma + \string;\glsxtrUpSigma + \string<\glsxtrMathItalicTau + \string;\glsxtrUpTau + \string<\glsxtrMathItalicUpsilon + \string;\glsxtrUpUpsilon + \string<\glsxtrMathItalicPhi + \string;\glsxtrUpPhi + \string<\glsxtrMathItalicChi + \string;\glsxtrUpChi + \string<\glsxtrMathItalicPsi + \string;\glsxtrUpPsi + \string<\glsxtrMathItalicOmega + \string;\glsxtrUpOmega +} % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsFindWidestUsedLevelTwo} -%\changes{1.05}{2016-06-10}{new} -% 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{macrocode} - \newrobustcmd*{\glsFindWidestUsedLevelTwo}[1][\@glo@types]{% - \dimen@=0pt\relax - \dimen@i=0pt\relax - \dimen@ii=0pt\relax - \forallglossaries[#1]{\@gls@type}% - {% - \forglsentries[\@gls@type]{\@glo@label}% - {% - \ifglsused{\@glo@label}% - {% - \ifglshasparent{\@glo@label}% - {% -% \end{macrocode} -%\changes{1.46}{2021-09-20}{changed \cs{edef} to \cs{protected@edef}} +%\begin{macro}{\glsxtrUpAlpha} +%\changes{1.27}{2018-02-26}{new} % \begin{macrocode} - \protected@edef\@glo@parent{\csuse{glo@\glsdetoklabel{\@glo@label}@parent}}% - \ifglshasparent{\@glo@parent}% - {% - \protected@edef\@glo@parent{\csuse{glo@\glsdetoklabel{\@glo@parent}@parent}}% - \ifglshasparent{\@glo@parent}% - {}% - {% - \settowidth{\gls@tmplen}% - {\glstreenamefmt{\glsentryname{\@glo@label}}}% - \ifdim\gls@tmplen>\dimen@ii - \dimen@ii=\gls@tmplen - \eglssetwidest[2]{\glsentryname{\@glo@label}}% - \fi - }% - }% - {% - \settowidth{\gls@tmplen}% - {\glstreenamefmt{\glsentryname{\@glo@label}}}% - \ifdim\gls@tmplen>\dimen@i - \dimen@i=\gls@tmplen - \eglssetwidest[1]{\glsentryname{\@glo@label}}% - \fi - }% - }% - {% - \settowidth{\gls@tmplen}% - {\glstreenamefmt{\glsentryname{\@glo@label}}}% - \ifdim\gls@tmplen>\dimen@ - \dimen@=\gls@tmplen - \eglssetwidest{\glsentryname{\@glo@label}}% - \fi - }% - }% - {}% - }% - }% - } +\newcommand*{\glsxtrUpAlpha}{% + \glshex 03B1,% lower case alpha + \glshex 0391% upper case alpha +} % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsFindWidestLevelTwo} -%\changes{1.05}{2016-06-10}{new} -% This is like \cs{glsFindWidestUsedLevelTwo} but doesn't check if the -% entry has been used. +%\begin{macro}{\glsxtrUpBeta} +%\changes{1.27}{2018-02-26}{new} % \begin{macrocode} - \newrobustcmd*{\glsFindWidestLevelTwo}[1][\@glo@types]{% - \dimen@=0pt\relax - \dimen@i=0pt\relax - \dimen@ii=0pt\relax - \forallglossaries[#1]{\@gls@type}% - {% - \forglsentries[\@gls@type]{\@glo@label}% - {% - \ifglshasparent{\@glo@label}% - {% +\newcommand*{\glsxtrUpBeta}{% + \glshex 03B2,% lower case beta + \glshex 0392% upper case beta +} % \end{macrocode} -%\changes{1.46}{2021-09-20}{changed \cs{edef} to \cs{protected@edef}} +%\end{macro} +% +%\begin{macro}{\glsxtrUpGamma} +%\changes{1.27}{2018-02-26}{new} % \begin{macrocode} - \protected@edef\@glo@parent{\csuse{glo@\glsdetoklabel{\@glo@label}@parent}}% - \ifglshasparent{\@glo@parent}% - {% - \protected@edef\@glo@parent{\csuse{glo@\glsdetoklabel{\@glo@parent}@parent}}% - \ifglshasparent{\@glo@parent}% - {}% - {% - \settowidth{\gls@tmplen}% - {\glstreenamefmt{\glsentryname{\@glo@label}}}% - \ifdim\gls@tmplen>\dimen@ii - \dimen@ii=\gls@tmplen - \eglssetwidest[2]{\glsentryname{\@glo@label}}% - \fi - }% - }% - {% - \settowidth{\gls@tmplen}% - {\glstreenamefmt{\glsentryname{\@glo@label}}}% - \ifdim\gls@tmplen>\dimen@i - \dimen@i=\gls@tmplen - \eglssetwidest[1]{\glsentryname{\@glo@label}}% - \fi - }% - }% - {% - \settowidth{\gls@tmplen}% - {\glstreenamefmt{\glsentryname{\@glo@label}}}% - \ifdim\gls@tmplen>\dimen@ - \dimen@=\gls@tmplen - \eglssetwidest{\glsentryname{\@glo@label}}% - \fi - }% - }% - }% - } +\newcommand*{\glsxtrUpGamma}{% + \glshex 03B3,% lower case gamma + \glshex 0393% upper case gamma +} % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsFindWidestUsedAnyNameSymbol} -%\changes{1.05}{2016-06-10}{new} -% Like the \cs{glsFindWidestUsedAnyName} but also measures the -% symbol. The length of the widest symbol is stored in the second argument -% should be a length register. +%\begin{macro}{\glsxtrUpDelta} +%\changes{1.27}{2018-02-26}{new} % \begin{macrocode} - \newrobustcmd*{\glsFindWidestUsedAnyNameSymbol}[2][\@glo@types]{% - \dimen@=0pt\relax - \gls@tmplen=0pt\relax - #2=0pt\relax - \forallglossaries[#1]{\@gls@type}% - {% - \forglsentries[\@gls@type]{\@glo@label}% - {% - \ifglsused{\@glo@label}% - {% - \settowidth{\dimen@}% - {\glstreenamefmt{\glsentryname{\@glo@label}}}% - \ifdim\dimen@>\gls@tmplen - \gls@tmplen=\dimen@ - \eglssetwidest{\glsentryname{\@glo@label}}% - \fi - \settowidth{\dimen@}% - {\glsentrysymbol{\@glo@label}}% - \ifdim\dimen@>#2\relax - #2=\dimen@ - \fi - }% - {}% - }% - }% - } +\newcommand*{\glsxtrUpDelta}{% + \glshex 03B4,% lower case delta + \glshex 0394% upper case delta +} % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsFindWidestAnyNameSymbol} -%\changes{1.05}{2016-06-10}{new} -% Like the above but doesn't check if the entry has been used. +%\begin{macro}{\glsxtrUpEpsilon} +%\changes{1.27}{2018-02-26}{new} % \begin{macrocode} - \newrobustcmd*{\glsFindWidestAnyNameSymbol}[2][\@glo@types]{% - \dimen@=0pt\relax - \gls@tmplen=0pt\relax - #2=0pt\relax - \forallglossaries[#1]{\@gls@type}% - {% - \forglsentries[\@gls@type]{\@glo@label}% - {% - \settowidth{\dimen@}% - {\glstreenamefmt{\glsentryname{\@glo@label}}}% - \ifdim\dimen@>\gls@tmplen - \gls@tmplen=\dimen@ - \eglssetwidest{\glsentryname{\@glo@label}}% - \fi - \settowidth{\dimen@}% - {\glsentrysymbol{\@glo@label}}% - \ifdim\dimen@>#2\relax - #2=\dimen@ - \fi - }% - }% - } +\newcommand*{\glsxtrUpEpsilon}{% + \glshex 03B5% lower case epsilon + \string=\glshex 03F5,% lower case epsilon variant + \glshex 0395% upper case epsilon +} % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsFindWidestUsedAnyNameSymbolLocation} -%\changes{1.05}{2016-06-10}{new} -% Like the \cs{glsFindWidestUsedAnyNameSymbol} but also measures the -% location list. This requires \ics{glsentrynumberlist}. -% The length of the widest symbol is stored in the second argument -% should be a length register. The length of the widest location -% list is stored in the third argument, which should also be a -% length register. +%\begin{macro}{\glsxtrUpDigamma} +%\changes{1.27}{2018-02-26}{new} % \begin{macrocode} - \newrobustcmd*{\glsFindWidestUsedAnyNameSymbolLocation}[3][\@glo@types]{% - \dimen@=0pt\relax - \gls@tmplen=0pt\relax - #2=0pt\relax - #3=0pt\relax - \forallglossaries[#1]{\@gls@type}% - {% - \forglsentries[\@gls@type]{\@glo@label}% - {% - \ifglsused{\@glo@label}% - {% - \settowidth{\dimen@}% - {\glstreenamefmt{\glsentryname{\@glo@label}}}% - \ifdim\dimen@>\gls@tmplen - \gls@tmplen=\dimen@ - \eglssetwidest{\glsentryname{\@glo@label}}% - \fi - \settowidth{\dimen@}% - {\glsentrysymbol{\@glo@label}}% - \ifdim\dimen@>#2\relax - #2=\dimen@ - \fi - \settowidth{\dimen@}% - {\GlsXtrFormatLocationList{\glsentrynumberlist{\@glo@label}}}% - \ifdim\dimen@>#3\relax - #3=\dimen@ - \fi - }% - {}% - }% - }% - } +\newcommand*{\glsxtrUpDigamma}{% + \glshex 03DD,% lower case digamma + \glshex 03DC% upper case digamma +} % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsFindWidestAnyNameSymbolLocation} -%\changes{1.05}{2016-06-10}{new} -% Like the \cs{glsFindWidestUsedAnyNameSymbol} but doesn't check if -% the entry has been used. +%\begin{macro}{\glsxtrUpZeta} +%\changes{1.27}{2018-02-26}{new} % \begin{macrocode} - \newrobustcmd*{\glsFindWidestAnyNameSymbolLocation}[3][\@glo@types]{% - \dimen@=0pt\relax - \gls@tmplen=0pt\relax - #2=0pt\relax - #3=0pt\relax - \forallglossaries[#1]{\@gls@type}% - {% - \forglsentries[\@gls@type]{\@glo@label}% - {% - \settowidth{\dimen@}% - {\glstreenamefmt{\glsentryname{\@glo@label}}}% - \ifdim\dimen@>\gls@tmplen - \gls@tmplen=\dimen@ - \eglssetwidest{\glsentryname{\@glo@label}}% - \fi - \settowidth{\dimen@}% - {\glsentrysymbol{\@glo@label}}% - \ifdim\dimen@>#2\relax - #2=\dimen@ - \fi - \settowidth{\dimen@}% - {\GlsXtrFormatLocationList{\glsentrynumberlist{\@glo@label}}}% - \ifdim\dimen@>#3\relax - #3=\dimen@ - \fi - }% - }% - } +\newcommand*{\glsxtrUpZeta}{% + \glshex 03B6,% lower case zeta + \glshex 0396% upper case zeta +} % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsFindWidestUsedAnyNameLocation} -%\changes{1.05}{2016-06-10}{new} -% Like the \cs{glsFindWidestUsedAnyNameSymbolLocation} but doesn't -% measure the symbol. The length of the widest location -% list is stored in the second argument, which should be a -% length register. +%\begin{macro}{\glsxtrUpEta} +%\changes{1.27}{2018-02-26}{new} % \begin{macrocode} - \newrobustcmd*{\glsFindWidestUsedAnyNameLocation}[2][\@glo@types]{% - \dimen@=0pt\relax - \gls@tmplen=0pt\relax - #2=0pt\relax - \forallglossaries[#1]{\@gls@type}% - {% - \forglsentries[\@gls@type]{\@glo@label}% - {% - \ifglsused{\@glo@label}% - {% - \settowidth{\dimen@}% - {\glstreenamefmt{\glsentryname{\@glo@label}}}% - \ifdim\dimen@>\gls@tmplen - \gls@tmplen=\dimen@ - \eglssetwidest{\glsentryname{\@glo@label}}% - \fi - \settowidth{\dimen@}% - {\GlsXtrFormatLocationList{\glsentrynumberlist{\@glo@label}}}% - \ifdim\dimen@>#2\relax - #2=\dimen@ - \fi - }% - {}% - }% - }% - } +\newcommand*{\glsxtrUpEta}{% + \glshex 03B7,% lower case eta + \glshex 0397% upper case eta +} % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsFindWidestAnyNameLocation} -%\changes{1.05}{2016-06-10}{new} -% Like the \cs{glsFindWidestAnyNameLocation} but doesn't -% check the \gls{firstuse} flag. +%\begin{macro}{\glsxtrUpTheta} +%\changes{1.27}{2018-02-26}{new} % \begin{macrocode} - \newrobustcmd*{\glsFindWidestAnyNameLocation}[2][\@glo@types]{% - \dimen@=0pt\relax - \gls@tmplen=0pt\relax - #2=0pt\relax - \forallglossaries[#1]{\@gls@type}% - {% - \forglsentries[\@gls@type]{\@glo@label}% - {% - \settowidth{\dimen@}% - {\glstreenamefmt{\glsentryname{\@glo@label}}}% - \ifdim\dimen@>\gls@tmplen - \gls@tmplen=\dimen@ - \eglssetwidest{\glsentryname{\@glo@label}}% - \fi - \settowidth{\dimen@}% - {\GlsXtrFormatLocationList{\glsentrynumberlist{\@glo@label}}}% - \ifdim\dimen@>#2\relax - #2=\dimen@ - \fi - }% - }% - } +\newcommand*{\glsxtrUpTheta}{% + \glshex 03B8% lower case theta + \string=\glshex 03D1,% lower case theta variant + \glshex 0398% upper case theta +} % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrComputeTreeIndent} -%\changes{1.05}{2016-06-10}{new} -% Compute the value of \cs{glstreeindent}. Argument is the entry label. -% (Ignored in default definition, but this command may be redefined -% to take the particular entry into account.) Note that the -% sub-levels modify \cs{glstreeindent}. +%\begin{macro}{\glsxtrUpIota} +%\changes{1.27}{2018-02-26}{new} % \begin{macrocode} - \newcommand*{\glsxtrComputeTreeIndent}[1]{% - \glstreeindent=\glsxtrtreetopindent\relax - } +\newcommand*{\glsxtrUpIota}{% + \glshex 03B9,% lower case iota + \glshex 0399% upper case iota +} % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrComputeTreeSubIndent} -%\changes{1.05}{2016-06-10}{new} -%\begin{definition} -%\cs{glsxtrComputeTreeSubIndent}\marg{level}\marg{label}\marg{register} -%\end{definition} -% Compute the indent for the sub-entries. The first argument is the -% level, the second argument is the entry label and the third -% argument is the length register used to store the computed indent. +%\begin{macro}{\glsxtrUpKappa} +%\changes{1.27}{2018-02-26}{new} % \begin{macrocode} - \newcommand*{\glsxtrComputeTreeSubIndent}[3]{% - \ifcsundef{@glswidestname\romannumeral#1}% - {% - \settowidth{#3}{\glstreenamefmt{\@glswidestname\space}}% - }% - {% - \settowidth{#3}{\glstreenamefmt{% - \csname @glswidestname\romannumeral#1\endcsname\space}}% - }% - } +\newcommand*{\glsxtrUpKappa}{% + \glshex 03BA% lower case kappa + \string=\glshex 03F0,% lower case kappa variant + \glshex 039A% upper case kappa +} % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrAltTreeSetHangIndent} -%\changes{1.05}{2016-06-10}{new} -% Set \cs{hangindent} for top-level entries: +%\begin{macro}{\glsxtrUpLambda} +%\changes{1.27}{2018-02-26}{new} % \begin{macrocode} - \newcommand*{\glsxtrAltTreeSetHangIndent}{\hangindent\glstreeindent} +\newcommand*{\glsxtrUpLambda}{% + \glshex 03BB,% lower lambda + \glshex 039B% upper case lambda +} % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrAltTreeSetSubHangIndent} -%\changes{1.05}{2016-06-10}{new} -% Set \cs{hangindent} for sub-entries: +%\begin{macro}{\glsxtrUpMu} +%\changes{1.27}{2018-02-26}{new} % \begin{macrocode} - \newcommand*{\glsxtrAltTreeSetSubHangIndent}[1]{\hangindent\glstreeindent} +\newcommand*{\glsxtrUpMu}{% + \glshex 03BC,% lower case mu + \glshex 039C% upper case mu +} % \end{macrocode} %\end{macro} % -% Redefine \glostyle{alttree}: +%\begin{macro}{\glsxtrUpNu} +%\changes{1.27}{2018-02-26}{new} % \begin{macrocode} - \renewglossarystyle{alttree}{% - \renewenvironment{theglossary}% - {% - \glsxtralttreeInit - \def\@gls@prevlevel{-1}% - \mbox{}\par}% - {\par}% - \renewcommand*{\glossaryheader}{}% - \renewcommand*{\glsgroupheading}[1]{}% - \renewcommand{\glossentry}[2]{% - \ifnum\@gls@prevlevel=0\relax - \else - \glsxtrComputeTreeIndent{##1}% - \fi - \parindent\glstreeindent - \glsxtrAltTreeSetHangIndent - \makebox[0pt][r]% - {% - \glstreenamebox{\glstreeindent}% - {% - \glsentryitem{##1}% - \glstreenamefmt{\glstarget{##1}{\glossentryname{##1}}}% - }% - }% - \glsxtralttreeSymbolDescLocation{##1}{##2}% - \def\@gls@prevlevel{0}% - } - \renewcommand{\subglossentry}[3]{% - \ifnum##1=1\relax - \glssubentryitem{##2}% - \fi - \ifnum\@gls@prevlevel=##1\relax - \else - \glsxtrComputeTreeSubIndent{##1}{##2}{\gls@tmplen}% - \ifnum\@gls@prevlevel<##1\relax - \setlength\glstreeindent\gls@tmplen - \addtolength\glstreeindent\parindent - \parindent\glstreeindent - \else - \ifnum\@gls@prevlevel=0\relax - \glsxtrComputeTreeIndent{##2}% - \else - \glsxtrComputeTreeSubIndent{\@gls@prevlevel}{##2}{\glstreeindent}% - \fi - \addtolength\parindent{-\glstreeindent}% - \setlength\glstreeindent\parindent - \fi - \fi - \glsxtrAltTreeSetSubHangIndent{##1}% - \makebox[0pt][r]{\glstreenamebox{\gls@tmplen}{% - \glstreenamefmt{\glstarget{##2}{\glossentryname{##2}}}}}% - \glsxtralttreeSubSymbolDescLocation{##1}{##2}{##3}% - \def\@gls@prevlevel{##1}% - }% - \renewcommand*{\glsgroupskip}{\ifglsnogroupskip\else\glstreegroupskip\fi}% - } -}% -{% +\newcommand*{\glsxtrUpNu}{% + \glshex 03BD,% lower case nu + \glshex 039D% upper case nu } % \end{macrocode} -%Redefine \glostyle{alttreegroup} so that it discourages a break -%after group headings. -%\changes{1.21}{2017-11-03}{redefined \texttt{alttreegroup} to discourage -%breaks after group headings} +%\end{macro} +% +%\begin{macro}{\glsxtrUpXi} +%\changes{1.27}{2018-02-26}{new} % \begin{macrocode} -\ifdef{\@glsstyle@alttreegroup} -{% - \renewglossarystyle{alttreegroup}{% - \setglossarystyle{alttree}% - \renewcommand{\glsgroupheading}[1]{\par - \def\@gls@prevlevel{-1}% - \hangindent0pt\relax - \parindent0pt\relax - \glsxtrgetgrouptitle{##1}{\glsxtr@grptitle}% - \glstreePreHeader{##1}{\glsxtr@grptitle}% - \glstreegroupheaderfmt{\glsxtr@grptitle}% +\newcommand*{\glsxtrUpXi}{% + \glshex 03BE,% lower case xi + \glshex 039E% upper case xi +} % \end{macrocode} -%Can't use \cs{@afterheading} here as it messes with the first item -%of the group. +%\end{macro} +% +%\begin{macro}{\glsxtrUpOmicron} +%\changes{1.27}{2018-02-26}{new} % \begin{macrocode} - \glstreegroupheaderskip - }% - }% -}% -{% +\newcommand*{\glsxtrUpOmicron}{% + \glshex 03BF,% lower case omicron + \glshex 039F% upper case omicron } % \end{macrocode} -%Similarly for \glostyle{alttreehypergroup}. -%\changes{1.21}{2017-11-03}{redefined \texttt{alttreehypergroup} to discourage -%breaks after group headings} +%\end{macro} +% +%\begin{macro}{\glsxtrUpPi} +%\changes{1.27}{2018-02-26}{new} % \begin{macrocode} -\ifdef{\@glsstyle@alttreehypergroup} -{% - \renewglossarystyle{alttreehypergroup}{% - \setglossarystyle{alttree}% - \renewcommand*{\glossaryheader}{% - \par - \def\@gls@prevlevel{-1}% - \hangindent0pt\relax - \parindent0pt\relax - \glstreenavigationfmt{\glsnavigation}% -% \end{macrocode} -%Can't use \cs{@afterheading} here as it messes with the first item -%of the group. -% \begin{macrocode} - \glstreegroupheaderskip - }% - \renewcommand*{\glsgroupheading}[1]{% - \glsxtrgetgrouptitle{##1}{\glsxtr@grptitle}% - \glstreePreHeader{##1}{\glsxtr@grptitle}% - \par - \def\@gls@prevlevel{-1}% - \hangindent0pt\relax - \parindent0pt\relax - \glstreegroupheaderfmt{\glsnavhypertarget{##1}{\glsxtr@grptitle}}% -% \end{macrocode} -%Can't use \cs{@afterheading} here as it messes with the first item -%of the group. -% \begin{macrocode} - \glstreegroupheaderskip - }% - } -}% -{% +\newcommand*{\glsxtrUpPi}{% + \glshex 03C0% lower case pi + \string=\glshex 03D6,% lower case pi variant + \glshex 03A0% upper case pi } % \end{macrocode} +%\end{macro} % -%\section{Multicolumn Styles} -%Adjust \glostyle{mcolindexgroup} to discourage page breaks after -%the group headings. -%\changes{1.21}{2017-11-03}{redefined \texttt{mcolindexgroup} to discourage -%breaks after group headings} +%\begin{macro}{\glsxtrUpRho} +%\changes{1.27}{2018-02-26}{new} % \begin{macrocode} -\ifdef{\@glsstyle@mcolindexgroup} -{% - \renewglossarystyle{mcolindexgroup}{% - \setglossarystyle{mcolindex}% - \renewcommand*{\glsgroupheading}[1]{% - \glsxtrgetgrouptitle{##1}{\glsxtr@grptitle}% - \glstreePreHeader{##1}{\glsxtr@grptitle}% - \item\glstreegroupheaderfmt{\glsxtr@grptitle}% - \glstreegroupheaderskip\@afterheading - }% - } -}% -{% +\newcommand*{\glsxtrUpRho}{% + \glshex 03C1% lower case rho + \string=\glshex 03F1,% lower case rho variant + \glshex 03A1% upper case rho } % \end{macrocode} -%Similarly for \glostyle{mcolindexhypergroup}. -%\changes{1.21}{2017-11-03}{redefined \texttt{mcolindexhypergroup} to discourage -%breaks after group headings} +%\end{macro} +% +%\begin{macro}{\glsxtrUpSigma} +%\changes{1.27}{2018-02-26}{new} % \begin{macrocode} -\ifdef{\@glsstyle@mcolindexhypergroup} -{% - \renewglossarystyle{mcolindexhypergroup}{% - \setglossarystyle{mcolindex}% - \renewcommand*{\glossaryheader}{% - \item\glstreenavigationfmt{\glsnavigation}% +\newcommand*{\glsxtrUpSigma}{% + \glshex 03C2% lower case sigma + \string=\glshex 03C3,% lower case sigma + \glshex 03A3% upper case sigma +} % \end{macrocode} -%\changes{1.42}{2020-02-03}{added \cs{@afterheading}} +%\end{macro} +% +%\begin{macro}{\glsxtrUpTau} +%\changes{1.27}{2018-02-26}{new} % \begin{macrocode} - \glstreegroupheaderskip\@afterheading - }% - \renewcommand*{\glsgroupheading}[1]{% - \glsxtrgetgrouptitle{##1}{\glsxtr@grptitle}% - \glstreePreHeader{##1}{\glsxtr@grptitle}% - \item\glstreegroupheaderfmt - {\glsnavhypertarget{##1}{\glsxtr@grptitle}}% - \glstreegroupheaderskip\@afterheading - }% - } -}% -{% +\newcommand*{\glsxtrUpTau}{% + \glshex 03C4,% lower case tau + \glshex 03A4% upper case tau } % \end{macrocode} -%Similarly for \glostyle{mcolindexspannav}. -%\changes{1.21}{2017-11-03}{redefined \texttt{mcolindexspannav} to discourage -%breaks after group headings} +%\end{macro} +% +%\begin{macro}{\glsxtrUpUpsilon} +%\changes{1.27}{2018-02-26}{new} % \begin{macrocode} -\ifdef{\@glsstyle@mcolindexspannav} -{% - \renewglossarystyle{mcolindexspannav}{% - \setglossarystyle{index}% - \renewenvironment{theglossary}% - {% - \begin{multicols}{\glsmcols}[\noindent\glstreenavigationfmt{\glsnavigation}]% - \setlength{\parindent}{0pt}% - \setlength{\parskip}{0pt plus 0.3pt}% - \let\item\glstreeitem}% - {\end{multicols}}% - \renewcommand*{\glsgroupheading}[1]{% - \glsxtrgetgrouptitle{##1}{\glsxtr@grptitle}% - \glstreePreHeader{##1}{\glsxtr@grptitle}% - \item\glstreegroupheaderfmt - {\glsnavhypertarget{##1}{\glsxtr@grptitle}}% - \glstreegroupheaderskip\@afterheading - }% - } -}% -{% +\newcommand*{\glsxtrUpUpsilon}{% + \glshex 03C5,% lower case upsilon + \glshex 03A5% upper case upsilon } % \end{macrocode} -%Similarly for \glostyle{mcoltreegroup}. -%\changes{1.21}{2017-11-03}{redefined \texttt{mcoltreegroup} to discourage -%breaks after group headings} +%\end{macro} +% +%\begin{macro}{\glsxtrUpPhi} +%\changes{1.27}{2018-02-26}{new} % \begin{macrocode} -\ifdef{\@glsstyle@mcoltreegroup} -{% - \renewglossarystyle{mcoltreegroup}{% - \setglossarystyle{mcoltree}% - \renewcommand{\glsgroupheading}[1]{% - \glsxtrgetgrouptitle{##1}{\glsxtr@grptitle}% - \glstreePreHeader{##1}{\glsxtr@grptitle}% - \par\noindent\glstreegroupheaderfmt{\glsxtr@grptitle}% - \glstreegroupheaderskip\@afterheading - }% - } -}% -{% +\newcommand*{\glsxtrUpPhi}{% + \glshex 03C6% lower case phi + \string=\glshex 03D5,% lower case phi variant + \glshex 03A6% upper case phi } % \end{macrocode} -%Similarly for \glostyle{mcoltreehypergroup}. -%\changes{1.21}{2017-11-03}{redefined \texttt{mcoltreehypergroup} to discourage -%breaks after group headings} +%\end{macro} +% +%\begin{macro}{\glsxtrUpChi} +%\changes{1.27}{2018-02-26}{new} % \begin{macrocode} -\ifdef{\@glsstyle@mcoltreehypergroup} -{% - \renewglossarystyle{mcoltreehypergroup}{% - \setglossarystyle{mcoltree}% - \renewcommand*{\glossaryheader}{% - \par\noindent\glstreenavigationfmt{\glsnavigation}% - \glstreegroupheaderskip - }% - \renewcommand*{\glsgroupheading}[1]{% - \glsxtrgetgrouptitle{##1}{\glsxtr@grptitle}% - \glstreePreHeader{##1}{\glsxtr@grptitle}% - \par\noindent - \glstreegroupheaderfmt{\glsnavhypertarget{##1}{\glsxtr@grptitle}}% - \glstreegroupheaderskip\@afterheading - }% - } -}% -{% +\newcommand*{\glsxtrUpChi}{% + \glshex 03C7,% lower case chi + \glshex 03A7% upper case chi } % \end{macrocode} -%Similarly for \glostyle{mcoltreespannav}. -%\changes{1.21}{2017-11-03}{redefined \texttt{mcoltreespannav} to discourage -%breaks after group headings} +%\end{macro} +% +%\begin{macro}{\glsxtrUpPsi} +%\changes{1.27}{2018-02-26}{new} % \begin{macrocode} -\ifdef{\@glsstyle@mcoltreespannav} -{% - \renewglossarystyle{mcoltreespannav}{% - \setglossarystyle{tree}% - \renewenvironment{theglossary}% - {% - \begin{multicols}{\glsmcols}% - [\noindent\glstreenavigationfmt{\glsnavigation}]% - \setlength{\parindent}{0pt}% - \setlength{\parskip}{0pt plus 0.3pt}% - }% - {\end{multicols}}% - \renewcommand*{\glsgroupheading}[1]{% - \glsxtrgetgrouptitle{##1}{\glsxtr@grptitle}% - \glstreePreHeader{##1}{\glsxtr@grptitle}% - \par\noindent - \glstreegroupheaderfmt{\glsnavhypertarget{##1}{\glsxtr@grptitle}}% - \glstreegroupheaderskip\@afterheading - }% - } -}% -{% +\newcommand*{\glsxtrUpPsi}{% + \glshex 03C8,% lower case psi + \glshex 03A8% upper case psi } % \end{macrocode} -%Similarly for \glostyle{mcoltreenonamegroup}. -%\changes{1.21}{2017-11-03}{redefined \texttt{mcoltreenonamegroup} to discourage -%breaks after group headings} +%\end{macro} +% +%\begin{macro}{\glsxtrUpOmega} +%\changes{1.27}{2018-02-26}{new} % \begin{macrocode} -\ifdef{\@glsstyle@mcoltreenonamegroup} -{% - \renewglossarystyle{mcoltreenonamegroup}{% - \setglossarystyle{mcoltreenoname}% - \renewcommand{\glsgroupheading}[1]{% - \glsxtrgetgrouptitle{##1}{\glsxtr@grptitle}% - \glstreePreHeader{##1}{\glsxtr@grptitle}% - \par\noindent\glstreegroupheaderfmt{\glsxtr@grptitle}% - \glstreegroupheaderskip\@afterheading - }% - } -}% -{% +\newcommand*{\glsxtrUpOmega}{% + \glshex 03C9,% lower case omega + \glshex 03A9% upper case omega } % \end{macrocode} -%Similarly for \glostyle{mcoltreenonamehypergroup}. -%\changes{1.21}{2017-11-03}{redefined \texttt{mcoltreenonamehypergroup} to discourage -%breaks after group headings} +%\end{macro} +% +%\begin{macro}{\glsxtrMathItalicAlpha} +%\changes{1.27}{2018-02-26}{new} % \begin{macrocode} -\ifdef{\@glsstyle@mcoltreenonamehypergroup} -{% - \renewglossarystyle{mcoltreenonamehypergroup}{% - \setglossarystyle{mcoltreenoname}% - \renewcommand*{\glossaryheader}{% - \par\noindent\glstreenavigationfmt{\glsnavigation}% - \glstreegroupheaderskip - }% - \renewcommand*{\glsgroupheading}[1]{% - \glsxtrgetgrouptitle{##1}{\glsxtr@grptitle}% - \glstreePreHeader{##1}{\glsxtr@grptitle}% - \par\noindent - \glstreegroupheaderfmt{\glsnavhypertarget{##1}{\glsxtr@grptitle}}% - \glstreegroupheaderskip\@afterheading}% - } -}% -{% +\newcommand*{\glsxtrMathItalicAlpha}{% + \glshex 1D6FC,% lower case alpha (maths italic) + \glshex 1D6E2% upper case alpha (maths italic) } % \end{macrocode} -%Similarly for \glostyle{mcoltreenonamespannav}. -%\changes{1.21}{2017-11-03}{redefined \texttt{mcoltreenonamespannav} to discourage -%breaks after group headings} +%\end{macro} +% +%\begin{macro}{\glsxtrMathItalicBeta} +%\changes{1.27}{2018-02-26}{new} % \begin{macrocode} -\ifdef{\@glsstyle@mcoltreenonamespannav} -{% - \renewglossarystyle{mcoltreenonamespannav}{% - \setglossarystyle{treenoname}% - \renewenvironment{theglossary}% - {% - \begin{multicols}{\glsmcols}% - [\noindent\glstreenavigationfmt{\glsnavigation}]% - \setlength{\parindent}{0pt}% - \setlength{\parskip}{0pt plus 0.3pt}% - }% - {\end{multicols}}% - \renewcommand*{\glsgroupheading}[1]{% - \glsxtrgetgrouptitle{##1}{\glsxtr@grptitle}% - \glstreePreHeader{##1}{\glsxtr@grptitle}% - \par\noindent - \glstreegroupheaderfmt{\glsnavhypertarget{##1}{\glsxtr@grptitle}}% - \glstreegroupheaderskip\@afterheading}% - } -}% -{% +\newcommand*{\glsxtrMathItalicBeta}{% + \glshex 1D6FD,% lower case beta (maths italic) + \glshex 1D6E3% upper case beta (maths italic) } % \end{macrocode} -%\glostyle{mcolalttree} needs adjusting so that it uses \cs{glsxtralttreeInit} -%This doesn't use \verb|\mbox{}\par| which would unbalance the top -%of the columns. -%\changes{1.21}{2017-11-03}{adjusted mcolalttree} +%\end{macro} +% +%\begin{macro}{\glsxtrMathItalicGamma} +%\changes{1.27}{2018-02-26}{new} % \begin{macrocode} -\ifdef{\@glsstyle@mcolalttree} -{% - \renewglossarystyle{mcolalttree}{% - \setglossarystyle{alttree}% - \renewenvironment{theglossary}% - {% - \glsxtralttreeInit - \def\@gls@prevlevel{-1}% - \begin{multicols}{\glsmcols}% - }% - {\par\end{multicols}}% - } -}% -{% +\newcommand*{\glsxtrMathItalicGamma}{% + \glshex 1D6FE,% lower case gamma (maths italic) + \glshex 1D6E4% upper case gamma (maths italic) } % \end{macrocode} -%Redefine \glostyle{mcolalttreegroup} to discourage page breaks -%after the group headings. -%\changes{1.21}{2017-11-03}{redefined \texttt{mcolalttreegroup} to discourage -%breaks after group headings} +%\end{macro} +% +%\begin{macro}{\glsxtrMathItalicDelta} +%\changes{1.27}{2018-02-26}{new} % \begin{macrocode} -\ifdef{\@glsstyle@mcolalttreegroup} -{% - \renewglossarystyle{mcolalttreegroup}{% - \setglossarystyle{mcolalttree}% - \renewcommand{\glsgroupheading}[1]{% - \glsxtrgetgrouptitle{##1}{\glsxtr@grptitle}% - \glstreePreHeader{##1}{\glsxtr@grptitle}% - \par - \def\@gls@prevlevel{-1}% - \hangindent0pt\relax - \parindent0pt\relax - \glstreegroupheaderfmt{\glsxtr@grptitle}% - \glstreegroupheaderskip - }% - } -}% -{% +\newcommand*{\glsxtrMathItalicDelta}{% + \glshex 1D6FF,% lower case delta (maths italic) + \glshex 1D6E5% upper case delta (maths italic) } % \end{macrocode} -%Similarly for \glostyle{mcolalttreehypergroup}. -%\changes{1.21}{2017-11-03}{redefined \texttt{mcolalttreehypergroup} to discourage -%breaks after group headings} +%\end{macro} +% +%\begin{macro}{\glsxtrMathItalicEpsilon} +%\changes{1.27}{2018-02-26}{new} % \begin{macrocode} -\ifdef{\@glsstyle@mcolalttreehypergroup} -{% - \renewglossarystyle{mcolalttreehypergroup}{% - \setglossarystyle{mcolalttree}% - \renewcommand*{\glossaryheader}{% - \par - \def\@gls@prevlevel{-1}% - \hangindent0pt\relax - \parindent0pt\relax - \glstreenavigationfmt{\glsnavigation}% - \glstreegroupheaderskip - }% - \renewcommand*{\glsgroupheading}[1]{% - \glsxtrgetgrouptitle{##1}{\glsxtr@grptitle}% - \glstreePreHeader{##1}{\glsxtr@grptitle}% - \par - \def\@gls@prevlevel{-1}% - \hangindent0pt\relax - \parindent0pt\relax - \glstreegroupheaderfmt{\glsnavhypertarget{##1}{\glsxtr@grptitle}}% - \glstreegroupheaderskip - }% - } -}% -{% +\newcommand*{\glsxtrMathItalicEpsilon}{% + \glshex 1D700% lower case epsilon (maths italic) + \string=\glshex 1D716,% lower case epsilon variant (maths italic) + \glshex 1D6E6% upper case epsilon (maths italic) } % \end{macrocode} -%Similarly for \glostyle{mcolalttreespannav}. -%\changes{1.21}{2017-11-03}{redefined \texttt{mcolalttreespannav} to discourage -%breaks after group headings} +%\end{macro} +% +%\begin{macro}{\glsxtrMathItalicZeta} +%\changes{1.27}{2018-02-26}{new} % \begin{macrocode} -\ifdef{\@glsstyle@mcolalttreespannav} -{% - \renewglossarystyle{mcolalttreespannav}{% - \setglossarystyle{alttree}% - \renewenvironment{theglossary}% - {% - \glsxtralttreeInit - \def\@gls@prevlevel{-1}% - \begin{multicols}{\glsmcols}% - [\noindent\glstreenavigationfmt{\glsnavigation}]% - }% - {\par\end{multicols}}% - \renewcommand*{\glsgroupheading}[1]{% - \glsxtrgetgrouptitle{##1}{\glsxtr@grptitle}% - \glstreePreHeader{##1}{\glsxtr@grptitle}% - \par - \def\@gls@prevlevel{-1}% - \hangindent0pt\relax - \parindent0pt\relax - \glstreegroupheaderfmt{\glsnavhypertarget{##1}{\glsxtr@grptitle}}% - \glstreegroupheaderskip - }% - } -}% -{% +\newcommand*{\glsxtrMathItalicZeta}{% + \glshex 1D701,% lower case zeta (maths italic) + \glshex 1D6E7% upper case zeta (maths italic) } % \end{macrocode} +%\end{macro} % -% Reset the default style +%\begin{macro}{\glsxtrMathItalicEta} +%\changes{1.27}{2018-02-26}{new} % \begin{macrocode} -\ifx\@glossary@default@style\relax -\else - \setglossarystyle{\@glsxtr@current@style} -\fi +\newcommand*{\glsxtrMathItalicEta}{% + \glshex 1D702,% lower case eta (maths italic) + \glshex 1D6E8% upper case eta (maths italic) +} % \end{macrocode} -%\iffalse +%\end{macro} +% +%\begin{macro}{\glsxtrMathItalicTheta} +%\changes{1.27}{2018-02-26}{new} % \begin{macrocode} -% +\newcommand*{\glsxtrMathItalicTheta}{% + \glshex 1D703% lower case theta (maths italic) + \string=\glshex 1D717,% lower case theta variant (maths italic) + \glshex 1D6E9% upper case theta (maths italic) + \string=\glshex 1D6F3% upper case theta variant (maths italic) +} % \end{macrocode} -%\fi -%\iffalse +%\end{macro} +% +%\begin{macro}{\glsxtrMathItalicIota} +%\changes{1.27}{2018-02-26}{new} % \begin{macrocode} -%<*glossary-bookindex.sty> +\newcommand*{\glsxtrMathItalicIota}{% + \glshex 1D704,% lower case iota (maths italic) + \glshex 1D6EA% upper case iota (maths italic) +} % \end{macrocode} -%\fi -%\chapter{bookindex style (\styfmt{glossary-bookindex.sty})} -%\changes{1.21}{2017-11-03}{new} -%\section{Package Initialisation and Options} +%\end{macro} +% +%\begin{macro}{\glsxtrMathItalicKappa} +%\changes{1.27}{2018-02-26}{new} % \begin{macrocode} -\NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{glossary-bookindex}[2021/11/22 v1.48 (NLCT)] +\newcommand*{\glsxtrMathItalicKappa}{% + \glshex 1D705% lower case kappa (maths italic) + \string=\glshex 1D718,% lower case kappa variant (maths italic) + \glshex 1D6EB% upper case kappa (maths italic) +} % \end{macrocode} -%Load required packages. +%\end{macro} +% +%\begin{macro}{\glsxtrMathItalicLambda} +%\changes{1.27}{2018-02-26}{new} % \begin{macrocode} -\RequirePackage{multicol} -\RequirePackage{glossary-tree} +\newcommand*{\glsxtrMathItalicLambda}{% + \glshex 1D706,% lower case lambda (maths italic) + \glshex 1D6EC% upper case lambda (maths italic) +} % \end{macrocode} -%\begin{macro}{\glsxtrbookindexcols} -%\changes{1.21}{2017-11-03}{new} -% Number of columns. +%\end{macro} +% +%\begin{macro}{\glsxtrMathItalicMu} +%\changes{1.27}{2018-02-26}{new} % \begin{macrocode} -\newcommand{\glsxtrbookindexcols}{2} +\newcommand*{\glsxtrMathItalicMu}{% + \glshex 1D707,% lower case mu (maths italic) + \glshex 1D6ED% upper case mu (maths italic) +} % \end{macrocode} %\end{macro} -%\begin{macro}{\glsxtrbookindexname} -%\changes{1.21}{2017-11-03}{new} -%Format used for top-level entries. -% (Argument is the label.) +% +%\begin{macro}{\glsxtrMathItalicNu} +%\changes{1.27}{2018-02-26}{new} % \begin{macrocode} -\newcommand*{\glsxtrbookindexname}[1]{\glossentryname{#1}} +\newcommand*{\glsxtrMathItalicNu}{% + \glshex 1D708,% lower case nu (maths italic) + \glshex 1D6EE% upper case nu (maths italic) +} % \end{macrocode} %\end{macro} -%\begin{macro}{\glsxtrbookindexsubname} -%\changes{1.21}{2017-11-03}{new} -%Format used for sub entries. +% +%\begin{macro}{\glsxtrMathItalicXi} +%\changes{1.27}{2018-02-26}{new} % \begin{macrocode} -\newcommand*{\glsxtrbookindexsubname}[1]{\glsxtrbookindexname{#1}} +\newcommand*{\glsxtrMathItalicXi}{% + \glshex 1D709,% lower case xi (maths italic) + \glshex 1D6EF% upper case xi (maths italic) +} % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrprelocation} -%\changes{1.21}{2017-11-03}{new} -%Provide in case \sty{glossaries-stylemods} isn't loaded. -% \begin{macrocode} -\providecommand*{\glsxtrprelocation}{\space} -% \end{macrocode} -%\end{macro} - -%\begin{macro}{\glsxtrbookindexprelocation} -%\changes{1.21}{2017-11-03}{new} -%Separator used before location list for top-level entries. -%Version 1.22 has removed the \cs{ifglsnopostdot} check -%since this style doesn't display the description. -%\changes{1.22}{2017-11-08}{removed check for no post dot} +%\begin{macro}{\glsxtrMathItalicOmicron} +%\changes{1.27}{2018-02-26}{new} % \begin{macrocode} -\newcommand*{\glsxtrbookindexprelocation}[1]{% - \glsxtrifhasfield{location}{#1}% - {,\glsxtrprelocation}% - {\glsxtrprelocation}% +\newcommand*{\glsxtrMathItalicOmicron}{% + \glshex 1D70A,% lower case omicron (maths italic) + \glshex 1D6F0% upper case omicron (maths italic) } % \end{macrocode} %\end{macro} -%\begin{macro}{\glsxtrbookindexsubprelocation} -%\changes{1.21}{2017-11-03}{new} -%Separator used before location list for sub-entries. +% +%\begin{macro}{\glsxtrMathItalicPi} +%\changes{1.27}{2018-02-26}{new} % \begin{macrocode} -\newcommand*{\glsxtrbookindexsubprelocation}[1]{% - \glsxtrbookindexprelocation{#1}% +\newcommand*{\glsxtrMathItalicPi}{% + \glshex 1D70B% lower case pi (maths italic) + \string=\glshex 1D71B,% lower case pi variant (maths italic) + \glshex 1D6F1% upper case pi (maths italic) } % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrbookindexlocation} -%\changes{1.39}{2019-03-22}{new} -%\begin{definition} -%\cs{glsxtrbookindexlocation}\marg{label}\marg{location} -%\end{definition} -%Displays the location. +%\begin{macro}{\glsxtrMathItalicRho} +%\changes{1.27}{2018-02-26}{new} % \begin{macrocode} -\newcommand*{\glsxtrbookindexlocation}[2]{#2} +\newcommand*{\glsxtrMathItalicRho}{% + \glshex 1D70C% lower case rho (maths italic) + \string=\glshex 1D71A,% lower case rho variant (maths italic) + \glshex 1D6F2% upper case rho (maths italic) +} % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrbookindexsublocation} -%\changes{1.39}{2019-03-22}{new} -%\begin{definition} -%\cs{glsxtrbookindexlocation}\marg{label}\marg{location} -%\end{definition} -%Displays the location for sub-entries. +%\begin{macro}{\glsxtrMathItalicSigma} +%\changes{1.27}{2018-02-26}{new} % \begin{macrocode} -\newcommand*{\glsxtrbookindexsublocation}{\glsxtrbookindexlocation} +\newcommand*{\glsxtrMathItalicSigma}{% + \glshex 1D70D% lower case final sigma (maths italic) + \string=\glshex 1D70E,% lower case sigma (maths italic) + \glshex 1D6F4% upper case sigma (maths italic) +} % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrbookindexparentchildsep} -%\changes{1.21}{2017-11-03}{new} -%Separator used between top-level parent and child entry. -% \begin{macrocode} -\newcommand{\glsxtrbookindexparentchildsep}{\nopagebreak} -% \end{macrocode} -%\end{macro} -%\begin{macro}{\glsxtrbookindexparentsubchildsep} -%\changes{1.21}{2017-11-03}{new} -%Separator used between sub-level parent and child entry. +%\begin{macro}{\glsxtrMathItalicTau} +%\changes{1.27}{2018-02-26}{new} % \begin{macrocode} -\newcommand{\glsxtrbookindexparentsubchildsep}{\glsxtrbookindexparentchildsep} +\newcommand*{\glsxtrMathItalicTau}{% + \glshex 1D70F,% lower case tau (maths italic) + \glshex 1D6F5% upper case tau (maths italic) +} % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrbookindexbetween} -%\changes{1.21}{2017-11-03}{new} -%Between two top-level entries identified by the labels in the -%arguments. +%\begin{macro}{\glsxtrMathItalicUpsilon} +%\changes{1.27}{2018-02-26}{new} % \begin{macrocode} -\newcommand{\glsxtrbookindexbetween}[2]{} +\newcommand*{\glsxtrMathItalicUpsilon}{% + \glshex 1D710,% lower case upsilon (maths italic) + \glshex 1D6F6% upper case upsilon (maths italic) +} % \end{macrocode} %\end{macro} -%\begin{macro}{\glsxtrbookindexsubbetween} -%\changes{1.21}{2017-11-03}{new} -%Between two level~1 entries identified by the labels in the -%arguments. +% +%\begin{macro}{\glsxtrMathItalicPhi} +%\changes{1.27}{2018-02-26}{new} % \begin{macrocode} -\newcommand{\glsxtrbookindexsubbetween}[2]{} +\newcommand*{\glsxtrMathItalicPhi}{% + \glshex 1D711% lower case phi (maths italic) + \string=\glshex 1D719,% lower case phi variant (maths italic) + \glshex 1D6F7% upper case phi (maths italic) +} % \end{macrocode} %\end{macro} -%\begin{macro}{\glsxtrbookindexsubsubbetween} -%\changes{1.21}{2017-11-03}{new} -%Between two level~2 entries identified by the labels in the -%arguments. +% +%\begin{macro}{\glsxtrMathItalicChi} +%\changes{1.27}{2018-02-26}{new} % \begin{macrocode} -\newcommand{\glsxtrbookindexsubsubbetween}[2]{} +\newcommand*{\glsxtrMathItalicChi}{% + \glshex 1D712,% lower case chi (maths italic) + \glshex 1D6F8% upper case chi (maths italic) +} % \end{macrocode} %\end{macro} -%\begin{macro}{\glsxtrbookindexatendgroup} -%\changes{1.21}{2017-11-03}{new} -%At the end of a letter group. The argument is the index of the last -%top-level entry. +% +%\begin{macro}{\glsxtrMathItalicPsi} +%\changes{1.27}{2018-02-26}{new} % \begin{macrocode} -\newcommand{\glsxtrbookindexatendgroup}[1]{} +\newcommand*{\glsxtrMathItalicPsi}{% + \glshex 1D713,% lower case psi (maths italic) + \glshex 1D6F9% upper case psi (maths italic) +} % \end{macrocode} %\end{macro} -%\begin{macro}{\glsxtrbookindexsubatendgroup} -%\changes{1.21}{2017-11-03}{new} -%At the end of a letter group. The argument is the index of the last -%level~1 entry. +% +%\begin{macro}{\glsxtrMathItalicOmega} +%\changes{1.27}{2018-02-26}{new} % \begin{macrocode} -\newcommand{\glsxtrbookindexsubatendgroup}[1]{} +\newcommand*{\glsxtrMathItalicOmega}{% + \glshex 1D714,% lower case omega (maths italic) + \glshex 1D6FA% upper case omega (maths italic) +} % \end{macrocode} %\end{macro} -%\begin{macro}{\glsxtrbookindexsubsubatendgroup} -%\changes{1.21}{2017-11-03}{new} -%At the end of a letter group. The argument is the index of the last -%level~2 entry. +% +%\begin{macro}{\glsxtrMathItalicPartial} +%\changes{1.27}{2018-02-26}{new} % \begin{macrocode} -\newcommand{\glsxtrbookindexsubsubatendgroup}[1]{} +\newcommand*{\glsxtrMathItalicPartial}{% + \glshex 1D715% partial differential (maths italic) +} % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrbookindexgroupskip} -%\changes{1.21}{2017-11-03}{new} -%Group separator. +%\begin{macro}{\glsxtrMathItalicNabla} +%\changes{1.27}{2018-02-26}{new} % \begin{macrocode} -\newcommand{\glsxtrbookindexgroupskip}{\ifglsnogroupskip\else\indexspace\fi} +\newcommand*{\glsxtrMathItalicNabla}{% + \glshex 1D6FB% nabla (maths italic) +} % \end{macrocode} %\end{macro} % -%Format group title. -%\begin{macro}{\glsxtrbookindexformatheader} -%\changes{1.21}{2017-11-03}{new} -%Group separator. +%\begin{macro}{\glsxtrdigitrules} +%\changes{1.27}{2018-02-26}{new} +%Digits from the Basic Latin set and subscript and superscript digit +%rules. % \begin{macrocode} -\newcommand*{\glsxtrbookindexformatheader}[1]{% - \par{\centering\glstreegroupheaderfmt{#1}\par}% +\newcommand*{\glsxtrdigitrules}{% + 0\string=\glshex 2080\string=\glshex 2070 + \string<1\string=\glshex 2081\string=\glshex 00B9 + \string<2\string=\glshex 2082\string=\glshex 00B2 + \string<3\string=\glshex 2083\string=\glshex 00B3 + \string<4\string=\glshex 2084\string=\glshex 2074 + \string<5\string=\glshex 2085\string=\glshex 2075 + \string<6\string=\glshex 2086\string=\glshex 2076 + \string<7\string=\glshex 2087\string=\glshex 2077 + \string<8\string=\glshex 2088\string=\glshex 2078 + \string<9\string=\glshex 2089\string=\glshex 2079 } % \end{macrocode} %\end{macro} -%\begin{macro}{\glsxtrbookindexbookmark} -%\changes{1.21}{2017-11-03}{new} -%Book mark group heading if supported. +% +%\begin{macro}{\glsxtrBasicDigitrules} +%\changes{1.27}{2018-02-26}{new} +%Digits from the Basic Latin set. % \begin{macrocode} -\ifdef\pdfbookmark -{% - \newcommand*{\glsxtrbookindexbookmark}[2]{% - \ifdefstring{\@@glossarysec}{chapter}% - {\pdfbookmark[1]{#1}{#2}}% - {\pdfbookmark[2]{#1}{#2}}% - } -} -{% - \newcommand*{\glsxtrbookindexbookmark}[2]{} +\newcommand*{\glsxtrBasicDigitrules}{% + 0\string<1\string<2\string<3\string<4% + \string<5\string<6\string<7\string<8\string<9% } % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrbookindexbookmarkprefix} -%\changes{1.42}{2020-02-03}{new} -%Make the bookmark label prefix used for letter groups depend on the glossary label -%(instead of original hardcoded ``index.''). +%\begin{macro}{\glsxtrSubScriptDigitrules} +%\changes{1.27}{2018-02-26}{new} +%Subscript digits. % \begin{macrocode} -\newcommand*{\glsxtrbookindexbookmarkprefix}{\currentglossary.} +\newcommand*{\glsxtrSubScriptDigitrules}{% + \glshex 2080% subscript 0 + \string<\glshex 2081% subscript 1 + \string<\glshex 2082% subscript 2 + \string<\glshex 2083% subscript 3 + \string<\glshex 2084% subscript 4 + \string<\glshex 2085% subscript 5 + \string<\glshex 2086% subscript 6 + \string<\glshex 2087% subscript 7 + \string<\glshex 2088% subscript 8 + \string<\glshex 2089% subscript 9 +} % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrbookindexcolspread} -%\changes{1.21}{2017-11-03}{new} +%\begin{macro}{\glsxtrSuperScriptDigitrules} +%\changes{1.27}{2018-02-26}{new} +%Superscript digits. % \begin{macrocode} -\newcommand*{\glsxtrbookindexcolspread}{} +\newcommand*{\glsxtrSuperScriptDigitrules}{% + \glshex 2070% superscript 0 + \string<\glshex 00B9% superscript 1 + \string<\glshex 00B2% superscript 2 + \string<\glshex 00B3% superscript 3 + \string<\glshex 2074% superscript 4 + \string<\glshex 2075% superscript 5 + \string<\glshex 2076% superscript 6 + \string<\glshex 2077% superscript 7 + \string<\glshex 2078% superscript 8 + \string<\glshex 2079% superscript 9 +} % \end{macrocode} %\end{macro} % -%\begin{macro}{\glsxtrbookindexmulticolsenv} -%\changes{1.25}{2017-11-14}{new} +%\begin{macro}{\glsxtrfractionrules} +%\changes{1.27}{2018-02-26}{new} +%Vulgar fractions. % \begin{macrocode} -\newcommand*{\glsxtrbookindexmulticolsenv}{multicols} +\newcommand*{\glsxtrfractionrules}{% + \glshex 215F% fraction numerator one (1/) + \string<\glshex 2189% zero thirds (0/3 = 0) + \string<\glshex 2152% one tenth (1/10 = 0.1) + \string<\glshex 2151% one ninth (1/9 ~ 0.111) + \string<\glshex 215B% one eighth (1/8 = 0.125) + \string<\glshex 2150% one seventh (1/7 ~ 0.143) + \string<\glshex 2159% one sixth (1/6 ~ 0.167) + \string<\glshex 2155% one fifth (1/5 = 0.2) + \string<\glshex 00BC% one quarter (1/4 = 0.25) + \string<\glshex 2153% one third (1/3 ~ 0.333) + \string<\glshex 215C% three eighths (3/8 = 0.375) + \string<\glshex 2156% two fifths (2/5 = 0.4) + \string<\glshex 00BD% one half (1/2 = 0.5) + \string<\glshex 2157% three fifths (3/5 = 0.6) + \string<\glshex 215D% five eighths (5/8 = 0.625) + \string<\glshex 2154% two thirds (2/3 ~ 0.667) + \string<\glshex 00BE% three quarters (3/4 = 0.75) + \string<\glshex 2158% four fifths (4/5 = 0.8) + \string<\glshex 215A% five sixths (5/6 ~ 0.833) + \string<\glshex 215E% seven eighths (7/8 = 0.875) +} % \end{macrocode} %\end{macro} % -%Define the style. +%\begin{macro}{\@glsxtrdialecthook} +%Check for scripts associated with the document dialects. +%\changes{1.28}{2018-03-06}{save and restore \cs{TrackLangRequireDialectPrefix}} % \begin{macrocode} -\newglossarystyle{bookindex}{% - \setglossarystyle{index}% - \renewenvironment{theglossary}% +\renewcommand{\@glsxtrdialecthook}{% + \ifundef\CurrentTrackedScript {% - \ifnum\glsxtrbookindexcols>1\relax - \ifdefempty\glsxtrbookindexcolspread - {% - \edef\glsxtr@beginbookindex{% - \noexpand\begin{\glsxtrbookindexmulticolsenv} - {\glsxtrbookindexcols}% - }% - }% - {% - \edef\glsxtr@beginbookindex{% - \noexpand\begin{\glsxtrbookindexmulticolsenv}% - {\glsxtrbookindexcols}[\glsxtrbookindexcolspread]% - }% - }% - \else - \def\glsxtr@beginbookindex{}% - \fi - \glsxtr@beginbookindex - \setlength{\parindent}{0pt}% - \setlength{\parskip}{0pt plus 0.3pt}% - \let\@glsxtr@bookindex@sep\glsxtrbookindexparentchildsep - \let\@glsxtr@bookindex@subsep\glsxtrbookindexparentsubchildsep - \let\@glsxtr@bookindex@between\@gobble - \let\@glsxtr@bookindex@subbetween\@gobble - \let\@glsxtr@bookindex@subsubbetween\@gobble - \let\@glsxtr@bookindex@atendgroup\relax - \let\@glsxtr@bookindex@subatendgroup\relax - \let\@glsxtr@bookindex@subsubatendgroup\relax - \let\@glsxtr@bookindexgroupskip\relax + \TrackLangIfHasDefaultScript{\CurrentTrackedLanguage}% + {% + \edef\CurrentTrackedScript{% + \TrackLangGetDefaultScript\CurrentTrackedLanguage}% + }% + {}% }% + {}% + \ifdef\CurrentTrackedScript {% -% \end{macrocode} -% Do end group hooks. -% \begin{macrocode} - \@glsxtr@bookindex@subsubatendgroup - \@glsxtr@bookindex@subatendgroup - \@glsxtr@bookindex@atendgroup -% \end{macrocode} -%End \env{multicols} environment. -% \begin{macrocode} - \ifnum\glsxtrbookindexcols>1\relax - \edef\glsxtr@endbookindex{% - \noexpand\end{\glsxtrbookindexmulticolsenv}% - }% - \else - \def\glsxtr@endbookindex{}% - \fi - \glsxtr@endbookindex + \let\gls@orgTrackLangRequireDialectPrefix\TrackLangRequireDialectPrefix + \def\TrackLangRequireDialectPrefix{glossariesxtr-}% + \let\CurrentTrackedTag\CurrentTrackedScript + \IfFileExists{\TrackLangRequireDialectPrefix\CurrentTrackedTag.ldf} + {\RequireGlossariesExtraLang{\CurrentTrackedTag}}% + {}% + \let\TrackLangRequireDialectPrefix\gls@orgTrackLangRequireDialectPrefix }% + {}% +} % \end{macrocode} -%Use ragged right as columns are likely to be narrow and -%indexes tend not to be fully justified. +%\end{macro} +%If \cs{glsxtr@loaddialect} has been defined, then +%\sty{glossaries-extra-bib2gls} has been loaded after +%\sty{glossaries-extra}. (For example, through +%\cs{glossariesextrasetup}.) Not recommended, but if this has been +%done try to find the associated language resources. % \begin{macrocode} - \renewcommand*{\glossaryheader}{\raggedright}% +\ifdef\glsxtr@loaddialect +{% + \@ifpackageloaded{tracklang} + {% + \AnyTrackedLanguages + {% + \ForEachTrackedDialect{\this@dialect}{\glsxtr@loaddialect}% + }% + {}% + } + {} +} +{} % \end{macrocode} -%Top level entry format. +%\iffalse % \begin{macrocode} - \renewcommand*{\glossentry}[2]{% +% % \end{macrocode} -%Do separator. +%\fi +%\iffalse % \begin{macrocode} - \@glsxtr@bookindex@between{##1}% +%<*glossaries-extra-stylemods.sty> % \end{macrocode} -%Update separators. +%\fi +%\section{Style Adjustments (\sty{glossaries-extra-stylemods.sty})} +% This package adjusts the predefined styles so that they include the post +% description hook. Also, some other minor adjustments may be made +% to make existing styles more flexible. +% +%\subsection{Package Initialisation} +% First identify package: % \begin{macrocode} - \let\@glsxtr@bookindex@sep\glsxtrbookindexparentchildsep - \let\@glsxtr@bookindex@subsep\glsxtrbookindexparentsubchildsep - \let\@glsxtr@bookindex@subbetween\@gobble - \let\@glsxtr@bookindex@subsubbetween\@gobble - \edef\@glsxtr@bookindex@between{% - \noexpand\glsxtrbookindexbetween{##1}% - }% - \edef\@glsxtr@bookindex@atendgroup{% - \noexpand\glsxtrbookindexatendgroup{##1}% - }% - \let\@glsxtr@bookindex@subatendgroup\relax - \let\@glsxtr@bookindex@subsubatendgroup\relax +\NeedsTeXFormat{LaTeX2e} % \end{macrocode} -%Format entry. +% Rollback releases: % \begin{macrocode} - \glstreeitem - \glsentryitem{##1}% - \glstarget{##1}{\glsxtrbookindexname{##1}}% - \glsxtrbookindexprelocation{##1}% - \glsxtrbookindexlocation{##1}{##2}% - }% - \renewcommand{\subglossentry}[3]{% - \ifcase##1\relax +\DeclareRelease{v1.48}{2021-11-22}{glossaries-extra-stylemods-2021-11-22.sty} +\DeclareCurrentRelease{v1.49}{2022-10-14} % \end{macrocode} -% Level 0 (shouldn't happen as that's formatted with \cs{glossentry}). +% Declare package: % \begin{macrocode} - \glstreeitem - \or +\ProvidesPackage{glossaries-extra-stylemods}[2022/10/14 v1.49 (NLCT)] % \end{macrocode} -% Level 1. +% Provide package options to automatically load required predefined +% styles. The simplest method is to just test for the existence of +% the file \texttt{glossary-}\meta{option}\texttt{.sty}. Packages +% can't be loaded whilst the options are being processed, so save +% the list in \cs{@glsxtr@loadstyles}. +%\begin{macro}{\@glsxtr@loadstyles} % \begin{macrocode} - \@glsxtr@bookindex@sep - \@glsxtr@bookindex@subbetween{##2}% - \let\@glsxtr@bookindex@sep\relax +\newcommand*{\@glsxtr@loadstyles}{} % \end{macrocode} -% Update separators. +%\end{macro} +% +%\begin{option}{all} +%\changes{1.21}{2017-11-03}{new} +%\changes{1.38}{2018-12-01}{added \sty{glossary-longextra}} +%\changes{1.40}{2019-03-22}{added \sty{glossary-topic}} +%Provide all known styles. % \begin{macrocode} - \let\@glsxtr@bookindex@subsubbetween\@gobble - \let\@glsxtr@bookindex@subsep\glsxtrbookindexparentsubchildsep - \edef\@glsxtr@bookindex@subbetween{% - \noexpand\glsxtrbookindexsubbetween{##2}% - }% - \edef\@glsxtr@bookindex@atsubendgroup{% - \noexpand\glsxtrbookindexatsubendgroup{##1}% - }% +\DeclareOption{all}{% + \appto\@glsxtr@loadstyles{% + \RequirePackage{glossary-inline}% + \RequirePackage{glossary-list}% + \RequirePackage{glossary-tree}% + \RequirePackage{glossary-mcols}% + \RequirePackage{glossary-long}% + \RequirePackage{glossary-longragged}% + \RequirePackage{glossary-longbooktabs}% + \RequirePackage{glossary-super}% + \RequirePackage{glossary-superragged}% + \RequirePackage{glossary-bookindex}% + \RequirePackage{glossary-longextra}% + \RequirePackage{glossary-topic}% + } +} % \end{macrocode} -% Start sub-item. +%\end{option} +% % \begin{macrocode} - \glstreesubitem - \glssubentryitem{##2}% - \else +\DeclareOption*{% + \IfFileExists{glossary-\CurrentOption.sty} + {\eappto\@glsxtr@loadstyles{% + \noexpand\RequirePackage{glossary-\CurrentOption}}% + }% + {% + \PackageError{glossaries-extra-styles}% + {Unknown option `\CurrentOption'}{}% + }% +} % \end{macrocode} -% All other levels. +% Process the package options: % \begin{macrocode} - \@glsxtr@bookindex@subsep - \@glsxtr@bookindex@subsubbetween{##2}% +\ProcessOptions % \end{macrocode} -% Update separators. +% +% Load the required packages: % \begin{macrocode} - \let\@glsxtr@bookindex@subsep\relax - \edef\@glsxtr@bookindex@subsubbetween{% - \noexpand\glsxtrbookindexsubsubbetween{##2}% - }% - \edef\@glsxtr@bookindex@atsubsubendgroup{% - \noexpand\glsxtrbookindexatsubsubendgroup{##1}% - }% +\@glsxtr@loadstyles % \end{macrocode} -% Start sub-sub-item. +% Adjust the styles so that they all have the post description hook. +% Also, instead of having a hard-coded \cs{space} before the +% location, use: +%\begin{macro}{\glsxtrprelocation} +%\changes{1.21}{2017-11-03}{new} +%This uses \cs{providecommand} as the same command is also +%provided by \sty{glossary-bookindex}. % \begin{macrocode} - \glstreesubsubitem - \fi +\providecommand*{\glsxtrprelocation}{\space} % \end{macrocode} -% Format entry. +%\end{macro} +% +%In case we have an old version of \sty{glossaries}: +%\begin{macro}{\renewglossarystyle} % \begin{macrocode} - \glstarget{##2}{\glsxtrbookindexsubname{##2}}% - \glsxtrbookindexsubprelocation{##2}% - \glsxtrbookindexsublocation{##2}{##3}% +\providecommand{\renewglossarystyle}[2]{% + \ifcsundef{@glsstyle@#1}% + {% + \PackageError{glossaries-extra}{Glossary style `#1' isn't already defined}{}% }% + {% + \csdef{@glsstyle@#1}{#2}% + }% +} % \end{macrocode} -% The group skip is moved to the group heading to avoid interfering -% with the end letter group hooks. -% \begin{macrocode} - \renewcommand*{\glsgroupskip}{}% -% \end{macrocode} -% Group heading format. -% \begin{macrocode} - \renewcommand*{\glsgroupheading}[1]{% -% \end{macrocode} -% Do end group hooks. +%\end{macro} +% +%\subsection{List-Like Styles} +% The list-like styles mostly already use the post description hook. +% Only the \glostyle{listdotted} style need modifying to add this. % \begin{macrocode} - \@glsxtr@bookindex@subsubatendgroup - \@glsxtr@bookindex@subatendgroup - \@glsxtr@bookindex@atendgroup - \@glsxtr@bookindexgroupskip -% \end{macrocode} -% Update separators. -% \begin{macrocode} - \let\@glsxtr@bookindexgroupskip\glsxtrbookindexgroupskip - \let\@glsxtr@bookindex@between\@gobble - \let\@glsxtr@bookindex@atendgroup\relax - \let\@glsxtr@bookindex@subatendgroup\relax - \let\@glsxtr@bookindex@subsubatendgroup\relax -% \end{macrocode} -% Fetch the group title from the label supplied in \verb|#1|. -%\changes{1.41}{2019-04-09}{changed \cs{thisgrptitle} to -%\cs{glsxtrcurrentgrptitle}}% -% \begin{macrocode} - \glsxtrgetgrouptitle{##1}{\glsxtrcurrentgrptitle}% +\ifdef{\@glsstyle@listdotted} +{% + \renewglossarystyle{listdotted}{% + \setglossarystyle{list}% + \renewcommand*{\glossentry}[2]{% + \item[]\makebox[\glslistdottedwidth][l]{% + \glsentryitem{##1}% + \glstarget{##1}{\glossentryname{##1}}% + \unskip\leaders\hbox to 2.9mm{\hss.}\hfill\strut}% + \glossentrydesc{##1}\glspostdescription}% + \renewcommand*{\subglossentry}[3]{% + \item[]\makebox[\glslistdottedwidth][l]{% + \glssubentryitem{##2}% + \glstarget{##2}{\glossentryname{##2}}% + \unskip\leaders\hbox to 2.9mm{\hss.}\hfill\strut}% + \glossentrydesc{##2}\glspostdescription}% + } +} +{% % \end{macrocode} -% Do the PDF bookmark if supported. +% Assume the style isn't required if it hasn't already been defined. % \begin{macrocode} - \glsxtrbookindexbookmark{\glsxtrcurrentgrptitle}{\glsxtrbookindexbookmarkprefix##1}% +} % \end{macrocode} -% Format the group title. +% The \glostyle{sublistdotted} style doesn't display the description +% for top-level entries. Sub-level entries use the +% \glostyle{listdottedstyle}. +% +%The other list styles would be easier to adapt if the space +%before the number list wasn't hard coded. +%\changes{1.21}{2017-11-03}{modified list to remove hard coded \cs{space}} % \begin{macrocode} - \glsxtrbookindexformatheader{\glsxtrcurrentgrptitle}% - \nopagebreak\indexspace\nopagebreak\@afterheading - }% -} +\ifdef{\@glsstyle@list} +{% % \end{macrocode} -% Some supplementary commands that may be useful. -% These store the entry label for the current page. Since the page -% number is needed in the control sequence, this uses -% \cs{glsxtrbookindexthepage} instead of \cs{thepage} in case -% the page numbering has been set to something that contains -% formatting commands. -%\begin{macro}{\glsxtrbookindexthepage} +%\begin{macro}{\glslistprelocation} %\changes{1.21}{2017-11-03}{new} -%The \cs{@printglossary} sets \cs{currentglossary} to the current -%glossary label. This is used as a prefix in case the page number is -%reset. +%Space before number list for top-level entries. % \begin{macrocode} -\newcommand{\glsxtrbookindexthepage}{% - \ifdef\currentglossary{\currentglossary.\arabic{page}}{\arabic{page}}% -} + \newcommand{\glslistprelocation}{\glsxtrprelocation} % \end{macrocode} %\end{macro} -% -%\begin{macro}{\glsxtrbookindexmarkentry} +%\begin{macro}{\glslistchildprelocation} %\changes{1.21}{2017-11-03}{new} -%Writes entry information to the \texttt{.aux} file. The argument is -%the entry label. +%Space before number list for child entries. % \begin{macrocode} -\newcommand*{\glsxtrbookindexmarkentry}[1]{% - \protected@write\@auxout - {\let\glsxtrbookindexthepage\relax}% - {\string\glsxtr@setbookindexmark{\glsxtrbookindexthepage}{#1}}% -} + \newcommand{\glslistchildprelocation}{\glslistprelocation} % \end{macrocode} %\end{macro} -%\begin{macro}{\glsxtr@setbookindexmark} +%\begin{macro}{\glslistchildpostlocation} %\changes{1.21}{2017-11-03}{new} +%Full stop after number list. % \begin{macrocode} -\newcommand*{\glsxtr@setbookindexmark}[2]{% - \ifcsundef{glsxtr@idxfirstmark@#1}% - {\csgdef{glsxtr@idxfirstmark@#1}{#2}}% - {}% - \csgdef{glsxtr@idxlastmark@#1}{#2}% -} + \newcommand{\glslistchildpostlocation}{.} % \end{macrocode} %\end{macro} -% -%\begin{macro}{\glsxtrbookindexfirstmarkfmt} -%\changes{1.21}{2017-11-03}{new} +%\begin{macro}{\glslistdesc} +%\changes{1.31}{2018-05-09}{new} % \begin{macrocode} -\newcommand*{\glsxtrbookindexfirstmarkfmt}[1]{% - \glsentryname{#1}% -} + \newcommand{\glslistdesc}[1]{\glossentrydesc{#1}\glspostdescription} % \end{macrocode} %\end{macro} -%\begin{macro}{\glsxtrbookindexfirstmark} -%\changes{1.21}{2017-11-03}{new} +%\begin{macro}{\glslistgroupskip} +%\changes{1.41}{2019-04-09}{new} % \begin{macrocode} -\newcommand*{\glsxtrbookindexfirstmark}{% - \letcs{\glsxtr@label}{glsxtr@idxfirstmark@\glsxtrbookindexthepage}% - \ifdef\glsxtr@label - {\glsxtrbookindexfirstmarkfmt{\glsxtr@label}}% - {}% -} + \newcommand{\glslistgroupskip}{\nobreak\indexspace\nobreak} % \end{macrocode} %\end{macro} -% -%\begin{macro}{\glsxtrbookindexlastmarkfmt} -%\changes{1.21}{2017-11-03}{new} +%\begin{macro}{\glslistitem} +%\changes{1.47}{2021-11-04}{new} % \begin{macrocode} -\newcommand*{\glsxtrbookindexlastmarkfmt}[1]{% - \glsentryname{#1}% -} + \newcommand{\glslistitem}[1]{% + \item[\glsentryitem{#1}% + \glstarget{#1}{\glossentryname{#1}}]% + } % \end{macrocode} %\end{macro} -%\begin{macro}{\glsxtrbookindexlastmark} -%\changes{1.21}{2017-11-03}{new} +%\begin{macro}{\glslistinit} +%\changes{1.47}{2021-11-04}{new} +%This command was only added to \sty{glossary-list} v4.48 so provide +%it if it hasn't been defined: % \begin{macrocode} -\newcommand*{\glsxtrbookindexlastmark}{% - \letcs{\glsxtr@label}{glsxtr@idxlastmark@\glsxtrbookindexthepage}% - \ifdef\glsxtr@label - {\glsxtrbookindexlastmarkfmt{\glsxtr@label}}% - {}% -} + \providecommand{\glslistinit}{% + \ifdef\GetTitleStringDisableCommands + {% + \GetTitleStringSetup{expand}% + \GetTitleStringDisableCommands{% + \let\glsentryitem\@gobble + \let\glstarget\@secondoftwo + \let\glossentryname\glslistexpandedname + \let\glslistgroupheaderfmt\@firstofone + \let\glsgetgrouptitle\@firstofone +% \end{macrocode} +%Technically this has an optional argument but it's not used in the +%list styles. +% \begin{macrocode} + \let\glsnavhypertarget\@secondoftwo + \let\glsnavigation\relax + }% + }% + {}% + } % \end{macrocode} %\end{macro} -% -%\iffalse +%\begin{macro}{\glslistexpandedname} +%\changes{1.47}{2021-11-04}{new} +%This command was only added to \sty{glossary-list} v4.48 so provide +%it if it hasn't been defined. The original definition uses +%\cs{glsunexpandedfieldvalue} which +%was added to \sty{glossaries} v4.48 (so if \cs{glslistexpandedname} +%hasn't been defined then neither will \cs{glsunexpandedfieldvalue}). % \begin{macrocode} -% + \providecommand{\glslistexpandedname}[1]{% + \ifcsname glo@\glsdetoklabel{#1}@name\endcsname + \expandafter\expandonce\csname glo@\glsdetoklabel{#1}@name\expandafter\endcsname + \fi + } % \end{macrocode} -%\fi -%\iffalse +%\end{macro} +%Redefine \glostyle{list} to use these commands. % \begin{macrocode} -%<*glossary-longextra.sty> + \renewglossarystyle{list}{% + \renewenvironment{theglossary}% + {\glslistinit\begin{description}}{\end{description}}% + \renewcommand*{\glossaryheader}{}% + \renewcommand*{\glsgroupheading}[1]{}% % \end{macrocode} -%\fi -%\chapter{longextra styles (\styfmt{glossary-longextra.sty})} -%\changes{1.37}{2018-11-30}{new} -%\section{Package Initialisation and Options} -%Provides additional long styles. +%\changes{1.49}{2022-10-14}{added \cs{glssubgroupheading}} +% Sub-groups are only supported with \cs{printunsrtglossary}. This +% does nothing as the sub-entries don't have the name displayed for +% the list styles. % \begin{macrocode} -\NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{glossary-longextra}[2021/11/22 v1.48 (NLCT)] + \renewcommand*{\glssubgroupheading}[4]{}% + \renewcommand*{\glossentry}[2]{% + \glslistitem{##1}\glslistdesc{##1}\glslistprelocation ##2}% + \renewcommand*{\subglossentry}[3]{% + \glssubentryitem{##2}% + \glstarget{##2}{\strut}\space + \glslistdesc{##2}% + \glslistchildprelocation ##3\glslistchildpostlocation}% + \renewcommand*{\glsgroupskip}{\ifglsnogroupskip\else\glslistgroupskip\fi}% + } +} +{} % \end{macrocode} -%Load required packages. +%Similarly for \glostyle{altlist}. Since it requires \glostyle{list}, +%the new commands should have been defined above. % \begin{macrocode} -\RequirePackage{glossary-longbooktabs} +\ifdef{\@glsstyle@altlist} +{% % \end{macrocode} -% -%\begin{macro}{\glslongextraNameFmt} -%\changes{1.37}{2018-11-30}{new} -%\changes{1.38}{2018-12-01}{bug fix: removed double param} -%\begin{definition} -%\cs{glslongextraNameFmt}\marg{label} -%\end{definition} -%Governs the way the name is displayed. +%\begin{macro}{\glsaltlistitem} +%\changes{1.47}{2021-11-04}{new} % \begin{macrocode} -\newcommand{\glslongextraNameFmt}[1]{% - \glsentryitem{#1}\glstarget{#1}{\glossentryname{#1}}% -} + \newcommand{\glsaltlistitem}[1]{% + \glslistitem{#1}% + \mbox{}\par\nobreak\@afterheading + } % \end{macrocode} %\end{macro} -% -%\begin{macro}{\glslongextraDescFmt} -%\changes{1.37}{2018-11-30}{new} -%\begin{definition} -%\cs{glslongextraDescFmt}\marg{label} -%\end{definition} -%Governs the way the description is displayed. % \begin{macrocode} -\newcommand{\glslongextraDescFmt}[1]{% - \glossentrydesc{#1}\glspostdescription + \renewglossarystyle{altlist}{% + \setglossarystyle{list}% + \renewcommand*{\glossentry}[2]{% + \glsaltlistitem{##1}% + \glslistdesc{##1}\glslistprelocation ##2}% + \renewcommand{\subglossentry}[3]{% + \par + \glssubentryitem{##2}% + \glstarget{##2}{\strut}\glslistdesc{##2}% + \glslistchildprelocation ##3}% + } } +{} % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\glslongextraSymbolFmt} -%\changes{1.37}{2018-11-30}{new} -%\begin{definition} -%\cs{glslongextraSymbolFmt}\marg{label} -%\end{definition} -%Governs the way the symbol is displayed. +%Redefine \glostyle{listgroup} so that it discourages a break +%after group headings. +%\changes{1.21}{2017-11-03}{redefined \texttt{listgroup} to discourage +%breaks after group headings} % \begin{macrocode} -\newcommand{\glslongextraSymbolFmt}[1]{\glossentrysymbol{#1}} +\ifdef{\@glsstyle@listgroup} +{% +% \end{macrocode} +%\begin{macro}{\glslistgroupheaderitem} +%\changes{1.47}{2021-11-04}{new} +% \begin{macrocode} + \newcommand{\glslistgroupheaderitem}[2]{\item[{#2}]} % \end{macrocode} %\end{macro} -% -%\begin{macro}{\glslongextraLocationFmt} -%\changes{1.37}{2018-11-30}{new} -%\begin{definition} -%\cs{glslongextraLocationFmt}\marg{label}\marg{location list} -%\end{definition} -%Governs the way the location is displayed. +%\begin{macro}{\glslistgroupafterheader} +%\changes{1.47}{2021-11-04}{new} % \begin{macrocode} -\newcommand{\glslongextraLocationFmt}[2]{#2} + \newcommand{\glslistgroupafterheader}{% + \mbox{}\par\nobreak\@afterheading + } % \end{macrocode} %\end{macro} -% -%\begin{macro}{\glslongextraSubNameFmt} -%\changes{1.37}{2018-11-30}{new} -%\begin{definition} -%\cs{glslongextraSubNameFmt}\marg{level}\marg{label} -%\end{definition} -%Governs the way the child name is displayed. Just does the -%sub-entry counter, if enabled, and the target. % \begin{macrocode} -\newcommand{\glslongextraSubNameFmt}[2]{% - \glssubentryitem{#2}\glstarget{#2}{\strut}% + \renewglossarystyle{listgroup}{% + \setglossarystyle{list}% + \renewcommand*{\glsgroupheading}[1]{% + \glslistgroupheaderitem{##1}{\glslistgroupheaderfmt{\glsgetgrouptitle{##1}}}% + \glslistgroupafterheader + }% + } } +{} % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\glslongextraSubDescFmt} -%\changes{1.37}{2018-11-30}{new} -%\begin{definition} -%\cs{glslongextraSubDescFmt}\marg{level}\marg{label} -%\end{definition} -%Governs the way the child description is displayed. +%Similarly for \glostyle{listhypergroup}. +%\changes{1.21}{2017-11-03}{redefined \texttt{listhypergroup} to discourage +%breaks after group headings} % \begin{macrocode} -\newcommand{\glslongextraSubDescFmt}[2]{% - \glslongextraDescFmt{#2}% +\ifdef{\@glsstyle@listhypergroup} +{% + \renewglossarystyle{listhypergroup}{% + \setglossarystyle{list}% + \renewcommand*{\glossaryheader}{% + \glslistnavigationitem{\glsnavigation}}% + \renewcommand*{\glsgroupheading}[1]{% + \glslistgroupheaderitem{##1}{\glslistgroupheaderfmt + {\glsnavhypertarget{##1}{\glsgetgrouptitle{##1}}}}% + \glslistgroupafterheader + }% + } } +{} % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\glslongextraSubSymbolFmt} -%\changes{1.37}{2018-11-30}{new} -%\begin{definition} -%\cs{glslongextraSubSymbolFmt}\marg{level}\marg{label} -%\end{definition} -%Governs the way the child symbol is displayed. +%Similarly for \glostyle{altlistgroup}. +%\changes{1.21}{2017-11-03}{redefined \texttt{altlistgroup} to discourage +%breaks after group headings} % \begin{macrocode} -\newcommand{\glslongextraSubSymbolFmt}[2]{% - \glslongextraSymbolFmt{#2}% +\ifdef{\@glsstyle@altlistgroup} +{% + \renewglossarystyle{altlistgroup}{% + \setglossarystyle{altlist}% + \renewcommand*{\glsgroupheading}[1]{% + \glslistgroupheaderitem{##1}% + {\glslistgroupheaderfmt{\glsgetgrouptitle{##1}}}% + \glslistgroupafterheader + }% + } } +{} % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\glslongextraSubLocationFmt} -%\changes{1.37}{2018-11-30}{new} -%\begin{definition} -%\cs{glslongextraSubLocationFmt}\marg{level}\marg{label}\marg{location list} -%\end{definition} -%Governs the way the child location list is displayed. +%Similarly for \glostyle{altlisthypergroup}. +%\changes{1.21}{2017-11-03}{redefined \texttt{altlisthypergroup} to discourage +%breaks after group headings} % \begin{macrocode} -\newcommand{\glslongextraSubLocationFmt}[3]{#3} +\ifdef{\@glsstyle@altlisthypergroup} +{% + \renewglossarystyle{altlisthypergroup}{% + \setglossarystyle{altlist}% + \renewcommand*{\glossaryheader}{% + \glslistnavigationitem{\glsnavigation}}% + \renewcommand*{\glsgroupheading}[1]{% + \glslistgroupheaderitem{##1}{\glslistgroupheaderfmt + {\glsnavhypertarget{##1}{\glsgetgrouptitle{##1}}}}% + \glslistgroupafterheader + }% + } +} +{} % \end{macrocode} -%\end{macro} % -%\begin{macro}{\glslongextraNameAlign} -%\changes{1.37}{2018-11-30}{new} -%Alignment for the name column. +%\subsection{Longtable Styles} +% The three and four column styles require adjustment to add the +% post-description hook. The two column styles need the hard-coded +% \cs{space} changed to \cs{glsxtrprelocation}. % \begin{macrocode} -\newcommand{\glslongextraNameAlign}{l} +\ifcsdef{@glsstyle@long} +{% + \renewglossarystyle{long}{% + \renewenvironment{theglossary}% + {\begin{longtable}{lp{\glsdescwidth}}}% + {\end{longtable}}% + \renewcommand*{\glossaryheader}{}% + \renewcommand*{\glsgroupheading}[1]{}% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\glslongextraDescAlign} -%\changes{1.37}{2018-11-30}{new} -%Alignment for the description column. +%\changes{1.49}{2022-10-14}{added \cs{glssubgroupheading}} +% Sub-groups are only supported with \cs{printunsrtglossary}. This +% does nothing as the sub-entries don't have the name displayed for +% the long styles. % \begin{macrocode} -\newcommand{\glslongextraDescAlign}{>{\raggedright}p{\glsdescwidth}} + \renewcommand*{\glssubgroupheading}[4]{}% + \renewcommand{\glossentry}[2]{% + \glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}} & + \glossentrydesc{##1}\glspostdescription + \glsxtrprelocation ##2\tabularnewline + }% + \renewcommand{\subglossentry}[3]{% + & + \glssubentryitem{##2}% + \glstarget{##2}{\strut}\glossentrydesc{##2}\glspostdescription + \glsxtrprelocation ##3\tabularnewline + }% + \ifglsnogroupskip + \renewcommand*{\glsgroupskip}{}% + \else + \renewcommand*{\glsgroupskip}{ & \tabularnewline}% + \fi + } +} +{} % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\glslongextraSymbolAlign} -%\changes{1.37}{2018-11-30}{new} -%Alignment for the symbol column. +%Three column style: % \begin{macrocode} -\newcommand{\glslongextraSymbolAlign}{c} +\ifcsdef{@glsstyle@long3col} +{% + \renewglossarystyle{long3col}{% + \renewenvironment{theglossary}% + {\begin{longtable}{lp{\glsdescwidth}p{\glspagelistwidth}}}% + {\end{longtable}}% + \renewcommand*{\glossaryheader}{}% + \renewcommand*{\glsgroupheading}[1]{}% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\glslongextraLocationAlign} -%\changes{1.37}{2018-11-30}{new} -%Alignment for the location column. +%\changes{1.49}{2022-10-14}{added \cs{glssubgroupheading}} +% Sub-groups are only supported with \cs{printunsrtglossary}. This +% does nothing as the sub-entries don't have the name displayed for +% the long styles. % \begin{macrocode} -\newcommand{\glslongextraLocationAlign}{>{\raggedright}p{\glspagelistwidth}} + \renewcommand*{\glssubgroupheading}[4]{}% + \renewcommand{\glossentry}[2]{% + \glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}} & + \glossentrydesc{##1}\glspostdescription & ##2\tabularnewline + }% + \renewcommand{\subglossentry}[3]{% + & + \glssubentryitem{##2}% + \glstarget{##2}{\strut}\glossentrydesc{##2}\glspostdescription & + ##3\tabularnewline + }% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\glslongextraGroupHeading} -%\changes{1.37}{2018-11-30}{new} -%Used to format the letter group headings. The first argument is the -%number of columns in the table. The second is the group -%\emph{label} (not the title). +%Conditional needs to be outside of \cs{glsgroupskip} otherwise it +%can cause \qt{Incomplete \cs{iftrue}} errors. +%\changes{1.21}{2017-11-03}{moved conditional outside of \cs{glsgroupskip}} % \begin{macrocode} -\newcommand{\glslongextraGroupHeading}[2]{} + \ifglsnogroupskip + \renewcommand*{\glsgroupskip}{}% + \else + \renewcommand*{\glsgroupskip}{& &\tabularnewline}% + \fi + } +} +{} % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\glslongextraHeaderFormat} -%\changes{1.37}{2018-11-30}{new} -%Format for the column headers. +% Four column style: % \begin{macrocode} -\newcommand{\glslongextraHeaderFmt}[1]{\textbf{#1}} +\ifcsdef{@glsstyle@long4col} +{% + \renewglossarystyle{long4col}{% + \renewenvironment{theglossary}% + {\begin{longtable}{llll}}% + {\end{longtable}}% + \renewcommand*{\glossaryheader}{}% + \renewcommand*{\glsgroupheading}[1]{}% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\glslongextraNameDescHeader} -%\changes{1.37}{2018-11-30}{new} +%\changes{1.49}{2022-10-14}{added \cs{glssubgroupheading}} +% Sub-groups are only supported with \cs{printunsrtglossary}. This +% does nothing as the sub-entries don't have the name displayed for +% the long styles. % \begin{macrocode} -\newcommand{\glslongextraNameDescHeader}{% - \glslongextraNameDescTabularHeader\endhead - \glslongextraNameDescTabularFooter\endfoot -} + \renewcommand*{\glssubgroupheading}[4]{}% + \renewcommand{\glossentry}[2]{% + \glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}} & + \glossentrydesc{##1}\glspostdescription & + \glossentrysymbol{##1} & + ##2\tabularnewline + }% + \renewcommand{\subglossentry}[3]{% + & + \glssubentryitem{##2}% + \glstarget{##2}{\strut}\glossentrydesc{##2}\glspostdescription & + \glossentrysymbol{##2} & ##3\tabularnewline + }% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\glslongextraNameDescTabularHeader} -%\changes{1.37}{2018-11-30}{new} +%\changes{1.21}{2017-11-03}{moved conditional outside of \cs{glsgroupskip}} % \begin{macrocode} -\newcommand{\glslongextraNameDescTabularHeader}{% - \toprule - \glslongextraHeaderFmt\entryname & - \glslongextraHeaderFmt\descriptionname\tabularnewline - \midrule + \ifglsnogroupskip + \renewcommand*{\glsgroupskip}{}% + \else + \renewcommand*{\glsgroupskip}{& & &\tabularnewline}% + \fi + } } +{} % \end{macrocode} -%\end{macro} % -%\begin{macro}{\glslongextraNameDescTabularFooter} -%\changes{1.37}{2018-11-30}{new} +%The styles in \sty{glossary-longbooktabs} are all based on the +%styles in \sty{glossary-long}, so no adjustments are needed for +%that package. +% +%\subsection{Long Ragged Styles} +% The three and four column styles require adjustment for the +% post-description hook, but not the two column styles. However, the +% two-column styles need to have \cs{space} replaced with +% \cs{glsxtrprelocation}. % \begin{macrocode} -\newcommand{\glslongextraNameDescTabularFooter}{% - \bottomrule -} +\ifcsdef{@glsstyle@longragged} +{% + \renewglossarystyle{longragged}{% + \renewenvironment{theglossary}% + {\begin{longtable}{l>{\raggedright}p{\glsdescwidth}}}% + {\end{longtable}}% + \renewcommand*{\glossaryheader}{}% + \renewcommand*{\glsgroupheading}[1]{}% % \end{macrocode} -%\end{macro} -% -%Unlike the \glostyle{alttree} style, there aren't different widths -%for the hierarchical levels. -%\begin{macro}{\glslongextraSetWidest} -%\changes{1.37}{2018-11-30}{new} -%Provide in case the tree styles haven't been loaded. +%\changes{1.49}{2022-10-14}{added \cs{glssubgroupheading}} +% Sub-groups are only supported with \cs{printunsrtglossary}. This +% does nothing as the sub-entries don't have the name displayed for +% the longragged styles. % \begin{macrocode} -\newcommand*{\glslongextraSetWidest}[1]{% - \def\@glslongextrawidestname{#1}% + \renewcommand*{\glssubgroupheading}[4]{}% + \renewcommand{\glossentry}[2]{% + \glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}} & + \glossentrydesc{##1}\glspostdescription\glsxtrprelocation ##2% + \tabularnewline + }% + \renewcommand{\subglossentry}[3]{% + & + \glssubentryitem{##2}% + \glstarget{##2}{\strut}\glossentrydesc{##2}% + \glspostdescription\glsxtrprelocation ##3% + \tabularnewline + }% + \ifglsnogroupskip + \renewcommand*{\glsgroupskip}{}% + \else + \renewcommand*{\glsgroupskip}{ & \tabularnewline}% + \fi + } } +{} % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\@glslongextrawidestname} -%\changes{1.37}{2018-11-30}{new} -%Pick up the widest name from the \glostyle{alttree} style if it has -%been set. (Will expand to nothing otherwise.) +%Three and four column styles don't use \cs{glsxtrprelocation} since the number +%list is in its own column. % \begin{macrocode} -\newcommand*{\@glslongextrawidestname}{\csuse{@glswidestname}} +\ifcsdef{@glsstyle@longragged3col} +{% + \renewglossarystyle{longragged3col}{% + \renewenvironment{theglossary}% + {\begin{longtable}{l>{\raggedright}p{\glsdescwidth}% + >{\raggedright}p{\glspagelistwidth}}}% + {\end{longtable}}% + \renewcommand*{\glossaryheader}{}% + \renewcommand*{\glsgroupheading}[1]{}% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\glslongextraUpdateWidest} -%\changes{1.37}{2018-11-30}{new} +%\changes{1.49}{2022-10-14}{added \cs{glssubgroupheading}} +% Sub-groups are only supported with \cs{printunsrtglossary}. This +% does nothing as the sub-entries don't have the name displayed for +% the longragged styles. % \begin{macrocode} -\newcommand*{\glslongextraUpdateWidest}[1]{% - \ifundef\@glslongextrawidestname - {\def\@glslongextrawidestname{#1}}% - {% - \settowidth{\dimen@}{\@glslongextrawidestname}% - \settowidth{\dimen@ii}{#1}% - \ifdim\dimen@ii>\dimen@ - \def\@glslongextrawidestname{#1}% - \fi - }% -} + \renewcommand*{\glssubgroupheading}[4]{}% + \renewcommand{\glossentry}[2]{% + \glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}} & + \glossentrydesc{##1}\glspostdescription & ##2\tabularnewline + }% + \renewcommand{\subglossentry}[3]{% + & + \glssubentryitem{##2}% + \glstarget{##2}{\strut}\glossentrydesc{##2}\glspostdescription & + ##3\tabularnewline + }% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\glslongextraUpdateWidestChild} -%\changes{1.37}{2018-11-30}{new} -%\begin{definition} -%\cs{glslongextraUpdateWidestChild}\marg{level}\marg{text} -%\end{definition} -%Used by \cs{glsxtrSetWidest} in \sty{glossaries-extra-bib2gls}. -%Does nothing by default, since the default action in these styles -%is to omit the child name. If the child name should be displayed, -%then this needs to be redefined to use -%\cs{glslongextraUpdateWidest}. +%\changes{1.21}{2017-11-03}{moved conditional outside of \cs{glsgroupskip}} % \begin{macrocode} -\newcommand*{\glslongextraUpdateWidestChild}[2]{} + \ifglsnogroupskip + \renewcommand*{\glsgroupskip}{}% + \else + \renewcommand*{\glsgroupskip}{& &\tabularnewline}% + \fi + } +} +{} % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\glslongextraSetDescWidth} -%\changes{1.37}{2018-11-30}{new} -% Computes the value of \cs{glsdescwidth} for the styles that only -% have name and description columns. +% Four column style: % \begin{macrocode} -\newcommand{\glslongextraSetDescWidth}{% - \settowidth{\gls@tmplen}{\glslongextraHeaderFmt\entryname}% +\ifcsdef{@glsstyle@altlongragged4col} +{% + \renewglossarystyle{altlongragged4col}{% + \renewenvironment{theglossary}% + {\begin{longtable}{l>{\raggedright}p{\glsdescwidth}l% + >{\raggedright}p{\glspagelistwidth}}}% + {\end{longtable}}% + \renewcommand*{\glossaryheader}{}% + \renewcommand*{\glsgroupheading}[1]{}% % \end{macrocode} -% Has the widest name been set. +%\changes{1.49}{2022-10-14}{added \cs{glssubgroupheading}} +% Sub-groups are only supported with \cs{printunsrtglossary}. This +% does nothing as the sub-entries don't have the name displayed for +% the longragged styles. % \begin{macrocode} - \settowidth{\dimen@}{\glsnamefont{\@glslongextrawidestname}}% - \ifdim\dimen@>\gls@tmplen - \gls@tmplen=\dimen@ - \fi + \renewcommand*{\glssubgroupheading}[4]{}% + \renewcommand{\glossentry}[2]{% + \glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}} & + \glossentrydesc{##1}\glspostdescription & \glossentrysymbol{##1} & + ##2\tabularnewline + }% + \renewcommand{\subglossentry}[3]{% + & + \glssubentryitem{##2}% + \glstarget{##2}{\strut}\glossentrydesc{##2}\glspostdescription & + \glossentrysymbol{##2} & ##3\tabularnewline + }% % \end{macrocode} -% Description width is \cs{linewidth} less 4\cs{tabcolsep} less the -% width of the name column. +%\changes{1.21}{2017-11-03}{moved conditional outside of \cs{glsgroupskip}} % \begin{macrocode} - \setlength{\glsdescwidth}{\dimexpr\linewidth-4\tabcolsep-\gls@tmplen}% + \ifglsnogroupskip + \renewcommand*{\glsgroupskip}{}% + \else + \renewcommand*{\glsgroupskip}{& & &\tabularnewline}% + \fi + } } +{} % \end{macrocode} -%\end{macro} % -%\begin{macro}{\glslongextraSymSetDescWidth} -%\changes{1.37}{2018-11-30}{new} -% Computes the value of \cs{glsdescwidth} for the styles that only -% have name, symbol and description columns. +%\subsection{Supertabular Styles} +% The three and four column styles require adjustment to add the +% post-description hook. The two column styles need the hard-coded +% \cs{space} changed to \cs{glsxtrprelocation}. % \begin{macrocode} -\newcommand{\glslongextraSymSetDescWidth}{% +\ifcsdef{@glsstyle@super} +{% + \renewglossarystyle{super}{% + \renewenvironment{theglossary}% + {\tablehead{}\tabletail{}% + \begin{supertabular}{lp{\glsdescwidth}}}% + {\end{supertabular}}% + \renewcommand*{\glossaryheader}{}% + \renewcommand*{\glsgroupheading}[1]{}% % \end{macrocode} -% Work out the size for just the name and description style. +%\changes{1.49}{2022-10-14}{added \cs{glssubgroupheading}} +% Sub-groups are only supported with \cs{printunsrtglossary}. This +% does nothing as the sub-entries don't have the name displayed for +% the super styles. % \begin{macrocode} - \glslongextraSetDescWidth + \renewcommand*{\glssubgroupheading}[4]{}% + \renewcommand{\glossentry}[2]{% + \glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}} & + \glossentrydesc{##1}\glspostdescription + \glsxtrprelocation ##2\tabularnewline + }% + \renewcommand{\subglossentry}[3]{% + & + \glssubentryitem{##2}% + \glstarget{##2}{\strut}\glossentrydesc{##2}\glspostdescription + \glsxtrprelocation ##3\tabularnewline + }% + \ifglsnogroupskip + \renewcommand*{\glsgroupskip}{}% + \else + \renewcommand*{\glsgroupskip}{& \tabularnewline}% + \fi + } +} +{} % \end{macrocode} -% Now work out the symbol column width. This is assuming that the -% column title will be the widest text in the column. +%Three column style: % \begin{macrocode} - \settowidth{\gls@tmplen}{\glslongextraHeaderFmt\symbolname}% +\ifcsdef{@glsstyle@super3col} +{% + \renewglossarystyle{super3col}{% + \renewenvironment{theglossary}% + {\tablehead{}\tabletail{}% + \begin{supertabular}{lp{\glsdescwidth}p{\glspagelistwidth}}}% + {\end{supertabular}}% + \renewcommand*{\glossaryheader}{}% + \renewcommand*{\glsgroupheading}[1]{}% % \end{macrocode} -% Subtract 2\cs{tabcolsep} and the symbol header width. +%\changes{1.49}{2022-10-14}{added \cs{glssubgroupheading}} +% Sub-groups are only supported with \cs{printunsrtglossary}. This +% does nothing as the sub-entries don't have the name displayed for +% the super styles. % \begin{macrocode} - \setlength{\glsdescwidth}{\dimexpr\glsdescwidth-2\tabcolsep-\gls@tmplen}% + \renewcommand*{\glssubgroupheading}[4]{}% + \renewcommand{\glossentry}[2]{% + \glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}} & + \glossentrydesc{##1}\glspostdescription & ##2\tabularnewline + }% + \renewcommand{\subglossentry}[3]{% + & + \glssubentryitem{##2}% + \glstarget{##2}{\strut}\glossentrydesc{##2}\glspostdescription & + ##3\tabularnewline + }% +% \end{macrocode} +%\changes{1.21}{2017-11-03}{moved conditional outside of \cs{glsgroupskip}} +% \begin{macrocode} + \ifglsnogroupskip + \renewcommand*{\glsgroupskip}{}% + \else + \renewcommand*{\glsgroupskip}{ & &\tabularnewline}% + \fi + } } +{} % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\glslongextraLocSetDescWidth} -%\changes{1.37}{2018-11-30}{new} -% Computes the value of \cs{glsdescwidth} for the styles that only -% have name, location and description columns. +% Four column styles: % \begin{macrocode} -\newcommand{\glslongextraLocSetDescWidth}{% +\ifcsdef{@glsstyle@super4col} +{% + \renewglossarystyle{super4col}{% + \renewenvironment{theglossary}% + {\tablehead{}\tabletail{}% + \begin{supertabular}{llll}}{% + \end{supertabular}}% + \renewcommand*{\glossaryheader}{}% + \renewcommand*{\glsgroupheading}[1]{}% % \end{macrocode} -% Work out the size for just the name and description style. +%\changes{1.49}{2022-10-14}{added \cs{glssubgroupheading}} +% Sub-groups are only supported with \cs{printunsrtglossary}. This +% does nothing as the sub-entries don't have the name displayed for +% the super styles. % \begin{macrocode} - \glslongextraSetDescWidth + \renewcommand*{\glssubgroupheading}[4]{}% + \renewcommand{\glossentry}[2]{% + \glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}} & + \glossentrydesc{##1}\glspostdescription & + \glossentrysymbol{##1} & ##2\tabularnewline + }% + \renewcommand{\subglossentry}[3]{% + & + \glssubentryitem{##2}% + \glstarget{##2}{\strut}\glossentrydesc{##2}\glspostdescription & + \glossentrysymbol{##2} & ##3\tabularnewline + }% % \end{macrocode} -% Subtract 2\cs{tabcolsep} and the location list column width. +%\changes{1.21}{2017-11-03}{moved conditional outside of \cs{glsgroupskip}} % \begin{macrocode} - \setlength{\glsdescwidth}{\dimexpr\glsdescwidth-2\tabcolsep-\glspagelistwidth}% + \ifglsnogroupskip + \renewcommand*{\glsgroupskip}{}% + \else + \renewcommand*{\glsgroupskip}{& & &\tabularnewline}% + \fi + } } +{} % \end{macrocode} -%\end{macro} % -%\begin{macro}{\glslongextraSymLocSetDescWidth} -%\changes{1.37}{2018-11-30}{new} -% Computes the value of \cs{glsdescwidth} for the styles that -% have name, symbol, location and description columns. +%\subsection{Super Ragged Styles} +% The three and four column styles require adjustment for the +% post-description hook, but not the two column styles. However, the +% two-column styles need to have \cs{space} replaced with +% \cs{glsxtrprelocation}. % \begin{macrocode} -\newcommand{\glslongextraSymLocSetDescWidth}{% +\ifcsdef{@glsstyle@superragged} +{% + \renewglossarystyle{superragged}{% + \renewenvironment{theglossary}% + {\tablehead{}\tabletail{}% + \begin{supertabular}{l>{\raggedright}p{\glsdescwidth}}}% + {\end{supertabular}}% + \renewcommand*{\glossaryheader}{}% + \renewcommand*{\glsgroupheading}[1]{}% % \end{macrocode} -% Work out the size for just the name, symbol and description style. +%\changes{1.49}{2022-10-14}{added \cs{glssubgroupheading}} +% Sub-groups are only supported with \cs{printunsrtglossary}. This +% does nothing as the sub-entries don't have the name displayed for +% the super styles. % \begin{macrocode} - \glslongextraSymSetDescWidth + \renewcommand*{\glssubgroupheading}[4]{}% + \renewcommand{\glossentry}[2]{% + \glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}} & + \glossentrydesc{##1}\glspostdescription\glsxtrprelocation ##2% + \tabularnewline + }% + \renewcommand{\subglossentry}[3]{% + & + \glssubentryitem{##2}% + \glstarget{##2}{\strut}\glossentrydesc{##2}\glspostdescription + \glsxtrprelocation ##3% + \tabularnewline + }% + \ifglsnogroupskip + \renewcommand*{\glsgroupskip}{}% + \else + \renewcommand*{\glsgroupskip}{& \tabularnewline}% + \fi + } +} +{} % \end{macrocode} -% Subtract 2\cs{tabcolsep} and the location list column width. +%Three column style: % \begin{macrocode} - \setlength{\glsdescwidth}{\dimexpr\glsdescwidth-2\tabcolsep-\glspagelistwidth}% -} +\ifcsdef{@glsstyle@superragged3col} +{% + \renewglossarystyle{superragged3col}{% + \renewenvironment{theglossary}% + {\tablehead{}\tabletail{}% + \begin{supertabular}{l>{\raggedright}p{\glsdescwidth}% + >{\raggedright}p{\glspagelistwidth}}}% + {\end{supertabular}}% + \renewcommand*{\glossaryheader}{}% + \renewcommand*{\glsgroupheading}[1]{}% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\ifGlsLongExtraUseTabular} -%\changes{1.37}{2018-11-30}{new} -%If true use \env{tabular} instead of \env{longtable}. Obviously -%only intended for short glossaries that can fit into a single page. +%\changes{1.49}{2022-10-14}{added \cs{glssubgroupheading}} +% Sub-groups are only supported with \cs{printunsrtglossary}. This +% does nothing as the sub-entries don't have the name displayed for +% the super styles. % \begin{macrocode} -\newif\ifGlsLongExtraUseTabular -\GlsLongExtraUseTabularfalse + \renewcommand*{\glssubgroupheading}[4]{}% + \renewcommand{\glossentry}[2]{% + \glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}} & + \glossentrydesc{##1}\glspostdescription & + ##2\tabularnewline + }% + \renewcommand{\subglossentry}[3]{% + & + \glssubentryitem{##2}% + \glstarget{##2}{\strut}\glossentrydesc{##2}\glspostdescription & + ##3\tabularnewline + }% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\glslongextraTabularVAlign} -%\changes{1.37}{2018-11-30}{new} -%Only used with the \env{tabular} setting. +%\changes{1.21}{2017-11-03}{moved conditional outside of \cs{glsgroupskip}} % \begin{macrocode} -\newcommand*{\glslongextraTabularVAlign}{c} + \ifglsnogroupskip + \renewcommand*{\glsgroupskip}{}% + \else + \renewcommand*{\glsgroupskip}{ & &\tabularnewline}% + \fi + } +} +{} % \end{macrocode} -%\end{macro} -%\begin{abbrvstyle}{long-name-desc} -%\changes{1.37}{2018-11-30}{new} -%Two column style with multi-lined descriptions and header. -%This is similar to the \glostyle{longragged-booktabs} style. +% Four columns: % \begin{macrocode} -\newglossarystyle{long-name-desc}% +\ifcsdef{@glsstyle@altsuperragged4col} {% - \ifGlsLongExtraUseTabular - \renewenvironment{theglossary}% - {% - \glslongextraSetDescWidth - \edef\@glslongextra@begintab{% - \noexpand\begin{tabular}[\glslongextraTabularVAlign]{% - \expandonce\glslongextraNameAlign - \expandonce\glslongextraDescAlign}}% - \@glslongextra@begintab - }% - {% - \glslongextraNameDescTabularFooter - \end{tabular}% + \renewglossarystyle{altsuperragged4col}{% + \renewenvironment{theglossary}% + {\tablehead{}\tabletail{}% + \begin{supertabular}{l>{\raggedright}p{\glsdescwidth}l% + >{\raggedright}p{\glspagelistwidth}}}% + {\end{supertabular}}% + \renewcommand*{\glossaryheader}{}% + \renewcommand{\glossentry}[2]{% + \glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}} & + \glossentrydesc{##1}\glspostdescription & + \glossentrysymbol{##1} & ##2\tabularnewline }% - \renewcommand*{\glossaryheader}{\glslongextraNameDescTabularHeader}% - \else - \renewenvironment{theglossary}% - {% - \glspatchLToutput - \glslongextraSetDescWidth - \edef\@glslongextra@begintab{% - \noexpand\begin{longtable}{% - \expandonce\glslongextraNameAlign - \expandonce\glslongextraDescAlign}}% - \@glslongextra@begintab + \renewcommand{\subglossentry}[3]{% + & + \glssubentryitem{##2}% + \glstarget{##2}{\strut}\glossentrydesc{##2}\glspostdescription & + \glossentrysymbol{##2} & ##3\tabularnewline }% - {\end{longtable}}% - \renewcommand*{\glossaryheader}{\glslongextraNameDescHeader}% - \fi - \renewcommand*{\glsgroupheading}[1]{\glslongextraGroupHeading{2}{##1}}% - \renewcommand{\glossentry}[2]{% - \glslongextraNameFmt{##1} & - \glslongextraDescFmt{##1}\tabularnewline - }% - \renewcommand{\subglossentry}[3]{% - \glslongextraSubNameFmt{##1}{##2} - & - \glslongextraSubDescFmt{##1}{##2}% - \tabularnewline - }% - \ifglsnogroupskip - \renewcommand*{\glsgroupskip}{}% - \else - \renewcommand*{\glsgroupskip}{\glspenaltygroupskip}% - \fi +% \end{macrocode} +%\changes{1.21}{2017-11-03}{moved conditional outside of \cs{glsgroupskip}} +% \begin{macrocode} + \ifglsnogroupskip + \renewcommand*{\glsgroupskip}{}% + \else + \renewcommand*{\glsgroupskip}{& & &\tabularnewline}% + \fi + } } +{} % \end{macrocode} -%\end{abbrvstyle} % -%\begin{macro}{\glslongextraNameDescLocationHeader} -%\changes{1.37}{2018-11-30}{new} +%\subsection{Inline Style} +% The \glostyle{inline} style is dealt with slightly differently. +% The \cs{glspostdescription} hook is actually in +% \cs{glspostinline}, which is called at the end of the glossary. +% The original definition of \cs{glspostinline} also includes a +% space, which is unnecessary. Here, instead of redefining the +% \glostyle{inline} style, just redefine \cs{glspostinline} and +% \cs{glsinlinedescformat}. +% \begin{macrocode} +\ifdef{\@glsstyle@inline} +{% + \renewcommand*{\glspostinline}{.\spacefactor\sfcode`\.} +% \end{macrocode} +% Just use \cs{glsxtrpostdescription} instead of +% \cs{glspostdescription}. +% \begin{macrocode} + \renewcommand*{\glsinlinedescformat}[3]{% + \space#1\glsxtrpostdescription} + \renewcommand*{\glsinlinesubdescformat}[3]{% + #1\glsxtrpostdescription} +% \end{macrocode} +% The default settings don't show the location lists, so there's no +% adjustment for \cs{glsxtrprelocation}. % \begin{macrocode} -\newcommand{\glslongextraNameDescLocationHeader}{% - \glslongextraNameDescLocationTabularHeader\endhead - \glslongextraNameDescLocationTabularFooter\endfoot } +{} % \end{macrocode} -%\end{macro} % -%\begin{macro}{\glslongextraNameDescLocationTabularHeader} -%\changes{1.37}{2018-11-30}{new} +%\subsection{Tree Styles} +% Redefine both \cs{glstreenamefmt} and \cs{glstreegroupheaderfmt} +% in terms of \cs{glstreedefaultnamefmt} to make it easier to change +% both at the same time or only change one without affecting the +% other. % \begin{macrocode} -\newcommand{\glslongextraNameDescLocationTabularHeader}{% - \toprule - \glslongextraHeaderFmt\entryname & - \glslongextraHeaderFmt\descriptionname & - \glslongextraHeaderFmt\pagelistname\tabularnewline - \midrule -} +\ifdef\glstreenamefmt +{ +% \end{macrocode} +%\begin{macro}{\glstreedefaultnamefmt} +%\changes{1.31}{2018-05-09}{new} +% \begin{macrocode} + \newcommand{\glstreedefaultnamefmt}[1]{\textbf{#1}} % \end{macrocode} %\end{macro} -% -%\begin{macro}{\glslongextraNameDescLocationTabularFooter} -%\changes{1.37}{2018-11-30}{new} +%\begin{macro}{\glstreenamefmt} +%\changes{1.31}{2018-05-09}{added redefinition} % \begin{macrocode} -\newcommand{\glslongextraNameDescLocationTabularFooter}{% - \bottomrule -} + \renewcommand{\glstreenamefmt}[1]{\glstreedefaultnamefmt{#1}} % \end{macrocode} %\end{macro} -% -%\begin{abbrvstyle}{long-name-desc-loc} -%\changes{1.37}{2018-11-30}{new} -%Three columns: name, description and location list. +%\begin{macro}{\glstreegroupheaderfmt} +%\changes{1.31}{2018-05-09}{added redefinition} +%This command was only introduced to \sty{glossary-tree} v4.22, so +%it may not be defined. % \begin{macrocode} -\newglossarystyle{long-name-desc-loc}% -{% - \ifGlsLongExtraUseTabular - \renewenvironment{theglossary}% - {% - \glslongextraLocSetDescWidth - \edef\@glslongextra@begintab{% - \noexpand\begin{tabular}[\glslongextraTabularVAlign]{% - \expandonce\glslongextraNameAlign - \expandonce\glslongextraDescAlign - \expandonce\glslongextraLocationAlign - }}% - \@glslongextra@begintab - }% - {% - \glslongextraNameDescLocationTabularFooter - \end{tabular}% - }% - \renewcommand*{\glossaryheader}{\glslongextraNameDescLocationTabularHeader}% - \else - \renewenvironment{theglossary}% - {% - \glspatchLToutput - \glslongextraLocSetDescWidth - \edef\@glslongextra@begintab{% - \noexpand\begin{longtable}{% - \expandonce\glslongextraNameAlign - \expandonce\glslongextraDescAlign - \expandonce\glslongextraLocationAlign - }}% - \@glslongextra@begintab - }% - {\end{longtable}}% - \renewcommand*{\glossaryheader}{\glslongextraNameDescLocationHeader}% - \fi - \renewcommand*{\glsgroupheading}[1]{\glslongextraGroupHeading{3}{##1}}% - \renewcommand{\glossentry}[2]{% - \glslongextraNameFmt{##1} & - \glslongextraDescFmt{##1} & - \glslongextraLocationFmt{##1}{##2}\tabularnewline - }% - \renewcommand{\subglossentry}[3]{% - \glslongextraSubNameFmt{##1}{##2}& - \glslongextraSubDescFmt{##1}{##2}& - \glslongextraSubLocationFmt{##1}{##2}{##3}% - \tabularnewline - }% - \ifglsnogroupskip - \renewcommand*{\glsgroupskip}{}% - \else - \renewcommand*{\glsgroupskip}{\glspenaltygroupskip}% - \fi -} + \def\glstreegroupheaderfmt#1{\glstreedefaultnamefmt{#1}} % \end{macrocode} -%\end{abbrvstyle} -% -%\begin{macro}{\glslongextraDescNameHeader} -%\changes{1.37}{2018-11-30}{new} +%\end{macro} +%\begin{macro}{\glstreenavigationfmt} +%\changes{1.31}{2018-05-09}{added redefinition} +%This command was only introduced to \sty{glossary-tree} v4.22, so +%it may not be defined. % \begin{macrocode} -\newcommand{\glslongextraDescNameHeader}{% - \glslongextraDescNameTabularHeader\endhead - \glslongextraDescNameTabularFooter\endfoot -} + \def\glstreenavigationfmt#1{\glstreedefaultnamefmt{#1}} % \end{macrocode} %\end{macro} -% -%\begin{macro}{\glslongextraDescNameTabularHeader} -%\changes{1.37}{2018-11-30}{new} +%\begin{macro}{\glstreePreHeader} +%\changes{1.41}{2019-04-09}{new} +%Takes the label as the first argument and title as the second +%argument so this can be modified to add a bookmark. % \begin{macrocode} -\newcommand{\glslongextraDescNameTabularHeader}{% - \toprule - \glslongextraHeaderFmt\descriptionname& - \glslongextraHeaderFmt\entryname \tabularnewline - \midrule -} + \newcommand{\glstreePreHeader}[2]{} % \end{macrocode} %\end{macro} % -%\begin{macro}{\glslongextraDescNameTabularFooter} -%\changes{1.37}{2018-11-30}{new} +%\begin{macro}{\glstreeSubPreHeader} +%\changes{1.49}{2022-10-14}{new} +%\begin{definition} +%\cs{glstreeSubPreHeader}\marg{previous group level}\marg{level}\marg{parent label}\marg{group label}\marg{title} +%\end{definition} % \begin{macrocode} -\newcommand{\glslongextraDescNameTabularFooter}{% - \bottomrule -} + \newcommand{\glstreeSubPreHeader}[5]{} % \end{macrocode} %\end{macro} % -%\begin{abbrvstyle}{long-desc-name} -%\changes{1.37}{2018-11-30}{new} -%Like \glostyle{name-desc} but swaps the columns. % \begin{macrocode} -\newglossarystyle{long-desc-name}% -{% - \ifGlsLongExtraUseTabular - \renewenvironment{theglossary}% - {% - \glslongextraSetDescWidth - \edef\@glslongextra@begintab{% - \noexpand\begin{tabular}[\glslongextraTabularVAlign]{% - \expandonce\glslongextraDescAlign - \expandonce\glslongextraNameAlign}}% - \@glslongextra@begintab - }% - {% - \glslongextraDescNameTabularFooter - \end{tabular}% - }% - \renewcommand*{\glossaryheader}{\glslongextraDescNameTabularHeader}% - \else - \renewenvironment{theglossary}% - {% - \glspatchLToutput - \glslongextraSetDescWidth - \edef\@glslongextra@begintab{% - \noexpand\begin{longtable}{% - \expandonce\glslongextraDescAlign - \expandonce\glslongextraNameAlign}}% - \@glslongextra@begintab - }% - {\end{longtable}}% - \renewcommand*{\glossaryheader}{\glslongextraDescNameHeader}% - \fi - \renewcommand*{\glsgroupheading}[1]{\glslongextraGroupHeading{2}{##1}}% - \renewcommand{\glossentry}[2]{% - \glslongextraDescFmt{##1} & - \glslongextraNameFmt{##1}\tabularnewline - }% - \renewcommand{\subglossentry}[3]{% - \glslongextraSubDescFmt{##1}{##2} & - \glslongextraSubNameFmt{##1}{##2}\tabularnewline - }% - \ifglsnogroupskip - \renewcommand*{\glsgroupskip}{}% - \else - \renewcommand*{\glsgroupskip}{\glspenaltygroupskip}% - \fi } +{} % \end{macrocode} -%\end{abbrvstyle} -% -%\begin{macro}{\glslongextraLocationDescNameHeader} -%\changes{1.37}{2018-11-30}{new} +% The \glostyle{index} style is redefined so that the space before +% the number list isn't hard coded. +%\changes{1.21}{2017-11-03}{modified index to remove hard coded \cs{space}} % \begin{macrocode} -\newcommand{\glslongextraLocationDescNameHeader}{% - \glslongextraLocationDescNameTabularHeader\endhead - \glslongextraLocationDescNameTabularFooter\endfoot -} +\ifdef{\@glsstyle@index} +{ % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\glslongextraLocationDescNameTabularHeader} -%\changes{1.37}{2018-11-30}{new} +%\begin{macro}{\glstreeprelocation} +%\changes{1.21}{2017-11-03}{new} +%The space before the number list for top-level entries. This is +%shared by the other tree styles. % \begin{macrocode} -\newcommand{\glslongextraLocationDescNameTabularHeader}{% - \toprule - \glslongextraHeaderFmt\pagelistname& - \glslongextraHeaderFmt\descriptionname& - \glslongextraHeaderFmt\entryname \tabularnewline - \midrule -} + \newcommand*{\glstreeprelocation}{\glsxtrprelocation} % \end{macrocode} %\end{macro} -% -%\begin{macro}{\glslongextraLocationDescNameTabularFooter} -%\changes{1.37}{2018-11-30}{new} +%\begin{macro}{\glstreechildprelocation} +%\changes{1.21}{2017-11-03}{new} +%The space before the number list for child entries. This is +%shared by the other tree styles. % \begin{macrocode} -\newcommand{\glslongextraLocationDescNameTabularFooter}{% - \bottomrule -} + \newcommand*{\glstreechildprelocation}{\glstreeprelocation} % \end{macrocode} %\end{macro} -% -%\begin{abbrvstyle}{long-loc-desc-name} -%\changes{1.37}{2018-11-30}{new} -%Three columns: location, description and name. -% \begin{macrocode} -\newglossarystyle{long-loc-desc-name}% -{% - \ifGlsLongExtraUseTabular - {% - \glslongextraLocSetDescWidth - \edef\@glslongextra@begintab{% - \noexpand\begin{tabular}[\glslongextraTabularVAlign]{% - \expandonce\glslongextraLocationAlign - \expandonce\glslongextraDescAlign - \expandonce\glslongextraNameAlign}}% - \@glslongextra@begintab - }% - {% - \glslongextraLocationDescNameTabularFooter - \end{tabular}% - }% - \renewcommand*{\glossaryheader}{\glslongextraLocationDescNameTabularHeader}% - \else - \renewenvironment{theglossary}% - {% - \glspatchLToutput - \glslongextraLocSetDescWidth - \edef\@glslongextra@begintab{% - \noexpand\begin{longtable}{% - \expandonce\glslongextraLocationAlign - \expandonce\glslongextraDescAlign - \expandonce\glslongextraNameAlign}}% - \@glslongextra@begintab - }% - {\end{longtable}}% - \renewcommand*{\glossaryheader}{\glslongextraLocationDescNameHeader}% - \fi - \renewcommand*{\glsgroupheading}[1]{\glslongextraGroupHeading{3}{##1}}% - \renewcommand{\glossentry}[2]{% - \glslongextraLocationFmt{##1}{##2} & - \glslongextraDescFmt{##1} & - \glslongextraNameFmt{##1}\tabularnewline - }% - \renewcommand{\subglossentry}[3]{% - \glslongextraSubLocationFmt{##1}{##2}{##3} & - \glslongextraSubDescFmt{##1}{##2} & - \glslongextraSubNameFmt{##1}{##2}\tabularnewline - }% - \ifglsnogroupskip - \renewcommand*{\glsgroupskip}{}% - \else - \renewcommand*{\glsgroupskip}{\glspenaltygroupskip}% - \fi -} -% \end{macrocode} -%\end{abbrvstyle} -% -%\begin{macro}{\glslongextraNameDescSymHeader} -%\changes{1.37}{2018-11-30}{new} +%Don't prohibit a page break at the start of a new group if there's +%no header. +%\begin{macro}{\glstreegroupskip} +%\changes{1.41}{2019-04-09}{new} % \begin{macrocode} -\newcommand{\glslongextraNameDescSymHeader}{% - \glslongextraNameDescSymTabularHeader\endhead - \glslongextraNameDescSymTabularFooter\endfoot -} + \newcommand{\glstreegroupskip}{\indexspace} % \end{macrocode} %\end{macro} -% -%\begin{macro}{\glslongextraNameDescSymTabularHeader} -%\changes{1.37}{2018-11-30}{new} +%\begin{macro}{\glstreegroupheaderskip} +%\changes{1.42}{2020-02-03}{new} +%This doesn't include \cs{@afterheading} as it can cause +%interference with some styles. % \begin{macrocode} -\newcommand{\glslongextraNameDescSymTabularHeader}{% - \toprule - \glslongextraHeaderFmt\entryname & - \glslongextraHeaderFmt\descriptionname & - \glslongextraHeaderFmt\symbolname\tabularnewline - \midrule -} + \newcommand{\glstreegroupheaderskip}{\nopagebreak\glstreegroupskip\nobreak} % \end{macrocode} %\end{macro} -% -%\begin{macro}{\glslongextraNameDescSymTabularFooter} -%\changes{1.37}{2018-11-30}{new} +%Modify the \glostyle{index} style. % \begin{macrocode} -\newcommand{\glslongextraNameDescSymTabularFooter}{% - \bottomrule -} + \renewglossarystyle{index}{% + \renewenvironment{theglossary}% + {\setlength{\parindent}{0pt}% + \setlength{\parskip}{0pt plus 0.3pt}% + \let\item\glstreeitem + \let\subitem\glstreesubitem + \let\subsubitem\glstreesubsubitem + }% + {\par}% + \renewcommand*{\glossaryheader}{}% + \renewcommand*{\glsgroupheading}[1]{}% % \end{macrocode} -%\end{macro} -% -%\begin{abbrvstyle}{long-name-desc-sym} -%\changes{1.37}{2018-11-30}{new} -%Three column style with symbol in the third column. +%\changes{1.49}{2022-10-14}{added \cs{glssubgroupheading}} +% Sub-groups are only supported with \cs{printunsrtglossary}. % \begin{macrocode} -\newglossarystyle{long-name-desc-sym}% -{% - \ifGlsLongExtraUseTabular - \renewenvironment{theglossary}% - {% - \glslongextraSymSetDescWidth - \edef\@glslongextra@begintab{% - \noexpand\begin{tabular}[\glslongextraTabularVAlign]{% - \expandonce\glslongextraNameAlign - \expandonce\glslongextraDescAlign - \expandonce\glslongextraSymbolAlign - }}% - \@glslongextra@begintab - }% - {% - \glslongextraNameDescSymTabularFooter - \end{tabular}% + \renewcommand*{\glssubgroupheading}[4]{}% + \renewcommand*{\glossentry}[2]{% + \item\glsentryitem{##1}% + \glstreenamefmt{\glstarget{##1}{\glossentryname{##1}}}% + \glstreesymbol{##1}% + \glstreeDescLoc{##1}{##2}% }% - \renewcommand*{\glossaryheader}{\glslongextraNameDescSymTabularHeader}% - \else - \renewenvironment{theglossary}% - {% - \glspatchLToutput - \glslongextraSymSetDescWidth - \edef\@glslongextra@begintab{% - \noexpand\begin{longtable}{% - \expandonce\glslongextraNameAlign - \expandonce\glslongextraDescAlign - \expandonce\glslongextraSymbolAlign - }}% - \@glslongextra@begintab + \renewcommand{\subglossentry}[3]{% + \ifcase##1\relax + \item + \or + \subitem + \glssubentryitem{##2}% + \else + \subsubitem + \fi + \glstreenamefmt{\glstarget{##2}{\glossentryname{##2}}}% + \glstreechildsymbol{##2}% + \glstreeChildDescLoc{##2}{##3}% }% - {\end{longtable}}% - \renewcommand*{\glossaryheader}{\glslongextraNameDescSymHeader}% - \fi - \renewcommand*{\glsgroupheading}[1]{\glslongextraGroupHeading{3}{##1}}% - \renewcommand{\glossentry}[2]{% - \glslongextraNameFmt{##1} & - \glslongextraDescFmt{##1} & - \glslongextraSymbolFmt{##1}\tabularnewline - }% - \renewcommand{\subglossentry}[3]{% - \glslongextraSubNameFmt{##1}{##2} & - \glslongextraSubDescFmt{##1}{##2} & - \glslongextraSubSymbolFmt{##1}{##2}% - \tabularnewline - }% - \ifglsnogroupskip - \renewcommand*{\glsgroupskip}{}% - \else - \renewcommand*{\glsgroupskip}{\glspenaltygroupskip}% - \fi + \renewcommand*{\glsgroupskip}{\ifglsnogroupskip\else\glstreegroupskip\fi}% + } } +{} % \end{macrocode} -%\end{abbrvstyle} % -%\begin{macro}{\glslongextraNameDescSymLocationHeader} -%\changes{1.37}{2018-11-30}{new} +% The \glostyle{indexgroup} style is redefined to discourage a page +% break after the heading. +%\changes{1.21}{2017-11-03}{redefined \texttt{indexgroup} to discourage +%breaks after group headings} % \begin{macrocode} -\newcommand{\glslongextraNameDescSymLocationHeader}{% - \glslongextraNameDescSymLocationTabularHeader\endhead - \glslongextraNameDescSymLocationTabularFooter\endfoot -} +\ifdef{\@glsstyle@indexgroup} +{% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\glslongextraNameDescSymLocationTabularHeader} -%\changes{1.37}{2018-11-30}{new} +% Provide formatting command for sub-headings to make it easier to +% adjust. +%\begin{macro}{\glsindexsubgroupitem} +%\begin{definition} +%\cs{glsindexsubgroupitem}\marg{previous group level}\marg{level}\marg{parent label}\marg{group label}\marg{title} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} % \begin{macrocode} -\newcommand{\glslongextraNameDescSymLocationTabularHeader}{% - \toprule - \glslongextraHeaderFmt\entryname & - \glslongextraHeaderFmt\descriptionname & - \glslongextraHeaderFmt\symbolname & - \glslongextraHeaderFmt\pagelistname\tabularnewline - \midrule -} + \newcommand*{\glsindexsubgroupitem}[5]{% + \ifcase#2\relax +% \end{macrocode} +%This case shouldn't occur as \cs{glsgroupheading} will be used +%instead, but include for completeness. +% \begin{macrocode} + \item \glstreegroupheaderfmt{#5}% + \glstreegroupheaderskip + \or + \smallskip + \subitem \glstreegroupheaderfmt{#5}% + \smallskip + \else + \smallskip + \subsubitem \glstreegroupheaderfmt{#5}% + \smallskip + \fi + } % \end{macrocode} %\end{macro} -% -%\begin{macro}{\glslongextraNameDescSymLocationTabularFooter} -%\changes{1.37}{2018-11-30}{new} % \begin{macrocode} -\newcommand{\glslongextraNameDescSymLocationTabularFooter}{% - \bottomrule + \renewglossarystyle{indexgroup}{% + \setglossarystyle{index}% +% \end{macrocode} +% Group heading. +% \begin{macrocode} + \renewcommand*{\glsgroupheading}[1]{% + \glsxtrgetgrouptitle{##1}{\glsxtr@grptitle}% + \glstreePreHeader{##1}{\glsxtr@grptitle}% + \item\glstreegroupheaderfmt{\glsxtr@grptitle}% + \glstreegroupheaderskip\@afterheading + }% +% \end{macrocode} +%\changes{1.49}{2022-10-14}{added \cs{glssubgroupheading}} +% Sub-groups are only supported with \cs{printunsrtglossary}. +% \begin{macrocode} + \renewcommand*{\glssubgroupheading}[4]{% + \glsxtrgetgrouptitle{##4}{\glsxtr@grptitle}% + \glstreeSubPreHeader{##1}{##2}{##3}{##4}{\glsxtr@grptitle}% + \glsindexsubgroupitem{##1}{##2}{##3}{##4}{\glsxtr@grptitle}% + \@afterheading + }% + } } +{} % \end{macrocode} -%\end{macro} % -%\begin{abbrvstyle}{long-name-desc-sym-loc} -%\changes{1.37}{2018-11-30}{new} -%Four columns: name, description and location +%Similarly for \glostyle{indexhypergroup}. +%\changes{1.21}{2017-11-03}{redefined \texttt{indexhypergroup} to discourage +%breaks after group headings} % \begin{macrocode} -\newglossarystyle{long-name-desc-sym-loc}% +\ifdef{\@glsstyle@indexhypergroup} {% - \ifGlsLongExtraUseTabular - \renewenvironment{theglossary}% - {% - \glslongextraSymLocSetDescWidth - \edef\@glslongextra@begintab{% - \noexpand\begin{tabular}[\glslongextraTabularVAlign]{% - \expandonce\glslongextraNameAlign - \expandonce\glslongextraDescAlign - \expandonce\glslongextraSymbolAlign - \expandonce\glslongextraLocationAlign - }}% - \@glslongextra@begintab - }% - {% - \glslongextraNameDescSymLocationTabularFooter - \end{tabular}% - }% - \renewcommand*{\glossaryheader}{\glslongextraNameDescSymLocationTabularHeader}% - \else - \renewenvironment{theglossary}% - {% - \glspatchLToutput - \glslongextraSymLocSetDescWidth - \edef\@glslongextra@begintab{% - \noexpand\begin{longtable}{% - \expandonce\glslongextraNameAlign - \expandonce\glslongextraDescAlign - \expandonce\glslongextraSymbolAlign - \expandonce\glslongextraLocationAlign - }}% - \@glslongextra@begintab + \renewglossarystyle{indexhypergroup}{% + \setglossarystyle{index}% + \renewcommand*{\glossaryheader}{% + \item\glstreenavigationfmt{\glsnavigation}% + \glstreegroupheaderskip\@afterheading}% +% \end{macrocode} +% Group heading. +% \begin{macrocode} + \renewcommand*{\glsgroupheading}[1]{% + \glsxtrgetgrouptitle{##1}{\glsxtr@grptitle}% + \glstreePreHeader{##1}{\glsxtr@grptitle}% + \item\glstreegroupheaderfmt + {\glsnavhypertarget{##1}{\glsxtr@grptitle}}% + \glstreegroupheaderskip\@afterheading}% +% \end{macrocode} +%\changes{1.49}{2022-10-14}{added \cs{glssubgroupheading}} +% Sub-groups are only supported with \cs{printunsrtglossary}. +% \begin{macrocode} + \renewcommand*{\glssubgroupheading}[4]{% + \glsxtrgetgrouptitle{##4}{\glsxtr@grptitle}% + \glstreeSubPreHeader{##1}{##2}{##3}{##4}{\glsxtr@grptitle}% + \glsindexsubgroupitem{##1}{##2}{##3}{##4}% + {\glsnavhypertarget{##4}{\glsxtr@grptitle}}% + \@afterheading }% - {\end{longtable}}% - \renewcommand*{\glossaryheader}{\glslongextraNameDescSymLocationHeader}% - \fi - \renewcommand*{\glsgroupheading}[1]{\glslongextraGroupHeading{4}{##1}}% - \renewcommand{\glossentry}[2]{% - \glslongextraNameFmt{##1} & - \glslongextraDescFmt{##1} & - \glslongextraSymbolFmt{##1}& - \glslongextraLocationFmt{##1}{##2}\tabularnewline - }% - \renewcommand{\subglossentry}[3]{% - \glslongextraSubNameFmt{##1}{##2} & - \glslongextraSubDescFmt{##1}{##2} & - \glslongextraSubSymbolFmt{##1}{##2}& - \glslongextraSubLocationFmt{##1}{##2}{##3}% - \tabularnewline }% - \ifglsnogroupskip - \renewcommand*{\glsgroupskip}{}% - \else - \renewcommand*{\glsgroupskip}{\glspenaltygroupskip}% - \fi } +{} % \end{macrocode} -%\end{abbrvstyle} % -%\begin{macro}{\glslongextraNameSymDescHeader} -%\changes{1.37}{2018-11-30}{new} +%Adjust \glostyle{tree} style to remove hard coded space before +%number list. % \begin{macrocode} -\newcommand{\glslongextraNameSymDescHeader}{% - \glslongextraNameSymDescTabularHeader\endhead - \glslongextraNameSymDescTabularFooter\endfoot -} +\ifdef{\@glsstyle@tree} +{% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\glslongextraNameSymDescTabularHeader} -%\changes{1.37}{2018-11-30}{new} +% The original \glostyle{alttree} style doesn't use \cs{glstreepredesc} +% but since v1.42 the modified style (below) has switched to using +% \cs{glstreeDescLoc} so provide an alternative that can be used +% with \glostyle{alttree}. +%\begin{macro}{\glsxtrtreepredesc} +%\changes{1.46}{2021-09-20}{new} % \begin{macrocode} -\newcommand{\glslongextraNameSymDescTabularHeader}{% - \toprule - \glslongextraHeaderFmt\entryname & - \glslongextraHeaderFmt\symbolname & - \glslongextraHeaderFmt\descriptionname\tabularnewline - \midrule -} + \newcommand{\glsxtrtreepredesc}{\glstreepredesc} % \end{macrocode} %\end{macro} -% -%\begin{macro}{\glslongextraNameSymDescTabularFooter} -%\changes{1.37}{2018-11-30}{new} +%\begin{macro}{\glsxtrtreechildpredesc} +%\changes{1.46}{2021-09-20}{new} % \begin{macrocode} -\newcommand{\glslongextraNameSymDescTabularFooter}{% - \bottomrule -} + \newcommand{\glsxtrtreechildpredesc}{\glstreechildpredesc} % \end{macrocode} %\end{macro} -% -%\begin{abbrvstyle}{long-name-sym-desc} -%\changes{1.37}{2018-11-30}{new} -%Three column style with symbol in the second column. -% \begin{macrocode} -\newglossarystyle{long-name-sym-desc}% -{% - \ifGlsLongExtraUseTabular - \renewenvironment{theglossary}% - {% - \glslongextraSymSetDescWidth - \edef\@glslongextra@begintab{% - \noexpand\begin{tabular}[\glslongextraTabularVAlign]{% - \expandonce\glslongextraNameAlign - \expandonce\glslongextraSymbolAlign - \expandonce\glslongextraDescAlign - }}% - \@glslongextra@begintab - }% - {% - \glslongextraNameSymDescTabularFooter - \end{tabular}% - }% - \renewcommand*{\glossaryheader}{\glslongextraNameSymDescTabularHeader}% - \else - \renewenvironment{theglossary}% - {% - \glspatchLToutput - \glslongextraSymSetDescWidth - \edef\@glslongextra@begintab{% - \noexpand\begin{longtable}{% - \expandonce\glslongextraNameAlign - \expandonce\glslongextraSymbolAlign - \expandonce\glslongextraDescAlign - }}% - \@glslongextra@begintab - }% - {\end{longtable}}% - \renewcommand*{\glossaryheader}{\glslongextraNameSymDescHeader}% - \fi - \renewcommand*{\glsgroupheading}[1]{\glslongextraGroupHeading{3}{##1}}% - \renewcommand{\glossentry}[2]{% - \glslongextraNameFmt{##1} & - \glslongextraSymbolFmt{##1} & - \glslongextraDescFmt{##1}\tabularnewline - }% - \renewcommand{\subglossentry}[3]{% - \glslongextraSubNameFmt{##1}{##2} & - \glslongextraSubSymbolFmt{##1}{##2} & - \glslongextraSubDescFmt{##1}{##2}\tabularnewline - }% - \ifglsnogroupskip - \renewcommand*{\glsgroupskip}{}% - \else - \renewcommand*{\glsgroupskip}{\glspenaltygroupskip}% - \fi -} -% \end{macrocode} -%\end{abbrvstyle} -% -%\begin{macro}{\glslongextraNameSymDescLocationHeader} -%\changes{1.37}{2018-11-30}{new} +%Provide a command for use with the \glostyle{tree} styles that displays +%the pre-description separator, the +%description and post-description hook. +%\begin{macro}{\glstreedesc} +%\changes{1.31}{2018-05-09}{new} % \begin{macrocode} -\newcommand{\glslongextraNameSymDescLocationHeader}{% - \glslongextraNameSymDescLocationTabularHeader\endhead - \glslongextraNameSymDescLocationTabularFooter\endfoot -} + \newcommand{\glstreedesc}[1]{% + \glsxtrtreepredesc\glossentrydesc{#1}\glspostdescription + } % \end{macrocode} %\end{macro} -% -%\begin{macro}{\glslongextraNameSymDescLocationTabularHeader} -%\changes{1.37}{2018-11-30}{new} +%\begin{macro}{\glstreeDescLoc} +%\changes{1.41}{2019-04-09}{new} +%\begin{definition} +%\cs{glstreeDescLoc}\marg{label}\marg{location} +%\end{definition} +%This checks for the description and symbol. If both are missing, +%a different separator may be required. For example, a comma and +%space if there's no description or symbol but just a space if +%either of those fields are present. % \begin{macrocode} -\newcommand{\glslongextraNameSymDescLocationTabularHeader}{% - \toprule - \glslongextraHeaderFmt\entryname & - \glslongextraHeaderFmt\symbolname & - \glslongextraHeaderFmt\descriptionname & - \glslongextraHeaderFmt\pagelistname\tabularnewline - \midrule -} + \newcommand{\glstreeDescLoc}[2]{% + \ifglshasdesc{#1}% + {\glstreedesc{#1}\glstreeprelocation}% + {\ifglshassymbol{#1}{\glstreeprelocation}{\glstreeNoDescSymbolPreLocation}}% + #2% + } % \end{macrocode} %\end{macro} -% -%\begin{macro}{\glslongextraNameSymDescLocationTabularFooter} -%\changes{1.37}{2018-11-30}{new} +%\begin{macro}{\glstreeNoDescSymbolPreLocation} +%\changes{1.42}{2020-02-03}{new} +%\begin{definition} +%\cs{glstreeNoDescSymbolPreLocation} +%\end{definition} % \begin{macrocode} -\newcommand{\glslongextraNameSymDescLocationTabularFooter}{% - \bottomrule -} + \newcommand{\glstreeNoDescSymbolPreLocation}{\space} % \end{macrocode} %\end{macro} -% -%\begin{abbrvstyle}{long-name-sym-desc-loc} -%\changes{1.37}{2018-11-30}{new} -%Four column style with symbol in the second column. +%Similarly for the symbol. +%\begin{macro}{\glstreesymbol} +%\changes{1.31}{2018-05-09}{new} % \begin{macrocode} -\newglossarystyle{long-name-sym-desc-loc}% -{% - \ifGlsLongExtraUseTabular - \renewenvironment{theglossary}% - {% - \glslongextraSymLocSetDescWidth - \edef\@glslongextra@begintab{% - \noexpand\begin{tabular}[\glslongextraTabularVAlign]{% - \expandonce\glslongextraNameAlign - \expandonce\glslongextraSymbolAlign - \expandonce\glslongextraDescAlign - \expandonce\glslongextraLocationAlign - }}% - \@glslongextra@begintab - }% - {% - \glslongextraNameSymDescLocationTabularFooter - \end{tabular}% - }% - \renewcommand*{\glossaryheader}{\glslongextraNameSymDescLocationTabularHeader}% - \else - \renewenvironment{theglossary}% - {% - \glspatchLToutput - \glslongextraSymLocSetDescWidth - \edef\@glslongextra@begintab{% - \noexpand\begin{longtable}{% - \expandonce\glslongextraNameAlign - \expandonce\glslongextraSymbolAlign - \expandonce\glslongextraDescAlign - \expandonce\glslongextraLocationAlign - }}% - \@glslongextra@begintab - }% - {\end{longtable}}% - \renewcommand*{\glossaryheader}{\glslongextraNameSymDescLocationHeader}% - \fi - \renewcommand*{\glsgroupheading}[1]{\glslongextraGroupHeading{4}{##1}}% - \renewcommand{\glossentry}[2]{% - \glslongextraNameFmt{##1} & - \glslongextraSymbolFmt{##1} & - \glslongextraDescFmt{##1} & - \glslongextraLocationFmt{##1}{##2}\tabularnewline - }% - \renewcommand{\subglossentry}[3]{% - \glslongextraSubNameFmt{##1}{##2} & - \glslongextraSubSymbolFmt{##1}{##2} & - \glslongextraSubDescFmt{##1}{##2} & - \glslongextraSubLocationFmt{##1}{##2}{##3}\tabularnewline + \newcommand{\glstreesymbol}[1]{% + \ifglshassymbol{#1}{\space(\glossentrysymbol{#1})}{}% }% - \ifglsnogroupskip - \renewcommand*{\glsgroupskip}{}% - \else - \renewcommand*{\glsgroupskip}{\glspenaltygroupskip}% - \fi -} % \end{macrocode} -%\end{abbrvstyle} -% -%\begin{macro}{\glslongextraSymDescNameHeader} -%\changes{1.37}{2018-11-30}{new} +%\end{macro} +%And for the child entries: +%\begin{macro}{\glstreechilddesc} +%\changes{1.31}{2018-05-09}{new} % \begin{macrocode} -\newcommand{\glslongextraSymDescNameHeader}{% - \glslongextraSymDescNameTabularHeader\endhead - \glslongextraSymDescNameTabularFooter\endfoot -} + \newcommand{\glstreechilddesc}[1]{% + \glsxtrtreechildpredesc\glossentrydesc{#1}\glspostdescription + }% % \end{macrocode} %\end{macro} -% -%\begin{macro}{\glslongextraSymDescNameTabularHeader} -%\changes{1.37}{2018-11-30}{new} +%\begin{macro}{\glstreeChildDescLoc} +%\changes{1.41}{2019-04-09}{new} +%\changes{1.42}{2020-02-03}{added \cs{glstreeNoDescSymbolPreLocation}} % \begin{macrocode} -\newcommand{\glslongextraSymDescNameTabularHeader}{% - \toprule - \glslongextraHeaderFmt\symbolname & - \glslongextraHeaderFmt\descriptionname & - \glslongextraHeaderFmt\entryname\tabularnewline - \midrule -} + \newcommand{\glstreeChildDescLoc}[2]{% + \ifglshasdesc{#1}% + {\glstreechilddesc{#1}\glstreechildprelocation}% + {\ifglshassymbol{#1}{\glstreechildprelocation}% + {\glstreeNoDescSymbolPreLocation}% + }% + #2% + }% % \end{macrocode} %\end{macro} -% -%\begin{macro}{\glslongextraSymDescNameTabularFooter} -%\changes{1.37}{2018-11-30}{new} +%\begin{macro}{\glstreechildsymbol} +%\changes{1.31}{2018-05-09}{new} +%This just behaves in the same way as the top-level. % \begin{macrocode} -\newcommand{\glslongextraSymDescNameTabularFooter}{% - \bottomrule -} + \newcommand{\glstreechildsymbol}[1]{% + \glstreesymbol{#1}% + }% % \end{macrocode} %\end{macro} -% -%\begin{abbrvstyle}{long-sym-desc-name} -%\changes{1.37}{2018-11-30}{new} -%Three column style with symbol in the first column, description in -%the second and name in the third. +%Redefine tree style. % \begin{macrocode} -\newglossarystyle{long-sym-desc-name}% -{% - \ifGlsLongExtraUseTabular - \renewenvironment{theglossary}% - {% - \glslongextraSymSetDescWidth - \edef\@glslongextra@begintab{% - \noexpand\begin{tabular}[\glslongextraTabularVAlign]{% - \expandonce\glslongextraSymbolAlign - \expandonce\glslongextraDescAlign - \expandonce\glslongextraNameAlign - }}% - \@glslongextra@begintab - }% - {% - \glslongextraSymDescNameTabularFooter - \end{tabular}% + \renewglossarystyle{tree}{% + \renewenvironment{theglossary}% + {\setlength{\parindent}{0pt}% + \setlength{\parskip}{0pt plus 0.3pt}}% + {}% + \renewcommand*{\glossaryheader}{}% +% \end{macrocode} +% Group heading. +% \begin{macrocode} + \renewcommand*{\glsgroupheading}[1]{}% +% \end{macrocode} +%\changes{1.49}{2022-10-14}{added \cs{glssubgroupheading}} +% Sub-groups are only supported with \cs{printunsrtglossary}. +% \begin{macrocode} + \renewcommand*{\glssubgroupheading}[4]{}% +% \end{macrocode} +% Top level entry. +% \begin{macrocode} + \renewcommand{\glossentry}[2]{% + \hangindent0pt\relax + \parindent0pt\relax + \glsentryitem{##1}\glstreenamefmt{\glstarget{##1}{\glossentryname{##1}}}% + \glstreesymbol{##1}% + \glstreeDescLoc{##1}{##2}\par }% - \renewcommand*{\glossaryheader}{\glslongextraSymDescNameTabularHeader}% - \else - \renewenvironment{theglossary}% - {% - \glspatchLToutput - \glslongextraSymSetDescWidth - \edef\@glslongextra@begintab{% - \noexpand\begin{longtable}{% - \expandonce\glslongextraSymbolAlign - \expandonce\glslongextraDescAlign - \expandonce\glslongextraNameAlign - }}% - \@glslongextra@begintab +% \end{macrocode} +% Sub entries. +% \begin{macrocode} + \renewcommand{\subglossentry}[3]{% + \hangindent##1\glstreeindent\relax + \parindent##1\glstreeindent\relax + \ifnum##1=1\relax + \glssubentryitem{##2}% + \fi + \glstreenamefmt{\glstarget{##2}{\glossentryname{##2}}}% + \glstreechildsymbol{##2}% + \glstreeChildDescLoc{##2}{##3}\par }% - {\end{longtable}}% - \renewcommand*{\glossaryheader}{\glslongextraSymDescNameHeader}% - \fi - \renewcommand*{\glsgroupheading}[1]{\glslongextraGroupHeading{3}{##1}}% - \renewcommand{\glossentry}[2]{% - \glslongextraSymbolFmt{##1} & - \glslongextraDescFmt{##1} & - \glslongextraNameFmt{##1}\tabularnewline - }% - \renewcommand{\subglossentry}[3]{% - \glslongextraSubSymbolFmt{##1}{##2} & - \glslongextraSubDescFmt{##1}{##2} & - \glslongextraSubNameFmt{##1}{##2}\tabularnewline + \renewcommand*{\glsgroupskip}{\ifglsnogroupskip\else\glstreegroupskip\fi}% }% - \ifglsnogroupskip - \renewcommand*{\glsgroupskip}{}% - \else - \renewcommand*{\glsgroupskip}{\glspenaltygroupskip}% - \fi } +{} % \end{macrocode} -%\end{abbrvstyle} % -%\begin{macro}{\glslongextraLocationSymDescNameHeader} -%\changes{1.37}{2018-11-30}{new} +% The \glostyle{treegroup} style is redefined to discourage a page +% break after the heading. +%\changes{1.21}{2017-11-03}{redefined \texttt{treegroup} to discourage +%breaks after group headings} % \begin{macrocode} -\newcommand{\glslongextraLocationSymDescNameHeader}{% - \glslongextraLocationSymDescNameTabularHeader\endhead - \glslongextraLocationSymDescNameTabularFooter\endfoot -} +\ifdef{\@glsstyle@treegroup} +{% +% \end{macrocode} +% Provide formatting command for sub-headings to make it easier to +% adjust. +%\begin{macro}{\glstreesubgroupitem} +%\begin{definition} +%\cs{glstreesubgroupitem}\marg{previous group level}\marg{level}\marg{parent label}\marg{group label}\marg{title} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} + \newcommand*{\glstreesubgroupitem}[5]{% + \par\smallskip\noindent\hspace{#2\glstreeindent}% + \glstreegroupheaderfmt{#5}\smallskip\par + } % \end{macrocode} %\end{macro} -% -%\begin{macro}{\glslongextraLocationSymDescNameTabularHeader} -%\changes{1.37}{2018-11-30}{new} +% Redefine treegroup style. % \begin{macrocode} -\newcommand{\glslongextraLocationSymDescNameTabularHeader}{% - \toprule - \glslongextraHeaderFmt\pagelistname & - \glslongextraHeaderFmt\symbolname & - \glslongextraHeaderFmt\descriptionname & - \glslongextraHeaderFmt\entryname\tabularnewline - \midrule + \renewglossarystyle{treegroup}{% + \setglossarystyle{tree}% +% \end{macrocode} +% Group heading. +% \begin{macrocode} + \renewcommand{\glsgroupheading}[1]{% + \glsxtrgetgrouptitle{##1}{\glsxtr@grptitle}% + \glstreePreHeader{##1}{\glsxtr@grptitle}% + \par\noindent\glstreegroupheaderfmt{\glsxtr@grptitle}% + \glstreegroupheaderskip\@afterheading}% +% \end{macrocode} +%\changes{1.49}{2022-10-14}{added \cs{glssubgroupheading}} +% Sub-groups are only supported with \cs{printunsrtglossary}. +% \begin{macrocode} + \renewcommand*{\glssubgroupheading}[4]{% + \glsxtrgetgrouptitle{##4}{\glsxtr@grptitle}% + \glstreeSubPreHeader{##1}{##2}{##3}{##4}{\glsxtr@grptitle}% + \glstreesubgroupitem{##1}{##2}{##3}{##4}{\glsxtr@grptitle}% + }% + } } +{} % \end{macrocode} -%\end{macro} % -%\begin{macro}{\glslongextraLocationSymDescNameTabularFooter} -%\changes{1.37}{2018-11-30}{new} +%Similarly for \glostyle{treehypergroup} +%\changes{1.21}{2017-11-03}{redefined \texttt{treehypergroup} to discourage +%breaks after group headings} % \begin{macrocode} -\newcommand{\glslongextraLocationSymDescNameTabularFooter}{% - \bottomrule +\ifdef{\@glsstyle@treehypergroup} +{% + \renewglossarystyle{treehypergroup}{% + \setglossarystyle{tree}% + \renewcommand*{\glossaryheader}{% + \par\noindent\glstreenavigationfmt{\glsnavigation}% + \glstreegroupheaderskip\@afterheading}% +% \end{macrocode} +% Group heading. +% \begin{macrocode} + \renewcommand*{\glsgroupheading}[1]{% + \glsxtrgetgrouptitle{##1}{\glsxtr@grptitle}% + \glstreePreHeader{##1}{\glsxtr@grptitle}% + \par\noindent + \glstreegroupheaderfmt + {\glsnavhypertarget{##1}{\glsxtr@grptitle}}% + \glstreegroupheaderskip\@afterheading}% +% \end{macrocode} +%\changes{1.49}{2022-10-14}{added \cs{glssubgroupheading}} +% Sub-groups are only supported with \cs{printunsrtglossary}. +% \begin{macrocode} + \renewcommand*{\glssubgroupheading}[4]{% + \glsxtrgetgrouptitle{##4}{\glsxtr@grptitle}% + \glstreeSubPreHeader{##1}{##2}{##3}{##4}{\glsxtr@grptitle}% + \glstreesubgroupitem{##1}{##2}{##3}{##4}% + {\glsnavhypertarget{##4}{\glsxtr@grptitle}}% + }% + } } +{} % \end{macrocode} -%\end{macro} % -%\begin{abbrvstyle}{long-loc-sym-desc-name} -%\changes{1.37}{2018-11-30}{new} -%Four column style with location list, symbol, description and name. +%Adjust \glostyle{treenoname} style to remove hard coded space before +%number list. % \begin{macrocode} -\newglossarystyle{long-loc-sym-desc-name}% +\ifdef{\@glsstyle@treenoname} {% - \ifGlsLongExtraUseTabular - \renewenvironment{theglossary}% - {% - \glslongextraSymLocSetDescWidth - \edef\@glslongextra@begintab{% - \noexpand\begin{tabular}[\glslongextraTabularVAlign]{% - \expandonce\glslongextraLocationAlign - \expandonce\glslongextraSymbolAlign - \expandonce\glslongextraDescAlign - \expandonce\glslongextraNameAlign - }}% - \@glslongextra@begintab - }% - {% - \glslongextraLocationSymDescNameTabularFooter - \end{tabular}% - }% - \renewcommand*{\glossaryheader}{\glslongextraLocationSymDescNameTabularHeader}% - \else - \renewenvironment{theglossary}% - {% - \glspatchLToutput - \glslongextraSymLocSetDescWidth - \edef\@glslongextra@begintab{% - \noexpand\begin{longtable}{% - \expandonce\glslongextraLocationAlign - \expandonce\glslongextraSymbolAlign - \expandonce\glslongextraDescAlign - \expandonce\glslongextraNameAlign - }}% - \@glslongextra@begintab - }% - {\end{longtable}}% - \renewcommand*{\glossaryheader}{\glslongextraLocationSymDescNameHeader}% - \fi - \renewcommand*{\glsgroupheading}[1]{\glslongextraGroupHeading{4}{##1}}% - \renewcommand{\glossentry}[2]{% - \glslongextraLocationFmt{##1}{##2} & - \glslongextraSymbolFmt{##1} & - \glslongextraDescFmt{##1} & - \glslongextraNameFmt{##1}\tabularnewline +% \end{macrocode} +%Provide a command for use with the \glostyle{treenoname} styles that displays +%the pre-description separator, the +%description and post-description hook. +%\begin{macro}{\glstreenonamedesc} +%\changes{1.31}{2018-05-09}{new} +% \begin{macrocode} + \newcommand{\glstreenonamedesc}[1]{% + \glstreepredesc\glossentrydesc{#1}\glspostdescription }% - \renewcommand{\subglossentry}[3]{% - \glslongextraSubLocationFmt{##1}{##2}{##3} & - \glslongextraSubSymbolFmt{##1}{##2} & - \glslongextraSubDescFmt{##1}{##2} & - \glslongextraSubNameFmt{##1}{##2}\tabularnewline +% \end{macrocode} +%\end{macro} +%Similarly for the symbol. +%\begin{macro}{\glstreenonamesymbol} +%\changes{1.31}{2018-05-09}{new} +% \begin{macrocode} + \newcommand{\glstreenonamesymbol}[1]{% + \ifglshassymbol{#1}{\space(\glossentrysymbol{#1})}{}% }% - \ifglsnogroupskip - \renewcommand*{\glsgroupskip}{}% - \else - \renewcommand*{\glsgroupskip}{\glspenaltygroupskip}% - \fi -} % \end{macrocode} -%\end{abbrvstyle} -% -%\begin{macro}{\glslongextraDescSymNameHeader} -%\changes{1.37}{2018-11-30}{new} +%\end{macro} +%\begin{macro}{\glstreenonameDescLoc} +%\changes{1.45}{2020-04-01}{new} % \begin{macrocode} -\newcommand{\glslongextraDescSymNameHeader}{% - \glslongextraDescSymNameTabularHeader\endhead - \glslongextraDescSymNameTabularFooter\endfoot -} + \newcommand{\glstreenonameDescLoc}[2]{% + \glstreenonamedesc{#1}\glstreeprelocation#2% + } % \end{macrocode} %\end{macro} -% -%\begin{macro}{\glslongextraDescSymNameTabularHeader} -%\changes{1.37}{2018-11-30}{new} +%\begin{macro}{\glstreenonamechilddesc} +%\changes{1.31}{2018-05-09}{new} +%The child entry doesn't have the pre-description separator as the +%name isn't displayed. % \begin{macrocode} -\newcommand{\glslongextraDescSymNameTabularHeader}{% - \toprule - \glslongextraHeaderFmt\descriptionname & - \glslongextraHeaderFmt\symbolname & - \glslongextraHeaderFmt\entryname\tabularnewline - \midrule -} + \newcommand{\glstreenonamechilddesc}[1]{% + \glossentrydesc{#1}\glspostdescription + }% % \end{macrocode} %\end{macro} -% -%\begin{macro}{\glslongextraDescSymNameTabularFooter} -%\changes{1.37}{2018-11-30}{new} +%\begin{macro}{\glstreenonameChildDescLoc} +%\changes{1.45}{2020-04-01}{new} % \begin{macrocode} -\newcommand{\glslongextraDescSymNameTabularFooter}{% - \bottomrule -} + \newcommand{\glstreenonameChildDescLoc}[2]{% + \glstreenonamechilddesc{#1}\glstreechildprelocation#2% + } % \end{macrocode} %\end{macro} -% -%\begin{abbrvstyle}{long-desc-sym-name} -%\changes{1.37}{2018-11-30}{new} -%Three column style with description in the first column, symbol in -%the second and name in the third. +%Redefine treenoname style % \begin{macrocode} -\newglossarystyle{long-desc-sym-name}% -{% - \ifGlsLongExtraUseTabular - \renewenvironment{theglossary}% - {% - \glslongextraSymSetDescWidth - \edef\@glslongextra@begintab{% - \noexpand\begin{tabular}[\glslongextraTabularVAlign]{% - \expandonce\glslongextraDescAlign - \expandonce\glslongextraSymbolAlign - \expandonce\glslongextraNameAlign - }}% - \@glslongextra@begintab - }% - {% - \glslongextraDescSymNameTabularFooter - \end{tabular}% - }% - \renewcommand*{\glossaryheader}{\glslongextraDescSymNameTabularHeader}% - \else - \renewenvironment{theglossary}% - {% - \glspatchLToutput - \glslongextraSymSetDescWidth - \edef\@glslongextra@begintab{% - \noexpand\begin{longtable}{% - \expandonce\glslongextraDescAlign - \expandonce\glslongextraSymbolAlign - \expandonce\glslongextraNameAlign - }}% - \@glslongextra@begintab - }% - {\end{longtable}}% - \renewcommand*{\glossaryheader}{\glslongextraDescSymNameHeader}% - \fi - \renewcommand*{\glsgroupheading}[1]{\glslongextraGroupHeading{3}{##1}}% - \renewcommand{\glossentry}[2]{% - \glslongextraDescFmt{##1} & - \glslongextraSymbolFmt{##1} & - \glslongextraNameFmt{##1}\tabularnewline - }% - \renewcommand{\subglossentry}[3]{% - \glslongextraSubDescFmt{##1}{##2} & - \glslongextraSubSymbolFmt{##1}{##2} & - \glslongextraSubNameFmt{##1}{##2}\tabularnewline - }% - \ifglsnogroupskip - \renewcommand*{\glsgroupskip}{}% - \else - \renewcommand*{\glsgroupskip}{\glspenaltygroupskip}% - \fi -} + \renewglossarystyle{treenoname}{% + \renewenvironment{theglossary}% + {\setlength{\parindent}{0pt}% + \setlength{\parskip}{0pt plus 0.3pt}}% + {}% + \renewcommand*{\glossaryheader}{}% % \end{macrocode} -%\end{abbrvstyle} -% -%\begin{macro}{\glslongextraLocationDescSymNameHeader} -%\changes{1.37}{2018-11-30}{new} +% Group heading. % \begin{macrocode} -\newcommand{\glslongextraLocationDescSymNameHeader}{% - \glslongextraLocationDescSymNameTabularHeader\endhead - \glslongextraLocationDescSymNameTabularFooter\endfoot -} + \renewcommand*{\glsgroupheading}[1]{}% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\glslongextraLocationDescSymNameTabularHeader} -%\changes{1.37}{2018-11-30}{new} +%\changes{1.49}{2022-10-14}{added \cs{glssubgroupheading}} +% Sub-groups are only supported with \cs{printunsrtglossary}. % \begin{macrocode} -\newcommand{\glslongextraLocationDescSymNameTabularHeader}{% - \toprule - \glslongextraHeaderFmt\pagelistname & - \glslongextraHeaderFmt\descriptionname & - \glslongextraHeaderFmt\symbolname & - \glslongextraHeaderFmt\entryname\tabularnewline - \midrule -} + \renewcommand*{\glssubgroupheading}[4]{}% + \renewcommand{\glossentry}[2]{% + \hangindent0pt\relax + \parindent0pt\relax + \glsentryitem{##1}\glstreenamefmt{\glstarget{##1}{\glossentryname{##1}}}% + \glstreenonamesymbol{##1}% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\glslongextraLocationDescSymNameTabularFooter} -%\changes{1.37}{2018-11-30}{new} +%\changes{1.45}{2020-04-01}{removed duplicate description} % \begin{macrocode} -\newcommand{\glslongextraLocationDescSymNameTabularFooter}{% - \bottomrule + \glstreenonameDescLoc{##1}{##2}\par + }% + \renewcommand{\subglossentry}[3]{% + \hangindent##1\glstreeindent\relax + \parindent##1\glstreeindent\relax + \ifnum##1=1\relax + \glssubentryitem{##2}% + \fi + \glstarget{##2}{\strut}% + \glstreenonameChildDescLoc{##2}{##3}\par + }% + \renewcommand*{\glsgroupskip}{\ifglsnogroupskip\else\glstreegroupskip\fi}% + } } +{} % \end{macrocode} -%\end{macro} % -%\begin{abbrvstyle}{long-loc-desc-sym-name} -%\changes{1.37}{2018-11-30}{new} -%Four column style with location list, description, symbol and name. +% The \glostyle{treenonamegroup} style is redefined to discourage a page +% break after the heading. There are no sub-groups as sub-entries +% don't have the name shown. +%\changes{1.21}{2017-11-03}{redefined \texttt{treenonamegroup} to discourage +%breaks after group headings} % \begin{macrocode} -\newglossarystyle{long-loc-desc-sym-name}% +\ifdef{\@glsstyle@treenonamegroup} {% - \ifGlsLongExtraUseTabular - \renewenvironment{theglossary}% - {% - \glslongextraSymLocSetDescWidth - \edef\@glslongextra@begintab{% - \noexpand\begin{tabular}[\glslongextraTabularVAlign]{% - \expandonce\glslongextraLocationAlign - \expandonce\glslongextraDescAlign - \expandonce\glslongextraSymbolAlign - \expandonce\glslongextraNameAlign - }}% - \@glslongextra@begintab - }% - {% - \glslongextraLocationDescSymNameTabularFooter - \end{tabular}% - }% - \renewcommand*{\glossaryheader}{\glslongextraLocationDescSymNameTabularHeader}% - \else - \renewenvironment{theglossary}% - {% - \glspatchLToutput - \glslongextraSymLocSetDescWidth - \edef\@glslongextra@begintab{% - \noexpand\begin{longtable}{% - \expandonce\glslongextraLocationAlign - \expandonce\glslongextraDescAlign - \expandonce\glslongextraSymbolAlign - \expandonce\glslongextraNameAlign - }}% - \@glslongextra@begintab + \renewglossarystyle{treenonamegroup}{% + \setglossarystyle{treenoname}% + \renewcommand{\glsgroupheading}[1]{% + \glsxtrgetgrouptitle{##1}{\glsxtr@grptitle}% + \glstreePreHeader{##1}{\glsxtr@grptitle}% + \par\noindent\glstreegroupheaderfmt{\glsxtr@grptitle}% + \glstreegroupheaderskip\@afterheading }% - {\end{longtable}}% - \renewcommand*{\glossaryheader}{\glslongextraLocationDescSymNameHeader}% - \fi - \renewcommand*{\glsgroupheading}[1]{\glslongextraGroupHeading{4}{##1}}% - \renewcommand{\glossentry}[2]{% - \glslongextraLocationFmt{##1}{##2} & - \glslongextraDescFmt{##1} & - \glslongextraSymbolFmt{##1} & - \glslongextraNameFmt{##1}\tabularnewline - }% - \renewcommand{\subglossentry}[3]{% - \glslongextraSubLocationFmt{##1}{##2}{##3} & - \glslongextraSubDescFmt{##1}{##2} & - \glslongextraSubSymbolFmt{##1}{##2} & - \glslongextraSubNameFmt{##1}{##2}\tabularnewline - }% - \ifglsnogroupskip - \renewcommand*{\glsgroupskip}{}% - \else - \renewcommand*{\glsgroupskip}{\glspenaltygroupskip}% - \fi + } } +{} % \end{macrocode} -%\end{abbrvstyle} % -%\iffalse +%Similarly for \glostyle{treenonamehypergroup} +%\changes{1.21}{2017-11-03}{redefined \texttt{treenonamehypergroup} to discourage +%breaks after group headings} % \begin{macrocode} -% +\ifdef{\@glsstyle@treenonamehypergroup} +{% + \renewglossarystyle{treenonamehypergroup}{% + \setglossarystyle{treenoname}% + \renewcommand*{\glossaryheader}{% + \par\noindent\glstreenavigationfmt{\glsnavigation}% + \glstreegroupheaderskip\@afterheading}% + \renewcommand*{\glsgroupheading}[1]{% + \glsxtrgetgrouptitle{##1}{\glsxtr@grptitle}% + \glstreePreHeader{##1}{\glsxtr@grptitle}% + \par\noindent + \glstreegroupheaderfmt{\glsnavhypertarget{##1}{\glsxtr@grptitle}}% + \glstreegroupheaderskip\@afterheading}% + } +} +{} % \end{macrocode} -%\fi -%\iffalse +% +% The \glostyle{alttree} style is redefined to make it easier to +% made minor adjustments. % \begin{macrocode} -%<*glossary-topic.sty> +\ifdef{\@glsstyle@alttree} +{% % \end{macrocode} -%\fi -%\chapter{topic styles (\styfmt{glossary-topic.sty})} -%\changes{1.40}{2019-03-22}{new} -%\section{Package Initialisation and Options} -%Provides \qt{topic} styles where top-level entries are considered a -%topic. +% Only redefine this style if it's already been defined. +% +%\begin{macro}{\glsalttreepredesc} +%\changes{1.46}{2021-09-20}{new} % \begin{macrocode} -\NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{glossary-topic}[2021/11/22 v1.48 (NLCT)] +\newcommand{\glsalttreepredesc}{} % \end{macrocode} -%Load required package. +%\end{macro} +%\begin{macro}{\glsalttreechildpredesc} +%\changes{1.46}{2021-09-20}{new} % \begin{macrocode} -\RequirePackage{multicol} +\newcommand{\glsalttreechildpredesc}{\glsalttreepredesc} % \end{macrocode} -%The top-level entries act like headers. If the top-level entry has a -%description it's placed below the name. -%\begin{style}{topic} -%\changes{1.40}{2019-03-22}{new} +%\end{macro} +%\begin{macro}{\glsxtralttreeSymbolDescLocation} +%\changes{1.05}{2016-06-10}{new} +%\begin{definition} +%\cs{glsxtralttreeSymbolDescLocation}\marg{label}\marg{location +%list} +%\end{definition} +%Layout the symbol, description and location for top-level entries. % \begin{macrocode} -\newglossarystyle{topic}{% - \renewenvironment{theglossary}% - {% - \glstopicInit - \def\glstopic@prechildren{}% - \def\glstopic@prevlevel{-1}% - }% - {\par}% - \renewcommand*{\glossaryheader}{}% - \renewcommand*{\glsgroupheading}[1]{% - \def\glstopic@prevlevel{-1}% - \glstopicGroupHeading{##1}% - }% - \renewcommand{\glossentry}[2]{% - \hangindent0pt\relax - \parindent\glstopicParIndent\relax - \glstopicItem{##1}{##2}% + \newcommand{\glsxtralttreeSymbolDescLocation}[2]{% + {% + \let\par\glsxtrAltTreePar % \end{macrocode} -%\changes{1.41}{2019-04-09}{added penalty if no description} -%If there isn't a description, penalise a page break. +%\changes{1.46}{2021-09-20}{switch to using \cs{glsalttreepredesc} and +%\cs{glsalttreechildpredesc}} % \begin{macrocode} - \ifglshasdesc{##1}% - {% - \def\glstopic@prechildren{}% - }% - {% - \def\glstopic@prechildren{\nopagebreak}% - }% - }% - \renewcommand{\subglossentry}[3]{% - \ifnum\glstopic@prevlevel=0\relax\glstopic@prechildren\fi - \def\glstopic@prevlevel{##1}% + \let\glsxtrtreepredesc\glsalttreepredesc + \let\glsxtrtreechildpredesc\glsalttreechildpredesc + \ifglshassymbol{#1}{(\glossentrysymbol{#1})\space}{}% % \end{macrocode} -%\changes{1.46}{2021-09-20}{grouping added to scope \cs{everypar} (bug 182)} -%Grouping is added to scope the effect of \cs{everypar}. +%\changes{1.41}{2019-04-09}{added check for description} +%\changes{1.42}{2020-02-03}{switched to using \cs{glstreeDescLoc}} +%\changes{1.44}{2020-03-23}{removed duplicate description} % \begin{macrocode} - \begingroup - \glstopicAssignSubIndent{##1}% - \glstopicSubItem{##1}{##2}{##3}% + \glstreeDescLoc{#1}{#2}\par + }% + } % \end{macrocode} -%\changes{1.46}{2021-09-20}{added \cs{par} (bug 176)} +%\end{macro} +% +%\begin{macro}{\glsxtrAltTreeIndent} +%\changes{1.05}{2016-06-10}{new} +% Paragraph indent for subsequent paragraphs in multi-paragraph +% descriptions. % \begin{macrocode} - \par - \endgroup - }% - \renewcommand*{\glsgroupskip}{}% -} + \newlength\glsxtrAltTreeIndent % \end{macrocode} -%\end{style} -%\begin{macro}{\glstopicGroupHeading} -%\changes{1.40}{2019-03-22}{new} -%\begin{definition} -%\cs{glstopicGroupHeading}\marg{group label} -%\end{definition} -%May be redefined if letter group headings are required. For -%example: -%\begin{verbatim} -%\renewcommand*{\glstopicGroupHeading}[1]{% -% \glsxtrgetgrouptitle{#1}{\thisgrptitle}% -% \section*{\thisgrptitle}% -%} -%\end{verbatim} +%\end{macro} +% +%\begin{macro}{\glsxtrAltTreePar} +%\changes{1.05}{2016-06-10}{new} +%Multi-paragraph descriptions need to keep the hanging indent. % \begin{macrocode} -\newcommand*{\glstopicGroupHeading}[1]{} + \newcommand{\glsxtrAltTreePar}{% + \@@par + \glsxtrAltTreeSetHangIndent + \setlength{\parindent}{\dimexpr\hangindent+\glsxtrAltTreeIndent}% + } % \end{macrocode} %\end{macro} -%\begin{macro}{\glstopicItem} -%\changes{1.40}{2019-03-22}{new} +% +%\begin{macro}{\glsxtralttreeSubSymbolDescLocation} +%\changes{1.05}{2016-06-10}{new} %\begin{definition} -%\cs{glstopicItem}\marg{label}\marg{location list} +%\cs{glsxtralttreeSubSymbolDescLocation}\marg{level}\marg{label}\marg{location +%list} %\end{definition} +%Layout the symbol, description and location for sub-entries. +% Defaults to the same as the top-level. % \begin{macrocode} -\newcommand*{\glstopicItem}[2]{% - \glspar\glstopicPreSkip\glspar\noindent - \glstopicMarker{#1}% - \glstopicTitleFont - {% - \glsentryitem{#1}\glstarget{#1}{\glstopicTitle{#1}}% - }% - \ifglshasdesc{#1}% - {\glspar\nobreak\glstopicMidSkip\glspar\nobreak - \@afterheading\glstopicDesc{#1}\glspar\glstopicPostSkip}% - {\glspar\nobreak\glstopicPostSkip}% - \glstopicLoc{#1}{#2}% -} + \newcommand{\glsxtralttreeSubSymbolDescLocation}[3]{% + \glsxtralttreeSymbolDescLocation{#2}{#3}% + } % \end{macrocode} %\end{macro} -%\begin{macro}{\glstopicMarker} -%\changes{1.40}{2019-03-22}{new} -% May be used to insert a bookmark etc if required. +% +%\begin{macro}{\glsxtrtreetopindent} +%\changes{1.05}{2016-06-10}{new} +% The original style has to keep computing the width of the name at +% each entry. This register allows the style to compute it once for +% the top-level at the start of the glossary. % \begin{macrocode} -\newcommand*{\glstopicMarker}[1]{} + \newlength\glsxtrtreetopindent % \end{macrocode} %\end{macro} -%\begin{macro}{\glstopicName} -%\changes{1.40}{2019-03-22}{new} +% +%\begin{macro}{\glsxtralttreeInit} +%\changes{1.05}{2016-06-10}{new} +% User-level initialisation for the \glostyle{alttree} style. % \begin{macrocode} -\newcommand*{\glstopicTitle}[1]{\Glossentryname{#1}% - \ifglshassymbol{#1}{\space(\glossentrysymbol{#1})}{}% -} + \newcommand*{\glsxtralttreeInit}{% + \settowidth{\glsxtrtreetopindent}{\glstreenamefmt{\glsgetwidestname\space}}% + \glsxtrAltTreeIndent=\parindent + } % \end{macrocode} %\end{macro} -%\begin{macro}{\glstopicTitleFont} -%\changes{1.40}{2019-03-22}{new} +% +%\begin{macro}{\gglssetwidest} +%\changes{1.21}{2017-11-03}{new} +% The original \cs{glssetwidest} only uses \cs{def}. This uses +% \cs{gdef}. % \begin{macrocode} -\newcommand*{\glstopicTitleFont}[1]{\textbf{\large #1}} + \newcommand*{\gglssetwidest}[2][0]{% + \csgdef{@glswidestname\romannumeral#1}{#2}% + } % \end{macrocode} %\end{macro} -%\begin{macro}{\glstopicDesc} -%\changes{1.40}{2019-03-22}{new} +% +%\begin{macro}{\eglssetwidest} +%\changes{1.05}{2016-06-10}{new} +% The original \cs{glssetwidest} only uses \cs{def}. This uses +% \cs{protected@csedef}. % \begin{macrocode} -\newcommand*{\glstopicDesc}[1]{\Glossentrydesc{#1}\glspostdescription} + \newcommand*{\eglssetwidest}[2][0]{% + \protected@csedef{@glswidestname\romannumeral#1}{#2}% + } % \end{macrocode} %\end{macro} -%\begin{macro}{\glstopicLoc} -%\changes{1.40}{2019-03-22}{new} +% +%\begin{macro}{\xglssetwidest} +%\changes{1.05}{2016-06-10}{new} +%Like the above but uses \cs{protected@csxdef}. % \begin{macrocode} -\newcommand*{\glstopicLoc}[2]{} + \newcommand*{\xglssetwidest}[2][0]{% + \protected@csxdef{@glswidestname\romannumeral#1}{#2}% + } % \end{macrocode} %\end{macro} -%\begin{macro}{\glstopicParIndent} -%\changes{1.40}{2019-03-22}{new} +% +%\begin{macro}{\glsupdatewidest} +%\changes{1.23}{2017-11-12}{new} +%Only sets if new value is wider than old value. % \begin{macrocode} -\newlength\glstopicParIndent -\setlength\glstopicParIndent{20pt} + \newcommand*{\glsupdatewidest}[2][0]{% + \ifcsundef{@glswidestname\romannumeral#1}% + {\csdef{@glswidestname\romannumeral#1}{#2}}% + {% + \settowidth{\dimen@}{\csuse{@glswidestname\romannumeral#1}}% + \settowidth{\dimen@ii}{#2}% + \ifdim\dimen@ii>\dimen@ + \csdef{@glswidestname\romannumeral#1}{#2}% + \fi + }% + } % \end{macrocode} %\end{macro} -%\begin{macro}{\glstopicSubIndent} -%\changes{1.40}{2019-03-22}{new} +% +%\begin{macro}{\gglsupdatewidest} +%\changes{1.23}{2017-11-12}{new} +%As above but global definition. % \begin{macrocode} -\newlength\glstopicSubIndent -\setlength\glstopicSubIndent{20pt} + \newcommand*{\gglsupdatewidest}[2][0]{% + \ifcsundef{@glswidestname\romannumeral#1}% + {\csgdef{@glswidestname\romannumeral#1}{#2}}% + {% + \settowidth{\dimen@}{\csuse{@glswidestname\romannumeral#1}}% + \settowidth{\dimen@ii}{#2}% + \ifdim\dimen@ii>\dimen@ + \csgdef{@glswidestname\romannumeral#1}{#2}% + \fi + }% + } % \end{macrocode} %\end{macro} -%\begin{macro}{\glstopicInit} -%\changes{1.40}{2019-03-22}{new} +% +%\begin{macro}{\eglsupdatewidest} +%\changes{1.23}{2017-11-12}{new} +%As \cs{glsupdatewidest} but expands value. % \begin{macrocode} -\newcommand{\glstopicInit}{} + \newcommand*{\eglsupdatewidest}[2][0]{% + \ifcsundef{@glswidestname\romannumeral#1}% + {\protected@csedef{@glswidestname\romannumeral#1}{#2}}% + {% + \settowidth{\dimen@}{\csuse{@glswidestname\romannumeral#1}}% + \settowidth{\dimen@ii}{#2}% + \ifdim\dimen@ii>\dimen@ + \protected@csedef{@glswidestname\romannumeral#1}{#2}% + \fi + }% + } % \end{macrocode} %\end{macro} -%\begin{macro}{\glstopicAssignSubIndent} -%\changes{1.40}{2019-03-22}{new} -%\begin{definition} -%\cs{glstopicAssignSubIndent}\marg{level} -%\end{definition} -%Used to set the indentation for sub-levels. -% \begin{macrocode} -\newcommand*{\glstopicAssignSubIndent}[1]{% -% \end{macrocode} -%\changes{1.41}{2019-04-09}{moved \cs{par} from \cs{glstopicSubItem}} -% \begin{macrocode} - \par - \parindent\dimexpr#1\glstopicSubIndent-\glstopicSubIndent\relax - \glstopicAssignWidest{#1}% - \glstopicsubitemhangindent=\dimexpr\parindent+\glstopicwidest\relax - \hangindent\glstopicsubitemhangindent\relax -% \end{macrocode} -%\changes{1.46}{2021-09-20}{bug 182 maintain hangindent for multiple paragraphs} +% +%\begin{macro}{\xglsupdatewidest} +%\changes{1.23}{2017-11-12}{new} +%As above but global. % \begin{macrocode} - \everypar{\hangindent\glstopicsubitemhangindent\relax - \parindent\dimexpr\glstopicSubItemParIndent+\glstopicsubitemhangindent\relax}% -} + \newcommand*{\xglsupdatewidest}[2][0]{% + \ifcsundef{@glswidestname\romannumeral#1}% + {\protected@csxdef{@glswidestname\romannumeral#1}{#2}}% + {% + \settowidth{\dimen@}{\csuse{@glswidestname\romannumeral#1}}% + \settowidth{\dimen@ii}{#2}% + \ifdim\dimen@ii>\dimen@ + \protected@csxdef{@glswidestname\romannumeral#1}{#2}% + \fi + }% + } % \end{macrocode} %\end{macro} % -%\begin{macro}{\glstopicsubitemhangindent} -%\changes{1.46}{2021-09-20}{new} +%\begin{macro}{\glsgetwidestname} +%\changes{1.05}{2016-06-10}{new} +% Provide a user-level macro to obtain the widest top-level name. % \begin{macrocode} -\newlength\glstopicsubitemhangindent + \newcommand*{\glsgetwidestname}{\@glswidestname} % \end{macrocode} %\end{macro} % -%\begin{macro}{\glstopicSubItemParIndent} -%\changes{1.46}{2021-09-20}{new} +%\begin{macro}{\glsgetwidestsubname} +%\changes{1.05}{2016-06-10}{new} +% Provide a user-level macro to obtain the widest sub-entry name. % \begin{macrocode} -\newlength\glstopicSubItemParIndent -\glstopicSubItemParIndent\parindent + \newcommand*{\glsgetwidestsubname}[1]{% + \ifcsundef{@glswidestname\romannumeral#1}% + {\@glswidestname}% + {\csuse{@glswidestname\romannumeral#1}}% + } % \end{macrocode} %\end{macro} % -%\begin{macro}{\glstopicwidest} -%\changes{1.40}{2019-03-22}{new} +%\begin{macro}{\glsFindWidestTopLevelName} +%CamelCase is easier for long command names. Provide a CamelCase +%synonym of \cs{glsfindwidesttoplevelname}. % \begin{macrocode} -\newlength\glstopicwidest + \let\glsFindWidestTopLevelName\glsfindwidesttoplevelname % \end{macrocode} %\end{macro} % -%\begin{macro}{\glstopicAssignWidest} -%\changes{1.40}{2019-03-22}{new} -%\begin{definition} -%\cs{glstopicAssignWidest}\marg{level} -%\end{definition} -%Used in the definition of \cs{glstopicAssignSubIndent} -%to set the indentation from the widest name for the given -%level. This will require \sty{glossary-tree} to set the values. -% \begin{macrocode} -\newcommand*{\glstopicAssignWidest}[1]{% - \ifcsundef{@glswidestlength\romannumeral#1}% - {% - \ifcsdef{@glswidestname\romannumeral#1}% +%\begin{macro}{\glsFindWidestUsedTopLevelName} +%\changes{1.05}{2016-06-10}{new} +% Like \cs{glsfindwidesttoplevelname} but has an additional check +% that the entry has been used. Only useful if the glossaries occur +% at the end of the document, in which case this command should go +% at the start of the glossary. Alternatively, place at the end of +% the document and save for the next run. +% \begin{macrocode} + \newrobustcmd*{\glsFindWidestUsedTopLevelName}[1][\@glo@types]{% + \dimen@=0pt\relax + \gls@tmplen=0pt\relax + \forallglossaries[#1]{\@gls@type}% {% - \settowidth{\glstopicwidest}{% - \glstopicSubNameFont{\csuse{@glswidestname\romannumeral#1}}% - \glstopicSubItemSep + \forglsentries[\@gls@type]{\@glo@label}% + {% + \ifglsused{\@glo@label}% + {% + \ifglshasparent{\@glo@label}% + {}% + {% + \settowidth{\dimen@}% + {\glstreenamefmt{\glsentryname{\@glo@label}}}% + \ifdim\dimen@>\gls@tmplen + \gls@tmplen=\dimen@ + \eglssetwidest{\glsentryname{\@glo@label}}% + \fi + }% + }% + {}% }% }% - {\setlength{\glstopicwidest}{0pt}}% + } % \end{macrocode} -%Save the value so that it doesn't have to keep being recalculated. +%\end{macro} +% +%\begin{macro}{\glsFindWidestUsedAnyName} +%\changes{1.05}{2016-06-10}{new} +% Like the above but doesn't check the parent key. Useful if all +% levels should have the same width for the name. % \begin{macrocode} - \csedef{@glswidestlength\romannumeral#1}{\the\glstopicwidest}% - }% - {\setlength{\glstopicwidest}{\csuse{@glswidestlength\romannumeral#1}}}% -} + \newrobustcmd*{\glsFindWidestUsedAnyName}[1][\@glo@types]{% + \dimen@=0pt\relax + \gls@tmplen=0pt\relax + \forallglossaries[#1]{\@gls@type}% + {% + \forglsentries[\@gls@type]{\@glo@label}% + {% + \ifglsused{\@glo@label}% + {% + \settowidth{\dimen@}% + {\glstreenamefmt{\glsentryname{\@glo@label}}}% + \ifdim\dimen@>\gls@tmplen + \gls@tmplen=\dimen@ + \eglssetwidest{\glsentryname{\@glo@label}}% + \fi + }% + {}% + }% + }% + } % \end{macrocode} %\end{macro} % -% -%\begin{macro}{\glstopicPreSkip} -%\changes{1.40}{2019-03-22}{new} +%\begin{macro}{\glsFindWidestAnyName} +%\changes{1.05}{2016-06-10}{new} +% Like the above but doesn't check is the entry has been used. % \begin{macrocode} -\newcommand*{\glstopicPreSkip}{\medskip} + \newrobustcmd*{\glsFindWidestAnyName}[1][\@glo@types]{% + \dimen@=0pt\relax + \gls@tmplen=0pt\relax + \forallglossaries[#1]{\@gls@type}% + {% + \forglsentries[\@gls@type]{\@glo@label}% + {% + \settowidth{\dimen@}% + {\glstreenamefmt{\glsentryname{\@glo@label}}}% + \ifdim\dimen@>\gls@tmplen + \gls@tmplen=\dimen@ + \eglssetwidest{\glsentryname{\@glo@label}}% + \fi + }% + }% + } % \end{macrocode} %\end{macro} -%\begin{macro}{\glstopicMidSkip} -%\changes{1.40}{2019-03-22}{new} +% +%\begin{macro}{\glsFindWidestUsedLevelTwo} +%\changes{1.05}{2016-06-10}{new} +% 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{macrocode} -\newcommand*{\glstopicMidSkip}{\smallskip} + \newrobustcmd*{\glsFindWidestUsedLevelTwo}[1][\@glo@types]{% + \dimen@=0pt\relax + \dimen@i=0pt\relax + \dimen@ii=0pt\relax + \forallglossaries[#1]{\@gls@type}% + {% + \forglsentries[\@gls@type]{\@glo@label}% + {% + \ifglsused{\@glo@label}% + {% + \ifglshasparent{\@glo@label}% + {% % \end{macrocode} -%\end{macro} -%\begin{macro}{\glstopicPostSkip} -%\changes{1.40}{2019-03-22}{new} +%\changes{1.46}{2021-09-20}{changed \cs{edef} to \cs{protected@edef}} % \begin{macrocode} -\newcommand*{\glstopicPostSkip}{\smallskip} + \protected@edef\@glo@parent{\csuse{glo@\glsdetoklabel{\@glo@label}@parent}}% + \ifglshasparent{\@glo@parent}% + {% + \protected@edef\@glo@parent{\csuse{glo@\glsdetoklabel{\@glo@parent}@parent}}% + \ifglshasparent{\@glo@parent}% + {}% + {% + \settowidth{\gls@tmplen}% + {\glstreenamefmt{\glsentryname{\@glo@label}}}% + \ifdim\gls@tmplen>\dimen@ii + \dimen@ii=\gls@tmplen + \eglssetwidest[2]{\glsentryname{\@glo@label}}% + \fi + }% + }% + {% + \settowidth{\gls@tmplen}% + {\glstreenamefmt{\glsentryname{\@glo@label}}}% + \ifdim\gls@tmplen>\dimen@i + \dimen@i=\gls@tmplen + \eglssetwidest[1]{\glsentryname{\@glo@label}}% + \fi + }% + }% + {% + \settowidth{\gls@tmplen}% + {\glstreenamefmt{\glsentryname{\@glo@label}}}% + \ifdim\gls@tmplen>\dimen@ + \dimen@=\gls@tmplen + \eglssetwidest{\glsentryname{\@glo@label}}% + \fi + }% + }% + {}% + }% + }% + } % \end{macrocode} %\end{macro} -%\begin{macro}{\glstopicSubItem} -%\changes{1.40}{2019-03-22}{new} -%\begin{definition} -%\cs{glstopicSubItem}\marg{level}\marg{label}\marg{location list} -%\end{definition} +% +%\begin{macro}{\glsFindWidestLevelTwo} +%\changes{1.05}{2016-06-10}{new} +% This is like \cs{glsFindWidestUsedLevelTwo} but doesn't check if the +% entry has been used. % \begin{macrocode} -\newcommand*{\glstopicSubItem}[3]{% + \newrobustcmd*{\glsFindWidestLevelTwo}[1][\@glo@types]{% + \dimen@=0pt\relax + \dimen@i=0pt\relax + \dimen@ii=0pt\relax + \forallglossaries[#1]{\@gls@type}% + {% + \forglsentries[\@gls@type]{\@glo@label}% + {% + \ifglshasparent{\@glo@label}% + {% % \end{macrocode} -%\changes{1.41}{2019-04-09}{moved \cs{par} to \cs{glstopicAssignSubIndent}} +%\changes{1.46}{2021-09-20}{changed \cs{edef} to \cs{protected@edef}} % \begin{macrocode} - \glstopicSubItemBox{#1}{\glstopicSubNameFont{\glsentryitem{#2}% - \glstarget{#2}{\glossentryname{#2}}}% - \glstopicSubItemSep - }% - \ifglshassymbol{#2}{(\glossentrysymbol{#2})\space}{}% + \protected@edef\@glo@parent{\csuse{glo@\glsdetoklabel{\@glo@label}@parent}}% + \ifglshasparent{\@glo@parent}% + {% + \protected@edef\@glo@parent{\csuse{glo@\glsdetoklabel{\@glo@parent}@parent}}% + \ifglshasparent{\@glo@parent}% + {}% + {% + \settowidth{\gls@tmplen}% + {\glstreenamefmt{\glsentryname{\@glo@label}}}% + \ifdim\gls@tmplen>\dimen@ii + \dimen@ii=\gls@tmplen + \eglssetwidest[2]{\glsentryname{\@glo@label}}% + \fi + }% + }% + {% + \settowidth{\gls@tmplen}% + {\glstreenamefmt{\glsentryname{\@glo@label}}}% + \ifdim\gls@tmplen>\dimen@i + \dimen@i=\gls@tmplen + \eglssetwidest[1]{\glsentryname{\@glo@label}}% + \fi + }% + }% + {% + \settowidth{\gls@tmplen}% + {\glstreenamefmt{\glsentryname{\@glo@label}}}% + \ifdim\gls@tmplen>\dimen@ + \dimen@=\gls@tmplen + \eglssetwidest{\glsentryname{\@glo@label}}% + \fi + }% + }% + }% + } % \end{macrocode} -%\changes{1.41}{2019-04-09}{added check for description} +%\end{macro} +% +%\begin{macro}{\glsFindWidestUsedAnyNameSymbol} +%\changes{1.05}{2016-06-10}{new} +% Like the \cs{glsFindWidestUsedAnyName} but also measures the +% symbol. The length of the widest symbol is stored in the second argument +% should be a length register. % \begin{macrocode} - \ifglshasdesc{#2}% - {\glossentrydesc{#2}\glspostdescription\glstopicSubPreLocSep}{}% - \glstopicSubLoc{#2}{#3}% -} + \newrobustcmd*{\glsFindWidestUsedAnyNameSymbol}[2][\@glo@types]{% + \dimen@=0pt\relax + \gls@tmplen=0pt\relax + #2=0pt\relax + \forallglossaries[#1]{\@gls@type}% + {% + \forglsentries[\@gls@type]{\@glo@label}% + {% + \ifglsused{\@glo@label}% + {% + \settowidth{\dimen@}% + {\glstreenamefmt{\glsentryname{\@glo@label}}}% + \ifdim\dimen@>\gls@tmplen + \gls@tmplen=\dimen@ + \eglssetwidest{\glsentryname{\@glo@label}}% + \fi + \settowidth{\dimen@}% + {\glsentrysymbol{\@glo@label}}% + \ifdim\dimen@>#2\relax + #2=\dimen@ + \fi + }% + {}% + }% + }% + } % \end{macrocode} %\end{macro} -%\begin{macro}{\glstopicSubItemSep} -%\changes{1.40}{2019-03-22}{new} +% +%\begin{macro}{\glsFindWidestAnyNameSymbol} +%\changes{1.05}{2016-06-10}{new} +% Like the above but doesn't check if the entry has been used. % \begin{macrocode} -\newcommand*{\glstopicSubItemSep}{\quad} + \newrobustcmd*{\glsFindWidestAnyNameSymbol}[2][\@glo@types]{% + \dimen@=0pt\relax + \gls@tmplen=0pt\relax + #2=0pt\relax + \forallglossaries[#1]{\@gls@type}% + {% + \forglsentries[\@gls@type]{\@glo@label}% + {% + \settowidth{\dimen@}% + {\glstreenamefmt{\glsentryname{\@glo@label}}}% + \ifdim\dimen@>\gls@tmplen + \gls@tmplen=\dimen@ + \eglssetwidest{\glsentryname{\@glo@label}}% + \fi + \settowidth{\dimen@}% + {\glsentrysymbol{\@glo@label}}% + \ifdim\dimen@>#2\relax + #2=\dimen@ + \fi + }% + }% + } % \end{macrocode} %\end{macro} -%\begin{macro}{\glstopicSubItemBox} -%\changes{1.40}{2019-03-22}{new} -%\begin{definition} -%\cs{glstopicSubItemBox}\marg{level}\marg{text} -%\end{definition} +% +%\begin{macro}{\glsFindWidestUsedAnyNameSymbolLocation} +%\changes{1.05}{2016-06-10}{new} +% Like the \cs{glsFindWidestUsedAnyNameSymbol} but also measures the +% location list. This requires \cs{glsentrynumberlist}. +% The length of the widest symbol is stored in the second argument +% should be a length register. The length of the widest location +% list is stored in the third argument, which should also be a +% length register. % \begin{macrocode} -\newcommand*{\glstopicSubItemBox}[2]{% - \ifdim\glstopicwidest>0pt\relax\makebox[\glstopicwidest][l]{#2}\else#2\fi -} + \newrobustcmd*{\glsFindWidestUsedAnyNameSymbolLocation}[3][\@glo@types]{% + \dimen@=0pt\relax + \gls@tmplen=0pt\relax + #2=0pt\relax + #3=0pt\relax + \forallglossaries[#1]{\@gls@type}% + {% + \forglsentries[\@gls@type]{\@glo@label}% + {% + \ifglsused{\@glo@label}% + {% + \settowidth{\dimen@}% + {\glstreenamefmt{\glsentryname{\@glo@label}}}% + \ifdim\dimen@>\gls@tmplen + \gls@tmplen=\dimen@ + \eglssetwidest{\glsentryname{\@glo@label}}% + \fi + \settowidth{\dimen@}% + {\glsentrysymbol{\@glo@label}}% + \ifdim\dimen@>#2\relax + #2=\dimen@ + \fi + \settowidth{\dimen@}% + {\GlsXtrFormatLocationList{\glsentrynumberlist{\@glo@label}}}% + \ifdim\dimen@>#3\relax + #3=\dimen@ + \fi + }% + {}% + }% + }% + } % \end{macrocode} %\end{macro} -%\begin{macro}{\glstopicSubNameFont} -%\changes{1.40}{2019-03-22}{new} +% +%\begin{macro}{\glsFindWidestAnyNameSymbolLocation} +%\changes{1.05}{2016-06-10}{new} +% Like the \cs{glsFindWidestUsedAnyNameSymbol} but doesn't check if +% the entry has been used. % \begin{macrocode} -\newcommand*{\glstopicSubNameFont}[1]{\textbf{#1}} + \newrobustcmd*{\glsFindWidestAnyNameSymbolLocation}[3][\@glo@types]{% + \dimen@=0pt\relax + \gls@tmplen=0pt\relax + #2=0pt\relax + #3=0pt\relax + \forallglossaries[#1]{\@gls@type}% + {% + \forglsentries[\@gls@type]{\@glo@label}% + {% + \settowidth{\dimen@}% + {\glstreenamefmt{\glsentryname{\@glo@label}}}% + \ifdim\dimen@>\gls@tmplen + \gls@tmplen=\dimen@ + \eglssetwidest{\glsentryname{\@glo@label}}% + \fi + \settowidth{\dimen@}% + {\glsentrysymbol{\@glo@label}}% + \ifdim\dimen@>#2\relax + #2=\dimen@ + \fi + \settowidth{\dimen@}% + {\GlsXtrFormatLocationList{\glsentrynumberlist{\@glo@label}}}% + \ifdim\dimen@>#3\relax + #3=\dimen@ + \fi + }% + }% + } % \end{macrocode} %\end{macro} -%\begin{macro}{\glstopicSubPreLocSep} -%\changes{1.41}{2019-04-09}{new} +% +%\begin{macro}{\glsFindWidestUsedAnyNameLocation} +%\changes{1.05}{2016-06-10}{new} +% Like the \cs{glsFindWidestUsedAnyNameSymbolLocation} but doesn't +% measure the symbol. The length of the widest location +% list is stored in the second argument, which should be a +% length register. % \begin{macrocode} -\newcommand*{\glstopicSubPreLocSep}{\space} + \newrobustcmd*{\glsFindWidestUsedAnyNameLocation}[2][\@glo@types]{% + \dimen@=0pt\relax + \gls@tmplen=0pt\relax + #2=0pt\relax + \forallglossaries[#1]{\@gls@type}% + {% + \forglsentries[\@gls@type]{\@glo@label}% + {% + \ifglsused{\@glo@label}% + {% + \settowidth{\dimen@}% + {\glstreenamefmt{\glsentryname{\@glo@label}}}% + \ifdim\dimen@>\gls@tmplen + \gls@tmplen=\dimen@ + \eglssetwidest{\glsentryname{\@glo@label}}% + \fi + \settowidth{\dimen@}% + {\GlsXtrFormatLocationList{\glsentrynumberlist{\@glo@label}}}% + \ifdim\dimen@>#2\relax + #2=\dimen@ + \fi + }% + {}% + }% + }% + } % \end{macrocode} %\end{macro} -%\begin{macro}{\glstopicSubLoc} -%\changes{1.40}{2019-03-22}{new} -%\changes{1.41}{2019-04-09}{moved \cs{space} to \cs{glstopicSubPreLocSep}} +% +%\begin{macro}{\glsFindWidestAnyNameLocation} +%\changes{1.05}{2016-06-10}{new} +% Like the \cs{glsFindWidestAnyNameLocation} but doesn't +% check the first use flag. % \begin{macrocode} -\newcommand*{\glstopicSubLoc}[2]{#2} + \newrobustcmd*{\glsFindWidestAnyNameLocation}[2][\@glo@types]{% + \dimen@=0pt\relax + \gls@tmplen=0pt\relax + #2=0pt\relax + \forallglossaries[#1]{\@gls@type}% + {% + \forglsentries[\@gls@type]{\@glo@label}% + {% + \settowidth{\dimen@}% + {\glstreenamefmt{\glsentryname{\@glo@label}}}% + \ifdim\dimen@>\gls@tmplen + \gls@tmplen=\dimen@ + \eglssetwidest{\glsentryname{\@glo@label}}% + \fi + \settowidth{\dimen@}% + {\GlsXtrFormatLocationList{\glsentrynumberlist{\@glo@label}}}% + \ifdim\dimen@>#2\relax + #2=\dimen@ + \fi + }% + }% + } % \end{macrocode} %\end{macro} % -%\begin{macro}{\glstopicCols} -%\changes{1.40}{2019-03-22}{new} +%\begin{macro}{\glsxtrComputeTreeIndent} +%\changes{1.05}{2016-06-10}{new} +% Compute the value of \cs{glstreeindent}. Argument is the entry label. +% (Ignored in default definition, but this command may be redefined +% to take the particular entry into account.) Note that the +% sub-levels modify \cs{glstreeindent}. % \begin{macrocode} -\newcommand*{\glstopicCols}{2} + \newcommand*{\glsxtrComputeTreeIndent}[1]{% + \glstreeindent=\glsxtrtreetopindent\relax + } % \end{macrocode} %\end{macro} % -%\begin{macro}{\glstopicColsEnv} -%\changes{1.40}{2019-03-22}{new} +%\begin{macro}{\glsxtrComputeTreeSubIndent} +%\changes{1.05}{2016-06-10}{new} +%\begin{definition} +%\cs{glsxtrComputeTreeSubIndent}\marg{level}\marg{label}\marg{register} +%\end{definition} +% Compute the indent for the sub-entries. The first argument is the +% level, the second argument is the entry label and the third +% argument is the length register used to store the computed indent. % \begin{macrocode} -\newcommand*{\glstopicColsEnv}{multicols} + \newcommand*{\glsxtrComputeTreeSubIndent}[3]{% + \ifcsundef{@glswidestname\romannumeral#1}% + {% + \settowidth{#3}{\glstreenamefmt{\@glswidestname\space}}% + }% + {% + \settowidth{#3}{\glstreenamefmt{% + \csname @glswidestname\romannumeral#1\endcsname\space}}% + }% + } % \end{macrocode} %\end{macro} % -%\begin{style}{topicmcols} -%\changes{1.40}{2019-03-22}{new} +%\begin{macro}{\glsxtrAltTreeSetHangIndent} +%\changes{1.05}{2016-06-10}{new} +% Set \cs{hangindent} for top-level entries: % \begin{macrocode} -\newglossarystyle{topicmcols}{% - \renewenvironment{theglossary}% - {% - \glstopicInit - \def\glstopic@prechildren{}% - \def\glstopic@postchildren{}% - \def\glstopic@prevlevel{-1}% - }% - {% - \ifnum\glstopic@prevlevel>0\relax\glstopic@postchildren\fi - \par - }% - \renewcommand*{\glossaryheader}{}% - \renewcommand*{\glsgroupheading}[1]{% - \ifnum\glstopic@prevlevel>0\relax\glstopic@postchildren\fi - \def\glstopic@prevlevel{-1}% - \glstopicGroupHeading{##1}% - }% - \renewcommand{\glossentry}[2]{% - \ifnum\glstopic@prevlevel>0\relax\glstopic@postchildren\fi - \def\glstopic@prevlevel{0}% - \hangindent0pt\relax - \parindent\glstopicParIndent\relax - \glstopicItem{##1}{##2}% - \ifnum\glstopicCols>1\relax + \newcommand*{\glsxtrAltTreeSetHangIndent}{\hangindent\glstreeindent} % \end{macrocode} -%\changes{1.41}{2019-04-09}{added penalty if no description} -%If there isn't a description, penalise a page break. +%\end{macro} +% +%\begin{macro}{\glsxtrAltTreeSetSubHangIndent} +%\changes{1.05}{2016-06-10}{new} +% Set \cs{hangindent} for sub-entries: % \begin{macrocode} - \ifglshasdesc{##1}% - {% - \edef\glstopic@prechildren{% - \noexpand\begin{\glstopicColsEnv}{\glstopicCols}% - }% - }% - {% - \edef\glstopic@prechildren{% - \noexpand\nopagebreak - \noexpand\begin{\glstopicColsEnv}{\glstopicCols}% - }% + \newcommand*{\glsxtrAltTreeSetSubHangIndent}[1]{\hangindent\glstreeindent} +% \end{macrocode} +%\end{macro} +% +% Redefine \glostyle{alttree}: +% \begin{macrocode} + \renewglossarystyle{alttree}{% + \renewenvironment{theglossary}% + {% + \glsxtralttreeInit + \def\@gls@prevlevel{-1}% + \mbox{}\par}% + {\par}% + \renewcommand*{\glossaryheader}{}% + \renewcommand*{\glsgroupheading}[1]{}% +% \end{macrocode} +%\changes{1.49}{2022-10-14}{added \cs{glssubgroupheading}} +% Sub-groups are only supported with \cs{printunsrtglossary}. +% \begin{macrocode} + \renewcommand*{\glssubgroupheading}[4]{}% + \renewcommand{\glossentry}[2]{% + \ifnum\@gls@prevlevel=0\relax + \else + \glsxtrComputeTreeIndent{##1}% + \fi + \parindent\glstreeindent + \glsxtrAltTreeSetHangIndent + \makebox[0pt][r]% + {% + \glstreenamebox{\glstreeindent}% + {% + \glsentryitem{##1}% + \glstreenamefmt{\glstarget{##1}{\glossentryname{##1}}}% + }% }% - \edef\glstopic@postchildren{\noexpand\end{\glstopicColsEnv}}% - \fi - }% - \renewcommand{\subglossentry}[3]{% - \ifnum\glstopic@prevlevel=0\relax\glstopic@prechildren\fi - \def\glstopic@prevlevel{##1}% - \glstopicAssignSubIndent{##1}% - \glstopicSubItem{##1}{##2}{##3}% - }% - \renewcommand*{\glsgroupskip}{}% + \glsxtralttreeSymbolDescLocation{##1}{##2}% + \def\@gls@prevlevel{0}% + } + \renewcommand{\subglossentry}[3]{% + \ifnum##1=1\relax + \glssubentryitem{##2}% + \fi + \ifnum\@gls@prevlevel=##1\relax + \else + \glsxtrComputeTreeSubIndent{##1}{##2}{\gls@tmplen}% + \ifnum\@gls@prevlevel<##1\relax + \setlength\glstreeindent\gls@tmplen + \addtolength\glstreeindent\parindent + \parindent\glstreeindent + \else + \ifnum\@gls@prevlevel=0\relax + \glsxtrComputeTreeIndent{##2}% + \else + \glsxtrComputeTreeSubIndent{\@gls@prevlevel}{##2}{\glstreeindent}% + \fi + \addtolength\parindent{-\glstreeindent}% + \setlength\glstreeindent\parindent + \fi + \fi + \glsxtrAltTreeSetSubHangIndent{##1}% + \makebox[0pt][r]{\glstreenamebox{\gls@tmplen}{% + \glstreenamefmt{\glstarget{##2}{\glossentryname{##2}}}}}% + \glsxtralttreeSubSymbolDescLocation{##1}{##2}{##3}% + \def\@gls@prevlevel{##1}% + }% + \renewcommand*{\glsgroupskip}{\ifglsnogroupskip\else\glstreegroupskip\fi}% + } +}% +{% } % \end{macrocode} -%\end{style} -%\iffalse +%Redefine \glostyle{alttreegroup} so that it discourages a break +%after group headings. +%\changes{1.21}{2017-11-03}{redefined \texttt{alttreegroup} to discourage +%breaks after group headings} % \begin{macrocode} -% +\ifdef{\@glsstyle@alttreegroup} +{ % \end{macrocode} -%\fi -%\iffalse +%\begin{macro}{\glsalttreesubgroupitem} +%\begin{definition} +%\cs{glsalttreesubgroupheader}\marg{previous group level}\marg{group +%level}\marg{parent label}\marg{group label}\marg{title}\marg{width} +%\end{definition} +%\changes{1.49}{2022-10-14}{new} % \begin{macrocode} -%<*example-glossaries-xr.tex> + \newcommand*{\glsalttreesubgroupheader}[6]{% + \par\smallskip + \makebox[0pt][r]{\glstreenamebox{#6}% + {\glstreegroupheaderfmt{#5}}}% + \smallskip\par + } % \end{macrocode} -%\fi -%\iffalse +%\end{macro} % \begin{macrocode} -%< + \glstreegroupheaderskip + }% % \end{macrocode} -%\fi -%\iffalse +%\changes{1.49}{2022-10-14}{added \cs{glssubgroupheading}} +% Sub-groups are only supported with \cs{printunsrtglossary}. % \begin{macrocode} -%<*example-glossaries-acronym-desc.bib> + \renewcommand*{\glssubgroupheading}[4]{% + \glsxtrgetgrouptitle{##4}{\glsxtr@grptitle}% + \glstreeSubPreHeader{##1}{##2}{##3}{##4}{\glsxtr@grptitle}% % \end{macrocode} -%\fi -%\iffalse +%This is similar to \cs{subglossentry} % \begin{macrocode} -%< +\ifdef{\@glsstyle@mcolindexgroup} +{% + \renewglossarystyle{mcolindexgroup}{% + \setglossarystyle{mcolindex}% % \end{macrocode} -%\fi -%\iffalse +% Group heading as \glostyle{indexgroup}. % \begin{macrocode} -%<*example-glossaries-acronym.bib> + \renewcommand*{\glsgroupheading}[1]{% + \glsxtrgetgrouptitle{##1}{\glsxtr@grptitle}% + \glstreePreHeader{##1}{\glsxtr@grptitle}% + \item\glstreegroupheaderfmt{\glsxtr@grptitle}% + \glstreegroupheaderskip\@afterheading + }% % \end{macrocode} -%\fi -%\iffalse +%\changes{1.49}{2022-10-14}{added \cs{glssubgroupheading}} +% Sub-groups are only supported with \cs{printunsrtglossary}. % \begin{macrocode} -%< +\ifdef{\@glsstyle@mcoltreegroup} +{% + \renewglossarystyle{mcoltreegroup}{% + \setglossarystyle{mcoltree}% % \end{macrocode} -%\fi -%\iffalse +% Group heading. % \begin{macrocode} -%<*example-glossaries-acronyms-lang.bib> + \renewcommand{\glsgroupheading}[1]{% + \glsxtrgetgrouptitle{##1}{\glsxtr@grptitle}% + \glstreePreHeader{##1}{\glsxtr@grptitle}% + \par\noindent\glstreegroupheaderfmt{\glsxtr@grptitle}% + \glstreegroupheaderskip\@afterheading + }% % \end{macrocode} -%\fi -%\iffalse +%\changes{1.49}{2022-10-14}{added \cs{glssubgroupheading}} +% Sub-groups are only supported with \cs{printunsrtglossary}. % \begin{macrocode} -%< +\ifdef{\@glsstyle@mcoltreehypergroup} +{% + \renewglossarystyle{mcoltreehypergroup}{% + \setglossarystyle{mcoltree}% + \renewcommand*{\glossaryheader}{% + \par\noindent\glstreenavigationfmt{\glsnavigation}% + \glstreegroupheaderskip + }% % \end{macrocode} -%\fi -%\iffalse +% Group heading. % \begin{macrocode} -%<*example-glossaries-brief.bib> + \renewcommand*{\glsgroupheading}[1]{% + \glsxtrgetgrouptitle{##1}{\glsxtr@grptitle}% + \glstreePreHeader{##1}{\glsxtr@grptitle}% + \par\noindent + \glstreegroupheaderfmt{\glsnavhypertarget{##1}{\glsxtr@grptitle}}% + \glstreegroupheaderskip\@afterheading + }% % \end{macrocode} -%\fi -%\iffalse +%\changes{1.49}{2022-10-14}{added \cs{glssubgroupheading}} +% Sub-groups are only supported with \cs{printunsrtglossary}. % \begin{macrocode} -%< +\ifdef{\@glsstyle@mcolalttreehypergroup} +{% + \renewglossarystyle{mcolalttreehypergroup}{% + \setglossarystyle{mcolalttree}% + \renewcommand*{\glossaryheader}{% + \par + \def\@gls@prevlevel{-1}% + \hangindent0pt\relax + \parindent0pt\relax + \glstreenavigationfmt{\glsnavigation}% + \glstreegroupheaderskip + }% + \renewcommand*{\glsgroupheading}[1]{% + \glsxtrgetgrouptitle{##1}{\glsxtr@grptitle}% + \glstreePreHeader{##1}{\glsxtr@grptitle}% + \par + \def\@gls@prevlevel{-1}% + \hangindent0pt\relax + \parindent0pt\relax + \glstreegroupheaderfmt{\glsnavhypertarget{##1}{\glsxtr@grptitle}}% + \glstreegroupheaderskip + }% % \end{macrocode} -%\fi -%\iffalse +%\changes{1.49}{2022-10-14}{added \cs{glssubgroupheading}} +% Sub-groups are only supported with \cs{printunsrtglossary}. % \begin{macrocode} -%<*example-glossaries-childmultipar.bib> + \renewcommand*{\glssubgroupheading}[4]{% + \glsxtrgetgrouptitle{##4}{\glsxtr@grptitle}% + \glstreeSubPreHeader{##1}{##2}{##3}{##4}{\glsxtr@grptitle}% % \end{macrocode} -%\fi -%\iffalse +%This is similar to \cs{subglossentry} % \begin{macrocode} -% Encoding: UTF-8 -@entry{hiersedmattis, - user1 = {example-image}, - name = {sed mattis}, - description = {Erat sit amet dolor sit amet, consectetuer adipiscing elit. Ut purus -elit, vestibulum ut, placerat ac, adipiscing vitae, felis. Curabitur -dictum gravida mauris. Ut pellentesque augue sed urna. Vestibulum -diam eros, fringilla et, consectetuer eu, nonummy id, sapien. Nullam -at lectus. In sagittis ultrices mauris. Curabitur malesuada erat sit -amet massa. Fusce blandit. Aliquam erat volutpat.} -} - -@entry{hierloremi-ii, - parent = {hiersedmattis}, - name = {lorem 1--2}, - description = {Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, -vestibulum ut, placerat ac, adipiscing vitae, felis. Curabitur -dictum gravida mauris. Nam arcu libero, nonummy eget, consectetuer -id, vulputate a, magna. Donec vehicula augue eu neque. Pellentesque -habitant morbi tristique senectus et netus et malesuada fames ac -turpis egestas. Mauris ut leo. Cras viverra metus rhoncus sem. Nulla -et lectus vestibulum urna fringilla ultrices. Phasellus eu tellus -sit amet tortor gravida placerat. Integer sapien est, iaculis in, -pretium quis, viverra ac, nunc. Praesent eget sem vel leo ultrices -bibendum. Aenean faucibus. Morbi dolor nulla, malesuada eu, pulvinar -at, mollis ac, nulla. Curabitur auctor semper nulla. Donec varius -orci eget risus. Duis nibh mi, congue eu, accumsan eleifend, -sagittis quis, diam. Duis eget orci sit amet orci dignissim rutrum. - -Nam dui ligula, fringilla a, euismod sodales, sollicitudin vel, -wisi. Morbi auctor lorem non justo. Nam lacus libero, pretium at, -lobortis vitae, ultricies et, tellus. Donec aliquet, tortor sed -accumsan bibendum, erat ligula aliquet magna, vitae ornare odio -metus a mi. Morbi ac orci et nisl hendrerit mollis. Suspendisse ut -massa. Cras nec ante. Pellentesque a nulla. Cum sociis natoque -penatibus et magnis dis parturient montes, nascetur ridiculus mus. -Aliquam tincidunt urna. Nulla ullamcorper vestibulum turpis. -Pellentesque cursus luctus mauris.} -} - -@entry{hierloremiii-iv, - user1 = {example-image}, - parent = {hiersedmattis}, - name = {lorem 3--4}, - description = {Nulla malesuada porttitor diam. Donec felis erat, congue non, -volutpat at, tincidunt tristique, libero. Vivamus viverra fermentum -felis. Donec nonummy pellentesque ante. Phasellus adipiscing semper -elit. Proin fermentum massa ac quam. Sed diam turpis, molestie -vitae, placerat a, molestie nec, leo. Maecenas lacinia. Nam ipsum -ligula, eleifend at, accumsan nec, suscipit a, ipsum. Morbi blandit -ligula feugiat magna. Nunc eleifend consequat lorem. Sed lacinia -nulla vitae enim. Pellentesque tincidunt purus vel magna. Integer -non enim. Praesent euismod nunc eu purus. Donec bibendum quam in -tellus. Nullam cursus pulvinar lectus. Donec et mi. Nam vulputate -metus eu enim. Vestibulum pellentesque felis eu massa. - -Quisque ullamcorper placerat ipsum. Cras nibh. Morbi vel justo -vitae lacus tincidunt ultrices. Lorem ipsum dolor sit amet, -consectetuer adipiscing elit. In hac habitasse platea dictumst. -Integer tempus convallis augue. Etiam facilisis. Nunc elementum -fermentum wisi. Aenean placerat. Ut imperdiet, enim sed gravida -sollicitudin, felis odio placerat quam, ac pulvinar elit purus eget -enim. Nunc vitae tortor. Proin tempus nibh sit amet nisl. Vivamus -quis tortor vitae risus porta vehicula.} -} - -@entry{hierloremv-vi, - parent = {hiersedmattis}, - name = {lorem 5--6}, - description = {Fusce mauris. Vestibulum luctus nibh at lectus. Sed bibendum, nulla -a faucibus semper, leo velit ultricies tellus, ac venenatis arcu -wisi vel nisl. Vestibulum diam. Aliquam pellentesque, augue quis -sagittis posuere, turpis lacus congue quam, in hendrerit risus eros -eget felis. Maecenas eget erat in sapien mattis porttitor. -Vestibulum porttitor. Nulla facilisi. Sed a turpis eu lacus commodo -facilisis. Morbi fringilla, wisi in dignissim interdum, justo lectus -sagittis dui, et vehicula libero dui cursus dui. Mauris tempor -ligula sed lacus. Duis cursus enim ut augue. Cras ac magna. Cras -nulla. Nulla egestas. Curabitur a leo. Quisque egestas wisi eget -nunc. Nam feugiat lacus vel est. Curabitur consectetuer.% - - -Suspendisse vel felis. Ut lorem lorem, interdum eu, tincidunt sit -amet, laoreet vitae, arcu. Aenean faucibus pede eu ante. Praesent -enim elit, rutrum at, molestie non, nonummy vel, nisl. Ut lectus -eros, malesuada sit amet, fermentum eu, sodales cursus, magna. Donec -eu purus. Quisque vehicula, urna sed ultricies auctor, pede lorem -egestas dui, et convallis elit erat sed nulla. Donec luctus. -Curabitur et nunc. Aliquam dolor odio, commodo pretium, ultricies -non, pharetra in, velit. Integer arcu est, nonummy in, fermentum -faucibus, egestas vel, odio.} -} - -@entry{hiergravida, - name = {gravida}, - description = {Malesuada libero, nonummy eget, consectetuer id, vulputate a, magna. Donec -vehicula augue eu neque. Pellentesque habitant morbi tristique -senectus et netus et malesuada fames ac turpis egestas. Mauris ut -leo. - -Morbi ultrices rutrum lorem. Nam elementum ullamcorper -leo. Morbi dui. Aliquam sagittis. Nunc placerat. Pellentesque -tristique sodales est. Maecenas imperdiet lacinia velit. Cras non -urna. Morbi eros pede, suscipit ac, varius vel, egestas non, eros.} -} - -@entry{hierloremvii-viii, - user1 = {example-image-b}, - parent = {hiergravida}, - name = {lorem 7--8}, - description = {Sed commodo posuere pede. Mauris ut est. Ut quis purus. Sed ac odio. -Sed vehicula hendrerit sem. Duis non odio. Morbi ut dui. Sed -accumsan risus eget odio. In hac habitasse platea dictumst. -Pellentesque non elit. Fusce sed justo eu urna porta tincidunt. -Mauris felis odio, sollicitudin sed, volutpat a, ornare ac, erat. -Morbi quis dolor. Donec pellentesque, erat ac sagittis semper, nunc -dui lobortis purus, quis congue purus metus ultricies tellus. Proin -et quam. Class aptent taciti sociosqu ad litora torquent per conubia -nostra, per inceptos hymenaeos. Praesent sapien turpis, fermentum -vel, eleifend faucibus, vehicula eu, lacus. - -Pellentesque habitant morbi tristique senectus et netus et malesuada -fames ac turpis egestas. Donec odio elit, dictum in, hendrerit sit -amet, egestas sed, leo. Praesent feugiat sapien aliquet odio. -Integer vitae justo. Aliquam vestibulum fringilla lorem. Sed neque -lectus, consectetuer at, consectetuer sed, eleifend ac, lectus. -Nulla facilisi. Pellentesque eget lectus. Proin eu metus. Sed -porttitor. In hac habitasse platea dictumst. Suspendisse eu lectus. -Ut mi mi, lacinia sit amet, placerat et, mollis vitae, dui. Sed ante -tellus, tristique ut, iaculis eu, malesuada ac, dui. Mauris nibh -leo, facilisis non, adipiscing quis, ultrices a, dui.} + \ifnum\@gls@prevlevel=##2\relax + \else + \ifcsundef{@glswidestname\romannumeral##2}% + {% + \settowidth{\gls@tmplen}{\glstreenamefmt{\@glswidestname\space}}% + }% + {% + \settowidth{\gls@tmplen}{\glstreenamefmt{% + \csname @glswidestname\romannumeral##2\endcsname\space}}% + }% + \ifnum\@gls@prevlevel<##2\relax + \setlength\glstreeindent\gls@tmplen + \addtolength\glstreeindent\parindent + \parindent\glstreeindent + \else + \ifnum\@gls@prevlevel=0\relax + \glsxtrComputeTreeIndent{##2}% + \else + \ifcsundef{@glswidestname\romannumeral##2}% + {% + \settowidth{\glstreeindent}{\glstreenamefmt{\@glswidestname\space}}% + }% + {% + \settowidth{\glstreeindent}{\glstreenamefmt{% + \csname @glswidestname\romannumeral##2\endcsname\space}}% + }% + \fi + \addtolength\parindent{-\glstreeindent}% + \setlength\glstreeindent\parindent + \fi + \fi + \glsxtrAltTreeSetSubHangIndent{##2}% + \glsalttreesubgroupheader{##1}{##2}{##3}{##4}% + {\glsnavhypertarget{##4}{\glsxtr@grptitle}}{\gls@tmplen}% + \def\@gls@prevlevel{##2}% + \par + }% + } +}% +{% } - -@entry{hierloremix-x, - user1 = {example-image-c}, - parent = {hiergravida}, - name = {lorem 9--10}, - description = {Morbi luctus, wisi viverra faucibus pretium, nibh est placerat odio, -nec commodo wisi enim eget quam. Quisque libero justo, consectetuer -a, feugiat vitae, porttitor eu, libero. Suspendisse sed mauris -vitae elit sollicitudin malesuada. Maecenas ultricies eros sit amet -ante. Ut venenatis velit. Maecenas sed mi eget dui varius euismod. -Phasellus aliquet volutpat odio. Vestibulum ante ipsum primis in -faucibus orci luctus et ultrices posuere cubilia Curae; Pellentesque -sit amet pede ac sem eleifend consectetuer. Nullam elementum, urna -vel imperdiet sodales, elit ipsum pharetra ligula, ac pretium ante -justo a nulla. Curabitur tristique arcu eu metus. Vestibulum lectus. -Proin mauris. Proin eu nunc eu urna hendrerit faucibus. Aliquam -auctor, pede consequat laoreet varius, eros tellus scelerisque quam, -pellentesque hendrerit ipsum dolor sed augue. Nulla nec lacus. - -Suspendisse vitae elit. Aliquam arcu neque, ornare in, ullamcorper -quis, commodo eu, libero. Fusce sagittis erat at erat tristique -mollis. Maecenas sapien libero, molestie et, lobortis in, sodales -eget, dui. Morbi ultrices rutrum lorem. Nam elementum ullamcorper -leo. Morbi dui. Aliquam sagittis. Nunc placerat. Pellentesque -tristique sodales est. Maecenas imperdiet lacinia velit. Cras non -urna. Morbi eros pede, suscipit ac, varius vel, egestas non, eros. -Praesent malesuada, diam id pretium elementum, eros sem dictum -tortor, vel consectetuer odio sem sed wisi.} +% \end{macrocode} +%Similarly for \glostyle{mcolalttreespannav}. +%\changes{1.21}{2017-11-03}{redefined \texttt{mcolalttreespannav} to discourage +%breaks after group headings} +% \begin{macrocode} +\ifdef{\@glsstyle@mcolalttreespannav} +{% + \renewglossarystyle{mcolalttreespannav}{% + \setglossarystyle{alttree}% + \renewenvironment{theglossary}% + {% + \glsxtralttreeInit + \def\@gls@prevlevel{-1}% + \begin{multicols}{\glsmcols}% + [\noindent\glstreenavigationfmt{\glsnavigation}]% + }% + {\par\end{multicols}}% + \renewcommand*{\glsgroupheading}[1]{% + \glsxtrgetgrouptitle{##1}{\glsxtr@grptitle}% + \glstreePreHeader{##1}{\glsxtr@grptitle}% + \par + \def\@gls@prevlevel{-1}% + \hangindent0pt\relax + \parindent0pt\relax + \glstreegroupheaderfmt{\glsnavhypertarget{##1}{\glsxtr@grptitle}}% + \glstreegroupheaderskip + }% +% \end{macrocode} +%\changes{1.49}{2022-10-14}{added \cs{glssubgroupheading}} +% Sub-groups are only supported with \cs{printunsrtglossary}. +% \begin{macrocode} + \renewcommand*{\glssubgroupheading}[4]{% + \glsxtrgetgrouptitle{##4}{\glsxtr@grptitle}% + \glstreeSubPreHeader{##1}{##2}{##3}{##4}{\glsxtr@grptitle}% +% \end{macrocode} +%This is similar to \cs{subglossentry} +% \begin{macrocode} + \ifnum\@gls@prevlevel=##2\relax + \else + \ifcsundef{@glswidestname\romannumeral##2}% + {% + \settowidth{\gls@tmplen}{\glstreenamefmt{\@glswidestname\space}}% + }% + {% + \settowidth{\gls@tmplen}{\glstreenamefmt{% + \csname @glswidestname\romannumeral##2\endcsname\space}}% + }% + \ifnum\@gls@prevlevel<##2\relax + \setlength\glstreeindent\gls@tmplen + \addtolength\glstreeindent\parindent + \parindent\glstreeindent + \else + \ifnum\@gls@prevlevel=0\relax + \glsxtrComputeTreeIndent{##2}% + \else + \ifcsundef{@glswidestname\romannumeral##2}% + {% + \settowidth{\glstreeindent}{\glstreenamefmt{\@glswidestname\space}}% + }% + {% + \settowidth{\glstreeindent}{\glstreenamefmt{% + \csname @glswidestname\romannumeral##2\endcsname\space}}% + }% + \fi + \addtolength\parindent{-\glstreeindent}% + \setlength\glstreeindent\parindent + \fi + \fi + \glsxtrAltTreeSetSubHangIndent{##2}% + \glsalttreesubgroupheader{##1}{##2}{##3}{##4}% + {\glsnavhypertarget{##4}{\glsxtr@grptitle}}{\gls@tmplen}% + \def\@gls@prevlevel{##2}% + \par + }% + } +}% +{% } - % \end{macrocode} -%\fi +% +% Reset the default style +% \begin{macrocode} +\ifx\@glossary@default@style\relax +\else + \setglossarystyle{\@glsxtr@current@style} +\fi +% \end{macrocode} %\iffalse % \begin{macrocode} -% +% % \end{macrocode} %\fi %\iffalse % \begin{macrocode} -%<*example-glossaries-childnoname.bib> +%<*glossary-bookindex.sty> % \end{macrocode} %\fi -%\iffalse +%\section{bookindex style (\sty{glossary-bookindex.sty})} +%\changes{1.21}{2017-11-03}{new} % \begin{macrocode} -%< +\DeclareRelease{v1.48}{2021-11-22}{glossary-bookindex-2021-11-22.sty} +\DeclareCurrentRelease{v1.49}{2022-10-14} % \end{macrocode} -%\fi -%\iffalse +% Declare package: % \begin{macrocode} -%<*example-glossaries-cite.bib> +\ProvidesPackage{glossary-bookindex}[2022/10/14 v1.49 (NLCT)] % \end{macrocode} -%\fi -%\iffalse +%Load required packages. % \begin{macrocode} -%< +\newcommand*{\glsxtrbookindexlocation}[2]{#2} % \end{macrocode} -%\fi -%\iffalse +%\end{macro} +% +%\begin{macro}{\glsxtrbookindexsublocation} +%\changes{1.39}{2019-03-22}{new} +%\begin{definition} +%\cs{glsxtrbookindexlocation}\marg{label}\marg{location} +%\end{definition} +%Displays the location for sub-entries. % \begin{macrocode} -%<*example-glossaries-images.bib> +\newcommand*{\glsxtrbookindexsublocation}{\glsxtrbookindexlocation} % \end{macrocode} -%\fi -%\iffalse +%\end{macro} +% +%\begin{macro}{\glsxtrbookindexparentchildsep} +%\changes{1.21}{2017-11-03}{new} +%Separator used between top-level parent and child entry. % \begin{macrocode} -%<1\relax + \glstreesubsubitem\glstreegroupheaderfmt{#5}% + \else + \glstreesubitem\glstreegroupheaderfmt{#5}% + \fi } - -@entry{aliquamlectus, - user1 = {example-image-a}, - name = {aliquam lectus}, - description = {Vivamus leo. Quisque ornare tellus ullamcorper nulla. Mauris -porttitor pharetra tortor. Sed fringilla justo sed mauris. Mauris -tellus. Sed non leo. Nullam elementum, magna in cursus sodales, -augue est scelerisque sapien, venenatis congue nulla arcu et pede. -Ut suscipit enim vel sapien. Donec congue. Maecenas urna mi, -suscipit in, placerat ut, vestibulum ut, massa. Fusce ultrices nulla -et nisl. - -Etiam ac leo a risus tristique nonummy. Donec dignissim tincidunt -nulla. Vestibulum rhoncus molestie odio. Sed lobortis, justo et -pretium lobortis, mauris turpis condimentum augue, nec ultricies -nibh arcu pretium enim. Nunc purus neque, placerat id, imperdiet -sed, pellentesque nec, nisl. Vestibulum imperdiet neque non sem -accumsan laoreet. In hac habitasse platea dictumst. Etiam -condimentum facilisis libero. Suspendisse in elit quis nisl aliquam -dapibus. Pellentesque auctor sapien. Sed egestas sapien nec lectus. -Pellentesque vel dui vel neque bibendum viverra. Aliquam porttitor -nisl nec pede. Proin mattis libero vel turpis. Donec rutrum mauris -et libero. Proin euismod porta felis. Nam lobortis, metus quis -elementum commodo, nunc lectus elementum mauris, eget vulputate -ligula tellus eu neque. Vivamus eu dolor. -} -} - -@entry{nullainipsum, - user1 = {example-image-b}, - name = {nulla in ipsum}, - description = {Praesent eros nulla, congue vitae, euismod ut, commodo a, wisi. -Pellentesque habitant morbi tristique senectus et netus et malesuada -fames ac turpis egestas. Aenean nonummy magna non leo. Sed felis -erat, ullamcorper in, dictum non, ultricies ut, lectus. Proin vel -arcu a odio lobortis euismod. Vestibulum ante ipsum primis in -faucibus orci luctus et ultrices posuere cubilia Curae; Proin ut -est. Aliquam odio. Pellentesque massa turpis, cursus eu, euismod -nec, tempor congue, nulla. Duis viverra gravida mauris. Cras -tincidunt. Curabitur eros ligula, varius ut, pulvinar in, cursus -faucibus, augue. - -Nulla mattis luctus nulla. Duis commodo velit at leo. Aliquam -vulputate magna et leo. Nam vestibulum ullamcorper leo. Vestibulum -condimentum rutrum mauris. Donec id mauris. Morbi molestie justo et -pede. Vivamus eget turpis sed nisl cursus tempor. Curabitur mollis -sapien condimentum nunc. In wisi nisl, malesuada at, dignissim sit -amet, lobortis in, odio. Aenean consequat arcu a ante. Pellentesque -porta elit sit amet orci. Etiam at turpis nec elit ultricies -imperdiet. Nulla facilisi. In hac habitasse platea dictumst. -Suspendisse viverra aliquam risus. Nullam pede justo, molestie -nonummy, scelerisque eu, facilisis vel, arcu. -} -} - -@entry{curabiturtellusmagna, - user1 = {example-image-c}, - name = {curabitur tellus magna}, - description = {Donec interdum. Praesent scelerisque. Maecenas posuere sodales -odio. Vivamus metus lacus, varius quis, imperdiet quis, rhoncus a, -turpis. Etiam ligula arcu, elementum a, venenatis quis, sollicitudin -sed, metus. Donec nunc pede, tincidunt in, venenatis vitae, faucibus -vel, nibh. Pellentesque wisi. Nullam malesuada. Morbi ut tellus ut -pede tincidunt porta. Lorem ipsum dolor sit amet, consectetuer -adipiscing elit. Etiam congue neque id dolor. - -Donec et nisl at wisi luctus bibendum. Nam interdum tellus ac -libero. Sed sem justo, laoreet vitae, fringilla at, adipiscing ut, -nibh. Maecenas non sem quis tortor eleifend fermentum. Etiam id -tortor ac mauris porta vulputate. Integer porta neque vitae massa. -Maecenas tempus libero a libero posuere dictum. Vestibulum ante -ipsum primis in faucibus orci luctus et ultrices posuere cubilia -Curae; Aenean quis mauris sed elit commodo placerat. Class aptent -taciti sociosqu ad litora torquent per conubia nostra, per inceptos -hymenaeos. Vivamus rhoncus tincidunt libero. Etiam elementum pretium -justo. Vivamus est. Morbi a tellus eget pede tristique commodo. -Nulla nisl. Vestibulum sed nisl eu sapien cursus rutrum. -} -} - -@entry{nullanonmauris, - user1 = {example-image-16x10}, - name = {nulla non mauris}, - description = {Nullam varius. Etiam dignissim elementum metus. Vestibulum faucibus, -metus sit amet mattis rhoncus, sapien dui laoreet odio, nec -ultricies nibh augue a enim. Fusce in ligula. Quisque at magna et -nulla commodo consequat. Proin accumsan imperdiet sem. Nunc porta. -Donec feugiat mi at justo. Phasellus facilisis ipsum quis ante. In -ac elit eget ipsum pharetra faucibus. Maecenas viverra nulla in -massa. - -Nulla ac nisl. Nullam urna nulla, ullamcorper in, interdum sit amet, -gravida ut, risus. Aenean ac enim. In luctus. Phasellus eu quam -vitae turpis viverra pellentesque. Duis feugiat felis ut enim. -Phasellus pharetra, sem id porttitor sodales, magna nunc aliquet -nibh, nec blandit nisl mauris at pede. Suspendisse risus risus, -lobortis eget, semper at, imperdiet sit amet, quam. Quisque -scelerisque dapibus nibh. Nam enim. Lorem ipsum dolor sit amet, -consectetuer adipiscing elit. Nunc ut metus. Ut metus justo, auctor -at, ultrices eu, sagittis ut, purus. Aliquam aliquam. -} -} - -@entry{etiampedemassa, - user1 = {example-image-10x16}, - name = {etiam pede massa}, - description = {Vestibulum luctus commodo lacus. Morbi lacus dui, tempor sed, -euismod eget, condimentum at, tortor. Phasellus aliquet odio ac -lacus tempor faucibus. Praesent sed sem. Praesent iaculis. Cras -rhoncus tellus sed justo ullamcorper sagittis. Donec quis orci. -Sed ut tortor quis tellus euismod tincidunt. Suspendisse congue nisl -eu elit. Aliquam tortor diam, tempus id, tristique eget, sodales -vel, nulla. Praesent tellus mi, condimentum sed, viverra at, -consectetuer quis, lectus. In auctor vehicula orci. Sed pede sapien, -euismod in, suscipit in, pharetra placerat, metus. Vivamus commodo -dui non odio. Donec et felis. - -Etiam suscipit aliquam arcu. Aliquam sit amet est ac purus bibendum -congue. Sed in eros. Morbi non orci. Pellentesque mattis lacinia -elit. Fusce molestie velit in ligula. Nullam et orci vitae nibh -vulputate auctor. Aliquam eget purus. Nulla auctor wisi sed ipsum. -Morbi porttitor tellus ac enim. Fusce ornare. Proin ipsum enim, -tincidunt in, ornare venenatis, molestie a, augue. Donec vel pede in -lacus sagittis porta. Sed hendrerit ipsum quis nisl. Suspendisse -quis massa ac nibh pretium cursus. Sed sodales. Nam eu neque quis -pede dignissim ornare. Maecenas eu purus ac urna tincidunt congue. -} -} - -@entry{donecetnisl, - user1 = {example-image-16x9}, - name = {donec et nisl}, - description = {Aenean dictum odio sit amet risus. Morbi purus. Nulla a est sit amet -purus venenatis iaculis. Vivamus viverra purus vel magna. Donec in -justo sed odio malesuada dapibus. Nunc ultrices aliquam nunc. -Vivamus facilisis pellentesque velit. Nulla nunc velit, vulputate -dapibus, vulputate id, mattis ac, justo. Nam mattis elit dapibus -purus. Quisque enim risus, congue non, elementum ut, mattis quis, -sem. Quisque elit. - -Maecenas non massa. Vestibulum pharetra nulla at lorem. Duis quis -quam id lacus dapibus interdum. Nulla lorem. Donec ut ante quis -dolor bibendum condimentum. Etiam egestas tortor vitae lacus. -Praesent cursus. Mauris bibendum pede at elit. Morbi et felis a -lectus interdum facilisis. Sed suscipit gravida turpis. Nulla at -lectus. Vestibulum ante ipsum primis in faucibus orci luctus et -ultrices posuere cubilia Curae; Praesent nonummy luctus nibh. Proin -turpis nunc, congue eu, egestas ut, fringilla at, tellus. In hac -habitasse platea dictumst. -} -} - -@entry{vivamuseutellus, - user1 = {example-image-9x16}, - name = {vivamus eu tellus}, - description = {Nam orci orci, malesuada id, gravida nec, ultricies vitae, erat. -Donec risus turpis, luctus sit amet, interdum quis, porta sed, -ipsum. Suspendisse condimentum, tortor at egestas posuere, neque -metus tempor orci, et tincidunt urna nunc a purus. Sed facilisis -blandit tellus. Nunc risus sem, suscipit nec, eleifend quis, cursus -quis, libero. Curabitur et dolor. Sed vitae sem. Cum sociis natoque -penatibus et magnis dis parturient montes, nascetur ridiculus mus. -Maecenas ante. Duis ullamcorper enim. Donec tristique enim eu leo. -Nullam molestie elit eu dolor. Nullam bibendum, turpis vitae -tristique gravida, quam sapien tempor lectus, quis pretium tellus -purus ac quam. Nulla facilisi. - -Duis aliquet dui in est. Donec eget est. Nunc lectus odio, varius -at, fermentum in, accumsan non, enim. Aliquam erat volutpat. Proin -sit amet nulla ut eros consectetuer cursus. Phasellus dapibus -aliquam justo. Nunc laoreet. Donec consequat placerat magna. Duis -pretium tincidunt justo. Sed sollicitudin vestibulum quam. Nam quis -ligula. Vivamus at metus. Etiam imperdiet imperdiet pede. Aenean -turpis. Fusce augue velit, scelerisque sollicitudin, dictum vitae, -tempor et, pede. Donec wisi sapien, feugiat in, fermentum ut, -sollicitudin adipiscing, metus. -} -} - -@entry{donecvelnibh, - user1 = {example-image-golden}, - name = {donec vel nibh}, - description = {Donec pede. Sed id quam id wisi laoreet suscipit. Nulla lectus -dolor, aliquam ac, fringilla eget, mollis ut, orci. In pellentesque -justo in ligula. Maecenas turpis. Donec eleifend leo at felis -tincidunt consequat. Aenean turpis metus, malesuada sed, condimentum -sit amet, auctor a, wisi. Pellentesque sapien elit, bibendum ac, -posuere et, congue eu, felis. Vestibulum mattis libero quis metus -scelerisque ultrices. Sed purus. - -Donec molestie, magna ut luctus ultrices, tellus arcu nonummy velit, -sit amet pulvinar elit justo et mauris. In pede. Maecenas euismod -elit eu erat. Aliquam augue wisi, facilisis congue, suscipit in, -adipiscing et, ante. In justo. Cras lobortis neque ac ipsum. Nunc -fermentum massa at ante. Donec orci tortor, egestas sit amet, -ultrices eget, venenatis eget, mi. Maecenas vehicula leo semper -est. Mauris vel metus. Aliquam erat volutpat. In rhoncus sapien ac -tellus. Pellentesque ligula. -} -} - -@entry{crasdapibus, - user1 = {example-image-golden-upright}, - name = {cras dapibus}, - description = {Aenean interdum nibh sed wisi. Praesent sollicitudin vulputate dui. -Praesent iaculis viverra augue. Quisque in libero. Aenean gravida -lorem vitae sem ullamcorper cursus. Nunc adipiscing rutrum ante. -Nunc ipsum massa, faucibus sit amet, viverra vel, elementum semper, -orci. Cras eros sem, vulputate et, tincidunt id, ultrices eget, -magna. Nulla varius ornare odio. Donec accumsan mauris sit amet -augue. Sed ligula lacus, laoreet non, aliquam sit amet, iaculis -tempor, lorem. Suspendisse eros. Nam porta, leo sed congue tempor, -felis est ultrices eros, id mattis velit felis non metus. Curabitur -vitae elit non mauris varius pretium. Aenean lacus sem, tincidunt -ut, consequat quis, porta vitae, turpis. Nullam laoreet fermentum -urna. Proin iaculis lectus. - -Sed mattis, erat sit amet gravida malesuada, elit augue egestas -diam, tempus scelerisque nunc nisl vitae libero. Sed consequat -feugiat massa. Nunc porta, eros in eleifend varius, erat leo rutrum -dui, non convallis lectus orci ut nibh. Sed lorem massa, nonummy -quis, egestas id, condimentum at, nisl. Maecenas at nibh. Aliquam -et augue at nunc pellentesque ullamcorper. Duis nisl nibh, laoreet -suscipit, convallis ut, rutrum id, enim. Phasellus odio. Nulla -nulla elit, molestie non, scelerisque at, vestibulum eu, nulla. Ut -odio nisl, facilisis id, mollis et, scelerisque nec, enim. Aenean -sem leo, pellentesque sit amet, scelerisque sit amet, vehicula -pellentesque, sapien. -} -} - -@entry{sedconsequat, - user1 = {example-image-1x1}, - name = {sed consequat}, - description = {Ut tempor laoreet quam. Nullam id wisi a libero tristique semper. -Nullam nisl massa, rutrum ut, egestas semper, mollis id, leo. Nulla -ac massa eu risus blandit mattis. Mauris ut nunc. In hac habitasse -platea dictumst. Aliquam eget tortor. Quisque dapibus pede in erat. -Nunc enim. In dui nulla, commodo at, consectetuer nec, malesuada -nec, elit. Aliquam ornare tellus eu urna. Sed nec metus. Cum sociis -natoque penatibus et magnis dis parturient montes, nascetur -ridiculus mus. Pellentesque habitant morbi tristique senectus et -netus et malesuada fames ac turpis egestas. - -Phasellus id magna. Duis malesuada interdum arcu. Integer metus. -Morbi pulvinar pellentesque mi. Suspendisse sed est eu magna -molestie egestas. Quisque mi lorem, pulvinar eget, egestas quis, -luctus at, ante. Proin auctor vehicula purus. Fusce ac nisl aliquam -ante hendrerit pellentesque. Class aptent taciti sociosqu ad litora -torquent per conubia nostra, per inceptos hymenaeos. Morbi wisi. -Etiam arcu mauris, facilisis sed, eleifend non, nonummy ut, pede. -Cras ut lacus tempor metus mollis placerat. Vivamus eu tortor vel -metus interdum malesuada. +% \end{macrocode} +%\end{macro} +%\begin{macro}{\glsxtrbookindexbookmark} +%\changes{1.21}{2017-11-03}{new} +%Book mark group heading if supported. +% \begin{macrocode} +\ifdef\pdfbookmark +{% + \newcommand*{\glsxtrbookindexbookmark}[2]{% + \ifdefstring{\@@glossarysec}{chapter}% + {\pdfbookmark[1]{#1}{#2}}% + {\pdfbookmark[2]{#1}{#2}}% + } } +{% + \newcommand*{\glsxtrbookindexbookmark}[2]{} } - -@entry{sedeleifend, - name = {sed eleifend}, - description = {Morbi non felis ac libero vulputate fringilla. Mauris libero eros, -lacinia non, sodales quis, dapibus porttitor, pede. Class aptent -taciti sociosqu ad litora torquent per conubia nostra, per inceptos -hymenaeos. Morbi dapibus mauris condimentum nulla. Cum sociis -natoque penatibus et magnis dis parturient montes, nascetur -ridiculus mus. Etiam sit amet erat. Nulla varius. Etiam tincidunt -dui vitae turpis. Donec leo. Morbi vulputate convallis est. Integer -aliquet. Pellentesque aliquet sodales urna. +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrbookindexsubbookmark} +%\changes{1.49}{2022-10-14}{new} +%Book mark sub-group heading if supported. +% \begin{macrocode} +\ifdef\pdfbookmark +{% + \newcommand*{\glsxtrbookindexsubbookmark}[3]{% + \ifdefstring{\@@glossarysec}{chapter}% + {\expandafter\pdfbookmark\expandafter[\number\numexpr#1+1]{#3}{#2}}% + {\expandafter\pdfbookmark\expandafter[\number\numexpr#1+2]{#3}{#2}}% + } } +{% + \newcommand*{\glsxtrbookindexsubbookmark}[3]{} } - % \end{macrocode} -%\fi -%\iffalse +%\end{macro} +% +%\begin{macro}{\glsxtrbookindexbookmarkprefix} +%\changes{1.42}{2020-02-03}{new} +%Make the bookmark label prefix used for letter groups depend on the glossary label +%(instead of original hardcoded ``index.''). % \begin{macrocode} -% +\newcommand*{\glsxtrbookindexbookmarkprefix}{\currentglossary.} % \end{macrocode} -%\fi -%\iffalse +%\end{macro} +% +%\begin{macro}{\glsxtrbookindexcolspread} +%\changes{1.21}{2017-11-03}{new} % \begin{macrocode} -%<*example-glossaries-long.bib> +\newcommand*{\glsxtrbookindexcolspread}{} % \end{macrocode} -%\fi -%\iffalse +%\end{macro} +% +%\begin{macro}{\glsxtrbookindexmulticolsenv} +%\changes{1.25}{2017-11-14}{new} % \begin{macrocode} -%< +\newglossarystyle{bookindex}{% + \setglossarystyle{index}% + \renewenvironment{theglossary}% + {% + \ifnum\glsxtrbookindexcols>1\relax + \ifdefempty\glsxtrbookindexcolspread + {% + \edef\glsxtr@beginbookindex{% + \noexpand\begin{\glsxtrbookindexmulticolsenv} + {\glsxtrbookindexcols}% + }% + }% + {% + \edef\glsxtr@beginbookindex{% + \noexpand\begin{\glsxtrbookindexmulticolsenv}% + {\glsxtrbookindexcols}[\glsxtrbookindexcolspread]% + }% + }% + \else + \def\glsxtr@beginbookindex{}% + \fi + \glsxtr@beginbookindex + \setlength{\parindent}{0pt}% + \setlength{\parskip}{0pt plus 0.3pt}% + \let\@glsxtr@bookindex@sep\glsxtrbookindexparentchildsep + \let\@glsxtr@bookindex@subsep\glsxtrbookindexparentsubchildsep + \let\@glsxtr@bookindex@between\@gobble + \let\@glsxtr@bookindex@subbetween\@gobble + \let\@glsxtr@bookindex@subsubbetween\@gobble + \let\@glsxtr@bookindex@atendgroup\relax + \let\@glsxtr@bookindex@subatendgroup\relax + \let\@glsxtr@bookindex@subsubatendgroup\relax + \let\@glsxtr@bookindexgroupskip\relax + }% + {% % \end{macrocode} -%\fi -%\iffalse +% Do end group hooks. % \begin{macrocode} -%<*example-glossaries-longchild.bib> + \@glsxtr@bookindex@subsubatendgroup + \@glsxtr@bookindex@subatendgroup + \@glsxtr@bookindex@atendgroup % \end{macrocode} -%\fi -%\iffalse +%End \env{multicols} environment. % \begin{macrocode} -% Encoding: UTF-8 -@entry{longsedmattis, - name = {sed mattis}, - description = {erat sit amet dolor sit amet, consectetuer adipiscing elit. Ut purus -elit, vestibulum ut, placerat ac, adipiscing vitae, felis. Curabitur -dictum gravida mauris.} -} - -@entry{longgravida, - parent = {longsedmattis}, - name = {gravida}, - description = {malesuada libero, nonummy eget, consectetuer id, vulputate a, magna. Donec -vehicula augue eu neque. Pellentesque habitant morbi tristique -senectus et netus et malesuada fames ac turpis egestas. Mauris ut -leo.} -} - -@entry{longelitaugue, - parent = {longsedmattis}, - name = {elit augue}, - description = {egestas diam metus rhoncus sem. Nulla et lectus vestibulum -urna fringilla ultrices. Phasellus eu tellus sit amet tortor gravida -placerat.} -} - -@entry{longtempus, - parent = {longsedmattis}, - name = {tempus}, - description = {scelerisque est, iaculis in, pretium quis, viverra ac, -nunc. Praesent eget sem vel leo ultrices bibendum. Aenean -faucibus.} -} - -@entry{longnunc, - name = {nunc}, - description = {nisl vitae nulla, malesuada eu, pulvinar at, mollis ac, nulla. -Curabitur auctor semper nulla. Donec varius orci eget risus. Duis -nibh mi, congue eu, accumsan eleifend, sagittis quis, diam. Duis -eget orci sit amet orci dignissim rutrum.} -} - -@entry{longlibero, - parent = {longnunc}, - name = {libero}, - description = {sed consequat ligula, fringilla a, euismod sodales, -sollicitudin vel, wisi. Morbi auctor lorem non justo.} -} - -@entry{longfeugiat, - parent = {longnunc}, - name = {feugiat}, - description = {massa libero, pretium at, lobortis vitae, ultricies et, -tellus. Donec aliquet, tortor sed accumsan bibendum, erat ligula aliquet magna, -vitae ornare odio metus a mi.} -} - -@entry{longporta, - parent = {longnunc}, - name = {porta}, - description = {eros in eleifend orci et nisl hendrerit mollis. Suspendisse ut massa. -Cras nec ante. Pellentesque a nulla. Cum sociis natoque penatibus -et magnis dis parturient montes, nascetur ridiculus mus.} -} - -@entry{longvariuserat, - parent = {longnunc}, - name = {varius erat}, - description = {leo rutrum dui tincidunt urna. Nulla ullamcorper -vestibulum turpis. Pellentesque cursus luctus mauris.} -} - -@entry{longnonconvallis, - name = {non convallis}, - description = {lectus orci ut nibh porttitor diam. Donec felis erat, -congue non, volutpat at, tincidunt tristique, libero. Vivamus -viverra fermentum felis.} -} - -@entry{longsedlorem, - parent = {longnonconvallis}, - name = {sedlorem}, - description = {massa pellentesque ante. Phasellus -adipiscing semper elit. Proin fermentum massa ac quam. Sed diam -turpis, molestie vitae, placerat a, molestie nec, leo.} -} - -@entry{longnonummyquis, - parent = {longnonconvallis}, - name = {nonummy -quis}, - description = {egestas id nam ipsum ligula, eleifend at, accumsan nec, suscipit -a, ipsum. Morbi blandit ligula feugiat magna. Nunc eleifend consequat -lorem.} -} - -@entry{longcondimentum, - name = {condimentum}, - description = {at nisl nulla vitae enim. Pellentesque tincidunt purus -vel magna. Integer non enim. Praesent euismod nunc eu purus. Donec -bibendum quam in tellus.} -} - -@entry{longmaecenas, - parent = {longcondimentum}, - name = {maecenas}, - description = {at nibh fringilla a, euismod sodales, sollicitudin vel, -wisi. Morbi auctor lorem non justo. Nam lacus libero, pretium at, -lobortis vitae, ultricies et, tellus. Donec aliquet, tortor sed -accumsan bibendum, erat ligula aliquet magna, vitae ornare odio -metus a mi. Morbi ac orci et nisl hendrerit mollis. Suspendisse ut -massa. Cras nec ante. Pellentesque a nulla. Cum sociis natoque -penatibus et magnis dis parturient montes, nascetur ridiculus mus. -Aliquam tincidunt urna. Nulla ullamcorper vestibulum turpis. -Pellentesque cursus luctus mauris.} + \ifnum\glsxtrbookindexcols>1\relax + \edef\glsxtr@endbookindex{% + \noexpand\end{\glsxtrbookindexmulticolsenv}% + }% + \else + \def\glsxtr@endbookindex{}% + \fi + \glsxtr@endbookindex + }% +% \end{macrocode} +%Use ragged right as columns are likely to be narrow and +%indexes tend not to be fully justified. +% \begin{macrocode} + \renewcommand*{\glossaryheader}{\raggedright}% +% \end{macrocode} +%Top level entry format. +% \begin{macrocode} + \renewcommand*{\glossentry}[2]{% +% \end{macrocode} +%Do separator. +% \begin{macrocode} + \@glsxtr@bookindex@between{##1}% +% \end{macrocode} +%Update separators. +% \begin{macrocode} + \let\@glsxtr@bookindex@sep\glsxtrbookindexparentchildsep + \let\@glsxtr@bookindex@subsep\glsxtrbookindexparentsubchildsep + \let\@glsxtr@bookindex@subbetween\@gobble + \let\@glsxtr@bookindex@subsubbetween\@gobble +% \end{macrocode} +%The second argument of \cs{glsxtrbookindexbetween} will be supplied +%as the argument to \cs{@glsxtr@bookindex@between}. +%\changes{1.49}{2022-10-14}{replaced \cs{edef} with \cs{protected@edef}} +% \begin{macrocode} + \protected@edef\@glsxtr@bookindex@between{% + \noexpand\glsxtrbookindexbetween{##1}% + }% + \protected@edef\@glsxtr@bookindex@atendgroup{% + \noexpand\glsxtrbookindexatendgroup{##1}% + }% + \let\@glsxtr@bookindex@subatendgroup\relax + \let\@glsxtr@bookindex@subsubatendgroup\relax +% \end{macrocode} +%Format entry. +% \begin{macrocode} + \glstreeitem + \glsentryitem{##1}% + \glstarget{##1}{\glsxtrbookindexname{##1}}% + \glsxtrbookindexprelocation{##1}% + \glsxtrbookindexlocation{##1}{##2}% + }% + \renewcommand{\subglossentry}[3]{% + \ifcase##1\relax +% \end{macrocode} +% Level 0 (shouldn't happen as that's formatted with \cs{glossentry}). +% \begin{macrocode} + \glstreeitem + \or +% \end{macrocode} +% Level 1. +% \begin{macrocode} + \@glsxtr@bookindex@sep + \@glsxtr@bookindex@subbetween{##2}% + \let\@glsxtr@bookindex@sep\relax +% \end{macrocode} +% Update separators. +% \begin{macrocode} + \let\@glsxtr@bookindex@subsubbetween\@gobble + \let\@glsxtr@bookindex@subsep\glsxtrbookindexparentsubchildsep + \edef\@glsxtr@bookindex@subbetween{% + \noexpand\glsxtrbookindexsubbetween{##2}% + }% + \edef\@glsxtr@bookindex@atsubendgroup{% + \noexpand\glsxtrbookindexatsubendgroup{##1}% + }% +% \end{macrocode} +% Start sub-item. +% \begin{macrocode} + \glstreesubitem + \glssubentryitem{##2}% + \else +% \end{macrocode} +% All other levels. +% \begin{macrocode} + \@glsxtr@bookindex@subsep + \@glsxtr@bookindex@subsubbetween{##2}% +% \end{macrocode} +% Update separators. +% \begin{macrocode} + \let\@glsxtr@bookindex@subsep\relax + \edef\@glsxtr@bookindex@subsubbetween{% + \noexpand\glsxtrbookindexsubsubbetween{##2}% + }% + \edef\@glsxtr@bookindex@atsubsubendgroup{% + \noexpand\glsxtrbookindexatsubsubendgroup{##1}% + }% +% \end{macrocode} +% Start sub-sub-item. +% \begin{macrocode} + \glstreesubsubitem + \fi +% \end{macrocode} +% Format entry. +% \begin{macrocode} + \glstarget{##2}{\glsxtrbookindexsubname{##2}}% + \glsxtrbookindexsubprelocation{##2}% + \glsxtrbookindexsublocation{##2}{##3}% + }% +% \end{macrocode} +% The group skip is moved to the group heading to avoid interfering +% with the end letter group hooks. +% \begin{macrocode} + \renewcommand*{\glsgroupskip}{}% +% \end{macrocode} +% Group heading format. +% \begin{macrocode} + \renewcommand*{\glsgroupheading}[1]{% +% \end{macrocode} +% Do end group hooks. +% \begin{macrocode} + \@glsxtr@bookindex@subsubatendgroup + \@glsxtr@bookindex@subatendgroup + \@glsxtr@bookindex@atendgroup + \glsxtrbookindexpregroupskip\@glsxtr@bookindexgroupskip +% \end{macrocode} +% Update separators. +% \begin{macrocode} + \let\@glsxtr@bookindexgroupskip\glsxtrbookindexgroupskip + \let\@glsxtr@bookindex@between\@gobble + \let\@glsxtr@bookindex@atendgroup\relax + \let\@glsxtr@bookindex@subatendgroup\relax + \let\@glsxtr@bookindex@subsubatendgroup\relax +% \end{macrocode} +% Fetch the group title from the label supplied in \verb|#1|. +%\changes{1.41}{2019-04-09}{changed \cs{thisgrptitle} to +%\cs{glsxtrcurrentgrptitle}}% +% \begin{macrocode} + \glsxtrgetgrouptitle{##1}{\glsxtrcurrentgrptitle}% +% \end{macrocode} +% Do the PDF bookmark if supported. +% \begin{macrocode} + \glsxtrbookindexbookmark{\glsxtrcurrentgrptitle}{\glsxtrbookindexbookmarkprefix##1}% +% \end{macrocode} +% Format the group title. +% \begin{macrocode} + \glsxtrbookindexformatheader{\glsxtrcurrentgrptitle}% + \nopagebreak\glsxtrbookindexpostgroupskip\nopagebreak\@afterheading + }% +% \end{macrocode} +%\changes{1.49}{2022-10-14}{added \cs{glssubgroupheading}} +% Sub-groups are only supported with \cs{printunsrtglossary}. +% \begin{macrocode} + \renewcommand*{\glssubgroupheading}[4]{% +% \end{macrocode} +% Do end group hooks. +% \begin{macrocode} + \@glsxtr@bookindex@subsubatendgroup + \@glsxtr@bookindex@subatendgroup + \@glsxtr@bookindex@atendgroup + \glsxtrbookindexpresubgroupskip\@glsxtr@bookindexgroupskip{##1}{##2}% +% \end{macrocode} +% Update separators. +% \begin{macrocode} + \let\@glsxtr@bookindexgroupskip\glsxtrbookindexgroupskip + \let\@glsxtr@bookindex@between\@gobble + \let\@glsxtr@bookindex@atendgroup\relax + \let\@glsxtr@bookindex@subatendgroup\relax + \let\@glsxtr@bookindex@subsubatendgroup\relax +% \end{macrocode} +% Get group title. +% \begin{macrocode} + \glsxtrgetgrouptitle{##4}{\glsxtrcurrentgrptitle}% +% \end{macrocode} +% Do the PDF bookmark if supported. +% \begin{macrocode} + \glsxtrbookindexsubbookmark{##2}{##4}{\glsxtrcurrentgrptitle}% +% \end{macrocode} +% Format the group title. +% \begin{macrocode} + \glsxtrbookindexformatsubheader{##1}{##2}{##3}{##4}{\glsxtrcurrentgrptitle}% + \nopagebreak\glsxtrbookindexpostsubgroupskip{##1}{##2}\nopagebreak\@afterheading + } } - -@entry{longaliquamet, - name = {aliquam et}, - description = {augue felis erat, congue non, -volutpat at, tincidunt tristique, libero. Vivamus viverra fermentum -felis. Donec nonummy pellentesque ante.} +% \end{macrocode} +%\end{style} +% Some supplementary commands that may be useful. +% These store the entry label for the current page. Since the page +% number is needed in the control sequence, this uses +% \cs{glsxtrbookindexthepage} instead of \cs{thepage} in case +% the page numbering has been set to something that contains +% formatting commands. +%\begin{macro}{\glsxtrbookindexthepage} +%\changes{1.21}{2017-11-03}{new} +%The \cs{@printglossary} sets \cs{currentglossary} to the current +%glossary label. This is used as a prefix in case the page number is +%reset. +% \begin{macrocode} +\newcommand{\glsxtrbookindexthepage}{% + \ifdef\currentglossary{\currentglossary.\arabic{page}}{\arabic{page}}% } - -@entry{longatnunc, - parent = {longaliquamet}, - name = {at nunc}, - description = {pellentesque ullamcorper el justo -vitae lacus tincidunt ultrices. Lorem ipsum dolor sit amet, -consectetuer adipiscing elit.} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrbookindexmarkentry} +%\changes{1.21}{2017-11-03}{new} +%Writes entry information to the \texttt{.aux} file. The argument is +%the entry label. +% \begin{macrocode} +\newcommand*{\glsxtrbookindexmarkentry}[1]{% + \protected@write\@auxout + {\let\glsxtrbookindexthepage\relax}% + {\string\glsxtr@setbookindexmark{\glsxtrbookindexthepage}{#1}}% } - -@entry{longduisnisl, - parent = {longatnunc}, - name = {duisnisl}, - description = {laoreet suscipit ac venenatis arcu -wisi vel nisl. Vestibulum diam. Aliquam pellentesque, augue quis -sagittis posuere, turpis lacus congue quam, in hendrerit risus eros -eget felis. Maecenas eget erat in sapien mattis porttitor.} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\glsxtr@setbookindexmark} +%\changes{1.21}{2017-11-03}{new} +% \begin{macrocode} +\newcommand*{\glsxtr@setbookindexmark}[2]{% + \ifcsundef{glsxtr@idxfirstmark@#1}% + {\csgdef{glsxtr@idxfirstmark@#1}{#2}}% + {}% + \csgdef{glsxtr@idxlastmark@#1}{#2}% } - -@entry{longduisnibh, - parent = {longatnunc}, - name = {duisnibh}, - description = {convallis ut justo lectus -sagittis dui, et vehicula libero dui cursus dui. Mauris tempor -ligula sed lacus. Duis cursus enim ut augue. Cras ac magna.} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrbookindexfirstmarkfmt} +%\changes{1.21}{2017-11-03}{new} +% \begin{macrocode} +\newcommand*{\glsxtrbookindexfirstmarkfmt}[1]{% + \glsentryname{#1}% } - -@entry{longrutrum, - name = {rutrum}, - description = {id, enim elit, rutrum at, molestie non, nonummy vel, nisl. Ut lectus -eros, malesuada sit amet, fermentum eu, sodales cursus, magna. Donec -eu purus. Quisque vehicula, urna sed ultricies auctor, pede lorem -egestas dui, et convallis elit erat sed nulla.} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\glsxtrbookindexfirstmark} +%\changes{1.21}{2017-11-03}{new} +% \begin{macrocode} +\newcommand*{\glsxtrbookindexfirstmark}{% + \letcs{\glsxtr@label}{glsxtr@idxfirstmark@\glsxtrbookindexthepage}% + \ifdef\glsxtr@label + {\glsxtrbookindexfirstmarkfmt{\glsxtr@label}}% + {}% } - -@entry{longphasellus, - parent = {longrutrum}, - name = {phasellus}, - description = {odio volutpat a, ornare ac, erat. -Morbi quis dolor. Donec pellentesque, erat ac sagittis semper, nunc -dui lobortis purus, quis congue purus metus ultricies tellus. Proin -et quam.} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glsxtrbookindexlastmarkfmt} +%\changes{1.21}{2017-11-03}{new} +% \begin{macrocode} +\newcommand*{\glsxtrbookindexlastmarkfmt}[1]{% + \glsentryname{#1}% } - -@entry{longnullanulla, - parent = {longrutrum}, - name = {nulla nulla}, - description = {elit, molestie non wisi viverra faucibus pretium, nibh est placerat odio, -nec commodo wisi enim eget quam. Quisque libero justo, consectetuer -a, feugiat vitae, porttitor eu, libero.} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\glsxtrbookindexlastmark} +%\changes{1.21}{2017-11-03}{new} +% \begin{macrocode} +\newcommand*{\glsxtrbookindexlastmark}{% + \letcs{\glsxtr@label}{glsxtr@idxlastmark@\glsxtrbookindexthepage}% + \ifdef\glsxtr@label + {\glsxtrbookindexlastmarkfmt{\glsxtr@label}}% + {}% } - % \end{macrocode} -%\fi +%\end{macro} +% %\iffalse % \begin{macrocode} -% +% % \end{macrocode} %\fi %\iffalse % \begin{macrocode} -%<*example-glossaries-multipar.bib> +%<*glossary-longextra.sty> % \end{macrocode} %\fi -%\iffalse +%\section{longextra styles (\sty{glossary-longextra.sty})} +%\changes{1.37}{2018-11-30}{new} +%Provides additional long styles. % \begin{macrocode} -%< +\DeclareRelease{v1.48}{2021-11-22}{glossary-longextra-2021-11-22.sty} +\DeclareCurrentRelease{v1.49}{2022-10-14} % \end{macrocode} -%\fi -%\iffalse +% Declare package: % \begin{macrocode} -%<*example-glossaries-parent.bib> +\ProvidesPackage{glossary-longextra}[2022/10/14 v1.49 (NLCT)] % \end{macrocode} -%\fi -%\iffalse +%Load required packages. % \begin{macrocode} -%<{\raggedright}p{\glsdescwidth}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glslongextraSymbolAlign} +%\changes{1.37}{2018-11-30}{new} +%Alignment for the symbol column. +% \begin{macrocode} +\newcommand{\glslongextraSymbolAlign}{c} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glslongextraSymbolNameAlign} +%\changes{1.49}{2022-10-14}{new} +%Alignment for the symbol column when it's being used instead of the +%name. +% \begin{macrocode} +\newcommand{\glslongextraSymbolNameAlign}{l} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glslongextraLocationAlign} +%\changes{1.37}{2018-11-30}{new} +%Alignment for the location column. +% \begin{macrocode} +\newcommand{\glslongextraLocationAlign}{>{\raggedright}p{\glspagelistwidth}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glslongextraGroupHeading} +%\changes{1.37}{2018-11-30}{new} +%Used to format the letter group headings. The first argument is the +%number of columns in the table. The second is the group +%\emph{label} (not the title). +% \begin{macrocode} +\newcommand{\glslongextraGroupHeading}[2]{} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glslongextraSubGroupHeading} +%\changes{1.49}{2022-10-14}{new} +%\begin{definition} +%\cs{glslongextraSubGroupHeading}\marg{number of columns}\marg{prev group level}\marg{group +%level}\marg{parent entry}\marg{group label} +%\end{definition} +% \begin{macrocode} +\newcommand*{\glslongextraSubGroupHeading}[5]{} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glslongextraHeaderFormat} +%\changes{1.37}{2018-11-30}{new} +%Format for the column headers. +% \begin{macrocode} +\newcommand{\glslongextraHeaderFmt}[1]{\textbf{#1}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glslongextraNameDescHeader} +%\changes{1.37}{2018-11-30}{new} +% \begin{macrocode} +\newcommand{\glslongextraNameDescHeader}{% + \glslongextraNameDescTabularHeader\endhead + \glslongextraNameDescTabularFooter\endfoot } - -@entry{maecenas, - parent = {condimentum}, - name = {maecenas}, - description = {at nibh} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glslongextraNameDescTabularHeader} +%\changes{1.37}{2018-11-30}{new} +% \begin{macrocode} +\newcommand{\glslongextraNameDescTabularHeader}{% + \toprule + \glslongextraHeaderFmt\entryname & + \glslongextraHeaderFmt\descriptionname\tabularnewline + \midrule } - -@entry{atnunc, - parent = {aliquamet}, - name = {at nunc}, - description = {pellentesque -ullamcorper} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glslongextraNameDescTabularFooter} +%\changes{1.37}{2018-11-30}{new} +% \begin{macrocode} +\newcommand{\glslongextraNameDescTabularFooter}{% + \bottomrule } - -@entry{phasellus, - parent = {rutrum}, - name = {phasellus}, - description = {odio} +% \end{macrocode} +%\end{macro} +% +%Unlike the \glostyle{alttree} style, there aren't different widths +%for the hierarchical levels. +%\begin{macro}{\glslongextraSetWidest} +%\changes{1.37}{2018-11-30}{new} +%Provide in case the tree styles haven't been loaded. +% \begin{macrocode} +\newcommand*{\glslongextraSetWidest}[1]{% + \def\@glslongextrawidestname{#1}% } - -@entry{nullanulla, - parent = {rutrum}, - name = {nulla nulla}, - description = {elit, molestie non} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glslongextrawidestname} +%\changes{1.37}{2018-11-30}{new} +%Pick up the widest name from the \glostyle{alttree} style if it has +%been set. (Will expand to nothing otherwise.) +% \begin{macrocode} +\newcommand*{\@glslongextrawidestname}{\csuse{@glswidestname}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glslongextraUpdateWidest} +%\changes{1.37}{2018-11-30}{new} +% \begin{macrocode} +\newcommand*{\glslongextraUpdateWidest}[1]{% + \ifundef\@glslongextrawidestname + {\def\@glslongextrawidestname{#1}}% + {% + \settowidth{\dimen@}{\@glslongextrawidestname}% + \settowidth{\dimen@ii}{#1}% + \ifdim\dimen@ii>\dimen@ + \def\@glslongextrawidestname{#1}% + \fi + }% } - -% level 2: - -@entry{duisnisl, - parent = {atnunc}, - name = {duisnisl}, - description = {laoreet -suscipit} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glslongextraUpdateWidestChild} +%\changes{1.37}{2018-11-30}{new} +%\begin{definition} +%\cs{glslongextraUpdateWidestChild}\marg{level}\marg{text} +%\end{definition} +%Used by \cs{glsxtrSetWidest} in \sty{glossaries-extra-bib2gls}. +%Does nothing by default, since the default action in these styles +%is to omit the child name. If the child name should be displayed, +%then this needs to be redefined to use +%\cs{glslongextraUpdateWidest}. +% \begin{macrocode} +\newcommand*{\glslongextraUpdateWidestChild}[2]{} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glslongextraSetDescWidth} +%\changes{1.37}{2018-11-30}{new} +% Computes the value of \cs{glsdescwidth} for the styles that only +% have name and description columns. +% \begin{macrocode} +\newcommand{\glslongextraSetDescWidth}{% + \settowidth{\gls@tmplen}{\glslongextraHeaderFmt\entryname}% +% \end{macrocode} +% Has the widest name been set. +% \begin{macrocode} + \settowidth{\dimen@}{\glsnamefont{\@glslongextrawidestname}}% + \ifdim\dimen@>\gls@tmplen + \gls@tmplen=\dimen@ + \fi +% \end{macrocode} +% Description width is \cs{linewidth} less 4\cs{tabcolsep} less the +% width of the name column. +% \begin{macrocode} + \setlength{\glsdescwidth}{\dimexpr\linewidth-4\tabcolsep-\gls@tmplen}% } - -@entry{duisnibh, - parent = {atnunc}, - name = {duisnibh}, - description = {convallis ut} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glslongextraSymSetDescWidth} +%\changes{1.37}{2018-11-30}{new} +% Computes the value of \cs{glsdescwidth} for the styles that only +% have name, symbol and description columns. +% \begin{macrocode} +\newcommand{\glslongextraSymSetDescWidth}{% +% \end{macrocode} +% Work out the size for just the name and description style. +% \begin{macrocode} + \glslongextraSetDescWidth +% \end{macrocode} +% Now work out the symbol column width. This is assuming that the +% column title will be the widest text in the column. +% \begin{macrocode} + \settowidth{\gls@tmplen}{\glslongextraHeaderFmt\symbolname}% +% \end{macrocode} +% Subtract 2\cs{tabcolsep} and the symbol header width. +% \begin{macrocode} + \setlength{\glsdescwidth}{\dimexpr\glsdescwidth-2\tabcolsep-\gls@tmplen}% } - % \end{macrocode} -%\fi -%\iffalse +%\end{macro} +% +%\begin{macro}{\glslongextraSymNoNameSetDescWidth} +%\changes{1.49}{2022-10-14}{new} +% Computes the value of \cs{glsdescwidth} for the styles that only +% have symbol and description columns. % \begin{macrocode} -% +\newcommand{\glslongextraSymNoNameSetDescWidth}{% % \end{macrocode} -%\fi -%\iffalse +% Now work out the symbol column width. This is assuming that the +% column title will be the widest text in the column. % \begin{macrocode} -%<*example-glossaries-symbolnames.bib> + \settowidth{\gls@tmplen}{\glslongextraHeaderFmt\symbolname}% % \end{macrocode} -%\fi -%\iffalse +% Subtract 4\cs{tabcolsep} and the symbol header width. % \begin{macrocode} -% Encoding: UTF-8 -@entry{sym.alpha, - name = {\ensuremath{\alpha}}, - description = {Quisque ullamcorper placerat ipsum.} + \setlength{\glsdescwidth}{\dimexpr\linewidth-4\tabcolsep-\gls@tmplen}% } - -@entry{sym.beta, - name = {\ensuremath{\beta}}, - description = {Cras nibh.} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glslongextraLocSetDescWidth} +%\changes{1.37}{2018-11-30}{new} +% Computes the value of \cs{glsdescwidth} for the styles that only +% have name, location and description columns. +% \begin{macrocode} +\newcommand{\glslongextraLocSetDescWidth}{% +% \end{macrocode} +% Work out the size for just the name and description style. +% \begin{macrocode} + \glslongextraSetDescWidth +% \end{macrocode} +% Subtract 2\cs{tabcolsep} and the location list column width. +% \begin{macrocode} + \setlength{\glsdescwidth}{\dimexpr\glsdescwidth-2\tabcolsep-\glspagelistwidth}% } - -@entry{sym.gamma, - name = {\ensuremath{\gamma}}, - description = {Morbi vel justo vitae lacus tincidunt ultrices.} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glslongextraSymLocSetDescWidth} +%\changes{1.37}{2018-11-30}{new} +% Computes the value of \cs{glsdescwidth} for the styles that +% have name, symbol, location and description columns. +% \begin{macrocode} +\newcommand{\glslongextraSymLocSetDescWidth}{% +% \end{macrocode} +% Work out the size for just the name, symbol and description style. +% \begin{macrocode} + \glslongextraSymSetDescWidth +% \end{macrocode} +% Subtract 2\cs{tabcolsep} and the location list column width. +% \begin{macrocode} + \setlength{\glsdescwidth}{\dimexpr\glsdescwidth-2\tabcolsep-\glspagelistwidth}% } - -@entry{sym.delta, - name = {\ensuremath{\delta}}, - description = {Lorem ipsum dolor sit amet, consectetuer adipiscing -elit.} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glslongextraShortNoNameSetDescWidth} +%\changes{1.49}{2022-10-14}{new} +% Computes the value of \cs{glsdescwidth} for the styles that only +% have short and long columns. The long form will essentially be +% treated like a description column. +% \begin{macrocode} +\newcommand{\glslongextraShortNoNameSetDescWidth}{% +% \end{macrocode} +% Now work out the short column width. This is assuming that the +% column title will be the widest text in the column. +% \begin{macrocode} + \settowidth{\gls@tmplen}{\glslongextraHeaderFmt\glslongextraShortHeader}% +% \end{macrocode} +% Subtract 4\cs{tabcolsep} and the above header width. +% \begin{macrocode} + \setlength{\glsdescwidth}{\dimexpr\linewidth-4\tabcolsep-\gls@tmplen}% } - -@entry{sym.epsilon, - name = {\ensuremath{\epsilon}}, - description = {In hac habitasse platea dictumst.} -} - -@entry{sym.zeta, - name = {\ensuremath{\zeta}}, - description = {Integer tempus convallis augue.} -} - -@entry{sym.eta, - name = {\ensuremath{\eta}}, - description = {Etiam facilisis.} -} - -@entry{sym.theta, - name = {\ensuremath{\theta}}, - description = {Nunc elementum fermentum wisi.} -} - -@entry{sym.iota, - name = {\ensuremath{i}}, - description = {Aenean placerat.} -} - -@entry{sym.kappa, - name = {\ensuremath{\kappa}}, - description = {Ut imperdiet, enim sed gravida sollicitudin, felis odio -placerat quam, ac pulvinar elit purus eget enim.} -} - -@entry{sym.lambda, - name = {\ensuremath{\lambda}}, - description = {Nunc vitae tortor.} -} - -@entry{sym.mu, - name = {\ensuremath{\mu}}, - description = {Proin tempus nibh sit amet nisl.} -} - -@entry{sym.nu, - name = {\ensuremath{\nu}}, - description = {Vivamus quis tortor vitae risus porta vehicula.} -} - -@entry{sym.xi, - name = {\ensuremath{\xi}}, - description = {Fusce mauris.} -} - -@entry{sym.pi, - name = {\ensuremath{\pi}}, - description = {Vestibulum luctus nibh at lectus.} -} - -@entry{sym.rho, - name = {\ensuremath{\rho}}, - description = {Sed bibendum, nulla a faucibus semper, leo velit -ultricies tellus, ac venenatis arcu wisi vel nisl. Vestibulum diam.} -} - -@entry{sym.sigma, - name = {\ensuremath{\sigma}}, - description = {Aliquam pellentesque, augue quis sagittis posuere, -turpis lacus congue quam, in hendrerit risus eros eget felis.} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\ifGlsLongExtraUseTabular} +%\changes{1.37}{2018-11-30}{new} +%If true use \env{tabular} instead of \env{longtable}. Obviously +%only intended for short glossaries that can fit into a single page. +% \begin{macrocode} +\newif\ifGlsLongExtraUseTabular +\GlsLongExtraUseTabularfalse +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glslongextraTabularVAlign} +%\changes{1.37}{2018-11-30}{new} +%Only used with the \env{tabular} setting. +% \begin{macrocode} +\newcommand*{\glslongextraTabularVAlign}{c} +% \end{macrocode} +%\end{macro} +%\begin{style}{long-name-desc} +%\changes{1.37}{2018-11-30}{new} +%Two column style with multi-lined descriptions and header. +%This is similar to the \glostyle{longragged-booktabs} style. +% \begin{macrocode} +\newglossarystyle{long-name-desc}% +{% + \ifGlsLongExtraUseTabular + \renewenvironment{theglossary}% + {% + \glslongextraSetDescWidth + \edef\@glslongextra@begintab{% + \noexpand\begin{tabular}[\glslongextraTabularVAlign]{% + \expandonce\glslongextraNameAlign + \expandonce\glslongextraDescAlign}}% + \@glslongextra@begintab + }% + {% + \glslongextraNameDescTabularFooter + \end{tabular}% + }% + \renewcommand*{\glossaryheader}{\glslongextraNameDescTabularHeader}% + \else + \renewenvironment{theglossary}% + {% + \glspatchLToutput + \glslongextraSetDescWidth + \edef\@glslongextra@begintab{% + \noexpand\begin{longtable}{% + \expandonce\glslongextraNameAlign + \expandonce\glslongextraDescAlign}}% + \@glslongextra@begintab + }% + {\end{longtable}}% + \renewcommand*{\glossaryheader}{\glslongextraNameDescHeader}% + \fi + \renewcommand*{\glsgroupheading}[1]{\glslongextraGroupHeading{2}{##1}}% +% \end{macrocode} +%\changes{1.49}{2022-10-14}{added \cs{glssubgroupheading}} +% Sub-groups are only supported with \cs{printunsrtglossary}. +% \begin{macrocode} + \renewcommand*{\glssubgroupheading}{\glslongextraSubGroupHeading{2}}% +% \end{macrocode} +%Top-level entry. +% \begin{macrocode} + \renewcommand{\glossentry}[2]{% + \glslongextraNameFmt{##1} & + \glslongextraDescFmt{##1}\tabularnewline + }% +% \end{macrocode} +%Child entry. +% \begin{macrocode} + \renewcommand{\subglossentry}[3]{% + \glslongextraSubNameFmt{##1}{##2} + & + \glslongextraSubDescFmt{##1}{##2}% + \tabularnewline + }% + \ifglsnogroupskip + \renewcommand*{\glsgroupskip}{}% + \else + \renewcommand*{\glsgroupskip}{\glspenaltygroupskip}% + \fi } - -@entry{sym.tau, - name = {\ensuremath{\tau}}, - description = {Maecenas eget erat in sapien mattis porttitor.} +% \end{macrocode} +%\end{style} +% +%\begin{macro}{\glslongextraNameDescLocationHeader} +%\changes{1.37}{2018-11-30}{new} +% \begin{macrocode} +\newcommand{\glslongextraNameDescLocationHeader}{% + \glslongextraNameDescLocationTabularHeader\endhead + \glslongextraNameDescLocationTabularFooter\endfoot } - -@entry{sym.upsilon, - name = {\ensuremath{\upsilon}}, - description = {Vestibulum porttitor.} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glslongextraNameDescLocationTabularHeader} +%\changes{1.37}{2018-11-30}{new} +% \begin{macrocode} +\newcommand{\glslongextraNameDescLocationTabularHeader}{% + \toprule + \glslongextraHeaderFmt\entryname & + \glslongextraHeaderFmt\descriptionname & + \glslongextraHeaderFmt\pagelistname\tabularnewline + \midrule } - -@entry{sym.phi, - name = {\ensuremath{\phi}}, - description = {Nulla facilisi.} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glslongextraNameDescLocationTabularFooter} +%\changes{1.37}{2018-11-30}{new} +% \begin{macrocode} +\newcommand{\glslongextraNameDescLocationTabularFooter}{% + \bottomrule } - -@entry{sym.chi, - name = {\ensuremath{\chi}}, - description = {Sed a turpis eu lacus commodo facilisis.} +% \end{macrocode} +%\end{macro} +% +%\begin{style}{long-name-desc-loc} +%\changes{1.37}{2018-11-30}{new} +%Three columns: name, description and location list. +% \begin{macrocode} +\newglossarystyle{long-name-desc-loc}% +{% + \ifGlsLongExtraUseTabular + \renewenvironment{theglossary}% + {% + \glslongextraLocSetDescWidth + \edef\@glslongextra@begintab{% + \noexpand\begin{tabular}[\glslongextraTabularVAlign]{% + \expandonce\glslongextraNameAlign + \expandonce\glslongextraDescAlign + \expandonce\glslongextraLocationAlign + }}% + \@glslongextra@begintab + }% + {% + \glslongextraNameDescLocationTabularFooter + \end{tabular}% + }% + \renewcommand*{\glossaryheader}{\glslongextraNameDescLocationTabularHeader}% + \else + \renewenvironment{theglossary}% + {% + \glspatchLToutput + \glslongextraLocSetDescWidth + \edef\@glslongextra@begintab{% + \noexpand\begin{longtable}{% + \expandonce\glslongextraNameAlign + \expandonce\glslongextraDescAlign + \expandonce\glslongextraLocationAlign + }}% + \@glslongextra@begintab + }% + {\end{longtable}}% + \renewcommand*{\glossaryheader}{\glslongextraNameDescLocationHeader}% + \fi + \renewcommand*{\glsgroupheading}[1]{\glslongextraGroupHeading{3}{##1}}% +% \end{macrocode} +%\changes{1.49}{2022-10-14}{added \cs{glssubgroupheading}} +% Sub-groups are only supported with \cs{printunsrtglossary}. +% \begin{macrocode} + \renewcommand*{\glssubgroupheading}{\glslongextraSubGroupHeading{3}}% + \renewcommand{\glossentry}[2]{% + \glslongextraNameFmt{##1} & + \glslongextraDescFmt{##1} & + \glslongextraLocationFmt{##1}{##2}\tabularnewline + }% + \renewcommand{\subglossentry}[3]{% + \glslongextraSubNameFmt{##1}{##2}& + \glslongextraSubDescFmt{##1}{##2}& + \glslongextraSubLocationFmt{##1}{##2}{##3}% + \tabularnewline + }% + \ifglsnogroupskip + \renewcommand*{\glsgroupskip}{}% + \else + \renewcommand*{\glsgroupskip}{\glspenaltygroupskip}% + \fi } - -@entry{sym.psi, - name = {\ensuremath{\psi}}, - description = {Morbi fringilla, wisi in dignissim interdum, justo -lectus sagittis dui, et vehicula libero dui cursus dui.} +% \end{macrocode} +%\end{style} +% +%\begin{macro}{\glslongextraDescNameHeader} +%\changes{1.37}{2018-11-30}{new} +% \begin{macrocode} +\newcommand{\glslongextraDescNameHeader}{% + \glslongextraDescNameTabularHeader\endhead + \glslongextraDescNameTabularFooter\endfoot } - -@entry{sym.omega, - name = {\ensuremath{\omega}}, - description = {Mauris tempor ligula sed lacus.} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glslongextraDescNameTabularHeader} +%\changes{1.37}{2018-11-30}{new} +% \begin{macrocode} +\newcommand{\glslongextraDescNameTabularHeader}{% + \toprule + \glslongextraHeaderFmt\descriptionname& + \glslongextraHeaderFmt\entryname \tabularnewline + \midrule } - % \end{macrocode} -%\fi -%\iffalse +%\end{macro} +% +%\begin{macro}{\glslongextraDescNameTabularFooter} +%\changes{1.37}{2018-11-30}{new} % \begin{macrocode} -% +\newcommand{\glslongextraDescNameTabularFooter}{% + \bottomrule +} % \end{macrocode} -%\fi -%\iffalse +%\end{macro} +% +%\begin{style}{long-desc-name} +%\changes{1.37}{2018-11-30}{new} +%Like \glostyle{name-desc} but swaps the columns. % \begin{macrocode} -%<*example-glossaries-symbols.bib> +\newglossarystyle{long-desc-name}% +{% + \ifGlsLongExtraUseTabular + \renewenvironment{theglossary}% + {% + \glslongextraSetDescWidth + \edef\@glslongextra@begintab{% + \noexpand\begin{tabular}[\glslongextraTabularVAlign]{% + \expandonce\glslongextraDescAlign + \expandonce\glslongextraNameAlign}}% + \@glslongextra@begintab + }% + {% + \glslongextraDescNameTabularFooter + \end{tabular}% + }% + \renewcommand*{\glossaryheader}{\glslongextraDescNameTabularHeader}% + \else + \renewenvironment{theglossary}% + {% + \glspatchLToutput + \glslongextraSetDescWidth + \edef\@glslongextra@begintab{% + \noexpand\begin{longtable}{% + \expandonce\glslongextraDescAlign + \expandonce\glslongextraNameAlign}}% + \@glslongextra@begintab + }% + {\end{longtable}}% + \renewcommand*{\glossaryheader}{\glslongextraDescNameHeader}% + \fi + \renewcommand*{\glsgroupheading}[1]{\glslongextraGroupHeading{2}{##1}}% % \end{macrocode} -%\fi -%\iffalse +%\changes{1.49}{2022-10-14}{added \cs{glssubgroupheading}} +% Sub-groups are only supported with \cs{printunsrtglossary}. % \begin{macrocode} -%< +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} +%<*glossary-topic.sty> +% \end{macrocode} +%\fi +%\section{topic styles (\sty{glossary-topic.sty})} +%\changes{1.40}{2019-03-22}{new} +%Provides \qt{topic} styles where top-level entries are considered a +%topic. +% \begin{macrocode} +\NeedsTeXFormat{LaTeX2e} +% \end{macrocode} +% Rollback releases: +% \begin{macrocode} +\DeclareRelease{v1.48}{2021-11-22}{glossary-topic-2021-11-22.sty} +\DeclareCurrentRelease{v1.49}{2022-10-14} +% \end{macrocode} +% Declare package: +% \begin{macrocode} +\ProvidesPackage{glossary-topic}[2022/10/14 v1.49 (NLCT)] +% \end{macrocode} +%Load required package. +% \begin{macrocode} +\RequirePackage{multicol} +% \end{macrocode} +%The top-level entries act like headers. If the top-level entry has a +%description it's placed below the name. +%\begin{style}{topic} +%\changes{1.40}{2019-03-22}{new} +% \begin{macrocode} +\newglossarystyle{topic}{% + \renewenvironment{theglossary}% + {% + \glstopicInit + \def\glstopic@prechildren{}% + \def\glstopic@prevlevel{-1}% + }% + {\par}% + \renewcommand*{\glossaryheader}{}% + \renewcommand*{\glsgroupheading}[1]{% + \def\glstopic@prevlevel{-1}% + \glstopicGroupHeading{##1}% + }% +% \end{macrocode} +%\changes{1.49}{2022-10-14}{added \cs{glssubgroupheading}} +% Sub-groups are only supported with \cs{printunsrtglossary}. +% \begin{macrocode} + \renewcommand*{\glssubgroupheading}{\glstopicSubGroupHeading}% + \renewcommand{\glossentry}[2]{% + \hangindent0pt\relax + \parindent\glstopicParIndent\relax + \glstopicItem{##1}{##2}% +% \end{macrocode} +%\changes{1.41}{2019-04-09}{added penalty if no description} +%If there isn't a description, penalise a page break. +% \begin{macrocode} + \ifglshasdesc{##1}% + {% + \def\glstopic@prechildren{}% + }% + {% + \def\glstopic@prechildren{\nopagebreak}% + }% + }% + \renewcommand{\subglossentry}[3]{% + \ifnum\glstopic@prevlevel=0\relax\glstopic@prechildren\fi + \def\glstopic@prevlevel{##1}% +% \end{macrocode} +%\changes{1.46}{2021-09-20}{grouping added to scope \cs{everypar} (bug 182)} +%Grouping is added to scope the effect of \cs{everypar}. +% \begin{macrocode} + \begingroup + \glstopicAssignSubIndent{##1}% + \glstopicSubItem{##1}{##2}{##3}% +% \end{macrocode} +%\changes{1.46}{2021-09-20}{added \cs{par} (bug 176)} +% \begin{macrocode} + \par + \endgroup + }% + \renewcommand*{\glsgroupskip}{}% +} +% \end{macrocode} +%\end{style} +%\begin{macro}{\glstopicGroupHeading} +%\changes{1.40}{2019-03-22}{new} +%\begin{definition} +%\cs{glstopicGroupHeading}\marg{group label} +%\end{definition} +%May be redefined if letter group headings are required. For +%example: +%\begin{verbatim} +%\renewcommand*{\glstopicGroupHeading}[1]{% +% \glsxtrgetgrouptitle{#1}{\thisgrptitle}% +% \section*{\thisgrptitle}% +%} +%\end{verbatim} +% \begin{macrocode} +\newcommand*{\glstopicGroupHeading}[1]{} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\glstopicSubGroupHeading} +%\changes{1.49}{2022-10-14}{new} +%\begin{definition} +%\cs{glstopicSubGroupHeading}\marg{prev group level}\marg{group +%level}\marg{parent entry}\marg{group label} +%\end{definition} +% \begin{macrocode} +\newcommand*{\glstopicSubGroupHeading}[4]{% + \begingroup + \glspar\glstopicPreSkip\glspar\noindent + \glsxtrgetgrouptitle{#4}{\glstopicsubgrouptitle}% + \glstopicAssignSubIndent{#2}% + \glstopicSubItemBox{#2}{\glstopicTitleFont{\glstopicsubgrouptitle}}% + \glstopicSubItemSep + \glspar\nobreak\glstopicPostSkip + \par + \endgroup +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\glstopicItem} +%\changes{1.40}{2019-03-22}{new} +%\begin{definition} +%\cs{glstopicItem}\marg{label}\marg{location list} +%\end{definition} +% \begin{macrocode} +\newcommand*{\glstopicItem}[2]{% + \glspar\glstopicPreSkip\glspar\noindent + \glstopicMarker{#1}% + \glstopicTitleFont + {% + \glsentryitem{#1}\glstarget{#1}{\glstopicTitle{#1}}% + }% + \ifglshasdesc{#1}% + {\glspar\nobreak\glstopicMidSkip\glspar\nobreak + \@afterheading\glstopicDesc{#1}\glspar\glstopicPostSkip + }% + {\glspar\nobreak\glstopicPostSkip}% + \glstopicLoc{#1}{#2}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\glstopicMarker} +%\changes{1.40}{2019-03-22}{new} +% May be used to insert a bookmark etc if required. +% \begin{macrocode} +\newcommand*{\glstopicMarker}[1]{} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\glstopicName} +%\changes{1.40}{2019-03-22}{new} +% \begin{macrocode} +\newcommand*{\glstopicTitle}[1]{\Glossentryname{#1}% + \ifglshassymbol{#1}{\space(\glossentrysymbol{#1})}{}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\glstopicTitleFont} +%\changes{1.40}{2019-03-22}{new} +% \begin{macrocode} +\newcommand*{\glstopicTitleFont}[1]{\textbf{\large #1}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\glstopicDesc} +%\changes{1.40}{2019-03-22}{new} +% \begin{macrocode} +\newcommand*{\glstopicDesc}[1]{\Glossentrydesc{#1}\glspostdescription} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\glstopicLoc} +%\changes{1.40}{2019-03-22}{new} +% \begin{macrocode} +\newcommand*{\glstopicLoc}[2]{} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\glstopicParIndent} +%\changes{1.40}{2019-03-22}{new} +% \begin{macrocode} +\newlength\glstopicParIndent +\setlength\glstopicParIndent{20pt} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\glstopicSubIndent} +%\changes{1.40}{2019-03-22}{new} +% \begin{macrocode} +\newlength\glstopicSubIndent +\setlength\glstopicSubIndent{20pt} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\glstopicInit} +%\changes{1.40}{2019-03-22}{new} +% \begin{macrocode} +\newcommand{\glstopicInit}{} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\glstopicAssignSubIndent} +%\changes{1.40}{2019-03-22}{new} +%\begin{definition} +%\cs{glstopicAssignSubIndent}\marg{level} +%\end{definition} +%Used to set the indentation for sub-levels. +% \begin{macrocode} +\newcommand*{\glstopicAssignSubIndent}[1]{% +% \end{macrocode} +%\changes{1.41}{2019-04-09}{moved \cs{par} from \cs{glstopicSubItem}} +% \begin{macrocode} + \par + \parindent\dimexpr#1\glstopicSubIndent-\glstopicSubIndent\relax + \glstopicAssignWidest{#1}% + \glstopicsubitemhangindent=\dimexpr\parindent+\glstopicwidest\relax + \hangindent\glstopicsubitemhangindent\relax +% \end{macrocode} +%\changes{1.46}{2021-09-20}{bug 182 maintain hangindent for multiple paragraphs} +% \begin{macrocode} + \everypar{\hangindent\glstopicsubitemhangindent\relax + \parindent\dimexpr\glstopicSubItemParIndent+\glstopicsubitemhangindent\relax}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glstopicsubitemhangindent} +%\changes{1.46}{2021-09-20}{new} +% \begin{macrocode} +\newlength\glstopicsubitemhangindent +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glstopicSubItemParIndent} +%\changes{1.46}{2021-09-20}{new} +% \begin{macrocode} +\newlength\glstopicSubItemParIndent +\glstopicSubItemParIndent\parindent +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glstopicwidest} +%\changes{1.40}{2019-03-22}{new} +% \begin{macrocode} +\newlength\glstopicwidest +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glstopicAssignWidest} +%\changes{1.40}{2019-03-22}{new} +%\begin{definition} +%\cs{glstopicAssignWidest}\marg{level} +%\end{definition} +%Used in the definition of \cs{glstopicAssignSubIndent} +%to set the indentation from the widest name for the given +%level. This will require \sty{glossary-tree} to set the values. +% \begin{macrocode} +\newcommand*{\glstopicAssignWidest}[1]{% + \ifcsundef{@glswidestlength\romannumeral#1}% + {% + \ifcsdef{@glswidestname\romannumeral#1}% + {% + \settowidth{\glstopicwidest}{% + \glstopicSubNameFont{\csuse{@glswidestname\romannumeral#1}}% + \glstopicSubItemSep + }% + }% + {\setlength{\glstopicwidest}{0pt}}% +% \end{macrocode} +%Save the value so that it doesn't have to keep being recalculated. +% \begin{macrocode} + \csedef{@glswidestlength\romannumeral#1}{\the\glstopicwidest}% + }% + {\setlength{\glstopicwidest}{\csuse{@glswidestlength\romannumeral#1}}}% +} +% \end{macrocode} +%\end{macro} +% +% +%\begin{macro}{\glstopicPreSkip} +%\changes{1.40}{2019-03-22}{new} +% \begin{macrocode} +\newcommand*{\glstopicPreSkip}{\medskip} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\glstopicMidSkip} +%\changes{1.40}{2019-03-22}{new} +% \begin{macrocode} +\newcommand*{\glstopicMidSkip}{\smallskip} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\glstopicPostSkip} +%\changes{1.40}{2019-03-22}{new} +% \begin{macrocode} +\newcommand*{\glstopicPostSkip}{\smallskip} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\glstopicSubItem} +%\changes{1.40}{2019-03-22}{new} +%\begin{definition} +%\cs{glstopicSubItem}\marg{level}\marg{label}\marg{location list} +%\end{definition} +% \begin{macrocode} +\newcommand*{\glstopicSubItem}[3]{% +% \end{macrocode} +%\changes{1.41}{2019-04-09}{moved \cs{par} to \cs{glstopicAssignSubIndent}} +% \begin{macrocode} + \glstopicSubItemBox{#1}{\glstopicSubNameFont{\glsentryitem{#2}% + \glstarget{#2}{\glossentryname{#2}}}% + \glstopicSubItemSep + }% + \ifglshassymbol{#2}{(\glossentrysymbol{#2})\space}{}% +% \end{macrocode} +%\changes{1.41}{2019-04-09}{added check for description} +% \begin{macrocode} + \ifglshasdesc{#2}% + {\glossentrydesc{#2}\glspostdescription\glstopicSubPreLocSep}{}% + \glstopicSubLoc{#2}{#3}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\glstopicSubItemSep} +%\changes{1.40}{2019-03-22}{new} +% \begin{macrocode} +\newcommand*{\glstopicSubItemSep}{\quad} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\glstopicSubItemBox} +%\changes{1.40}{2019-03-22}{new} +%\begin{definition} +%\cs{glstopicSubItemBox}\marg{level}\marg{text} +%\end{definition} +% \begin{macrocode} +\newcommand*{\glstopicSubItemBox}[2]{% + \ifdim\glstopicwidest>0pt\relax\makebox[\glstopicwidest][l]{#2}\else#2\fi +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\glstopicSubNameFont} +%\changes{1.40}{2019-03-22}{new} +% \begin{macrocode} +\newcommand*{\glstopicSubNameFont}[1]{\textbf{#1}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\glstopicSubPreLocSep} +%\changes{1.41}{2019-04-09}{new} +% \begin{macrocode} +\newcommand*{\glstopicSubPreLocSep}{\space} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\glstopicSubLoc} +%\changes{1.40}{2019-03-22}{new} +%\changes{1.41}{2019-04-09}{moved \cs{space} to \cs{glstopicSubPreLocSep}} +% \begin{macrocode} +\newcommand*{\glstopicSubLoc}[2]{#2} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glstopicCols} +%\changes{1.40}{2019-03-22}{new} +% \begin{macrocode} +\newcommand*{\glstopicCols}{2} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glstopicColsEnv} +%\changes{1.40}{2019-03-22}{new} +% \begin{macrocode} +\newcommand*{\glstopicColsEnv}{multicols} +% \end{macrocode} +%\end{macro} +% +%\begin{style}{topicmcols} +%\changes{1.40}{2019-03-22}{new} +% \begin{macrocode} +\newglossarystyle{topicmcols}{% + \renewenvironment{theglossary}% + {% + \glstopicInit + \def\glstopic@prechildren{}% + \def\glstopic@postchildren{}% + \def\glstopic@prevlevel{-1}% + }% + {% + \ifnum\glstopic@prevlevel>0\relax\glstopic@postchildren\fi + \par + }% + \renewcommand*{\glossaryheader}{}% + \renewcommand*{\glsgroupheading}[1]{% + \ifnum\glstopic@prevlevel>0\relax\glstopic@postchildren\fi + \def\glstopic@prevlevel{-1}% + \glstopicGroupHeading{##1}% + }% +% \end{macrocode} +%\changes{1.49}{2022-10-14}{added \cs{glssubgroupheading}} +% Sub-groups are only supported with \cs{printunsrtglossary}. +% \begin{macrocode} + \renewcommand*{\glssubgroupheading}{\glstopicSubGroupHeading}% + \renewcommand{\glossentry}[2]{% + \ifnum\glstopic@prevlevel>0\relax\glstopic@postchildren\fi + \def\glstopic@prevlevel{0}% + \hangindent0pt\relax + \parindent\glstopicParIndent\relax + \glstopicItem{##1}{##2}% + \ifnum\glstopicCols>1\relax +% \end{macrocode} +%\changes{1.41}{2019-04-09}{added penalty if no description} +%If there isn't a description, penalise a page break. +% \begin{macrocode} + \ifglshasdesc{##1}% + {% + \edef\glstopic@prechildren{% + \noexpand\begin{\glstopicColsEnv}{\glstopicCols}% + }% + }% + {% + \edef\glstopic@prechildren{% + \noexpand\nopagebreak + \noexpand\begin{\glstopicColsEnv}{\glstopicCols}% + }% + }% + \edef\glstopic@postchildren{\noexpand\end{\glstopicColsEnv}}% + \fi + }% + \renewcommand{\subglossentry}[3]{% + \ifnum\glstopic@prevlevel=0\relax\glstopic@prechildren\fi + \def\glstopic@prevlevel{##1}% + \glstopicAssignSubIndent{##1}% + \glstopicSubItem{##1}{##2}{##3}% + }% + \renewcommand*{\glsgroupskip}{}% +} +% \end{macrocode} +%\end{style} +%\iffalse +% \begin{macrocode} +% +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} +%<*glossary-table.sty> +% \end{macrocode} +%\fi +%\section{table styles (\sty{glossary-table.sty})} +%\changes{1.49}{2022-10-14}{new} +%Intended for use with \app{bib2gls}. This is still experimental. +% \begin{macrocode} +\NeedsTeXFormat{LaTeX2e} +% \end{macrocode} +% Declare package: +% \begin{macrocode} +\ProvidesPackage{glossary-table}[2022/10/14 v1.49 (NLCT)] +% \end{macrocode} +%Load required packages. +% \begin{macrocode} +\RequirePackage{glossary-longbooktabs} +% \end{macrocode} +%\begin{macro}{\glstableblockperrowcount} +%\changes{1.49}{2022-10-14}{new} +%Number of blocks (entries) per row. +% \begin{macrocode} +\newcount\glstableblockperrowcount +\glstableblockperrowcount=2\relax +% \end{macrocode} +%\end{macro} +%Add a key to allow this value to be changed. +% \begin{macrocode} +\define@key{printglosstable}{blocks}{\glstableblockperrowcount=#1\relax} +% \end{macrocode} +% +%\begin{macro}{\glstablecurrentblockindex} +%Keep track of current block (entry) index. +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcount\glstablecurrentblockindex +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glstabletotalcols} +%\changes{1.49}{2022-10-14}{new} +%Total number of columns. This will be updated at the start of +%\cs{printunsrttable}, but is a user level command so that it can be +%used in any hooks. +% \begin{macrocode} +\newcount\glstabletotalcols +\glstabletotalcols=4\relax +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glstablenameheader} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand{\glstablenameheader}{\entryname} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glstabledescheader} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand{\glstabledescheader}{\descriptionname} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glstableotherheader} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand{\glstableotherheader}{\MFUsentencecase{\glstableotherfield}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glstablesymbolheader} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand{\glstablesymbolheader}{\symbolname} +% \end{macrocode} +%\end{macro} +% +%Provide boolean option to suppress header. +% \begin{macrocode} +\define@boolkey{printglosstable}{header}[true]{} +\KV@printglosstable@headertrue +% \end{macrocode} +% +%Provide boolean option to suppress rules. +% \begin{macrocode} +\define@boolkey{printglosstable}{rules}[true]{} +\KV@printglosstable@rulestrue +% \end{macrocode} +% +% \begin{macrocode} +\define@key{printglosstable}{blocksep}{\renewcommand{\glstable@blockalignsep}{#1}} +% \end{macrocode} +% +%\begin{macro}{\glstable@blockalignsep} +%\changes{1.49}{2022-10-14}{new} +%Alignment spec between blocks. +% \begin{macrocode} +\newcommand{\glstable@blockalignsep}{|} +% \end{macrocode} +%\end{macro} +% +%\begin{environment}{glstablesubentries} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newenvironment{glstablesubentries}{\begin{tabular}[t]{l}}{\end{tabular}} +% \end{macrocode} +%\end{environment} +% +%\begin{macro}{\glstablePreChildren} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand{\glstablePreChildren}{\glstableifpar{\par}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glstableblocksubentrysep} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand{\glstableblocksubentrysep}{\\} +% \end{macrocode} +%\end{macro} +% +%Provide boolean option to allow paragraph cells. +% \begin{macrocode} +\define@choicekey{printglosstable}{par} +[\@glstable@par@val\@glstable@par@n] +{false,justified,ragged} +{% + \ifcase\@glstable@par@n + \renewcommand{\glstable@parcase}[3]{##1}% + \or + \renewcommand{\glstable@parcase}[3]{##2}% + \or + \renewcommand{\glstable@parcase}[3]{##3}% + \fi +} +% \end{macrocode} +% +%\begin{macro}{\glstable@parcase} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand{\glstable@parcase}[3]{#1} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glstableifpar} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand{\glstableifpar}[1]{\glstable@parcase{}{#1}{#1}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glstableleftalign} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand{\glstableleftalign}[1]{% + \glstable@parcase{l}{p{#1}}{>{\protect\raggedright}p{#1}}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glstablerightalign} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand{\glstablerightalign}[1]{% + \glstable@parcase{r}{p{#1}}{>{\protect\raggedleft}p{#1}}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glstablecenteralign} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand{\glstablecenteralign}[1]{% + \glstable@parcase{c}{p{#1}}{>{\protect\centering}p{#1}}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glstablenamecolalign} +%\changes{1.49}{2022-10-14}{new} +%The alignment for the name column. +% \begin{macrocode} +\newcommand{\glstablenamecolalign}{\glstableleftalign{\glstablenamewidth}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glstabledesccolalign} +%\changes{1.49}{2022-10-14}{new} +%The alignment for the description column. +% \begin{macrocode} +\newcommand{\glstabledesccolalign}{\glstableleftalign{\glstabledescwidth}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glstablesymbolcolalign} +%\changes{1.49}{2022-10-14}{new} +%The alignment for the symbol column. +% \begin{macrocode} +\newcommand{\glstablesymbolcolalign}{\glstablecenteralign{\glstablesymbolwidth}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glstableNameTarget} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand{\glstableNameTarget}[1]{% + \glstarget{#1}{\glstableNameFmt{#1}}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glstableNameFmt} +%\changes{1.49}{2022-10-14}{new} +%Entry item needs to be included in measuring to ensure there's +%enough room for it as well. +% \begin{macrocode} +\newcommand{\glstableNameFmt}[1]{\glsentryitem{#1}\glossentryname{#1}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glstableSubNameTarget} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand{\glstableSubNameTarget}[1]{% + \glstarget{#1}{\glstableSubNameFmt{#1}}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glstableSubNameFmt} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand{\glstableSubNameFmt}[1]{% + \glssubentryitem{#1}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glstableotherfield} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand{\glstableotherfield}{} +% \end{macrocode} +%\end{macro} +% +%Add an extra key to allow this value to be changed. +% \begin{macrocode} +\define@key{printglosstable}{other}{\renewcommand{\glstableotherfield}{#1}} +% \end{macrocode} +% +%\begin{macro}{\glstableOther} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand{\glstableOther}[1]{% + \glsxtrusefield{#1}{\glstableotherfield}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glstableNameSingleFmt} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand{\glstableNameSingleFmt}[1]{% + \glstableNameTarget{#1}% + \ifglshasdesc{#1}% + {% + \glstableNameSinglePostName + \glstableNameSingleSuppl + {% + \ifglshassymbol{#1}% + {\glstableSymbolFmt{#1}\glstableNameSingleSymSep}% + {}% + \ifdefempty\glstableotherfield{}% + {% + \GlsXtrIfFieldUndef{\glstableotherfield}{#1}{}% + {\glstableOther{#1}\glstableOtherSep}% + }% + \glstableDescFmt{#1}% + }% + }% + {% + \ifglshassymbol{#1}% + {% + \glstableNameSinglePostName + \glstableNameSingleSuppl{\glstableSymbolFmt{#1}}% + \ifdefempty\glstableotherfield{}% + {% + \GlsXtrIfFieldUndef{\glstableotherfield}{#1}{}% + {\glstableNameSingleSymSep\glstableOther{#1}}% + }% + }% + {% + \ifdefempty\glstableotherfield{}% + {% + \glstableNameSinglePostName + \GlsXtrIfFieldUndef{\glstableotherfield}{#1}{}% + {\glstableOther{#1}}% + }% + }% + }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glstableNameSingleSuppl} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand{\glstableNameSingleSuppl}[1]{(#1)} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glstableNameSinglePostName} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand{\glstableNameSinglePostName}{ } +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glstableNameSingleSymSep} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand{\glstableNameSingleSymSep}{ } +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glstableOtherSep} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand{\glstableOtherSep}{, } +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glstableSubNameSingleFmt} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand{\glstableSubNameSingleFmt}[1]{% + \glstableSubNameTarget{#1}% + \GlsXtrIfFieldUndef{desc}{#1}{}% + {% + \GlsXtrIfFieldUndef{symbol}{#1}{}{}% + {% + \glstableNameSinglePostSubName + \glstableNameSingleSubSuppl{\glstableSubSymbolFmt{#1}}% + }% + }% + {% + \glstableNameSinglePostSubName + \glstableNameSingleSubSuppl + {% + \GlsXtrIfFieldUndef{symbol}{#1}{}% + {\glstableSubSymbolFmt{#1}\glstableNameSingleSymSep}% + \glstableSubDescFmt{#1}% + }% + }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glstableNameSingleSubSuppl} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand{\glstableNameSingleSubSuppl}[1]{#1} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glstableNameSinglePostSubName} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand{\glstableNameSinglePostSubName}{ } +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glstableNameNoDesc} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand{\glstableNameNoDesc}[1]{% + \glstableNameTarget{#1}% + \ifdefempty\glstableotherfield{}% + {% + \GlsXtrIfFieldUndef{\glstableotherfield}{#1}{}% + {\glstableOtherSep\glstableOther{#1}}% + }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glstableSubNameNoDesc} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand{\glstableSubNameNoDesc}[1]{% + \glstableSubNameTarget{#1}% + \ifdefempty\glstableotherfield{}% + {% + \GlsXtrIfFieldUndef{\glstableotherfield}{#1}{}% + {\glstableOtherSep\glstableOther{#1}}% + }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glstableSymbolFmt} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand{\glstableSymbolFmt}[1]{\glossentrysymbol{#1}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glstableSubSymbolFmt} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand{\glstableSubSymbolFmt}[1]{\glstableSymbolFmt{#1}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glstableSymbolNameTarget} +%\changes{1.49}{2022-10-14}{new} +%Where the symbol takes place of the name. +% \begin{macrocode} +\newcommand{\glstableSymbolNameTarget}[1]{% + \glstarget{#1}{\glstableSymbolNameFmt{#1}}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glstableSymbolNameFmt} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand{\glstableSymbolNameFmt}[1]{\glsentryitem{#1}\glossentrysymbol{#1}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glstableSubSymbolNameTarget} +%\changes{1.49}{2022-10-14}{new} +%Where the symbol takes place of the name. +% \begin{macrocode} +\newcommand{\glstableSubSymbolNameTarget}[1]{% + \glstarget{#1}{\glstableSubSymbolNameFmt{#1}}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glstableSubSymbolNameFmt} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand{\glstableSubSymbolNameFmt}[1]{\glssubentryitem{#1}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glstableDesc} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand{\glstableDesc}[1]{% + \ifdefempty\glstableotherfield{}% + {% + \GlsXtrIfFieldUndef{\glstableotherfield}{#1}{}% + {\glstableOther{#1}\ifglshasdesc{#1}{\glstableOtherSep}{}}% + }% + \glstableDescFmt{#1}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glstableDescFmt} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand{\glstableDescFmt}[1]{\glossentrydesc{#1}\glspostdescription} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glstableSubDesc} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand{\glstableSubDesc}[1]{\glstableDesc{#1}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glstableSubDescFmt} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand{\glstableSubDescFmt}[1]{\glstableDescFmt{#1}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glstableOtherNoDesc} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand{\glstableOtherNoDesc}[1]{% + \ifdefempty\glstableotherfield{}% + {% + \GlsXtrIfFieldUndef{\glstableotherfield}{#1}{}% + {\glstableOther{#1}}% + }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glstableSubOtherNoDesc} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand{\glstableSubOtherNoDesc}[1]{% + \glstableOtherNoDesc{#1}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glstableHeaderFmt} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand{\glstableHeaderFmt}[1]{\textbf{#1}} +% \end{macrocode} +%\end{macro} +% +% \begin{macrocode} +\define@key{printglosstable}{block-style} +{\glstablesetstyle{#1}} +% \end{macrocode} +% +%\begin{macro}{\glstablecolsperblock} +%\changes{1.49}{2022-10-14}{new} +%Number of columns per block (entry). +%Assigned by block style. +% \begin{macrocode} +\newcount\glstablecolsperblock +\glstablecolsperblock=2\relax +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glstableblockheader} +%\changes{1.49}{2022-10-14}{new} +%The column header, which may cover multiple columns. +%Redefined by block style. +% \begin{macrocode} +\newcommand{\glstableblockheader}{} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\glstableblockalign} +%\changes{1.49}{2022-10-14}{new} +%The column alignment. +%The default assumes two columns per entry (name and description) +%Redefined by the block style. +% \begin{macrocode} +\newcommand{\glstableblockalign}{} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glstableblockentry} +%\changes{1.49}{2022-10-14}{new} +%The entry item, which may cover multiple columns. +%Redefined by block style. +% \begin{macrocode} +\newcommand{\glstableblockentry}[1]{} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glstableblocksubentry} +%\changes{1.49}{2022-10-14}{new} +%The sub-entry is in the final column of the block (requires children to be saved) +%Redefined by block style. +% \begin{macrocode} +\newcommand{\glstableblocksubentry}[1]{} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glstableinitlengthupdates} +%\changes{1.49}{2022-10-14}{new} +%Block style command. +% \begin{macrocode} +\newcommand{\glstableinitlengthupdates}{} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glstablelengthupdate} +%\changes{1.49}{2022-10-14}{new} +%Block style command. +% \begin{macrocode} +\newcommand{\glstablelengthupdate}[1]{} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glstablefinishlengthupdates} +%\changes{1.49}{2022-10-14}{new} +%Block style command. +% \begin{macrocode} +\newcommand{\glstablefinishlengthupdates}{} +% \end{macrocode} +%\end{macro} +% +% +%\begin{macro}{\glstablesetstyle} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand{\glstablesetstyle}[1]{% + \ifcsdef{@glstable@style@#1}% + {\csuse{@glstable@style@#1}}% + {\PackageError{glossary-table}{Unknown style `#1'}{}}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glstablenewstyle} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand{\glstablenewstyle}[2]{% + \ifcsdef{@glstable@style@#1}% + {\PackageError{glossary-table}{style `#1' already defined}{}}% + {\csdef{@glstable@style@#1}{#2}}% +} +% \end{macrocode} +%\end{macro} +% +%Provide some common layouts. +% \begin{macrocode} +\glstablenewstyle{name-desc}{% +% \end{macrocode} +% 2 columns per block (name, description). +% \begin{macrocode} + \glstablecolsperblock=2\relax +% \end{macrocode} +% Initialise length registers (need to calculate max name +% width if par align). +% \begin{macrocode} + \renewcommand{\glstableinitlengthupdates}{% + \ifKV@printglosstable@header + \settowidth{\glstablenamewidth}% + {\glstableHeaderFmt\glstablenameheader}% + \else + \setlength{\glstablenamewidth}{0pt}% + \fi + \setlength{\glstabledescwidth}{0pt}% + }% +% \end{macrocode} +% Update width in unsrt hook. +% \begin{macrocode} + \renewcommand{\glstablelengthupdate}[1]{% + \glstablemeasureandupdate{\glstablenamewidth}{\glstableNameFmt{##1}}% + }% +% \end{macrocode} +% Finally set the description width to the remaining available. +% \begin{macrocode} + \renewcommand{\glstablefinishlengthupdates}{% + \setlength{\glstabledescwidth}{\dimexpr\glstableblockwidth + - \glstablenamewidth}% + \ifdim\glstabledescwidth<0pt\relax + \setlength{\glstablenamewidth}{\dimexpr0.5\glstableblockwidth}% + \setlength{\glstabledescwidth}{\glstablenamewidth}% + \fi + }% +% \end{macrocode} +% How to format the top-level entry in the block. +% \begin{macrocode} + \renewcommand{\glstableblockentry}[1]{% + \glstableNameTarget{##1} & \glstableDesc{##1}}% +% \end{macrocode} +% How to format the entry's children. +% \begin{macrocode} + \renewcommand{\glstableblocksubentry}[1]{% + \glstableSubNameTarget{##1} & \glstableSubDesc{##1}}% +% \end{macrocode} +% How to format the block's header row, if required. +% \begin{macrocode} + \renewcommand{\glstableblockheader}{% + \glstableHeaderFmt\glstablenameheader & + \glstableHeaderFmt\glstabledescheader}% +% \end{macrocode} +% Set the block's column alignments. +% \begin{macrocode} + \renewcommand{\glstableblockalign}{\glstablenamecolalign\glstabledesccolalign}% +} +% \end{macrocode} +%Set the default style. +% \begin{macrocode} +\glstablesetstyle{name-desc} +% \end{macrocode} +% +% \begin{macrocode} +\glstablenewstyle{name}{% +% \end{macrocode} +% 1 columns per block (name optionally with symbol and description). +% \begin{macrocode} + \glstablecolsperblock=1\relax +% \end{macrocode} +% Initialise length registers (no calculation required, column width +% same as block width). +% \begin{macrocode} + \renewcommand{\glstableinitlengthupdates}{}% +% \end{macrocode} +% No measuring required. +% \begin{macrocode} + \renewcommand{\glstablelengthupdate}[1]{}% +% \end{macrocode} +% Set the name width to the amount available. +% \begin{macrocode} + \renewcommand{\glstablefinishlengthupdates}{% + \setlength{\glstablenamewidth}{\glstableblockwidth}% + }% +% \end{macrocode} +% How to format the top-level entry in the block. +% \begin{macrocode} + \renewcommand{\glstableblockentry}[1]{% + \glstableNameSingleFmt{##1}}% +% \end{macrocode} +% How to format the entry's children. +% \begin{macrocode} + \renewcommand{\glstableblocksubentry}[1]{% + \glstableSubNameSingleFmt{##1}}% +% \end{macrocode} +% How to format the block's header row, if required. +% \begin{macrocode} + \renewcommand{\glstableblockheader}{% + \glstableHeaderFmt\glstablenameheader}% +% \end{macrocode} +% Set the block's column alignments. +% \begin{macrocode} + \renewcommand{\glstableblockalign}{\glstablenamecolalign}% +} +% \end{macrocode} +% +% \begin{macrocode} +\glstablenewstyle{name-symbol}{% +% \end{macrocode} +% 2 columns per block (name and symbol). +% \begin{macrocode} + \glstablecolsperblock=2\relax +% \end{macrocode} +% Initialise length registers (need to calculate max symbol +% width if par align). This assumes the symbol requires the minimal +% width and any leftover can be assigned to the name. +% \begin{macrocode} + \renewcommand{\glstableinitlengthupdates}{% + \ifKV@printglosstable@header + \settowidth{\glstablesymbolwidth}% + {\glstableHeaderFmt\glstablesymbolheader}% + \else + \setlength{\glstablesymbolwidth}{0pt}% + \fi + \setlength{\glstablenamewidth}{0pt}% + }% +% \end{macrocode} +% Update widths in unsrt hook. +% \begin{macrocode} + \renewcommand{\glstablelengthupdate}[1]{% + \glstablemeasureandupdate{\glstablesymbolwidth}{\glstableSymbolFmt{##1}}% + }% +% \end{macrocode} +% Finally set the name width to the remaining available. +% \begin{macrocode} + \renewcommand{\glstablefinishlengthupdates}{% + \setlength{\glstablenamewidth}{\dimexpr\glstableblockwidth + - \glstablesymbolwidth}% + \ifdim\glstablenamewidth<0pt\relax + \setlength{\glstablenamewidth}{\dimexpr0.5\glstableblockwidth}% + \setlength{\glstablesymbolwidth}{\glstablenamewidth}% + \fi + }% +% \end{macrocode} +% How to format the top-level entry in the block. +% \begin{macrocode} + \renewcommand{\glstableblockentry}[1]{% + \glstableNameNoDesc{##1} & \glstableSymbolFmt{##1}}% +% \end{macrocode} +% How to format the entry's children. +% \begin{macrocode} + \renewcommand{\glstableblocksubentry}[1]{% + \glstableSubNameNoDesc{##1} & \glstableSubSymbolFmt{##1}}% +% \end{macrocode} +% How to format the block's header row, if required. +% \begin{macrocode} + \renewcommand{\glstableblockheader}{% + \glstableHeaderFmt\glstablenameheader & + \glstableHeaderFmt\glstablesymbolheader}% +% \end{macrocode} +% Set the block's column alignments. +% \begin{macrocode} + \renewcommand{\glstableblockalign}{\glstablenamecolalign\glstablesymbolcolalign}% +} +% \end{macrocode} +% +% \begin{macrocode} +\glstablenewstyle{desc-name}{% +% \end{macrocode} +% 2 columns per block (description, name). +% \begin{macrocode} + \glstablecolsperblock=2\relax +% \end{macrocode} +% Initialise length registers (need to calculate max name +% width if par align). +% \begin{macrocode} + \renewcommand{\glstableinitlengthupdates}{% + \ifKV@printglosstable@header + \settowidth{\glstablenamewidth}% + {\glstableHeaderFmt\glstablenameheader}% + \else + \setlength{\glstablenamewidth}{0pt}% + \fi + \setlength{\glstabledescwidth}{0pt}% + }% +% \end{macrocode} +% Update width in unsrt hook. +% \begin{macrocode} + \renewcommand{\glstablelengthupdate}[1]{% + \glstablemeasureandupdate{\glstablenamewidth}{\glstableNameFmt{##1}}% + }% +% \end{macrocode} +% Finally set the description width to the remaining available. +% \begin{macrocode} + \renewcommand{\glstablefinishlengthupdates}{% + \setlength{\glstabledescwidth}{\dimexpr\glstableblockwidth + - \glstablenamewidth}% + \ifdim\glstabledescwidth<0pt\relax + \setlength{\glstablenamewidth}{\dimexpr0.5\glstableblockwidth}% + \setlength{\glstabledescwidth}{\glstablenamewidth}% + \fi + }% +% \end{macrocode} +% How to format the top-level entry in the block. +% \begin{macrocode} + \renewcommand{\glstableblockentry}[1]{% + \glstableDesc{##1} & + \glstableNameTarget{##1}% + }% +% \end{macrocode} +% How to format the entry's children. +% \begin{macrocode} + \renewcommand{\glstableblocksubentry}[1]{% + \glstableSubDesc{##1} & + \glstableSubNameTarget{##1}% + }% +% \end{macrocode} +% How to format the block's header row, if required. +% \begin{macrocode} + \renewcommand{\glstableblockheader}{% + \glstableHeaderFmt\glstabledescheader & + \glstableHeaderFmt\glstablenameheader + }% +% \end{macrocode} +% Set the block's column alignments. +% \begin{macrocode} + \renewcommand{\glstableblockalign}{\glstabledesccolalign\glstablenamecolalign}% +} +% \end{macrocode} +% +% \begin{macrocode} +\glstablenewstyle{symbol-name}{% +% \end{macrocode} +% 2 columns per block (symbol, name). +% \begin{macrocode} + \glstablecolsperblock=2\relax +% \end{macrocode} +% Initialise length registers (need to calculate max symbol +% width if par align). +% \begin{macrocode} + \renewcommand{\glstableinitlengthupdates}{% + \ifKV@printglosstable@header + \settowidth{\glstablesymbolwidth}% + {\glstableHeaderFmt\glstablesymbolheader}% + \else + \setlength{\glstablesymbolwidth}{0pt}% + \fi + \setlength{\glstablenamewidth}{0pt}% + }% +% \end{macrocode} +% Update widths in unsrt hook. +% \begin{macrocode} + \renewcommand{\glstablelengthupdate}[1]{% + \glstablemeasureandupdate{\glstablesymbolwidth}{\glstableSymbolFmt{##1}}% + }% +% \end{macrocode} +% Finally set the name width to the remaining available. +% \begin{macrocode} + \renewcommand{\glstablefinishlengthupdates}{% + \setlength{\glstablenamewidth}{\dimexpr\glstableblockwidth + - \glstablesymbolwidth}% + \ifdim\glstablenamewidth<0pt\relax + \setlength{\glstablenamewidth}{\dimexpr0.5\glstableblockwidth}% + \setlength{\glstablesymbolwidth}{\glstablenamewidth}% + \fi + }% +% \end{macrocode} +% How to format the top-level entry in the block. +% \begin{macrocode} + \renewcommand{\glstableblockentry}[1]{% + \glstableSymbolFmt{##1} & + \glstableNameNoDesc{##1}% + }% +% \end{macrocode} +% How to format the entry's children. +% \begin{macrocode} + \renewcommand{\glstableblocksubentry}[1]{% + \glstableSubSymbolFmt{##1} & + \glstableSubNameNoDesc{##1}% + }% +% \end{macrocode} +% How to format the block's header row, if required. +% \begin{macrocode} + \renewcommand{\glstableblockheader}{% + \glstableHeaderFmt\glstablesymbolheader & + \glstableHeaderFmt\glstablenameheader + }% +% \end{macrocode} +% Set the block's column alignments. +% \begin{macrocode} + \renewcommand{\glstableblockalign}{\glstablesymbolcolalign\glstablenamecolalign}% +} +% \end{macrocode} +% +% \begin{macrocode} +\glstablenewstyle{name-symbol-desc}{% +% \end{macrocode} +% 3 columns per block (name, symbol, description). +% \begin{macrocode} + \glstablecolsperblock=3\relax +% \end{macrocode} +% Initialise length registers (need to calculate max name and symbol +% widths if par align). +% \begin{macrocode} + \renewcommand{\glstableinitlengthupdates}{% + \ifKV@printglosstable@header + \settowidth{\glstablenamewidth}% + {\glstableHeaderFmt\glstablenameheader}% + \settowidth{\glstablesymbolwidth}% + {\glstableHeaderFmt\glstablesymbolheader}% + \else + \setlength{\glstablenamewidth}{0pt}% + \setlength{\glstablesymbolwidth}{0pt}% + \fi + \setlength{\glstabledescwidth}{0pt}% + }% +% \end{macrocode} +% Update widths in unsrt hook. +% \begin{macrocode} + \renewcommand{\glstablelengthupdate}[1]{% + \glstablemeasureandupdate{\glstablenamewidth}{\glstableNameFmt{##1}}% + \glstablemeasureandupdate{\glstablesymbolwidth}{\glstableSymbolFmt{##1}}% + }% +% \end{macrocode} +% Finally set the description width to the remaining available. +% \begin{macrocode} + \renewcommand{\glstablefinishlengthupdates}{% + \setlength{\glstabledescwidth}{\dimexpr\glstableblockwidth + - \glstablesymbolwidth - \glstablenamewidth}% + \ifdim\glstabledescwidth<0pt\relax + \setlength{\glstablenamewidth}{\dimexpr0.5\glstableblockwidth + - 0.5\glstablesymbolwidth}% + \setlength{\glstabledescwidth}{\glstablenamewidth}% + \fi + }% +% \end{macrocode} +% How to format the top-level entry in the block. +% \begin{macrocode} + \renewcommand{\glstableblockentry}[1]{% + \glstableNameTarget{##1} & + \glstableSymbolFmt{##1} & + \glstableDesc{##1}}% +% \end{macrocode} +% How to format the entry's children. +% \begin{macrocode} + \renewcommand{\glstableblocksubentry}[1]{% + \glstableSubNameTarget{##1} & + \glstableSubSymbolFmt{##1} & + \glstableSubDesc{##1}}% +% \end{macrocode} +% How to format the block's header row, if required. +% \begin{macrocode} + \renewcommand{\glstableblockheader}{% + \glstableHeaderFmt\glstablenameheader & + \glstableHeaderFmt\glstablesymbolheader & + \glstableHeaderFmt\glstabledescheader}% +% \end{macrocode} +% Set the block's column alignments. +% \begin{macrocode} + \renewcommand{\glstableblockalign}{% + \glstablenamecolalign\glstablesymbolcolalign\glstabledesccolalign}% +} +% \end{macrocode} +% +% \begin{macrocode} +\glstablenewstyle{name-desc-symbol}{% +% \end{macrocode} +% 3 columns per block (name, description, symbol). +% \begin{macrocode} + \glstablecolsperblock=3\relax +% \end{macrocode} +% Initialise length registers (need to calculate max name and symbol +% widths if par align). +% \begin{macrocode} + \renewcommand{\glstableinitlengthupdates}{% + \ifKV@printglosstable@header + \settowidth{\glstablenamewidth}% + {\glstableHeaderFmt\glstablenameheader}% + \settowidth{\glstablesymbolwidth}% + {\glstableHeaderFmt\glstablesymbolheader}% + \else + \setlength{\glstablenamewidth}{0pt}% + \setlength{\glstablesymbolwidth}{0pt}% + \fi + \setlength{\glstabledescwidth}{0pt}% + }% +% \end{macrocode} +% Update widths in unsrt hook. +% \begin{macrocode} + \renewcommand{\glstablelengthupdate}[1]{% + \glstablemeasureandupdate{\glstablenamewidth}{\glstableNameFmt{##1}}% + \glstablemeasureandupdate{\glstablesymbolwidth}{\glstableSymbolFmt{##1}}% + }% +% \end{macrocode} +% Finally set the description width to the remaining available. +% \begin{macrocode} + \renewcommand{\glstablefinishlengthupdates}{% + \setlength{\glstabledescwidth}{\dimexpr\glstableblockwidth + - \glstablesymbolwidth - \glstablenamewidth}% + \ifdim\glstabledescwidth<0pt\relax + \setlength{\glstablenamewidth}{\dimexpr0.5\glstableblockwidth + - 0.5\glstablesymbolwidth}% + \setlength{\glstabledescwidth}{\glstablenamewidth}% + \fi + }% +% \end{macrocode} +% How to format the top-level entry in the block. +% \begin{macrocode} + \renewcommand{\glstableblockentry}[1]{% + \glstableNameTarget{##1} & + \glstableDesc{##1} & + \glstableSymbolFmt{##1}% + }% +% \end{macrocode} +% How to format the entry's children. +% \begin{macrocode} + \renewcommand{\glstableblocksubentry}[1]{% + \glstableSubNameTarget{##1} & + \glstableSubDesc{##1} & + \glstableSubSymbolFmt{##1}% + }% +% \end{macrocode} +% How to format the block's header row, if required. +% \begin{macrocode} + \renewcommand{\glstableblockheader}{% + \glstableHeaderFmt\glstablenameheader & + \glstableHeaderFmt\glstabledescheader & + \glstableHeaderFmt\glstablesymbolheader + }% +% \end{macrocode} +% Set the block's column alignments. +% \begin{macrocode} + \renewcommand{\glstableblockalign}{% + \glstablenamecolalign\glstabledesccolalign\glstablesymbolcolalign}% +} +% \end{macrocode} +% +%As name-desc but the other field is put in the description column. +% \begin{macrocode} +\glstablenewstyle{name-other}{% +% \end{macrocode} +% 2 columns per block (name, other). +% \begin{macrocode} + \glstablecolsperblock=2\relax +% \end{macrocode} +% Initialise length registers (need to calculate max name +% width if par align). +% \begin{macrocode} + \renewcommand{\glstableinitlengthupdates}{% + \ifKV@printglosstable@header + \settowidth{\glstablenamewidth}% + {\glstableHeaderFmt\glstablenameheader}% + \else + \setlength{\glstablenamewidth}{0pt}% + \fi + \setlength{\glstabledescwidth}{0pt}% + }% +% \end{macrocode} +% Update width in unsrt hook. +% \begin{macrocode} + \renewcommand{\glstablelengthupdate}[1]{% + \glstablemeasureandupdate{\glstablenamewidth}{\glstableNameFmt{##1}}% + }% +% \end{macrocode} +% Finally set the description width to the remaining available. +% \begin{macrocode} + \renewcommand{\glstablefinishlengthupdates}{% + \setlength{\glstabledescwidth}{\dimexpr\glstableblockwidth + - \glstablenamewidth}% + \ifdim\glstabledescwidth<0pt\relax + \setlength{\glstablenamewidth}{\dimexpr0.5\glstableblockwidth}% + \setlength{\glstabledescwidth}{\glstablenamewidth}% + \fi + }% +% \end{macrocode} +% How to format the top-level entry in the block. +% \begin{macrocode} + \renewcommand{\glstableblockentry}[1]{% + \glstableNameTarget{##1} & \glstableOtherNoDesc{##1}}% +% \end{macrocode} +% How to format the entry's children. +% \begin{macrocode} + \renewcommand{\glstableblocksubentry}[1]{% + \glstableSubNameTarget{##1} & \glstableSubOtherNoDesc{##1}}% +% \end{macrocode} +% How to format the block's header row, if required. +% \begin{macrocode} + \renewcommand{\glstableblockheader}{% + \glstableHeaderFmt\glstablenameheader & + \glstableHeaderFmt\glstableotherheader}% +% \end{macrocode} +% Set the block's column alignments. +% \begin{macrocode} + \renewcommand{\glstableblockalign}{\glstablenamecolalign\glstabledesccolalign}% +} +% \end{macrocode} +% +% \begin{macrocode} +\glstablenewstyle{other-name}{% +% \end{macrocode} +% 2 columns per block (other, name). +% \begin{macrocode} + \glstablecolsperblock=2\relax +% \end{macrocode} +% Initialise length registers (need to calculate max name +% width if par align). +% \begin{macrocode} + \renewcommand{\glstableinitlengthupdates}{% + \ifKV@printglosstable@header + \settowidth{\glstablenamewidth}% + {\glstableHeaderFmt\glstablenameheader}% + \else + \setlength{\glstablenamewidth}{0pt}% + \fi + \setlength{\glstabledescwidth}{0pt}% + }% +% \end{macrocode} +% Update width in unsrt hook. +% \begin{macrocode} + \renewcommand{\glstablelengthupdate}[1]{% + \glstablemeasureandupdate{\glstablenamewidth}{\glstableNameFmt{##1}}% + }% +% \end{macrocode} +% Finally set the description width to the remaining available. +% \begin{macrocode} + \renewcommand{\glstablefinishlengthupdates}{% + \setlength{\glstabledescwidth}{\dimexpr\glstableblockwidth + - \glstablenamewidth}% + \ifdim\glstabledescwidth<0pt\relax + \setlength{\glstablenamewidth}{\dimexpr0.5\glstableblockwidth}% + \setlength{\glstabledescwidth}{\glstablenamewidth}% + \fi + }% +% \end{macrocode} +% How to format the top-level entry in the block. +% \begin{macrocode} + \renewcommand{\glstableblockentry}[1]{% + \glstableOtherNoDesc{##1} & + \glstableNameTarget{##1}}% +% \end{macrocode} +% How to format the entry's children. +% \begin{macrocode} + \renewcommand{\glstableblocksubentry}[1]{% + \glstableSubOtherNoDesc{##1} & + \glstableSubNameTarget{##1}}% +% \end{macrocode} +% How to format the block's header row, if required. +% \begin{macrocode} + \renewcommand{\glstableblockheader}{% + \glstableHeaderFmt\glstableotherheader & + \glstableHeaderFmt\glstablenameheader}% +% \end{macrocode} +% Set the block's column alignments. +% \begin{macrocode} + \renewcommand{\glstableblockalign}{\glstabledesccolalign\glstablenamecolalign}% +} +% \end{macrocode} +% +%As name-other but the use the symbol in place of the name. +% \begin{macrocode} +\glstablenewstyle{symbol-other}{% +% \end{macrocode} +% 2 columns per block (symbol, other). +% \begin{macrocode} + \glstablecolsperblock=2\relax +% \end{macrocode} +% Initialise length registers (need to calculate max symbol +% width if par align). +% \begin{macrocode} + \renewcommand{\glstableinitlengthupdates}{% + \ifKV@printglosstable@header + \settowidth{\glstablesymbolwidth}% + {\glstableHeaderFmt\glstablesymbolheader}% + \else + \setlength{\glstablesymbolwidth}{0pt}% + \fi + \setlength{\glstabledescwidth}{0pt}% + }% +% \end{macrocode} +% Update width in unsrt hook. +% \begin{macrocode} + \renewcommand{\glstablelengthupdate}[1]{% + \glstablemeasureandupdate{\glstablesymbolwidth}{\glstableSymbolNameFmt{##1}}% + }% +% \end{macrocode} +% Finally set the description width to the remaining available. +% \begin{macrocode} + \renewcommand{\glstablefinishlengthupdates}{% + \setlength{\glstabledescwidth}{\dimexpr\glstableblockwidth + - \glstablesymbolwidth}% + \ifdim\glstabledescwidth<0pt\relax + \setlength{\glstablesymbolwidth}{\dimexpr0.5\glstableblockwidth}% + \setlength{\glstabledescwidth}{\glstablesymbolwidth}% + \fi + }% +% \end{macrocode} +% How to format the top-level entry in the block. +% \begin{macrocode} + \renewcommand{\glstableblockentry}[1]{% + \glstableSymbolNameTarget{##1} & \glstableOtherNoDesc{##1}}% +% \end{macrocode} +% How to format the entry's children. +% \begin{macrocode} + \renewcommand{\glstableblocksubentry}[1]{% + \glstableSubSymbolNameTarget{##1} & \glstableSubOtherNoDesc{##1}}% +% \end{macrocode} +% How to format the block's header row, if required. +% \begin{macrocode} + \renewcommand{\glstableblockheader}{% + \glstableHeaderFmt\glstablesymbolheader & + \glstableHeaderFmt\glstableotherheader}% +% \end{macrocode} +% Set the block's column alignments. +% \begin{macrocode} + \renewcommand{\glstableblockalign}{\glstablesymbolcolalign\glstabledesccolalign}% +} +% \end{macrocode} +% +% \begin{macrocode} +\glstablenewstyle{other-symbol}{% +% \end{macrocode} +% 2 columns per block (other-symbol). +% \begin{macrocode} + \glstablecolsperblock=2\relax +% \end{macrocode} +% Initialise length registers (need to calculate max symbol +% width if par align). +% \begin{macrocode} + \renewcommand{\glstableinitlengthupdates}{% + \ifKV@printglosstable@header + \settowidth{\glstablesymbolwidth}% + {\glstableHeaderFmt\glstablesymbolheader}% + \else + \setlength{\glstablesymbolwidth}{0pt}% + \fi + \setlength{\glstabledescwidth}{0pt}% + }% +% \end{macrocode} +% Update width in unsrt hook. +% \begin{macrocode} + \renewcommand{\glstablelengthupdate}[1]{% + \glstablemeasureandupdate{\glstablesymbolwidth}{\glstableSymbolNameFmt{##1}}% + }% +% \end{macrocode} +% Finally set the description width to the remaining available. +% \begin{macrocode} + \renewcommand{\glstablefinishlengthupdates}{% + \setlength{\glstabledescwidth}{\dimexpr\glstableblockwidth + - \glstablesymbolwidth}% + \ifdim\glstabledescwidth<0pt\relax + \setlength{\glstablesymbolwidth}{\dimexpr0.5\glstableblockwidth}% + \setlength{\glstabledescwidth}{\glstablesymbolwidth}% + \fi + }% +% \end{macrocode} +% How to format the top-level entry in the block. +% \begin{macrocode} + \renewcommand{\glstableblockentry}[1]{% + \glstableOtherNoDesc{##1} & \glstableSymbolNameTarget{##1}}% +% \end{macrocode} +% How to format the entry's children. +% \begin{macrocode} + \renewcommand{\glstableblocksubentry}[1]{% + \glstableSubOtherNoDesc{##1} & + \glstableSubSymbolNameTarget{##1}}% +% \end{macrocode} +% How to format the block's header row, if required. +% \begin{macrocode} + \renewcommand{\glstableblockheader}{% + \glstableHeaderFmt\glstableotherheader & + \glstableHeaderFmt\glstablesymbolheader}% +% \end{macrocode} +% Set the block's column alignments. +% \begin{macrocode} + \renewcommand{\glstableblockalign}{\glstabledesccolalign\glstablesymbolcolalign}% +} +% \end{macrocode} +% +% +%\begin{macro}{\glstablecaption} +%\changes{1.49}{2022-10-14}{new} +%\begin{definition} +%\cs{glstablecaption}\marg{toc title}\marg{title}\marg{label} +%\end{definition} +% \begin{macrocode} +\newcommand{\glstablecaption}[3]{% + \caption[#1]{#3#2}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glstablepostnextcaption} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand{\glstablepostnextcaption}{ Cont./} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glstablenextcaption} +%\changes{1.49}{2022-10-14}{new} +%\begin{definition} +%\cs{glstablenextcaption}\marg{toc title}\marg{title} +%\end{definition} +% \begin{macrocode} +\newcommand{\glstablenextcaption}[2]{% + \caption[]{#1\glstablepostnextcaption}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glstablefoot} +%\changes{1.49}{2022-10-14}{new} +%\begin{definition} +%\cs{glstablefoot}\marg{postamble} +%\end{definition} +% \begin{macrocode} +\newcommand{\glstablefoot}[1]{} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glstablelastfoot} +%\changes{1.49}{2022-10-14}{new} +%\begin{definition} +%\cs{glstablelastfoot}\marg{postamble} +%\end{definition} +% \begin{macrocode} +\newcommand{\glstablelastfoot}[1]{\glstablerowspan{#1}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glstablehead} +%\changes{1.49}{2022-10-14}{new} +%\begin{definition} +%\cs{glstablehead}\marg{preamble} +%\end{definition} +% \begin{macrocode} +\newcommand{\glstablehead}[1]{} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glstablefirsthead} +%\changes{1.49}{2022-10-14}{new} +%\begin{definition} +%\cs{glstablefirsthead}\marg{preamble} +%\end{definition} +% \begin{macrocode} +\newcommand{\glstablefirsthead}[1]{\glstablerowspan{#1}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glstablerowspan} +%\changes{1.49}{2022-10-14}{new} +%\begin{definition} +%\cs{glstablerowspan}\marg{text} +%\end{definition} +% \begin{macrocode} +\newcommand{\glstablerowspan}[1]{% + \multicolumn{\glstabletotalcols}{c}{\parbox{\LTcapwidth}{#1}}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glstable@begin} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand{\glstable@begin}{% + \PackageError{glossary-table}{table style can only be used with + \string\printunsrttable}{}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glstable@filter} +%\changes{1.49}{2022-10-14}{new} +%Filter all child entries, but take level offset into account and +%apply custom handler. +% \begin{macrocode} +\newcommand{\glstable@filter}[1]{% + \ifnum\glscurrententrylevel>0\relax + \printunsrtglossaryskipentry + \else + \glstableiffilter{#1}% + {\printunsrtglossaryskipentry}% + {% + \glstableifpar{\glstablelengthupdate{#1}}% + }% + \fi +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glstableiffilter} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand{\glstableiffilter}[3]{#3} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glstablenamewidth} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newlength\glstablenamewidth +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glstableblockwidth} +%\changes{1.49}{2022-10-14}{new} +%Maximum width available for each block. +% \begin{macrocode} +\newlength\glstableblockwidth +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glstabledescwidth} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newlength\glstabledescwidth +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glstablesymbolwidth} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newlength\glstablesymbolwidth +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glstableifmeasuring} +%\changes{1.49}{2022-10-14}{new} +%\begin{definition} +%\cs{glstableifmeasuring}\marg{true}\marg{false} +%\end{definition} +% \begin{macrocode} +\newcommand{\glstableifmeasuring}[2]{#2} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glstable@stepentry} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand{\glstable@stepentry}[1]{% + \ifglsentrycounter + \stepcounter{glossaryentry}% + \fi +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glstable@stepsubentry} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand{\glstable@stepsubentry}[1]{% + \ifglssubentrycounter + \stepcounter{glossarysubentry}% + \fi +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glstablemeasureandupdate} +%\changes{1.49}{2022-10-14}{new} +%\begin{definition} +%\cs{glstablemeasureandupdate}\marg{len reg}\marg{text} +%\end{definition} +% \begin{macrocode} +\newcommand{\glstablemeasureandupdate}[2]{% + \let\glstableifmeasuring\@firstoftwo +% \end{macrocode} +%Disable unset and indexing +% \begin{macrocode} + \let\@glsunset\@glsxtrbuffer@unset + \let\@gls@org@noindex\ifKV@glslink@noindex + \KV@glslink@noindextrue +% \end{macrocode} +%Disable targets and links +% \begin{macrocode} + \let\@glstable@org@target\glstarget + \let\glstarget\@secondoftwo + \let\@glstable@org@link\@glslink + \let\@glslink\@secondoftwo +% \end{macrocode} +%Disable ref step and label +% \begin{macrocode} + \let\glstable@org@stepentry\glsstepentry + \let\glsstepentry\glstable@stepentry + \let\glstable@org@stepsubentry\glsstepsubentry + \let\glsstepsubentry\glstable@stepsubentry +% \end{macrocode} +%Measure. +% \begin{macrocode} + \settowidth{\dimen@}{#2}% +% \end{macrocode} +%Update if wider. +% \begin{macrocode} + \ifdim\dimen@>#1\relax + \setlength{#1}{\dimen@}% + \fi +% \end{macrocode} +%Restore +% \begin{macrocode} + \let\ifKV@glslink@noindex\@gls@org@noindex + \let\@glsunset\@glsxtr@unset + \let\glstarget\@glstable@org@target + \let\@glslink\@glstable@org@link + \let\glsstepentry\glstable@org@stepentry + \let\glsstepsubentry\glstable@org@stepsubentry + \let\glstableifmeasuring\@secondoftwo +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glstable@ifhaspreamble} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand{\glstable@ifhaspreamble}[2]{% + \ifdefempty\glossarypreamble + {#2}% + {% + \ifx\@glstable@defaultpreamble\glossarypreamble + \ifcsvoid{@glossarypreamble@\currentglossary}{#2}{#1}% + \else + #1% + \fi + }% +} +% \end{macrocode} +%\end{macro} +% +%Need the type, preamble and postamble. +% \begin{macrocode} +\define@key{printglosstable}{type}{\renewcommand{\@glo@type}{#1}} +\define@key{printglosstable}{preamble}{\renewcommand{\glossarypreamble}{#1}} +\define@key{printglosstable}{postamble}{\renewcommand{\glossarypostamble}{#1}} +% \end{macrocode} +% +%Allow localised initialisation. +%\begin{macro}{\glstable@init} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand\glstable@init{} +% \end{macrocode} +%\end{macro} +% \begin{macrocode} +\define@key{printglosstable}{init}{\renewcommand{\glstable@init}{#1}} +% \end{macrocode} +% +%The default setting is groups=false, unlike the usual default for +%\cs{printunsrtglossary}. Support for groups isn't fully +%implemented. +% \begin{macrocode} +\define@choicekey{printglosstable}{groups} +[\@glstable@groups@val\@glstable@groups@n] +{false,true}[true]% +{% + \ifnum\@glstable@groups@n=0\relax + \let\glstable@groupheading\@gobble + \glsxtr@printgloss@groupsfalse + \else + \let\glstable@groupheading\glstablegroupheading + \glsxtr@printgloss@groupstrue + \fi +} +% \end{macrocode} +% +%\begin{macro}{\glstable@groupheading} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand{\glstable@groupheading}[1]{} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glstablegroupheading} +%\changes{1.49}{2022-10-14}{new} +%This isn't quite working as it puts a spurious line above if it +%occurs at the start of a new row. +% \begin{macrocode} +\newcommand{\glstablegroupheading}[1]{% + \glstablefinishrow + \multicolumn{\glstabletotalcols}{c}{% + \glsxtrgetgrouptitle{#1}{\glsxtrcurrentgrptitle}% + \glstableGroupHeaderFmt\glsxtrcurrentgrptitle + }% + \\*% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@glstable@defaultpreamble} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\let\@glstable@defaultpreamble\glossarypreamble +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glstableGroupHeaderFmt} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand{\glstableGroupHeaderFmt}{\glstableHeaderFmt} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\printunsrttable} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newrobustcmd*{\printunsrttable}[1][]{% + \bgroup +% \end{macrocode} +%Initialise glossary type. +% \begin{macrocode} + \def\@glo@type{\glsdefaulttype}% +% \end{macrocode} +%Initialise title. +% \begin{macrocode} + \def\glossarytitle{% + \ifcsdef{@glotype@\@glo@type @title}% + {\csuse{@glotype@\@glo@type @title}}% + {\glossaryname}% + }% + \def\glossarytoctitle{\glossarytitle}% +% \end{macrocode} +%Initialise preamble. +% \begin{macrocode} + \let\glossarypreamble\@glstable@defaultpreamble +% \end{macrocode} +%Set table keys. +% \begin{macrocode} + \setkeys*{printglosstable}{#1}% + \let\currentglossary\@glo@type + \protected@edef\glstable@opts{type=\@glo@type,style=table}% + \ifdefempty\XKV@rm{}{\epreto\glstable@opts{\expandonce\XKV@rm,}}% +% \end{macrocode} +%Calculate the total number of columns. +% \begin{macrocode} + \glstabletotalcols=\numexpr\glstablecolsperblock*\glstableblockperrowcount\relax +% \end{macrocode} +%If the widest name is non-void, calculate the remaining width +%available for the blocks. +% \begin{macrocode} + \glstableifpar + {% + \glstableblockwidth=\dimexpr\linewidth/\glstableblockperrowcount + -\glstablecolsperblock\tabcolsep\relax + \glstableinitlengthupdates + }% +% \end{macrocode} +%If no vertical line required between blocks, \cs{glstablefinishrow} +%can simply do a new line. +% \begin{macrocode} + \ifdefempty\glstable@blockalignsep{\def\glstable@finishrow{}}{}% +% \end{macrocode} +%Build the header row. +% \begin{macrocode} + \def\glstable@alignment{}% + \ifKV@printglosstable@rules + \def\glstable@header{\toprule}% + \else + \def\glstable@header{}% + \fi + \global\glstablecurrentblockindex=0\relax + \loop +% \end{macrocode} +%Add to alignment spec. +% \begin{macrocode} + \ifnum\glstablecurrentblockindex>0\relax + \protected@eappto\glstable@alignment{\glstable@blockalignsep}% + \fi + \protected@eappto\glstable@alignment{\glstableblockalign}% + \ifKV@printglosstable@header +% \end{macrocode} +%Add to header. +% \begin{macrocode} + \ifnum\glstablecurrentblockindex>0\relax + \appto\glstable@header{&}% + \fi + \eappto\glstable@header{\expandonce\glstableblockheader}% + \fi +% \end{macrocode} +%Increment loop counter +% \begin{macrocode} + \advance\glstablecurrentblockindex by 1\relax + \ifnum\glstablecurrentblockindex<\glstableblockperrowcount + \repeat + \ifKV@printglosstable@header +% \end{macrocode} +%Append cr to header. +% \begin{macrocode} + \appto\glstable@header{\tabularnewline}% + \ifKV@printglosstable@rules + \appto\glstable@header{\midrule}% + \fi + \fi + \protected@edef\glstable@begin{% + \noexpand\begin{longtable}{\expandonce\glstable@alignment}% + \noexpand\glstablecaption + {\noexpand\glossarytoctitle}{\noexpand\glossarytitle}% + {\noexpand\@@glossaryseclabel}% + \noexpand\tabularnewline + }% +% \end{macrocode} +%Add preamble if set. +% \begin{macrocode} + \glstable@ifhaspreamble + {% + \eappto\glstable@begin{\noexpand\glstablefirsthead + {\expandonce\glossarypreamble}% + \noexpand\tabularnewline + \expandonce\glstable@header + \noexpand\endfirsthead + \noexpand\glstablenextcaption + {\noexpand\glossarytoctitle}{\noexpand\glossarytitle}% + {\expandonce\glossarypreamble}% + }% + }% + {% + \eappto\glstable@begin{% + \expandonce\glstable@header + \noexpand\endfirsthead + \noexpand\glstablenextcaption + {\noexpand\glossarytoctitle}{\noexpand\glossarytitle}% + }% + }% + \eappto\glstable@begin{% + \noexpand\tabularnewline + \expandonce\glstable@header + \noexpand\endhead + }% +% \end{macrocode} +%Add postamble if set. +% \begin{macrocode} + \ifdefvoid\glossarypostamble + {% +% \end{macrocode} +%Just add rule, if required. +% \begin{macrocode} + \ifKV@printglosstable@rules + \appto\glstable@begin{\bottomrule\endfoot}% + \fi + } + {% + \ifKV@printglosstable@rules + \eappto\glstable@begin{% + \noexpand\bottomrule + \noexpand\glstablefoot{\expandonce\glossarypostamble}% + \noexpand\tabularnewline + \noexpand\endfoot + \noexpand\bottomrule + \noexpand\glstablelastfoot{\expandonce\glossarypostamble}% + \noexpand\tabularnewline + \noexpand\endlastfoot + }% + \else + \eappto\glstable@begin{% + \noexpand\glstablefoot{\expandonce\glossarypostamble}% + \noexpand\tabularnewline + \noexpand\endfoot + \noexpand\glstablelastfoot{\expandonce\glossarypostamble}% + \noexpand\tabularnewline + \noexpand\endlastfoot + }% + \fi + }% +% \end{macrocode} +%Initialisation hook. +% \begin{macrocode} + \glstable@init +% \end{macrocode} +%Set up filtering. +% \begin{macrocode} + \let\printunsrtglossaryentryprocesshook\glstable@filter +% \end{macrocode} +%Disable preamble and postamble commands as their content has +%already been added to the table specs. +% \begin{macrocode} + \let\glossarypostamble\relax + \let\glossarypreamble\relax +% \end{macrocode} +%Disable the section command as the title and toc title are now in +%the caption. +% \begin{macrocode} + \renewcommand{\glossarysection}[2][]{}% +% \end{macrocode} +%The glossary will be empty on the first \LaTeX\ run as the entries +%won't be defined until \app{bib2gls} has selected them. +% \begin{macrocode} + \glsxtrifemptyglossary{\currentglossary} + {% + \GlossariesExtraWarning{Glossary `\currentglossary' is empty}% +% \end{macrocode} +%Just do the table header and footer to allow it to be added to the +%list of tables and have the label added to the aux file. +% \begin{macrocode} + \edef\@glsxtr@tmp{\noexpand\setkeys{printgloss}{\expandonce\glstable@opts}}% + \@glsxtr@tmp + \glstableifpar{\glstablefinishlengthupdates}% + \global\glstablecurrentblockindex=0\relax + \glstable@begin + \glstablefinishrow + \end{longtable}% + }% + {% + \expandafter\printunsrtglossary\expandafter[\glstable@opts]\relax + }% + \egroup +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glstable@child} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand{\glstable@child}[1]{% + \ifdefempty\glstable@dochildren{}% + {\appto\glstable@dochildren{\glstableblocksubentrysep}}% + \appto\glstable@dochildren{\glstableblocksubentry{#1}}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glstableChildEntries} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand{\glstableChildEntries}[1]{% + \def\glstable@dochildren{}% + \GlsXtrIfHasNonZeroChildCount*{#1}% + {% + \glsxtrfieldforlistloop{#1}{childlist}{\glstable@child}% + \preto\glstable@dochildren{% + \glstablePreChildren + \begin{glstablesubentries}% + }% + \appto\glstable@dochildren{\end{glstablesubentries}}% + }% + {}% + \glstable@dochildren +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glstable@n@amps} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand{\glstable@n@amps}[1]{% + \ifnum#1>0\relax + \count@=0\relax + \loop + \advance\count@ by 1\relax + \appto\glstable@endblock{&}% + \ifnum\count@<#1 + \repeat + \fi +} +% \end{macrocode} +%\end{macro} +% +%TODO: this needs to do nothing if it occurs are the start of a new +%row. The position of \cs{tabularnewline} may need changing within +%\cs{printunsrttable} and the table style. +%\begin{macro}{\glstablefinishrow} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand{\glstablefinishrow}{% + \glstable@finishrow + \tabularnewline +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\glstable@finishrow} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand{\glstable@finishrow}{% + \def\glstable@endblock{}% + \@glstable@finishrow + \glstable@endblock +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glstable@finishrow} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newcommand{\@glstable@finishrow}{% + \ifnum\glstablecurrentblockindex>0 + \ifnum\glstablecurrentblockindex<\glstableblockperrowcount + \expandafter\glstable@n@amps\expandafter{% + \numexpr + (\glstableblockperrowcount-\glstablecurrentblockindex) + * (\glstablecolsperblock -1) + }% + \fi + \global\glstablecurrentblockindex=0 + \fi +} +% \end{macrocode} +%\end{macro} +% +%\begin{style}{table} +%\changes{1.49}{2022-10-14}{new} +% \begin{macrocode} +\newglossarystyle{table}% +{% + \renewenvironment{theglossary}% + {% + \glstableifpar{\glstablefinishlengthupdates}% + \global\glstablecurrentblockindex=0\relax + \glstable@begin + } + {% + \glstablefinishrow + \end{longtable}% + }% + \renewcommand*{\glossaryheader}{}% + \renewcommand*{\glsgroupheading}[1]{\glstable@groupheading{##1}}% + \renewcommand*{\glssubgroupheading}[4]{}% + \renewcommand*{\glsgroupskip}{}% + \renewcommand{\glossentry}[2]{% + \global\advance\glstablecurrentblockindex by 1\relax + \ifnum\glstableblockperrowcount=\glstablecurrentblockindex + \gdef\glstable@endblock{% + \global\glstablecurrentblockindex=0\relax + \tabularnewline + }% + \else + \gdef\glstable@endblock{&}% + \fi + \glstableblockentry{##1}% + \glstableChildEntries{##1}% + \glstable@endblock + }% + \renewcommand{\subglossentry}[3]{}% +} +% \end{macrocode} +%\end{style} +%\iffalse +% \begin{macrocode} +% +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} +%<*example-glossaries-xr.tex> +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} +%< +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} +%<*example-glossaries-acronym-desc.bib> +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} +%< +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} +%<*example-glossaries-acronym.bib> +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} +%< +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} +%<*example-glossaries-acronyms-lang.bib> +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} +%< +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} +%<*example-glossaries-brief.bib> +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} +%< +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} +%<*example-glossaries-childmultipar.bib> +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} +% Encoding: UTF-8 +@entry{hiersedmattis, + user1 = {example-image}, + name = {sed mattis}, + description = {Erat sit amet dolor sit amet, consectetuer adipiscing elit. Ut purus +elit, vestibulum ut, placerat ac, adipiscing vitae, felis. Curabitur +dictum gravida mauris. Ut pellentesque augue sed urna. Vestibulum +diam eros, fringilla et, consectetuer eu, nonummy id, sapien. Nullam +at lectus. In sagittis ultrices mauris. Curabitur malesuada erat sit +amet massa. Fusce blandit. Aliquam erat volutpat.} +} + +@entry{hierloremi-ii, + parent = {hiersedmattis}, + name = {lorem 1--2}, + description = {Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, +vestibulum ut, placerat ac, adipiscing vitae, felis. Curabitur +dictum gravida mauris. Nam arcu libero, nonummy eget, consectetuer +id, vulputate a, magna. Donec vehicula augue eu neque. Pellentesque +habitant morbi tristique senectus et netus et malesuada fames ac +turpis egestas. Mauris ut leo. Cras viverra metus rhoncus sem. Nulla +et lectus vestibulum urna fringilla ultrices. Phasellus eu tellus +sit amet tortor gravida placerat. Integer sapien est, iaculis in, +pretium quis, viverra ac, nunc. Praesent eget sem vel leo ultrices +bibendum. Aenean faucibus. Morbi dolor nulla, malesuada eu, pulvinar +at, mollis ac, nulla. Curabitur auctor semper nulla. Donec varius +orci eget risus. Duis nibh mi, congue eu, accumsan eleifend, +sagittis quis, diam. Duis eget orci sit amet orci dignissim rutrum. + +Nam dui ligula, fringilla a, euismod sodales, sollicitudin vel, +wisi. Morbi auctor lorem non justo. Nam lacus libero, pretium at, +lobortis vitae, ultricies et, tellus. Donec aliquet, tortor sed +accumsan bibendum, erat ligula aliquet magna, vitae ornare odio +metus a mi. Morbi ac orci et nisl hendrerit mollis. Suspendisse ut +massa. Cras nec ante. Pellentesque a nulla. Cum sociis natoque +penatibus et magnis dis parturient montes, nascetur ridiculus mus. +Aliquam tincidunt urna. Nulla ullamcorper vestibulum turpis. +Pellentesque cursus luctus mauris.} +} + +@entry{hierloremiii-iv, + user1 = {example-image}, + parent = {hiersedmattis}, + name = {lorem 3--4}, + description = {Nulla malesuada porttitor diam. Donec felis erat, congue non, +volutpat at, tincidunt tristique, libero. Vivamus viverra fermentum +felis. Donec nonummy pellentesque ante. Phasellus adipiscing semper +elit. Proin fermentum massa ac quam. Sed diam turpis, molestie +vitae, placerat a, molestie nec, leo. Maecenas lacinia. Nam ipsum +ligula, eleifend at, accumsan nec, suscipit a, ipsum. Morbi blandit +ligula feugiat magna. Nunc eleifend consequat lorem. Sed lacinia +nulla vitae enim. Pellentesque tincidunt purus vel magna. Integer +non enim. Praesent euismod nunc eu purus. Donec bibendum quam in +tellus. Nullam cursus pulvinar lectus. Donec et mi. Nam vulputate +metus eu enim. Vestibulum pellentesque felis eu massa. + +Quisque ullamcorper placerat ipsum. Cras nibh. Morbi vel justo +vitae lacus tincidunt ultrices. Lorem ipsum dolor sit amet, +consectetuer adipiscing elit. In hac habitasse platea dictumst. +Integer tempus convallis augue. Etiam facilisis. Nunc elementum +fermentum wisi. Aenean placerat. Ut imperdiet, enim sed gravida +sollicitudin, felis odio placerat quam, ac pulvinar elit purus eget +enim. Nunc vitae tortor. Proin tempus nibh sit amet nisl. Vivamus +quis tortor vitae risus porta vehicula.} +} + +@entry{hierloremv-vi, + parent = {hiersedmattis}, + name = {lorem 5--6}, + description = {Fusce mauris. Vestibulum luctus nibh at lectus. Sed bibendum, nulla +a faucibus semper, leo velit ultricies tellus, ac venenatis arcu +wisi vel nisl. Vestibulum diam. Aliquam pellentesque, augue quis +sagittis posuere, turpis lacus congue quam, in hendrerit risus eros +eget felis. Maecenas eget erat in sapien mattis porttitor. +Vestibulum porttitor. Nulla facilisi. Sed a turpis eu lacus commodo +facilisis. Morbi fringilla, wisi in dignissim interdum, justo lectus +sagittis dui, et vehicula libero dui cursus dui. Mauris tempor +ligula sed lacus. Duis cursus enim ut augue. Cras ac magna. Cras +nulla. Nulla egestas. Curabitur a leo. Quisque egestas wisi eget +nunc. Nam feugiat lacus vel est. Curabitur consectetuer.% + + +Suspendisse vel felis. Ut lorem lorem, interdum eu, tincidunt sit +amet, laoreet vitae, arcu. Aenean faucibus pede eu ante. Praesent +enim elit, rutrum at, molestie non, nonummy vel, nisl. Ut lectus +eros, malesuada sit amet, fermentum eu, sodales cursus, magna. Donec +eu purus. Quisque vehicula, urna sed ultricies auctor, pede lorem +egestas dui, et convallis elit erat sed nulla. Donec luctus. +Curabitur et nunc. Aliquam dolor odio, commodo pretium, ultricies +non, pharetra in, velit. Integer arcu est, nonummy in, fermentum +faucibus, egestas vel, odio.} +} + +@entry{hiergravida, + name = {gravida}, + description = {Malesuada libero, nonummy eget, consectetuer id, vulputate a, magna. Donec +vehicula augue eu neque. Pellentesque habitant morbi tristique +senectus et netus et malesuada fames ac turpis egestas. Mauris ut +leo. + +Morbi ultrices rutrum lorem. Nam elementum ullamcorper +leo. Morbi dui. Aliquam sagittis. Nunc placerat. Pellentesque +tristique sodales est. Maecenas imperdiet lacinia velit. Cras non +urna. Morbi eros pede, suscipit ac, varius vel, egestas non, eros.} +} + +@entry{hierloremvii-viii, + user1 = {example-image-b}, + parent = {hiergravida}, + name = {lorem 7--8}, + description = {Sed commodo posuere pede. Mauris ut est. Ut quis purus. Sed ac odio. +Sed vehicula hendrerit sem. Duis non odio. Morbi ut dui. Sed +accumsan risus eget odio. In hac habitasse platea dictumst. +Pellentesque non elit. Fusce sed justo eu urna porta tincidunt. +Mauris felis odio, sollicitudin sed, volutpat a, ornare ac, erat. +Morbi quis dolor. Donec pellentesque, erat ac sagittis semper, nunc +dui lobortis purus, quis congue purus metus ultricies tellus. Proin +et quam. Class aptent taciti sociosqu ad litora torquent per conubia +nostra, per inceptos hymenaeos. Praesent sapien turpis, fermentum +vel, eleifend faucibus, vehicula eu, lacus. + +Pellentesque habitant morbi tristique senectus et netus et malesuada +fames ac turpis egestas. Donec odio elit, dictum in, hendrerit sit +amet, egestas sed, leo. Praesent feugiat sapien aliquet odio. +Integer vitae justo. Aliquam vestibulum fringilla lorem. Sed neque +lectus, consectetuer at, consectetuer sed, eleifend ac, lectus. +Nulla facilisi. Pellentesque eget lectus. Proin eu metus. Sed +porttitor. In hac habitasse platea dictumst. Suspendisse eu lectus. +Ut mi mi, lacinia sit amet, placerat et, mollis vitae, dui. Sed ante +tellus, tristique ut, iaculis eu, malesuada ac, dui. Mauris nibh +leo, facilisis non, adipiscing quis, ultrices a, dui.} +} + +@entry{hierloremix-x, + user1 = {example-image-c}, + parent = {hiergravida}, + name = {lorem 9--10}, + description = {Morbi luctus, wisi viverra faucibus pretium, nibh est placerat odio, +nec commodo wisi enim eget quam. Quisque libero justo, consectetuer +a, feugiat vitae, porttitor eu, libero. Suspendisse sed mauris +vitae elit sollicitudin malesuada. Maecenas ultricies eros sit amet +ante. Ut venenatis velit. Maecenas sed mi eget dui varius euismod. +Phasellus aliquet volutpat odio. Vestibulum ante ipsum primis in +faucibus orci luctus et ultrices posuere cubilia Curae; Pellentesque +sit amet pede ac sem eleifend consectetuer. Nullam elementum, urna +vel imperdiet sodales, elit ipsum pharetra ligula, ac pretium ante +justo a nulla. Curabitur tristique arcu eu metus. Vestibulum lectus. +Proin mauris. Proin eu nunc eu urna hendrerit faucibus. Aliquam +auctor, pede consequat laoreet varius, eros tellus scelerisque quam, +pellentesque hendrerit ipsum dolor sed augue. Nulla nec lacus. + +Suspendisse vitae elit. Aliquam arcu neque, ornare in, ullamcorper +quis, commodo eu, libero. Fusce sagittis erat at erat tristique +mollis. Maecenas sapien libero, molestie et, lobortis in, sodales +eget, dui. Morbi ultrices rutrum lorem. Nam elementum ullamcorper +leo. Morbi dui. Aliquam sagittis. Nunc placerat. Pellentesque +tristique sodales est. Maecenas imperdiet lacinia velit. Cras non +urna. Morbi eros pede, suscipit ac, varius vel, egestas non, eros. +Praesent malesuada, diam id pretium elementum, eros sem dictum +tortor, vel consectetuer odio sem sed wisi.} +} + +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} +% +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} +%<*example-glossaries-childnoname.bib> +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} +%< +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} +%<*example-glossaries-cite.bib> +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} +%< +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} +%<*example-glossaries-images.bib> +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} +%< +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} +%<*example-glossaries-long.bib> +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} +%< +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} +%<*example-glossaries-longchild.bib> +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} +% Encoding: UTF-8 +@entry{longsedmattis, + name = {sed mattis}, + description = {erat sit amet dolor sit amet, consectetuer adipiscing elit. Ut purus +elit, vestibulum ut, placerat ac, adipiscing vitae, felis. Curabitur +dictum gravida mauris.} +} + +@entry{longgravida, + parent = {longsedmattis}, + name = {gravida}, + description = {malesuada libero, nonummy eget, consectetuer id, vulputate a, magna. Donec +vehicula augue eu neque. Pellentesque habitant morbi tristique +senectus et netus et malesuada fames ac turpis egestas. Mauris ut +leo.} +} + +@entry{longelitaugue, + parent = {longsedmattis}, + name = {elit augue}, + description = {egestas diam metus rhoncus sem. Nulla et lectus vestibulum +urna fringilla ultrices. Phasellus eu tellus sit amet tortor gravida +placerat.} +} + +@entry{longtempus, + parent = {longsedmattis}, + name = {tempus}, + description = {scelerisque est, iaculis in, pretium quis, viverra ac, +nunc. Praesent eget sem vel leo ultrices bibendum. Aenean +faucibus.} +} + +@entry{longnunc, + name = {nunc}, + description = {nisl vitae nulla, malesuada eu, pulvinar at, mollis ac, nulla. +Curabitur auctor semper nulla. Donec varius orci eget risus. Duis +nibh mi, congue eu, accumsan eleifend, sagittis quis, diam. Duis +eget orci sit amet orci dignissim rutrum.} +} + +@entry{longlibero, + parent = {longnunc}, + name = {libero}, + description = {sed consequat ligula, fringilla a, euismod sodales, +sollicitudin vel, wisi. Morbi auctor lorem non justo.} +} + +@entry{longfeugiat, + parent = {longnunc}, + name = {feugiat}, + description = {massa libero, pretium at, lobortis vitae, ultricies et, +tellus. Donec aliquet, tortor sed accumsan bibendum, erat ligula aliquet magna, +vitae ornare odio metus a mi.} +} + +@entry{longporta, + parent = {longnunc}, + name = {porta}, + description = {eros in eleifend orci et nisl hendrerit mollis. Suspendisse ut massa. +Cras nec ante. Pellentesque a nulla. Cum sociis natoque penatibus +et magnis dis parturient montes, nascetur ridiculus mus.} +} + +@entry{longvariuserat, + parent = {longnunc}, + name = {varius erat}, + description = {leo rutrum dui tincidunt urna. Nulla ullamcorper +vestibulum turpis. Pellentesque cursus luctus mauris.} +} + +@entry{longnonconvallis, + name = {non convallis}, + description = {lectus orci ut nibh porttitor diam. Donec felis erat, +congue non, volutpat at, tincidunt tristique, libero. Vivamus +viverra fermentum felis.} +} + +@entry{longsedlorem, + parent = {longnonconvallis}, + name = {sedlorem}, + description = {massa pellentesque ante. Phasellus +adipiscing semper elit. Proin fermentum massa ac quam. Sed diam +turpis, molestie vitae, placerat a, molestie nec, leo.} +} + +@entry{longnonummyquis, + parent = {longnonconvallis}, + name = {nonummy +quis}, + description = {egestas id nam ipsum ligula, eleifend at, accumsan nec, suscipit +a, ipsum. Morbi blandit ligula feugiat magna. Nunc eleifend consequat +lorem.} +} + +@entry{longcondimentum, + name = {condimentum}, + description = {at nisl nulla vitae enim. Pellentesque tincidunt purus +vel magna. Integer non enim. Praesent euismod nunc eu purus. Donec +bibendum quam in tellus.} +} + +@entry{longmaecenas, + parent = {longcondimentum}, + name = {maecenas}, + description = {at nibh fringilla a, euismod sodales, sollicitudin vel, +wisi. Morbi auctor lorem non justo. Nam lacus libero, pretium at, +lobortis vitae, ultricies et, tellus. Donec aliquet, tortor sed +accumsan bibendum, erat ligula aliquet magna, vitae ornare odio +metus a mi. Morbi ac orci et nisl hendrerit mollis. Suspendisse ut +massa. Cras nec ante. Pellentesque a nulla. Cum sociis natoque +penatibus et magnis dis parturient montes, nascetur ridiculus mus. +Aliquam tincidunt urna. Nulla ullamcorper vestibulum turpis. +Pellentesque cursus luctus mauris.} +} + +@entry{longaliquamet, + name = {aliquam et}, + description = {augue felis erat, congue non, +volutpat at, tincidunt tristique, libero. Vivamus viverra fermentum +felis. Donec nonummy pellentesque ante.} +} + +@entry{longatnunc, + parent = {longaliquamet}, + name = {at nunc}, + description = {pellentesque ullamcorper el justo +vitae lacus tincidunt ultrices. Lorem ipsum dolor sit amet, +consectetuer adipiscing elit.} +} + +@entry{longduisnisl, + parent = {longatnunc}, + name = {duisnisl}, + description = {laoreet suscipit ac venenatis arcu +wisi vel nisl. Vestibulum diam. Aliquam pellentesque, augue quis +sagittis posuere, turpis lacus congue quam, in hendrerit risus eros +eget felis. Maecenas eget erat in sapien mattis porttitor.} +} + +@entry{longduisnibh, + parent = {longatnunc}, + name = {duisnibh}, + description = {convallis ut justo lectus +sagittis dui, et vehicula libero dui cursus dui. Mauris tempor +ligula sed lacus. Duis cursus enim ut augue. Cras ac magna.} +} + +@entry{longrutrum, + name = {rutrum}, + description = {id, enim elit, rutrum at, molestie non, nonummy vel, nisl. Ut lectus +eros, malesuada sit amet, fermentum eu, sodales cursus, magna. Donec +eu purus. Quisque vehicula, urna sed ultricies auctor, pede lorem +egestas dui, et convallis elit erat sed nulla.} +} + +@entry{longphasellus, + parent = {longrutrum}, + name = {phasellus}, + description = {odio volutpat a, ornare ac, erat. +Morbi quis dolor. Donec pellentesque, erat ac sagittis semper, nunc +dui lobortis purus, quis congue purus metus ultricies tellus. Proin +et quam.} +} + +@entry{longnullanulla, + parent = {longrutrum}, + name = {nulla nulla}, + description = {elit, molestie non wisi viverra faucibus pretium, nibh est placerat odio, +nec commodo wisi enim eget quam. Quisque libero justo, consectetuer +a, feugiat vitae, porttitor eu, libero.} +} + +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} +% +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} +%<*example-glossaries-multipar.bib> +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} +%< +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} +%<*example-glossaries-parent.bib> +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} +%< +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} +%<*example-glossaries-symbolnames.bib> +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} +% Encoding: UTF-8 +@entry{sym.alpha, + name = {\ensuremath{\alpha}}, + description = {Quisque ullamcorper placerat ipsum.} +} + +@entry{sym.beta, + name = {\ensuremath{\beta}}, + description = {Cras nibh.} +} + +@entry{sym.gamma, + name = {\ensuremath{\gamma}}, + description = {Morbi vel justo vitae lacus tincidunt ultrices.} +} + +@entry{sym.delta, + name = {\ensuremath{\delta}}, + description = {Lorem ipsum dolor sit amet, consectetuer adipiscing +elit.} +} + +@entry{sym.epsilon, + name = {\ensuremath{\epsilon}}, + description = {In hac habitasse platea dictumst.} +} + +@entry{sym.zeta, + name = {\ensuremath{\zeta}}, + description = {Integer tempus convallis augue.} +} + +@entry{sym.eta, + name = {\ensuremath{\eta}}, + description = {Etiam facilisis.} +} + +@entry{sym.theta, + name = {\ensuremath{\theta}}, + description = {Nunc elementum fermentum wisi.} +} + +@entry{sym.iota, + name = {\ensuremath{i}}, + description = {Aenean placerat.} +} + +@entry{sym.kappa, + name = {\ensuremath{\kappa}}, + description = {Ut imperdiet, enim sed gravida sollicitudin, felis odio +placerat quam, ac pulvinar elit purus eget enim.} +} + +@entry{sym.lambda, + name = {\ensuremath{\lambda}}, + description = {Nunc vitae tortor.} +} + +@entry{sym.mu, + name = {\ensuremath{\mu}}, + description = {Proin tempus nibh sit amet nisl.} +} + +@entry{sym.nu, + name = {\ensuremath{\nu}}, + description = {Vivamus quis tortor vitae risus porta vehicula.} +} + +@entry{sym.xi, + name = {\ensuremath{\xi}}, + description = {Fusce mauris.} +} + +@entry{sym.pi, + name = {\ensuremath{\pi}}, + description = {Vestibulum luctus nibh at lectus.} +} + +@entry{sym.rho, + name = {\ensuremath{\rho}}, + description = {Sed bibendum, nulla a faucibus semper, leo velit +ultricies tellus, ac venenatis arcu wisi vel nisl. Vestibulum diam.} +} + +@entry{sym.sigma, + name = {\ensuremath{\sigma}}, + description = {Aliquam pellentesque, augue quis sagittis posuere, +turpis lacus congue quam, in hendrerit risus eros eget felis.} +} + +@entry{sym.tau, + name = {\ensuremath{\tau}}, + description = {Maecenas eget erat in sapien mattis porttitor.} +} + +@entry{sym.upsilon, + name = {\ensuremath{\upsilon}}, + description = {Vestibulum porttitor.} +} + +@entry{sym.phi, + name = {\ensuremath{\phi}}, + description = {Nulla facilisi.} +} + +@entry{sym.chi, + name = {\ensuremath{\chi}}, + description = {Sed a turpis eu lacus commodo facilisis.} +} + +@entry{sym.psi, + name = {\ensuremath{\psi}}, + description = {Morbi fringilla, wisi in dignissim interdum, justo +lectus sagittis dui, et vehicula libero dui cursus dui.} +} + +@entry{sym.omega, + name = {\ensuremath{\omega}}, + description = {Mauris tempor ligula sed lacus.} +} + +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} +% +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} +%<*example-glossaries-symbols.bib> +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} +%< +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} +%<*example-glossaries-url.bib> +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} +%< +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} +%<*example-glossaries-xr.bib> +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} +%< +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} +%<*glossaries-extra-2021-11-22.sty> +% \end{macrocode} +%\fi +%\section{Rollback Files} +% \subsection{Rollback v1.48 (glossaries-extra-2021-11-22.sty)} +% Version 1.48 preserved for rollback. +% \begin{macrocode} +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{glossaries-extra}[2021/11/22 v1.48 (NLCT)] +\RequirePackage{xkeyval} +\RequirePackage{etoolbox} +\@ifpackageloaded{glossaries} +{% + \newcommand{\glsxtr@dooption}[1]{\setupglossaries{#1}}% + \let\@glsxtr@declareoption\@gls@declareoption +} +{% + \newcommand{\glsxtr@dooption}[1]{% + \PassOptionsToPackage{#1}{glossaries}% + }% + \PassOptionsToPackage{toc}{glossaries} + \PassOptionsToPackage{nopostdot}{glossaries} + \PassOptionsToPackage{noredefwarn}{glossaries} + \@ifpackageloaded{polyglossia}% + {}% + {% + \@ifpackageloaded{babel}% + {\PassOptionsToPackage{translate=babel}{glossaries}}% + {}% + }% + \newcommand*{\@glsxtr@declareoption}[2]{% + \DeclareOptionX{#1}{#2}% + \DeclareOption{#1}{#2}% + } +} +\newcommand*{\glsxtrundefaction}[2]{% + \@glsxtrundeftag\PackageError{glossaries-extra}{#1}{#2}% +} +\newcommand*{\glsxtr@warnonexistsordo}[1]{} +\newcommand*{\glsxtrundeftag}{??} +\newcommand*{\@glsxtrundeftag}{} +\newcommand*{\@glsxtr@warn@undefaction}[2]{% + \@glsxtrundeftag\GlossariesExtraWarning{#1}% +} +\newcommand*{\@glsxtr@err@undefaction}[2]{% + \@glsxtrundeftag\PackageError{glossaries-extra}{#1}{#2}% +} +\newcommand*{\@glsxtr@warn@onexistsordo}[1]{% + \GlossariesExtraWarning{\string#1\space hasn't been defined, so + some errors won't be converted to warnings. + (This most likely means your version of + glossaries.sty is below version 4.19.)}% +} + +\newcommand*{\@glsxtr@redef@forglsentries}{} +\newcommand*{\@glsxtr@do@redef@forglsentries}{% + \renewcommand*{\forglsentries}[3][\glsdefaulttype]{% + \protected@edef\@@glo@list{\csname glolist@##1\endcsname}% + \ifdefstring{\@@glo@list}{,}% + {% + \GlossariesExtraWarning{No entries defined in glossary `##1'}% + }% + {% + \@for##2:=\@@glo@list\do + {% + \ifdefempty{##2}{}{##3}% + }% + }% + }% +}% +\define@choicekey{glossaries-extra.sty}{undefaction}% + [\glsxtr@undefaction@val\glsxtr@undefaction@nr]% + {warn,error}% + {% + \ifcase\glsxtr@undefaction@nr\relax + \let\glsxtrundefaction\@glsxtr@warn@undefaction + \let\glsxtr@warnonexistsordo\@glsxtr@warn@onexistsordo + \let\@glsxtr@redef@forglsentries\@glsxtr@do@redef@forglsentries + \or + \let\glsxtrundefaction\@glsxtr@err@undefaction + \let\glsxtr@warnonexistsordo\@gobble + \let\@glsxtr@redef@forglsentries\relax + \fi + } +\newcommand*{\@glsxtr@record}[3]{} +\newcommand*{\glsxtr@recordsee}[2]{} +\newcommand*{\@glsxtr@defaultnumberformat}{glsnumberformat}% +\newcommand*{\GlsXtrSetDefaultNumberFormat}[1]{% + \renewcommand*{\@glsxtr@defaultnumberformat}{#1}% +}% +\newcommand*{\@glsxtr@do@record@wrglossary}[1]{% + \begingroup + \ifKV@glslink@noindex + \else + \protected@edef\@gls@label{\glsdetoklabel{#1}}% + \let\glslabel\@gls@label + \glswriteentry{#1}% + {% + \ifdefempty{\@glsxtr@thevalue}% + {% + \ifx\@glsxtr@org@theHvalue\@glsxtr@theHvalue + \else + \let\theHglsentrycounter\@glsxtr@theHvalue + \fi + \glsxtr@saveentrycounter + \let\@@do@@wrglossary\@glsxtr@dorecord + }% + {% + \let\theglsentrycounter\@glsxtr@thevalue + \let\theHglsentrycounter\@glsxtr@theHvalue + \let\@@do@@wrglossary\@glsxtr@dorecordnodefer + }% + \ifx\@glsxtr@record@setting\@glsxtr@record@setting@alsoindex + \glsxtr@@do@wrglossary{#1}% + \else + \@@glsxtrwrglossmark + \glsxtr@inc@wrglossaryctr{#1}% + \@@do@@wrglossary + \fi + }% + \fi + \endgroup +} +\newcommand*{\glsxtr@do@alsoindex@wrglossary}[1]{% + \glsxtr@@do@wrglossary{#1}% + \@glsxtr@do@record@wrglossary{#1}% +} +\newcommand*{\@@glsxtr@record}[3]{% + \protected@edef\@gls@label{\glsdetoklabel{#2}}% + \let\glslabel\@gls@label + \ifglsentryexists{#2}{}% + {% + \@@glsxtrwrglossmark + \begingroup + \let\@glsnumberformat\@glsxtr@defaultnumberformat + \def\@glsxtr@thevalue{}% + \def\@glsxtr@theHvalue{\@glsxtr@thevalue}% + \let\@glsxtr@org@theHvalue\@glsxtr@theHvalue + \let\@gls@counter\glscounter + \if@glsxtr@equations + \@glsxtr@use@equation@counter + \fi + \@gls@setdefault@glslink@opts + \csuse{@glsxtr@#3@prekeys}% + \setkeys{#3}{#1}% + \glsxtr@do@autoadd{#3}% + \csuse{@glsxtr@#3@postkeys}% + \glsxtr@inc@wrglossaryctr{#2}% + \ifKV@glslink@noindex + \else + \glswriteentry{#2}% + {% + \ifdefempty{\@glsxtr@thevalue}% + {% + \ifx\@glsxtr@org@theHvalue\@glsxtr@theHvalue + \else + \let\theHglsentrycounter\@glsxtr@theHvalue + \fi + \glsxtr@saveentrycounter + \let\@@do@@wrglossary\@glsxtr@dorecord + }% + {% + \let\theglsentrycounter\@glsxtr@thevalue + \let\theHglsentrycounter\@glsxtr@theHvalue + \let\@@do@@wrglossary\@glsxtr@dorecordnodefer + }% + \ifx\@glsxtr@record@setting\@glsxtr@record@setting@alsoindex + \glsxtr@@do@wrglossary{#2}% + \else + \@@do@@wrglossary + \fi + }% + \fi + \endgroup + }% +} +\newcommand{\@glsxtr@glslink@prekeys}{\glslinkpresetkeys} +\newcommand{\@glsxtr@glslink@postkeys}{\glslinkpostsetkeys} +\newcommand{\@glsxtr@glossadd@prekeys}{\glsaddpresetkeys} +\newcommand{\@glsxtr@glossadd@postkeys}{\glsaddpostsetkeys} +\newcommand*\@glsxtr@dorecord{% + \global\let\@glsrecordlocref\theglsentrycounter + \let\@glsxtr@orgprefix\@glo@counterprefix + \ifx\theglsentrycounter\theHglsentrycounter + \def\@glo@counterprefix{}% + \else + \protected@edef\@glsxtr@theentrycounter{\theglsentrycounter}% + \protected@edef\@glsxtr@theHentrycounter{\theHglsentrycounter}% + \@onelevel@sanitize\@glsxtr@theentrycounter + \@onelevel@sanitize\@glsxtr@theHentrycounter + \protected@edef\@do@gls@getcounterprefix{\noexpand\@gls@getcounterprefix + {\@glsxtr@theentrycounter}{\@glsxtr@theHentrycounter}% + }% + \@do@gls@getcounterprefix + \fi + \ifx\@glsxtr@record@setting\@glsxtr@record@setting@nameref + \@glsxtr@do@nameref@record + {\@gls@label}{\@glo@counterprefix}{\@gls@counter}{\@glsnumberformat}% + {\@glsrecordlocref}% + \else + \protected@write\@auxout{}{\string\glsxtr@record + {\@gls@label}{\@glo@counterprefix}{\@gls@counter}{\@glsnumberformat}% + {\@glsrecordlocref}}% + \fi + \@glsxtr@counterrecordhook + \let\@glo@counterprefix\@glsxtr@orgprefix +} +\newcommand*\@glsxtr@dorecordnodefer{% + \ifx\theglsentrycounter\theHglsentrycounter + \ifx\@glsxtr@record@setting\@glsxtr@record@setting@nameref + \@glsxtr@do@nameref@record + {\@gls@label}{}{\@gls@counter}{\@glsnumberformat}% + {\theglsentrycounter}% + \else + \protected@write\@auxout{}{\string\glsxtr@record + {\@gls@label}{}{\@gls@counter}{\@glsnumberformat}% + {\theglsentrycounter}}% + \fi + \else + \edef\@do@gls@getcounterprefix{\noexpand\@gls@getcounterprefix + {\theglsentrycounter}{\theHglsentrycounter}% + }% + \@do@gls@getcounterprefix + \ifx\@glsxtr@record@setting\@glsxtr@record@setting@nameref + \@glsxtr@do@nameref@record + {\@gls@label}{\@glo@counterprefix}{\@gls@counter}% + {\@glsnumberformat}{\theglsentrycounter}% + \else + \protected@write\@auxout{}{\string\glsxtr@record + {\@gls@label}{\@glo@counterprefix}{\@gls@counter}{\@glsnumberformat}% + {\theglsentrycounter}}% + \fi + \fi + \@glsxtr@counterrecordhook +} +\newcommand{\@glsxtr@ifnum@mmode}[2]{% + \ifmmode + \ifst@rred + #2% + \else + \if@display #1\else #2\fi + \fi + \else + #2% + \fi +} +\newcommand*{\@glsxtr@do@nameref@record}[5]{% + \gls@ifnotmeasuring + {% + \protected@write\@auxout{}{\string\glsxtr@record@nameref + {#1}{#2}{#3}{#4}{#5}% + {\csuse{@currentlabelname}}{\csuse{@currentHref}}% + {\theHglsentrycounter}}% + }% +} +\newcommand*{\@@glsxtr@recordcounter}{% + \@glsxtr@noop@recordcounter +} +\newcommand*{\@glsxtr@noop@recordcounter}[1]{% + \PackageError{glossaries-extra}{\string\GlsXtrRecordCounter\space + requires record=only or record=hybrid package option}{}% +} +\newcommand*{\@glsxtr@op@recordcounter}[1]{% + \protected@eappto\@glsxtr@counterrecordhook{\noexpand\@glsxtr@docounterrecord{#1}}% +} +\newcommand*{\@glsxtr@recordsee}[2]{% + \@@glsxtrwrglossmark + \def\@gls@xref{#2}% + \@onelevel@sanitize\@gls@xref + \protected@write\@auxout{}{\string\glsxtr@recordsee{#1}{\@gls@xref}}% +} +\newcommand{\printunsrtglossaryunit}{% + \print@noop@unsrtglossaryunit +} +\newcommand*{\glsxtr@setup@record}{\let\@@do@wrglossary\glsxtr@@do@wrglossary} +\newcommand*{\glsxtr@indexonly@saveentrycounter}{% + \ifKV@glslink@noindex + \else + \glsxtr@saveentrycounter + \fi +} +\newcommand*{\glsxtr@addloclistfield}{% + \key@ifundefined{glossentry}{loclist}% + {% + \define@key{glossentry}{loclist}{\def\@glo@loclist{##1}}% + \appto\@gls@keymap{,{loclist}{loclist}}% + \appto\@newglossaryentryprehook{\def\@glo@loclist{}}% + \appto\@newglossaryentryposthook{% + \gls@assign@field{}{\@glo@label}{loclist}{\@glo@loclist}% + }% + \glssetnoexpandfield{loclist}% + }% + {}% + \key@ifundefined{glossentry}{location}% + {% + \define@key{glossentry}{location}{\def\@glo@location{##1}}% + \appto\@gls@keymap{,{location}{location}}% + \appto\@newglossaryentryprehook{\def\@glo@location{}}% + \appto\@newglossaryentryposthook{% + \gls@assign@field{}{\@glo@label}{location}{\@glo@location}% + }% + \glssetnoexpandfield{location}% + }% + {}% + \key@ifundefined{glossentry}{group}% + {% + \define@key{glossentry}{group}{\def\@glo@group{##1}}% + \appto\@gls@keymap{,{group}{group}}% + \appto\@newglossaryentryprehook{\def\@glo@group{}}% + \appto\@newglossaryentryposthook{% + \gls@assign@field{}{\@glo@label}{group}{\@glo@group}% + }% + \glssetnoexpandfield{group}% + }% + {}% +} +\newcommand*{\@glsxtr@record@setting}{off} +\newcommand*{\@glsxtr@record@setting@alsoindex}{alsoindex} +\newcommand*{\@glsxtr@record@setting@only}{only} +\newcommand*{\@glsxtr@record@setting@nameref}{nameref} +\newcommand*{\@glsxtr@if@record@only}[2]{% + \ifx\@glsxtr@record@setting\@glsxtr@record@setting@only + #1% + \else + \ifx\@glsxtr@record@setting\@glsxtr@record@setting@nameref + #1% + \else + #2% + \fi + \fi +} +\newcommand*{\@glsxtr@record@setting@off}{off} +\newcommand\@glsxtr@warn@hybrid@noprintgloss{% + \ifdefstring{\@glo@types}{,}% + {% + \GlossariesExtraWarningNoLine{No glossaries have been defined}% + }% + {% + \GlossariesExtraWarningNoLine{No \string\printglossary\space + or \string\printglossaries\space + found. ^^JYou have requested the hybrid setting + record=\@glsxtr@record@setting\space which requires a + combination of bib2gls (to fetch entries) and makeindex/xindy + (to sort and collate the entries). If you only want to use + bib2gls then change the option to record=only or record=nameref}% + }% +} +\newcommand*{\@glsxtr@record@only@setup}{% + \def\glsxtr@setup@record{% + \@glsxtr@autoseeindexfalse + \let\@do@seeglossary\@glsxtr@recordsee + \let\@glsxtr@record\@@glsxtr@record + \let\@@do@wrglossary\@glsxtr@do@record@wrglossary + \let\@gls@saveentrycounter\relax + \let\glsxtrundefaction\@glsxtr@warn@undefaction + \let\glsxtr@warnonexistsordo\@glsxtr@warn@onexistsordo + \glsxtr@addloclistfield + \renewcommand*{\@glsxtr@autoindexcrossrefs}{}% + \let\@@glsxtr@recordcounter\@glsxtr@op@recordcounter + \def\printunsrtglossaryunit{\print@op@unsrtglossaryunit}% + \def\glsxtrsetaliasnoindex{}% + \ifdef\@gls@setupsort@none{\@gls@setupsort@none}{}% + \def\glsxtrNoGlossaryWarning{\@glsxtr@record@noglossarywarning}% + \RequirePackage{glossaries-extra-bib2gls}[=v1.48]% + }% +} +\define@choicekey{glossaries-extra.sty}{record} + [\@glsxtr@record@setting\glsxtr@record@nr]% + {off,only,alsoindex,nameref,hybrid}% + [only]% + {% + \ifcase\glsxtr@record@nr\relax + \def\glsxtr@setup@record{% + \renewcommand*{\@do@seeglossary}{\@glsxtr@doseeglossary}% + \renewcommand*{\@glsxtr@record}[3]{}% + \let\@@do@wrglossary\glsxtr@@do@wrglossary + \let\@gls@saveentrycounter\glsxtr@indexonly@saveentrycounter + \let\glsxtrundefaction\@glsxtr@err@undefaction + \let\glsxtr@warnonexistsordo\@gobble + \let\@@glsxtr@recordcounter\@glsxtr@noop@recordcounter + \def\printunsrtglossaryunit{\print@noop@unsrtglossaryunit}% + \undef\glsxtrsetaliasnoindex + }% + \or + \@glsxtr@record@only@setup + \or + \def\glsxtr@setup@record{% + \renewcommand*{\@glsxtr@record@setting@alsoindex}{alsoindex}% + \renewcommand*{\@do@seeglossary}{\@glsxtr@dosee@alsoindex@glossary}% + \let\@glsxtr@record\@@glsxtr@record + \let\@@do@wrglossary\glsxtr@do@alsoindex@wrglossary + \let\@gls@saveentrycounter\glsxtr@indexonly@saveentrycounter + \let\glsxtrundefaction\@glsxtr@warn@undefaction + \let\glsxtr@warnonexistsordo\@glsxtr@warn@onexistsordo + \glsxtr@addloclistfield + \let\@@glsxtr@recordcounter\@glsxtr@op@recordcounter + \def\printunsrtglossaryunit{\print@op@unsrtglossaryunit}% + \undef\glsxtrsetaliasnoindex + }% + \or + \@glsxtr@record@only@setup + \ifundef\hyperlink + {\GlossariesExtraWarning{You have requested record=nameref but + the document doesn't support hyperlinks}}% + {}% + \or + \def\glsxtr@setup@record{% + \renewcommand*{\@glsxtr@record@setting@alsoindex}{hybrid}% + \renewcommand*{\@do@seeglossary}{\@glsxtr@dosee@alsoindex@glossary}% + \let\@glsxtr@record\@@glsxtr@record + \let\@@do@wrglossary\glsxtr@do@alsoindex@wrglossary + \let\@gls@saveentrycounter\glsxtr@indexonly@saveentrycounter + \let\glsxtrundefaction\@glsxtr@warn@undefaction + \let\glsxtr@warnonexistsordo\@glsxtr@warn@onexistsordo + \glsxtr@addloclistfield + \let\@@glsxtr@recordcounter\@glsxtr@op@recordcounter + \def\printunsrtglossaryunit{\print@op@unsrtglossaryunit}% + \undef\glsxtrsetaliasnoindex + }% + \fi + } +\newcommand*{\@glsxtr@docdefval}{0} +\newcommand*{\if@glsxtrdocdef}{\ifnum\@glsxtr@docdefval>0 } +\newcommand*{\@glsxtrdocdeftrue}{\def\@glsxtr@docdefval{1}} +\newcommand*{\@glsxtrdocdeffalse}{\def\@glsxtr@docdefval{0}} +\define@choicekey{glossaries-extra.sty}{docdef} + [\@glsxtr@docdefsetting\@glsxtr@docdefval]% + {false,true,restricted,atom}[true]% +{% + \ifnum\@glsxtr@docdefval>1\relax + \renewcommand*{\@glsdoifexistsorwarn}{\glsdoifexists}% + \else + \renewcommand*{\@glsdoifexistsorwarn}{\glsdoifexistsorwarn}% + \fi +} +\newcommand*{\if@glsxtrdocdefrestricted}{\ifnum\@glsxtr@docdefval>1 } +\newcommand*{\@glsdoifexistsorwarn}{\glsdoifexistsorwarn} +\define@boolkey{glossaries-extra.sty}[@glsxtr]{indexcrossrefs}[true]{% + \if@glsxtrindexcrossrefs + \else + \renewcommand*{\@glsxtr@autoindexcrossrefs}{}% + \fi +} +\@glsxtrindexcrossrefsfalse +\newcommand*{\@glsxtr@autoindexcrossrefs}{\@glsxtrindexcrossrefstrue} +\define@boolkey{glossaries-extra.sty}[@glsxtr@]{autoseeindex}[true]{% +} +\@glsxtr@autoseeindextrue +\define@boolkey{glossaries-extra.sty}[@glsxtr@]{equations}[true]{% +} +\@glsxtr@equationsfalse +\let\glsxtr@float\@float +\let\glsxtr@dblfloat\@dblfloat +\define@boolkey{glossaries-extra.sty}[@glsxtr@]{floats}[true]{% + \if@glsxtr@floats + \renewcommand*{\@float}[1]{\renewcommand{\glscounter}{##1}\glsxtr@float{##1}}% + \renewcommand*{\@dblfloat}[1]{\renewcommand{\glscounter}{##1}\glsxtr@dblfloat{##1}}% + \else + \let\@float\glsxtr@float + \let\@dblfloat\glsxtr@dblfloat + \fi +} +\@glsxtr@floatsfalse +\newcommand*{\GlossariesExtraWarning}[1]{\PackageWarning{glossaries-extra}{#1}} +\newcommand*{\GlossariesExtraWarningNoLine}[1]{% + \PackageWarningNoLine{glossaries-extra}{#1}} +\@glsxtr@declareoption{nowarn}{% + \let\GlossariesExtraWarning\@gobble + \let\GlossariesExtraWarningNoLine\@gobble + \glsxtr@dooption{nowarn}% +} +\newcommand*{\@glsxtr@defpostpunc}{} +\@glsxtr@declareoption{postdot}{% + \glsxtr@dooption{nopostdot=false}% + \renewcommand*{\@glsxtr@defpostpunc}{% + \renewcommand*{\glspostdescription}{% + \ifglsnopostdot\else.\spacefactor\sfcode`\. \fi}% + }% +} + +\define@choicekey{glossaries-extra.sty}{nopostdot}{true,false}[true]{% + \glsxtr@dooption{nopostdot=#1}% + \renewcommand*{\@glsxtr@defpostpunc}{% + \renewcommand*{\glspostdescription}{% + \ifglsnopostdot\else.\spacefactor\sfcode`\. \fi}% + }% +} +\define@key{glossaries-extra.sty}{postpunc}{% + \glsxtr@dooption{nopostdot=false}% + \ifstrequal{#1}{dot}% + {% + \renewcommand*{\@glsxtr@defpostpunc}{% + \renewcommand*{\glspostdescription}{.\spacefactor\sfcode`\. }% + }% + }% + {% + \ifstrequal{#1}{comma}% + {% + \renewcommand*{\@glsxtr@defpostpunc}{% + \renewcommand*{\glspostdescription}{,}% + }% + }% + {% + \ifstrequal{#1}{none}% + {% + \glsxtr@dooption{nopostdot=true}% + \renewcommand*{\@glsxtr@defpostpunc}{% + \renewcommand*{\glspostdescription}{}% + }% + }% + {% + \renewcommand*{\@glsxtr@defpostpunc}{% + \renewcommand*{\glspostdescription}{#1}% + }% + }% + }% + }% +} +\newcommand*{\glsxtrabbrvtype}{\glsdefaulttype} +\newcommand*{\@glsxtr@abbreviationsdef}{} + +\newcommand*{\@glsxtr@doabbreviationsdef}{% + \@ifpackageloaded{babel}% + {\providecommand{\abbreviationsname}{\acronymname}}% + {\providecommand{\abbreviationsname}{Abbreviations}}% + \newglossary[glg-abr]{abbreviations}{gls-abr}{glo-abr}{\abbreviationsname}% + \renewcommand*{\glsxtrabbrvtype}{abbreviations}% + \newcommand*{\printabbreviations}[1][]{% + \printglossary[type=\glsxtrabbrvtype,##1]% + }% + \disable@keys{glossaries-extra.sty}{abbreviations}% + \ifglsacronym + \else + \renewcommand*{\acronymtype}{\glsxtrabbrvtype}% + \fi +}% +\@glsxtr@declareoption{abbreviations}{% + \let\@glsxtr@abbreviationsdef\@glsxtr@doabbreviationsdef +} +\newcommand*{\GlsXtrDefineAbbreviationShortcuts}{% + \newcommand*{\ab}{\cgls}% + \newcommand*{\abp}{\cglspl}% + \newcommand*{\as}{\glsxtrshort}% + \newcommand*{\asp}{\glsxtrshortpl}% + \newcommand*{\al}{\glsxtrlong}% + \newcommand*{\alp}{\glsxtrlongpl}% + \newcommand*{\af}{\glsxtrfull}% + \newcommand*{\afp}{\glsxtrfullpl}% + \newcommand*{\Ab}{\cGls}% + \newcommand*{\Abp}{\cGlspl}% + \newcommand*{\As}{\Glsxtrshort}% + \newcommand*{\Asp}{\Glsxtrshortpl}% + \newcommand*{\Al}{\Glsxtrlong}% + \newcommand*{\Alp}{\Glsxtrlongpl}% + \newcommand*{\Af}{\Glsxtrfull}% + \newcommand*{\Afp}{\Glsxtrfullpl}% + \newcommand*{\AB}{\cGLS}% + \newcommand*{\ABP}{\cGLSpl}% + \newcommand*{\AS}{\GLSxtrshort}% + \newcommand*{\ASP}{\GLSxtrshortpl}% + \newcommand*{\AL}{\GLSxtrlong}% + \newcommand*{\ALP}{\GLSxtrlongpl}% + \newcommand*{\AF}{\GLSxtrfull}% + \newcommand*{\AFP}{\GLSxtrfullpl}% + \providecommand*{\newabbr}{\newabbreviation}% + \let\GlsXtrDefineAbbreviationShortcuts\relax +} +\newcommand*{\GlsXtrDefineAcShortcuts}{% + \newcommand*{\ac}{\cgls}% + \newcommand*{\acp}{\cglspl}% + \newcommand*{\acs}{\glsxtrshort}% + \newcommand*{\acsp}{\glsxtrshortpl}% + \newcommand*{\acl}{\glsxtrlong}% + \newcommand*{\aclp}{\glsxtrlongpl}% + \newcommand*{\acf}{\glsxtrfull}% + \newcommand*{\acfp}{\glsxtrfullpl}% + \newcommand*{\Ac}{\cGls}% + \newcommand*{\Acp}{\cGlspl}% + \newcommand*{\Acs}{\Glsxtrshort}% + \newcommand*{\Acsp}{\Glsxtrshortpl}% + \newcommand*{\Acl}{\Glsxtrlong}% + \newcommand*{\Aclp}{\Glsxtrlongpl}% + \newcommand*{\Acf}{\Glsxtrfull}% + \newcommand*{\Acfp}{\Glsxtrfullpl}% + \newcommand*{\AC}{\cGLS}% + \newcommand*{\ACP}{\cGLSpl}% + \newcommand*{\ACS}{\GLSxtrshort}% + \newcommand*{\ACSP}{\GLSxtrshortpl}% + \newcommand*{\ACL}{\GLSxtrlong}% + \newcommand*{\ACLP}{\GLSxtrlongpl}% + \newcommand*{\ACF}{\GLSxtrfull}% + \newcommand*{\ACFP}{\GLSxtrfullpl}% + \providecommand*{\newabbr}{\newabbreviation}% + \let\GlsXtrDefineAcShortcuts\relax +} +\newcommand*{\GlsXtrDefineOtherShortcuts}{% + \newcommand*{\newentry}{\newglossaryentry}% + \ifdef\printsymbols + {% + \newcommand*{\newsym}{\glsxtrnewsymbol}% + }{}% + \ifdef\printnumbers + {% + \newcommand*{\newnum}{\glsxtrnewnumber}% + }{}% + \let\GlsXtrDefineOtherShortcuts\relax +} +\newcommand*{\@glsxtr@setupshortcuts}{} +\newcommand*{\@glsxtr@shortcutsval}{\ifglsacrshortcuts acro\else none\fi}% +\define@choicekey{glossaries-extra.sty}{shortcuts}% + [\@glsxtr@shortcutsval\@glsxtr@shortcutsnr]% + {acronyms,acro,abbreviations,abbr,other,all,true,ac,none,false}[true]{% + \ifcase\@glsxtr@shortcutsnr\relax % acronyms + \renewcommand*{\@glsxtr@setupshortcuts}{% + \glsacrshortcutstrue + \DefineAcronymSynonyms + }% + \or % acro + \renewcommand*{\@glsxtr@setupshortcuts}{% + \glsacrshortcutstrue + \DefineAcronymSynonyms + }% + \or % abbreviations + \renewcommand*{\@glsxtr@setupshortcuts}{% + \GlsXtrDefineAbbreviationShortcuts + }% + \or % abbr + \renewcommand*{\@glsxtr@setupshortcuts}{% + \GlsXtrDefineAbbreviationShortcuts + }% + \or % other + \renewcommand*{\@glsxtr@setupshortcuts}{% + \GlsXtrDefineOtherShortcuts + }% + \or % all + \renewcommand*{\@glsxtr@setupshortcuts}{% + \glsacrshortcutstrue + \GlsXtrDefineAcShortcuts + \GlsXtrDefineAbbreviationShortcuts + \GlsXtrDefineOtherShortcuts + }% + \or % true + \renewcommand*{\@glsxtr@setupshortcuts}{% + \glsacrshortcutstrue + \GlsXtrDefineAcShortcuts + \GlsXtrDefineAbbreviationShortcuts + \GlsXtrDefineOtherShortcuts + }% + \or % ac + \renewcommand*{\@glsxtr@setupshortcuts}{% + \glsacrshortcutstrue + \GlsXtrDefineAcShortcuts + }% + \else % none, false + \renewcommand*{\@glsxtr@setupshortcuts}{}% + \fi + } +\newcommand*{\@glsxtr@doaccsupp}{} +\@glsxtr@declareoption{accsupp}{% + \renewcommand*{\@glsxtr@doaccsupp}{\RequirePackage{glossaries-accsupp}}} +\newcommand*{\@glsxtr@doloadprefix}{} +\@glsxtr@declareoption{prefix}{% + \renewcommand*{\@glsxtr@doloadprefix}{\RequirePackage{glossaries-prefix}}} +\newcommand{\glsxtrNoGlossaryWarning}[1]{% + \GlossariesExtraWarning{Glossary `#1' is missing}% + \@glsxtr@defaultnoglossarywarning{#1}% +} +\define@choicekey{glossaries-extra.sty}{nomissingglstext} + [\@glsxtr@nomissingglstextval\@glsxtr@nomissingglstextnr]% + {true,false}[true]{% + \ifcase\@glsxtr@nomissingglstextnr\relax % true + \renewcommand{\glsxtrNoGlossaryWarning}[1]{\null}% + \else % false + \renewcommand{\glsxtrNoGlossaryWarning}[1]{% + \@glsxtr@defaultnoglossarywarning{#1}% + }% + \fi + } +\newcommand*{\@glsxtr@redefstyles}{} +\define@key{glossaries-extra.sty}{stylemods}[default]{% + \ifstrequal{#1}{default}% + {% + \renewcommand*{\@glsxtr@redefstyles}{% + \RequirePackage{glossaries-extra-stylemods}}% + }% + {% + \ifstrequal{#1}{all}% + {% + \renewcommand*{\@glsxtr@redefstyles}{% + \PassOptionsToPackage{all}{glossaries-extra-stylemods}% + \RequirePackage{glossaries-extra-stylemods}% + }% + }% + {% + \renewcommand*{\@glsxtr@redefstyles}{}% + \@for\@glsxtr@tmp:=#1\do{% + \IfFileExists{glossary-\@glsxtr@tmp.sty}% + {% + \eappto\@glsxtr@redefstyles{% + \noexpand\RequirePackage{glossary-\@glsxtr@tmp}}% + }% + {% + \PackageError{glossaries-extra}% + {Glossaries style package `glossary-\@glsxtr@tmp.sty' + doesn't exist (did you mean to use the `style' key?)}% + {The list of values (#1) in the `stylemods' key should + match the glossary-xxx.sty files provided with + glossaries.sty}% + }% + }% + \appto\@glsxtr@redefstyles{\RequirePackage{glossaries-extra-stylemods}[=v1.48]}% + } + }% +} +\newcommand*{\@glsxtr@do@style}{} +\define@key{glossaries-extra.sty}{style}{% + \renewcommand*{\@glsxtr@do@style}{% + \setkeys{glossaries.sty}{style={#1}}% + \setglossarystyle{#1}% + }% +} +\newcommand*{\glsxtr@inc@wrglossaryctr}[1]{} +\newcommand*{\GlsXtrInternalLocationHyperlink}[3]{% + \glsxtrhyperlink{#1#2#3}{#3}% +} +\newcommand*{\@glsxtr@wrglossary@locationhyperlink}[3]{% + \pageref{wrglossary.#3}% +} +\@glsxtr@declareoption{indexcounter}{% + \glsxtr@dooption{counter=wrglossary}% + \ifundef\c@wrglossary + {% + \newcounter{wrglossary}% + \renewcommand{\thewrglossary}{\arabic{wrglossary}}% + }% + {}% + \renewcommand*{\glsxtr@inc@wrglossaryctr}[1]{% + \ifdefstring\@gls@counter{wrglossary}% + {% + \refstepcounter{wrglossary}% + \label{wrglossary.\thewrglossary}% + }% + {}% + }% + \renewcommand*{\GlsXtrInternalLocationHyperlink}[3]{% + \ifdefstring\glsentrycounter{wrglossary}% + {% + \@glsxtr@wrglossary@locationhyperlink{##1}{##2}{##3}% + }% + {\glsxtrhyperlink{##1##2##3}{##3}}% + }% +} +\newcommand*{\@glsxtrwrglossmark}{} +\newcommand*{\@@glsxtrwrglossmark}{} +\AtBeginDocument{\renewcommand*{\@@glsxtrwrglossmark}{\@glsxtrwrglossmark}} +\newcommand*{\glsxtrwrglossmark}{\ensuremath{\cdot}} +\newcommand\@glsxtr@doshowtarget[2]{#2} +\define@choicekey{glossaries-extra.sty}{debug} + [\@glsxtr@debugval\@glsxtr@debugnr]% + {true,false,showtargets,showwrgloss,all,showaccsupp}[true]{% + \ifcase\@glsxtr@debugnr\relax % true + \glsxtr@dooption{debug=true}% + \renewcommand*{\@glsxtrwrglossmark}{}% + \or % false + \glsxtr@dooption{debug=false}% + \renewcommand*{\@glsxtrwrglossmark}{}% + \let\@glsxtr@doshowtarget\@secondoftwo + \or % showtargets + \glsxtr@dooption{debug=showtargets}% + \def\@glsxtr@doshowtarget{\@glsxtrshowtargetleft}% + \or % showwrgloss + \glsxtr@dooption{debug=true}% + \renewcommand*{\@glsxtrwrglossmark}{\glsxtrwrglossmark}% + \or % all + \glsxtr@dooption{debug=showtargets,debug=showaccsupp}% + \renewcommand*{\@glsxtrwrglossmark}{\glsxtrwrglossmark}% + \def\@glsxtr@doshowtarget{\@glsxtrshowtargetleft}% + \or % showaccsupp + \glsxtr@dooption{debug=showaccsupp}% + \fi + } +\newcommand*{\glsxtrshowtargetouter}{\glsshowtargetouter} +\newcommand*{\glsxtrshowtargetinner}[1]{\glsshowtargetinner{#1}} +\newcommand{\@glsxtrshowtargetleft}[2]{\@glsshowtarget{#1}#2\@glsxtrshowtargetmark}% +\newcommand{\@glsxtrshowtargetright}[2]{\@glsxtrshowtargetmark#2\@glsshowtarget{#1}}% +\newcommand{\@glsxtrshowtargetmark}{}% +\define@choicekey{glossaries-extra.sty}{showtargets} + [\@glsxtr@showtargetsval\@glsxtr@showtargetsnr]% + {left,right,innerleft,innerright,annoteleft,annoteright}% + {% + \glsxtr@dooption{debug=showtargets}% + \ifcase\@glsxtr@showtargetsnr\relax + \def\@glsxtr@doshowtarget{\@glsxtrshowtargetleft}% + \def\glsxtrshowtargetouter{\glsshowtargetouter}% + \def\glsxtrshowtargetinner{\glsshowtargetinner}% + \let\@glsxtrshowtargetmark\empty + \or + \def\@glsxtr@doshowtarget{\@glsxtrshowtargetright}% + \def\glsxtrshowtargetouter{\glsshowtargetouter}% + \def\glsxtrshowtargetinner{\glsshowtargetinner}% + \let\@glsxtrshowtargetmark\empty + \or + \def\@glsxtr@doshowtarget{\@glsxtrshowtargetleft}% + \def\glsxtrshowtargetouter{\glsxtrshowtargetinner}% + \def\glsxtrshowtargetinner{\glsshowtargetinnersymleft}% + \let\@glsxtrshowtargetmark\empty + \or + \def\@glsxtr@doshowtarget{\@glsxtrshowtargetright}% + \def\glsxtrshowtargetouter{\glsxtrshowtargetinner}% + \def\glsxtrshowtargetinner{\glsshowtargetinnersymright}% + \let\@glsxtrshowtargetmark\empty + \or + \def\@glsxtr@doshowtarget{\@glsxtrshowtargetleft}% + \def\glsxtrshowtargetouter{\glsxtrshowtargetinner}% + \def\glsxtrshowtargetinner{\glsshowtargetinnersymleft}% + \def\@glsxtrshowtargetmark{\@glsshowtargetmarkfmt\glsxtrshowtargetsymbolright}% + \or + \def\@glsxtr@doshowtarget{\@glsxtrshowtargetright}% + \def\glsxtrshowtargetouter{\glsxtrshowtargetinner}% + \def\glsxtrshowtargetinner{\glsshowtargetinnersymright}% + \def\@glsxtrshowtargetmark{\@glsshowtargetmarkfmt\glsxtrshowtargetsymbolleft}% + \fi + } +\DeclareOptionX*{% + \expandafter\glsxtr@dooption\expandafter{\CurrentOption}} +\ProcessOptionsX +\RequirePackage{glossaries} +\@glsxtr@doaccsupp +\@glsxtr@doloadprefix +\@glsxtr@defpostpunc +\def\glsdoshowtarget{\@glsxtr@doshowtarget} +\newcommand{\glsxtrshowtargetsymbolright}{{\tiny$\triangleleft$}}% +\newcommand{\glsxtrshowtargetsymbolleft}{{\tiny$\triangleright$}}% +\providecommand*{\glsshowtargetinner}[1]{{\glsshowtargetfont [#1]}} +\providecommand*{\glsshowtargetfont}{\ttfamily\footnotesize} +\newcommand*{\glsshowtargetinnersymleft}[1]{% + \glsshowtargetinner{#1}\allowbreak\glsxtrshowtargetsymbolleft} +\newcommand*{\glsshowtargetinnersymright}[1]{% + \glsxtrshowtargetsymbolright\allowbreak\glsshowtargetinner{#1}} +\providecommand*{\glsshowtargetouter}[1]{% + \glsshowtargetsymbol\marginpar{\glsshowtargetsymbol\glsshowtargetfont #1}} +\providecommand*{\@glsshowtarget}[1]{} +\def\glsshowtarget#1{% + \glsxtrtitleorpdforheading + {% + \ifmmode + \nfss@text{\glsxtrshowtargetinner{#1}}% + \else + \ifinner + \glsxtrshowtargetinner{#1}% + \else + \glsxtrshowtargetouter{#1}% + \fi + \fi + }% + {[#1]}% + {{\protect\glsshowtargetinner{#1}}}% +} +\newcommand*{\@glsshowtargetmarkfmt}[1]{% + \glsxtrtitleorpdforheading + {% + \ifmmode \nfss@text{#1}\else #1\fi + }% + {}% + {\ifmmode \nfss@text{#1}\else #1\fi}% +} +\let\@glsxtr@org@doseeglossary\@do@seeglossary +\newcommand*{\@glsxtr@doseeglossary}[2]{% + \glsdoifexists{#1}% + {% + \@@glsxtrwrglossmark + \@glsxtr@org@doseeglossary{#1}{#2}% + }% +} +\newcommand*{\@glsxtr@dosee@alsoindex@glossary}[2]{% + \@glsxtr@recordsee{#1}{#2}% + \@glsxtr@doseeglossary{#1}{#2}% +} +\let\@glsxtr@org@gloautosee\@glo@autosee +\if@glsxtr@autoseeindex +\else + \ifdef\@glsxtr@org@gloautosee + {}% + {\PackageError{glossaries-extra}{`autoseeindex=false' package + option requires at least v4.30 of glossaries.sty}% + {You need to update the glossaries.sty package}% + } +\fi +\ifdef\@glo@autosee +{% + \renewcommand*{\@glo@autosee}{% + \if@glsxtr@autoseeindex\@glsxtr@org@gloautosee\fi}% +}% +{} +\renewcommand*{\gls@checkseeallowed}{% + \if@glsxtr@autoseeindex\@gls@see@noindex\fi +} +\@glsxtr@abbreviationsdef +\let\@glsxtr@abbreviationsdef\relax +\@glsxtr@setupshortcuts +\@glsxtr@redef@forglsentries +\renewcommand{\glsxtr@dooption}[1]{\setupglossaries{#1}}% +\disable@keys{glossaries-extra.sty}{accsupp} +\newcommand*{\glossariesextrasetup}[1]{% + \let\glsxtr@setup@record\relax + \let\@glsxtr@setupshortcuts\relax + \let\@glsxtr@redef@forglsentries\relax + \let\@glsxtr@doloadprefix\relax + \setkeys{glossaries-extra.sty}{#1}% + \@glsxtr@abbreviationsdef + \let\@glsxtr@abbreviationsdef\relax + \@glsxtr@setupshortcuts + \glsxtr@setup@record + \@glsxtr@redef@forglsentries + \@glsxtr@doloadprefix +} +\let\glsxtr@org@@do@wrglossary\@@do@wrglossary +\newcommand*{\glsxtr@@do@wrglossary}[1]{% + \@@glsxtrwrglossmark + \glsxtr@inc@wrglossaryctr{#1}% + \glsxtr@org@@do@wrglossary{#1}% +} +\let\glsxtr@saveentrycounter\@gls@saveentrycounter +\let\@gls@saveentrycounter\glsxtr@indexonly@saveentrycounter +\renewcommand*\@gls@getcounterprefix[2]{% + \protected@edef\@gls@thisloc{#1}\protected@edef\@gls@thisHloc{#2}% + \ifx\@gls@thisloc\@gls@thisHloc + \def\@glo@counterprefix{}% + \else + \def\@gls@get@counterprefix##1.#1##2\end@getprefix{% + \def\@glo@tmp{##2}% + \ifx\@glo@tmp\@empty + \def\@glo@counterprefix{}% + \else + \def\@glo@counterprefix{##1}% + \fi + }% + \@gls@get@counterprefix#2.#1\end@getprefix + \ifx\@glo@counterprefix\@empty + \ifx\@glsxtr@record@setting\@glsxtr@record@setting@nameref + \else + \GlossariesExtraWarning{Hyper target `#2' can't be formed by + prefixing^^Jlocation `#1'. You need to modify the + definition of \string\theH\@gls@counter^^Jotherwise you + will get the warning: "`name{\@gls@counter.#1}' has been^^J + referenced but does not exist"% + \ifx\@glsxtr@record@setting\@glsxtr@record@setting@only + . You may want to consider using record=nameref instead% + \fi}% + \fi + \fi + \fi +} +\newcommand*{\@glsxtrdialecthook}{} +\glsxtr@setup@record +\AtBeginDocument{% + \disable@keys{glossaries-extra.sty}{abbreviations,docdef,record}% + \def\@glsxtrundeftag{\glsxtrundeftag}% +} +\newcommand*{\GlsXtrIfUnusedOrUndefined}[3]{% + \ifglsentryexists{#1}% + {\ifbool{glo@\glsdetoklabel{#1}@flag}{#3}{#2}}% + {#2}% +} +\ifdef\s@ifglossaryexists +{} +{ + \renewcommand{\ifglossaryexists}{% + \@ifstar\s@ifglossaryexists\@ifglossaryexists + } + \newcommand{\@ifglossaryexists}[3]{% + \ifcsundef{@glotype@#1@out}{#3}{#2}% + } + \newcommand{\s@ifglossaryexists}[3]{% + \ifcsundef{glolist@#1}{#3}{#2}% + } +} +\newcommand{\glsxtrifemptyglossary}[3]{% + \ifcsdef{glolist@#1}% + {% + \ifcsstring{glolist@#1}{,}{#2}{#3}% + }% + {% + \glsxtrundefaction{Glossary type `#1' doesn't exist}{}% + #2% + }% +} +\newcommand*{\glsxtrifkeydefined}[3]{% + \key@ifundefined{glossentry}{#1}{#3}{#2}% +} +\newcommand*{\glsxtrprovidestoragekey}{% + \@ifstar\@sglsxtr@provide@storagekey\@glsxtr@provide@storagekey +} +\newcommand*{\@glsxtr@provide@storagekey}[3]{% + \key@ifundefined{glossentry}{#1}% + {% + \define@key{glossentry}{#1}{\csdef{@glo@#1}{##1}}% + \appto\@gls@keymap{,{#1}{#1}}% + \appto\@newglossaryentryprehook{\csdef{@glo@#1}{#2}}% + \appto\@newglossaryentryposthook{% + \letcs{\@glo@tmp}{@glo@#1}% + \gls@assign@field{#2}{\@glo@label}{#1}{\@glo@tmp}% + }% + \ifblank{#3} + {}% + {% + \newcommand*{#3}[1]{\@gls@entry@field{##1}{#1}}% + }% + }% + {% + \ifblank{#3} + {}% + {% + \providecommand*{#3}[1]{\@gls@entry@field{##1}{#1}}% + }% + }% +} +\newcommand*{\s@glsxtr@provide@storagekey}[1]{% + \key@ifundefined{glossentry}{#1}% + {% + \expandafter\newcommand\expandafter*\expandafter + {\csname gls@assign@#1@field\endcsname}[2]{% + \@@gls@expand@field{##1}{#1}{##2}% + }% + }% + {}% + \@glsxtr@provide@addstoragekey{#1}% +} +\newcommand{\GlsXtrFmtField}{useri} +\newcommand{\GlsXtrFmtDefaultOptions}{noindex} +\newrobustcmd*{\glsxtrfmt}{\@ifstar\s@glsxtrfmt\@glsxtrfmt} +\newcommand*{\@glsxtrfmt}[3][]{\@@glsxtrfmt{#1}{#2}{#3}{}} +\newcommand*{\s@glsxtrfmt}[3][]{% + \new@ifnextchar[{\s@@glsxtrfmt{#1}{#2}{#3}}% + {\@@glsxtrfmt{#1}{#2}{#3}{}}% +} +\def\s@@glsxtrfmt#1#2#3[#4]{\@@glsxtrfmt{#1}{#2}{#3}{#4}} +\newcommand*{\@@glsxtrfmt}[4]{% + \begingroup + \def\glslabel{#2}% + \glsdoifexistsordo{#2}% + {% + \ifglshasfield{\GlsXtrFmtField}{#2}% + {% + \let\do@gls@link@checkfirsthyper\relax + \expandafter\@gls@link\expandafter[\GlsXtrFmtDefaultOptions,#1]{#2}% + {\glsxtrfmtdisplay{\glscurrentfieldvalue}{#3}{#4}}% + }% + {\glsxtrfmtdisplay{@firstofone}{#3}{#4}}% + }% + {% + \begingroup + \@gls@setdefault@glslink@opts + \setkeys{glslink}{\GlsXtrFmtDefaultOptions,#1}% + \ifKV@glslink@noindex\else\glsadd{#2}\fi + \endgroup + \glsxtrfmtdisplay{@firstofone}{#3}{#4}% + }% + \endgroup +} +\newcommand{\glsxtrfmtdisplay}[3]{\csuse{#1}{#2}#3} +\ifdef\texorpdfstring +{ + \newcommand*{\glsxtrentryfmt}[2]{% + \texorpdfstring{\@glsxtrentryfmt{#1}{#2}}{\glsxtrpdfentryfmt{#1}{#2}}% + } +} +{ + \newcommand*{\glsxtrentryfmt}{\@glsxtrentryfmt} +} +\newcommand*{\glsxtrpdfentryfmt}[2]{#2} +\newrobustcmd*{\@glsxtrentryfmt}[2]{% + {% + \protected@edef\glslabel{#1}% + \glsdoifexistsordo{#1}% + {% + \ifglshasfield{\GlsXtrFmtField}{#1}% + {% + \csuse{\glscurrentfieldvalue}{#2}% + }% + {#2}% + }% + {#2}% + }% +} +\newcommand*{\glsxtrfieldlistadd}[3]{% + \listcsadd{glo@\glsdetoklabel{#1}@#2}{#3}% +} +\newcommand*{\glsxtrfieldlistgadd}[3]{% + \listcsgadd{glo@\glsdetoklabel{#1}@#2}{#3}% +} +\newcommand*{\glsxtrfieldlisteadd}[3]{% + \listcseadd{glo@\glsdetoklabel{#1}@#2}{#3}% +} +\newcommand*{\glsxtrfieldlistxadd}[3]{% + \listcsxadd{glo@\glsdetoklabel{#1}@#2}{#3}% +} +\newcommand*{\glsxtrfielddolistloop}[2]{% + \dolistcsloop{glo@\glsdetoklabel{#1}@#2}% +} +\newcommand*{\glsxtrfieldforlistloop}[3]{% + \forlistcsloop{#3}{glo@\glsdetoklabel{#1}@#2}% +} +\newrobustcmd*{\glsxtrfieldformatlist}[2]{% + \begingroup + \def\@dtl@formatlist@itemsep{}% + \def\@dtl@formatlist@lastitem{}% + \def\@dtl@formatlist@prelastitem{}% + \def\@dtl@formatlist@prelastitemsep{}% + \forlistcsloop{\@dtl@formatlist@handler}{glo@\glsdetoklabel{#1}@#2}% + \@dtl@formatlist@prelastitem\@dtl@formatlist@lastitem + \endgroup +} +\newcommand*{\glsxtrfieldifinlist}[5]{% + \ifinlistcs{#3}{glo@\glsdetoklabel{#1}@#2}{#4}{#5}% +} +\newcommand*{\glsxtrfieldxifinlist}[5]{% + \xifinlistcs{#3}{glo@\glsdetoklabel{#1}@#2}{#4}{#5}% +} +\newcommand*{\glsxtrforcsvfield}{% + \@ifstar\s@glsxtrforcsvfield\@glsxtrforcsvfield +} +\newcommand*{\@glsxtrforcsvfield}[3]{% + \@glsxtrifhasfield{#2}{#1}% + {% + \let\glsxtrendfor\@endfortrue + \@for\@glsxtr@label:=\glscurrentfieldvalue\do + {\expandafter#3\expandafter{\@glsxtr@label}}}% + {}% +} +\newcommand*{\s@glsxtrforcsvfield}[3]{% + \s@glsxtrifhasfield{#2}{#1}% + {% + \let\glsxtrendfor\@endfortrue + \@for\@glsxtr@label:=\glscurrentfieldvalue\do + {\expandafter#3\expandafter{\@glsxtr@label}}}% + {}% +} +\newrobustcmd*{\glsxtrfieldformatcsvlist}[2]{% + \@glsxtrifhasfield{#2}{#1}% + {\@dtlformatlist\glscurrentfieldvalue}% + {}% +} +\newcommand*{\GlsXtrIfFieldValueInCsvList}{% + \@ifstar\s@GlsXtrIfFieldValueInCsvList\@GlsXtrIfFieldValueInCsvList +} +\newcommand*{\@GlsXtrIfFieldValueInCsvList}[5]{% + \@glsxtrifhasfield{#2}{#1}% + {% + \expandafter\DTLifinlist\expandafter{\glscurrentfieldvalue}% + {#3}{#4}{#5}% + }% + {#5}% +} +\newcommand*{\s@GlsXtrIfFieldValueInCsvList}[5]{% + \s@glsxtrifhasfield{#2}{#1}% + {% + \expandafter\DTLifinlist\expandafter{\glscurrentfieldvalue}% + {#3}{#4}{#5}% + }% + {#5}% +} +\newcommand*{\GlsXtrIfValueInFieldCsvList}{% + \@ifstar\s@GlsXtrIfValueInFieldCsvList\@GlsXtrIfValueInFieldCsvList +} +\newcommand*{\@GlsXtrIfValueInFieldCsvList}[5]{% + \@glsxtrifhasfield{#2}{#1}% + {% + \DTLifinlist{#3}{\glscurrentfieldvalue}{#4}{#5}% + }% + {#5}% +} +\newcommand*{\s@GlsXtrIfValueInFieldCsvList}[5]{% + \s@glsxtrifhasfield{#2}{#1}% + {% + \DTLifinlist{#3}{\glscurrentfieldvalue}{#4}{#5}% + }% + {#5}% +} +\newcommand*{\xGlsXtrIfValueInFieldCsvList}{% + \@ifstar\s@xGlsXtrIfValueInFieldCsvList\@xGlsXtrIfValueInFieldCsvList +} +\newcommand*{\@xGlsXtrIfValueInFieldCsvList}[5]{% + \@glsxtrifhasfield{#2}{#1}% + {% + \protected@edef\@gls@tmp{#3}% + \expandafter\DTLifinlist\expandafter{\@gls@tmp}{\glscurrentfieldvalue}{#4}{#5}% + }% + {#5}% +} +\newcommand*{\s@xGlsXtrIfValueInFieldCsvList}[5]{% + \s@glsxtrifhasfield{#2}{#1}% + {% + \protected@edef\@gls@tmp{#3}% + \expandafter\DTLifinlist\expandafter{\@gls@tmp}{\glscurrentfieldvalue}{#4}{#5}% + }% + {#5}% +} +\newrobustcmd{\glsxtrifhasfield}{% + \@ifstar{\s@glsxtrifhasfield}{\@glsxtrifhasfield}% +} +\newcommand{\@glsxtrifhasfield}[4]{% + {\s@glsxtrifhasfield{#1}{#2}{#3}{#4}}% +} +\newcommand{\s@glsxtrifhasfield}[4]{% + \letcs{\glscurrentfieldvalue}{glo@\glsdetoklabel{#2}@#1}% + \ifundef\glscurrentfieldvalue + {#4}% + {% + \ifdefempty\glscurrentfieldvalue{#4}{#3}% + }% +} +\newcommand{\GlsXtrIfFieldNonZero}{% + \@ifstar\s@GlsXtrIfFieldNonZero\@GlsXtrIfFieldNonZero +} +\newcommand{\@GlsXtrIfFieldNonZero}[4]{% + \@GlsXtrIfFieldCmpNum{#1}{#2}{=}{0}{#4}{#3}% +} +\newcommand{\s@GlsXtrIfFieldNonZero}[4]{% + \s@GlsXtrIfFieldCmpNum{#1}{#2}{=}{0}{#4}{#3}% +} +\newcommand{\GlsXtrIfFieldEqNum}{% + \@ifstar\s@GlsXtrIfFieldEqNum\@GlsXtrIfFieldEqNum +} +\newcommand{\@GlsXtrIfFieldEqNum}[5]{% + \@GlsXtrIfFieldCmpNum{#1}{#2}{=}{#3}{#4}{#5}% +} +\newcommand{\s@GlsXtrIfFieldEqNum}[5]{% + \s@GlsXtrIfFieldCmpNum{#1}{#2}{=}{#3}{#4}{#5}% +} +\newcommand{\GlsXtrIfFieldCmpNum}{% + \@ifstar\s@GlsXtrIfFieldCmpNum\@GlsXtrIfFieldCmpNum +} +\newcommand{\@GlsXtrIfFieldCmpNum}[6]{% + {% + \letcs{\glscurrentfieldvalue}{glo@\glsdetoklabel{#2}@#1}% + \ifundef\glscurrentfieldvalue + {\def\glscurrentfieldvalue{0}}% + {% + \ifdefempty\glscurrentfieldvalue + {\def\glscurrentfieldvalue{0}}% + {}% + }% + \ifnum\glscurrentfieldvalue#3#4\relax #5\else #6\fi + }% +} +\newcommand{\s@GlsXtrIfFieldCmpNum}[6]{% + \letcs{\glscurrentfieldvalue}{glo@\glsdetoklabel{#2}@#1}% + \ifundef\glscurrentfieldvalue + {\def\glscurrentfieldvalue{0}}% + {% + \ifdefempty\glscurrentfieldvalue + {\def\glscurrentfieldvalue{0}}% + {}% + }% + \ifnum\glscurrentfieldvalue#3#4\relax #5\else #6\fi +} +\newcommand{\GlsXtrIfFieldUndef}[2]{% + \ifcsundef{glo@\glsdetoklabel{#2}@#1}% +} +\newcommand*{\glsxtrusefield}[2]{% + \@gls@entry@field{#1}{#2}% +} +\ifdef\texorpdfstring +{ + \newcommand*{\Glsxtrusefield}[2]{% + \texorpdfstring + {\@Gls@entry@field{#1}{#2}} + {\@gls@entry@field{#1}{#2}}% + } +} +{ + \newcommand*{\Glsxtrusefield}[2]{% + \@Gls@entry@field{#1}{#2}% + } +} +\ifdef\texorpdfstring +{ + \newcommand*{\GLSxtrusefield}[2]{% + \texorpdfstring + {\glsdoifexists{#1}{\mfirstucMakeUppercase{\@gls@entry@field{#1}{#2}}}}% + {\@gls@entry@field{#1}{#2}}% + } +} +{ + \newcommand*{\GLSxtrusefield}[2]{% + \glsdoifexists{#1}{\mfirstucMakeUppercase{\@gls@entry@field{#1}{#2}}}% + } +} +\newcommand*{\glsxtrentryparentname}[1]{% + \ifcsdef{glo@\glsdetoklabel{#1}@parent}% + {\csuse{glo@\csuse{glo@\glsdetoklabel{#1}@parent}@name}}% + {}% +} +\newcommand*{\glsxtrdeffield}[2]{\csdef{glo@\glsdetoklabel{#1}@#2}} +\newcommand*{\glsxtredeffield}[2]{\protected@csedef{glo@\glsdetoklabel{#1}@#2}} +\newcommand*{\glsxtrapptocsvfield}[3]{% + \ifcsdef{glo@\glsdetoklabel{#1}@#2}% + {\csappto{glo@\glsdetoklabel{#1}@#2}{,#3}}% + {\csdef{glo@\glsdetoklabel{#1}@#2}{#3}}% +} +\newcommand*{\glsxtrsetfieldifexists}[3]{\glsdoifexists{#1}{#3}} +\newrobustcmd*{\GlsXtrSetField}[3]{% + \glsxtrsetfieldifexists{#1}{#2}% + {\csdef{glo@\glsdetoklabel{#1}@#2}{#3}}% +} +\newrobustcmd*{\GlstrLetField}[3]{% + \glsxtrsetfieldifexists{#1}{#2}% + {\cslet{glo@\glsdetoklabel{#1}@#2}{#3}}% +} +\newrobustcmd*{\csGlsXtrLetField}[3]{% + \glsxtrsetfieldifexists{#1}{#2}% + {\csletcs{glo@\glsdetoklabel{#1}@#2}{#3}}% +} +\newrobustcmd*{\GlsXtrLetFieldToField}[4]{% + \glsxtrsetfieldifexists{#1}{#2}% + {\csletcs{glo@\glsdetoklabel{#1}@#2}{glo@\glsdetoklabel{#3}@#4}}% +} +\newrobustcmd*{\gGlsXtrSetField}[3]{% + \glsxtrsetfieldifexists{#1}{#2}% + {\csgdef{glo@\glsdetoklabel{#1}@#2}{#3}}% +} +\newrobustcmd*{\xGlsXtrSetField}[3]{% + \glsxtrsetfieldifexists{#1}{#2}% + {\protected@csxdef{glo@\glsdetoklabel{#1}@#2}{#3}}% +} +\newrobustcmd*{\eGlsXtrSetField}[3]{% + \glsxtrsetfieldifexists{#1}{#2}% + {\protected@csedef{glo@\glsdetoklabel{#1}@#2}{#3}}% +} +\newcommand*{\GlsXtrIfFieldEqStr}{% + \@ifstar\s@GlsXtrIfFieldEqStr\@GlsXtrIfFieldEqStr +} +\newrobustcmd*{\@GlsXtrIfFieldEqStr}[5]{% + \@glsxtrifhasfield{#1}{#2}% + {% + \ifdefstring{\glscurrentfieldvalue}{#3}{#4}{#5}% + }% + {#5}% +} +\newrobustcmd*{\s@GlsXtrIfFieldEqStr}[5]{% + \s@glsxtrifhasfield{#1}{#2}% + {% + \ifdefstring{\glscurrentfieldvalue}{#3}{#4}{#5}% + }% + {#5}% +} +\newcommand*{\GlsXtrIfFieldEqXpStr}{% + \@ifstar\s@GlsXtrIfFieldEqXpStr\@GlsXtrIfFieldEqXpStr +} +\newrobustcmd*{\@GlsXtrIfFieldEqXpStr}[5]{% + \@glsxtrifhasfield{#1}{#2}% + {% + \protected@edef\@gls@tmp{#3}% + \ifdefequal{\glscurrentfieldvalue}{\@gls@tmp}{#4}{#5}% + }% + {#5}% +} +\newrobustcmd*{\s@GlsXtrIfFieldEqXpStr}[5]{% + \s@glsxtrifhasfield{#1}{#2}% + {% + \protected@edef\@gls@tmp{#3}% + \ifdefequal{\glscurrentfieldvalue}{\@gls@tmp}{#4}{#5}% + }% + {#5}% +} +\newcommand*{\GlsXtrIfXpFieldEqXpStr}{% + \@ifstar\s@GlsXtrIfXpFieldEqXpStr\@GlsXtrIfXpFieldEqXpStr +} +\newrobustcmd*{\@GlsXtrIfXpFieldEqXpStr}[5]{% + \@glsxtrifhasfield{#1}{#2}% + {% + \protected@edef\@gls@tmp{\glscurrentfieldvalue}% + \let\glscurrentfieldvalue\@gls@tmp + \protected@edef\@gls@tmp{#3}% + \ifdefequal{\glscurrentfieldvalue}{\@gls@tmp}{#4}{#5}% + }% + {#5}% +} +\newrobustcmd*{\s@GlsXtrIfXpFieldEqXpStr}[5]{% + \s@glsxtrifhasfield{#1}{#2}% + {% + \protected@edef\@gls@tmp{\glscurrentfieldvalue}% + \let\glscurrentfieldvalue\@gls@tmp + \protected@edef\@gls@tmp{#3}% + \ifdefequal{\glscurrentfieldvalue}{\@gls@tmp}{#4}{#5}% + }% + {#5}% +} +\ifdef\foreignlanguage +{ + \ifdef\GetTrackedDialectFromLanguageTag + { + \newcommand{\GlsXtrForeignText}[2]{% + \let\@glsxtr@org@currentfieldvalue\glscurrentfieldvalue + \glsxtrifhasfield{\GlsXtrForeignTextField}{#1}% + {% + \expandafter\GetTrackedDialectFromLanguageTag\expandafter + {\glscurrentfieldvalue}{\@glsxtr@dialect}% + \let\@glsxtr@locale\glscurrentfieldvalue + \let\glscurrentfieldvalue\@glsxtr@org@currentfieldvalue + \ifdefempty\@glsxtr@dialect + {% + \ifundef\TrackedDialectClosestSubMatch + {% + \GlossariesExtraWarning{Can't obtain dialect label + (tracklang v1.3.6+ required)}% + }% + {\let\@glsxtr@dialect\TrackedDialectClosestSubMatch}% + }% + {}% + \ifdefempty\@glsxtr@dialect + {% + }% + {% + \ifcsundef{captions\@glsxtr@dialect}{}% + {% + \IfTrackedDialectHasMapping{\@glsxtr@dialect}% + {% + \edef\@glsxtr@dialect{% + \GetTrackedDialectToMapping{\@glsxtr@dialect}}% + \ifcsundef{captions\@glsxtr@dialect}{}% + {% + \ifcsundef{captions\@tracklang@lang}{}% + {% + \let\@glsxtr@dialect\@tracklang@lang + }% + }% + }% + {% + \ifcsundef{captions\@tracklang@lang}{}% + {% + \let\@glsxtr@dialect\@tracklang@lang + }% + }% + }% + }% + \ifdefempty\@glsxtr@dialect + {% + \GlsXtrUnknownDialectWarning{\@glsxtr@locale}{\@tracklang@lang}% + #2% + }% + {\foreignlanguage{\@glsxtr@dialect}{#2}}% + }% + {#2}% key not set + } + } + { + \newcommand{\GlsXtrForeignText}[2]{% + \GlossariesExtraWarning{Can't encapsulate foreign text: + tracklang v1.3.6+ required}% + #2% + } + } +} +{ + \newcommand{\GlsXtrForeignText}[2]{#2} +} +\newcommand*{\GlsXtrForeignTextField}{userii} +\newcommand*{\GlsXtrUnknownDialectWarning}[2]{% + \GlossariesExtraWarning{Can't determine valid dialect label + for locale `#1' (root language: #2)}% +} +\ifdef\GlsEntryCounterLabelPrefix +{% + \newcommand*{\glsxtrpageref}[1]{% + \ifglsentrycounter + \pageref{\GlsEntryCounterLabelPrefix\glsdetoklabel{#1}}% + \else + \ifglssubentrycounter + \pageref{\GlsEntryCounterLabelPrefix\glsdetoklabel{#1}}% + \else + \gls{#1}% + \fi + \fi + } +}% +{% + \newcommand*{\glsxtrpageref}[1]{% + \ifglsentrycounter + \pageref{glsentry-\glsdetoklabel{#1}}% + \else + \ifglssubentrycounter + \pageref{glsentry-\glsdetoklabel{#1}}% + \else + \gls{#1}% + \fi + \fi + } +}% +\newcommand{\apptoglossarypreamble}[2][\glsdefaulttype]{% + \ifcsdef{glolist@#1}% + {% + \ifcsundef{@glossarypreamble@#1}% + {\csdef{@glossarypreamble@#1}{}}% + {}% + \csappto{@glossarypreamble@#1}{#2}% + }% + {% + \GlossariesExtraWarning{Glossary `#1' is not defined}% + }% +} +\newcommand{\preglossarypreamble}[2][\glsdefaulttype]{% + \ifcsdef{glolist@#1}% + {% + \ifcsundef{@glossarypreamble@#1}% + {\csdef{@glossarypreamble@#1}{}}% + {}% + \cspreto{@glossarypreamble@#1}{#2}% + }% + {% + \GlossariesExtraWarning{Glossary `#1' is not defined}% + }% +} +\ifdef\@gls@entry@field +{ + \renewcommand*{\@gls@entry@field}[2]{\csuse{glo@\glsdetoklabel{#1}@#2}} +} +{} +\renewcommand*{\ifglsused}[3]{% + \glsdoifexists{#1}{\ifbool{glo@\glsdetoklabel{#1}@flag}{#2}{#3}}% +} +\renewcommand*{\longnewglossaryentry}{% + \@ifstar\@glsxtr@s@longnewglossaryentry\@glsxtr@longnewglossaryentry +} +\newcommand{\@glsxtr@s@longnewglossaryentry}[3]{% + \glsdoifnoexists{#1}% + {% + \bgroup + \let\@org@newglossaryentryprehook\@newglossaryentryprehook + \long\def\@newglossaryentryprehook{% + \long\def\@glo@desc{#3}% + \@org@newglossaryentryprehook + }% + \renewcommand*{\gls@assign@desc}[1]{% + \global\cslet{glo@\glsdetoklabel{#1}@desc}{\@glo@desc}% + \global\cslet{glo@\glsdetoklabel{#1}@descplural}{\@glo@descplural}% + } + \gls@defglossaryentry{#1}{#2}% + \egroup + }% +} +\newcommand{\@glsxtr@longnewglossaryentry}[3]{% + \glsdoifnoexists{#1}% + {% + \bgroup + \let\@org@newglossaryentryprehook\@newglossaryentryprehook + \long\def\@newglossaryentryprehook{% + \long\def\@glo@desc{#3\glsxtrpostlongdescription}% + \@org@newglossaryentryprehook + }% + \renewcommand*{\gls@assign@desc}[1]{% + \global\cslet{glo@\glsdetoklabel{#1}@desc}{\@glo@desc}% + \global\cslet{glo@\glsdetoklabel{#1}@descplural}{\@glo@descplural}% + } + \gls@defglossaryentry{#1}{#2}% + \egroup + }% +} +\newcommand*{\glsxtrpostlongdescription}{\leavevmode\unskip\nopostdesc} +\renewcommand{\newignoredglossary}{% + \@ifstar\glsxtr@s@newignoredglossary\glsxtr@org@newignoredglossary +} +\newcommand*{\glsxtr@org@newignoredglossary}[1]{% + \ifcsdef{glolist@#1} + {% + \glsxtrundefaction{Glossary type `#1' already exists}{}% + }% + {% + \ifdefempty\@ignored@glossaries + {% + \protected@edef\@ignored@glossaries{#1}% + }% + {% + \protected@eappto\@ignored@glossaries{,#1}% + }% + \csgdef{glolist@#1}{,}% + \ifcsundef{gls@#1@entryfmt}% + {% + \defglsentryfmt[#1]{\glsentryfmt}% + }% + {}% + \ifdefempty\@gls@nohyperlist + {% + \renewcommand*{\@gls@nohyperlist}{#1}% + }% + {% + \protected@eappto\@gls@nohyperlist{,#1}% + }% + }% +} +\newcommand*{\glsxtr@s@newignoredglossary}[1]{% + \ifcsdef{glolist@#1} + {% + \glsxtrundefaction{Glossary type `#1' already exists}{}% + }% + {% + \ifdefempty\@ignored@glossaries + {% + \protected@edef\@ignored@glossaries{#1}% + }% + {% + \protected@eappto\@ignored@glossaries{,#1}% + }% + \csgdef{glolist@#1}{,}% + \ifcsundef{gls@#1@entryfmt}% + {% + \defglsentryfmt[#1]{\glsentryfmt}% + }% + {}% + }% +} +\glsifusetranslator +{% + \renewcommand*{\glssettoctitle}[1]{% + \ifcsdef{gls@tr@set@#1@toctitle}% + {% + \csuse{gls@tr@set@#1@toctitle}% + }% + {% + \ifcsdef{@glotype@#1@title}% + {\def\glossarytoctitle{\csname @glotype@#1@title\endcsname}}% + {\def\glossarytoctitle{\glossarytitle}}% + }% + }% +} +{ + \renewcommand*{\glssettoctitle}[1]{% + \ifcsdef{@glotype@#1@title}% + {\def\glossarytoctitle{\csname @glotype@#1@title\endcsname}}% + {\def\glossarytoctitle{\glossarytitle}}% + } +} +\newcommand{\provideignoredglossary}{% + \@ifstar\glsxtr@s@provideignoredglossary\glsxtr@provideignoredglossary +} +\newcommand*{\glsxtr@provideignoredglossary}[1]{% + \ifcsdef{glolist@#1} + {}% + {% + \ifdefempty\@ignored@glossaries + {% + \protected@edef\@ignored@glossaries{#1}% + }% + {% + \protected@eappto\@ignored@glossaries{,#1}% + }% + \csgdef{glolist@#1}{,}% + \ifcsundef{gls@#1@entryfmt}% + {% + \defglsentryfmt[#1]{\glsentryfmt}% + }% + {}% + \ifdefempty\@gls@nohyperlist + {% + \renewcommand*{\@gls@nohyperlist}{#1}% + }% + {% + \protected@eappto\@gls@nohyperlist{,#1}% + }% + }% +} +\newcommand*{\glsxtr@s@provideignoredglossary}[1]{% + \ifcsdef{glolist@#1} + {}% + {% + \ifdefempty\@ignored@glossaries + {% + \protected@edef\@ignored@glossaries{#1}% + }% + {% + \protected@eappto\@ignored@glossaries{,#1}% + }% + \csgdef{glolist@#1}{,}% + \ifcsundef{gls@#1@entryfmt}% + {% + \defglsentryfmt[#1]{\glsentryfmt}% + }% + {}% + }% +} +\newcommand*{\glsxtrcopytoglossary}[2]{% + \glsdoifexists{#1}% + {% + \ifcsdef{glolist@#2} + {% + \protected@cseappto{glolist@#2}{#1,}% + }% + {% + \glsxtrundefaction{Glossary type `#2' doesn't exist}{}% + }% + }% +} +\renewcommand{\glsdoifexists}[2]{% + \ifglsentryexists{#1}{#2}% + {% + \protected@edef\glslabel{\glsdetoklabel{#1}}% + \glsxtrundefaction{Glossary entry `\glslabel' + has not been defined}{You need to define a glossary entry before + you can reference it.}% + }% +} +\renewcommand{\glsdoifnoexists}[2]{% + \ifglsentryexists{#1}{% + \glsxtrundefaction{Glossary entry `\glsdetoklabel{#1}' + has already been defined}{}}{#2}% +} +\ifdef\glsdoifexistsordo +{% + \renewcommand{\glsdoifexistsordo}[3]{% + \ifglsentryexists{#1}{#2}% + {% + \glsxtrundefaction{Glossary entry `\glsdetoklabel{#1}' + has not been defined}{You need to define a glossary entry + before you can use it.}% + #3% + }% + }% +} +{% + \glsxtr@warnonexistsordo\glsdoifexistsordo + \newcommand{\glsdoifexistsordo}[3]{% + \ifglsentryexists{#1}{#2}% + {% + \glsxtrundefaction{Glossary entry `\glsdetoklabel{#1}' + has not been defined}{You need to define a glossary entry + before you can use it.}% + #3% + }% + }% +} +\ifdef\doifglossarynoexistsordo +{% + \renewcommand{\doifglossarynoexistsordo}[3]{% + \ifglossaryexists*{#1}% + {% + \glsxtrundefaction{Glossary type `#1' already exists}{}% + #3% + }% + {#2}% + }% +} +{% + \glsxtr@warnonexistsordo\doifglossarynoexistsordo + \newcommand{\doifglossarynoexistsordo}[3]{% + \ifglossaryexists*{#1}% + {% + \glsxtrundefaction{Glossary type `#1' already exists}{}% + #3% + }% + {#2}% + }% +} + +\appto\@newglossaryentryposthook{% + \ifdefvoid\@glo@see + {\csxdef{glo@\@glo@label @see}{}}% + {% + \csxdef{glo@\@glo@label @see}{\@glo@see}% + \if@glsxtr@autoseeindex + \@glsxtr@autoindexcrossrefs + \fi + }% +} +\appto\@gls@keymap{,{see}{see}} +\newcommand*{\glsxtrusesee}[1]{% + \glsdoifexists{#1}% + {% + \letcs{\@glo@see}{glo@\glsdetoklabel{#1}@see}% + \ifdefempty\@glo@see + {}% + {% + \expandafter\glsxtr@usesee\@glo@see\@end@glsxtr@usesee + }% + }% +} +\newcommand*{\glsxtr@usesee}[1][\seename]{% + \@glsxtr@usesee[#1]% +} +\def\@glsxtr@usesee[#1]#2\@end@glsxtr@usesee{% + \glsxtruseseeformat{#1}{#2}% +} +\newcommand*{\glsxtruseseeformat}[2]{% + \glsseeformat[#1]{#2}{}% +} +\renewcommand*{\glsseeitemformat}[1]{% + \ifglshasshort{#1}{\glsfmttext{#1}}{\glsfmtname{#1}}% +} +\newcommand*{\glsxtrhiername}[1]{% + \glsdoifexists{#1}% + {% + \glsxtrifhasfield{parent}{#1}% + {\glsxtrhiername{\glscurrentfieldvalue}\glsxtrhiernamesep}% + {}% + \ifglshasshort{#1}{\glsfmttext{#1}}{\glsfmtname{#1}}% + }% +} +\newcommand*{\Glsxtrhiername}[1]{% + \glsdoifexists{#1}% + {% + \glsxtrifhasfield{parent}{#1}% + {% + \Glsxtrhiername{\glscurrentfieldvalue}\glsxtrhiernamesep + \ifglshasshort{#1}{\glsfmttext{#1}}{\glsfmtname{#1}}% + }% + {\ifglshasshort{#1}{\Glsfmttext{#1}}{\Glsfmtname{#1}}}% + }% +} +\newcommand*{\GlsXtrhiername}[1]{% + \glsdoifexists{#1}% + {% + \glsxtrifhasfield{parent}{#1}% + {\GlsXtrhiername{\glscurrentfieldvalue}\glsxtrhiernamesep}% + {}% + \ifglshasshort{#1}{\Glsfmttext{#1}}{\Glsfmtname{#1}}% + }% +} +\newcommand*{\GLSxtrhiername}[1]{% + \glsdoifexists{#1}% + {% + \glsxtrifhasfield{parent}{#1}% + {% + \GLSxtrhiername{\glscurrentfieldvalue}\glsxtrhiernamesep + \ifglshasshort{#1}{\glsfmttext{#1}}{\glsfmtname{#1}}% + }% + {\ifglshasshort{#1}{\GLSfmttext{#1}}{\GLSfmtname{#1}}}% + }% +} +\newcommand*{\GLSXTRhiername}[1]{% + \glsdoifexists{#1}% + {% + \glsxtrifhasfield{parent}{#1}% + {\GLSXTRhiername{\glscurrentfieldvalue}\glsxtrhiernamesep}% + {} + \ifglshasshort{#1}{\GLSfmttext{#1}}{\GLSfmtname{#1}}% + }% +} +\newcommand*{\glsxtrhiernamesep}{\,{\small$\triangleright$}\,} +\newcommand*{\glsxtruseseealso}[1]{% + \glsdoifexists{#1}% + {% + \letcs{\@glo@see}{glo@\glsdetoklabel{#1}@seealso}% + \ifdefempty\@glo@see + {}% + {% + \expandafter\glsxtruseseealsoformat\expandafter{\@glo@see}% + }% + }% +} +\newcommand*{\glsxtrusealias}[1]{% + \glsdoifexists{#1}% + {% + \letcs{\@glo@see}{glo@\glsdetoklabel{#1}@alias}% + \ifdefempty\@glo@see + {}% + {% + \glsxtruseseeformat{\seename}{\@glo@see}% + }% + }% +} +\newcommand*{\glsxtruseseealsoformat}[1]{% + \glsseeformat[\seealsoname]{#1}{}% +} +\newrobustcmd{\glsxtrseelist}[1]{% + \protected@edef\@glo@tmp{\noexpand\glsseelist{#1}}\@glo@tmp +} +\renewrobustcmd*{\glsseelist}[1]{% + \let\@gls@dolast\relax + \let\@gls@donext\relax + \let\@glsseeitem\@glsxtr@seefirstitem + \let\@glsseelastsep\glsseelastsep + \@for\@gls@thislabel:=#1\do{% + \ifx\@xfor@nextelement\@nnil + \@gls@dolast + \else + \@gls@donext + \fi + \expandafter\@glsseeitem\expandafter{\@gls@thislabel}% + \let\@gls@dolast\@glsseelastsep + \let\@gls@donext\glsseesep + \let\@glsseeitem\@glsxtr@seeitem + \let\@glsseelastsep\glsseelastoxfordsep + }% +} +\newcommand*{\@glsxtr@seeitem}[1]{% + \glsxtrifmulti{#1}{\mglsseeitem{#1}}{\glsseeitem{#1}}% +} +\newcommand*{\@glsxtr@seefirstitem}[1]{% + \glsxtrifmulti{#1}{\mglsseefirstitem{#1}}{\glsseefirstitem{#1}}% +} +\newcommand*{\mglsseeitem}[1]{% + \mglsname[all={noindex},setup={hyper=allmain}]{#1}% +} +\newcommand*{\mglsseefirstitem}{\mglsseeitem} +\newcommand*{\glsseefirstitem}{\glsseeitem} +\newcommand*{\glsseelastoxfordsep}{\glsseelastsep} +\ifdef\alsoname +{\providecommand{\seealsoname}{\alsoname}} +{\providecommand{\seealsoname}{see also}} +\ifdef\@xdycrossrefhook +{ + \appto\@xdycrossrefhook{% + \write\glswrite{(define-crossref-class \string"seealso\string" + :unverified )}% + \write\glswrite{(markup-crossref-list + :class \string"seealso\string"^^J\space\space\space + :open \string"\string\glsxtruseseealsoformat\glsopenbrace\string" + :close \string"\glsclosebrace\string")}% + } + \appto\@xdylocationclassorder{\space\string"seealso\string"} + \newrobustcmd*{\glsxtrindexseealso}[2]{% + \ifx\@glsxtr@record@setting\@glsxtr@record@setting@alsoindex + \@glsxtr@recordsee{#1}{#2}% + \fi + \glsdoifexists{#1}% + {% + \@@glsxtrwrglossmark + \def\@gls@xref{#2}% + \@onelevel@sanitize\@gls@xref + \@gls@checkmkidxchars\@gls@xref + \gls@glossary{\csname glo@#1@type\endcsname}{% + (indexentry + :tkey (\csname glo@#1@index\endcsname) + :xref (\string"\@gls@xref\string") + :attr \string"seealso\string" + ) + }% + }% + } +} +{ + \newrobustcmd*{\glsxtrindexseealso}{\glssee[\seealsoname]} +} +\ifdef\gls@set@xr@key +{ + \define@key{glossentry}{alias}{% + \gls@set@xr@key{alias}{\@glo@alias}{#1}% + } + \define@key{glossentry}{seealso}{% + \gls@set@xr@key{seealso}{\@glo@seealso}{#1}% + } + \appto\@gls@keymap{,{alias}{alias},{seealso}{seealso}} + \appto\@newglossaryentryprehook{\def\@glo@alias{}\def\@glo@seealso{}}% + \appto\@newglossaryentryposthook{% + \ifdefvoid\@glo@seealso + {\csxdef{glo@\@glo@label @seealso}{}}% + {% + \csxdef{glo@\@glo@label @seealso}{\@glo@seealso}% + \if@glsxtr@autoseeindex + \@glsxtr@autoindexcrossrefs + \fi + }% + \ifdefvoid\@glo@alias + {\csxdef{glo@\@glo@label @alias}{}}% + {% + \csxdef{glo@\@glo@label @alias}{\@glo@alias}% + }% + } + \newcommand*{\glsxtralias}[1]{\@gls@entry@field{#1}{alias}} + \newcommand*{\glsxtrseealsolabels}[1]{\@gls@entry@field{#1}{seealso}} + \appto\@glo@autoseehook{% + \ifdefvoid\@glo@alias + {% + \ifdefvoid\@glo@seealso + {}% + {% + \protected@edef\@do@glssee{\noexpand\glsxtrindexseealso + {\@glo@label}{\@glo@seealso}}% + \@do@glssee + }% + }% + {% + \ifdefvoid\@glo@see + {% + \protected@edef\@do@glssee{\noexpand\glssee{\@glo@label}{\@glo@alias}}% + \@do@glssee + }% + {}% + }% + }% +} +{ + \glsaddstoragekey*{alias}{}{\glsxtralias} + \glsaddstoragekey*{seealso}{}{\glsxtrseealsolabels} + \appto\@newglossaryentryposthook{% + \ifcsvoid{glo@\@glo@label @alias}% + {% + \ifcsvoid{glo@\@glo@label @seealso}% + {}% + {% + \protected@edef\@do@glssee{\noexpand\glsxtrindexseealso + {\@glo@label}{\csuse{glo@\@glo@label @seealso}}}% + \@do@glssee + }% + }% + {% + \ifdefvoid\@glo@see + {% + \protected@edef\@do@glssee{\noexpand\glssee + {\@glo@label}{\csuse{glo@\@glo@label @alias}}}% + \@do@glssee + }% + {}% + }% + } +} +\AtEndDocument{\if@glsxtrindexcrossrefs\glsxtraddallcrossrefs\fi} +\newcommand*{\glsxtraddallcrossrefs}{% + \forallglossaries{\@glo@type}% + {% + \forglsentries[\@glo@type]{\@glo@label}% + {% + \ifglsused{\@glo@label}% + {\expandafter\@glsxtr@addunusedxrefs\expandafter{\@glo@label}}{}% + }% + }% +} +\newcommand*{\@glsxtr@addunusedxrefs}[1]{% + \letcs{\@glo@see}{glo@\glsdetoklabel{#1}@see}% + \ifdefvoid\@glo@see + {}% + {% + \expandafter\glsxtr@addunused\@glo@see\@end@glsxtr@addunused + }% + \letcs{\@glo@see}{glo@\glsdetoklabel{#1}@seealso}% + \ifdefvoid\@glo@see + {}% + {% + \expandafter\glsxtr@addunused\@glo@see\@end@glsxtr@addunused + }% +} +\newcommand*{\glsxtr@addunused}[1][]{% + \@glsxtr@addunused +} +\def\@glsxtr@addunused#1\@end@glsxtr@addunused{% + \@for\@glsxtr@label:=#1\do + {% + \glsxtrifmulti\@glsxtr@label + {% + \letcs\@glsxtr@labellist{@gls@combined@\@glsxtr@label @list}% + \@for\@glsxtr@multilabel:=\@glsxtr@labellist\do + {\@glsxtr@addunused\@glsxtr@multilabel\@end@glsxtr@addunused}% + }% + {% + \ifglsused{\@glsxtr@label}{}% + {% + \glsadd[format=glsxtrunusedformat]{\@glsxtr@label}% + \glsunset{\@glsxtr@label}% + \expandafter\@glsxtr@addunusedxrefs\expandafter{\@glsxtr@label}% + }% + }% + }% +} +\newcommand*{\glsxtrunusedformat}[1]{\unskip} +\ifdef\gls@begindocdefs +{% + \renewcommand*{\gls@begindocdefs}{% + \ifnum\@glsxtr@docdefval=1\relax + \@gls@enablesavenonumberlist + \edef\@gls@restoreat{% + \noexpand\catcode`\noexpand\@=\number\catcode`\@\relax}% + \makeatletter + \InputIfFileExists{\jobname.glsdefs}{}{}% + \@gls@restoreat + \undef\@gls@restoreat + \gls@defdocnewglossaryentry + \else + \ifnum\@glsxtr@docdefval=3\relax + \@gls@enablesavenonumberlist + \let\gls@checkseeallowed\relax + \let\newglossaryentry\new@atom@glossaryentry + \global\newwrite\@gls@deffile + \immediate\openout\@gls@deffile=\jobname.glsdefs + \forallglsentries{\@glsentry}{\@gls@writedef{\@glsentry}}% + \fi + \fi + } +} +{% + \ifnum\@glsxtr@docdefval=3\relax + \PackageError{glossaries-extra}{Package option + `docdef=\@glsxtr@docdefsetting' requires at least version 4.37 + of the base glossaries.sty package}{} + \fi +} +\newrobustcmd{\new@atom@glossaryentry}[2]{% + \gls@defglossaryentry{#1}{#2}% + \@gls@writedef{#1}% +} +\let\glsxtr@orgmakenoidxglossaries\makenoidxglossaries +\renewcommand{\makenoidxglossaries}{% + \@domakeglossaries + {% + \ifdefequal\@glsxtr@record@setting\@glsxtr@record@setting@off + {% + \glsxtr@orgmakenoidxglossaries + \renewcommand{\@do@seeglossary}[2]{% + \@@glsxtrwrglossmark + \protected@edef\@gls@label{\glsdetoklabel{##1}}% + \protected@write\@auxout{}{% + \string\@gls@reference + {\csname glo@\@gls@label @type\endcsname}% + {\@gls@label}% + {% + \string\glsseeformat##2{}% + }% + }% + }% + \if@glsxtrdocdefrestricted + \renewcommand*{\@gls@reference}[3]{% + \ifcsundef{@glsref@##1}{\csgdef{@glsref@##1}{}}{}% + \ifinlistcs{##2}{@glsref@##1}% + {}% + {\listcsgadd{@glsref@##1}{##2}}% + \ifcsundef{glo@\glsdetoklabel{##2}@loclist}% + {\csgdef{glo@\glsdetoklabel{##2}@loclist}{}}% + {}% + \listcsgadd{glo@\glsdetoklabel{##2}@loclist}{##3}% + }% + \else + \@glsxtrdocdeffalse + \fi + \disable@keys{glossaries-extra.sty}{docdef}% + }% + {% + \PackageError{glossaries-extra}{\string\makenoidxglossaries\space + not permitted\MessageBreak + with record=\@glsxtr@record@setting\space package option}% + {You may only use \string\makenoidxglossaries\ space with the + record=off option}% + }% + }% +} +\renewcommand*{\gls@defdocnewglossaryentry}{% + \ifcase\@glsxtr@docdefval + \renewcommand*{\newglossaryentry}[2]{% + \PackageError{glossaries-extra}{Glossary entries must + be \MessageBreak defined in the preamble with \MessageBreak + package option `docdef=false'\MessageBreak(consider using + `docdef=restricted')}{Move your glossary definitions to + the preamble. You can also put them in a \MessageBreak separate file + and load them with \string\loadglsentries.}% + }% + \or + \let\gls@checkseeallowed\relax + \let\newglossaryentry\new@glossaryentry + \else + \let\gls@checkseeallowed\relax + \fi +}% +\newcommand*{\GlsXtrEnableOnTheFly}{% + \@ifstar\@sGlsXtrEnableOnTheFly\@GlsXtrEnableOnTheFly +} +\newcommand*{\@sGlsXtrEnableOnTheFly}{% + \renewcommand*{\glsdetoklabel}[1]{% + \expandafter\@glsxtr@ifcsstart\string##1 \@glsxtr@end@ + {% + \expandafter\detokenize\expandafter{##1}% + }% + {\detokenize{##1}}% + }% + \@GlsXtrEnableOnTheFly +} +\def\@glsxtr@ifcsstart#1#2\@glsxtr@end@#3#4{% + \expandafter\if\glsbackslash#1% + #3% + \else + #4% + \fi +} +\newcommand*{\glsxtrstarflywarn}{% + \GlossariesExtraWarning{Experimental starred version of + \string\GlsXtrEnableOnTheFly\space in use (please ensure you have + read the warnings in the glossaries-extra user manual)}% +} +\newcommand*{\@GlsXtrEnableOnTheFly}{% + \newcommand*{\glsxtrcat}{general} + \newcommand*{\glsxtr}[1][]{% + \def\glsxtr@keylist{##1}% + \@glsxtr + } + \newcommand*{\@glsxtr}[2][]{% + \ifglsentryexists{##2}% + {% + \ifblank{##1}{}{\GlsXtrWarning{##1}{##2}}% + }% + {% + \gls@defglossaryentry{##2}{name={##2},category=\glsxtrcat, + description={\nopostdesc},##1}% + }% + \expandafter\gls\expandafter[\glsxtr@keylist]{##2}% + } + \newcommand*{\Glsxtr}[1][]{% + \def\glsxtr@keylist{##1}% + \@Glsxtr + } + \newcommand*{\@Glsxtr}[2][]{% + \ifglsentryexists{##2}% + {% + \ifblank{##1}{}{\GlsXtrWarning{##1}{##2}}% + }% + {% + \gls@defglossaryentry{##2}{name={##2},category=\glsxtrcat, + description={\nopostdesc},##1}% + }% + \expandafter\Gls\expandafter[\glsxtr@keylist]{##2}% + } + \newcommand*{\glsxtrpl}[1][]{% + \def\glsxtr@keylist{##1}% + \@glsxtrpl + } + \newcommand*{\@glsxtrpl}[2][]{% + \ifglsentryexists{##2}% + {% + \ifblank{##1}{}{\GlsXtrWarning{##1}{##2}}% + }% + {% + \gls@defglossaryentry{##2}{name={##2},category=\glsxtrcat, + description={\nopostdesc},##1}% + }% + \expandafter\glspl\expandafter[\glsxtr@keylist]{##2}% + } + \newcommand*{\Glsxtrpl}[1][]{% + \def\glsxtr@keylist{##1}% + \@Glsxtrpl + } + \newcommand*{\@Glsxtrpl}[2][]{% + \ifglsentryexists{##2} + {% + \ifblank{##1}{}{\GlsXtrWarning{##1}{##2}}% + }% + {% + \gls@defglossaryentry{##2}{name={##2},category=\glsxtrcat, + description={\nopostdesc},##1}% + }% + \expandafter\Glspl\expandafter[\glsxtr@keylist]{##2}% + } + \newcommand*{\GlsXtrWarning}[2]{% + \def\@glsxtr@optlist{##1}% + \@onelevel@sanitize\@glsxtr@optlist + \GlossariesExtraWarning{The options `\@glsxtr@optlist' have + been ignored for entry `##2' as it has already been defined}% + } + \renewcommand\@printglossary[2]{% + \def\@glsxtr@printglossopts{##1}% + \@glsxtr@orgprintglossary{##1}{##2}% + \def\@glsxtr{\@glsxtr@disabledflycommand\glsxtr}% + \def\@glsxtrpl{\@glsxtr@disabledflycommand\glsxtrpl}% + \def\@Glsxtr{\@glsxtr@disabledflycommand\Glsxtr}% + \def\@Glsxtrpl{\@glsxtr@disabledflycommand\Glsxtrpl}% + } + \newcommand*{\@glsxtr@disabledflycommand}[1]{% + \PackageError{glossaries-extra}% + {\string##1\space can't be used after any of the \MessageBreak + glossaries have been displayed}% + {The on-the-fly commands enabled by + \string\GlsXtrEnableOnTheFly\space may only be used \MessageBreak + before the glossaries. If you want to use any entries \MessageBreak + after any of the glossaries, you must use the standard \MessageBreak + method of first defining the entry and then using the \MessageBreak + entry with commands like \string\gls}% + \@@glsxtr@disabledflycommand + }% + \newcommand*{\@@glsxtr@disabledflycommand}[2][]{##2} + \let\GlsXtrEnableOnTheFly\relax +} +\@onlypreamble\GlsXtrEnableOnTheFly +\newcommand*{\@glsxtr@current@style}{\@glossary@default@style} +\renewcommand*{\setglossarystyle}[1]{% + \ifcsundef{@glsstyle@#1}% + {% + \PackageError{glossaries-extra}{Glossary style `#1' undefined}{}% + }% + {% + \csname @glsstyle@#1\endcsname + \protected@edef\@glsxtr@current@style{#1}% + }% + \ifx\@glossary@default@style\relax + \protected@edef\@glossary@default@style{#1}% + \fi +} +\ifdef\@glossary@default@style +{} +{% + \let\@glossary@default@style\relax +} +\ifdef\glslistdottedwidth +{% + \ifdim\glslistdottedwidth=.5\hsize + \setlength{\glslistdottedwidth}{-\dimexpr\maxdimen-1sp\relax} + \AtBeginDocument{% + \ifdim\glslistdottedwidth=-\dimexpr\maxdimen-1sp\relax + \setlength{\glslistdottedwidth}{.5\columnwidth}% + \fi + }% + \fi +} +{}% +\ifdef\glsdescwidth +{% + \ifdim\glsdescwidth=.6\hsize + \setlength{\glsdescwidth}{-\dimexpr\maxdimen-1sp\relax} + \AtBeginDocument{% + \ifdim\glsdescwidth=-\dimexpr\maxdimen-1sp\relax + \setlength{\glsdescwidth}{.6\columnwidth}% + \fi + }% + \fi +} +{}% +\ifdef\glspagelistwidth +{% + \ifdim\glspagelistwidth=.1\hsize + \setlength{\glspagelistwidth}{-\dimexpr\maxdimen-1sp\relax} + \AtBeginDocument{% + \ifdim\glspagelistwidth=-\dimexpr\maxdimen-1sp\relax + \setlength{\glspagelistwidth}{.1\columnwidth}% + \fi + }% + \fi +} +{}% +\def\org@glossaryentrynumbers#1{#1\gls@save@numberlist{#1}}% +\ifx\org@glossaryentrynumbers\glossaryentrynumbers + \glsnonumberlistfalse + \renewcommand*{\glossaryentrynumbers}[1]{% + \ifglsentryexists{\glscurrententrylabel}% + {% + \@glsxtrpreloctag + \GlsXtrFormatLocationList{#1}% + \@glsxtrpostloctag + \gls@save@numberlist{#1}% + }{}% + }% +\else + \glsnonumberlisttrue + \renewcommand*{\glossaryentrynumbers}[1]{% + \ifglsentryexists{\glscurrententrylabel}% + {% + \gls@save@numberlist{#1}% + }{}% + }% +\fi +\newcommand*{\GlsXtrFormatLocationList}[1]{#1} +\newcommand*{\GlsXtrEnablePreLocationTag}[2]{% + \let\@glsxtrpreloctag\@@glsxtrpreloctag + \let\@glsxtrpostloctag\@@glsxtrpostloctag + \renewcommand*{\@glsxtr@pagetag}{#1}% + \renewcommand*{\@glsxtr@pagestag}{#2}% + \renewcommand*{\@glsxtr@savepreloctag}[2]{% + \csgdef{@glsxtr@preloctag@##1}{##2}% + }% + \renewcommand*{\@glsxtr@doloctag}{% + \ifcsundef{@glsxtr@preloctag@\glscurrententrylabel}% + {% + \GlossariesWarning{Missing pre-location tag for `\glscurrententrylabel'. + Rerun required}% + }% + {% + \csuse{@glsxtr@preloctag@\glscurrententrylabel}% + }% + }% +} +\@onlypreamble\GlsXtrEnablePreLocationTag +\newcommand*{\@@glsxtrpreloctag}{% + \let\@glsxtr@org@delimN\delimN + \let\@glsxtr@org@delimR\delimR + \let\@glsxtr@org@glsignore\glsignore + \gdef\@glsxtr@thisloctag{\@glsxtr@pagetag}% + \renewcommand*{\delimN}{% + \gdef\@glsxtr@thisloctag{\@glsxtr@pagestag}% + \@glsxtr@org@delimN}% + \renewcommand*{\delimR}{% + \gdef\@glsxtr@thisloctag{\@glsxtr@pagestag}% + \@glsxtr@org@delimR}% + \renewcommand*{\glsignore}[1]{% + \gdef\@glsxtr@thisloctag{\relax}% + \@glsxtr@org@glsignore{##1}}% + \@glsxtr@doloctag +} +\newcommand*{\@glsxtrpreloctag}{} +\newcommand*{\@glsxtr@pagetag}{}% +\newcommand*{\@glsxtr@pagestag}{}% +\newcommand*{\@@glsxtrpostloctag}{% + \let\delimN\@glsxtr@org@delimN + \let\delimR\@glsxtr@org@delimR + \let\glsignore\@glsxtr@org@glsignore + \protected@write\@auxout{}% + {\string\@glsxtr@savepreloctag{\glscurrententrylabel}{\@glsxtr@thisloctag}}% +} +\newcommand*{\@glsxtrpostloctag}{} +\newcommand*{\@glsxtr@savepreloctag}[2]{} +\protected@write\@auxout{}{% + \string\providecommand\string\@glsxtr@savepreloctag[2]{}} +\newcommand*{\@glsxtr@doloctag}{} +\renewcommand*{\KV@printgloss@nonumberlist}[1]{% + \XKV@plfalse + \XKV@sttrue + \XKV@checkchoice[\XKV@resa]{#1}{true,false}% + {% + \csname glsnonumberlist\XKV@resa\endcsname + \ifglsnonumberlist + \def\glossaryentrynumbers##1{\gls@save@numberlist{##1}}% + \else + \def\glossaryentrynumbers##1{% + \@glsxtrpreloctag + \GlsXtrFormatLocationList{##1}% + \@glsxtrpostloctag + \gls@save@numberlist{##1}}% + \fi + }% +} +\renewcommand*{\glsentryfmt}{% + \ifglshasshort{\glslabel}{\glssetabbrvfmt{\glscategory{\glslabel}}}{}% + \glsifregular{\glslabel}% + {\glsxtrregularfont{\glsgenentryfmt}}% + {% + \ifglshasshort{\glslabel}% + {\glsxtrabbreviationfont{\glsxtrgenabbrvfmt}}% + {\glsxtrregularfont{\glsgenentryfmt}}% + }% +} +\newcommand*{\glsxtrregularfont}[1]{#1} +\newcommand*{\glsxtrabbreviationfont}[1]{#1} +\renewcommand{\@gls@field@link}[4][]{% + \@glsxtr@record{#2}{#3}{glslink}% + \glsdoifexists{#3}% + {% + \let\glsxtrorg@ifKV@glslink@hyper\ifKV@glslink@hyper + \@gls@save@glslocal + \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \def\glscustomtext{#4}% + \@glsxtr@field@linkdefs + #1% + \@gls@link[#2]{#3}{#4}% + \let\ifKV@glslink@hyper\glsxtrorg@ifKV@glslink@hyper + \@gls@restore@glslocal + }% + \glspostlinkhook +} +\let\@glsxtr@org@gls@\@gls@ +\def\@gls@#1#2{% + \@glsxtr@record{#1}{#2}{glslink}% + \@glsxtr@org@gls@{#1}{#2}% +}% +\let\@glsxtr@org@glspl@\@glspl@ +\def\@glspl@#1#2{% + \@glsxtr@record{#1}{#2}{glslink}% + \@glsxtr@org@glspl@{#1}{#2}% +}% +\let\@glsxtr@org@Gls@\@Gls@ +\def\@Gls@#1#2{% + \@glsxtr@record{#1}{#2}{glslink}% + \@glsxtr@org@Gls@{#1}{#2}% +}% +\let\@glsxtr@org@Glspl@\@Glspl@ +\def\@Glspl@#1#2{% + \@glsxtr@record{#1}{#2}{glslink}% + \@glsxtr@org@Glspl@{#1}{#2}% +}% +\let\@glsxtr@org@GLS@\@GLS@ +\def\@GLS@#1#2{% + \@glsxtr@record{#1}{#2}{glslink}% + \@glsxtr@org@GLS@{#1}{#2}% +}% +\let\@glsxtr@org@GLSpl@\@GLSpl@ +\def\@GLSpl@#1#2{% + \@glsxtr@record{#1}{#2}{glslink}% + \@glsxtr@org@GLSpl@{#1}{#2}% +}% +\renewcommand*{\@glsdisp}[3][]{% + \@glsxtr@record{#1}{#2}{glslink}% + \glsdoifexists{#2}{% + \let\do@gls@link@checkfirsthyper\@gls@link@checkfirsthyper + \let\glsifplural\@secondoftwo + \let\glscapscase\@firstofthree + \def\glscustomtext{#3}% + \def\glsinsert{}% + \def\@glo@text{\csname gls@\glstype @entryfmt\endcsname}% + \@gls@link[#1]{#2}{\@glo@text}% + \@gls@do@glsunset{#2}% + }% + \glspostlinkhook +} +\renewcommand*{\@gls@@link}[3][]{% + \@glsxtr@record{#1}{#2}{glslink}% + \glsdoifexistsordo{#2}% + {% + \let\do@gls@link@checkfirsthyper\relax + \def\glscustomtext{#3}% + \@glsxtr@field@linkdefs + \@gls@link[#1]{#2}{#3}% + }% + {% + \glstextformat{#3}% + }% + \glspostlinkhook +} +\newcommand*{\glsxtrinitwrgloss}{% + \glsifattribute{\glslabel}{wrgloss}{after}% + {% + \glsxtrinitwrglossbeforefalse + }% + {% + \glsxtrinitwrglossbeforetrue + }% +} +\newif\ifglsxtrinitwrglossbefore +\glsxtrinitwrglossbeforetrue +\define@choicekey{glslink}{wrgloss}% +[\@glsxtr@wrglossval\@glsxtr@wrglossnr]% +{before,after}% +{% + \ifcase\@glsxtr@wrglossnr\relax + \glsxtrinitwrglossbeforetrue + \or + \glsxtrinitwrglossbeforefalse + \fi +} +\define@key{glslink}{thevalue}{\def\@glsxtr@thevalue{#1}} +\define@key{glslink}{theHvalue}{\def\@glsxtr@theHvalue{#1}} +\define@boolkey{glslink}[glsxtr@]{hyperoutside}[true]{} +\glsxtr@hyperoutsidetrue +\define@key{glslink}{textformat}{% + \ifcsdef{#1} + {% + \letcs{\@glsxtr@local@textformat}{#1}% + }% + {% + \PackageError{glossaries-extra}{Unknown control sequence name `#1'}{}% + }% +} +\define@key{glslink}{prefix}{\def\glolinkprefix{#1}} +\newcommand*{\glsxtrinithyperoutside}{% + \glsifattribute{\glslabel}{hyperoutside}{false}% + {% + \glsxtr@hyperoutsidefalse + }% + {% + \glsxtr@hyperoutsidetrue + }% +} +\newcommand*{\glsxtr@inc@linkcount}{} +\newcommand*{\glslinkpresetkeys}{} +\newrobustcmd*{\GlsXtrExpandedFmt}[2]{% + \protected@edef\@glsxtr@tmp{#2}% + \expandafter#1\expandafter{\@glsxtr@tmp}% +} +\newcommand*{\@glsxtr@use@equation@counter}{% + \@glsxtr@ifnum@mmode{\def\@gls@counter{equation}}{}% +} +\newcommand*{\glsxtr@do@autoadd}[1]{} +\newcommand*{\GlsXtrAutoAddOnFormat}[3][\glslabel]{% + \renewcommand*{\glsxtr@do@autoadd}[1]{% + \begingroup + \protected@edef\@glsxtr@do@autoadd{% + \noexpand\ifstrequal{##1}{glslink}% + {% + \noexpand\DTLifinlist{\@glsnumberformat}{#2}{\noexpand\glsadd[format={\@glsnumberformat},#3]{#1}}{}% + }% + {}% + }% + \@glsxtr@do@autoadd + \endgroup + }% +} +\providecommand*{\glslinkwrcontent}[1]{{#1}} +\def\@gls@link[#1]#2#3{% + \leavevmode + \protected@edef\glslabel{\glsdetoklabel{#2}}% + \def\@gls@link@opts{#1}% + \let\@gls@link@label\glslabel + \let\@glsnumberformat\@glsxtr@defaultnumberformat + \protected@edef\@gls@counter{\csname glo@\glslabel @counter\endcsname}% + \protected@edef\glstype{\csname glo@\glslabel @type\endcsname}% + \let\org@ifKV@glslink@hyper\ifKV@glslink@hyper + \@gls@save@glslocal + \let\@glsxtr@org@glolinkprefix\glolinkprefix + \let\@glsxtr@local@textformat\relax + \def\@glsxtr@thevalue{}% + \def\@glsxtr@theHvalue{\@glsxtr@thevalue}% + \glsxtrinitwrgloss + \glsxtrinithyperoutside + \@gls@setdefault@glslink@opts + \glsxtr@inc@linkcount + \if@glsxtr@equations + \@glsxtr@use@equation@counter + \fi + \do@glsdisablehyperinlist + \do@gls@link@checkfirsthyper + \glslinkpresetkeys + \setkeys{glslink}{#1}% + \glsxtr@do@autoadd{glslink}% + \glslinkpostsetkeys + \ifdefempty{\@glsxtr@thevalue}% + {% + \@gls@saveentrycounter + }% + {% + \let\theglsentrycounter\@glsxtr@thevalue + \def\theHglsentrycounter{\@glsxtr@theHvalue}% + }% + \@gls@setsort{\glslabel}% + \ifx\@glsxtr@local@textformat\relax + \glshasattribute{\glslabel}{textformat}% + {% + \protected@edef\@glsxtr@attrval{\glsgetattribute{\glslabel}{textformat}}% + \ifcsdef{\@glsxtr@attrval}% + {% + \letcs{\@glsxtr@textformat}{\@glsxtr@attrval}% + }% + {% + \GlossariesExtraWarning{Unknown control sequence name + `\@glsxtr@attrval' supplied in textformat attribute + for entry `\glslabel'. Reverting to default \string\glstextformat}% + \let\@glsxtr@textformat\glstextformat + }% + }% + {% + \let\@glsxtr@textformat\glstextformat + }% + \else + \let\@glsxtr@textformat\@glsxtr@local@textformat + \fi + \glslinkwrcontent + {% + \ifglsxtrinitwrglossbefore + \@do@wrglossary{#2}% + \fi + \ifKV@glslink@hyper + \ifglsxtr@hyperoutside + \@glslink{\glolinkprefix\glslabel}{\@glsxtr@textformat{#3}}% + \else + \@glsxtr@textformat{\@glslink{\glolinkprefix\glslabel}{#3}}% + \fi + \else + \ifglsxtr@hyperoutside + \glsdonohyperlink{\glolinkprefix\glslabel}{\@glsxtr@textformat{#3}}% + \else + \@glsxtr@textformat{\glsdonohyperlink{\glolinkprefix\glslabel}{#3}}% + \fi + \fi + \ifglsxtrinitwrglossbefore + \else + \@do@wrglossary{#2}% + \fi + }% + \let\glolinkprefix\@glsxtr@org@glolinkprefix + \let\ifKV@glslink@hyper\org@ifKV@glslink@hyper + \@gls@restore@glslocal +} +\define@key{glossadd}{thevalue}{\def\@glsxtr@thevalue{#1}} +\define@key{glossadd}{theHvalue}{\def\@glsxtr@theHvalue{#1}} +\newcommand*{\glsaddpresetkeys}{} + +\newcommand*{\glsaddpostsetkeys}{} +\renewrobustcmd*{\glsadd}[2][]{% + \glsxtrifinmark + {}% + {% + \@gls@adjustmode + \begingroup + \@glsxtr@record{#1}{#2}{glossadd}% + \glsdoifexists{#2}% + {% + \let\@glsnumberformat\@glsxtr@defaultnumberformat + \protected@edef\@gls@counter{\csname glo@\glsdetoklabel{#2}@counter\endcsname}% + \def\@glsxtr@thevalue{}% + \def\@glsxtr@theHvalue{\@glsxtr@thevalue}% + \glsaddpresetkeys + \setkeys{glossadd}{#1}% + \glsaddpostsetkeys + \ifdefempty{\@glsxtr@thevalue}% + {% + \@gls@saveentrycounter + }% + {% + \let\theglsentrycounter\@glsxtr@thevalue + \def\theHglsentrycounter{\@glsxtr@theHvalue}% + }% + \@gls@setsort{#2}% + \KV@glslink@noindexfalse + \@@do@wrglossary{#2}% + }% + \endgroup + }% +} +\newrobustcmd{\glsaddeach}[2][]{% + \@for\@gls@thislabel:=#2\do{\glsadd[#1]{\@gls@thislabel}}% +} +\newcommand*{\@glsxtr@field@linkdefs}{% + \let\glsxtrifwasfirstuse\@secondoftwo + \let\glsifplural\@secondoftwo + \let\glscapscase\@firstofthree + \let\glsinsert\@empty +} +\newcommand*{\glsxtrassignfieldfont}[1]{% + \ifglsentryexists{#1}% + {% + \ifglshasshort{#1}% + {% + \glssetabbrvfmt{\glscategory{#1}}% + \glsifregular{#1}% + {\let\@gls@field@font\glsxtrregularfont}% + {\let\@gls@field@font\@firstofone}% + }% + {% + \glsifnotregular{#1}% + {\let\@gls@field@font\@firstofone}% + {\let\@gls@field@font\glsxtrregularfont}% + }% + }% + {% + \let\@gls@field@font\@gobble + }% +} +\def\@glstext@#1#2[#3]{% + \glsxtrassignfieldfont{#2}% + \@gls@field@link{#1}{#2}{\@gls@field@font{\glsaccesstext{#2}#3}}% +} +\def\@GLStext@#1#2[#3]{% + \glsxtrassignfieldfont{#2}% + \@gls@field@link[\let\glscapscase\@thirdofthree]{#1}{#2}% + {\@gls@field@font{\GLSaccesstext{#2}\mfirstucMakeUppercase{#3}}}% +} +\def\@Glstext@#1#2[#3]{% + \glsxtrassignfieldfont{#2}% + \@gls@field@link[\let\glscapscase\@secondofthree]{#1}{#2}% + {\@gls@field@font{\Glsaccesstext{#2}#3}}% +} +\newcommand*{\glsxtrchecknohyperfirst}[1]{% + \glsifattribute{#1}{nohyperfirst}{true}{\KV@glslink@hyperfalse}{}% +} +\def\@glsfirst@#1#2[#3]{% + \glsxtrassignfieldfont{#2}% + \@gls@field@link + [\let\glsxtrifwasfirstuse\@firstoftwo + \glsxtrchecknohyperfirst{#2}% + ]{#1}{#2}% + {\@gls@field@font{\glsaccessfirst{#2}#3}}% +} +\def\@Glsfirst@#1#2[#3]{% + \glsxtrassignfieldfont{#2}% + \@gls@field@link + [\let\glsxtrifwasfirstuse\@firstoftwo + \let\glscapscase\@secondofthree + \glsxtrchecknohyperfirst{#2}% + ]% + {#1}{#2}{\@gls@field@font{\Glsaccessfirst{#2}#3}}% +} +\def\@GLSfirst@#1#2[#3]{% + \glsxtrassignfieldfont{#2}% + \@gls@field@link + [\let\glsxtrifwasfirstuse\@firstoftwo + \let\glscapscase\@thirdofthree + \glsxtrchecknohyperfirst{#2}% + ]% + {#1}{#2}{\@gls@field@font{\GLSaccessfirst{#2}\mfirstucMakeUppercase{#3}}}% +} +\def\@glsplural@#1#2[#3]{% + \glsxtrassignfieldfont{#2}% + \@gls@field@link[\let\glsifplural\@firstoftwo]{#1}{#2}% + {\@gls@field@font{\glsaccessplural{#2}#3}}% +} +\def\@Glsplural@#1#2[#3]{% + \glsxtrassignfieldfont{#2}% + \@gls@field@link + [\let\glsifplural\@firstoftwo + \let\glscapscase\@secondofthree + ]% + {#1}{#2}{\@gls@field@font{\Glsaccessplural{#2}#3}}% +} +\def\@GLSplural@#1#2[#3]{% + \glsxtrassignfieldfont{#2}% + \@gls@field@link + [\let\glsifplural\@firstoftwo + \let\glscapscase\@thirdofthree + ]% + {#1}{#2}{\@gls@field@font{\GLSaccessplural{#2}\mfirstucMakeUppercase{#3}}}% +} +\def\@glsfirstplural@#1#2[#3]{% + \glsxtrassignfieldfont{#2}% + \@gls@field@link + [\let\glsxtrifwasfirstuse\@firstoftwo + \let\glsifplural\@firstoftwo + \glsxtrchecknohyperfirst{#2}% + ]% + {#1}{#2}{\@gls@field@font{\glsaccessfirstplural{#2}#3}}% +} +\def\@Glsfirstplural@#1#2[#3]{% + \glsxtrassignfieldfont{#2}% + \@gls@field@link + [\let\glsxtrifwasfirstuse\@firstoftwo + \let\glsifplural\@firstoftwo + \let\glscapscase\@secondofthree + \glsxtrchecknohyperfirst{#2}% + ]% + {#1}{#2}{\@gls@field@font{\Glsaccessfirstplural{#2}#3}}% +} +\def\@GLSfirstplural@#1#2[#3]{% + \glsxtrassignfieldfont{#2}% + \@gls@field@link + [\let\glsxtrifwasfirstuse\@firstoftwo + \let\glsifplural\@firstoftwo + \let\glscapscase\@thirdofthree + \glsxtrchecknohyperfirst{#2}% + ]% + {#1}{#2}% + {\@gls@field@font{\GLSaccessfirstplural{#2}\mfirstucMakeUppercase{#3}}}% +} +\def\@glsname@#1#2[#3]{% + \glsxtrassignfieldfont{#2}% + \@gls@field@link{#1}{#2}{\@gls@field@font{\glsaccessname{#2}#3}}% +} +\def\@Glsname@#1#2[#3]{% + \glsxtrassignfieldfont{#2}% + \@gls@field@link + [\let\glscapscase\@secondoftwo]{#1}{#2}% + {\@gls@field@font{\Glsaccessname{#2}#3}}% +} +\def\@GLSname@#1#2[#3]{% + \glsxtrassignfieldfont{#2}% + \@gls@field@link[\let\glscapscase\@thirdoftwo]% + {#1}{#2}% + {\@gls@field@font{\GLSaccessname{#2}\mfirstucMakeUppercase{#3}}}% +} +\def\@glsdesc@#1#2[#3]{% + \glsxtrassignfieldfont{#2}% + \@gls@field@link{#1}{#2}{\@gls@field@font{\glsaccessdesc{#2}#3}}% +} +\def\@Glsdesc@#1#2[#3]{% + \glsxtrassignfieldfont{#2}% + \@gls@field@link + [\let\glscapscase\@secondoftwo]{#1}{#2}% + {\@gls@field@font{\Glsaccessdesc{#2}#3}}% +} +\def\@GLSdesc@#1#2[#3]{% + \glsxtrassignfieldfont{#2}% + \@gls@field@link[\let\glscapscase\@thirdoftwo]% + {#1}{#2}{\@gls@field@font{\GLSaccessdesc{#2}\mfirstucMakeUppercase{#3}}}% +} +\def\@glsdescplural@#1#2[#3]{% + \glsxtrassignfieldfont{#2}% + \@gls@field@link + [\let\glscapscase\@secondoftwo + \let\glsifplural\@firstoftwo + ]{#1}{#2}{\@gls@field@font{\glsaccessdescplural{#2}#3}}% +} +\def\@Glsdescplural@#1#2[#3]{% + \glsxtrassignfieldfont{#2}% + \@gls@field@link + [\let\glscapscase\@secondoftwo + \let\glsifplural\@firstoftwo + ]{#1}{#2}{\@gls@field@font{\Glsaccessdescplural{#2}#3}}% +} +\def\@GLSdesc@#1#2[#3]{% + \glsxtrassignfieldfont{#2}% + \@gls@field@link + [\let\glscapscase\@thirdoftwo + \let\glsifplural\@firstoftwo + ]% + {#1}{#2}% + {\@gls@field@font{\GLSaccessdescplural{#2}\mfirstucMakeUppercase{#3}}}% +} +\def\@glssymbol@#1#2[#3]{% + \glsxtrassignfieldfont{#2}% + \@gls@field@link{#1}{#2}{\@gls@field@font{\glsaccesssymbol{#2}#3}}% +} +\def\@Glssymbol@#1#2[#3]{% + \glsxtrassignfieldfont{#2}% + \@gls@field@link + [\let\glscapscase\@secondoftwo]% + {#1}{#2}{\@gls@field@font{\Glsaccesssymbol{#2}#3}}% +} +\def\@GLSsymbol@#1#2[#3]{% + \glsxtrassignfieldfont{#2}% + \@gls@field@link[\let\glscapscase\@thirdoftwo]% + {#1}{#2}{\@gls@field@font{\GLSaccesssymbol{#2}\mfirstucMakeUppercase{#3}}}% +} +\def\@glssymbolplural@#1#2[#3]{% + \glsxtrassignfieldfont{#2}% + \@gls@field@link + [\let\glscapscase\@secondoftwo + \let\glsifplural\@firstoftwo + ]{#1}{#2}{\@gls@field@font{\glsaccesssymbolplural{#2}#3}}% +} +\def\@Glssymbolplural@#1#2[#3]{% + \glsxtrassignfieldfont{#2}% + \@gls@field@link + [\let\glscapscase\@secondoftwo + \let\glsifplural\@firstoftwo + ]{#1}{#2}{\@gls@field@font{\Glsaccesssymbolplural{#2}#3}}% +} +\def\@GLSsymbol@#1#2[#3]{% + \glsxtrassignfieldfont{#2}% + \@gls@field@link + [\let\glscapscase\@thirdoftwo + \let\glsifplural\@firstoftwo + ]% + {#1}{#2}% + {\@gls@field@font{\GLSaccesssymbolplural{#2}\mfirstucMakeUppercase{#3}}}% +} +\def\@Glsuseri@#1#2[#3]{% + \glsxtrassignfieldfont{#2}% + \@gls@field@link + [\let\glscapscase\@secondoftwo]{#1}{#2}% + {\@gls@field@font{\Glsentryuseri{#2}#3}}% +} +\def\@GLSuseri@#1#2[#3]{% + \glsxtrassignfieldfont{#2}% + \@gls@field@link[\let\glscapscase\@thirdoftwo]% + {#1}{#2}{\@gls@field@font{\mfirstucMakeUppercase{\glsentryuseri{#2}#3}}}% +} +\def\@Glsuserii@#1#2[#3]{% + \glsxtrassignfieldfont{#2}% + \@gls@field@link + [\let\glscapscase\@secondoftwo]% + {#1}{#2}{\@gls@field@font{\Glsentryuserii{#2}#3}}% +} +\def\@GLSuserii@#1#2[#3]{% + \glsxtrassignfieldfont{#2}% + \@gls@field@link[\let\glscapscase\@thirdoftwo]% + {#1}{#2}{\@gls@field@font{\mfirstucMakeUppercase{\glsentryuserii{#2}#3}}}% +} +\def\@Glsuseriii@#1#2[#3]{% + \glsxtrassignfieldfont{#2}% + \@gls@field@link + [\let\glscapscase\@secondoftwo]% + {#1}{#2}{\@gls@field@font{\Glsentryuseriii{#2}#3}}% +} +\def\@GLSuseriii@#1#2[#3]{% + \glsxtrassignfieldfont{#2}% + \@gls@field@link[\let\glscapscase\@thirdoftwo]% + {#1}{#2}{\@gls@field@font{\mfirstucMakeUppercase{\glsentryuseriii{#2}#3}}}% +} +\def\@Glsuseriv@#1#2[#3]{% + \glsxtrassignfieldfont{#2}% + \@gls@field@link + [\let\glscapscase\@secondoftwo]% + {#1}{#2}{\@gls@field@font{\Glsentryuseriv{#2}#3}}% +} +\def\@GLSuseriv@#1#2[#3]{% + \glsxtrassignfieldfont{#2}% + \@gls@field@link[\let\glscapscase\@thirdoftwo]% + {#1}{#2}% + {\@gls@field@font{\mfirstucMakeUppercase{\glsentryuseriv{#2}#3}}}% +} +\def\@Glsuserv@#1#2[#3]{% + \glsxtrassignfieldfont{#2}% + \@gls@field@link + [\let\glscapscase\@secondoftwo]% + {#1}{#2}{\@gls@field@font{\Glsentryuserv{#2}#3}}% +} +\def\@GLSuserv@#1#2[#3]{% + \glsxtrassignfieldfont{#2}% + \@gls@field@link[\let\glscapscase\@thirdoftwo]% + {#1}{#2}{\@gls@field@font{\mfirstucMakeUppercase{\glsentryuserv{#2}#3}}}% +} +\def\@Glsuservi@#1#2[#3]{% + \glsxtrassignfieldfont{#2}% + \@gls@field@link + [\let\glscapscase\@secondoftwo]% + {#1}{#2}{\@gls@field@font{\Glsentryuservi{#2}#3}}% +} +\def\@GLSuservi@#1#2[#3]{% + \glsxtrassignfieldfont{#2}% + \@gls@field@link[\let\glscapscase\@thirdoftwo]% + {#1}{#2}{\@gls@field@font{\mfirstucMakeUppercase{\glsentryuservi{#2}#3}}}% +} +\newcommand*{\@@glsxtr@base@acrcmd@warn}[2]{% + \GlossariesExtraWarning{Base acronym command \string#1\space + should not be used with new abbreviation definitions. Use + \string#2\space instead}% +} +\let\@glsxtr@base@acrcmd\@@glsxtr@base@acrcmd@warn +\def\@acrshort#1#2[#3]{% + \@glsxtr@base@acrcmd\acrshort\glsxtrshort + \glsdoifexists{#2}% + {% + \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsxtrifwasfirstuse\@secondoftwo + \let\glsifplural\@secondoftwo + \let\glscapscase\@firstofthree + \let\glsinsert\@empty + \def\glscustomtext{% + \acronymfont{\glsaccessshort{#2}}#3% + }% + \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% + }% + \glspostlinkhook +} +\def\@Acrshort#1#2[#3]{% + \@glsxtr@base@acrcmd\Acrshort\Glsxtrshort + \glsdoifexists{#2}% + {% + \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsxtrifwasfirstuse\@secondoftwo + \let\glsifplural\@secondoftwo + \let\glscapscase\@secondofthree + \let\glsinsert\@empty + \def\glscustomtext{% + \acronymfont{\Glsaccessshort{#2}}#3% + }% + \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% + }% + \glspostlinkhook +} +\def\@ACRshort#1#2[#3]{% + \@glsxtr@base@acrcmd\ACRshort\GLSxtrshort + \glsdoifexists{#2}% + {% + \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsxtrifwasfirstuse\@secondoftwo + \let\glsifplural\@secondoftwo + \let\glscapscase\@thirdofthree + \let\glsinsert\@empty + \def\glscustomtext{% + \mfirstucMakeUppercase{\acronymfont{\glsaccessshort{#2}}#3}% + }% + \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% + }% + \glspostlinkhook +} +\def\@acrshortpl#1#2[#3]{% + \@glsxtr@base@acrcmd\acrshortpl\glsxtrshortpl + \glsdoifexists{#2}% + {% + \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsxtrifwasfirstuse\@secondoftwo + \let\glsifplural\@firstoftwo + \let\glscapscase\@firstofthree + \let\glsinsert\@empty + \def\glscustomtext{% + \acronymfont{\glsaccessshortpl{#2}}#3% + }% + \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% + }% + \glspostlinkhook +} +\def\@Acrshortpl#1#2[#3]{% + \@glsxtr@base@acrcmd\Acrshortpl\Glsxtrshortpl + \glsdoifexists{#2}% + {% + \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsxtrifwasfirstuse\@secondoftwo + \let\glsifplural\@firstoftwo + \let\glscapscase\@secondofthree + \let\glsinsert\@empty + \def\glscustomtext{% + \acronymfont{\Glsaccessshortpl{#2}}#3% + }% + \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% + }% + \glspostlinkhook +} +\def\@ACRshortpl#1#2[#3]{% + \@glsxtr@base@acrcmd\ACRshortpl\GLSxtrshortpl + \glsdoifexists{#2}% + {% + \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsxtrifwasfirstuse\@secondoftwo + \let\glsifplural\@firstoftwo + \let\glscapscase\@thirdofthree + \let\glsinsert\@empty + \def\glscustomtext{% + \mfirstucMakeUppercase{\acronymfont{\glsaccessshortpl{#2}}#3}% + }% + \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% + }% + \glspostlinkhook +} +\def\@acrlong#1#2[#3]{% + \@glsxtr@base@acrcmd\acrlong\glsxtrlong + \glsdoifexists{#2}% + {% + \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsxtrifwasfirstuse\@secondoftwo + \let\glsifplural\@secondoftwo + \let\glscapscase\@firstofthree + \let\glsinsert\@empty + \def\glscustomtext{% + \acronymfont{\glsaccesslong{#2}}#3% + }% + \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% + }% + \glspostlinkhook +} +\def\@Acrlong#1#2[#3]{% + \@glsxtr@base@acrcmd\Acrlong\Glsxtrlong + \glsdoifexists{#2}% + {% + \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsxtrifwasfirstuse\@secondoftwo + \let\glsifplural\@secondoftwo + \let\glscapscase\@secondofthree + \let\glsinsert\@empty + \def\glscustomtext{% + \acronymfont{\Glsaccesslong{#2}}#3% + }% + \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% + }% + \glspostlinkhook +} +\def\@ACRlong#1#2[#3]{% + \@glsxtr@base@acrcmd\ACRlong\GLSxtrlong + \glsdoifexists{#2}% + {% + \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsxtrifwasfirstuse\@secondoftwo + \let\glsifplural\@secondoftwo + \let\glscapscase\@thirdofthree + \let\glsinsert\@empty + \def\glscustomtext{% + \mfirstucMakeUppercase{\acronymfont{\glsaccesslong{#2}}#3}% + }% + \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% + }% + \glspostlinkhook +} +\def\@acrlongpl#1#2[#3]{% + \@glsxtr@base@acrcmd\acrlongpl\glsxtrlongpl + \glsdoifexists{#2}% + {% + \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsxtrifwasfirstuse\@secondoftwo + \let\glsifplural\@firstoftwo + \let\glscapscase\@firstofthree + \let\glsinsert\@empty + \def\glscustomtext{% + \acronymfont{\glsaccesslongpl{#2}}#3% + }% + \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% + }% + \glspostlinkhook +} +\def\@Acrlongpl#1#2[#3]{% + \@glsxtr@base@acrcmd\Acrlongpl\Glsxtrlongpl + \glsdoifexists{#2}% + {% + \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsxtrifwasfirstuse\@secondoftwo + \let\glsifplural\@firstoftwo + \let\glscapscase\@secondofthree + \let\glsinsert\@empty + \def\glscustomtext{% + \acronymfont{\Glsaccesslongpl{#2}}#3% + }% + \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% + }% + \glspostlinkhook +} +\def\@ACRlongpl#1#2[#3]{% + \@glsxtr@base@acrcmd\ACRlongpl\GLSxtrlongpl + \glsdoifexists{#2}% + {% + \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsxtrifwasfirstuse\@secondoftwo + \let\glsifplural\@firstoftwo + \let\glscapscase\@thirdofthree + \let\glsinsert\@empty + \def\glscustomtext{% + \mfirstucMakeUppercase{\acronymfont{\glsaccesslongpl{#2}}#3}% + }% + \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% + }% + \glspostlinkhook +} +\def\@acrfull#1#2[#3]{% + \@glsxtr@base@acrcmd\acrfull\glsxtrfull + \acrfullfmt{#1}{#2}{#3}% +} +\def\@Acrfull#1#2[#3]{% + \@glsxtr@base@acrcmd\Acrfull\Glsxtrfull + \Acrfullfmt{#1}{#2}{#3}% +} +\def\@ACRfull#1#2[#3]{% + \@glsxtr@base@acrcmd\ACRfull\GLSxtrfull + \ACRfullfmt{#1}{#2}{#3}% +} +\def\@acrfullpl#1#2[#3]{% + \@glsxtr@base@acrcmd\acrfullpl\glsxtrfullpl + \acrfullplfmt{#1}{#2}{#3}% +} +\def\@Acrfullpl#1#2[#3]{% + \@glsxtr@base@acrcmd\Acrfullpl\Glsxtrfullpl + \Acrfullplfmt{#1}{#2}{#3}% +} +\def\@ACRfullpl#1#2[#3]{% + \@glsxtr@base@acrcmd\ACRfullpl\GLSxtrfullpl + \ACRfullplfmt{#1}{#2}{#3}% +} +\renewcommand*{\@glsaddkey}[7]{% + \key@ifundefined{glossentry}{#1}% + {% + \define@key{glossentry}{#1}{\csdef{@glo@#1}{##1}}% + \appto\@gls@keymap{,{#1}{#1}}% + \appto\@newglossaryentryprehook{\csdef{@glo@#1}{#2}}% + \appto\@newglossaryentryposthook{% + \letcs{\@glo@tmp}{@glo@#1}% + \gls@assign@field{#2}{\@glo@label}{#1}{\@glo@tmp}% + }% + \newcommand*{#3}[1]{\@gls@entry@field{##1}{#1}}% + \newcommand*{#4}[1]{\@Gls@entry@field{##1}{#1}}% + \ifcsdef{@gls@user@#1@}% + {% + \PackageError{glossaries}% + {Can't define `\string#5' as helper command + `\expandafter\string\csname @gls@user@#1@\endcsname' already + exists}% + {}% + }% + {% + \expandafter\newcommand\expandafter*\expandafter + {\csname @gls@user@#1\endcsname}[2][]{% + \new@ifnextchar[% + {\csuse{@gls@user@#1@}{##1}{##2}}% + {\csuse{@gls@user@#1@}{##1}{##2}[]}}% + \csdef{@gls@user@#1@}##1##2[##3]{% + \@gls@field@link{##1}{##2}{#3{##2}##3}% + }% + \newrobustcmd*{#5}{% + \expandafter\@gls@hyp@opt\csname @gls@user@#1\endcsname}% + }% + \ifcsdef{@Gls@user@#1@}% + {% + \PackageError{glossaries}% + {Can't define `\string#6' as helper command + `\expandafter\string\csname @Gls@user@#1@\endcsname' already + exists}% + {}% + }% + {% + \expandafter\newcommand\expandafter*\expandafter + {\csname @Gls@user@#1\endcsname}[2][]{% + \new@ifnextchar[% + {\csuse{@Gls@user@#1@}{##1}{##2}}% + {\csuse{@Gls@user@#1@}{##1}{##2}[]}}% + \csdef{@Gls@user@#1@}##1##2[##3]{% + \@gls@field@link[\let\glscapscase\@secondofthree]% + {##1}{##2}{#4{##2}##3}% + }% + \newrobustcmd*{#6}{% + \expandafter\@gls@hyp@opt\csname @Gls@user@#1\endcsname}% + }% + \ifcsdef{@GLS@user@#1@}% + {% + \PackageError{glossaries}% + {Can't define `\string#7' as helper command + `\expandafter\string\csname @GLS@user@#1@\endcsname' already + exists}% + {}% + }% + {% + \expandafter\newcommand\expandafter*\expandafter + {\csname @GLS@user@#1\endcsname}[2][]{% + \new@ifnextchar[% + {\csuse{@GLS@user@#1@}{##1}{##2}}% + {\csuse{@GLS@user@#1@}{##1}{##2}[]}}% + \csdef{@GLS@user@#1@}##1##2[##3]{% + \@gls@field@link[\let\glscapscase\@thirdofthree]% + {##1}{##2}{\mfirstucMakeUppercase{#3{##2}##3}}% + }% + \newrobustcmd*{#7}{% + \expandafter\@gls@hyp@opt\csname @GLS@user@#1\endcsname}% + }% + }% + {% + \PackageError{glossaries-extra}{Key `#1' already exists}{}% + }% +} +\providecommand*{\@gls@link@nocheckfirsthyper}{} +\let\@glsxtr@org@checkfirsthyper\@gls@link@checkfirsthyper +\renewcommand*{\@gls@link@checkfirsthyper}{% + \ifglsused{\glslabel}% + {\let\glsxtrifwasfirstuse\@secondoftwo} + {\let\glsxtrifwasfirstuse\@firstoftwo}% + \protected@edef\glscategorylabel{\glscategory{\glslabel}}% + \ifglsused{\glslabel}% + {% + \glsifcategoryattribute{\glscategorylabel}{nohypernext}{true}% + {\KV@glslink@hyperfalse}{}% + }% + {% + \glsifcategoryattribute{\glscategorylabel}{nohyperfirst}{true}% + {\KV@glslink@hyperfalse}{}% + }% + \glslinkcheckfirsthyperhook +} +\ifdef\do@glsdisablehyperinlist +{% + \let\@glsxtr@do@glsdisablehyperinlist\do@glsdisablehyperinlist + \renewcommand*{\do@glsdisablehyperinlist}{% + \@glsxtr@do@glsdisablehyperinlist + \glsifattribute{\glslabel}{nohyper}{true}{\KV@glslink@hyperfalse}{}% + } +} +{} +\define@boolkey{glslink}{noindex}[true]{} +\KV@glslink@noindexfalse +\providecommand*{\@gls@save@glslocal}{% + \let\if@org@KV@glslink@local\ifKV@glslink@local +} +\providecommand*{\@gls@restore@glslocal}{% + \ifKV@glslink@local + \let\@gls@do@glsunset\glslocalunset + \else + \let\@gls@do@glsunset\glsunset + \fi +} +\providecommand*{\@gls@do@glsunset}[1]{\glsunset{#1}} +\ifdef\@gls@setdefault@glslink@opts +{ + \renewcommand*{\@gls@setdefault@glslink@opts}{% + \KV@glslink@noindexfalse + \@glsxtrsetaliasnoindex + } +} +{ + \newcommand*{\@gls@setdefault@glslink@opts}{% + \KV@glslink@noindexfalse + \@glsxtrsetaliasnoindex + } + \preto\do@glsdisablehyperinlist{\@gls@setdefault@glslink@opts} +} +\providecommand*{\glsxtrsetaliasnoindex}{% + \KV@glslink@noindextrue +} +\newcommand*{\@glsxtrsetaliasnoindex}{% + \ifcsvoid{glo@\glsdetoklabel{\glslabel}@alias}% + {}% + {% + \let\glsxtrindexaliased\@glsxtrindexaliased + \glsxtrsetaliasnoindex + \let\glsxtrindexaliased\@no@glsxtrindexaliased + }% +} +\newcommand{\@glsxtrindexaliased}{% + \ifKV@glslink@noindex + \else + \begingroup + \let\@glsnumberformat\@glsxtr@defaultnumberformat + \protected@edef\@gls@counter{\csname glo@\glsdetoklabel{\glslabel}@counter\endcsname}% + \glsxtr@saveentrycounter + \@@do@wrglossary{\glsxtralias{\glslabel}}% + \endgroup + \fi +} +\newcommand{\@no@glsxtrindexaliased}{% + \PackageError{glossaries-extra}{\string\glsxtrindexaliased\space + not permitted outside definition of \string\glsxtrsetaliasnoindex}% + {}% +} +\let\glsxtrindexaliased\@no@glsxtrindexaliased +\newcommand*{\GlsXtrSetDefaultGlsOpts}[1]{% + \renewcommand*{\@gls@setdefault@glslink@opts}{% + \setkeys{glslink}{#1}% + \@glsxtrsetaliasnoindex + }% +} +\newcommand*{\glsxtrifindexing}[2]{% + \ifKV@glslink@noindex #2\else #1\fi +} +\renewcommand*{\glswriteentry}[2]{% + \glsxtrifindexing + {% + \ifglsindexonlyfirst + \GlsXtrIfUnusedOrUndefined{#1} + {#2}% + {\glsxtrdoautoindexname{#1}{dualindex}}% + \else + \glsifattribute{#1}{indexonlyfirst}{true}% + {% + \GlsXtrIfUnusedOrUndefined{#1}% + {#2}% + {\glsxtrdoautoindexname{#1}{dualindex}}% + }% + {#2}% + \fi + }% + {}% +} +\appto\@@do@@wrglossary{\@glsxtr@do@@wrindex + \glsxtrdowrglossaryhook{\@gls@label}% +} +\appto\gls@noidxglossary{\@glsxtr@do@@wrindex + \glsxtrdowrglossaryhook{\@gls@label}% +} +\newcommand*{\@glsxtr@do@@wrindex}{% + \glsxtrdoautoindexname{\@gls@label}{dualindex}% +} +\newcommand*{\glsxtrdowrglossaryhook}[1]{} +\newcommand*{\@gls@alt@hyp@opt}[1]{% + \let\glslinkvar\@firstofthree + \let\@gls@hyp@opt@cs#1\relax + \@ifstar{\s@gls@hyp@opt}% + {\@ifnextchar+% + {\@firstoftwo{\p@gls@hyp@opt}}% + {% + \expandafter\@ifnextchar\@gls@alt@hyp@opt@char + {\@firstoftwo{\@alt@gls@hyp@opt}}% + {#1}% + }% + }% +} +\newcommand*{\@alt@gls@hyp@opt}[1][]{% + \let\glslinkvar\@firstofthree + \expandafter\@gls@hyp@opt@cs\expandafter[\@gls@alt@hyp@opt@keys,#1]} +\newcommand*{\@gls@alt@hyp@opt@char}{} +\newcommand*{\@gls@alt@hyp@opt@keys}{} +\newcommand*{\GlsXtrSetAltModifier}[2]{% + \let\@gls@hyp@opt\@gls@alt@hyp@opt + \ifstrequal{#1}{+}% + {\PackageError{glossaries-extra}% + {Can't use '#1' as modifier (it's already in use)}{}}% + {% + \ifstrequal{#1}{*}% + {\PackageError{glossaries-extra}% + {Can't use '#1' as modifier (it's already in use)}{}}% + {}% + }% + \def\@gls@alt@hyp@opt@char{#1}% + \def\@gls@alt@hyp@opt@keys{#2}% + \ifdefequal\@glsxtr@record@setting\@glsxtr@record@setting@off + {}% + {% + \protected@write\@auxout{}{\string\providecommand{\string\@glsxtr@altmodifier}[1]{}}% + \protected@write\@auxout{}{\string\@glsxtr@altmodifier{#1}}% + }% +} +\let\glsxtr@org@dohyperlink\glsdohyperlink +\ifdef\glsnavhyperlink +{ + \renewcommand*{\glsnavhyperlink}[3][\@glo@type]{% + \protected@edef\gls@grplabel{#2}\protected@edef\@gls@grptitle{#3}% + {% + \let\glsxtrdohyperlink\glsxtr@org@dohyperlink + \@glslink{\glsnavhyperlinkname{#1}{#2}}{#3}% + }% + }% +} +{} +\ifdef\@@gls@navhypertarget +{} +{% + \renewcommand*{\glsnavhypertarget}{\protect\@@gls@navhypertarget} + \newcommand*{\@@gls@navhypertarget}[3][\@glo@type]{% + \@glsnavhypertarget{#1}{#2}{#3}% + } +}% +\ifdef\@glsnavhypertarget +{% + \renewcommand*{\@glsnavhypertarget}[3]{% + \protected@write\@auxout{}{\string\@gls@hypergroup{#1}{#2}}% + \@glsxtr@do@org@target{\glsnavhyperlinkname{#1}{#2}}{#3}% + \ifcsdef{@gls@hypergrouplist@#1}% + {% + \letcs\@gls@list{@gls@hypergrouplist@#1}% + \protected@edef\@gls@thishypernavlabel{#2}% + \expandafter\DTLifinlist\expandafter{\@gls@thishypernavlabel}\@gls@list{}% + {% + \GlossariesWarningNoLine{Navigation panel + for glossary type `#1'^^Jmissing group `#2'}% + \gdef\gls@hypergrouprerun{% + \GlossariesWarningNoLine{Navigation panel + has changed. Rerun LaTeX}}% + }% + }% + {% + \GlossariesWarningNoLine{Navigation panel + for glossary type `#1'^^Jmissing group `#2'}% + \gdef\gls@hypergrouprerun{% + \GlossariesWarningNoLine{Navigation panel + has changed. Rerun LaTeX}}% + }% + }% +} +{} +\newcommand*{\glsxtrdohyperlink}[2]{% + \glshasattribute{\glslabel}{targeturl}% + {% + \glshasattribute{\glslabel}{targetname}% + {% + \glshasattribute{\glslabel}{targetcategory}% + {% + \hyperref{\glsgetattribute{\glslabel}{targeturl}}% + {\glsgetattribute{\glslabel}{targetcategory}}% + {\glsgetattribute{\glslabel}{targetname}}% + {{\glsxtrprotectlinks#2}}% + }% + {% + \hyperref{\glsgetattribute{\glslabel}{targeturl}}% + {}% + {\glsgetattribute{\glslabel}{targetname}}% + {{\glsxtrprotectlinks#2}}% + }% + }% + {% + \href{\glsgetattribute{\glslabel}{targeturl}}% + {{\glsxtrprotectlinks#2}}% + }% + }% + {% + \glsfieldfetch{\glslabel}{alias}{\gloaliaslabel}% + \ifdefvoid\gloaliaslabel + {% + \glsxtrhyperlink{#1}{{\glsxtrprotectlinks#2}}% + }% + {% + \glsxtrifmulti\gloaliaslabel + {% + \letcs\gloaliaslabel{@gls@combined@\gloaliaslabel @main}% + }% + {}% + \glsxtrhyperlink + {\glolinkprefix\glsdetoklabel{\gloaliaslabel}}% + {{\glsxtrprotectlinks#2}}% + }% + }% +} + +\newcommand{\glsxtrhyperlink}[2]{% + \glsdoshowtarget{#1}{\hyperlink{#1}{#2}}% +}% +\renewrobustcmd*{\glshyperlink}[2][\glsentrytext{\@glo@label}]{% + \glsdoifexists{#2}% + {% + \def\@glo@label{#2}% + {\protected@edef\glslabel{#2}% + \@glslink{\glolinkprefix\glslabel}{#1}}% + }% +} +\renewcommand{\glsdisablehyper}{% + \KV@glslink@hyperfalse + \def\@glslink{\glsdonohyperlink}% + \let\@glstarget\@secondoftwo +} +\renewcommand{\glsenablehyper}{% + \KV@glslink@hypertrue + \def\@glslink{\glsxtrdohyperlink}% + \def\@glstarget{\glsdohypertarget}% +} +\def\glsdonohyperlink#1#2{{\glsxtrprotectlinks #2}} +\ifcsundef{hyperlink}% +{% + \def\@glslink{\glsdonohyperlink} +}% +{% + \def\@glslink{\glsxtrdohyperlink} +} +\newcommand*{\glsxtrprotectlinks}{% + \KV@glslink@hyperfalse + \KV@glslink@noindextrue + \let\@gls@\@glsxtr@p@text@ + \let\@Gls@\@Glsxtr@p@text@ + \let\@GLS@\@GLSxtr@p@text@ + \let\@glspl@\@glsxtr@p@plural@ + \let\@Glspl@\@Glsxtr@p@plural@ + \let\@GLSpl@\@GLSxtr@p@plural@ + \let\@glsxtrshort\@glsxtr@p@short@ + \let\@Glsxtrshort\@Glsxtr@p@short@ + \let\@GLSxtrshort\@GLSxtr@p@short@ + \let\@glsxtrlong\@glsxtr@p@long@ + \let\@Glsxtrlong\@Glsxtr@p@long@ + \let\@GLSxtrlong\@GLSxtr@p@long@ + \let\@glsxtrshortpl\@glsxtr@p@shortpl@ + \let\@Glsxtrshortpl\@Glsxtr@p@shortpl@ + \let\@GLSxtrshortpl\@GLSxtr@p@shortpl@ + \let\@glsxtrlongpl\@glsxtr@p@longpl@ + \let\@Glsxtrlongpl\@Glsxtr@p@longpl@ + \let\@GLSxtrlongpl\@GLSxtr@p@longpl@ + \let\@acrshort\@glsxtr@p@acrshort@ + \let\@Acrshort\@Glsxtr@p@acrshort@ + \let\@ACRshort\@GLSxtr@p@acrshort@ + \let\@acrshortpl\@glsxtr@p@acrshortpl@ + \let\@Acrshortpl\@Glsxtr@p@acrshortpl@ + \let\@ACRshortpl\@GLSxtr@p@acrshortpl@ + \let\@acrlong\@glsxtr@p@acrlong@ + \let\@Acrlong\@Glsxtr@p@acrlong@ + \let\@ACRlong\@GLSxtr@p@acrlong@ + \let\@acrlongpl\@glsxtr@p@acrlongpl@ + \let\@Acrlongpl\@Glsxtr@p@acrlongpl@ + \let\@ACRlongpl\@GLSxtr@p@acrlongpl@ +} +\def\@glsxtr@p@text@#1#2[#3]{{\@glstext@{#1}{#2}[#3]}} +\def\@Glsxtr@p@text@#1#2[#3]{{\@Glstext@{#1}{#2}[#3]}} +\def\@GLSxtr@p@text@#1#2[#3]{{\@GLStext@{#1}{#2}[#3]}} +\def\@glsxtr@p@plural@#1#2[#3]{{\@glsplural@{#1}{#2}[#3]}} +\def\@Glsxtr@p@plural@#1#2[#3]{{\@Glsplural@{#1}{#2}[#3]}} +\def\@GLSxtr@p@plural@#1#2[#3]{{\@GLSplural@{#1}{#2}[#3]}} +\def\@glsxtr@p@short@#1#2[#3]{% + {% + \glssetabbrvfmt{\glscategory{#2}}% + \glsabbrvfont{\glsentryshort{#2}}#3% + }% +} +\def\@Glsxtr@p@short@#1#2[#3]{% + {% + \glssetabbrvfmt{\glscategory{#2}}% + \glsabbrvfont{\Glsentryshort{#2}}#3% + }% +} +\def\@GLSxtr@p@short@#1#2[#3]{% + {% + \glssetabbrvfmt{\glscategory{#2}}% + \mfirstucMakeUppercase{\glsabbrvfont{\glsentryshort{#2}}#3}% + }% +} +\def\@glsxtr@p@shortpl@#1#2[#3]{% + {% + \glssetabbrvfmt{\glscategory{#2}}% + \glsabbrvfont{\glsentryshortpl{#2}}#3% + }% +} +\def\@Glsxtr@p@shortpl@#1#2[#3]{% + {% + \glssetabbrvfmt{\glscategory{#2}}% + \glsabbrvfont{\Glsentryshortpl{#2}}#3% + }% +} +\def\@GLSxtr@p@shortpl@#1#2[#3]{% + {% + \glssetabbrvfmt{\glscategory{#2}}% + \mfirstucMakeUppercase{\glsabbrvfont{\glsentryshortpl{#2}}#3}% + }% +} +\def\@glsxtr@p@long@#1#2[#3]{{\glsentrylong{#2}#3}} +\def\@Glsxtr@p@long@#1#2[#3]{{\Glsentrylong{#2}#3}} +\def\@GLSxtr@p@long@#1#2[#3]{% + {\mfirstucMakeUppercase{\glslongfont{\glsentrylong{#2}}#3}}} +\def\@glsxtr@p@longpl@#1#2[#3]{{\glsentrylongpl{#2}#3}} +\def\@Glsxtr@p@longpl@#1#2[#3]{{\glslongfont{\Glsentrylongpl{#2}}#3}} +\def\@GLSxtr@p@longpl@#1#2[#3]{% + {\mfirstucMakeUppercase{\glslongfont{\glsentrylongpl{#2}}#3}}} +\def\@glsxtr@p@acrshort@#1#2[#3]{{\acronymfont{\glsentryshort{#2}}#3}} +\def\@Glsxtr@p@acrshort@#1#2[#3]{{\acronymfont{\Glsentryshort{#2}}#3}} +\def\@GLSxtr@p@acrshort@#1#2[#3]{% + {\mfirstucMakeUppercase{\acronymfont{\glsentryshort{#2}}#3}}} +\def\@glsxtr@p@acrshortpl@#1#2[#3]{{\acronymfont{\glsentryshortpl{#2}}#3}} +\def\@Glsxtr@p@acrshortpl@#1#2[#3]{{\acronymfont{\Glsentryshortpl{#2}}#3}} +\def\@GLSxtr@p@acrshortpl@#1#2[#3]{% + {\mfirstucMakeUppercase{\acronymfont{\glsentryshortpl{#2}}#3}}} +\def\@glsxtr@p@acrlong@#1#2[#3]{{\glsentrylong{#2}#3}} +\def\@Glsxtr@p@acrlong@#1#2[#3]{{\Glsentrylong{#2}#3}} +\def\@GLSxtr@p@acrlong@#1#2[#3]{% + {\mfirstucMakeUppercase{\glsentrylong{#2}#3}}} +\def\@glsxtr@p@acrlongpl@#1#2[#3]{{\glsentrylongpl{#2}#3}} +\def\@Glsxtr@p@acrlongpl@#1#2[#3]{{\Glsentrylongpl{#2}#3}} +\def\@GLSxtr@p@acrlongpl@#1#2[#3]{% + {\mfirstucMakeUppercase{\glsentrylongpl{#2}#3}}} +\newcommand*{\@glsxtrp@opt}{hyper=false,noindex} +\newcommand*{\glsxtrsetpopts}[1]{% + \renewcommand*{\@glsxtrp@opt}{#1}% +} +\newcommand*{\glossxtrsetpopts}{% + \glsxtrsetpopts{noindex}% +} +\newrobustcmd*{\@@glsxtrp}[2]{% + {% + \let\glspostlinkhook\relax + \csname#1\expandafter\endcsname\expandafter[\@glsxtrp@opt]{#2}[]% + }% +} +\newrobustcmd*{\@glsxtrp}[2]{% + \ifcsdef{gls#1}% + {% + \@@glsxtrp{gls#1}{#2}% + }% + {% + \ifcsdef{glsxtr#1}% + {% + \@@glsxtrp{glsxtr#1}{#2}% + }% + {% + \PackageError{glossaries-extra}{`#1' not recognised by + \string\glsxtrp}{}% + }% + }% +} +\newrobustcmd*{\@Glsxtrp}[2]{% + \ifcsdef{Gls#1}% + {% + \@@glsxtrp{Gls#1}{#2}% + }% + {% + \ifcsdef{Glsxtr#1}% + {% + \@@glsxtrp{Glsxtr#1}{#2}% + }% + {% + \PackageError{glossaries-extra}{`#1' not recognised by + \string\Glsxtrp}{}% + }% + }% +} +\newrobustcmd*{\@GLSxtrp}[2]{% + \ifcsdef{GLS#1}% + {% + \@@glsxtrp{GLS#1}{#2}% + }% + {% + \ifcsdef{GLSxtr#1}% + {% + \@@glsxtrp{GLSxtr#1}{#2}% + }% + {% + \PackageError{glossaries-extra}{`#1' not recognised by + \string\GLSxtrp}{}% + }% + }% +} +\newrobustcmd*{\glsxtr@headentry@p}[2]{% + \glsifattribute{#1}{headuc}{true}% + {% + \mfirstucMakeUppercase{\@gls@entry@field{#1}{#2}}% + }% + {% + \@gls@entry@field{#1}{#2}% + }% +} +\ifdef\texorpdfstring +{ + \newcommand{\glsxtrp}[2]{% + \protect\NoCaseChange + {% + \protect\texorpdfstring + {% + \protect\glsxtrifinmark + {% + \ifcsdef{glsxtrhead#1}% + {% + {\protect\csuse{glsxtrhead#1}{#2}}% + }% + {% + \glsxtr@headentry@p{#2}{#1}% + }% + }% + {% + \@glsxtrp{#1}{#2}% + }% + }% + {% + \protect\@gls@entry@field{#2}{#1}% + }% + }% + } +} +{ + \newcommand{\glsxtrp}[2]{% + \protect\NoCaseChange + {% + \protect\glsxtrifinmark + {% + \ifcsdef{glsxtrhead#1}% + {% + {\protect\csuse{glsxtrhead#1}}% + }% + {% + \glsxtr@headentry@p{#2}{#1}% + }% + }% + {% + \@glsxtrp{#1}{#2}% + }% + }% + } +} +\newcommand*{\glsps}{\glsxtrp{short}} +\newcommand*{\glspt}{\glsxtrp{text}} +\ifdef\texorpdfstring +{ + \newcommand{\Glsxtrp}[2]{% + \protect\NoCaseChange + {% + \protect\texorpdfstring + {% + \protect\glsxtrifinmark + {% + \ifcsdef{Glsxtrhead#1}% + {% + {\protect\csuse{Glsxtrhead#1}{#2}}% + }% + {% + \protect\@Gls@entry@field{#2}{#1}% + }% + }% + {% + \@Glsxtrp{#1}{#2}% + }% + }% + {% + \protect\@gls@entry@field{#2}{#1}% + }% + }% + } +} +{ + \newcommand{\Glsxtrp}[2]{% + \protect\NoCaseChange + {% + \protect\glsxtrifinmark + {% + \ifcsdef{Glsxtrhead#1}% + {% + {\protect\csuse{Glsxtrhead#1}}% + }% + {% + \protect\@Gls@entry@field{#2}{#1}% + }% + }% + {% + \@Glsxtrp{#1}{#2}% + }% + }% + } +} +\ifdef\texorpdfstring +{ + \newcommand{\GLSxtrp}[2]{% + \protect\NoCaseChange + {% + \protect\texorpdfstring + {% + \protect\glsxtrifinmark + {% + \ifcsdef{GLSxtr#1}% + {% + {\protect\GLSxtrshort[noindex,hyper=false]{#1}[]}% + }% + {% + \protect\mfirstucMakeUppercase + {% + \protect\@gls@entry@field{#2}{#1}% + }% + }% + }% + {% + \@GLSxtrp{#1}{#2}% + }% + }% + {% + \protect\@gls@entry@field{#2}{#1}% + }% + }% + } +} +{ + \newcommand{\GLSxtrp}[2]{% + \protect\NoCaseChange + {% + \protect\glsxtrifinmark + {% + \ifcsdef{GLSxtr#1}% + {% + {\protect\GLSxtrshort[noindex,hyper=false]{#1}[]}% + }% + {% + \protect\mfirstucMakeUppercase + {% + \protect\@gls@entry@field{#2}{#1}% + }% + }% + }% + {% + \@GLSxtrp{#1}{#2}% + }% + }% + } +} +\newcommand*{\@glsxtr@unset}[1]{% + \@@glsunset{#1}% + \glsxtrpostunset{#1}% +}% +\let\@glsunset\@glsxtr@unset +\newcommand*{\glsxtrpostunset}[1]{} +\newcommand*{\GlsXtrStartUnsetBuffering}{% + \@ifstar\s@GlsXtrStartUnsetBuffering\@GlsXtrStartUnsetBuffering +} +\newcommand*{\@GlsXtrStartUnsetBuffering}{% + \let\@glsxtr@org@unset@buffer\@glsxtr@unset@buffer + \def\@glsxtr@unset@buffer{}% + \let\@glsunset\@glsxtrbuffer@unset +} +\newcommand*{\s@GlsXtrStartUnsetBuffering}{% + \let\@glsxtr@org@unset@buffer\@glsxtr@unset@buffer + \def\@glsxtr@unset@buffer{}% + \let\@glsunset\@glsxtrbuffer@nodup@unset +} +\newcommand*{\@glsxtrbuffer@unset}[1]{% + \listxadd\@glsxtr@unset@buffer{#1}% +} +\newcommand*{\@glsxtrbuffer@nodup@unset}[1]{% + \expandafter\ifinlist\expandafter{#1}{\@glsxtr@unset@buffer}{}% + {\listxadd\@glsxtr@unset@buffer{#1}}% +} +\newcommand*{\GlsXtrStopUnsetBuffering}{% + \@ifstar\s@GlsXtrStopUnsetBuffering\@GlsXtrStopUnsetBuffering +} +\newcommand*{\@GlsXtrStopUnsetBuffering}{% + \let\@glsunset\@glsxtr@unset + \forlistloop\@glsunset\@glsxtr@unset@buffer + \let\@glsxtr@unset@buffer\@glsxtr@org@unset@buffer +} +\newcommand*{\s@GlsXtrStopUnsetBuffering}{% + \forlistloop\@glslocalunset\@glsxtr@unset@buffer + \let\@glsunset\@glsxtr@unset +} +\newcommand*{\GlsXtrDiscardUnsetBuffering}{% + \let\@glsunset\@glsxtr@unset + \let\@glsxtr@unset@buffer\@glsxtr@org@unset@buffer +} +\newcommand*{\GlsXtrForUnsetBufferedList}[1]{% + \forlistloop#1\@glsxtr@unset@buffer +} +\renewcommand*{\@glslocalunset}[1]{% + \@@glslocalunset{#1}% + \glsxtrpostlocalunset{#1}% +}% +\newcommand*{\glsxtrpostlocalunset}[1]{} +\renewcommand*{\@glsreset}[1]{% + \@@glsreset{#1}% + \glsxtrpostreset{#1}% +}% +\newcommand*{\glsxtrpostreset}[1]{} +\renewcommand*{\@glslocalreset}[1]{% + \@@glslocalreset{#1}% + \glsxtrpostlocalreset{#1}% +}% +\newcommand*{\glsxtrpostlocalreset}[1]{} +\newcommand*{\glslocalreseteach}[1]{% + \gls@ifnotmeasuring + {% + \@for\@gls@thislabel:=#1\do{% + \glsdoifexists{\@gls@thislabel}% + {% + \@glslocalreset{\@gls@thislabel}% + }% + }% + }% +} +\newcommand*{\glslocalunseteach}[1]{% + \gls@ifnotmeasuring + {% + \@for\@gls@thislabel:=#1\do{% + \glsdoifexists{\@gls@thislabel}% + {% + \@glslocalunset{\@gls@thislabel}% + }% + }% + }% +} +\newcommand*{\GlsXtrEnableEntryCounting}[2]{% + \glsenableentrycount + \renewcommand*{\gls}{\cgls}% + \renewcommand*{\Gls}{\cGls}% + \renewcommand*{\glspl}{\cglspl}% + \renewcommand*{\Glspl}{\cGlspl}% + \renewcommand*{\GLS}{\cGLS}% + \renewcommand*{\GLSpl}{\cGLSpl}% + \@glsxtr@setentrycountunsetattr{#1}{#2}% + \let\GlsXtrEnableEntryCounting\@glsxtr@setentrycountunsetattr + \renewcommand*{\GlsXtrEnableEntryUnitCounting}[3]{% + \PackageError{glossaries-extra}{\string\GlsXtrEnableEntryUnitCounting\space + can't be used with \string\GlsXtrEnableEntryCounting}% + {Use one or other but not both commands}}% +} +\newcommand*{\@glsxtr@setentrycountunsetattr}[2]{% + \@for\@glsxtr@cat:=#1\do + {% + \ifdefempty{\@glsxtr@cat}{}% + {% + \glssetcategoryattribute{\@glsxtr@cat}{entrycount}{#2}% + }% + }% +} +\renewcommand*{\glsenableentrycount}{% + \appto\@newglossaryentry@defcounters{\@@newglossaryentry@defcounters}% + \renewcommand*{\gls@defdocnewglossaryentry}{% + \renewcommand*\newglossaryentry[2]{% + \PackageError{glossaries}{\string\newglossaryentry\space + may only be used in the preamble when entry counting has + been activated}{If you use \string\glsenableentrycount\space + you must place all entry definitions in the preamble not in + the document environment}% + }% + }% + \newcommand*{\glsentrycurrcount}[1]{% + \ifcsundef{glo@\glsdetoklabel{##1}@currcount}% + {0}{\@gls@entry@field{##1}{currcount}}% + }% + \newcommand*{\glsentryprevcount}[1]{% + \ifcsundef{glo@\glsdetoklabel{##1}@prevcount}% + {0}{\@gls@entry@field{##1}{prevcount}}% + }% + \let\@glsxtr@entrycount@org@unset\glsxtrpostunset + \renewcommand*{\glsxtrpostunset}[1]{% + \@glsxtr@entrycount@org@unset{##1}% + \@gls@increment@currcount{##1}% + }% + \let\@glsxtr@entrycount@org@localunset\glsxtrpostlocalunset + \renewcommand*{\glsxtrpostlocalunset}[1]{% + \@glsxtr@entrycount@org@localunset{##1}% + \@gls@local@increment@currcount{##1}% + }% + \let\@glsxtr@entrycount@org@reset\glsxtrpostreset + \renewcommand*{\glsxtrpostreset}[1]{% + \@glsxtr@entrycount@org@reset{##1}% + \csgdef{glo@\glsdetoklabel{##1}@currcount}{0}% + }% + \let\@glsxtr@entrycount@org@localreset\glsxtrpostlocalreset + \renewcommand*{\glsxtrpostlocalreset}[1]{% + \@glsxtr@entrycount@org@localreset{##1}% + \csdef{glo@\glsdetoklabel{##1}@currcount}{0}% + }% + \let\@cgls@\@@cgls@ + \let\@cglspl@\@@cglspl@ + \let\@cGls@\@@cGls@ + \let\@cGlspl@\@@cGlspl@ + \let\@cGLS@\@@cGLS@ + \let\@cGLSpl@\@@cGLSpl@ + \AtEndDocument{\@gls@write@entrycounts}% + \renewcommand*{\@gls@entry@count}[2]{% + \csgdef{glo@\glsdetoklabel{##1}@prevcount}{##2}% + }% + \let\glsenableentrycount\relax + \renewcommand*{\glsenableentryunitcount}{% + \PackageError{glossaries-extra}{\string\glsenableentryunitcount\space + can't be used with \string\glsenableentrycount}% + {Use one or other but not both commands}% + }% +} +\renewcommand*{\@gls@write@entrycounts}{% + \immediate\write\@auxout + {\string\providecommand*{\string\@gls@entry@count}[2]{}}% + \count@=0\relax + \forallglsentries{\@glsentry}{% + \glshasattribute{\@glsentry}{entrycount}% + {% + \ifglsused{\@glsentry}% + {% + \immediate\write\@auxout + {\string\@gls@entry@count{\@glsentry}{\glsentrycurrcount{\@glsentry}}}% + }% + {}% + \advance\count@ by \@ne + }% + {}% + }% + \ifnum\count@=0 + \GlossariesExtraWarningNoLine{Entry counting has been enabled + \MessageBreak with \string\glsenableentrycount\space but the + \MessageBreak attribute `entrycount' hasn't + \MessageBreak been assigned to any of the defined + \MessageBreak entries}% + \fi +} +\newcommand*{\glsxtrifcounttrigger}[3]{% + \glshasattribute{#1}{entrycount}% + {% + \ifnum\glsentryprevcount{#1}>\glsgetattribute{#1}{entrycount}\relax + #3% + \else + #2% + \fi + }% + {#3}% +} +\def\@@cgls@#1#2[#3]{% + \glsxtrifcounttrigger{#2}% + {% + \cglsformat{#2}{#3}% + \glsunset{#2}% + }% + {% + \@gls@{#1}{#2}[#3]% + }% +}% +\def\@@cglspl@#1#2[#3]{% + \glsxtrifcounttrigger{#2}% + {% + \cglsplformat{#2}{#3}% + \glsunset{#2}% + }% + {% + \@glspl@{#1}{#2}[#3]% + }% +}% +\def\@@cGls@#1#2[#3]{% + \glsxtrifcounttrigger{#2}% + {% + \cGlsformat{#2}{#3}% + \glsunset{#2}% + }% + {% + \@Gls@{#1}{#2}[#3]% + }% +}% +\def\@@cGlspl@#1#2[#3]{% + \glsxtrifcounttrigger{#2}% + {% + \cGlsplformat{#2}{#3}% + \glsunset{#2}% + }% + {% + \@Glspl@{#1}{#2}[#3]% + }% +}% +\def\@@cGLS@#1#2[#3]{% + \glsxtrifcounttrigger{#2}% + {% + \cGLSformat{#2}{#3}% + \glsunset{#2}% + }% + {% + \@GLS@{#1}{#2}[#3]% + }% +}% +\def\@@cGLSpl@#1#2[#3]{% + \glsxtrifcounttrigger{#2}% + {% + \cGLSplformat{#2}{#3}% + \glsunset{#2}% + }% + {% + \@GLSpl@{#1}{#2}[#3]% + }% +}% +\def\@cgls@#1#2[#3]{\@gls@{#1}{#2}[#3]} +\def\@cGls@#1#2[#3]{\@Gls@{#1}{#2}[#3]} +\def\@cglspl@#1#2[#3]{\@glspl@{#1}{#2}[#3]} +\def\@cGlspl@#1#2[#3]{\@Glspl@{#1}{#2}[#3]} +\newrobustcmd*{\cGLS}{\@gls@hyp@opt\@cGLS} +\newcommand*{\@cGLS}[2][]{% + \new@ifnextchar[{\@cGLS@{#1}{#2}}{\@cGLS@{#1}{#2}[]}% +} +\def\@cGLS@#1#2[#3]{\@GLS@{#1}{#2}[#3]} +\newcommand*{\cGLSformat}[2]{% + \expandafter\mfirstucMakeUppercase\expandafter{\cglsformat{#1}{#2}}% +} +\newrobustcmd*{\cGLSpl}{\@gls@hyp@opt\@cGLSpl} +\newcommand*{\@cGLSpl}[2][]{% + \new@ifnextchar[{\@cGLSpl@{#1}{#2}}{\@cGLSpl@{#1}{#2}[]}% +} +\def\@cGLSpl@#1#2[#3]{\@GLSpl@{#1}{#2}[#3]} +\newcommand*{\cGLSplformat}[2]{% + \expandafter\mfirstucMakeUppercase\expandafter{\cglsplformat{#1}{#2}}% +} +\renewcommand*{\cglsformat}[2]{% + \glsifregular{#1} + {\glsentryfirst{#1}}% + {\ifglshaslong{#1}{\glsentrylong{#1}}{\glsentryfirst{#1}}}#2% +} +\renewcommand*{\cGlsformat}[2]{% + \glsifregular{#1} + {\Glsentryfirst{#1}}% + {\ifglshaslong{#1}{\Glsentrylong{#1}}{\Glsentryfirst{#1}}}#2% +} +\renewcommand*{\cglsplformat}[2]{% + \glsifregular{#1} + {\glsentryfirstplural{#1}}% + {\ifglshaslong{#1}{\glsentrylongpl{#1}}{\glsentryfirstplural{#1}}}#2% +} +\renewcommand*{\cGlsplformat}[2]{% + \glsifregular{#1} + {\Glsentryfirstplural{#1}}% + {\ifglshaslong{#1}{\Glsentrylongpl{#1}}{\Glsentryfirstplural{#1}}}#2% +} +\newcommand*{\@@newglossaryentry@defunitcounters}{% + \protected@edef\@glo@countunit{\csuse{@glsxtr@categoryattr@@\@glo@category @unitcount}}% + \ifdefvoid\@glo@countunit + {}% + {% + \@glsxtr@ifunitcounter{\@glo@countunit}% + {}% + {\expandafter\@glsxtr@addunitcounter\expandafter{\@glo@countunit}}% + }% +} +\newcommand*{\@glsxtr@unitcountlist}{} +\newcommand*{\@glsxtr@addunitcounter}[1]{% + \listadd{\@glsxtr@unitcountlist}{#1}% + \ifcsundef{glsxtr@theunit@#1} + {% + \ifcsdef{theH#1}% + {\csdef{glsxtr@theunit@#1}{\csuse{theH#1}}}% + {\csdef{glsxtr@theunit@#1}{\csuse{the#1}}}% + }% + {}% +} +\newcommand*{\@glsxtr@ifunitcounter}[3]{% + \xifinlist{#1}{\@glsxtr@unitcountlist}{#2}{#3}% +} +\newcommand*\@glsxtr@currentunitcount[1]{% + glo@\glsdetoklabel{#1}@currunit@\glsgetattribute{#1}{unitcount}.% + \csuse{glsxtr@theunit@\glsgetattribute{#1}{unitcount}}% +} +\newcommand*\@glsxtr@previousunitcount[1]{% + glo@\glsdetoklabel{#1}@prevunit@\glsgetattribute{#1}{unitcount}.% + \csuse{glsxtr@theunit@\glsgetattribute{#1}{unitcount}}% +} +\newcommand*{\@gls@increment@currunitcount}[1]{% + \glshasattribute{#1}{unitcount}% + {% + \protected@edef\@glsxtr@csname{\@glsxtr@currentunitcount{#1}}% + \ifcsundef{\@glsxtr@csname}% + {% + \csgdef{\@glsxtr@csname}{1}% + \listcsxadd + {glo@\glsdetoklabel{#1}@unitlist}% + {\glsgetattribute{#1}{unitcount}.% + \csuse{glsxtr@theunit@\glsgetattribute{#1}{unitcount}}% + }% + }% + {% + \csxdef{\@glsxtr@csname}% + {\number\numexpr\csname\@glsxtr@csname\endcsname+1}% + }% + }% + {}% +} +\newcommand*{\@gls@local@increment@currunitcount}[1]{% + \glshasattribute{#1}{unitcount}% + {% + \protected@edef\@glsxtr@csname{\@glsxtr@currentunitcount{#1}}% + \ifcsundef{\@glsxtr@csname}% + {% + \csdef{\@glsxtr@csname}{1}% + \listcseadd + {glo@\glsdetoklabel{#1}@unitlist}% + {\glsgetattribute{#1}{unitcount}.% + \csuse{glsxtr@theunit@\glsgetattribute{#1}{unitcount}}% + }% + }% + {% + \csedef{\@glsxtr@csname}% + {\number\numexpr\csname\@glsxtr@csname\endcsname+1}% + }% + }% + {}% +} +\newcommand*{\@glsxtr@currunitcount}[2]{% + \ifcsundef + {glo@\glsdetoklabel{#1}@currunit@#2}% + {0}% + {\csuse{glo@\glsdetoklabel{#1}@currunit@#2}}% +}% +\newcommand*{\@glsxtr@prevunitcount}[2]{% + \ifcsundef + {glo@\glsdetoklabel{#1}@prevunit@#2}% + {0}% + {\csuse{glo@\glsdetoklabel{#1}@prevunit@#2}}% +}% +\newcommand*{\glsenableentryunitcount}{% + \appto\@newglossaryentry@defcounters{\@@newglossaryentry@defunitcounters}% + \renewcommand*{\gls@defdocnewglossaryentry}{% + \renewcommand*\newglossaryentry[2]{% + \PackageError{glossaries}{\string\newglossaryentry\space + may only be used in the preamble when entry counting has + been activated}{If you use \string\glsenableentryunitcount\space + you must place all entry definitions in the preamble not in + the document environment}% + }% + }% + \newcommand*{\glsentrycurrcount}[1]{% + \@glsxtr@currunitcount{##1}{\glsgetattribute{##1}{unitcount}.% + \csuse{glsxtr@theunit@\glsgetattribute{##1}{unitcount}}}% + }% + \newcommand*{\glsentryprevcount}[1]{% + \@glsxtr@prevunitcount{##1}{\glsgetattribute{##1}{unitcount}.% + \csuse{glsxtr@theunit@\glsgetattribute{##1}{unitcount}}}% + }% + \newcommand*{\glsentryprevtotalcount}[1]{% + \ifcsundef{glo@\glsdetoklabel{##1}@prevunittotal}% + {0}% + {% + \number\csuse{glo@\glsdetoklabel{##1}@prevunittotal} + }% + }% + \newcommand*{\glsentryprevmaxcount}[1]{% + \ifcsundef{glo@\glsdetoklabel{##1}@prevunitmax}% + {0}% + {% + \number\csuse{glo@\glsdetoklabel{##1}@prevunitmax} + }% + }% + \let\@glsxtr@entryunitcount@org@unset\glsxtrpostunset + \renewcommand*{\glsxtrpostunset}[1]{% + \@glsxtr@entryunitcount@org@unset{##1}% + \@gls@increment@currunitcount{##1}% + }% + \let\@glsxtr@entryunitcount@org@localunset\glsxtrpostlocalunset + \renewcommand*{\glsxtrpostlocalunset}[1]{% + \@glsxtr@entryunitcount@org@localunset{##1}% + \@gls@local@increment@currunitcount{##1}% + }% + \let\@glsxtr@entryunitcount@org@reset\glsxtrpostreset + \renewcommand*{\glsxtrpostreset}[1]{% + \glshasattribute{##1}{unitcount}% + {% + \protected@edef\@glsxtr@csname{\@glsxtr@currentunitcount{##1}}% + \ifcsundef{\@glsxtr@csname}% + {}% + {\csgdef{\@glsxtr@csname}{0}}% + }% + {}% + }% + \let\@glsxtr@entryunitcount@org@localreset\glsxtrpostlocalreset + \renewcommand*{\glsxtrpostlocalreset}[1]{% + \@glsxtr@entryunitcount@org@localreset{##1}% + \glshasattribute{##1}{unitcount}% + {% + \protected@edef\@glsxtr@csname{\@glsxtr@currentunitcount{##1}}% + \ifcsundef{\@glsxtr@csname}% + {}% + {\csdef{\@glsxtr@csname}{0}}% + }% + {}% + }% + \let\@cgls@\@@cgls@ + \let\@cglspl@\@@cglspl@ + \let\@cGls@\@@cGls@ + \let\@cGlspl@\@@cGlspl@ + \let\@cGLS@\@@cGLS@ + \let\@cGLSpl@\@@cGLSpl@ + \AtEndDocument{\@gls@write@entryunitcounts}% + \renewcommand*{\@gls@entry@unitcount}[3]{% + \csgdef{glo@\glsdetoklabel{##1}@prevunit@##3}{##2}% + \ifcsundef{glo@\glsdetoklabel{##1}@prevunittotal}% + {\csgdef{glo@\glsdetoklabel{##1}@prevunittotal}{##2}}% + {% + \csxdef{glo@\glsdetoklabel{##1}@prevunittotal}{ + \number\numexpr\csuse{glo@\glsdetoklabel{##1}@prevunittotal}+##2}% + }% + \ifcsundef{glo@\glsdetoklabel{##1}@prevunitmax}% + {\csgdef{glo@\glsdetoklabel{##1}@prevunitmax}{##2}}% + {% + \ifnum\csuse{glo@\glsdetoklabel{##1}@prevunitmax}<##2 + \csgdef{glo@\glsdetoklabel{##1}@prevunitmax}{##2}% + \fi + }% + }% + \let\glsenableentryunitcount\relax + \renewcommand*{\glsenableentrycount}{% + \PackageError{glossaries-extra}{\string\glsenableentrycount\space + can't be used with \string\glsenableentryunitcount}% + {Use one or other but not both commands}% + }% +} +\@onlypreamble\glsenableentryunitcount +\newcommand*{\@gls@entry@unitcount}[3]{} +\newcommand*{\@gls@write@entryunitcounts@do}[1]{% + \immediate\write\@auxout + {\string\@gls@entry@unitcount + {\@glsentry}% + {\@glsxtr@currunitcount{\@glsentry}{#1}% + }% + {#1}}% +} +\newcommand*{\@gls@write@entryunitcounts}{% + \immediate\write\@auxout + {\string\providecommand*{\string\@gls@entry@unitcount}[3]{}}% + \count@=0\relax + \forallglsentries{\@glsentry}{% + \glshasattribute{\@glsentry}{unitcount}% + {% + \ifglsused{\@glsentry}% + {% + \forlistcsloop + {\@gls@write@entryunitcounts@do}% + {glo@\glsdetoklabel{\@glsentry}@unitlist}% + }% + {}% + \advance\count@ by \@ne + }% + {}% + }% + \ifnum\count@=0 + \GlossariesExtraWarningNoLine{Entry counting has been enabled + \MessageBreak with \string\glsenableentryunitcount\space but the + \MessageBreak attribute `unitcount' hasn't + \MessageBreak been assigned to any of the defined + \MessageBreak entries}% + \fi +} +\newcommand*{\GlsXtrEnableEntryUnitCounting}[3]{% + \glsenableentryunitcount + \renewcommand*{\gls}{\cgls}% + \renewcommand*{\Gls}{\cGls}% + \renewcommand*{\glspl}{\cglspl}% + \renewcommand*{\Glspl}{\cGlspl}% + \renewcommand*{\GLS}{\cGLS}% + \renewcommand*{\GLSpl}{\cGLSpl}% + \@glsxtr@setentryunitcountunsetattr{#1}{#2}{#3}% + \let\GlsXtrEnableEntryUnitCounting\@glsxtr@setentryunitcountunsetattr + \renewcommand*{\GlsXtrEnableEntryCounting}[2]{% + \PackageError{glossaries-extra}{\string\GlsXtrEnableEntryCounting\space + can't be used with \string\GlsXtrEnableEntryUnitCounting}% + {Use one or other but not both commands}}% +} +\newcommand*{\@glsxtr@setentryunitcountunsetattr}[3]{% + \@for\@glsxtr@cat:=#1\do + {% + \ifdefempty{\@glsxtr@cat}{}% + {% + \glssetcategoryattribute{\@glsxtr@cat}{entrycount}{#2}% + \glssetcategoryattribute{\@glsxtr@cat}{unitcount}{#3}% + }% + }% +} +\renewcommand*{\SetGenericNewAcronym}{% + \ifdefequal\@addtoacronymlists\@glsxtr@org@addtoacronynlists + {}% + {% + \GlossariesWarning{\string\SetGenericNewAcronym\space used + without restoring base acronym functions with + \string\RestoreAcronyms}% + }% + \let\@Gls@entryname\@Gls@acrentryname + \renewcommand{\newacronym}[4][]{% + \ifdefempty{\@glsacronymlists}% + {% + \def\@glo@type{\acronymtype}% + \setkeys{glossentry}{##1}% + \DeclareAcronymList{\@glo@type}% + }% + {}% + \glskeylisttok{##1}% + \glslabeltok{##2}% + \glsshorttok{##3}% + \glslongtok{##4}% + \newacronymhook + \protected@edef\@do@newglossaryentry{% + \noexpand\newglossaryentry{\the\glslabeltok}% + {% + type=\acronymtype,% + name={\expandonce{\acronymentry{##2}}},% + sort={\acronymsort{\the\glsshorttok}{\the\glslongtok}},% + text={\the\glsshorttok},% + short={\the\glsshorttok},% + shortplural={\the\glsshorttok\noexpand\acrpluralsuffix},% + long={\the\glslongtok},% + longplural={\the\glslongtok\noexpand\acrpluralsuffix},% + category=acronym, + \GenericAcronymFields,% + \the\glskeylisttok + }% + }% + \@do@newglossaryentry + }% + \renewcommand*{\acrfullfmt}[3]{% + \glslink[##1]{##2}{\genacrfullformat{##2}{##3}}}% + \renewcommand*{\Acrfullfmt}[3]{% + \glslink[##1]{##2}{\Genacrfullformat{##2}{##3}}}% + \renewcommand*{\ACRfullfmt}[3]{% + \glslink[##1]{##2}{% + \mfirstucMakeUppercase{\genacrfullformat{##2}{##3}}}}% + \renewcommand*{\acrfullplfmt}[3]{% + \glslink[##1]{##2}{\genplacrfullformat{##2}{##3}}}% + \renewcommand*{\Acrfullplfmt}[3]{% + \glslink[##1]{##2}{\Genplacrfullformat{##2}{##3}}}% + \renewcommand*{\ACRfullplfmt}[3]{% + \glslink[##1]{##2}{% + \mfirstucMakeUppercase{\genplacrfullformat{##2}{##3}}}}% + \renewcommand*{\glsentryfull}[1]{\genacrfullformat{##1}{}}% + \renewcommand*{\Glsentryfull}[1]{\Genacrfullformat{##1}{}}% + \renewcommand*{\glsentryfullpl}[1]{\genplacrfullformat{##1}{}}% + \renewcommand*{\Glsentryfullpl}[1]{\Genplacrfullformat{##1}{}}% +} +\let\@glsxtr@org@setacronymstyle\setacronymstyle +\let\@glsxtr@org@newacronymstyle\newacronymstyle +\let\@glsxtr@acronymlists\@glsacronymlists +\let\@glsxtr@org@addtoacronynlists\@addtoacronymlists +\let\@glsxtr@org@setacronymlists\SetAcronymLists +\newcommand{\@glsxtr@abbrlists}{} +\newcommand*{\forallabbreviationlists}[2]{% + \@for#1:=\@glsxtr@abbrlists\do{\ifdefempty{#1}{}{#2}}% +} +\newcommand*{\@glsxtr@addabbreviationlist}[1]{% + \protected@edef\@glo@type{#1}% + \ifdefempty\@glsxtr@abbrlists + {\let\@glsxtr@abbrlists\@glo@type}% + {% + \ifdefequal\@glsxtr@abbrlists\@glo@type + {}% + {% + \expandafter\DTLifinlist\expandafter{\@glo@type}{\@glsxtr@abbrlists}{}% + {\protected@eappto\@glsxtr@abbrlists{,\@glo@type}}% + }% + }% +} +\renewcommand*{\forallacronyms}[2]{% + \@glsxtr@base@acrcmd\forallacronyms\forallabbreviationlists + \@for#1:=\@glsacronymlists\do{\ifx#1\@empty\else#2\fi}% +} +\newcommand*{\MakeAcronymsAbbreviations}{% + \@for\@gls@type:=\@glsacronymlists\do{% + \csgdef{gls@\@gls@type @entryfmt}{\glsentryfmt}% + }% + \let\@glsxtr@acronymlists\@glsacronymlists + \let\@glsacronymlists\@empty + \let\@addtoacronymlists\@gobble + \let\SetAcronymLists\@gobble + \let\@glsxtr@base@acrcmd\@@glsxtr@base@acrcmd@warn + \renewcommand*{\newacronym}[4][]{% + \glsxtr@newabbreviation{type=\acronymtype,category=acronym,##1}{##2}{##3}{##4}% + }% + \renewcommand*{\firstacronymfont}[1]{\glsfirstabbrvfont{##1}}% + \renewcommand*{\acronymfont}[1]{\glsabbrvfont{##1}}% + \renewcommand*{\setacronymstyle}[1]{% + \PackageError{glossaries-extra}{\string\setacronymstyle{##1} + unavailable. + Use \string\setabbreviationstyle[acronym]\space instead. + The original acronym interface can be restored with + \string\RestoreAcronyms}{}% + }% + \renewcommand*{\newacronymstyle}[1]{% + \GlossariesExtraWarning{New acronym style `##1' won't be + available unless you restore the original acronym interface with + \string\RestoreAcronyms}% + \@glsxtr@org@newacronymstyle{##1}% + }% +} +\MakeAcronymsAbbreviations +\newcommand*{\RestoreAcronyms}{% + \let\@glsacronymlists\@glsxtr@acronymlists + \let\@addtoacronymlists\@glsxtr@org@addtoacronynlists + \let\SetAcronymLists\@glsxtr@org@setacronymlists + \let\@glsxtr@base@acrcmd\@gobbletwo + \@for\@gls@type:=\@glsacronymlists\do{% + \SetDefaultAcronymDisplayStyle{\@gls@type}% + }% + \SetGenericNewAcronym + \renewcommand{\firstacronymfont}[1]{\acronymfont{##1}}% + \renewcommand{\acronymfont}[1]{##1}% + \let\setacronymstyle\@glsxtr@org@setacronymstyle + \let\newacronymstyle\@glsxtr@org@newacronymstyle + \renewcommand*\@gls@link@checkfirsthyper{% + \ifglsused{\glslabel}% + {\let\glsxtrifwasfirstuse\@secondoftwo} + {\let\glsxtrifwasfirstuse\@firstoftwo}% + \@glsxtr@org@checkfirsthyper + } + \glssetcategoryattribute{acronym}{regular}{false}% + \setacronymstyle{long-short}% +} +\renewcommand*{\glsacspace}[1]{% + \settowidth{\dimen@}{(\firstacronymfont{\glsentryshort{#1}})}% + \ifdim\dimen@<\glsacspacemax~\else\space\fi +} +\newcommand*{\glsacspacemax}{3em} +\newcommand*{\@glsxtr@reg@glosslist}{} +\let\@glsxtr@org@makeglossaries\makeglossaries +\providecommand\@makeglossaries@warn@noprintglossary{% + \ifdefstring{\@glo@types}{,}% + {% + \GlossariesWarningNoLine{No glossaries have been defined}% + }% + {% + \GlossariesWarningNoLine{No \string\printglossary\space + or \string\printglossaries\space + found. ^^J(Remove \string\makeglossaries\space if you + don't want any glossaries.) ^^JThis document will not + have a glossary}% + }% +}% +\providecommand{\@domakeglossaries}[1]{#1} +\renewcommand*{\makeglossaries}[1][]{% + \@domakeglossaries + {% + \@glsxtr@if@record@only + {% + \PackageError{glossaries-extra}{\string\makeglossaries\space + not permitted\MessageBreak with record=\@glsxtr@record@setting\space + package option}% + {You may only use \string\makeglossaries\space with + record=off or record=hybrid options}% + }% + {% + \ifblank{#1}% + {% + \@glsxtr@org@makeglossaries + \ifx\@glsxtr@record@setting\@glsxtr@record@setting@alsoindex + \let\warn@noprintglossary\@glsxtr@warn@hybrid@noprintgloss + \fi + }% + {% + \ifx\@glsxtr@record@setting\@glsxtr@record@setting@alsoindex + \PackageError{glossaries-extra}{\string\makeglossaries[#1]\space + not permitted\MessageBreak with record=\@glsxtr@record@setting\space package option}% + {You may only use the hybrid \string\makeglossaries[...]\space with + record=off option}% + \else + \ifdef\@gls@@automake@immediate{\@gls@@automake@immediate}{}% + \protected@edef\@glsxtr@reg@glosslist{#1}% + \ifundef{\glswrite}{\newwrite\glswrite}{}% + \protected@write\@auxout{}{\string\providecommand + \string\@glsorder[1]{}} + \protected@write\@auxout{}{\string\providecommand + \string\@istfilename[1]{}} + \protected@write\@auxout{}{\string\@istfilename{\istfilename}}% + \protected@write\@auxout{}{\string\@glsorder{\glsorder}} + \protected@write\@auxout{}{\string\glsxtr@makeglossaries{#1}} + \write\@auxout{\string\providecommand\string\@gls@reference[3]{}}% + \@for\@glo@type:=#1\do{% + \ifdefempty{\@glo@type}{}{\@makeglossary{\@glo@type}}% + }% + \renewcommand*\newglossary[4][]{% + \PackageError{glossaries}{New glossaries + must be created before \string\makeglossaries}{You need + to move \string\makeglossaries\space after all your + \string\newglossary\space commands}}% + \let\@makeglossary\@gobble + \renewcommand\makeglossaries[1][]{}% + \@disable@onlypremakeg + \let\gls@checkseeallowed\relax + \renewcommand*{\@do@seeglossary}[2]{% + \glsdoifexists{##1}% + {% + \protected@edef\@gls@label{\glsdetoklabel{##1}}% + \protected@edef\@gls@type{\csname glo@\@gls@label @type\endcsname}% + \expandafter\DTLifinlist\expandafter{\@gls@type}{\@glsxtr@reg@glosslist}% + {\@glsxtr@org@doseeglossary{##1}{##2}}% + {% + \@@glsxtrwrglossmark + \protected@write\@auxout{}{% + \string\@gls@reference + {\gls@type}{\@gls@label}{\string\glsseeformat##2{}}% + }% + }% + }% + }% + \let\@glsxtr@@do@@wrglossary\@@do@@wrglossary + \def\@@do@@wrglossary{% + \protected@edef\@gls@type{\csname glo@\@gls@label @type\endcsname}% + \expandafter\DTLifinlist\expandafter{\@gls@type}{\@glsxtr@reg@glosslist}% + {\@glsxtr@@do@@wrglossary}% + {\gls@noidxglossary}% + }% + \let\warn@nomakeglossaries\relax + \let\warn@noprintglossary\@makeglossaries@warn@noprintglossary + \renewcommand{\@gls@noref@warn}[1]{% + \protected@edef\@gls@type{##1}% + \expandafter\DTLifinlist\expandafter{\@gls@type}{\@glsxtr@reg@glosslist}% + {% + \GlossariesExtraWarning{Can't use + \string\printnoidxglossary[type={\@gls@type}] + when `\@gls@type' is listed in the optional argument of + \string\makeglossaries}% + }% + {% + \GlossariesWarning{Empty glossary for + \string\printnoidxglossary[type={##1}]. + Rerun may be required (or you may have forgotten to use + commands like \string\gls)}% + }% + }% + \renewcommand*{\glsdisplaynumberlist}[1]{% + \expandafter\DTLifinlist\expandafter{##1}{\@glsxtr@reg@glosslist}% + {\@glsxtr@idx@displaynumberlist{##1}}% + {\@glsxtr@noidx@displaynumberlist{##1}}% + }% + \renewcommand*{\glsentrynumberlist}[1]{% + \expandafter\DTLifinlist\expandafter{##1}{\@glsxtr@reg@glosslist}% + {\@glsxtr@idx@entrynumberlist{##1}}% + {\@glsxtr@noidx@entrynumberlist{##1}}% + }% + \renewcommand*{\glsnumberlistloop}[2]{% + \expandafter\DTLifinlist\expandafter{##1}{\@glsxtr@reg@glosslist}% + {% + \PackageError{glossaries-extra}{\string\glsnumberlistloop\space + not available for glossary `##1'}{}% + }% + {\@glsxtr@noidx@numberlistloop{##1}{##2}}% + }% + \renewcommand*{\glsprestandardsort}[3]{% + \expandafter\DTLifinlist\expandafter{##2}{\@glsxtr@reg@glosslist}% + {% + \glsdosanitizesort + }% + {% + \ifglssanitizesort + \@gls@noidx@sanitizesort + \else + \@gls@noidx@nosanitizesort + \fi + }% + }% + \renewcommand*\new@glossaryentry[2]{% + \PackageError{glossaries-extra}{Glossary entries must be defined + in the preamble\MessageBreak when you use the optional argument + of \string\makeglossaries}{Either move your definitions to the + preamble or don't use the optional argument of + \string\makeglossaries}% + }% + \let\@glo@assign@sortkey\@glsxtr@mixed@assign@sortkey + \renewcommand*{\@printgloss@setsort}{% + \expandafter\@glsxtr@gettype\expandafter,\@glsxtr@printglossopts,% + type=\glsdefaulttype,\@end@glsxtr@gettype + \def\@glo@sorttype{\@glo@default@sorttype}% + }% + \ifglsautomake + \renewcommand*{\@gls@doautomake}{% + \@for\@gls@type:=\@glsxtr@reg@glosslist\do{% + \ifdefempty{\@gls@type}{}{\@gls@automake{\@gls@type}}% + }% + }% + \fi + \ifdef\@glo@check@sortallowed{\@glo@check@sortallowed\makeglossaries}{}% + \fi + }% + }% + }% +} +\ifdef\@printgloss@checkexists +{\newcommand{\glsxtr@printgloss@checkexists}{\@printgloss@checkexists}} +{\newcommand{\glsxtr@printgloss@checkexists}[2]{#2}} +\newcommand{\@glsxtr@orgprintglossary}[2]{% + \def\@glo@type{\glsdefaulttype}% + \def\glossarytitle{% + \ifcsdef{@glotype@\@glo@type @title}% + {\csuse{@glotype@\@glo@type @title}}% + {\glossaryname}}% + \def\glossarytoctitle{\glossarytitle}% + \let\org@glossarytitle\glossarytitle + \def\@glossarystyle{% + \ifx\@glossary@default@style\relax + \GlossariesWarning{No default glossary style provided \MessageBreak + for the glossary `\@glo@type'. \MessageBreak + Using deprecated fallback. \MessageBreak + To fix this set the style with \MessageBreak + \string\setglossarystyle\space or use the \MessageBreak + style key=value option}% + \fi + }% + \def\gls@dotoctitle{\glssettoctitle{\@glo@type}}% + \let\@org@glossaryentrynumbers\glossaryentrynumbers + \bgroup + \@printgloss@setsort + \setkeys{printgloss}{#1}% + \ifx\glossarytitle\org@glossarytitle + \else + \cslet{@glotype@\@glo@type @title}{\glossarytitle}% + \fi + \let\currentglossary\@glo@type + \let\org@glossaryentrynumbers\glossaryentrynumbers + \let\glsnonextpages\@glsnonextpages + \let\glsnextpages\@glsnextpages + \glsxtractivatenopost + \gls@dotoctitle + \@glossarystyle + \let\gls@org@glossaryentryfield\glossentry + \let\gls@org@glossarysubentryfield\subglossentry + \renewcommand{\glossentry}[1]{% + \protected@xdef\glscurrententrylabel{\glsdetoklabel{##1}}% + \gls@org@glossaryentryfield{##1}% + }% + \renewcommand{\subglossentry}[2]{% + \protected@xdef\glscurrententrylabel{\glsdetoklabel{##2}}% + \gls@org@glossarysubentryfield{##1}{##2}% + }% + \@gls@preglossaryhook + \glsxtr@printgloss@checkexists{\@glo@type}{#2}% + \egroup + \global\let\glossaryentrynumbers\@org@glossaryentrynumbers + \global\let\warn@noprintglossary\relax +} +\newcommand*{\glsxtractivatenopost}{% + \let\nopostdesc\@nopostdesc + \let\glsxtrnopostpunc\@glsxtr@nopostpunc +} +\newrobustcmd*{\glsxtrnopostpunc}{} +\newcommand{\@glsxtr@nopostpunc}{% + \let\@@glsxtr@org@postdescription\glspostdescription + \ifglsnopostdot + \renewcommand{\glspostdescription}{% + \glsnopostdottrue + \let\glspostdescription\@@glsxtr@org@postdescription + \let\glsxtrrestorepostpunc\@glsxtr@restore@postpunc + \glsxtrpostdescription + \@glsxtr@nopostpunc@postdesc}% + \else + \renewcommand{\glspostdescription}{% + \let\glspostdescription\@@glsxtr@org@postdescription + \let\glsxtrrestorepostpunc\@glsxtr@restore@postpunc + \glsxtrpostdescription + \@glsxtr@nopostpunc@postdesc}% + \fi + \glsnopostdotfalse +} +\newcommand*{\@glsxtr@nopostpunc@postdesc}{} +\newcommand*{\@glsxtr@restore@postpunc}{% + \def\@glsxtr@nopostpunc@postdesc{% + \@glsxtr@org@postdescription + \let\@glsxtr@nopostpunc@postdesc\@empty + \let\glsxtrrestorepostpunc\@empty + }% +} +\newcommand*{\glsxtrrestorepostpunc}{} +\renewcommand{\@printglossary}[2]{% + \def\@glsxtr@printglossopts{#1}% + \@glsxtr@orgprintglossary{#1}{#2}% +} +\define@choicekey{printgloss}{target} +[\@glsxtr@printglossval\@glsxtr@printglossnr]% +{true,false}[true]% +{% + \ifcase\@glsxtr@printglossnr + \def\@glstarget{\glsdohypertarget}% + \else + \let\@glstarget\@secondoftwo + \fi +} +\newcommand{\@glsxtrhypernameprefix}{} +\define@key{printgloss}{targetnameprefix}{% + \renewcommand{\@glsxtrhypernameprefix}{#1}% +} +\define@key{printgloss}{prefix}{% + \renewcommand{\glolinkprefix}{#1}% +} +\define@key{printgloss}{label}{% + \glsxtrsetglossarylabel{#1}% +} +\newcommand{\glsxtrsetglossarylabel}[1]{% + \renewcommand*{\@@glossaryseclabel}{% + \protected@edef\@currentlabelname{\glossarytoctitle}% + \label{#1}% + }% +} +\newcount\@glsxtr@leveloffset +\define@key{printgloss}{leveloffset}{% + \@glsxtr@assign@leveloffset#1\relax +} +\newcommand*{\@glsxtr@assign@leveloffset}{% + \@ifnextchar+{\p@glsxtr@assign@leveloffset}{\np@glsxtr@assign@leveloffset}% +} +\newcommand*{\p@glsxtr@assign@leveloffset}[1]{% + \@ifnextchar+{\pp@glsxtr@assign@leveloffset}{\np@glsxtr@assign@leveloffset}% +} +\def\np@glsxtr@assign@leveloffset#1\relax{\@glsxtr@leveloffset=#1\relax} +\def\pp@glsxtr@assign@leveloffset#1\relax{\advance\@glsxtr@leveloffset by #1\relax} +\define@boolkey{printgloss}[glsxtr@printgloss@]{groups}[true]{} +\glsxtr@printgloss@groupstrue +\let\@glsxtr@org@glsdohypertarget\glsdohypertarget +\renewcommand{\glsdohypertarget}[2]{% + \@glsxtr@org@glsdohypertarget{\@glsxtrhypernameprefix#1}{#2}% +} +\ifx\@glstarget\@glsxtr@org@glsdohypertarget + \def\@glstarget{\glsdohypertarget}% +\fi +\newcommand{\@glsxtr@do@org@target}[2]{% + {% + \let\glsdohypertarget\@glsxtr@org@glsdohypertarget + \@glstarget{#1}{#2}% + }% +} +\newcommand*{\glsxtr@makeglossaries}[1]{} +\def\@glsxtr@gettype#1,type=#2,#3\@end@glsxtr@gettype{% + \def\@glo@type{#2}% +} +\newcommand\@glsxtr@mixed@assign@sortkey[1]{% + \protected@edef\@glo@type{\@glo@type}% + \expandafter\DTLifinlist\expandafter{\@glo@type}{\@glsxtr@reg@glosslist}% + {% + \@glo@no@assign@sortkey{#1}% + }% + {% + \@@glo@assign@sortkey{#1}% + }% +}% +\let\@glsxtr@idx@displaynumberlist\glsdisplaynumberlist +\newcommand*{\@glsxtr@noidx@displaynumberlist}[1]{% + \letcs{\@gls@loclist}{glo@\glsdetoklabel{#1}@loclist}% + \ifdef\@gls@loclist + {% + \def\@gls@noidxloclist@sep{% + \def\@gls@noidxloclist@sep{% + \def\@gls@noidxloclist@sep{% + \glsnumlistsep + }% + \def\@gls@noidxloclist@finalsep{\glsnumlistlastsep}% + }% + }% + \def\@gls@noidxloclist@finalsep{}% + \def\@gls@noidxloclist@prev{}% + \forlistloop{\glsnoidxdisplayloclisthandler}{\@gls@loclist}% + \@gls@noidxloclist@finalsep + \@gls@noidxloclist@prev + }% + {% + \glsxtrundeftag + \glsdoifexists{#1}% + {% + \GlossariesWarning{Missing location list for `#1'. Either + a rerun is required or you haven't referenced the entry.}% + }% + }% +}% + +\newcommand*{\@glsxtr@noidx@numberlistloop}[3]{% + \letcs{\@gls@loclist}{glo@\glsdetoklabel{#1}@loclist}% + \let\@gls@org@glsnoidxdisplayloc\glsnoidxdisplayloc + \let\@gls@org@glsseeformat\glsseeformat + \let\glsnoidxdisplayloc#2\relax + \let\glsseeformat#3\relax + \ifdef\@gls@loclist + {% + \forlistloop{\glsnoidxnumberlistloophandler}{\@gls@loclist}% + }% + {% + \glsxtrundeftag + \glsdoifexists{#1}% + {% + \GlossariesWarning{Missing location list for `##1'. Either + a rerun is required or you haven't referenced the entry.}% + }% + }% + \let\glsnoidxdisplayloc\@gls@org@glsnoidxdisplayloc + \let\glsseeformat\@gls@org@glsseeformat +}% +\newcommand*{\@glsxtr@noidx@entrynumberlist}[1]{% + \letcs{\@gls@loclist}{glo@\glsdetoklabel{#1}@loclist}% + \ifdef\@gls@loclist + {% + \glsnoidxloclist{\@gls@loclist}% + }% + {% + \glsxtrundeftag + \glsdoifexists{#1}% + {% + \GlossariesWarning{Missing location list for `#1'. Either + a rerun is required or you haven't referenced the entry.}% + }% + }% +}% +\newcommand*{\@glsxtr@idx@entrynumberlist}[1]{\glsentrynumberlist{#1}} +\renewcommand*{\@gls@noidx@getgrouptitle}[2]{% + \protected@edef\@glsxtr@titlelabel{#1}% + \ifdefvoid\@glsxtr@titlelabel + {}% + {% + \protected@edef\@glsxtr@titlelabel{\csuse{glsxtr@grouptitle@#1}}% + }% + \ifdefvoid{\@glsxtr@titlelabel}% + {% + \DTLifint{#1}% + {% + \ifnum#1<256\relax + \edef#2{\char#1\relax}% + \else + \edef#2{#1}% + \fi + }% + {% + \ifcsundef{#1groupname}% + {\def#2{#1}}% + {\letcs#2{#1groupname}}% + }% + }% + {% + \let#2\@glsxtr@titlelabel + }% +} +\let\glsxtr@org@getgrouptitle\@gls@getgrouptitle +\newrobustcmd{\glsxtrgetgrouptitle}[2]{% + \protected@edef\@glsxtr@titlelabel{glsxtr@grouptitle@#1}% + \@onelevel@sanitize\@glsxtr@titlelabel + \ifcsdef{\@glsxtr@titlelabel} + {\letcs{#2}{\@glsxtr@titlelabel}}% + {\glsxtr@org@getgrouptitle{#1}{#2}}% +} +\let\@gls@getgrouptitle\glsxtrgetgrouptitle +\newcommand{\glsxtrsetgrouptitle}[2]{% + \protected@edef\@glsxtr@titlelabel{glsxtr@grouptitle@#1}% + \@onelevel@sanitize\@glsxtr@titlelabel + \protected@csxdef{\@glsxtr@titlelabel}{#2}% +} +\newcommand{\glsxtrlocalsetgrouptitle}[2]{% + \protected@edef\@glsxtr@titlelabel{glsxtr@grouptitle@#1}% + \@onelevel@sanitize\@glsxtr@titlelabel + \protected@csedef{\@glsxtr@titlelabel}{#2}% +} +\renewcommand*{\glsnavigation}{% + \def\@gls@between{}% + \ifcsundef{@gls@hypergrouplist@\@glo@type}% + {% + \def\@gls@list{}% + }% + {% + \expandafter\let\expandafter\@gls@list + \csname @gls@hypergrouplist@\@glo@type\endcsname + }% + \@for\@gls@tmp:=\@gls@list\do{% + \@gls@between + \glsxtrgetgrouptitle{\@gls@tmp}{\@gls@grptitle}% + \glsnavhyperlink{\@gls@tmp}{\@gls@grptitle}% + \let\@gls@between\glshypernavsep + }% +} +\renewcommand*{\@print@noidx@glossary}{% + \ifcsdef{@glsref@\@glo@type}% + {% + \ifcsdef{@glo@sortmacro@\@glo@sorttype}% + {% + \csuse{@glo@sortmacro@\@glo@sorttype}{\@glo@type}% + }% + {% + \PackageError{glossaries}{Unknown sort handler `\@glo@sorttype'}{}% + }% + \glossarysection[\glossarytoctitle]{\glossarytitle}% + \glossarypreamble + \def\@gls@currentlettergroup{}% + \begin{theglossary}% + \glossaryheader + \glsresetentrylist + \forlistcsloop{\@gls@noidx@do}{@glsref@\@glo@type}% + \end{theglossary}% + \glossarypostamble + }% + {% + \glsxtrifemptyglossary{\@glo@type}% + {}% + {\glossarysection[\glossarytoctitle]{\glossarytitle}}% + \@gls@noref@warn{\@glo@type}% + }% +} +\renewcommand*{\glsnoidxdisplayloc}[4]{% + \setentrycounter[#1]{#2}% + \@glsxtr@display@loc#3\empty\end@glsxtr@display@loc{#4}% +} +\def\@glsxtr@display@loc#1#2\end@glsxtr@display@loc#3{% + \ifx#1(\relax + \glsxtrdisplaystartloc{#2}{#3}% + \else + \ifx#1)\relax + \glsxtrdisplayendloc{#2}{#3}% + \else + \glsxtrdisplaysingleloc{#1#2}{#3}% + \fi + \fi +} +\newcommand*{\glsxtrdisplaysingleloc}[2]{% + \csuse{#1}{#2}% +} +\newcommand*{\glsxtrdisplaystartloc}[2]{% + \protected@edef\glsxtrlocrangefmt{#1}% + \ifx\glsxtrlocrangefmt\empty + \def\glsxtrlocrangefmt{glsnumberformat}% + \fi + \expandafter\glsxtrdisplaysingleloc + \expandafter{\glsxtrlocrangefmt}{#2}% +} +\newcommand*{\glsxtrdisplayendloc}[2]{% + \protected@edef\@glsxtr@tmp{#1}% + \ifdefempty{\@glsxtr@tmp}{\def\@glsxtr@tmp{glsnumberformat}}{}% + \ifx\glsxtrlocrangefmt\@glsxtr@tmp + \else + \GlossariesExtraWarning{Mismatched end location range + (start=\glsxtrlocrangefmt, end=\@glsxtr@tmp)}% + \fi + \expandafter\glsxtrdisplayendlochook\expandafter{\@glsxtr@tmp}{#2}% + \expandafter\glsxtrdisplaysingleloc + \expandafter{\glsxtrlocrangefmt}{#2}% + \def\glsxtrlocrangefmt{}% +} +\newcommand*{\glsxtrdisplayendlochook}[2]{} +\newcommand*{\glsxtrlocrangefmt}{} +\renewcommand*{\setentrycounter}[2][]{% + \def\glsxtrcounterprefix{#1}% + \ifx\glsxtrcounterprefix\@empty + \def\@glo@counterprefix{.}% + \else + \def\@glo@counterprefix{.#1.}% + \fi + \def\glsentrycounter{#2}% +} +\def\@gls@removespaces#1 #2\@nil{% + \toks@=\expandafter{\the\toks@#1}% + \ifx\\#2\\% + \edef\@glo@tmp{\the\toks@}% + \ifx\@glo@tmp\empty + \else + \expandafter\glsxtrlocationhyperlink\expandafter + \glsentrycounter\expandafter\@glo@counterprefix\expandafter{\the\toks@}% + \fi + \else + \@gls@ReturnAfterFi{% + \@gls@removespaces#2\@nil + }% + \fi +} +\newcommand*{\glsxtrlocationhyperlink}[3]{% + \ifdefvoid\glsxtrsupplocationurl + {% + \GlsXtrInternalLocationHyperlink{#1}{#2}{#3}% + }% + {% + \hyperref{\glsxtrsupplocationurl}{}{#1#2#3}{#3}% + }% +} +\newcommand*{\glsxtrsupphypernumber}[1]{% + {% + \glshasattribute{\glscurrententrylabel}{externallocation}% + {% + \def\glsxtrsupplocationurl{% + \glsgetattribute{\glscurrententrylabel}{externallocation}}% + }% + {% + \def\glsxtrsupplocationurl{}% + }% + \glshypernumber{#1}% + }% +} +\renewcommand{\@print@glossary}{% + \makeatletter + \@input@{\jobname.\csname @glotype@\@glo@type @in\endcsname}% + \IfFileExists{\jobname.\csname @glotype@\@glo@type @in\endcsname}% + {}% + {\glsxtrNoGlossaryWarning{\@glo@type}}% + \ifglsxindy + \ifcsundef{@xdy@\@glo@type @language}% + {% + \edef\@do@auxoutstuff{% + \noexpand\AtEndDocument{% + \noexpand\immediate\noexpand\write\@auxout{% + \string\providecommand\string\@xdylanguage[2]{}}% + \noexpand\immediate\noexpand\write\@auxout{% + \string\@xdylanguage{\@glo@type}{\@xdy@main@language}}% + }% + }% + }% + {% + \edef\@do@auxoutstuff{% + \noexpand\AtEndDocument{% + \noexpand\immediate\noexpand\write\@auxout{% + \string\providecommand\string\@xdylanguage[2]{}}% + \noexpand\immediate\noexpand\write\@auxout{% + \string\@xdylanguage{\@glo@type}{\csname @xdy@\@glo@type + @language\endcsname}}% + }% + }% + }% + \@do@auxoutstuff + \edef\@do@auxoutstuff{% + \noexpand\AtEndDocument{% + \noexpand\immediate\noexpand\write\@auxout{% + \string\providecommand\string\@gls@codepage[2]{}}% + \noexpand\immediate\noexpand\write\@auxout{% + \string\@gls@codepage{\@glo@type}{\gls@codepage}}% + }% + }% + \@do@auxoutstuff + \fi + \renewcommand*{\@warn@nomakeglossaries}{% + \GlossariesWarningNoLine{\string\makeglossaries\space + hasn't been used,^^Jthe glossaries will not be updated}% + }% +} +\newcommand{\GlsXtrNoGlsWarningHead}[2]{% + This document is incomplete. The external file associated with + the glossary `#1' (which should be called \texttt{#2}) + hasn't been created.% +} +\newcommand{\GlsXtrNoGlsWarningEmptyStart}{% + This has probably happened because there are no entries defined + in this glossary.% +} +\newcommand{\GlsXtrNoGlsWarningEmptyMain}{% + If you don't want this glossary, + add \texttt{nomain} to your package option list when you load + \texttt{glossaries-extra.sty}. For example:% +} +\newcommand{\GlsXtrNoGlsWarningEmptyNotMain}[1]{% + Did you forget to use \texttt{type=#1} when you defined your + entries? If you tried to load entries into this glossary with + \texttt{\string\loadglsentries} did you remember to use + \texttt{[#1]} as the optional argument? If you did, check that + the definitions in the file you loaded all had the type set + to \texttt{\string\glsdefaulttype}.% +} +\newcommand{\GlsXtrNoGlsWarningCheckFile}[1]{% + Check the contents of the file \texttt{#1}. If + it's empty, that means you haven't indexed any of your entries in this + glossary (using commands like \texttt{\string\gls} or + \texttt{\string\glsadd}) so this list can't be generated. + If the file isn't empty, the document build process hasn't been + completed.% +} +\newcommand{\GlsXtrNoGlsWarningAutoMake}[1]{% + You may need to rerun \LaTeX. If you already have, it may be that + \TeX's shell escape doesn't allow you to run + \ifglsxindy xindy\else makeindex\fi. Check the + transcript file \texttt{\jobname.log}. If the shell escape is + disabled, try one of the following: + + \begin{itemize} + \item Run the external (Lua) application: + + \texttt{makeglossaries-lite \string"\jobname\string"} + + \item Run the external (Perl) application: + + \texttt{makeglossaries \string"\jobname\string"} + \end{itemize} + + Then rerun \LaTeX\ on this document. + \GlossariesExtraWarning{Rerun required to build the + glossary `#1' or check TeX's shell escape allows + you to run \ifglsxindy xindy\else makeindex\fi}% +} +\newcommand{\GlsXtrNoGlsWarningMisMatch}{% + You need to either replace \texttt{\string\makenoidxglossaries} + with \texttt{\string\makeglossaries} or replace + \texttt{\string\printglossary} (or \texttt{\string\printglossaries}) with + \texttt{\string\printnoidxglossary} + (or \texttt{\string\printnoidxglossaries}) and then rebuild + this document.% +} +\newcommand{\GlsXtrNoGlsWarningBuildInfo}{% + Try one of the following: + \begin{itemize} + \item Add \texttt{automake} to your package option list when you load + \texttt{glossaries-extra.sty}. For example: + + \texttt{\string\usepackage[automake]% + \glsopenbrace glossaries-extra\glsclosebrace} + + \item Run the external (Lua) application: + + \texttt{makeglossaries-lite.lua \string"\jobname\string"} + + \item Run the external (Perl) application: + + \texttt{makeglossaries \string"\jobname\string"} + \end{itemize} + + Then rerun \LaTeX\ on this document.% +} +\newcommand{\GlsXtrRecordWarning}[1]{% + \texttt{\string\printglossary} doesn't work + with the \texttt{record=\@glsxtr@record@setting} package option + use\par\texttt{\string\printunsrtglossary[type=#1]}\par + instead (or change the package option).% +} +\newcommand{\GlsXtrNoGlsWarningTail}{% + This message will be removed once the problem has been fixed.% +} +\newcommand{\GlsXtrNoGlsWarningNoOut}[1]{% + The file \texttt{#1} doesn't exist. This most likely means you haven't used + \texttt{\string\makeglossaries} or you have used + \texttt{\string\nofiles}. If this is just a draft version of the + document, you can suppress this message using the + \texttt{nomissingglstext} package option.% +} +\newcommand*{\@glsxtr@defaultnoglossarywarning}[1]{% + \glossarysection[\glossarytoctitle]{\glossarytitle} + \GlsXtrNoGlsWarningHead{#1}{\jobname.\csname @glotype@\@glo@type @in\endcsname} + \par + \glsxtrifemptyglossary{#1}% + {% + \GlsXtrNoGlsWarningEmptyStart\space + \ifthenelse{\equal{#1}{main}}{\GlsXtrNoGlsWarningEmptyMain\par + \medskip + \noindent\texttt{\string\usepackage[nomain\ifglsacronym ,acronym\fi]% + \glsopenbrace glossaries-extra\glsclosebrace} + \medskip + }% + {\GlsXtrNoGlsWarningEmptyNotMain{#1}}% + }% + {% + \IfFileExists{\jobname.\csname @glotype@\@glo@type @out\endcsname} + {% + \GlsXtrNoGlsWarningCheckFile + {\jobname.\csname @glotype@\@glo@type @out\endcsname} + + \ifglsautomake + + \GlsXtrNoGlsWarningAutoMake{#1} + + \else + + \ifthenelse{\equal{#1}{main}}% + {% + \GlsXtrNoGlsWarningEmptyMain\par + \medskip + \noindent\texttt{\string\usepackage[nomain]% + \glsopenbrace glossaries-extra\glsclosebrace} + \medskip + }% + {}% + + \ifdefequal\makeglossaries\@no@makeglossaries + {% + \GlsXtrNoGlsWarningMisMatch + }% + {% + \GlsXtrNoGlsWarningBuildInfo + }% + \fi + }% + {% + \GlsXtrNoGlsWarningNoOut + {\jobname.\csname @glotype@\@glo@type @out\endcsname}% + }% + }% + \par + \GlsXtrNoGlsWarningTail +} +\newcommand*{\@glsxtr@record@noglossarywarning}[1]{% + \GlossariesExtraWarning{\string\printglossary\space doesn't work\MessageBreak + with record=\@glsxtr@record@setting\space package option\MessageBreak(use + \string\printunsrtglossary[type=#1])\MessageBreak + instead (or change the package option)}% + \glossarysection[\glossarytoctitle]{\glossarytitle} + \GlsXtrRecordWarning{#1} + \GlsXtrNoGlsWarningTail +} +\newcommand*{\GlsXtrDefaultResourceOptions}{} +\newcommand*{\glsxtrresourcefile}[2][]{% + \disable@keys{glossaries-extra.sty}{record}% + \glsxtr@writefields + \ifdefempty\GlsXtrDefaultResourceOptions + {% + \protected@write\@auxout{\glsxtrresourceinit}% + {\string\glsxtr@resource{#1}{#2}}% + }% + {% + \protected@write\@auxout{\glsxtrresourceinit}% + {\string\glsxtr@resource{\GlsXtrDefaultResourceOptions,#1}{#2}}% + }% + \let\@glsxtr@org@see@noindex\@gls@see@noindex + \let\@gls@see@noindex\relax + \IfFileExists{#2.glstex}% + {% + \edef\@bibgls@restoreat{\noexpand\catcode\noexpand`\noexpand\@=\number\catcode`\@}% + \makeatletter + \@input{#2.glstex}% + \@bibgls@restoreat + \@glsxtr@check@bibgls@nameref + }% + {% + \GlossariesExtraWarning{No file `#2.glstex'}% + }% + \let\@gls@see@noindex\@glsxtr@org@see@noindex +} +\@onlypreamble\glsxtrresourcefile +\newcommand{\@glsxtr@check@bibgls@nameref}{% + \ifx\@glsxtr@record@setting\@glsxtr@record@setting@nameref + \ifdef\bibglshrefchar + {}% + {% + \GlossariesExtraWarning{record=nameref requires at least + version 1.8 of bib2gls}% + }% + \fi + \let\@glsxtr@check@bibgls@nameref\relax +} +\newcommand*{\glsxtrresourceinit}{} +\newcount\glsxtrresourcecount +\newcommand*{\GlsXtrLoadResources}[1][]{% + \ifnum\glsxtrresourcecount=0\relax + \glsxtrresourcefile[#1]{\jobname}% + \else + \glsxtrresourcefile[#1]{\jobname-\the\glsxtrresourcecount}% + \fi + \advance\glsxtrresourcecount by 1\relax +} +\newcommand*{\glsxtr@resource}[2]{} +\newcommand*{\glsxtr@fields}[1]{} +\newcommand*{\glsxtr@texencoding}[1]{} +\newcommand*{\glsxtr@langtag}[1]{} +\newcommand*{\glsxtr@pluralsuffixes}[4]{} +\newcommand*{\glsxtr@shortcutsval}[1]{} +\newcommand*{\glsxtr@linkprefix}[1]{} +\newcommand*{\glsxtr@writefields}{% + \protected@write\@auxout{}% + {\string\providecommand*{\string\glsxtr@fields}[1]{}}% + \protected@write\@auxout{}% + {\string\providecommand*{\string\glsxtr@resource}[2]{}}% + \protected@write\@auxout{}% + {\string\providecommand*{\string\glsxtr@pluralsuffixes}[4]{}}% + \protected@write\@auxout{}% + {\string\providecommand*{\string\glsxtr@shortcutsval}[1]{}}% + \protected@write\@auxout{}% + {\string\providecommand*{\string\glsxtr@linkprefix}[1]{}}% + \protected@write\@auxout{}{\string\glsxtr@fields{\@gls@keymap}}% + \protected@write\@auxout{}% + {\string\providecommand*{\string\glsxtr@record}[5]{}}% + \ifx\@glsxtr@record@setting\@glsxtr@record@setting@nameref + \protected@write\@auxout{}% + {\string\providecommand*{\string\glsxtr@record@nameref}[8]{}}% + \fi + \ifdef\CurrentTrackedLanguageTag + {% + \protected@write\@auxout{}{% + \string\glsxtr@langtag{\CurrentTrackedLanguageTag}}% + }% + {}% + \protected@write\@auxout{}{\string\glsxtr@pluralsuffixes + {\glspluralsuffix}{\abbrvpluralsuffix}{\acrpluralsuffix}% + {\glsxtrabbrvpluralsuffix}}% + \ifdef\inputencodingname + {% + \protected@write\@auxout{}{\string\glsxtr@texencoding{\inputencodingname}}% + }% + {% + \@ifpackageloaded{fontspec}% + {\protected@write\@auxout{}{\string\glsxtr@texencoding{utf8}}}% + {}% + }% + \protected@write\@auxout{}{\string\glsxtr@shortcutsval{\@glsxtr@shortcutsval}}% + \AtBeginDocument + {\protected@write\@auxout{}{\string\glsxtr@linkprefix{\glolinkprefix}}}% + \let\glsxtr@writefields\relax + \ifglsautomake + \IfFileExists{\jobname.aux}% + {\immediate\write18{bib2gls \jobname}}{}% + \ifx\@gls@doautomake\@gls@doautomake@err + \let\@gls@doautomake\relax + \fi + \fi + \@glsxtr@if@record@only + {\ifdefstring{\glsorder}{letter}% + {\GlossariesExtraWarningNoLine{Package option `order=letter' isn't + supported with `record=\@glsxtr@record@setting'. Use `break-at=none' + resource option instead}}% + {}% + }% + {}% +} +\newcommand*{\@gls@doautomake@err}{% + \PackageError{glossaries}{You must use + \string\makeglossaries\space with automake=true} + {% + Either remove the automake=true setting or + add \string\makeglossaries\space to your document preamble.% + }% +} +\newcommand*{\glsxtr@record}[5]{} +\newcommand*{\glsxtr@record@nameref}[8]{} +\newcommand*{\glsxtr@counterrecord}[3]{% + \glsxtrfieldlistgadd{#1}{record.#2}{#3}% +} +\newcommand*{\@glsxtr@counterrecordhook}{} +\newcommand*{\GlsXtrRecordCounter}[1]{% + \@@glsxtr@recordcounter{#1}% +} +\@onlypreamble\GlsXtrRecordCounter +\newcommand*{\@glsxtr@docounterrecord}[1]{% + \protected@write\@auxout{}{\string\glsxtr@counterrecord + {\@gls@label}{#1}{\csuse{the#1}}}% +} +\newcommand*{\glsxtrglossentry}[1]{% + \glsxtrtitleorpdforheading + {\@glsxtrglossentry{#1}}% + {\glsentryname{#1}}% + {\glsxtrheadname{#1}}% +} +\newrobustcmd*{\@glsxtrglossentry}[1]{% + \glsxtrtitleorpdforheading + {% + \glsdoifexists{#1}% + {% + \begingroup + \protected@edef\glscurrententrylabel{\glsdetoklabel{#1}}% + \protected@edef\currentglossary{\GlsXtrStandaloneGlossaryType}% + \ifglshasparent{#1}% + {\GlsXtrStandaloneSubEntryItem{#1}}% + {\glsentryitem{#1}}% + \GlsXtrStandaloneEntryName{#1}% + \endgroup + }% + }% + {\glsentryname{#1}}% + {\glsxtrheadname{#1}}% +} +\newcommand*{\GlsXtrStandaloneEntryName}[1]{% + \glstarget{#1}{\glossentryname{#1}}% +} +\newcommand{\GlsXtrStandaloneGlossaryType}{\glsentrytype{\glscurrententrylabel}} +\newcommand*{\GlsXtrStandaloneSubEntryItem}[1]{% + \GlsXtrIfFieldEqNum{level}{#1}{1}{\glssubentryitem{#1}}{}% +} +\newcommand*{\glsxtrglossentryother}[3]{% + \ifstrempty{#1}% + {% + \ifcsdef{glsxtrhead#3}% + {% + \glsxtrtitleorpdforheading + {\@glsxtrglossentryother{#2}{#3}{#1}}% + {\@gls@entry@field{#2}{#3}}% + {\csuse{glsxtrhead#3}{#2}}% + }% + {% + \glsxtrtitleorpdforheading + {\@glsxtrglossentryother{#2}{#3}{#1}}% + {\@gls@entry@field{#2}{#3}}% + {\@gls@entry@field{\NoCaseChange{#2}}{#3}}% + }% + }% + {% + \glsxtrtitleorpdforheading + {\@glsxtrglossentryother{#2}{#3}{#1}}% + {\@gls@entry@field{#2}{#3}}% + {#1}% + }% +} +\newrobustcmd*{\@glsxtrglossentryother}[3]{% + \glsxtrtitleorpdforheading + {% + \glsdoifexists{#1}% + {% + \begingroup + \protected@edef\glscurrententrylabel{\glsdetoklabel{#1}}% + \protected@edef\currentglossary{\GlsXtrStandaloneGlossaryType}% + \ifglshasparent{#1}% + {\GlsXtrStandaloneSubEntryItem{#1}}% + {\glsentryitem{#1}}% + \GlsXtrStandaloneEntryOther{#1}% + \endgroup + }% + }% + {\@gls@entry@field{#1}{#2}}% + {#3}% +} +\newcommand*{\GlsXtrStandaloneEntryOther}[2]{% + \glstarget{#1}{\glossentrynameother{#1}{#2}}% +} +\ifdef\@printgloss@checkexists +{ + \newcommand*{\printunsrtglossary}{% + \let\@printgloss@checkexists\@printgloss@checkexists@allowignored + \@ifstar\s@printunsrtglossary\@printunsrtglossary + } +} +{ + \newcommand*{\printunsrtglossary}{% + \@ifstar\s@printunsrtglossary\@printunsrtglossary + } +} +\newcommand*{\@printunsrtglossary}[1][]{% + \@printglossary{type=\glsdefaulttype,#1}{\@print@unsrt@glossary}% +} +\newcommand*{\s@printunsrtglossary}[2][]{% + \begingroup + #2% + \@printglossary{type=\glsdefaulttype,#1}{\@print@unsrt@glossary}% + \endgroup +} +\newcommand*{\printunsrtglossaries}{% + \forallglossaries{\@@glo@type}{\printunsrtglossary[type=\@@glo@type]}% +} + +\newcommand*{\@print@unsrt@glossary}{% + \glossarysection[\glossarytoctitle]{\glossarytitle}% + \glossarypreamble + \glsxtrifemptyglossary{\@glo@type}% + {% + \GlossariesExtraWarning{No entries defined in glossary `\@glo@type'}% + }% + {% + \key@ifundefined{glossentry}{group}% + {\let\@gls@getgrouptitle\@gls@noidx@getgrouptitle}% + {\let\@gls@getgrouptitle\@glsxtr@unsrt@getgrouptitle}% + \def\@gls@currentlettergroup{}% + \def\@glsxtr@doglossary{% + \begin{theglossary}% + \glossaryheader + \glsresetentrylist + }% + \expandafter\@for\expandafter\glscurrententrylabel\expandafter + :\expandafter=\csname glolist@\@glo@type\endcsname\do{% + \ifdefempty{\glscurrententrylabel} + {}% + {% + \let\glsxtr@process\@firstofone + \let\printunsrtglossaryskipentry + \@glsxtr@printunsrtglossaryskipentry + \printunsrtglossaryentryprocesshook{\glscurrententrylabel}% + \glsxtr@process + {% + \ifglsxtr@printgloss@groups + \ifglshasparent{\glscurrententrylabel}{}% + {% + \@glsxtr@checkgroup\glscurrententrylabel + \expandafter\appto\expandafter\@glsxtr@doglossary\expandafter + {\@glsxtr@groupheading}% + }% + \fi + \protected@eappto\@glsxtr@doglossary{% + \noexpand\@printunsrt@glossary@handler{\glscurrententrylabel}}% + }% + }% + }% + \appto\@glsxtr@doglossary{\end{theglossary}}% + \printunsrtglossarypredoglossary + \@glsxtr@doglossary + }% + \glossarypostamble +} +\newcommand*{\printunsrtinnerglossary}[3][]{% + \begingroup + \def\@glsxtr@printglossopts{#1}% + \def\@glo@type{\glsdefaulttype}% + \setkeys{printgloss}[title,toctitle,style,numberedsection,sort,label]{#1}% + \let\currentglossary\@glo@type + #2% + \@print@unsrt@innerglossary + #3% + \endgroup +} +\newenvironment{printunsrtglossarywrap}[1][]% +{% + \def\@glsxtr@printglossopts{#1}% + \def\@glo@type{\glsdefaulttype}% + \def\glossarytitle{\csname @glotype@\@glo@type @title\endcsname}% + \def\glossarytoctitle{\glossarytitle}% + \let\org@glossarytitle\glossarytitle + \def\@glossarystyle{% + \ifx\@glossary@default@style\relax + \GlossariesWarning{No default glossary style provided \MessageBreak + for the glossary `\@glo@type'. \MessageBreak + Using deprecated fallback. \MessageBreak + To fix this set the style with \MessageBreak + \string\setglossarystyle\space or use the \MessageBreak + style key=value option}% + \fi + }% + \def\gls@dotoctitle{\glssettoctitle{\@glo@type}}% + \let\@org@glossaryentrynumbers\glossaryentrynumbers + \@printgloss@setsort + \setkeys{printgloss}{#1}% + \ifglossaryexists*{\@glo@type}% + {% + \ifx\glossarytitle\org@glossarytitle + \else + \expandafter\let\csname @glotype@\@glo@type @title\endcsname + \glossarytitle + \fi + \let\currentglossary\@glo@type + }% + {}% + \let\org@glossaryentrynumbers\glossaryentrynumbers + \let\glsnonextpages\@glsnonextpages + \let\glsnextpages\@glsnextpages + \let\nopostdesc\@nopostdesc + \gls@dotoctitle + \@glossarystyle + \let\gls@org@glossaryentryfield\glossentry + \let\gls@org@glossarysubentryfield\subglossentry + \renewcommand{\glossentry}[1]{% + \protected@xdef\glscurrententrylabel{\glsdetoklabel{##1}}% + \gls@org@glossaryentryfield{##1}% + }% + \renewcommand{\subglossentry}[2]{% + \protected@xdef\glscurrententrylabel{\glsdetoklabel{##2}}% + \gls@org@glossarysubentryfield{##1}{##2}% + }% + \@gls@preglossaryhook + \glossarysection[\glossarytoctitle]{\glossarytitle}% + \glossarypreamble + \begin{theglossary}% + \glossaryheader + \glsresetentrylist +}% +{% + \end{theglossary}% + \glossarypostamble + \global\let\glossaryentrynumbers\@org@glossaryentrynumbers + \global\let\warn@noprintglossary\relax +} +\newcommand*{\@print@unsrt@innerglossary}{% + \glsxtrifemptyglossary{\@glo@type}% + {% + \GlossariesExtraWarning{No entries defined in glossary `\@glo@type'}% + }% + {% + \key@ifundefined{glossentry}{group}% + {\let\@gls@getgrouptitle\@gls@noidx@getgrouptitle}% + {\let\@gls@getgrouptitle\@glsxtr@unsrt@getgrouptitle}% + \def\@gls@currentlettergroup{}% + \def\@glsxtr@doglossary{}% + \expandafter\@for\expandafter\glscurrententrylabel\expandafter + :\expandafter=\csname glolist@\@glo@type\endcsname\do{% + \ifdefempty{\glscurrententrylabel} + {}% + {% + \let\glsxtr@process\@firstofone + \let\printunsrtglossaryskipentry + \@glsxtr@printunsrtglossaryskipentry + \printunsrtglossaryentryprocesshook{\glscurrententrylabel}% + \glsxtr@process + {% + \ifglsxtr@printgloss@groups + \ifglshasparent{\glscurrententrylabel}{}% + {% + \@glsxtr@checkgroup\glscurrententrylabel + \expandafter\appto\expandafter\@glsxtr@doglossary\expandafter + {\@glsxtr@groupheading}% + }% + \fi + \protected@eappto\@glsxtr@doglossary{% + \noexpand\@printunsrt@glossary@handler{\glscurrententrylabel}}% + }% + }% + }% + \printunsrtglossarypredoglossary + \@glsxtr@doglossary + }% +} +\newcommand*{\printunsrtglossaryentryprocesshook}[1]{} +\newcommand*{\printunsrtglossaryskipentry}{% + \PackageError{glossaries-extra}{\string\printunsrtglossaryskipentry\space +can only be used within \string\printunsrtglossaryentryprocesshook}{}% +} +\newcommand*{\@glsxtr@printunsrtglossaryskipentry}{% + \let\glsxtr@process\@gobble +} +\newcommand*{\printunsrtglossarypredoglossary}{} +\newcommand{\@printunsrt@glossary@handler}[1]{% + \protected@xdef\glscurrententrylabel{#1}% + \printunsrtglossaryhandler\glscurrententrylabel +} +\newcommand{\printunsrtglossaryhandler}[1]{% + \glsxtrunsrtdo{#1}% +} +\newrobustcmd*{\glsxtriflabelinlist}[4]{% + \protected@edef\@glsxtr@doiflabelinlist{\noexpand\@gls@ifinlist{#1}{#2}}% + \@glsxtr@doiflabelinlist{#3}{#4}% +} +\newcommand{\print@op@unsrtglossaryunit}[2][]{% + \s@printunsrtglossary[type=\glsdefaulttype,#1]{% + \printunsrtglossaryunitsetup{#2}% + }% +} +\newcommand*{\printunsrtglossaryunitsetup}[1]{% + \renewcommand{\printunsrtglossaryhandler}[1]{% + \glsxtrfieldxifinlist{##1}{record.#1}{\csuse{the#1}} + {\glsxtrunsrtdo{##1}}% + {}% + }% + \ifcsundef{theH#1}% + {% + \renewcommand*{\@glsxtrhypernameprefix}{record.#1.\csuse{the#1}.\@gobble}% + }% + {% + \renewcommand*{\@glsxtrhypernameprefix}{record.#1.\csuse{theH#1}.\@gobble}% + }% + \renewcommand*{\glossarysection}[2][]{}% + \appto\glossarypostamble{\glspar\medskip\glspar}% +} +\newcommand{\print@noop@unsrtglossaryunit}[2][]{% + \PackageError{glossaries-extra}{\string\printunsrtglossaryunit\space + requires the record=only or record=alsoindex package option}{}% +} +\newrobustcmd*{\@glsxtr@unsrt@getgrouptitle}[2]{% + \protected@edef\@glsxtr@titlelabel{glsxtr@grouptitle@#1}% + \@onelevel@sanitize\@glsxtr@titlelabel + \ifcsdef{\@glsxtr@titlelabel} + {\letcs{#2}{\@glsxtr@titlelabel}}% + {\def#2{#1}}% +} +\newcommand{\glsxtrunsrtdo}{\@glsxtr@noidx@do} +\newcommand*{\glsxtrgroupfield}{group} +\newcommand*{\@glsxtr@checkgroup}[1]{% + \def\@glsxtr@groupheading{}% + \key@ifundefined{glossentry}{group}% + {% + \letcs{\@gls@sort}{glo@\glsdetoklabel{#1}@sort}% + \expandafter\glo@grabfirst\@gls@sort{}{}\@nil + }% + {% + \protected@edef\@glo@thislettergrp{% + \csuse{glo@\glsdetoklabel{#1}@\glsxtrgroupfield}}% + }% + \ifdefequal{\@glo@thislettergrp}{\@gls@currentlettergroup}% + {}% + {% + \ifdefempty{\@gls@currentlettergroup}{}% + {\def\@glsxtr@groupheading{\glsgroupskip}}% + \protected@eappto\@glsxtr@groupheading{% + \noexpand\glsgroupheading{\expandonce\@glo@thislettergrp}% + }% + }% + \let\@gls@currentlettergroup\@glo@thislettergrp +} +\newcommand*{\GlsXtrLocationField}{location} +\newcommand{\@glsxtr@noidx@do}[1]{% + \ifglsentryexists{#1}% + {% + \global\letcs{\@gls@loclist}{glo@\glsdetoklabel{#1}@loclist}% + \global\letcs{\@gls@location}{glo@\glsdetoklabel{#1}@\GlsXtrLocationField}% + \gls@level=\numexpr\csuse{glo@\glsdetoklabel{#1}@level}+\@glsxtr@leveloffset\relax + \ifnum\gls@level>0 + \let\@glsxtr@ifischild\@firstoftwo + \else + \let\@glsxtr@ifischild\@secondoftwo + \fi + \@glsxtr@ifischild + {% + \ifdefvoid{\@gls@location}% + {% + \ifdefvoid{\@gls@loclist}% + {% + \expandafter\subglossentry\expandafter{\number\gls@level}{#1}{}% + }% + {% + \expandafter\subglossentry\expandafter{\number\gls@level}{#1}% + {% + \glossaryentrynumbers{\glsnoidxloclist{\@gls@loclist}}% + }% + }% + }% + {% + \expandafter\subglossentry\expandafter + {\number\gls@level}{#1}{\glossaryentrynumbers{\@gls@location}}% + }% + }% + {% + \ifdefvoid{\@gls@location}% + {% + \ifdefvoid{\@gls@loclist} + {% + \glossentry{#1}{}% + }% + {% + \glossentry{#1}% + {% + \glossaryentrynumbers{\glsnoidxloclist{\@gls@loclist}}% + }% + }% + }% + {% + \glossentry{#1}% + {% + \glossaryentrynumbers{\@gls@location}% + }% + }% + }% + }% + {}% +} +\newcount\@glsxtrnewgls@inner +\newcommand*{\@glsxtr@providenewgls}{% + \protected@write\@auxout{}{\string\providecommand{\string\@glsxtr@newglslike}[2]{}}% + \let\@glsxtr@providenewgls\relax +} +\newcommand{\glsxtridentifyglslike}[2]{% + \ifdefequal\@glsxtr@record@setting\@glsxtr@record@setting@off + {}% + {% + \@glsxtr@providenewgls + \protected@write\@auxout{}{\string\@glsxtr@newglslike{#1}{\string#2}}% + }% +} +\newcommand*{\@glsxtrnewgls}[4]{% + \ifdef{#3}% + {% + \PackageError{glossaries-extra}{Command \string#3\space already +defined}{}% + }% + {% + \glsxtridentifyglslike{#2}{#3}% + \ifcsdef{@#4like@#2}% + {% + \advance\@glsxtrnewgls@inner by \@ne + \def\@glsxtrnewgls@innercsname{@#4like\number\@glsxtrnewgls@inner @#2}% + }% + {\def\@glsxtrnewgls@innercsname{@#4like@#2}}% + \expandafter\newrobustcmd\expandafter*\expandafter + #3\expandafter{\expandafter\@gls@hyp@opt\csname\@glsxtrnewgls@innercsname\endcsname}% + \ifstrempty{#1}% + {% + \expandafter\newcommand\expandafter*\csname\@glsxtrnewgls@innercsname\endcsname[2][]{% + \new@ifnextchar[% + {\csname @#4@\endcsname{##1}{#2##2}}% + {\csname @#4@\endcsname{##1}{#2##2}[]}% + }% + }% + {% + \expandafter\newcommand\expandafter*\csname\@glsxtrnewgls@innercsname\endcsname[2][]{% + \new@ifnextchar[% + {\csname @#4@\endcsname{#1,##1}{#2##2}}% + {\csname @#4@\endcsname{#1,##1}{#2##2}[]}% + }% + }% + }% +} +\newrobustcmd*{\glsxtrnewgls}[3][]{% + \@glsxtrnewgls{#1}{#2}{#3}{gls}% +} +\newrobustcmd*{\glsxtrnewglslike}[6][]{% + \@glsxtrnewgls{#1}{#2}{#3}{gls}% + \@glsxtrnewgls{#1}{#2}{#4}{glspl}% + \@glsxtrnewgls{#1}{#2}{#5}{Gls}% + \@glsxtrnewgls{#1}{#2}{#6}{Glspl}% +} +\newrobustcmd*{\glsxtrnewGLSlike}[4][]{% + \@glsxtrnewgls{#1}{#2}{#3}{GLS}% + \@glsxtrnewgls{#1}{#2}{#4}{GLSpl}% +} +\newrobustcmd*{\glsxtrnewrgls}[3][]{% + \@glsxtrnewgls{#1}{#2}{#3}{rgls}% +} +\newrobustcmd*{\glsxtrnewrglslike}[6][]{% + \@glsxtrnewgls{#1}{#2}{#3}{rgls}% + \@glsxtrnewgls{#1}{#2}{#4}{rglspl}% + \@glsxtrnewgls{#1}{#2}{#5}{rGls}% + \@glsxtrnewgls{#1}{#2}{#6}{rGlspl}% +} +\newrobustcmd*{\glsxtrnewrGLSlike}[4][]{% + \@glsxtrnewgls{#1}{#2}{#3}{rGLS}% + \@glsxtrnewgls{#1}{#2}{#4}{rGLSpl}% +} +\newcommand*{\GlsXtrTotalRecordCount}[1]{% + \ifcsdef{glo@\glsdetoklabel{#1}@recordcount}% + {\csname glo@\glsdetoklabel{#1}@recordcount\endcsname}% + {0}% +} +\newcommand*{\GlsXtrRecordCount}[2]{% + \ifcsdef{glo@\glsdetoklabel{#1}@recordcount.#2}% + {\csname glo@\glsdetoklabel{#1}@recordcount.#2\endcsname}% + {0}% +} +\newcommand*{\GlsXtrLocationRecordCount}[3]{% + \ifcsdef{glo@\glsdetoklabel{#1}@recordcount.#2.\glsxtrdetoklocation{#3}}% + {\csname glo@\glsdetoklabel{#1}@recordcount.#2.\glsxtrdetoklocation{#3}\endcsname}% + {0}% +} +\newcommand*{\glsxtrdetoklocation}[1]{#1} +\newcommand*{\glsxtrenablerecordcount}{% + \renewcommand*{\gls}{\rgls}% + \renewcommand*{\Gls}{\rGls}% + \renewcommand*{\glspl}{\rglspl}% + \renewcommand*{\Glspl}{\rGlspl}% + \renewcommand*{\GLS}{\rGLS}% + \renewcommand*{\GLSpl}{\rGLSpl}% +} +\newcommand*{\glsxtrrecordtriggervalue}[1]{% + \GlsXtrTotalRecordCount{#1}% +} +\newcommand*{\GlsXtrSetRecordCountAttribute}[2]{% + \@for\@glsxtr@cat:=#1\do + {% + \ifdefempty{\@glsxtr@cat}{}% + {% + \glssetcategoryattribute{\@glsxtr@cat}{recordcount}{#2}% + }% + }% +} +\newcommand*{\glsxtrifrecordtrigger}[3]{% + \glshasattribute{#1}{recordcount}% + {% + \ifnum\glsxtrrecordtriggervalue{#1}>\glsgetattribute{#1}{recordcount}\relax + #3% + \else + #2% + \fi + }% + {#3}% +} +\newcommand*{\@glsxtr@rglstrigger@record}[3]{% + \protected@edef\glslabel{\glsdetoklabel{#2}}% + \let\@gls@link@label\glslabel + \def\@glsxtr@thevalue{}% + \def\@glsxtr@theHvalue{\@glsxtr@thevalue}% + \def\@glsnumberformat{glstriggerrecordformat}% + \protected@edef\@gls@counter{\csname glo@\glslabel @counter\endcsname}% + \protected@edef\glstype{\csname glo@\glslabel @type\endcsname}% + \def\@glsxtr@thevalue{}% + \def\@glsxtr@theHvalue{\@glsxtr@thevalue}% + \@gls@save@glslocal + \glsxtrinitwrgloss + \glslinkpresetkeys + \setkeys{glslink}{#1}% + \glslinkpostsetkeys + \ifdefempty{\@glsxtr@thevalue}% + {% + \@gls@saveentrycounter + }% + {% + \let\theglsentrycounter\@glsxtr@thevalue + \def\theHglsentrycounter{\@glsxtr@theHvalue}% + }% + \glslinkwrcontent + {% + \ifglsxtrinitwrglossbefore + \@do@wrglossary{#2}% + \fi + #3% + \ifglsxtrinitwrglossbefore + \else + \@do@wrglossary{#2}% + \fi + }% + \@gls@restore@glslocal + \@gls@do@glsunset{#2}% +} +\newcommand*{\glstriggerrecordformat}[1]{} +\newrobustcmd*{\rgls}{\@gls@hyp@opt\@rgls} +\newcommand*{\@rgls}[2][]{% + \new@ifnextchar[{\@rgls@{#1}{#2}}{\@rgls@{#1}{#2}[]}% +} +\def\@rgls@#1#2[#3]{% + \glsxtrifrecordtrigger{#2}% + {% + \@glsxtr@rglstrigger@record{#1}{#2}{\rglsformat{#2}{#3}}% + }% + {% + \@gls@{#1}{#2}[#3]% + }% +}% +\newrobustcmd*{\rglspl}{\@gls@hyp@opt\@rglspl} +\newcommand*{\@rglspl}[2][]{% + \new@ifnextchar[{\@rglspl@{#1}{#2}}{\@rglspl@{#1}{#2}[]}% +} +\def\@rglspl@#1#2[#3]{% + \glsxtrifrecordtrigger{#2}% + {% + \@glsxtr@rglstrigger@record{#1}{#2}{\rglsplformat{#2}{#3}}% + }% + {% + \@glspl@{#1}{#2}[#3]% + }% +}% +\newrobustcmd*{\rGls}{\@gls@hyp@opt\@rGls} +\newcommand*{\@rGls}[2][]{% + \new@ifnextchar[{\@rGls@{#1}{#2}}{\@rGls@{#1}{#2}[]}% +} +\def\@rGls@#1#2[#3]{% + \glsxtrifrecordtrigger{#2}% + {% + \@glsxtr@rglstrigger@record{#1}{#2}{\rGlsformat{#2}{#3}}% + }% + {% + \@Gls@{#1}{#2}[#3]% + }% +}% +\newrobustcmd*{\rGlspl}{\@gls@hyp@opt\@rGlspl} +\newcommand*{\@rGlspl}[2][]{% + \new@ifnextchar[{\@rGlspl@{#1}{#2}}{\@rGlspl@{#1}{#2}[]}% +} +\def\@rGlspl@#1#2[#3]{% + \glsxtrifrecordtrigger{#2}% + {% + \@glsxtr@rglstrigger@record{#1}{#2}{\rGlsplformat{#2}{#3}}% + }% + {% + \@Glspl@{#1}{#2}[#3]% + }% +}% +\newrobustcmd*{\rGLS}{\@gls@hyp@opt\@rGLS} +\newcommand*{\@rGLS}[2][]{% + \new@ifnextchar[{\@rGLS@{#1}{#2}}{\@rGLS@{#1}{#2}[]}% +} +\def\@rGLS@#1#2[#3]{% + \glsxtrifrecordtrigger{#2}% + {% + \@glsxtr@rglstrigger@record{#1}{#2}{\rGLSformat{#2}{#3}}% + }% + {% + \@GLS@{#1}{#2}[#3]% + }% +}% +\newrobustcmd*{\rGLSpl}{\@gls@hyp@opt\@rGLSpl} +\newcommand*{\@rGLSpl}[2][]{% + \new@ifnextchar[{\@rGLSpl@{#1}{#2}}{\@rGLSpl@{#1}{#2}[]}% +} +\def\@rGLSpl@#1#2[#3]{% + \glsxtrifrecordtrigger{#2}% + {% + \@glsxtr@rglstrigger@record{#1}{#2}{\rGLSplformat{#2}{#3}}% + }% + {% + \@GLSpl@{#1}{#2}[#3]% + }% +}% +\newcommand*{\rglsformat}[2]{% + \glsifregular{#1} + {\glsentryfirst{#1}}% + {\ifglshaslong{#1}{\glsentrylong{#1}}{\glsentryfirst{#1}}}#2% +} +\newcommand*{\rglsplformat}[2]{% + \glsifregular{#1} + {\glsentryfirstplural{#1}}% + {\ifglshaslong{#1}{\glsentrylongplural{#1}}{\glsentryfirstplural{#1}}}#2% +} +\newcommand*{\rGlsformat}[2]{% + \glsifregular{#1} + {\Glsentryfirst{#1}}% + {\ifglshaslong{#1}{\Glsentrylong{#1}}{\Glsentryfirst{#1}}}#2% +} +\newcommand*{\rGlsplformat}[2]{% + \glsifregular{#1} + {\Glsentryfirstplural{#1}}% + {\ifglshaslong{#1}{\Glsentrylongplural{#1}}{\Glsentryfirstplural{#1}}}#2% +} +\newcommand*{\rGLSformat}[2]{% + \expandafter\mfirstucMakeUppercase\expandafter{\rglsformat{#1}{#2}}% +} +\newcommand*{\rGLSplformat}[2]{% + \expandafter\mfirstucMakeUppercase\expandafter{\rglsplformat{#1}{#2}}% +} +\newcommand{\@glsxtr@do@inc@linkcount}{% + \glsifattribute{\glslabel}{linkcount}{true}% + {% + \ifcsdef{c@glsxtr@linkcount@\glslabel}{}% + {% + \newcounter{glsxtr@linkcount@\glslabel}% + \glshasattribute{\glslabel}{linkcountmaster}% + {% + \begingroup + \edef\@glo@tmp{\endgroup\noexpand\@addtoreset{glsxtr@linkcount@\glslabel}% + {\glsgetattribute{\glslabel}{linkcountmaster}}}% + \@glo@tmp + }% + {}% + }% + \glsxtrinclinkcounter{glsxtr@linkcount@\glslabel}% + }% + {}% +} +\newcommand*{\glsxtrinclinkcounter}[1]{\stepcounter{#1}} +\newcommand*{\GlsXtrLinkCounterValue}[1]{% + \ifcsundef{c@glsxtr@linkcount@#1}{0}{\csname c@glsxtr@linkcount@#1\endcsname}% +} +\newcommand*{\GlsXtrTheLinkCounter}[1]{% + \ifcsundef{theglsxtr@linkcount@#1}{0}% + {\csname theglsxtr@linkcount@#1\endcsname}% +} +\newcommand*{\GlsXtrIfLinkCounterDef}[3]{% + \ifcsundef{theglsxtr@linkcount@#1}{#3}{#2}% +} +\newcommand*{\GlsXtrLinkCounterName}[1]{glsxtr@linkcount@#1} +\newcommand*{\GlsXtrEnableLinkCounting}[2][]{% + \let\glsxtr@inc@linkcount\@glsxtr@do@inc@linkcount + \@for\@glsxtr@label:=#2\do + {% + \glssetcategoryattribute{\@glsxtr@label}{linkcount}{true}% + \ifstrempty{#1}{}% + {% + \ifcsundef{c@#1}% + {\@nocounterr{#1}}% + {\glssetcategoryattribute{\@glsxtr@label}{linkcountmaster}{#1}}% + }% + }% +} +\@onlypreamble\GlsXtrEnableLinkCounting +\@ifpackageloaded{glossaries-accsupp} +{ + \newcommand*{\glsaccessname}[1]{% + \glsnameaccessdisplay + {% + \glsentryname{#1}% + }% + {#1}% + } + \newcommand*{\Glsaccessname}[1]{% + \glsnameaccessdisplay + {% + \Glsentryname{#1}% + }% + {#1}% + } + \newcommand*{\GLSaccessname}[1]{% + \glsnameaccessdisplay + {% + \mfirstucMakeUppercase{\glsentryname{#1}}% + }% + {#1}% + } + \newcommand*{\glsaccesstext}[1]{% + \glstextaccessdisplay + {% + \glsentrytext{#1}% + }% + {#1}% + } + \newcommand*{\Glsaccesstext}[1]{% + \glstextaccessdisplay + {% + \Glsentrytext{#1}% + }% + {#1}% + } + \newcommand*{\GLSaccesstext}[1]{% + \glstextaccessdisplay + {% + \mfirstucMakeUppercase{\glsentrytext{#1}}% + }% + {#1}% + } + \newcommand*{\glsaccessplural}[1]{% + \glspluralaccessdisplay + {% + \glsentryplural{#1}% + }% + {#1}% + } + \newcommand*{\Glsaccessplural}[1]{% + \glspluralaccessdisplay + {% + \Glsentryplural{#1}% + }% + {#1}% + } + \newcommand*{\GLSaccessplural}[1]{% + \glspluralaccessdisplay + {% + \mfirstucMakeUppercase{\glsentryplural{#1}}% + }% + {#1}% + } + \newcommand*{\glsaccessfirst}[1]{% + \glsfirstaccessdisplay + {% + \glsentryfirst{#1}% + }% + {#1}% + } + \newcommand*{\Glsaccessfirst}[1]{% + \glsfirstaccessdisplay + {% + \Glsentryfirst{#1}% + }% + {#1}% + } + \newcommand*{\GLSaccessfirst}[1]{% + \glsfirstaccessdisplay + {% + \mfirstucMakeUppercase{\glsentryfirst{#1}}% + }% + {#1}% + } + \newcommand*{\glsaccessfirstplural}[1]{% + \glsfirstpluralaccessdisplay + {% + \glsentryfirstplural{#1}% + }% + {#1}% + } + \newcommand*{\Glsaccessfirstplural}[1]{% + \glsfirstpluralaccessdisplay + {% + \Glsentryfirstplural{#1}% + }% + {#1}% + } + \newcommand*{\GLSaccessfirstplural}[1]{% + \glsfirstpluralaccessdisplay + {% + \mfirstucMakeUppercase{\glsentryfirstplural{#1}}% + }% + {#1}% + } + \newcommand*{\glsaccesssymbol}[1]{% + \glssymbolaccessdisplay + {% + \glsentrysymbol{#1}% + }% + {#1}% + } + \newcommand*{\Glsaccesssymbol}[1]{% + \glssymbolaccessdisplay + {% + \Glsentrysymbol{#1}% + }% + {#1}% + } + \newcommand*{\GLSaccesssymbol}[1]{% + \glssymbolaccessdisplay + {% + \mfirstucMakeUppercase{\glsentrysymbol{#1}}% + }% + {#1}% + } + \newcommand*{\glsaccesssymbolplural}[1]{% + \glssymbolpluralaccessdisplay + {% + \glsentrysymbolplural{#1}% + }% + {#1}% + } + \newcommand*{\Glsaccesssymbolplural}[1]{% + \glssymbolpluralaccessdisplay + {% + \Glsentrysymbolplural{#1}% + }% + {#1}% + } + \newcommand*{\GLSaccesssymbolplural}[1]{% + \glssymbolpluralaccessdisplay + {% + \mfirstucMakeUppercase{\glsentrysymbolplural{#1}}% + }% + {#1}% + } + \newcommand*{\glsaccessdesc}[1]{% + \glsdescriptionaccessdisplay + {% + \glsentrydesc{#1}% + }% + {#1}% + } + \newcommand*{\Glsaccessdesc}[1]{% + \glsdescriptionaccessdisplay + {% + \Glsentrydesc{#1}% + }% + {#1}% + } + \newcommand*{\GLSaccessdesc}[1]{% + \glsdescriptionaccessdisplay + {% + \mfirstucMakeUppercase{\glsentrydesc{#1}}% + }% + {#1}% + } + \newcommand*{\glsaccessdescplural}[1]{% + \glsdescriptionpluralaccessdisplay + {% + \glsentrydescplural{#1}% + }% + {#1}% + } + \newcommand*{\Glsaccessdescplural}[1]{% + \glsdescriptionpluralaccessdisplay + {% + \Glsentrydescplural{#1}% + }% + {#1}% + } + \newcommand*{\GLSaccessdescplural}[1]{% + \glsdescriptionpluralaccessdisplay + {% + \mfirstucMakeUppercase{\glsentrydescplural{#1}}% + }% + {#1}% + } + \newcommand*{\glsaccessshort}[1]{% + \glsshortaccessdisplay + {% + \glsentryshort{#1}% + }% + {#1}% + } + \newcommand*{\Glsaccessshort}[1]{% + \glsshortaccessdisplay + {% + \Glsentryshort{#1}% + }% + {#1}% + } + \newcommand*{\GLSaccessshort}[1]{% + \glsshortaccessdisplay + {% + \mfirstucMakeUppercase{\glsentryshort{#1}}% + }% + {#1}% + } + \newcommand*{\glsaccessshortpl}[1]{% + \glsshortpluralaccessdisplay + {% + \glsentryshortpl{#1}% + }% + {#1}% + } + \newcommand*{\Glsaccessshortpl}[1]{% + \glsshortpluralaccessdisplay + {% + \Glsentryshortpl{#1}% + }% + {#1}% + } + \newcommand*{\GLSaccessshortpl}[1]{% + \glsshortpluralaccessdisplay + {% + \mfirstucMakeUppercase{\glsentryshortpl{#1}}% + }% + {#1}% + } + \newcommand*{\glsaccesslong}[1]{% + \glslongaccessdisplay{\glsentrylong{#1}}{#1}% + } + + \newcommand*{\Glsaccesslong}[1]{% + \glslongaccessdisplay{\Glsentrylong{#1}}{#1}% + } + \newcommand*{\GLSaccesslong}[1]{% + \glslongaccessdisplay + {% + \mfirstucMakeUppercase{\glsentrylong{#1}}% + }% + {#1}% + } + \newcommand*{\glsaccesslongpl}[1]{% + \glslongpluralaccessdisplay{\glsentrylongpl{#1}}{#1}% + } + + \newcommand*{\Glsaccesslongpl}[1]{% + \glslongpluralaccessdisplay{\Glsentrylongpl{#1}}{#1}% + } + \newcommand*{\GLSaccesslongpl}[1]{% + \glslongpluralaccessdisplay + {% + \mfirstucMakeUppercase{\glsentrylongpl{#1}}% + }% + {#1}% + } + \define@key{glsxtrabbrv}{access}{% + \def\@gls@nameaccess{#1}% + } + \define@key{glsxtrabbrv}{textaccess}{% + \def\@gls@textaccess{#1}% + } + \define@key{glsxtrabbrv}{pluralaccess}{% + \def\@gls@pluralaccess{#1}% + } + \define@key{glsxtrabbrv}{firstaccess}{% + \def\@gls@firstaccess{#1}% + } + \define@key{glsxtrabbrv}{firstpluralaccess}{% + \def\@gls@firstpluralaccess{#1}% + } + \define@key{glsxtrabbrv}{shortaccess}{% + \def\@gls@shortaccess{#1}% + } + \define@key{glsxtrabbrv}{shortpluralaccess}{% + \def\@gls@shortaccesspl{#1}% + } + \define@key{glsxtrabbrv}{longaccess}{% + \def\@gls@longaccess{#1}% + } + \define@key{glsxtrabbrv}{shortlonglaccess}{% + \def\@gls@longaccesspl{#1}% + } + \newcommand*{\@gls@initaccesskeys}{% + \def\@gls@nameaccess{}% + \def\@gls@textaccess{}% + \def\@gls@pluralaccess{}% + \def\@gls@firstaccess{}% + \def\@gls@firstpluralaccess{}% + \def\@gls@shortaccess{}% + \def\@gls@shortaccesspl{}% + \def\@gls@longaccess{}% + \def\@gls@longaccesspl{}% + } +\newcommand*{\@gls@ifaccessattribute@set}[3]{% + \glsifcategoryattribute{\glscategorylabel}{access#1}{true}% + {#2}% + {% + \glsifcategoryattribute{\glscategorylabel}{access#1}{false}% + {#3}% + {% + \glsifcategoryattribute{\glscategorylabel}{#1}{true}% + {#2}% + {#3}% + }% + }% +} + \def\glsdefaultshortaccess#1#2{#1 (#2)} + \newcommand{\glsxtrassignactualsetup}{% + \let\@\empty + \let\emph\@firstofone + \let\textbf\@firstofone + \let\textmd\@firstofone + \let\textit\@firstofone + \let\textsl\@firstofone + \let\textsc\@firstofone + \let\textrm\@firstofone + \let\textsf\@firstofone + \let\texttt\@firstofone + } + \ifdef\pdfstringdef + { + \newcommand{\@gls@assign@actual}{% + \begingroup + \glsxtrassignactualsetup + \pdfstringdef\@gls@actualshort{\glsxtrorgshort}% + \pdfstringdef\@gls@actuallong{\glsxtrorglong}% + \pdfstringdef\@gls@actualshortpl{\@gls@shortpl}% + \pdfstringdef\@gls@actuallongpl{\@gls@longpl}% + \protected@edef\@gls@tmp{\endgroup + \def\noexpand\@gls@actualshort{\expandonce\@gls@actualshort}% + \def\noexpand\@gls@actuallong{\expandonce\@gls@actuallong}% + \def\noexpand\@gls@actualshortpl{\expandonce\@gls@actualshortpl}% + \def\noexpand\@gls@actuallongpl{\expandonce\@gls@actuallongpl}% + }% + \@gls@tmp + } + } + { + \newcommand{\@gls@assign@actual}{% + \begingroup + \glsxtrassignactualsetup + \protected@edef\@gls@tmp{\endgroup + \def\noexpand\@gls@actualshort{\glsxtrorgshort}% + \def\noexpand\@gls@actuallong{\glsxtrorglong}% + \def\noexpand\@gls@actualshortpl{\@gls@shortpl}% + \def\noexpand\@gls@actuallongpl{\@gls@longpl}% + }% + \@gls@tmp + } + } + \newcommand{\@gls@setup@default@access}{% + \@gls@assign@actual + \ifdefempty\@gls@shortaccess + {% + \@gls@ifaccessattribute@set{insertdots}% + {% + \expandafter\@glsxtr@insertdots\expandafter\@gls@actualshort\expandafter + {\@gls@actualshort}% + }% + {}% + \ifdefempty\@gls@longaccess + {% + \protected@edef\@gls@shortaccess{\glsdefaultshortaccess + {\expandonce\@gls@actuallong}{\expandonce\@gls@actualshort}}% + }% + {% + \protected@edef\@gls@shortaccess{\glsdefaultshortaccess + {\expandonce\@gls@longaccess}{\expandonce\@gls@actualshort}}% + }% + \eappto\ExtraCustomAbbreviationFields{shortaccess={\@gls@shortaccess},}% + \ifdefempty\@gls@shortaccesspl + {% + \@gls@ifaccessattribute@set{aposplural}% + {% + \expandafter\def\expandafter\@gls@shortaccesspl\expandafter{% + \@gls@actualshort'\glsxtrabbrvpluralsuffix}% + }% + {% + \@gls@ifaccessattribute@set{noshortplural}% + {% + \let\@gls@shortaccesspl\@gls@shortaccess + }% + {% + \let\@gls@shortaccesspl\@gls@actualshortpl + }% + }% + \ifdefempty\@gls@longaccesspl + {% + \protected@edef\@gls@shortaccesspl{\glsdefaultshortaccess + {\expandonce\@gls@actuallongpl}{\expandonce\@gls@actualshortpl}}% + }% + {% + \protected@edef\@gls@shortaccesspl{\glsdefaultshortaccess + {\expandonce\@gls@longaccesspl}{\expandonce\@gls@actualshort}}% + }% + \eappto\ExtraCustomAbbreviationFields{shortpluralaccess={\@gls@shortaccesspl},}% + }% + {}% + }% + {% + \ifdefempty\@gls@shortaccesspl + {\let\@gls@shortaccesspl\@gls@shortaccess}% + {}% + }% + \ifdefempty\@gls@nameaccess + {% + \glsifcategoryattribute{\glscategorylabel}{nameshortaccess}{true}% + {% + \eappto\ExtraCustomAbbreviationFields{access={\@gls@shortaccess},}% + }% + {}% + }% + {}% + \ifdefempty\@gls@textaccess + {% + \glsifcategoryattribute{\glscategorylabel}{textshortaccess}{true}% + {% + \eappto\ExtraCustomAbbreviationFields{textaccess={\@gls@shortaccess},}% + }% + {}% + }% + {}% + \ifdefempty\@gls@pluralaccess + {% + \glsifcategoryattribute{\glscategorylabel}{textshortaccess}{true}% + {% + \eappto\ExtraCustomAbbreviationFields{% + pluralaccess={\@gls@shortaccesspl},% + }% + }% + {}% + }% + {}% + \ifdefempty\@gls@firstaccess + {% + \glsifcategoryattribute{\glscategorylabel}{firstshortaccess}{true}% + {% + \eappto\ExtraCustomAbbreviationFields{firstaccess={\@gls@shortaccess},}% + }% + {}% + }% + {}% + \ifdefempty\@gls@firstpluralaccess + {% + \glsifcategoryattribute{\glscategorylabel}{firstshortaccess}{true}% + {% + \eappto\ExtraCustomAbbreviationFields{% + firstpluralaccess={\@gls@shortaccesspl},% + }% + }% + {}% + }% + {}% + } + \newcommand*{\glsxtrprovideaccsuppcmd}[2]{% + \ifcsundef{glsxtr#1#2accsupp}% + {\csdef{glsxtr#1#2accsupp}{\glsshortaccsupp}}% + {}% + } + \newcommand*{\glsxtrAccSuppAbbrSetNoLongAttrs}[1]{% + \glssetcategoryattribute{#1}{nameshortaccess}{true}% + \glssetcategoryattribute{#1}{firstshortaccess}{true}% + \glssetcategoryattribute{#1}{textshortaccess}{true}% + \glsxtrprovideaccsuppcmd{#1}{name}% + \glsxtrprovideaccsuppcmd{#1}{first}% + \glsxtrprovideaccsuppcmd{#1}{firstpl}% + \glsxtrprovideaccsuppcmd{#1}{text}% + \glsxtrprovideaccsuppcmd{#1}{plural}% + } + \newcommand*{\glsxtrAccSuppAbbrSetFirstLongAttrs}[1]{% + \glssetcategoryattribute{#1}{nameshortaccess}{true}% + \glssetcategoryattribute{#1}{textshortaccess}{true}% + \glsxtrprovideaccsuppcmd{#1}{name}% + \glsxtrprovideaccsuppcmd{#1}{text}% + \glsxtrprovideaccsuppcmd{#1}{plural}% + } + \newcommand*{\glsxtrAccSuppAbbrSetTextShortAttrs}[1]{% + \glssetcategoryattribute{#1}{textshortaccess}{true}% + \glsxtrprovideaccsuppcmd{#1}{text}% + \glsxtrprovideaccsuppcmd{#1}{plural}% + } + \newcommand*{\glsxtrAccSuppAbbrSetNameShortAttrs}[1]{% + \glssetcategoryattribute{#1}{nameshortaccess}{true}% + \glsxtrprovideaccsuppcmd{#1}{name}% + } + \newcommand*{\glsxtrAccSuppAbbrSetNameLongAttrs}[1]{% + \glssetcategoryattribute{#1}{firstshortaccess}{true}% + \glssetcategoryattribute{#1}{textshortaccess}{true}% + \glsxtrprovideaccsuppcmd{#1}{first}% + \glsxtrprovideaccsuppcmd{#1}{firstpl}% + \glsxtrprovideaccsuppcmd{#1}{text}% + \glsxtrprovideaccsuppcmd{#1}{plural}% + } +} +{ + \newcommand*{\glsaccessname}[1]{\glsentryname{#1}} + \newcommand*{\Glsaccessname}[1]{\Glsentryname{#1}} + \newcommand*{\GLSaccessname}[1]{% + \protect\mfirstucMakeUppercase{\glsentryname{#1}}} + \newcommand*{\glsaccesstext}[1]{\glsentrytext{#1}} + \newcommand*{\Glsaccesstext}[1]{\Glsentrytext{#1}} + \newcommand*{\GLSaccesstext}[1]{% + \protect\mfirstucMakeUppercase{\glsentrytext{#1}}} + \newcommand*{\glsaccessplural}[1]{\glsentryplural{#1}} + \newcommand*{\Glsaccessplural}[1]{\Glsentryplural{#1}} + \newcommand*{\GLSaccessplural}[1]{% + \protect\mfirstucMakeUppercase{\glsentryplural{#1}}} + \newcommand*{\glsaccessfirst}[1]{\glsentryfirst{#1}} + \newcommand*{\Glsaccessfirst}[1]{\Glsentryfirst{#1}} + \newcommand*{\GLSaccessfirst}[1]{% + \protect\mfirstucMakeUppercase{\glsentryfirst{#1}}} + \newcommand*{\glsaccessfirstplural}[1]{\glsentryfirstplural{#1}} + \newcommand*{\Glsaccessfirstplural}[1]{\Glsentryfirstplural{#1}} + \newcommand*{\GLSaccessfirstplural}[1]{% + \protect\mfirstucMakeUppercase{\glsentryfirstplural{#1}}} + \newcommand*{\glsaccesssymbol}[1]{\glsentrysymbol{#1}} + \newcommand*{\Glsaccesssymbol}[1]{\Glsentrysymbol{#1}} + \newcommand*{\GLSaccesssymbol}[1]{% + \protect\mfirstucMakeUppercase{\glsentrysymbol{#1}}} + \newcommand*{\glsaccesssymbolplural}[1]{\glsentrysymbolplural{#1}} + \newcommand*{\Glsaccesssymbolplural}[1]{\Glsentrysymbolplural{#1}} + \newcommand*{\GLSaccesssymbolplural}[1]{% + \protect\mfirstucMakeUppercase{\glsentrysymbolplural{#1}}} + \newcommand*{\glsaccessdesc}[1]{\glsentrydesc{#1}} + \newcommand*{\Glsaccessdesc}[1]{\Glsentrydesc{#1}} + \newcommand*{\GLSaccessdesc}[1]{% + \protect\mfirstucMakeUppercase{\glsentrydesc{#1}}} + \newcommand*{\glsaccessdescplural}[1]{\glsentrydescplural{#1}} + \newcommand*{\Glsaccessdescplural}[1]{\Glsentrydescplural{#1}} + \newcommand*{\GLSaccessdescplural}[1]{% + \protect\mfirstucMakeUppercase{\glsentrydescplural{#1}}} + \newcommand*{\glsaccessshort}[1]{\glsentryshort{#1}} + \newcommand*{\Glsaccessshort}[1]{\Glsentryshort{#1}} + \newcommand*{\GLSaccessshort}[1]{% + \protect\mfirstucMakeUppercase{\glsentryshort{#1}}} + \newcommand*{\glsaccessshortpl}[1]{\glsentryshortpl{#1}} + \newcommand*{\Glsaccessshortpl}[1]{\Glsentryshortpl{#1}} + \newcommand*{\GLSaccessshortpl}[1]{% + \protect\mfirstucMakeUppercase{\glsentryshortpl{#1}}} + \newcommand*{\glsaccesslong}[1]{\glsentrylong{#1}} + \newcommand*{\Glsaccesslong}[1]{\Glsentrylong{#1}} + \newcommand*{\GLSaccesslong}[1]{% + \protect\mfirstucMakeUppercase{\glsentrylong{#1}}} + \newcommand*{\glsaccesslongpl}[1]{\glsentrylongpl{#1}} + \newcommand*{\Glsaccesslongpl}[1]{\Glsentrylongpl{#1}} + \newcommand*{\GLSaccesslongpl}[1]{% + \protect\mfirstucMakeUppercase{\glsentrylongpl{#1}}} + \newcommand*{\@gls@initaccesskeys}{} + \newcommand{\@gls@setup@default@access}{} + \newcommand*{\glsxtrAccSuppAbbrSetNoLongAttrs}[1]{} + \newcommand*{\glsxtrAccSuppAbbrSetFirstLongAttrs}[1]{} + \newcommand*{\glsxtrAccSuppAbbrSetTextShortAttrs}[1]{} + \newcommand*{\glsxtrAccSuppAbbrSetNameShortAttrs}[1]{} + \newcommand*{\glsxtrAccSuppAbbrSetNameLongAttrs}[1]{} +} +\glsaddstoragekey{category}{general}{\glscategory} +\newcommand{\glsifcategory}[4]{% + \ifglsfieldeq{#1}{category}{#2}{#3}{#4}% +} +\newcommand*{\glssetcategoryattribute}[3]{% + \csdef{@glsxtr@categoryattr@@#1@#2}{#3}% +} +\newcommand*{\glssetcategoriesattribute}[3]{% + \@for\@gls@thiscatlabel:=#1\do{% + \csgdef{@glsxtr@categoryattr@@\@gls@thiscatlabel @#2}{#3}% + }% +} +\newcommand*{\glssetcategoriesattributes}[3]{% + {% + \@for\@gls@thisattrlabel:=#2\do{% + \glssetcategoriesattribute{#1}{\@gls@thisattrlabel}{#3}% + }% + }% +} +\newcommand*{\glsgetcategoryattribute}[2]{% + \csuse{@glsxtr@categoryattr@@#1@#2}% +} +\newcommand*{\glsunsetcategoryattribute}[2]{% + \csundef{@glsxtr@categoryattr@@#1@#2}% +} +\newcommand*{\glshascategoryattribute}[4]{% + \ifcsvoid{@glsxtr@categoryattr@@#1@#2}{#4}{#3}% +} +\newcommand*{\glssetattribute}[3]{% + \glssetcategoryattribute{\glscategory{#1}}{#2}{#3}% +} +\newcommand*{\glsgetattribute}[2]{% + \glsgetcategoryattribute{\glscategory{#1}}{#2}% +} +\newcommand*{\glshasattribute}[4]{% + \ifglsentryexists{#1}% + {\glshascategoryattribute{\glscategory{#1}}{#2}{#3}{#4}}% + {#4}% +} +\newcommand{\glsifcategoryattribute}[5]{% + \ifcsundef{@glsxtr@categoryattr@@#1@#2}% + {#5}% + {\ifcsstring{@glsxtr@categoryattr@@#1@#2}{#3}{#4}{#5}}% +} +\newcommand{\glsifattribute}[5]{% + \ifglsentryexists{#1}% + {\glsifcategoryattribute{\glscategory{#1}}{#2}{#3}{#4}{#5}}% + {#5}% +} +\glssetcategoryattribute{general}{regular}{true} +\glssetcategoryattribute{acronym}{regular}{true} +\newcommand*{\glssetregularcategory}[1]{% + \glssetcategoryattribute{#1}{regular}{true}% +} +\newcommand{\glsifregularcategory}[3]{% + \glsifcategoryattribute{#1}{regular}{true}{#2}{#3}% +} +\newcommand{\glsifnotregularcategory}[3]{% + \glsifcategoryattribute{#1}{regular}{false}{#2}{#3}% +} +\newcommand{\glsifregular}[3]{% + \glsifregularcategory{\glscategory{#1}}{#2}{#3}% +} +\newcommand{\glsifnotregular}[3]{% + \glsifnotregularcategory{\glscategory{#1}}{#2}{#3}% +} +\newcommand{\glsforeachincategory}[5][\@glo@types]{% + \forallglossaries[#1]{#3}% + {% + \forglsentries[#3]{#4}% + {% + \glsifcategory{#4}{#2}{#5}{}% + }% + }% +} +\newcommand{\glsforeachwithattribute}[6][\@glo@types]{% + \forallglossaries[#1]{#4}% + {% + \forglsentries[#4]{#5}% + {% + \glsifattribute{#5}{#2}{#3}{#6}{}% + }% + }% +} +\ifdef\newterm +{% + \renewcommand*{\newterm}[2][]{% + \newglossaryentry{#2}% + {type={index},category=index,name={#2},% + description={\glsxtrpostdescription\nopostdesc},#1}% + } + \glssetcategoryattribute{index}{regular}{true} + \newcommand*{\glsxtrpostdescindex}{} +} +{} +\ifdef\printsymbols +{% + \newcommand*{\glsxtrnewsymbol}[3][]{% + \newglossaryentry{#2}{name={#3},sort={#2},type=symbols,category=symbol,#1}% + } + \glssetcategoryattribute{symbol}{regular}{true} + \newcommand*{\glsxtrpostdescsymbol}{} +} +{} +\ifdef\printnumbers +{% +\ifdef\printnumbers + \newcommand*{\glsxtrnewnumber}[3][]{% + \newglossaryentry{#2}{name={#3},sort={#2},type=numbers,category=number,#1}% + } + \glssetcategoryattribute{number}{regular}{true} + \newcommand*{\glsxtrpostdescnumber}{} +} +{} +\newcommand*{\glsxtrsetcategory}[2]{% + \@for\@glsxtr@label:=#1\do + {% + \glsfieldxdef{\@glsxtr@label}{category}{#2}% + }% +} +\newcommand*{\glsxtrsetcategoryforall}[2]{% + \forallglossaries[#1]{\@glsxtr@type}{% + \forglsentries[\@glsxtr@type]{\@glsxtr@label}% + {% + \glsfieldxdef{\@glsxtr@label}{category}{#2}% + }% + }% +} +\newcommand*{\glsxtrfieldtitlecase}[2]{% + \expandafter\glsxtrfieldtitlecasecs\expandafter + {\csname glo@\glsdetoklabel{#1}@#2\endcsname}% +} +\ifdef\glscapitalisewords +{ + \newcommand*{\glsxtrfieldtitlecasecs}[1]{% + \expandafter\glscapitalisewords\expandafter{#1}} +} +{ + \newcommand*{\glsxtrfieldtitlecasecs}[1]{\xcapitalisewords{#1}} +} +\@ifpackageloaded{glossaries-accsupp} +{ + \renewcommand*{\glossentrydesc}[1]{% + \glsdoifexistsorwarn{#1}% + {% + \glssetabbrvfmt{\glscategory{#1}}% + \glshasattribute{#1}{glossdescfont}% + {% + \protected@edef\@glsxtr@attrval{\glsgetattribute{#1}{glossdescfont}}% + \ifcsdef{\@glsxtr@attrval}% + {% + \letcs{\@glsxtr@glossdescfont}{\@glsxtr@attrval}% + }% + {% + \GlossariesExtraWarning{Unknown control sequence name + `\@glsxtr@attrval' supplied in glossdescfont attribute + for entry `#1'. Ignoring}% + \let\@glsxtr@glossdescfont\@firstofone + }% + }% + {\let\@glsxtr@glossdescfont\@firstofone}% + \glsifattribute{#1}{glossdesc}{firstuc}% + {% + \@glsxtr@glossdescfont{\Glsaccessdesc{#1}}% + }% + {% + \glsifattribute{#1}{glossdesc}{title}% + {% + \@glsxtr@do@titlecaps@warn + \glsdescriptionaccessdisplay + {% + \@glsxtr@glossdescfont{\glsxtrfieldtitlecase{#1}{desc}}% + }% + {#1}% + }% + {% + \@glsxtr@glossdescfont{\glsaccessdesc{#1}}% + }% + }% + }% + } +} +{ + \renewcommand*{\glossentrydesc}[1]{% + \glsdoifexistsorwarn{#1}% + {% + \glssetabbrvfmt{\glscategory{#1}}% + \glshasattribute{#1}{glossdescfont}% + {% + \protected@edef\@glsxtr@attrval{\glsgetattribute{#1}{glossdescfont}}% + \ifcsdef{\@glsxtr@attrval}% + {% + \letcs{\@glsxtr@glossdescfont}{\@glsxtr@attrval}% + }% + {% + \GlossariesExtraWarning{Unknown control sequence name + `\@glsxtr@attrval' supplied in glossdescfont attribute + for entry `#1'. Ignoring}% + \let\@glsxtr@glossdescfont\@firstofone + }% + }% + {\let\@glsxtr@glossdescfont\@firstofone}% + \glsifattribute{#1}{glossdesc}{firstuc}% + {% + \@glsxtr@glossdescfont{\Glsentrydesc{#1}}% + }% + {% + \glsifattribute{#1}{glossdesc}{title}% + {% + \@glsxtr@do@titlecaps@warn + \@glsxtr@glossdescfont{\glsxtrfieldtitlecase{#1}{desc}}% + }% + {% + \@glsxtr@glossdescfont{\glsentrydesc{#1}}% + }% + }% + }% + } +} +\@ifpackageloaded{glossaries-accsupp} +{ + \renewcommand*{\glossentryname}[1]{% + \@glsdoifexistsorwarn{#1}% + {% + \glssetabbrvfmt{\glscategory{#1}}% + \glshasattribute{#1}{glossnamefont}% + {% + \protected@edef\@glsxtr@attrval{\glsgetattribute{#1}{glossnamefont}}% + \ifcsdef{\@glsxtr@attrval}% + {% + \letcs{\@glsxtr@glossnamefont}{\@glsxtr@attrval}% + }% + {% + \GlossariesExtraWarning{Unknown control sequence name + `\@glsxtr@attrval' supplied in glossnamefont attribute + for entry `#1'. Reverting to default \string\glsnamefont}% + \let\@glsxtr@glossnamefont\glsnamefont + }% + }% + {\let\@glsxtr@glossnamefont\glsnamefont}% + \glsifattribute{#1}{glossname}{firstuc}% + {% + \glsnameaccessdisplay + {% + \@glsxtr@glossnamefont{\Glsentryname{#1}}% + }% + {#1}% + }% + {% + \glsifattribute{#1}{glossname}{title}% + {% + \@glsxtr@do@titlecaps@warn + \glsnameaccessdisplay + {% + \@glsxtr@glossnamefont{\glsxtrfieldtitlecase{#1}{name}}% + }% + {#1}% + }% + {% + \glsifattribute{#1}{glossname}{uc}% + {% + \glsnameaccessdisplay + {% + \letcs{\glo@name}{glo@\glsdetoklabel{#1}@name}% + \@glsxtr@glossnamefont{\mfirstucMakeUppercase{\glo@name}}% + }% + {#1}% + }% + {% + \letcs{\glo@name}{glo@\glsdetoklabel{#1}@name}% + \glsnameaccessdisplay + {% + \expandafter\@glsxtr@glossnamefont\expandafter{\glo@name}% + }% + {#1}% + }% + }% + }% + \glsxtrpostnamehook{#1}% + }% + } +} +{ + \renewcommand*{\glossentryname}[1]{% + \@glsdoifexistsorwarn{#1}% + {% + \glssetabbrvfmt{\glscategory{#1}}% + \glshasattribute{#1}{glossnamefont}% + {% + \protected@edef\@glsxtr@attrval{\glsgetattribute{#1}{glossnamefont}}% + \ifcsdef{\@glsxtr@attrval}% + {% + \letcs{\@glsxtr@glossnamefont}{\@glsxtr@attrval}% + }% + {% + \GlossariesExtraWarning{Unknown control sequence name + `\@glsxtr@attrval' supplied in glossnamefont attribute + for entry `#1'. Reverting to default \string\glsnamefont}% + \let\@glsxtr@glossnamefont\glsnamefont + }% + }% + {\let\@glsxtr@glossnamefont\glsnamefont}% + \glsifattribute{#1}{glossname}{firstuc}% + {% + \@glsxtr@glossnamefont{\Glsentryname{#1}}% + }% + {% + \glsifattribute{#1}{glossname}{title}% + {% + \@glsxtr@do@titlecaps@warn + \@glsxtr@glossnamefont{\glsxtrfieldtitlecase{#1}{name}}% + }% + {% + \glsifattribute{#1}{glossname}{uc}% + {% + \letcs{\glo@name}{glo@\glsdetoklabel{#1}@name}% + \@glsxtr@glossnamefont{\mfirstucMakeUppercase{\glo@name}}% + }% + {% + \letcs{\glo@name}{glo@\glsdetoklabel{#1}@name}% + \expandafter\@glsxtr@glossnamefont\expandafter{\glo@name}% + }% + }% + }% + \glsxtrpostnamehook{#1}% + }% + } +} +\@ifpackageloaded{glossaries-accsupp} +{ + \renewcommand*{\Glossentryname}[1]{% + \@glsdoifexistsorwarn{#1}% + {% + \glssetabbrvfmt{\glscategory{#1}}% + \glshasattribute{#1}{glossnamefont}% + {% + \protected@edef\@glsxtr@attrval{\glsgetattribute{#1}{glossnamefont}}% + \ifcsdef{\@glsxtr@attrval}% + {% + \letcs{\@glsxtr@glossnamefont}{\@glsxtr@attrval}% + }% + {% + \GlossariesExtraWarning{Unknown control sequence name + `\@glsxtr@attrval' supplied in glossnamefont attribute + for entry `#1'. Reverting to default \string\glsnamefont}% + \let\@glsxtr@glossnamefont\glsnamefont + }% + }% + {\let\@glsxtr@glossnamefont\glsnamefont}% + \glsnameaccessdisplay + {% + \@glsxtr@glossnamefont{\Glsentryname{#1}}% + }% + {#1}% + \glsxtrpostnamehook{#1}% + }% + } +} +{ + \renewcommand*{\Glossentryname}[1]{% + \@glsdoifexistsorwarn{#1}% + {% + \glssetabbrvfmt{\glscategory{#1}}% + \glshasattribute{#1}{glossnamefont}% + {% + \protected@edef\@glsxtr@attrval{\glsgetattribute{#1}{glossnamefont}}% + \ifcsdef{\@glsxtr@attrval}% + {% + \letcs{\@glsxtr@glossnamefont}{\@glsxtr@attrval}% + }% + {% + \GlossariesExtraWarning{Unknown control sequence name + `\@glsxtr@attrval' supplied in glossnamefont attribute + for entry `#1'. Reverting to default \string\glsnamefont}% + \let\@glsxtr@glossnamefont\glsnamefont + }% + }% + {\let\@glsxtr@glossnamefont\glsnamefont}% + \@glsxtr@glossnamefont{\Glsentryname{#1}}% + \glsxtrpostnamehook{#1}% + }% + } +} +\newcommand*{\glsxtrpostnamehook}[1]{% + \let\@glsnumberformat\@glsxtr@defaultnumberformat + \glsxtrdoautoindexname{#1}{indexname}% + \glsextrapostnamehook{#1}% + \csuse{glsxtrpostname\glscategory{#1}}% +} +\newcommand*{\glsextrapostnamehook}[1]{}% +\newcommand*{\glsdefpostname}[2]{% + \csdef{glsxtrpostname#1}{#2}% +} +\@ifpackageloaded{glossaries-accsupp} +{ + \newcommand*{\glsxtr@setaccessdisplay}[1]{% + \ifcsdef{gls#1accessdisplay}% + {\letcs\@glsxtr@accessdisplay{gls#1accessdisplay}}% + {% + \protected@edef\@gls@thisval{#1}% + \@for\@gls@map:=\@gls@keymap\do{% + \protected@edef\@this@key{\expandafter\@secondoftwo\@gls@map}% + \ifdefequal{\@this@key}{\@gls@thisval}% + {% + \protected@edef\@gls@thisval{\expandafter\@firstoftwo\@gls@map}% + \@endfortrue + }% + {}% + }% + \ifcsdef{gls\@gls@thisval accessdisplay}% + {\letcs\@glsxtr@accessdisplay{gls\@gls@thisval accessdisplay}}% + {\let\@glsxtr@accessdisplay\@firstoftwo}% + }% + } +} +{% + \newcommand*{\glsxtr@setaccessdisplay}[1]{% + \let\@glsxtr@accessdisplay\@firstoftwo} +} +\newrobustcmd*{\glossentrynameother}[2]{% + \@glsdoifexistsorwarn{#1}% + {% + \glsxtr@setaccessdisplay{#2}% + \glssetabbrvfmt{\glscategory{#1}}% + \glshasattribute{#1}{glossnamefont}% + {% + \protected@edef\@glsxtr@attrval{\glsgetattribute{#1}{glossnamefont}}% + \ifcsdef{\@glsxtr@attrval}% + {% + \letcs{\@glsxtr@glossnamefont}{\@glsxtr@attrval}% + }% + {% + \GlossariesExtraWarning{Unknown control sequence name + `\@glsxtr@attrval' supplied in glossnamefont attribute + for entry `#1'. Reverting to default \string\glsnamefont}% + \let\@glsxtr@glossnamefont\glsnamefont + }% + }% + {\let\@glsxtr@glossnamefont\glsnamefont}% + \glsifattribute{#1}{glossname}{firstuc}% + {% + \@glsxtr@accessdisplay + {\@glsxtr@glossnamefont{\@Gls@entry@field{#1}{#2}}}% + {#1}% + }% + {% + \glsifattribute{#1}{glossname}{title}% + {% + \@glsxtr@do@titlecaps@warn + \@glsxtr@accessdisplay + {\@glsxtr@glossnamefont{\glsxtrfieldtitlecase{#1}{#2}}}% + {#1}% + }% + {% + \glsifattribute{#1}{glossname}{uc}% + {% + \letcs{\glo@name}{glo@\glsdetoklabel{#1}@#2}% + \@glsxtr@accessdisplay + {\@glsxtr@glossnamefont{\mfirstucMakeUppercase{\glo@name}}}% + {#1}% + }% + {% + \letcs{\glo@name}{glo@\glsdetoklabel{#1}@#2}% + \@glsxtr@accessdisplay + {\expandafter\@glsxtr@glossnamefont\expandafter{\glo@name}}% + {#1}% + }% + }% + }% + \glsxtrpostnamehook{#1}% + }% +} +\newif\if@glsxtr@format@override +\@glsxtr@format@overridefalse +\@ifpackageloaded{hyperref} +{ + \ifHy@hyperindex + \newcommand*{\GlsXtrEnableIndexFormatOverride}{% + \@glsxtr@format@overridetrue + \appto\theindex{\let\glshypernumber\@firstofone}% + } + \else + \newcommand*{\GlsXtrEnableIndexFormatOverride}{% + \@glsxtr@format@overridetrue + \appto\theindex{\let\glshypernumber\hyperpage}% + } + \fi +} +{ + \newcommand*{\GlsXtrEnableIndexFormatOverride}{% + \@glsxtr@format@overridetrue + } +} +\@onlypreamble\GlsXtrEnableIndexFormatOverride +\newcommand*{\glsxtrdoautoindexname}[2]{% + \glshasattribute{#1}{#2}% + {% + \@glsxtr@autoindex@setname{#1}% + \protected@edef\@glsxtr@attrval{\glsgetattribute{#1}{#2}}% + \if@glsxtr@format@override + \ifx\@glsnumberformat\@glsxtr@defaultnumberformat + \else + \let\@glsxtr@attrval\@glsnumberformat + \fi + \fi + \ifdefstring{\@glsxtr@attrval}{true}% + {}% + {\protected@eappto\@glo@name{\@glsxtr@autoindex@encap\@glsxtr@attrval}}% + \expandafter\glsxtrautoindex\expandafter{\@glo@name}% + }% + {}% +} +\newcommand*{\glsxtrautoindex}{\index} +\newcommand{\glsxtrautoindexesc}{% + \@gls@checkmkidxchars\@glo@sort + \@glsxtr@autoindex@doextra@esc\@glo@sort +} +\newcommand*{\@glsxtr@autoindex@setname}[1]{% + \protected@edef\@glo@name{\glsxtrautoindexentry{#1}}% + \glsxtrautoindexassignsort{\@glo@sort}{#1}% + \glsxtrautoindexesc + \epreto\@glo@name{\@glo@sort\@glsxtr@autoindex@at}% +} +\newcommand*{\glsxtrautoindexentry}[1]{\string\glsentryname{#1}} +\newcommand*{\glsxtrautoindexassignsort}[2]{% + \glsletentryfield{#1}{#2}{sort}% +} +\newcommand*{\@glsxtr@autoindex@doextra@esc}[1]{% + \ifx\@glsxtr@autoindex@esc\@gls@quotechar + \else + \def\@gls@checkedmkidx{}% + \edef\@@glsxtr@checkspch{% + \noexpand\@glsxtr@autoindex@escquote\expandonce{#1}% + \noexpand\@empty\@glsxtr@autoindex@esc\noexpand\@nnil + \@glsxtr@autoindex@esc\noexpand\@empty\noexpand\@glsxtr@endescspch}% + \@@glsxtr@checkspch + \let#1\@gls@checkedmkidx\relax + \fi + \ifx\@glsxtr@autoindex@at\@gls@actualchar + \else + \def\@gls@checkedmkidx{}% + \edef\@@glsxtr@checkspch{% + \noexpand\@glsxtr@autoindex@escat\expandonce{#1}% + \noexpand\@empty\@glsxtr@autoindex@at\noexpand\@nnil + \@glsxtr@autoindex@at\noexpand\@empty\noexpand\@glsxtr@endescspch}% + \@@glsxtr@checkspch + \let#1\@gls@checkedmkidx\relax + \fi + \ifx\@glsxtr@autoindex@level\@gls@levelchar + \else + \def\@gls@checkedmkidx{}% + \edef\@@glsxtr@checkspch{% + \noexpand\@glsxtr@autoindex@esclevel\expandonce{#1}% + \noexpand\@empty\@glsxtr@autoindex@level\noexpand\@nnil + \@glsxtr@autoindex@level\noexpand\@empty\noexpand\@glsxtr@endescspch}% + \@@glsxtr@checkspch + \let#1\@gls@checkedmkidx\relax + \fi + \ifx\@glsxtr@autoindex@encap\@gls@encapchar + \else + \def\@gls@checkedmkidx{}% + \edef\@@glsxtr@checkspch{% + \noexpand\@glsxtr@autoindex@escencap\expandonce{#1}% + \noexpand\@empty\@glsxtr@autoindex@encap\noexpand\@nnil + \@glsxtr@autoindex@encap\noexpand\@empty\noexpand\@glsxtr@endescspch}% + \@@glsxtr@checkspch + \let#1\@gls@checkedmkidx\relax + \fi +} +\newcommand*{\@glsxtr@autoindex@at}{} +\newcommand*{\GlsXtrSetActualChar}[1]{% + \gdef\@glsxtr@autoindex@at{#1}% + \def\@glsxtr@autoindex@escat##1#1##2#1##3\@glsxtr@endescspch{% + \@@glsxtr@autoindex@escspch{#1}{\@glsxtr@autoindex@escat}{##1}{##2}{##3}% + }% +} +\@onlypreamble\GlsXtrSetActualChar +\makeatother +\GlsXtrSetActualChar{@} +\makeatletter +\newcommand*{\@glsxtr@autoindex@encap}{} +\newcommand*{\GlsXtrSetEncapChar}[1]{% + \gdef\@glsxtr@autoindex@encap{#1}% + \def\@glsxtr@autoindex@escencap##1#1##2#1##3\@glsxtr@endescspch{% + \@@glsxtr@autoindex@escspch{#1}{\@glsxtr@autoindex@escencap}{##1}{##2}{##3}% + }% +} +\GlsXtrSetEncapChar{|} +\@onlypreamble\GlsXtrSetEncapChar +\newcommand*{\@glsxtr@autoindex@level}{} +\newcommand*{\GlsXtrSetLevelChar}[1]{% + \gdef\@glsxtr@autoindex@level{#1}% + \def\@glsxtr@autoindex@esclevel##1#1##2#1##3\@glsxtr@endescspch{% + \@@glsxtr@autoindex@escspch{#1}{\@glsxtr@autoindex@esclevel}{##1}{##2}{##3}% + }% +} +\GlsXtrSetLevelChar{!} +\@onlypreamble\GlsXtrSetLevelChar +\newcommand*{\@glsxtr@autoindex@esc}{"} +\newcommand*{\GlsXtrSetEscChar}[1]{% + \gdef\@glsxtr@autoindex@esc{#1}% + \def\@glsxtr@autoindex@escquote##1#1##2#1##3\@glsxtr@endescspch{% + \@@glsxtr@autoindex@escspch{#1}{\@glsxtr@autoindex@escquote}{##1}{##2}{##3}% + }% +} +\GlsXtrSetEscChar{"} +\@onlypreamble\GlsXtrSetEscChar +\ifdef\actualchar + {\expandafter\GlsXtrSetActualChar\expandafter{\actualchar}} + {} +\ifdef\quotechar + {\expandafter\GlsXtrSetEscChar\expandafter{\quotechar}} + {} +\ifdef\levelchar + {\expandafter\GlsXtrSetLevelChar\expandafter{\levelchar}} + {} +\ifdef\encapchar + {\expandafter\GlsXtrSetEncapChar\expandafter{\encapchar}} + {} +\def\@glsxtr@gobbleto@endescspch#1\@glsxtr@endescspch{} +\newcommand*{\@@glsxtr@autoindex@escspch}[5]{% + \@gls@tmpb=\expandafter{\@gls@checkedmkidx}% + \toks@={#3}% + \ifx\@nnil#3\relax + \def\@@glsxtr@checkspch{\@glsxtr@gobbleto@endescspch#5\@glsxtr@endescspch}% + \else + \ifx\@nnil#4\relax + \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@}% + \def\@@glsxtr@checkspch{\@glsxtr@gobbleto@endescspch + #4#5\@glsxtr@endescspch}% + \else + \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@ + \@glsxtr@autoindex@esc#1}% + \def\@@glsxtr@checkspch{#2#5#1\@nnil#1\@glsxtr@endescspch}% + \fi + \fi + \@@glsxtr@checkspch +} +\renewcommand*{\Glossentrydesc}[1]{% + \glsdoifexistsorwarn{#1}% + {% + \glssetabbrvfmt{\glscategory{#1}}% + \Glsaccessdesc{#1}% + }% +} +\ifdef\texorpdfstring +{ + \renewcommand*{\glossentrysymbol}[1]{% + \texorpdfstring{\@glossentrysymbol{#1}}{\glsentrypdfsymbol{#1}}% + } +} +{ + \renewcommand*{\glossentrysymbol}[1]{\@glossentrysymbol{#1}} +} +\newcommand{\glsentrypdfsymbol}[1]{\glsentrysymbol{#1}} +\newrobustcmd*{\@glossentrysymbol}[1]{% + \glsdoifexistsorwarn{#1}% + {% + \begingroup + \glssetabbrvfmt{\glscategory{#1}}% + \glshasattribute{#1}{glosssymbolfont}% + {% + \protected@edef\@glsxtr@attrval{\glsgetattribute{#1}{glosssymbolfont}}% + \ifcsdef{\@glsxtr@attrval}% + {% + \letcs{\@glsxtr@glosssymbolfont}{\@glsxtr@attrval}% + }% + {% + \GlossariesExtraWarning{Unknown control sequence name + `\@glsxtr@attrval' supplied in glosssymbolfont attribute + for entry `#1'. Ignoring}% + \let\@glsxtr@glosssymbolfont\@firstofone + }% + }% + {\let\@glsxtr@glosssymbolfont\@firstofone}% + \@glsxtr@glosssymbolfont{\glsaccesssymbol{#1}}% + \endgroup + }% +} +\renewcommand*{\Glossentrysymbol}[1]{% + \glsdoifexistsorwarn{#1}% + {% + \glssetabbrvfmt{\glscategory{#1}}% + \Glsaccesssymbol{#1}% + }% +} +\newcommand*{\GlsXtrEnableInitialTagging}{% + \@ifstar\s@glsxtr@enabletagging\@glsxtr@enabletagging +} +\@onlypreamble\GlsXtrEnableInitialTagging +\newcommand*{\s@glsxtr@enabletagging}[2]{% + \undef#2% + \@glsxtr@enabletagging{#1}{#2}% +} +\newcommand*{\@glsxtr@enabletagging}[2]{% + \@for\@glsxtr@cat:=#1\do + {% + \ifdefempty\@glsxtr@cat + {}% + {\glssetcategoryattribute{\@glsxtr@cat}{tagging}{true}}% + }% + \newrobustcmd*#2[1]{##1}% + \def\@glsxtr@taggingcs{#2}% + \renewcommand*\@glsxtr@activate@initialtagging{% + \let#2\@glsxtr@tag + }% + \ifundef\@gls@preglossaryhook + {\GlossariesExtraWarning{Initial tagging requires at least + glossaries.sty v4.19 to work correctly}}% + {}% +} +\ifundef\mfu@checkword@do +{ + \newcommand*{\mfu@checkword@do}[1]{% + \ifdefstring{\mfu@checkword@arg}{#1}% + {% + \let\@mfu@domakefirstuc\@firstofone + \listbreak + }% + {}% + } + \ifundef\mfu@checkword + { + \newcommand{\@glsxtr@do@titlecaps@warn}{% + \GlossariesExtraWarning{mfirstuc.sty too old. Title Caps + support not available}% + \let\@glsxtr@do@titlecaps@warn\relax + } + } + { + \renewcommand*{\mfu@checkword}[1]{% + \def\mfu@checkword@arg{#1}% + \let\@mfu@domakefirstuc\makefirstuc + \forlistloop\mfu@checkword@do\@mfu@nocaplist + } + } +} +{}% no patch required +\newcommand*{\@glsxtr@do@titlecaps@warn}{} +\newcommand*\@glsxtr@activate@initialtagging{} +\newrobustcmd*{\@glsxtr@tag}[1]{% + \glsifattribute{\glscurrententrylabel}{tagging}{true}% + {\glsxtrtagfont{#1}}{#1}% +} +\newcommand*{\glsxtrtagfont}[1]{\underline{#1}} +\ifdef\@gls@preglossaryhook +{ + \renewcommand*{\@gls@preglossaryhook}{% + \@glsxtr@activate@initialtagging + \ifundef\@glsxtr@org@postdescription + {% + \let\@glsxtr@org@postdescription\glspostdescription + \renewcommand*{\glspostdescription}{% + \ifglsentryexists{\glscurrententrylabel}% + {% + \glsxtrpostdescription + \@glsxtr@org@postdescription + }% + {}% + }% + }% + {}% + \glossxtrsetpopts + }% +} +{} +\newcommand*{\glsxtrpostdescription}{% + \csuse{glsxtrpostdesc\glscategory{\glscurrententrylabel}}% +} +\newcommand*{\glsxtrpostdescgeneral}{} +\newcommand*{\glsxtrpostdescterm}{} +\newcommand*{\glsxtrpostdescacronym}{} +\newcommand*{\glsxtrpostdescabbreviation}{} +\newcommand*{\glsdefpostdesc}[2]{% + \csdef{glsxtrpostdesc#1}{#2}% +} +\renewcommand*{\glspostlinkhook}{% + \ifglsentryexists{\glslabel}{\glsxtrpostlinkhook}{}% +} +\newcommand*{\glsxtrpostlinkhook}{% + \glsxtrdiscardperiod{\glslabel}% + {\glsxtrpostlinkendsentence}% + {\glsxtrifcustomdiscardperiod + {\glsxtrifperiod{\glsxtrpostlinkendsentence}{\glsxtrpostlink}}% + {\glsxtrpostlink}% + }% +} +\newcommand*{\glsxtrifcustomdiscardperiod}[2]{#2} +\newcommand*{\glsxtrpostlink}{% + \csuse{glsxtrpostlink\glscategory{\glslabel}}% +} +\newcommand*{\glsdefpostlink}[2]{% + \ifthenelse{\equal{#1}{}}% + {\PackageError{glossaries-extra} + {Invalid empty category label in \string\glsdefpostlink}{}}% + {\csdef{glsxtrpostlink#1}{#2}}% +} +\newcommand*{\glsxtrpostlinkendsentence}{% + \ifcsdef{glsxtrpostlink\glscategory{\glslabel}} + {% + \csuse{glsxtrpostlink\glscategory{\glslabel}}% + .\spacefactor\sfcode`\. \relax + }% + {% + \spacefactor\sfcode`\. \relax + }% +} +\newcommand*{\glsxtrpostlinkAddDescOnFirstUse}{% + \glsxtrifwasfirstuse{\space\glsxtrparen{\glsaccessdesc{\glslabel}}}{}% +} +\newcommand*{\glsxtrpostlinkAddSymbolOnFirstUse}{% + \glsxtrifwasfirstuse + {% + \ifglshassymbol{\glslabel}% + {\space\glsxtrparen{\glsaccesssymbol{\glslabel}}}% + {}% + }% + {}% +} +\newcommand*{\glsxtrpostlinkAddSymbolDescOnFirstUse}{% + \glsxtrifwasfirstuse + {% + \space\glsxtrparen + {% + \ifglshassymbol{\glslabel}% + {\glsaccesssymbol{\glslabel}, }% + {}% + \glsaccessdesc{\glslabel}% + }% + }% + {}% +} +\newcommand*{\glsxtrdiscardperiod}[3]{% + \glsxtrifwasfirstuse + {% + \glsifattribute{#1}{retainfirstuseperiod}{true}% + {#3}% + {% + \glsifattribute{#1}{discardperiod}{true}% + {% + \glsifplural + {% + \glsifattribute{#1}{pluraldiscardperiod}{true}% + {\glsxtrifperiod{#2}{#3}}% + {#3}% + }% + {% + \glsxtrifperiod{#2}{#3}% + }% + }% + {#3}% + }% + }% + {% + \glsifattribute{#1}{discardperiod}{true}% + {% + \glsifplural + {% + \glsifattribute{#1}{pluraldiscardperiod}{true}% + {\glsxtrifperiod{#2}{#3}}% + {#3}% + }% + {% + \glsxtrifperiod{#2}{#3}% + }% + }% + {#3}% + }% +} +\newcommand*{\glsxtrifperiod}[1]{\new@ifnextchar.{\@firstoftwo{#1}}} +\newcommand*{\glsxtr@punclist}{.,:;?!} +\newcommand*{\glsxtraddpunctuationmark}[1]{\appto\glsxtr@punclist{#1}} +\newcommand*{\glsxtrsetpunctuationmarks}[1]{\def\glsxtr@punclist{#1}} +\newcommand*{\glsxtrifnextpunc}[2]{% + \def\reserved@a{#1}% + \def\reserved@b{#2}% + \futurelet\@glspunc@token\glsxtr@ifnextpunc +} +\newcommand*{\glsxtr@ifnextpunc}{% + \glsxtr@ifpunctoken{\@glspunc@token}{\let\reserved@b\reserved@a}{}% + \reserved@b +} +\newcommand*{\glsxtr@ifpunctoken}[1]{% + \expandafter\@glsxtr@ifpunctoken\expandafter#1\glsxtr@punclist\@nnil +} +\def\@glsxtr@ifpunctoken#1#2{% + \let\reserved@d=#2% + \ifx\reserved@d\@nnil + \let\glsxtr@next\@glsxtr@notfoundinlist + \else + \ifx#1\reserved@d + \let\glsxtr@next\@glsxtr@foundinlist + \else + \let\glsxtr@next\@glsxtr@ifpunctoken + \fi + \fi + \glsxtr@next#1% +} +\def\@glsxtr@foundinlist#1\@nnil{\@firstoftwo} +\def\@glsxtr@notfoundinlist#1{\@secondoftwo} +\newcommand{\glsxtrdopostpunc}[1]{% + \glsxtrifnextpunc{\@glsxtr@swaptwo{#1}}{#1}% +} +\newcommand{\@glsxtr@swaptwo}[2]{#2#1} +\define@key{glsxtrabbrv}{category}{% + \protected@edef\glscategorylabel{#1}% +} +\define@key{glsxtrabbrv}{shortplural}{% + \def\@gls@shortpl{#1}% +} +\define@key{glsxtrabbrv}{longplural}{% + \def\@gls@longpl{#1}% +} +\newtoks\glsshortpltok +\newtoks\glslongpltok +\newcommand*{\@glsxtr@insertdots}[2]{% + \def#1{}% + \@glsxtr@insert@dots#1#2\@nnil +} +\newcommand*{\@glsxtr@insert@dots}[2]{% + \ifx\@nnil#2\relax + \let\@glsxtr@insert@dots@next\@gobble + \else + \ifx\relax#2\relax + \else + \appto#1{#2.}% + \fi + \let\@glsxtr@insert@dots@next\@glsxtr@insert@dots + \fi + \@glsxtr@insert@dots@next#1% +} +\newcommand*{\glsxtrwordsep}{\space} +\newcommand*{\glsxtrword}[1]{#1} +\newcommand*{\@glsxtr@markwordseps}[2]{% + \def#1{}% + \@glsxtr@mark@wordseps#1#2 \@nnil +} +\def\@glsxtr@mark@wordseps#1#2 #3{% + \ifdefempty{#1}% + {\def#1{\protect\glsxtrword{#2}}}% + {\appto#1{\protect\glsxtrwordsep\protect\glsxtrword{#2}}}% + \ifx\@nnil#3\relax + \let\@glsxtr@mark@wordseps@next\relax + \else + \def\@glsxtr@mark@wordseps@next{% + \@glsxtr@mark@wordseps#1#3}% + \fi + \@glsxtr@mark@wordseps@next +} +\newcommand*{\newabbreviation}[4][]{% + \glsxtr@newabbreviation{#1}{#2}{#3}{#4}% +} +\newcommand*{\glsxtr@newabbreviation}[4]{% + \glskeylisttok{#1}% + \glslabeltok{#2}% + \glsshorttok{#3}% + \glslongtok{#4}% + \def\glsxtrorgshort{#3}% + \def\glsxtrorglong{#4}% + \def\ExtraCustomAbbreviationFields{}% + \@gls@initaccesskeys + \def\glscategorylabel{abbreviation}% + \setkeys*{glsxtrabbrv}[shortplural,longplural]{#1}% + \ifcsdef{@glsabbrv@current@\glscategorylabel}% + {% + \let\@glsxtr@orgwarndep\GlsXtrWarnDeprecatedAbbrStyle + \let\GlsXtrWarnDeprecatedAbbrStyle\@gobbletwo + \glsxtr@applyabbrvstyle{\csname @glsabbrv@current@\glscategorylabel\endcsname}% + \let\GlsXtrWarnDeprecatedAbbrStyle\@glsxtr@orgwarndep + }% + {% + \glsxtr@applyabbrvstyle{\@glsabbrv@current@abbreviation}% + }% + \def\@gls@longpl{#4\glspluralsuffix}% + \let\@gls@default@longpl\@gls@longpl + \glsifcategoryattribute{\glscategorylabel}{markwords}{true}% + {% + \@glsxtr@markwordseps\@gls@long{#4}% + \expandafter\def\expandafter\@gls@longpl\expandafter + {\@gls@long\glspluralsuffix}% + \let\@gls@default@longpl\@gls@longpl + \expandafter\glslongtok\expandafter{\@gls@long}% + }% + {}% + \glsifcategoryattribute{\glscategorylabel}{markshortwords}{true}% + {% + \@glsxtr@markwordseps\@gls@short{#3}% + }% + {% + \glsifcategoryattribute{\glscategorylabel}{insertdots}{true}% + {% + \@glsxtr@insertdots\@gls@short{#3}% + \appto\@gls@short{\@}% + }% + {\def\@gls@short{#3}}% + }% + \glsifcategoryattribute{\glscategorylabel}{aposplural}{true}% + {% + \expandafter\def\expandafter\@gls@shortpl\expandafter{\@gls@short + '\abbrvpluralsuffix}% + }% + {% + \glsifcategoryattribute{\glscategorylabel}{noshortplural}{true}% + {% + \let\@gls@shortpl\@gls@short + }% + {% + \expandafter\def\expandafter\@gls@shortpl\expandafter{\@gls@short + \abbrvpluralsuffix}% + }% + }% + \expandafter\glsshorttok\expandafter{\@gls@short}% + \glsxtrnewabbrevpresetkeyhook{#1}{#2}{#3}% + \setkeys*{glsxtrabbrv}[category]{#1}% + \let\@gls@org@longpl\@gls@longpl + \let\@gls@org@shortpl\@gls@shortpl + \ifx\@gls@default@longpl\@gls@longpl + \else + \glsifcategoryattribute{\glscategorylabel}{markwords}{true}% + {% + \expandafter\@glsxtr@markwordseps\expandafter\@gls@longpl\expandafter + {\@gls@longpl}% + }% + {}% + \fi + \expandafter\glsshortpltok\expandafter{\@gls@shortpl}% + \expandafter\glslongpltok\expandafter{\@gls@longpl}% + \@gls@setup@default@access + \newabbreviationhook + \protected@edef\@do@newglossaryentry{% + \noexpand\newglossaryentry{\the\glslabeltok}% + {% + type=\glsxtrabbrvtype,% + category=abbreviation,% + short={\the\glsshorttok},% + shortplural={\the\glsshortpltok},% + long={\the\glslongtok},% + longplural={\the\glslongpltok},% + name={\the\glsshorttok},% + \CustomAbbreviationFields,% + \ExtraCustomAbbreviationFields + \the\glskeylisttok + }% + }% + \@do@newglossaryentry + \@glsxtr@addabbreviationlist{\glsentrytype{\the\glslabeltok}}% + \GlsXtrPostNewAbbreviation +} +\newcommand*{\glsxtrnewabbrevpresetkeyhook}[3]{} +\newcommand*{\GlsXtrPostNewAbbreviation}{} +\newcommand*{\newabbreviationhook}{} +\newcommand*{\CustomAbbreviationFields}{} +\newcommand*{\glsxtrparen}[1]{(#1)} +\newcommand*{\glsxtrfullformat}[2]{% + \glsfirstlongfont{\glsaccesslong{#1}}#2\glsxtrfullsep{#1}% + \glsxtrparen{\protect\glsfirstabbrvfont{\glsaccessshort{#1}}}% +} +\newcommand*{\Glsxtrfullformat}[2]{% + \glsfirstlongfont{\Glsaccesslong{#1}}#2\glsxtrfullsep{#1}% + \glsxtrparen{\protect\glsfirstabbrvfont{\glsaccessshort{#1}}}% +} +\newcommand*{\glsxtrfullplformat}[2]{% + \glsfirstlongfont{\glsaccesslongpl{#1}}#2\glsxtrfullsep{#1}% + \glsxtrparen{\protect\glsfirstabbrvfont{\glsaccessshortpl{#1}}}% +} +\newcommand*{\Glsxtrfullplformat}[2]{% + \glsfirstlongfont{\Glsaccesslongpl{#1}}#2\glsxtrfullsep{#1}% + \glsxtrparen{\protect\glsfirstabbrvfont{\glsaccessshortpl{#1}}}% +} +\newcommand*{\glsxtrfullsep}[1]{\space} +\newcommand*{\glsxtrinlinefullformat}{\glsxtrfullformat} +\newcommand*{\Glsxtrinlinefullformat}{\Glsxtrfullformat} +\newcommand*{\glsxtrinlinefullplformat}{\glsxtrfullplformat} +\newcommand*{\Glsxtrinlinefullplformat}{\Glsxtrfullplformat} +\renewcommand*{\glsentryfull}[1]{\glsxtrinlinefullformat{#1}{}} +\renewcommand*{\Glsentryfull}[1]{\Glsxtrinlinefullformat{#1}{}} +\renewcommand*{\glsentryfullpl}[1]{\glsxtrinlinefullplformat{#1}{}} +\renewcommand*{\Glsentryfullpl}[1]{\Glsxtrinlinefullplformat{#1}{}} +\newcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvdefaultfont{#1}} +\newcommand*{\glsfirstabbrvdefaultfont}[1]{\glsabbrvdefaultfont{#1}} +\newcommand*{\glsabbrvfont}[1]{\glsabbrvdefaultfont{#1}} +\newcommand*{\glsabbrvdefaultfont}[1]{#1} +\newcommand*{\glslongfont}[1]{\glslongdefaultfont{#1}} +\newcommand*{\glslongdefaultfont}[1]{#1} +\newcommand*{\glsfirstlongfont}[1]{\glslongfont{#1}} +\newcommand*{\glsfirstlongdefaultfont}[1]{\glslongdefaultfont{#1}} +\newcommand*{\glsxtrabbrvpluralsuffix}{\glspluralsuffix} +\newcommand*{\abbrvpluralsuffix}{\glsxtrabbrvpluralsuffix} +\newrobustcmd*{\glsxtrfull}{\@gls@hyp@opt\ns@glsxtrfull} +\newcommand*\ns@glsxtrfull[2][]{% + \new@ifnextchar[{\@glsxtr@full{#1}{#2}}% + {\@glsxtr@full{#1}{#2}[]}% +} +\def\@glsxtr@full#1#2[#3]{% + \@glsxtr@record{#1}{#2}{glslink}% + \glsdoifexists{#2}% + {% + \glssetabbrvfmt{\glscategory{#2}}% + \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsifplural\@secondoftwo + \let\glscapscase\@firstofthree + \let\glsinsert\@empty + \def\glscustomtext{\glsxtrinlinefullformat{#2}{#3}}% + \glsxtrsetupfulldefs + \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% + }% + \glspostlinkhook +} +\newcommand*{\glsxtrsetupfulldefs}{% + \let\glsxtrifwasfirstuse\@firstoftwo +} +\newrobustcmd*{\Glsxtrfull}{\@gls@hyp@opt\ns@Glsxtrfull} +\newcommand*\ns@Glsxtrfull[2][]{% + \new@ifnextchar[{\@Glsxtr@full{#1}{#2}}% + {\@Glsxtr@full{#1}{#2}[]}% +} +\def\@Glsxtr@full#1#2[#3]{% + \glsdoifexists{#2}% + {% + \glssetabbrvfmt{\glscategory{#2}}% + \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsifplural\@secondoftwo + \let\glscapscase\@secondofthree + \let\glsinsert\@empty + \def\glscustomtext{\Glsxtrinlinefullformat{#2}{#3}}% + \glsxtrsetupfulldefs + \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% + }% + \glspostlinkhook +} +\newrobustcmd*{\GLSxtrfull}{\@gls@hyp@opt\ns@GLSxtrfull} +\newcommand*\ns@GLSxtrfull[2][]{% + \new@ifnextchar[{\@GLSxtr@full{#1}{#2}}% + {\@GLSxtr@full{#1}{#2}[]}% +} +\def\@GLSxtr@full#1#2[#3]{% + \glsdoifexists{#2}% + {% + \glssetabbrvfmt{\glscategory{#2}}% + \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsifplural\@secondoftwo + \let\glscapscase\@thirdofthree + \let\glsinsert\@empty + \def\glscustomtext{\mfirstucMakeUppercase{\glsxtrinlinefullformat{#2}{#3}}}% + \glsxtrsetupfulldefs + \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% + }% + \glspostlinkhook +} +\newrobustcmd*{\glsxtrfullpl}{\@gls@hyp@opt\ns@glsxtrfullpl} +\newcommand*\ns@glsxtrfullpl[2][]{% + \new@ifnextchar[{\@glsxtr@fullpl{#1}{#2}}% + {\@glsxtr@fullpl{#1}{#2}[]}% +} +\def\@glsxtr@fullpl#1#2[#3]{% + \@glsxtr@record{#1}{#2}{glslink}% + \glsdoifexists{#2}% + {% + \glssetabbrvfmt{\glscategory{#2}}% + \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsifplural\@firstoftwo + \let\glscapscase\@firstofthree + \let\glsinsert\@empty + \def\glscustomtext{\glsxtrinlinefullplformat{#2}{#3}}% + \glsxtrsetupfulldefs + \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% + }% + \glspostlinkhook +} +\newrobustcmd*{\Glsxtrfullpl}{\@gls@hyp@opt\ns@Glsxtrfullpl} +\newcommand*\ns@Glsxtrfullpl[2][]{% + \new@ifnextchar[{\@Glsxtr@fullpl{#1}{#2}}% + {\@Glsxtr@fullpl{#1}{#2}[]}% +} +\def\@Glsxtr@fullpl#1#2[#3]{% + \@glsxtr@record{#1}{#2}{glslink}% + \glsdoifexists{#2}% + {% + \glssetabbrvfmt{\glscategory{#2}}% + \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsifplural\@firstoftwo + \let\glscapscase\@secondofthree + \let\glsinsert\@empty + \def\glscustomtext{\Glsxtrinlinefullplformat{#2}{#3}}% + \glsxtrsetupfulldefs + \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% + }% + \glspostlinkhook +} +\newrobustcmd*{\GLSxtrfullpl}{\@gls@hyp@opt\ns@GLSxtrfullpl} +\newcommand*\ns@GLSxtrfullpl[2][]{% + \new@ifnextchar[{\@GLSxtr@fullpl{#1}{#2}}% + {\@GLSxtr@fullpl{#1}{#2}[]}% +} +\def\@GLSxtr@fullpl#1#2[#3]{% + \@glsxtr@record{#1}{#2}{glslink}% + \glsdoifexists{#2}% + {% + \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsifplural\@firstoftwo + \let\glscapscase\@thirdofthree + \let\glsinsert\@empty + \def\glscustomtext{% + \mfirstucMakeUppercase{\glsxtrinlinefullplformat{#2}{#3}}}% + \glsxtrsetupfulldefs + \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% + }% + \glspostlinkhook +} +\newrobustcmd*{\glsxtrshort}{\@gls@hyp@opt\ns@glsxtrshort} +\newcommand*{\ns@glsxtrshort}[2][]{% + \new@ifnextchar[{\@glsxtrshort{#1}{#2}}{\@glsxtrshort{#1}{#2}[]}% +} +\def\@glsxtrshort#1#2[#3]{% + \@glsxtr@record{#1}{#2}{glslink}% + \glsdoifexists{#2}% + {% + \glssetabbrvfmt{\glscategory{#2}}% + \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsxtrifwasfirstuse\@secondoftwo + \let\glsifplural\@secondoftwo + \let\glscapscase\@firstofthree + \let\glsinsert\@empty + \def\glscustomtext{% + \glsabbrvfont{\glsaccessshort{#2}\ifglsxtrinsertinside#3\fi}% + \ifglsxtrinsertinside\else#3\fi + }% + \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% + }% + \glspostlinkhook +} +\newrobustcmd*{\Glsxtrshort}{\@gls@hyp@opt\ns@Glsxtrshort} +\newcommand*{\ns@Glsxtrshort}[2][]{% + \new@ifnextchar[{\@Glsxtrshort{#1}{#2}}{\@Glsxtrshort{#1}{#2}[]}% +} +\def\@Glsxtrshort#1#2[#3]{% + \@glsxtr@record{#1}{#2}{glslink}% + \glsdoifexists{#2}% + {% + \glssetabbrvfmt{\glscategory{#2}}% + \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsxtrifwasfirstuse\@secondoftwo + \let\glsifplural\@secondoftwo + \let\glscapscase\@secondofthree + \let\glsinsert\@empty + \def\glscustomtext{% + \glsabbrvfont{\Glsaccessshort{#2}\ifglsxtrinsertinside#3\fi}% + \ifglsxtrinsertinside\else#3\fi + }% + \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% + }% + \glspostlinkhook +} +\newrobustcmd*{\GLSxtrshort}{\@gls@hyp@opt\ns@GLSxtrshort} +\newcommand*{\ns@GLSxtrshort}[2][]{% + \new@ifnextchar[{\@GLSxtrshort{#1}{#2}}{\@GLSxtrshort{#1}{#2}[]}% +} +\def\@GLSxtrshort#1#2[#3]{% + \@glsxtr@record{#1}{#2}{glslink}% + \glsdoifexists{#2}% + {% + \glssetabbrvfmt{\glscategory{#2}}% + \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsxtrifwasfirstuse\@secondoftwo + \let\glsifplural\@secondoftwo + \let\glscapscase\@thirdofthree + \let\glsinsert\@empty + \def\glscustomtext{% + \mfirstucMakeUppercase + {\glsabbrvfont{\glsaccessshort{#2}\ifglsxtrinsertinside#3\fi}% + \ifglsxtrinsertinside\else#3\fi + }% + }% + \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% + }% + \glspostlinkhook +} +\newrobustcmd*{\glsxtrlong}{\@gls@hyp@opt\ns@glsxtrlong} +\newcommand*{\ns@glsxtrlong}[2][]{% + \new@ifnextchar[{\@glsxtrlong{#1}{#2}}{\@glsxtrlong{#1}{#2}[]}% +} +\def\@glsxtrlong#1#2[#3]{% + \@glsxtr@record{#1}{#2}{glslink}% + \glsdoifexists{#2}% + {% + \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsxtrifwasfirstuse\@secondoftwo + \let\glsifplural\@secondoftwo + \let\glscapscase\@firstofthree + \let\glsinsert\@empty + \def\glscustomtext{% + \glslongfont{\glsaccesslong{#2}\ifglsxtrinsertinside#3\fi}% + \ifglsxtrinsertinside\else#3\fi + }% + \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% + }% + \glspostlinkhook +} +\newrobustcmd*{\Glsxtrlong}{\@gls@hyp@opt\ns@Glsxtrlong} +\newcommand*{\ns@Glsxtrlong}[2][]{% + \new@ifnextchar[{\@Glsxtrlong{#1}{#2}}{\@Glsxtrlong{#1}{#2}[]}% +} +\def\@Glsxtrlong#1#2[#3]{% + \@glsxtr@record{#1}{#2}{glslink}% + \glsdoifexists{#2}% + {% + \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsxtrifwasfirstuse\@secondoftwo + \let\glsifplural\@secondoftwo + \let\glscapscase\@secondofthree + \let\glsinsert\@empty + \def\glscustomtext{% + \glslongfont{\Glsaccesslong{#2}\ifglsxtrinsertinside#3\fi}% + \ifglsxtrinsertinside\else#3\fi + }% + \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% + }% + \glspostlinkhook +} +\newrobustcmd*{\GLSxtrlong}{\@gls@hyp@opt\ns@GLSxtrlong} +\newcommand*{\ns@GLSxtrlong}[2][]{% + \new@ifnextchar[{\@GLSxtrlong{#1}{#2}}{\@GLSxtrlong{#1}{#2}[]}% +} +\def\@GLSxtrlong#1#2[#3]{% + \@glsxtr@record{#1}{#2}{glslink}% + \glsdoifexists{#2}% + {% + \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsxtrifwasfirstuse\@secondoftwo + \let\glsifplural\@secondoftwo + \let\glscapscase\@thirdofthree + \let\glsinsert\@empty + \def\glscustomtext{% + \mfirstucMakeUppercase + {\glslongfont{\glsaccesslong{#2}\ifglsxtrinsertinside#3\fi}% + \ifglsxtrinsertinside\else#3\fi + }% + }% + \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% + }% + \glspostlinkhook +} +\newrobustcmd*{\glsxtrshortpl}{\@gls@hyp@opt\ns@glsxtrshortpl} +\newcommand*{\ns@glsxtrshortpl}[2][]{% + \new@ifnextchar[{\@glsxtrshortpl{#1}{#2}}{\@glsxtrshortpl{#1}{#2}[]}% +} +\def\@glsxtrshortpl#1#2[#3]{% + \@glsxtr@record{#1}{#2}{glslink}% + \glsdoifexists{#2}% + {% + \glssetabbrvfmt{\glscategory{#2}}% + \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsxtrifwasfirstuse\@secondoftwo + \let\glsifplural\@firstoftwo + \let\glscapscase\@firstofthree + \let\glsinsert\@empty + \def\glscustomtext{% + \glsabbrvfont{\glsaccessshortpl{#2}\ifglsxtrinsertinside#3\fi}% + \ifglsxtrinsertinside\else#3\fi + }% + \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% + }% + \glspostlinkhook +} +\newrobustcmd*{\Glsxtrshortpl}{\@gls@hyp@opt\ns@Glsxtrshortpl} +\newcommand*{\ns@Glsxtrshortpl}[2][]{% + \new@ifnextchar[{\@Glsxtrshortpl{#1}{#2}}{\@Glsxtrshortpl{#1}{#2}[]}% +} +\def\@Glsxtrshortpl#1#2[#3]{% + \@glsxtr@record{#1}{#2}{glslink}% + \glsdoifexists{#2}% + {% + \glssetabbrvfmt{\glscategory{#2}}% + \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsxtrifwasfirstuse\@secondoftwo + \let\glsifplural\@firstoftwo + \let\glscapscase\@secondofthree + \let\glsinsert\@empty + \def\glscustomtext{% + \glsabbrvfont{\Glsaccessshortpl{#2}\ifglsxtrinsertinside#3\fi}% + \ifglsxtrinsertinside\else#3\fi + }% + \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% + }% + \glspostlinkhook +} +\newrobustcmd*{\GLSxtrshortpl}{\@gls@hyp@opt\ns@GLSxtrshortpl} +\newcommand*{\ns@GLSxtrshortpl}[2][]{% + \new@ifnextchar[{\@GLSxtrshortpl{#1}{#2}}{\@GLSxtrshortpl{#1}{#2}[]}% +} +\def\@GLSxtrshortpl#1#2[#3]{% + \@glsxtr@record{#1}{#2}{glslink}% + \glsdoifexists{#2}% + {% + \glssetabbrvfmt{\glscategory{#2}}% + \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsxtrifwasfirstuse\@secondoftwo + \let\glsifplural\@firstoftwo + \let\glscapscase\@thirdofthree + \let\glsinsert\@empty + \def\glscustomtext{% + \mfirstucMakeUppercase + {\glsabbrvfont{\glsaccessshortpl{#2}\ifglsxtrinsertinside#3\fi}% + \ifglsxtrinsertinside\else#3\fi + }% + }% + \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% + }% + \glspostlinkhook +} +\newrobustcmd*{\glsxtrlongpl}{\@gls@hyp@opt\ns@glsxtrlongpl} +\newcommand*{\ns@glsxtrlongpl}[2][]{% + \new@ifnextchar[{\@glsxtrlongpl{#1}{#2}}{\@glsxtrlongpl{#1}{#2}[]}% +} +\def\@glsxtrlongpl#1#2[#3]{% + \@glsxtr@record{#1}{#2}{glslink}% + \glsdoifexists{#2}% + {% + \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsxtrifwasfirstuse\@secondoftwo + \let\glsifplural\@firstoftwo + \let\glscapscase\@firstofthree + \let\glsinsert\@empty + \def\glscustomtext{% + \glslongfont{\glsaccesslongpl{#2}\ifglsxtrinsertinside#3\fi}% + \ifglsxtrinsertinside\else#3\fi + }% + \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% + }% + \glspostlinkhook +} +\newrobustcmd*{\Glsxtrlongpl}{\@gls@hyp@opt\ns@Glsxtrlongpl} +\newcommand*{\ns@Glsxtrlongpl}[2][]{% + \new@ifnextchar[{\@Glsxtrlongpl{#1}{#2}}{\@Glsxtrlongpl{#1}{#2}[]}% +} +\def\@Glsxtrlongpl#1#2[#3]{% + \@glsxtr@record{#1}{#2}{glslink}% + \glsdoifexists{#2}% + {% + \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsxtrifwasfirstuse\@secondoftwo + \let\glsifplural\@firstoftwo + \let\glscapscase\@secondofthree + \let\glsinsert\@empty + \def\glscustomtext{% + \glslongfont{\Glsaccesslongpl{#2}\ifglsxtrinsertinside#3\fi}% + \ifglsxtrinsertinside\else#3\fi + }% + \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% + }% + \glspostlinkhook +} +\newrobustcmd*{\GLSxtrlongpl}{\@gls@hyp@opt\ns@GLSxtrlongpl} +\newcommand*{\ns@GLSxtrlongpl}[2][]{% + \new@ifnextchar[{\@GLSxtrlongpl{#1}{#2}}{\@GLSxtrlongpl{#1}{#2}[]}% +} +\def\@GLSxtrlongpl#1#2[#3]{% + \@glsxtr@record{#1}{#2}{glslink}% + \glsdoifexists{#2}% + {% + \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper + \let\glsxtrifwasfirstuse\@secondoftwo + \let\glsifplural\@firstoftwo + \let\glscapscase\@thirdofthree + \let\glsinsert\@empty + \def\glscustomtext{% + \mfirstucMakeUppercase + {\glslongfont{\glsaccesslongpl{#2}\ifglsxtrinsertinside#3\fi}% + \ifglsxtrinsertinside\else#3\fi + }% + }% + \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}% + }% + \glspostlinkhook +} +\newcommand*{\glssetabbrvfmt}[1]{% + \ifcsdef{@glsabbrv@current@#1}% + {\glsxtr@applyabbrvfmt{\csname @glsabbrv@current@#1\endcsname}}% + {\glsxtr@applyabbrvfmt{\@glsabbrv@current@abbreviation}}% +} +\newrobustcmd*{\glsuseabbrvfont}[2]{{\glssetabbrvfmt{#2}\glsabbrvfont{#1}}} +\newrobustcmd*{\glsuselongfont}[2]{{\glssetabbrvfmt{#2}\glslongfont{#1}}} +\newcommand*{\glsxtrgenabbrvfmt}{% + \ifdefempty\glscustomtext + {% + \ifglsused\glslabel + {% + \glsifplural + {% + \glscapscase + {% + \glsxtrsubsequentplfmt{\glslabel}{\glsinsert}% + }% + {% + \Glsxtrsubsequentplfmt{\glslabel}{\glsinsert}% + }% + {% + \mfirstucMakeUppercase + {\glsxtrsubsequentplfmt{\glslabel}{\glsinsert}}% + }% + }% + {% + \glscapscase + {% + \glsxtrsubsequentfmt{\glslabel}{\glsinsert}% + }% + {% + \Glsxtrsubsequentfmt{\glslabel}{\glsinsert}% + }% + {% + \mfirstucMakeUppercase + {\glsxtrsubsequentfmt{\glslabel}{\glsinsert}}% + }% + }% + }% + {% + \glsifplural + {% + \glscapscase + {% + \glsxtrfullplformat{\glslabel}{\glsinsert}% + }% + {% + \Glsxtrfullplformat{\glslabel}{\glsinsert}% + }% + {% + \mfirstucMakeUppercase + {\glsxtrfullplformat{\glslabel}{\glsinsert}}% + }% + }% + {% + \glscapscase + {% + \glsxtrfullformat{\glslabel}{\glsinsert}% + }% + {% + \Glsxtrfullformat{\glslabel}{\glsinsert}% + }% + {% + \mfirstucMakeUppercase + {\glsxtrfullformat{\glslabel}{\glsinsert}}% + }% + }% + }% + }% + {% + \glscustomtext + }% +} +\newcommand*{\glsxtrsubsequentfmt}[2]{% + \glsabbrvfont{\glsaccessshort{#1}\ifglsxtrinsertinside #2\fi}% + \ifglsxtrinsertinside \else#2\fi +} +\let\glsxtrdefaultsubsequentfmt\glsxtrsubsequentfmt +\newcommand*{\glsxtrsubsequentplfmt}[2]{% + \glsabbrvfont{\glsaccessshortpl{#1}\ifglsxtrinsertinside #2\fi}% + \ifglsxtrinsertinside \else#2\fi +} +\let\glsxtrdefaultsubsequentplfmt\glsxtrsubsequentplfmt +\newcommand*{\Glsxtrsubsequentfmt}[2]{% + \glsabbrvfont{\Glsaccessshort{#1}\ifglsxtrinsertinside #2\fi}% + \ifglsxtrinsertinside \else#2\fi +} +\let\Glsxtrdefaultsubsequentfmt\Glsxtrsubsequentfmt +\newcommand*{\Glsxtrsubsequentplfmt}[2]{% + \glsabbrvfont{\Glsaccessshortpl{#1}\ifglsxtrinsertinside #2\fi}% + \ifglsxtrinsertinside \else#2\fi +} +\let\Glsxtrdefaultsubsequentplfmt\Glsxtrsubsequentplfmt +\newcommand*{\setabbreviationstyle}[2][abbreviation]{% + \ifcsundef{@glsabbrv@dispstyle@setup@#2} + {% + \PackageError{glossaries-extra}{Undefined abbreviation style `#2'}{}% + }% + {% + \ifcsstring{@glsabbrv@current@#1}{#2}% + {% + }% + {% + \def\@glsxtr@dostylewarn{}% + \glsforeachincategory{#1}{\@gls@type}{\@gls@label}% + {% + \def\@glsxtr@dostylewarn{\GlossariesWarning{Abbreviation + style has been switched \MessageBreak + for category `#1', \MessageBreak + but there have already been entries \MessageBreak + defined for this category. Unwanted \MessageBreak + side-effects may result}}% + \@endfortrue + }% + \@glsxtr@dostylewarn + \csdef{@glsabbrv@current@#1}{#2}% + \protected@edef\glscategorylabel{#1}% + \glsxtr@applyabbrvstyle{#2}% + }% + }% +} +\newcommand*{\glsxtr@applyabbrvstyle}[1]{% + \csuse{@glsabbrv@dispstyle@setup@#1}% + \csuse{@glsabbrv@dispstyle@fmts@#1}% +} +\newcommand*{\glsxtr@applyabbrvfmt}[1]{% + \csuse{@glsabbrv@dispstyle@fmts@#1}% +} +\newcommand*{\newabbreviationstyle}[3]{% + \ifcsdef{@glsabbrv@dispstyle@setup@#1} + {% + \PackageError{glossaries-extra}{Abbreviation style `#1' already + defined}{}% + }% + {% + \csdef{@glsabbrv@dispstyle@setup@#1}{% + \renewcommand*{\GlsXtrPostNewAbbreviation}{}% + #2}% + \csdef{@glsabbrv@dispstyle@fmts@#1}{% + \renewcommand*{\glsxtrinlinefullformat}{\glsxtrfullformat}% + \renewcommand*{\Glsxtrinlinefullformat}{\Glsxtrfullformat}% + \renewcommand*{\glsxtrinlinefullplformat}{\glsxtrfullplformat}% + \renewcommand*{\Glsxtrinlinefullplformat}{\Glsxtrfullplformat}% + \let\glsxtrsubsequentfmt\glsxtrdefaultsubsequentfmt + \let\glsxtrsubsequentplfmt\glsxtrdefaultsubsequentplfmt + \let\Glsxtrsubsequentfmt\Glsxtrdefaultsubsequentfmt + \let\Glsxtrsubsequentplfmt\Glsxtrdefaultsubsequentplfmt + #3}% + }% +} +\newcommand*{\renewabbreviationstyle}[3]{% + \ifcsundef{@glsabbrv@dispstyle@setup@#1} + {% + \PackageError{glossaries-extra}{Abbreviation style `#1' not defined}{}% + }% + {% + \csdef{@glsabbrv@dispstyle@setup@#1}{% + \renewcommand*{\GlsXtrPostNewAbbreviation}{}% + #2}% + \csdef{@glsabbrv@dispstyle@fmts@#1}{% + \renewcommand*{\glsxtrinlinefullformat}{\glsxtrfullformat}% + \renewcommand*{\Glsxtrinlinefullformat}{\Glsxtrfullformat}% + \renewcommand*{\glsxtrinlinefullplformat}{\glsxtrfullplformat}% + \renewcommand*{\Glsxtrinlinefullplformat}{\Glsxtrfullplformat}% + #3}% + }% +} +\newcommand*{\letabbreviationstyle}[2]{% + \csletcs{@glsabbrv@dispstyle@setup@#1}{@glsabbrv@dispstyle@setup@#2}% + \csletcs{@glsabbrv@dispstyle@fmts@#1}{@glsabbrv@dispstyle@fmts@#2}% +} +\newcommand*{\@glsxtr@deprecated@abbrstyle}[2]{% + \csdef{@glsabbrv@dispstyle@setup@#1}{% + \GlsXtrWarnDeprecatedAbbrStyle{#1}{#2}% + \csuse{@glsabbrv@dispstyle@setup@#2}% + }% + \csletcs{@glsabbrv@dispstyle@fmts@#1}{@glsabbrv@dispstyle@fmts@#2}% +} +\newcommand*{\GlsXtrWarnDeprecatedAbbrStyle}[2]{% + \GlossariesExtraWarning{Deprecated abbreviation style name `#1', + use `#2' instead}% +} +\newcommand*{\GlsXtrUseAbbrStyleSetup}[1]{% + \ifcsundef{@glsabbrv@dispstyle@setup@#1}% + {% + \PackageError{glossaries-extra}% + {Unknown abbreviation style definitions `#1'}{}% + }% + {% + \csname @glsabbrv@dispstyle@setup@#1\endcsname + }% +} +\newcommand*{\GlsXtrUseAbbrStyleFmts}[1]{% + \ifcsundef{@glsabbrv@dispstyle@fmts@#1}% + {% + \PackageError{glossaries-extra}% + {Unknown abbreviation style formats `#1'}{}% + }% + {% + \csname @glsabbrv@dispstyle@fmts@#1\endcsname + }% +} +\newif\ifglsxtrinsertinside +\glsxtrinsertinsidefalse +\newcommand*{\glsxtrlongshortname}{% + \protect\glsabbrvfont{\the\glsshorttok}% +} +\newabbreviationstyle{long-short}% +{% + \glsxtrAccSuppAbbrSetFirstLongAttrs\glscategorylabel + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrlongshortname}, + sort={\the\glsshorttok}, + first={\protect\glsfirstlongfont{\the\glslongtok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \glsxtrparen{\protect\glsfirstabbrvfont{\the\glsshorttok}}},% + firstplural={\protect\glsfirstlongfont{\the\glslongpltok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \glsxtrparen{\protect\glsfirstabbrvfont{\the\glsshortpltok}}},% + plural={\protect\glsabbrvfont{\the\glsshortpltok}},% + text={\protect\glsabbrvfont{\the\glsshorttok}},% + description={\the\glslongtok}}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% + \renewcommand*{\abbrvpluralsuffix}{\glsxtrabbrvpluralsuffix}% + \renewcommand*{\glsabbrvfont}[1]{\glsabbrvdefaultfont{##1}}% + \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvdefaultfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslongdefaultfont{##1}}% + \renewcommand*{\glsxtrfullformat}[2]{% + \glsfirstlongfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstabbrvfont{\glsaccessshort{##1}}}% + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsfirstlongfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstabbrvfont{\glsaccessshortpl{##1}}}% + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \glsfirstlongfont{\Glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstabbrvfont{\glsaccessshort{##1}}}% + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \glsfirstlongfont{\Glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstabbrvfont{\glsaccessshortpl{##1}}}% + }% +} +\setabbreviationstyle{long-short} +\newcommand*{\glsxtrlongshortdescsort}{% + \expandonce\glsxtrorglong\space (\expandonce\glsxtrorgshort)% +} +\newcommand*{\glsxtrlongshortdescname}{% + \protect\glslongfont{\the\glslongtok} + \glsxtrparen{\protect\glsabbrvfont{\the\glsshorttok}}% +} +\newabbreviationstyle{long-short-desc}% +{% + \glsxtrAccSuppAbbrSetTextShortAttrs\glscategorylabel + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrlongshortdescname}, + sort={\glsxtrlongshortdescsort},% + first={\protect\glsfirstlongfont{\the\glslongtok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \glsxtrparen{\protect\glsfirstabbrvfont{\the\glsshorttok}}},% + firstplural={\protect\glsfirstlongfont{\the\glslongpltok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \glsxtrparen{\protect\glsfirstabbrvfont{\the\glsshortpltok}}},% + text={\protect\glsabbrvfont{\the\glsshorttok}},% + plural={\protect\glsabbrvfont{\the\glsshortpltok}}% + }% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% + \GlsXtrUseAbbrStyleFmts{long-short}% +} +\newcommand*{\glsxtrshortlongname}{% + \protect\glsabbrvfont{\the\glsshorttok}% +} +\newabbreviationstyle{short-long}% +{% + \glsxtrAccSuppAbbrSetFirstLongAttrs\glscategorylabel + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrshortlongname}, + sort={\the\glsshorttok}, + description={\the\glslongtok},% + first={\protect\glsfirstabbrvfont{\the\glsshorttok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \glsxtrparen{\protect\glsfirstlongfont{\the\glslongtok}}},% + firstplural={\protect\glsfirstabbrvfont{\the\glsshortpltok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \glsxtrparen{\protect\glsfirstlongfont{\the\glslongpltok}}},% + text={\protect\glsabbrvfont{\the\glsshorttok}},% + plural={\protect\glsabbrvfont{\the\glsshortpltok}}}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% + \renewcommand*{\abbrvpluralsuffix}{\glsxtrabbrvpluralsuffix}% + \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}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongfont{\glsaccesslong{##1}}}% + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsfirstabbrvfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongfont{\glsaccesslongpl{##1}}}% + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \glsfirstabbrvfont{\Glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongfont{\glsaccesslong{##1}}}% + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \glsfirstabbrvfont{\Glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongfont{\glsaccesslongpl{##1}}}% + }% +} +\newcommand*{\glsxtrshortlongdescsort}{\the\glsshorttok} +\newcommand*{\glsxtrshortlongdescname}{% + \protect\glsabbrvfont{\the\glsshorttok} + \glsxtrparen{\protect\glslongfont{\the\glslongtok}}% +} +\newabbreviationstyle{short-long-desc}% +{% + \glsxtrAccSuppAbbrSetTextShortAttrs\glscategorylabel + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrshortlongdescname}, + sort={\glsxtrshortlongdescsort}, + first={\protect\glsfirstabbrvfont{\the\glsshorttok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \glsxtrparen{\protect\glsfirstlongfont{\the\glslongtok}}},% + firstplural={\protect\glsfirstabbrvfont{\the\glsshortpltok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \glsxtrparen{\protect\glsfirstlongfont{\the\glslongpltok}}},% + text={\protect\glsabbrvfont{\the\glsshorttok}},% + plural={\protect\glsabbrvfont{\the\glsshortpltok}}% + }% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% + \GlsXtrUseAbbrStyleFmts{short-long}% +} +\newcommand*{\glsfirstlongfootnotefont}[1]{\glslongfootnotefont{#1}}% +\newcommand*{\glslongfootnotefont}[1]{\glslongdefaultfont{#1}}% +\newcommand*{\glsxtrabbrvfootnote}[2]{\footnote{#2}} +\newcommand*{\glsxtrfootnotename}{% + \protect\glsabbrvfont{\the\glsshorttok}% +} +\newabbreviationstyle{footnote}% +{% + \glsxtrAccSuppAbbrSetNoLongAttrs\glscategorylabel + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrfootnotename}, + sort={\the\glsshorttok}, + description={\the\glslongtok},% + first={\protect\glsfirstabbrvfont{\the\glsshorttok}% + \protect\glsxtrabbrvfootnote{\the\glslabeltok}% + {\protect\glsfirstlongfootnotefont{\the\glslongtok}}},% + firstplural={\protect\glsfirstabbrvfont{\the\glsshortpltok}% + \protect\glsxtrabbrvfootnote{\the\glslabeltok}% + {\protect\glsfirstlongfootnotefont{\the\glslongpltok}}},% + text={\protect\glsabbrvfont{\the\glsshorttok}},% + plural={\protect\glsabbrvfont{\the\glsshortpltok}}}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glssetattribute{\the\glslabeltok}{nohyperfirst}{true}% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% + \renewcommand*{\abbrvpluralsuffix}{\glsxtrabbrvpluralsuffix}% + \renewcommand*\glsabbrvfont[1]{\glsabbrvdefaultfont{##1}}% + \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvdefaultfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongfootnotefont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslongfootnotefont{##1}}% + \renewcommand*{\glsxtrfullformat}[2]{% + \glsfirstabbrvfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \protect\glsxtrabbrvfootnote{##1}% + {\glsfirstlongfootnotefont{\glsaccesslong{##1}}}% + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsfirstabbrvfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \protect\glsxtrabbrvfootnote{##1}% + {\glsfirstlongfootnotefont{\glsaccesslongpl{##1}}}% + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \glsfirstabbrvfont{\Glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \protect\glsxtrabbrvfootnote{##1}% + {\glsfirstlongfootnotefont{\glsaccesslong{##1}}}% + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \glsfirstabbrvfont{\Glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \protect\glsxtrabbrvfootnote{##1}% + {\glsfirstlongfootnotefont{\glsaccesslongpl{##1}}}% + }% + \renewcommand*{\glsxtrinlinefullformat}[2]{% + \glsfirstabbrvfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongfootnotefont{\glsaccesslong{##1}}}% + }% + \renewcommand*{\glsxtrinlinefullplformat}[2]{% + \glsfirstabbrvfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongfootnotefont{\glsaccesslongpl{##1}}}% + }% + \renewcommand*{\Glsxtrinlinefullformat}[2]{% + \glsfirstabbrvfont{\Glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongfootnotefont{\glsaccesslong{##1}}}% + }% + \renewcommand*{\Glsxtrinlinefullplformat}[2]{% + \glsfirstabbrvfont{\Glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongfootnotefont{\glsaccesslongpl{##1}}}% + }% +} +\letabbreviationstyle{short-footnote}{footnote} +\newcommand*{\glsxtrfootnotedescname}{% + \protect\glsabbrvfont{\the\glsshorttok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \protect\glsxtrparen{\protect\glslongfont{\the\glslongtok}}% +} +\newcommand*{\glsxtrfootnotedescsort}{\the\glsshorttok} +\newabbreviationstyle{short-footnote-desc}% +{% + \glsxtrAccSuppAbbrSetNameLongAttrs\glscategorylabel + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrfootnotedescname}, + sort={\glsxtrfootnotedescsort}, + first={\protect\glsfirstabbrvfont{\the\glsshorttok}% + \protect\glsxtrabbrvfootnote{\the\glslabeltok}% + {\protect\glsfirstlongfootnotefont{\the\glslongtok}}},% + firstplural={\protect\glsfirstabbrvfont{\the\glsshortpltok}% + \protect\glsxtrabbrvfootnote{\the\glslabeltok}% + {\protect\glsfirstlongfootnotefont{\the\glslongpltok}}},% + text={\protect\glsabbrvfont{\the\glsshorttok}},% + plural={\protect\glsabbrvfont{\the\glsshortpltok}}}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glssetattribute{\the\glslabeltok}{nohyperfirst}{true}% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% + \GlsXtrUseAbbrStyleFmts{footnote}% +} +\letabbreviationstyle{footnote-desc}{short-footnote-desc} +\newabbreviationstyle{postfootnote}% +{% + \glsxtrAccSuppAbbrSetNoLongAttrs\glscategorylabel + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrfootnotename}, + sort={\the\glsshorttok}, + description={\the\glslongtok},% + first={\protect\glsfirstabbrvfont{\the\glsshorttok}},% + firstplural={\protect\glsfirstabbrvfont{\the\glsshortpltok}},% + text={\protect\glsabbrvfont{\the\glsshorttok}},% + plural={\protect\glsabbrvfont{\the\glsshortpltok}}}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \csdef{glsxtrpostlink\glscategorylabel}{% + \glsxtrifwasfirstuse + {% + \glsxtrdopostpunc{\protect\glsxtrabbrvfootnote{\glslabel}% + {\glsfirstlongfootnotefont{\glsentrylong{\glslabel}}}}% + }% + {}% + }% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% + \renewcommand*{\glsxtrsetupfulldefs}{% + \let\glsxtrifwasfirstuse\@secondoftwo + }% +}% +{% + \renewcommand*{\abbrvpluralsuffix}{\glsxtrabbrvpluralsuffix}% + \renewcommand*\glsabbrvfont[1]{\glsabbrvdefaultfont{##1}}% + \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvdefaultfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongfootnotefont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslongfootnotefont{##1}}% + \renewcommand*{\glsxtrfullformat}[2]{% + \glsfirstabbrvfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsfirstabbrvfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \glsfirstabbrvfont{\Glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \glsfirstabbrvfont{\Glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\glsxtrinlinefullformat}[2]{% + \glsfirstabbrvfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongfootnotefont{\glsaccesslong{##1}}}% + }% + \renewcommand*{\glsxtrinlinefullplformat}[2]{% + \glsfirstabbrvfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongfootnotefont{\glsaccesslongpl{##1}}}% + }% + \renewcommand*{\Glsxtrinlinefullformat}[2]{% + \glsfirstabbrvfont{\Glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongfootnotefont{\glsaccesslong{##1}}}% + }% + \renewcommand*{\Glsxtrinlinefullplformat}[2]{% + \glsfirstabbrvfont{\Glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongfootnotefont{\glsaccesslongpl{##1}}}% + }% +} +\letabbreviationstyle{short-postfootnote}{postfootnote} +\newabbreviationstyle{short-postfootnote-desc}% +{% + \glsxtrAccSuppAbbrSetNameLongAttrs\glscategorylabel + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrfootnotedescname}, + sort={\glsxtrfootnotedescsort}, + first={\protect\glsfirstabbrvfont{\the\glsshorttok}},% + firstplural={\protect\glsfirstabbrvfont{\the\glsshortpltok}},% + text={\protect\glsabbrvfont{\the\glsshorttok}},% + plural={\protect\glsabbrvfont{\the\glsshortpltok}}}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \csdef{glsxtrpostlink\glscategorylabel}{% + \glsxtrifwasfirstuse + {% + \glsxtrdopostpunc{\protect\glsxtrabbrvfootnote{\glslabel}% + {\glsfirstlongfootnotefont{\glsentrylong{\glslabel}}}}% + }% + {}% + }% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% + \renewcommand*{\glsxtrsetupfulldefs}{% + \let\glsxtrifwasfirstuse\@secondoftwo + }% +}% +{% + \GlsXtrUseAbbrStyleFmts{postfootnote}% +} +\letabbreviationstyle{postfootnote-desc}{short-postfootnote-desc} +\newcommand*{\glsxtrshortnolongname}{% + \protect\glsabbrvfont{\the\glsshorttok}% +} +\newabbreviationstyle{short}% +{% + \glsxtrAccSuppAbbrSetNoLongAttrs\glscategorylabel + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrshortnolongname}, + sort={\the\glsshorttok}, + first={\protect\glsfirstabbrvfont{\the\glsshorttok}}, + firstplural={\protect\glsfirstabbrvfont{\the\glsshortpltok}}, + text={\protect\glsabbrvfont{\the\glsshorttok}}, + plural={\protect\glsabbrvfont{\the\glsshortpltok}}, + description={\the\glslongtok}}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glssetattribute{\the\glslabeltok}{regular}{true}}% +}% +{% + \renewcommand*{\abbrvpluralsuffix}{\glsxtrabbrvpluralsuffix}% + \renewcommand*\glsabbrvfont[1]{\glsabbrvdefaultfont{##1}}% + \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvdefaultfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslongdefaultfont{##1}}% + \renewcommand*{\glsxtrinlinefullformat}[2]{% + \protect\glsfirstabbrvfont{\glsaccessshort{##1}% + \ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongfont{\glsaccesslong{##1}}}% + }% + \renewcommand*{\glsxtrinlinefullplformat}[2]{% + \protect\glsfirstabbrvfont{\glsaccessshortpl{##1}% + \ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongfont{\glsaccesslongpl{##1}}}% + }% + \renewcommand*{\Glsxtrinlinefullformat}[2]{% + \protect\glsfirstabbrvfont{\glsaccessshort{##1}% + \ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongfont{\Glsaccesslong{##1}}}% + }% + \renewcommand*{\Glsxtrinlinefullplformat}[2]{% + \protect\glsfirstabbrvfont{\glsaccessshortpl{##1}% + \ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongfont{\Glsaccesslongpl{##1}}}% + }% + \renewcommand*{\glsxtrfullformat}[2]{% + \glsfirstabbrvfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsfirstabbrvfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \glsfirstabbrvfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \glsfirstabbrvfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% +} +\setabbreviationstyle[acronym]{short} +\letabbreviationstyle{short-nolong}{short} +\newabbreviationstyle{short-nolong-noreg}% +{% + \GlsXtrUseAbbrStyleSetup{short-nolong}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% + \GlsXtrUseAbbrStyleFmts{short-nolong}% +} +\newcommand*{\glsxtrshortdescname}{% + \protect\glsabbrvfont{\the\glsshorttok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \protect\glsxtrparen{\protect\glslongfont{\the\glslongtok}}% +} +\newabbreviationstyle{short-desc}% +{% + \glsxtrAccSuppAbbrSetNoLongAttrs\glscategorylabel + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrshortdescname}, + sort={\the\glsshorttok}, + first={\protect\glsfirstabbrvfont{\the\glsshorttok}}, + firstplural={\protect\glsfirstabbrvfont{\the\glsshortpltok}}, + text={\protect\glsabbrvfont{\the\glsshorttok}}, + plural={\protect\glsabbrvfont{\the\glsshortpltok}}}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glssetattribute{\the\glslabeltok}{regular}{true}}% +}% +{% + \renewcommand*{\abbrvpluralsuffix}{\glsxtrabbrvpluralsuffix}% + \renewcommand*\glsabbrvfont[1]{\glsabbrvdefaultfont{##1}}% + \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvdefaultfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslongdefaultfont{##1}}% + \renewcommand*{\glsxtrinlinefullformat}[2]{% + \glsfirstabbrvfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongfont{\glsaccesslong{##1}}}% + }% + \renewcommand*{\glsxtrinlinefullplformat}[2]{% + \glsfirstabbrvfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongfont{\glsaccesslongpl{##1}}}% + }% + \renewcommand*{\Glsxtrinlinefullformat}[2]{% + \glsfirstabbrvfont{\Glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongfont{\glsaccesslong{##1}}}% + }% + \renewcommand*{\Glsxtrinlinefullplformat}[2]{% + \glsfirstabbrvfont{\Glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongfont{\glsaccesslongpl{##1}}}% + }% + \renewcommand*{\glsxtrfullformat}[2]{% + \glsfirstabbrvfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsfirstabbrvfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \glsfirstabbrvfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \glsfirstabbrvfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% +} +\letabbreviationstyle{short-nolong-desc}{short-desc} +\newabbreviationstyle{short-nolong-desc-noreg}% +{% + \GlsXtrUseAbbrStyleSetup{short-nolong-desc}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% + \GlsXtrUseAbbrStyleFmts{short-nolong-desc}% +} +\newabbreviationstyle{nolong-short}% +{% + \GlsXtrUseAbbrStyleSetup{short-nolong}% +}% +{% + \GlsXtrUseAbbrStyleFmts{short-nolong}% + \renewcommand*{\glsxtrinlinefullformat}[2]{% + \protect\glsfirstlongfont{\glsaccesslong{##1}% + \ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstabbrvfont{\glsaccessshort{##1}}}% + }% + \renewcommand*{\glsxtrinlinefullplformat}[2]{% + \protect\glsfirstlongfont{\glsaccesslongpl{##1}% + \ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstabbrvfont{\glsaccessshortpl{##1}}}% + }% + \renewcommand*{\Glsxtrinlinefullformat}[2]{% + \protect\glsfirstlongfont{\glsaccesslong{##1}% + \ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstabbrvfont{\Glsaccessshort{##1}}}% + }% + \renewcommand*{\Glsxtrinlinefullplformat}[2]{% + \protect\glsfirstlongfont{\glsaccesslongpl{##1}% + \ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstabbrvfont{\Glsaccessshortpl{##1}}}% + }% +} +\newabbreviationstyle{nolong-short-noreg}% +{% + \GlsXtrUseAbbrStyleSetup{nolong-short}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% + \GlsXtrUseAbbrStyleFmts{nolong-short}% +} +\newcommand*{\glsxtrlongnoshortdescname}{% + \protect\glslongfont{\the\glslongtok}% +} +\newabbreviationstyle{long-desc}% +{% + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrlongnoshortdescname}, + sort={\the\glslongtok}, + first={\protect\glsfirstlongfont{\the\glslongtok}}, + firstplural={\protect\glsfirstlongfont{\the\glslongpltok}}, + text={\glslongfont{\the\glslongtok}}, + plural={\glslongfont{\the\glslongpltok}}% + }% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glssetattribute{\the\glslabeltok}{regular}{true}}% +}% +{% + \renewcommand*{\abbrvpluralsuffix}{\glsxtrabbrvpluralsuffix}% + \renewcommand*\glsabbrvfont[1]{\glsabbrvdefaultfont{##1}}% + \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvdefaultfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslongdefaultfont{##1}}% + \renewcommand*{\glsxtrsubsequentfmt}[2]{% + \glslongfont{\glsaccesslong{##1}\ifglsxtrinsertinside ##2\fi}% + \ifglsxtrinsertinside \else##2\fi + }% + \renewcommand*{\glsxtrsubsequentplfmt}[2]{% + \glslongfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside ##2\fi}% + \ifglsxtrinsertinside \else##2\fi + }% + \renewcommand*{\Glsxtrsubsequentfmt}[2]{% + \glslongfont{\Glsaccesslong{##1}\ifglsxtrinsertinside ##2\fi}% + \ifglsxtrinsertinside \else##2\fi + }% + \renewcommand*{\Glsxtrsubsequentplfmt}[2]{% + \glslongfont{\Glsaccesslongpl{##1}\ifglsxtrinsertinside ##2\fi}% + \ifglsxtrinsertinside \else##2\fi + }% + \renewcommand*{\glsxtrinlinefullformat}[2]{% + \glsfirstlongfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\protect\glsfirstabbrvfont{\glsaccessshort{##1}}}% + }% + \renewcommand*{\glsxtrinlinefullplformat}[2]{% + \glsfirstlongfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\protect\glsfirstabbrvfont{\glsaccessshortpl{##1}}}% + }% + \renewcommand*{\Glsxtrinlinefullformat}[2]{% + \glsfirstlongfont{\Glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\protect\glsfirstabbrvfont{\glsaccessshort{##1}}}% + }% + \renewcommand*{\Glsxtrinlinefullplformat}[2]{% + \glsfirstlongfont{\Glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\protect\glsfirstabbrvfont{\glsaccessshortpl{##1}}}% + }% + \renewcommand*{\glsxtrfullformat}[2]{% + \glsfirstlongfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsfirstlongfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \glsfirstlongfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \glsfirstlongfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% +} +\letabbreviationstyle{long-noshort-desc}{long-desc} +\newabbreviationstyle{long-noshort-desc-noreg}% +{% + \GlsXtrUseAbbrStyleSetup{long-noshort-desc}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% + \GlsXtrUseAbbrStyleFmts{long-noshort-desc}% +} +\newcommand*{\glsxtrlongnoshortname}{% + \protect\glsabbrvfont{\the\glsshorttok}% +} +\newabbreviationstyle{long}% +{% + \glsxtrAccSuppAbbrSetNameShortAttrs\glscategorylabel + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrlongnoshortname}, + sort={\the\glsshorttok}, + first={\protect\glsfirstlongfont{\the\glslongtok}}, + firstplural={\protect\glsfirstlongfont{\the\glslongpltok}}, + text={\glslongfont{\the\glslongtok}}, + plural={\glslongfont{\the\glslongpltok}},% + description={\the\glslongtok}% + }% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glssetattribute{\the\glslabeltok}{regular}{true}}% +}% +{% + \GlsXtrUseAbbrStyleFmts{long-desc}% +} +\letabbreviationstyle{long-noshort}{long} +\newabbreviationstyle{long-noshort-noreg}% +{% + \GlsXtrUseAbbrStyleSetup{long-noshort}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% + \GlsXtrUseAbbrStyleFmts{long-noshort}% +} +\newcommand*{\glsxtrscfont}[1]{\textsc{#1}} +\newcommand*{\glsabbrvscfont}{\glsxtrscfont} +\newcommand*{\glsxtrfirstscfont}[1]{\glsabbrvscfont{#1}} +\newcommand*{\glsfirstabbrvscfont}{\glsxtrfirstscfont} +\newcommand*{\glsxtrscsuffix}{\protect\glstextup{\glsxtrabbrvpluralsuffix}} +\newabbreviationstyle{long-short-sc}% +{% + \glsxtrAccSuppAbbrSetFirstLongAttrs\glscategorylabel + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrlongshortname}, + sort={\the\glsshorttok}, + first={\protect\glsfirstlongdefaultfont{\the\glslongtok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \glsxtrparen{\protect\glsfirstabbrvscfont{\the\glsshorttok}}},% + firstplural={\protect\glsfirstlongdefaultfont{\the\glslongpltok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \glsxtrparen{\protect\glsfirstabbrvscfont{\the\glsshortpltok}}},% + text={\protect\glsabbrvscfont{\the\glsshorttok}},% + plural={\protect\glsabbrvscfont{\the\glsshortpltok}},% + description={\the\glslongtok}}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% + \renewcommand*{\abbrvpluralsuffix}{\glsxtrscsuffix}% + \renewcommand*\glsabbrvfont[1]{\glsabbrvscfont{##1}}% + \renewcommand*\glsfirstabbrvfont[1]{\glsfirstabbrvscfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslongdefaultfont{##1}}% + \renewcommand*{\glsxtrfullformat}[2]{% + \glsfirstlongdefaultfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstabbrvscfont{\glsaccessshort{##1}}}% + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsfirstlongdefaultfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstabbrvscfont{\glsaccessshortpl{##1}}}% + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \glsfirstlongdefaultfont{\Glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstabbrvscfont{\glsaccessshort{##1}}}% + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \glsfirstlongdefaultfont{\Glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstabbrvscfont{\glsaccessshortpl{##1}}}% + }% +} +\newabbreviationstyle{long-short-sc-desc}% +{% + \glsxtrAccSuppAbbrSetTextShortAttrs\glscategorylabel + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrlongshortdescname}, + sort={\glsxtrlongshortdescsort},% + first={\protect\glsfirstlongdefaultfont{\the\glslongtok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \glsxtrparen{\protect\glsfirstabbrvscfont{\the\glsshorttok}}},% + firstplural={\protect\glsfirstlongdefaultfont{\the\glslongpltok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \glsxtrparen{\protect\glsfirstabbrvscfont{\the\glsshortpltok}}},% + text={\protect\glsabbrvscfont{\the\glsshorttok}},% + plural={\protect\glsabbrvscfont{\the\glsshortpltok}}% + }% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% + \GlsXtrUseAbbrStyleFmts{long-short-sc}% +} +\newabbreviationstyle{short-sc-long}% +{% + \glsxtrAccSuppAbbrSetFirstLongAttrs\glscategorylabel + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrshortlongname}, + sort={\the\glsshorttok}, + description={\the\glslongtok},% + first={\protect\glsfirstabbrvscfont{\the\glsshorttok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \glsxtrparen{\protect\glsfirstlongdefaultfont{\the\glslongtok}}},% + firstplural={\protect\glsfirstabbrvscfont{\the\glsshortpltok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \glsxtrparen{\protect\glsfirstlongdefaultfont{\the\glslongpltok}}},% + text={\protect\glsabbrvscfont{\the\glsshorttok}},% + plural={\protect\glsabbrvscfont{\the\glsshortpltok}}}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% + \renewcommand*{\abbrvpluralsuffix}{\glsxtrscsuffix}% + \renewcommand*\glsabbrvfont[1]{\glsabbrvscfont{##1}}% + \renewcommand*\glsfirstabbrvfont[1]{\glsfirstabbrvscfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslongdefaultfont{##1}}% + \renewcommand*{\glsxtrfullformat}[2]{% + \glsfirstabbrvscfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongdefaultfont{\glsaccesslong{##1}}}% + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsfirstabbrvscfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongdefaultfont{\glsaccesslongpl{##1}}}% + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \glsfirstabbrvscfont{\Glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongdefaultfont{\glsaccesslong{##1}}}% + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \glsfirstabbrvscfont{\Glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongdefaultfont{\glsaccesslongpl{##1}}}% + }% +} +\newabbreviationstyle{short-sc-long-desc}% +{% + \glsxtrAccSuppAbbrSetTextShortAttrs\glscategorylabel + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrshortlongdescname}, + sort={\glsxtrshortlongdescsort}, + first={\protect\glsfirstabbrvscfont{\the\glsshorttok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \glsxtrparen{\protect\glsfirstlongdefaultfont{\the\glslongtok}}},% + firstplural={\protect\glsfirstabbrvscfont{\the\glsshortpltok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \glsxtrparen{\protect\glsfirstlongdefaultfont{\the\glslongpltok}}},% + text={\protect\glsabbrvscfont{\the\glsshorttok}},% + plural={\protect\glsabbrvscfont{\the\glsshortpltok}}% + }% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% + \GlsXtrUseAbbrStyleFmts{short-sc-long}% +} +\newabbreviationstyle{short-sc}% +{% + \glsxtrAccSuppAbbrSetNoLongAttrs\glscategorylabel + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrshortnolongname}, + sort={\the\glsshorttok}, + first={\protect\glsfirstabbrvscfont{\the\glsshorttok}}, + firstplural={\protect\glsfirstabbrvscfont{\the\glsshortpltok}}, + text={\protect\glsabbrvscfont{\the\glsshorttok}}, + plural={\protect\glsabbrvscfont{\the\glsshortpltok}}, + description={\the\glslongtok}}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glssetattribute{\the\glslabeltok}{regular}{true}}% +}% +{% + \renewcommand*{\abbrvpluralsuffix}{\glsxtrscsuffix}% + \renewcommand*\glsabbrvfont[1]{\glsabbrvscfont{##1}}% + \renewcommand*\glsfirstabbrvfont[1]{\glsfirstabbrvscfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslongdefaultfont{##1}}% + \renewcommand*{\glsxtrinlinefullformat}[2]{% + \protect\glsfirstabbrvscfont{\glsaccessshort{##1}% + \ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongdefaultfont{\glsaccesslong{##1}}}% + }% + \renewcommand*{\glsxtrinlinefullplformat}[2]{% + \protect\glsfirstabbrvscfont{\glsaccessshortpl{##1}% + \ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongdefaultfont{\glsaccesslongpl{##1}}}% + }% + \renewcommand*{\Glsxtrinlinefullformat}[2]{% + \protect\glsfirstabbrvscfont{\Glsaccessshort{##1}% + \ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongdefaultfont{\glsaccesslong{##1}}}% + }% + \renewcommand*{\Glsxtrinlinefullplformat}[2]{% + \protect\glsfirstabbrvscfont{\Glsaccessshortpl{##1}% + \ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongdefaultfont{\glsaccesslongpl{##1}}}% + }% + \renewcommand*{\glsxtrfullformat}[2]{% + \glsfirstabbrvscfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsfirstabbrvscfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \glsfirstabbrvscfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \glsfirstabbrvscfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% +} +\letabbreviationstyle{short-sc-nolong}{short-sc} +\newabbreviationstyle{short-sc-desc}% +{% + \glsxtrAccSuppAbbrSetNameLongAttrs\glscategorylabel + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrshortdescname}, + sort={\the\glsshorttok}, + first={\protect\glsfirstabbrvscfont{\the\glsshorttok}}, + firstplural={\protect\glsfirstabbrvscfont{\the\glsshortpltok}}, + text={\protect\glsabbrvscfont{\the\glsshorttok}}, + plural={\protect\glsabbrvscfont{\the\glsshortpltok}}}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glssetattribute{\the\glslabeltok}{regular}{true}}% +}% +{% + \renewcommand*{\abbrvpluralsuffix}{\glsxtrscsuffix}% + \renewcommand*\glsabbrvfont[1]{\glsabbrvscfont{##1}}% + \renewcommand*\glsfirstabbrvfont[1]{\glsfirstabbrvscfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslongdefaultfont{##1}}% + \renewcommand*{\glsxtrinlinefullformat}[2]{% + \glsfirstabbrvscfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongdefaultfont{\glsaccesslong{##1}}}% + }% + \renewcommand*{\glsxtrinlinefullplformat}[2]{% + \glsfirstabbrvscfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongdefaultfont{\glsaccesslongpl{##1}}}% + }% + \renewcommand*{\Glsxtrinlinefullformat}[2]{% + \glsfirstabbrvscfont{\Glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongdefaultfont{\glsaccesslong{##1}}}% + }% + \renewcommand*{\Glsxtrinlinefullplformat}[2]{% + \glsfirstabbrvscfont{\Glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongdefaultfont{\glsaccesslongpl{##1}}}% + }% + \renewcommand*{\glsxtrfullformat}[2]{% + \glsfirstabbrvscfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsfirstabbrvscfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \glsfirstabbrvscfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \glsfirstabbrvscfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% +} +\letabbreviationstyle{short-sc-nolong-desc}{short-sc-desc} +\newabbreviationstyle{nolong-short-sc}% +{% + \GlsXtrUseAbbrStyleSetup{short-sc-nolong}% +}% +{% + \GlsXtrUseAbbrStyleFmts{short-sc-nolong}% + \renewcommand*{\glsxtrinlinefullformat}[2]{% + \protect\glsfirstlongdefaultfont{\glsaccesslong{##1}% + \ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstabbrvscfont{\glsaccessshort{##1}}}% + }% + \renewcommand*{\glsxtrinlinefullplformat}[2]{% + \protect\glsfirstlongdefaultfont{\glsaccesslongpl{##1}% + \ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstabbrvscfont{\glsaccessshortpl{##1}}}% + }% + \renewcommand*{\Glsxtrinlinefullformat}[2]{% + \protect\glsfirstlongdefaultfont{\Glsaccesslong{##1}% + \ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstabbrvscfont{\glsaccessshort{##1}}}% + }% + \renewcommand*{\Glsxtrinlinefullplformat}[2]{% + \protect\glsfirstlongdefaultfont{\Glsaccesslongpl{##1}% + \ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstabbrvscfont{\glsaccessshortpl{##1}}}% + }% +} +\newabbreviationstyle{long-noshort-sc}% +{% + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrlongnoshortname}, + sort={\the\glsshorttok}, + first={\protect\glsfirstlongdefaultfont{\the\glslongtok}}, + firstplural={\protect\glsfirstlongdefaultfont{\the\glslongpltok}}, + text={\protect\glslongdefaultfont{\the\glslongtok}}, + plural={\protect\glslongdefaultfont{\the\glslongpltok}},% + description={\the\glslongtok}% + }% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glssetattribute{\the\glslabeltok}{regular}{true}}% +}% +{% + \renewcommand*{\abbrvpluralsuffix}{\glsxtrscsuffix}% + \renewcommand*\glsabbrvfont[1]{\glsabbrvscfont{##1}}% + \renewcommand*\glsfirstabbrvfont[1]{\glsfirstabbrvscfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslongdefaultfont{##1}}% + \renewcommand*{\glsxtrsubsequentfmt}[2]{% + \glslongdefaultfont{\glsaccesslong{##1}\ifglsxtrinsertinside ##2\fi}% + \ifglsxtrinsertinside \else##2\fi + }% + \renewcommand*{\glsxtrsubsequentplfmt}[2]{% + \glslongdefaultfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside ##2\fi}% + \ifglsxtrinsertinside \else##2\fi + }% + \renewcommand*{\Glsxtrsubsequentfmt}[2]{% + \glslongdefaultfont{\Glsaccesslong{##1}\ifglsxtrinsertinside ##2\fi}% + \ifglsxtrinsertinside \else##2\fi + }% + \renewcommand*{\Glsxtrsubsequentplfmt}[2]{% + \glslongdefaultfont{\Glsaccesslongpl{##1}\ifglsxtrinsertinside ##2\fi}% + \ifglsxtrinsertinside \else##2\fi + }% + \renewcommand*{\glsxtrinlinefullformat}[2]{% + \glsfirstlongdefaultfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\protect\glsfirstabbrvscfont{\glsaccessshort{##1}}}% + }% + \renewcommand*{\glsxtrinlinefullplformat}[2]{% + \glsfirstlongdefaultfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\protect\glsfirstabbrvscfont{\glsaccessshortpl{##1}}}% + }% + \renewcommand*{\Glsxtrinlinefullformat}[2]{% + \glsfirstlongdefaultfont{\Glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\protect\glsfirstabbrvscfont{\glsaccessshort{##1}}}% + }% + \renewcommand*{\Glsxtrinlinefullplformat}[2]{% + \glsfirstlongdefaultfont{\Glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\protect\glsfirstabbrvscfont{\glsaccessshortpl{##1}}}% + }% + \renewcommand*{\glsxtrfullformat}[2]{% + \glsfirstlongdefaultfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsfirstlongdefaultfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \glsfirstlongdefaultfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \glsfirstlongdefaultfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% +} +\@glsxtr@deprecated@abbrstyle{long-sc}{long-noshort-sc} +\newabbreviationstyle{long-noshort-sc-desc}% +{% + \GlsXtrUseAbbrStyleSetup{long-noshort-desc}% +}% +{% + \renewcommand*{\abbrvpluralsuffix}{\glsxtrscsuffix}% + \renewcommand*\glsabbrvfont[1]{\glsabbrvscfont{##1}}% + \renewcommand*\glsfirstabbrvfont[1]{\glsfirstabbrvscfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslongdefaultfont{##1}}% + \renewcommand*{\glsxtrsubsequentfmt}[2]{% + \glslongdefaultfont{\glsaccesslong{##1}\ifglsxtrinsertinside ##2\fi}% + \ifglsxtrinsertinside \else##2\fi + }% + \renewcommand*{\glsxtrsubsequentplfmt}[2]{% + \glslongdefaultfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside ##2\fi}% + \ifglsxtrinsertinside \else##2\fi + }% + \renewcommand*{\Glsxtrsubsequentfmt}[2]{% + \glslongdefaultfont{\Glsaccesslong{##1}\ifglsxtrinsertinside ##2\fi}% + \ifglsxtrinsertinside \else##2\fi + }% + \renewcommand*{\Glsxtrsubsequentplfmt}[2]{% + \glslongdefaultfont{\Glsaccesslongpl{##1}\ifglsxtrinsertinside ##2\fi}% + \ifglsxtrinsertinside \else##2\fi + }% + \renewcommand*{\glsxtrinlinefullformat}[2]{% + \glsfirstlongdefaultfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\protect\glsfirstabbrvscfont{\glsaccessshort{##1}}}% + }% + \renewcommand*{\glsxtrinlinefullplformat}[2]{% + \glsfirstlongdefaultfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\protect\glsfirstabbrvscfont{\glsaccessshortpl{##1}}}% + }% + \renewcommand*{\Glsxtrinlinefullformat}[2]{% + \glsfirstlongdefaultfont{\Glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\protect\glsfirstabbrvscfont{\glsaccessshort{##1}}}% + }% + \renewcommand*{\Glsxtrinlinefullplformat}[2]{% + \glsfirstlongdefaultfont{\Glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\protect\glsfirstabbrvscfont{\glsaccessshortpl{##1}}}% + }% + \renewcommand*{\glsxtrfullformat}[2]{% + \glsfirstlongdefaultfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsfirstlongdefaultfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \glsfirstlongdefaultfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \glsfirstlongdefaultfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% +} +\@glsxtr@deprecated@abbrstyle{long-desc-sc}{long-noshort-sc-desc} +\newabbreviationstyle{short-sc-footnote}% +{% + \glsxtrAccSuppAbbrSetNoLongAttrs\glscategorylabel + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrfootnotename}, + sort={\the\glsshorttok}, + description={\the\glslongtok},% + first={\protect\glsfirstabbrvscfont{\the\glsshorttok}% + \protect\glsxtrabbrvfootnote{\the\glslabeltok}% + {\protect\glsfirstlongfootnotefont{\the\glslongtok}}},% + firstplural={\protect\glsfirstabbrvscfont{\the\glsshortpltok}% + \protect\glsxtrabbrvfootnote{\the\glslabeltok}% + {\protect\glsfirstlongfootnotefont{\the\glslongpltok}}},% + text={\protect\glsabbrvscfont{\the\glsshorttok}},% + plural={\protect\glsabbrvscfont{\the\glsshortpltok}}}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glssetattribute{\the\glslabeltok}{nohyperfirst}{true}% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% + \renewcommand*{\abbrvpluralsuffix}{\glsxtrscsuffix}% + \renewcommand*\glsabbrvfont[1]{\glsabbrvscfont{##1}}% + \renewcommand*\glsfirstabbrvfont[1]{\glsfirstabbrvscfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongfootnotefont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslongfootnotefont{##1}}% + \renewcommand*{\glsxtrfullformat}[2]{% + \glsfirstabbrvscfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \protect\glsxtrabbrvfootnote{##1}% + {\glsfirstlongfootnotefont{\glsaccesslong{##1}}}% + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsfirstabbrvscfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \protect\glsxtrabbrvfootnote{##1}% + {\glsfirstlongfootnotefont{\glsaccesslongpl{##1}}}% + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \glsfirstabbrvscfont{\Glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \protect\glsxtrabbrvfootnote{##1}% + {\glsfirstlongfootnotefont{\glsaccesslong{##1}}}% + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \glsfirstabbrvscfont{\Glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \protect\glsxtrabbrvfootnote{##1}% + {\glsfirstlongfootnotefont{\glsaccesslongpl{##1}}}% + }% + \renewcommand*{\glsxtrinlinefullformat}[2]{% + \glsfirstabbrvscfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongfootnotefont{\glsaccesslong{##1}}}% + }% + \renewcommand*{\glsxtrinlinefullplformat}[2]{% + \glsfirstabbrvscfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongfootnotefont{\glsaccesslongpl{##1}}}% + }% + \renewcommand*{\Glsxtrinlinefullformat}[2]{% + \glsfirstabbrvscfont{\Glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongfootnotefont{\glsaccesslong{##1}}}% + }% + \renewcommand*{\Glsxtrinlinefullplformat}[2]{% + \glsfirstabbrvscfont{\Glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongfootnotefont{\glsaccesslongpl{##1}}}% + }% +} +\@glsxtr@deprecated@abbrstyle{footnote-sc}{short-sc-footnote} +\newabbreviationstyle{short-sc-footnote-desc}% +{% + \glsxtrAccSuppAbbrSetNameLongAttrs\glscategorylabel + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrfootnotedescname}, + sort={\glsxtrfootnotedescsort}, + first={\protect\glsfirstabbrvscfont{\the\glsshorttok}% + \protect\glsxtrabbrvfootnote{\the\glslabeltok}% + {\protect\glsfirstlongfootnotefont{\the\glslongtok}}},% + firstplural={\protect\glsfirstabbrvscfont{\the\glsshortpltok}% + \protect\glsxtrabbrvfootnote{\the\glslabeltok}% + {\protect\glsfirstlongfootnotefont{\the\glslongpltok}}},% + text={\protect\glsabbrvscfont{\the\glsshorttok}},% + plural={\protect\glsabbrvscfont{\the\glsshortpltok}}}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glssetattribute{\the\glslabeltok}{nohyperfirst}{true}% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% + \GlsXtrUseAbbrStyleFmts{short-sc-footnote}% +} +\newabbreviationstyle{short-sc-postfootnote}% +{% + \glsxtrAccSuppAbbrSetNoLongAttrs\glscategorylabel + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrfootnotename}, + sort={\the\glsshorttok}, + description={\the\glslongtok},% + first={\protect\glsfirstabbrvscfont{\the\glsshorttok}},% + firstplural={\protect\glsfirstabbrvscfont{\the\glsshortpltok}},% + text={\protect\glsabbrvscfont{\the\glsshorttok}},% + plural={\protect\glsabbrvscfont{\the\glsshortpltok}}}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \csdef{glsxtrpostlink\glscategorylabel}{% + \glsxtrifwasfirstuse + {% + \glsxtrdopostpunc{\protect\glsxtrabbrvfootnote{\glslabel}% + {\glsfirstlongfootnotefont{\glsentrylong{\glslabel}}}}% + }% + {}% + }% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% + \renewcommand*{\glsxtrsetupfulldefs}{% + \let\glsxtrifwasfirstuse\@secondoftwo + }% +}% +{% + \renewcommand*{\abbrvpluralsuffix}{\glsxtrscsuffix}% + \renewcommand*\glsabbrvfont[1]{\glsabbrvscfont{##1}}% + \renewcommand*\glsfirstabbrvfont[1]{\glsfirstabbrvscfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongfootnotefont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslongfootnotefont{##1}}% + \renewcommand*{\glsxtrfullformat}[2]{% + \glsfirstabbrvscfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsfirstabbrvscfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \glsfirstabbrvscfont{\Glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \glsfirstabbrvscfont{\Glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\glsxtrinlinefullformat}[2]{% + \glsfirstabbrvscfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongfootnotefont{\glsaccesslong{##1}}}% + }% + \renewcommand*{\glsxtrinlinefullplformat}[2]{% + \glsfirstabbrvscfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongfootnotefont{\glsaccesslongpl{##1}}}% + }% + \renewcommand*{\Glsxtrinlinefullformat}[2]{% + \glsfirstabbrvscfont{\Glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongfootnotefont{\glsaccesslong{##1}}}% + }% + \renewcommand*{\Glsxtrinlinefullplformat}[2]{% + \glsfirstabbrvscfont{\Glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongfootnotefont{\glsaccesslongpl{##1}}}% + }% +} +\@glsxtr@deprecated@abbrstyle{postfootnote-sc}{short-sc-postfootnote} +\newabbreviationstyle{short-sc-postfootnote-desc}% +{% + \glsxtrAccSuppAbbrSetNameLongAttrs\glscategorylabel + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrfootnotedescname}, + sort={\glsxtrfootnotedescsort}, + first={\protect\glsfirstabbrvscfont{\the\glsshorttok}},% + firstplural={\protect\glsfirstabbrvscfont{\the\glsshortpltok}},% + text={\protect\glsabbrvscfont{\the\glsshorttok}},% + plural={\protect\glsabbrvscfont{\the\glsshortpltok}}}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \csdef{glsxtrpostlink\glscategorylabel}{% + \glsxtrifwasfirstuse + {% + \glsxtrdopostpunc{\protect\glsxtrabbrvfootnote{\glslabel}% + {\glsfirstlongfootnotefont{\glsentrylong{\glslabel}}}}% + }% + {}% + }% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% + \renewcommand*{\glsxtrsetupfulldefs}{% + \let\glsxtrifwasfirstuse\@secondoftwo + }% +}% +{% + \GlsXtrUseAbbrStyleFmts{short-sc-postfootnote}% +} +\newcommand*{\glsxtrsmfont}[1]{\textsmaller{#1}} +\newcommand*{\glsabbrvsmfont}{\glsxtrsmfont} +\newcommand*{\glsxtrfirstsmfont}[1]{\glsabbrvsmfont{#1}} +\newcommand*{\glsfirstabbrvsmfont}{\glsxtrfirstsmfont} +\newcommand*{\glsxtrsmsuffix}{\glsxtrabbrvpluralsuffix} +\newabbreviationstyle{long-short-sm}% +{% + \glsxtrAccSuppAbbrSetFirstLongAttrs\glscategorylabel + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrlongshortname}, + sort={\the\glsshorttok}, + first={\protect\glsfirstlongdefaultfont{\the\glslongtok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \glsxtrparen{\protect\glsfirstabbrvsmfont{\the\glsshorttok}}},% + firstplural={\protect\glsfirstlongdefaultfont{\the\glslongpltok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \glsxtrparen{\protect\glsfirstabbrvsmfont{\the\glsshortpltok}}},% + text={\protect\glsabbrvsmfont{\the\glsshorttok}},% + plural={\protect\glsabbrvsmfont{\the\glsshortpltok}},% + description={\the\glslongtok}}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% + \renewcommand*\glsabbrvfont[1]{\glsabbrvsmfont{##1}}% + \renewcommand*\glsfirstabbrvfont[1]{\glsfirstabbrvsmfont{##1}}% + \renewcommand*{\abbrvpluralsuffix}{\glsxtrsmsuffix}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslongdefaultfont{##1}}% + \renewcommand*{\glsxtrfullformat}[2]{% + \glsfirstlongdefaultfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstabbrvsmfont{\glsaccessshort{##1}}}% + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsfirstlongdefaultfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstabbrvsmfont{\glsaccessshortpl{##1}}}% + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \glsfirstlongdefaultfont{\Glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstabbrvsmfont{\glsaccessshort{##1}}}% + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \glsfirstlongdefaultfont{\Glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstabbrvsmfont{\glsaccessshortpl{##1}}}% + }% +} +\newabbreviationstyle{long-short-sm-desc}% +{% + \glsxtrAccSuppAbbrSetTextShortAttrs\glscategorylabel + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrlongshortdescname}, + sort={\glsxtrlongshortdescsort},% + first={\protect\glsfirstlongdefaultfont{\the\glslongtok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \glsxtrparen{\protect\glsfirstabbrvsmfont{\the\glsshorttok}}},% + firstplural={\protect\glsfirstlongdefaultfont{\the\glslongpltok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \glsxtrparen{\protect\glsfirstabbrvsmfont{\the\glsshortpltok}}},% + text={\protect\glsabbrvsmfont{\the\glsshorttok}},% + plural={\protect\glsabbrvsmfont{\the\glsshortpltok}}% + }% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% + \GlsXtrUseAbbrStyleFmts{long-short-sm}% +} +\newabbreviationstyle{short-sm-long}% +{% + \glsxtrAccSuppAbbrSetFirstLongAttrs\glscategorylabel + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrshortlongname}, + sort={\the\glsshorttok}, + description={\the\glslongtok},% + first={\protect\glsfirstabbrvsmfont{\the\glsshorttok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \glsxtrparen{\protect\glsfirstlongdefaultfont{\the\glslongtok}}},% + firstplural={\protect\glsfirstabbrvsmfont{\the\glsshortpltok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \glsxtrparen{\protect\glsfirstlongdefaultfont{\the\glslongpltok}}},% + text={\protect\glsabbrvsmfont{\the\glsshorttok}},% + plural={\protect\glsabbrvsmfont{\the\glsshortpltok}}}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% + \renewcommand*\glsabbrvfont[1]{\glsabbrvsmfont{##1}}% + \renewcommand*\glsfirstabbrvfont[1]{\glsfirstabbrvsmfont{##1}}% + \renewcommand*{\abbrvpluralsuffix}{\glsxtrsmsuffix}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslongdefaultfont{##1}}% + \renewcommand*{\glsxtrfullformat}[2]{% + \glsfirstabbrvsmfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongdefaultfont{\glsaccesslong{##1}}}% + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsfirstabbrvsmfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongdefaultfont{\glsaccesslongpl{##1}}}% + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \glsfirstabbrvsmfont{\Glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongdefaultfont{\glsaccesslong{##1}}}% + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \glsfirstabbrvsmfont{\Glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongdefaultfont{\glsaccesslongpl{##1}}}% + }% +} +\newabbreviationstyle{short-sm-long-desc}% +{% + \glsxtrAccSuppAbbrSetTextShortAttrs\glscategorylabel + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrshortlongdescname}, + sort={\glsxtrshortlongdescsort}, + first={\protect\glsfirstabbrvsmfont{\the\glsshorttok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \glsxtrparen{\protect\glsfirstlongdefaultfont{\the\glslongtok}}},% + firstplural={\protect\glsfirstabbrvsmfont{\the\glsshortpltok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \glsxtrparen{\protect\glsfirstlongdefaultfont{\the\glslongpltok}}},% + text={\protect\glsabbrvsmfont{\the\glsshorttok}},% + plural={\protect\glsabbrvsmfont{\the\glsshortpltok}}% + }% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% + \GlsXtrUseAbbrStyleFmts{short-sm-long}% +} +\newabbreviationstyle{short-sm}% +{% + \glsxtrAccSuppAbbrSetNameLongAttrs\glscategorylabel + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrshortnolongname}, + sort={\the\glsshorttok}, + first={\protect\glsfirstabbrvsmfont{\the\glsshorttok}}, + firstplural={\protect\glsfirstabbrvsmfont{\the\glsshortpltok}}, + text={\protect\glsabbrvsmfont{\the\glsshorttok}}, + plural={\protect\glsabbrvsmfont{\the\glsshortpltok}}, + description={\the\glslongtok}}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glssetattribute{\the\glslabeltok}{regular}{true}}% +}% +{% + \renewcommand*\glsabbrvfont[1]{\glsabbrvsmfont{##1}}% + \renewcommand*\glsfirstabbrvfont[1]{\glsfirstabbrvsmfont{##1}}% + \renewcommand*{\abbrvpluralsuffix}{\glsxtrsmsuffix}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslongdefaultfont{##1}}% + \renewcommand*{\glsxtrinlinefullformat}[2]{% + \protect\glsfirstabbrvsmfont{\glsaccessshort{##1}% + \ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongdefaultfont{\glsaccesslong{##1}}}% + }% + \renewcommand*{\glsxtrinlinefullplformat}[2]{% + \protect\glsfirstabbrvsmfont{\glsaccessshortpl{##1}% + \ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongdefaultfont{\glsaccesslongpl{##1}}}% + }% + \renewcommand*{\Glsxtrinlinefullformat}[2]{% + \protect\glsfirstabbrvsmfont{\Glsaccessshort{##1}% + \ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongdefaultfont{\glsaccesslong{##1}}}% + }% + \renewcommand*{\Glsxtrinlinefullplformat}[2]{% + \protect\glsfirstabbrvsmfont{\Glsaccessshortpl{##1}% + \ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongdefaultfont{\glsaccesslongpl{##1}}}% + }% + \renewcommand*{\glsxtrfullformat}[2]{% + \glsfirstabbrvsmfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsfirstabbrvsmfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \glsfirstabbrvsmfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \glsfirstabbrvsmfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% +} +\letabbreviationstyle{short-sm-nolong}{short-sm} +\newabbreviationstyle{short-sm-desc}% +{% + \glsxtrAccSuppAbbrSetNoLongAttrs\glscategorylabel + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrshortdescname}, + sort={\the\glsshorttok}, + first={\protect\glsfirstabbrvsmfont{\the\glsshorttok}}, + firstplural={\protect\glsfirstabbrvsmfont{\the\glsshortpltok}}, + text={\protect\glsabbrvsmfont{\the\glsshorttok}}, + plural={\protect\glsabbrvsmfont{\the\glsshortpltok}}}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glssetattribute{\the\glslabeltok}{regular}{true}}% +}% +{% + \renewcommand*\glsabbrvfont[1]{\glsabbrvsmfont{##1}}% + \renewcommand*\glsfirstabbrvfont[1]{\glsfirstabbrvsmfont{##1}}% + \renewcommand*{\abbrvpluralsuffix}{\glsxtrsmsuffix}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslongdefaultfont{##1}}% + \renewcommand*{\glsxtrinlinefullformat}[2]{% + \glsfirstabbrvsmfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongdefaultfont{\glsaccesslong{##1}}}% + }% + \renewcommand*{\glsxtrinlinefullplformat}[2]{% + \glsfirstabbrvsmfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongdefaultfont{\glsaccesslongpl{##1}}}% + }% + \renewcommand*{\Glsxtrinlinefullformat}[2]{% + \glsfirstabbrvsmfont{\Glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongdefaultfont{\glsaccesslong{##1}}}% + }% + \renewcommand*{\Glsxtrinlinefullplformat}[2]{% + \glsfirstabbrvsmfont{\Glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongdefaultfont{\glsaccesslongpl{##1}}}% + }% + \renewcommand*{\glsxtrfullformat}[2]{% + \glsfirstabbrvsmfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsfirstabbrvsmfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \glsfirstabbrvsmfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \glsfirstabbrvsmfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% +} +\letabbreviationstyle{short-sm-nolong-desc}{short-sm-desc} +\newabbreviationstyle{nolong-short-sm}% +{% + \GlsXtrUseAbbrStyleSetup{short-sm-nolong}% +}% +{% + \GlsXtrUseAbbrStyleFmts{short-sm-nolong}% + \renewcommand*{\glsxtrinlinefullformat}[2]{% + \protect\glsfirstlongdefaultfont{\glsaccesslong{##1}% + \ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstabbrvsmfont{\glsaccessshort{##1}}}% + }% + \renewcommand*{\glsxtrinlinefullplformat}[2]{% + \protect\glsfirstlongdefaultfont{\glsaccesslongpl{##1}% + \ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstabbrvsmfont{\glsaccessshortpl{##1}}}% + }% + \renewcommand*{\Glsxtrinlinefullformat}[2]{% + \protect\glsfirstlongdefaultfont{\Glsaccesslong{##1}% + \ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstabbrvsmfont{\glsaccessshort{##1}}}% + }% + \renewcommand*{\Glsxtrinlinefullplformat}[2]{% + \protect\glsfirstlongdefaultfont{\Glsaccesslongpl{##1}% + \ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstabbrvsmfont{\glsaccessshortpl{##1}}}% + }% +} +\newabbreviationstyle{long-noshort-sm}% +{% + \glsxtrAccSuppAbbrSetNameShortAttrs\glscategorylabel + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrlongnoshortname}, + sort={\the\glsshorttok}, + first={\protect\glsfirstlongdefaultfont{\the\glslongtok}}, + firstplural={\protect\glsfirstlongdefaultfont{\the\glslongpltok}}, + text={\protect\glslongdefaultfont{\the\glslongtok}}, + plural={\protect\glslongdefaultfont{\the\glslongpltok}},% + description={\the\glslongtok}% + }% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glssetattribute{\the\glslabeltok}{regular}{true}}% +}% +{% + \renewcommand*\glsabbrvfont[1]{\glsabbrvsmfont{##1}}% + \renewcommand*\glsfirstabbrvfont[1]{\glsfirstabbrvsmfont{##1}}% + \renewcommand*{\abbrvpluralsuffix}{\glsxtrsmsuffix}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslongdefaultfont{##1}}% + \renewcommand*{\glsxtrsubsequentfmt}[2]{% + \glslongdefaultfont{\glsaccesslong{##1}\ifglsxtrinsertinside ##2\fi}% + \ifglsxtrinsertinside \else##2\fi + }% + \renewcommand*{\glsxtrsubsequentplfmt}[2]{% + \glslongdefaultfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside ##2\fi}% + \ifglsxtrinsertinside \else##2\fi + }% + \renewcommand*{\Glsxtrsubsequentfmt}[2]{% + \glslongdefaultfont{\Glsaccesslong{##1}\ifglsxtrinsertinside ##2\fi}% + \ifglsxtrinsertinside \else##2\fi + }% + \renewcommand*{\Glsxtrsubsequentplfmt}[2]{% + \glslongdefaultfont{\Glsaccesslongpl{##1}\ifglsxtrinsertinside ##2\fi}% + \ifglsxtrinsertinside \else##2\fi + }% + \renewcommand*{\glsxtrinlinefullformat}[2]{% + \glsfirstlongdefaultfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\protect\glsfirstabbrvsmfont{\glsaccessshort{##1}}}% + }% + \renewcommand*{\glsxtrinlinefullplformat}[2]{% + \glsfirstlongdefaultfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\protect\glsfirstabbrvsmfont{\glsaccessshortpl{##1}}}% + }% + \renewcommand*{\Glsxtrinlinefullformat}[2]{% + \glsfirstlongdefaultfont{\Glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\protect\glsfirstabbrvsmfont{\glsaccessshort{##1}}}% + }% + \renewcommand*{\Glsxtrinlinefullplformat}[2]{% + \glsfirstlongdefaultfont{\Glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\protect\glsfirstabbrvsmfont{\glsaccessshortpl{##1}}}% + }% + \renewcommand*{\glsxtrfullformat}[2]{% + \glsfirstlongdefaultfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsfirstlongdefaultfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \glsfirstlongdefaultfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \glsfirstlongdefaultfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% +} +\@glsxtr@deprecated@abbrstyle{long-sm}{long-noshort-sm} +\newabbreviationstyle{long-noshort-sm-desc}% +{% + \GlsXtrUseAbbrStyleSetup{long-noshort-desc}% +}% +{% + \renewcommand*\glsabbrvfont[1]{\glsabbrvsmfont{##1}}% + \renewcommand*\glsfirstabbrvfont[1]{\glsfirstabbrvsmfont{##1}}% + \renewcommand*{\abbrvpluralsuffix}{\glsxtrsmsuffix}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslongdefaultfont{##1}}% + \renewcommand*{\glsxtrsubsequentfmt}[2]{% + \glslongdefaultfont{\glsaccesslong{##1}\ifglsxtrinsertinside ##2\fi}% + \ifglsxtrinsertinside \else##2\fi + }% + \renewcommand*{\glsxtrsubsequentplfmt}[2]{% + \glslongdefaultfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside ##2\fi}% + \ifglsxtrinsertinside \else##2\fi + }% + \renewcommand*{\Glsxtrsubsequentfmt}[2]{% + \glslongdefaultfont{\Glsaccesslong{##1}\ifglsxtrinsertinside ##2\fi}% + \ifglsxtrinsertinside \else##2\fi + }% + \renewcommand*{\Glsxtrsubsequentplfmt}[2]{% + \glslongdefaultfont{\Glsaccesslongpl{##1}\ifglsxtrinsertinside ##2\fi}% + \ifglsxtrinsertinside \else##2\fi + }% + \renewcommand*{\glsxtrinlinefullformat}[2]{% + \glsfirstlongdefaultfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\protect\glsfirstabbrvsmfont{\glsaccessshort{##1}}}% + }% + \renewcommand*{\glsxtrinlinefullplformat}[2]{% + \glsfirstlongdefaultfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\protect\glsfirstabbrvsmfont{\glsaccessshortpl{##1}}}% + }% + \renewcommand*{\Glsxtrinlinefullformat}[2]{% + \glsfirstlongdefaultfont{\Glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\protect\glsfirstabbrvsmfont{\glsaccessshort{##1}}}% + }% + \renewcommand*{\Glsxtrinlinefullplformat}[2]{% + \glsfirstlongdefaultfont{\Glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\protect\glsfirstabbrvsmfont{\glsaccessshortpl{##1}}}% + }% + \renewcommand*{\glsxtrfullformat}[2]{% + \glsfirstlongdefaultfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsfirstlongdefaultfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \glsfirstlongdefaultfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \glsfirstlongdefaultfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% +} +\@glsxtr@deprecated@abbrstyle{long-desc-sm}{long-noshort-sm-desc} +\newabbreviationstyle{short-sm-footnote}% +{% + \glsxtrAccSuppAbbrSetNoLongAttrs\glscategorylabel + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrfootnotename}, + sort={\the\glsshorttok}, + description={\the\glslongtok},% + first={\protect\glsfirstabbrvsmfont{\the\glsshorttok}% + \protect\glsxtrabbrvfootnote{\the\glslabeltok}% + {\protect\glsfirstlongfootnotefont{\the\glslongtok}}},% + firstplural={\protect\glsfirstabbrvsmfont{\the\glsshortpltok}% + \protect\glsxtrabbrvfootnote{\the\glslabeltok}% + {\protect\glsfirstlongfootnotefont{\the\glslongpltok}}},% + text={\protect\glsabbrvsmfont{\the\glsshorttok}},% + plural={\protect\glsabbrvsmfont{\the\glsshortpltok}}}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glssetattribute{\the\glslabeltok}{nohyperfirst}{true}% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% + \renewcommand*\glsabbrvfont[1]{\glsabbrvsmfont{##1}}% + \renewcommand*\glsfirstabbrvfont[1]{\glsfirstabbrvsmfont{##1}}% + \renewcommand*{\abbrvpluralsuffix}{\glsxtrsmsuffix}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongfootnotefont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslongfootnotefont{##1}}% + \renewcommand*{\glsxtrfullformat}[2]{% + \glsfirstabbrvsmfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \protect\glsxtrabbrvfootnote{##1}% + {\glsfirstlongfootnotefont{\glsaccesslong{##1}}}% + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsfirstabbrvsmfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \protect\glsxtrabbrvfootnote{##1}% + {\glsfirstlongfootnotefont{\glsaccesslongpl{##1}}}% + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \glsfirstabbrvsmfont{\Glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \protect\glsxtrabbrvfootnote{##1}% + {\glsfirstlongfootnotefont{\glsaccesslong{##1}}}% + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \glsfirstabbrvsmfont{\Glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \protect\glsxtrabbrvfootnote{##1}% + {\glsfirstlongfootnotefont{\glsaccesslongpl{##1}}}% + }% + \renewcommand*{\glsxtrinlinefullformat}[2]{% + \glsfirstabbrvsmfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongfootnotefont{\glsaccesslong{##1}}}% + }% + \renewcommand*{\glsxtrinlinefullplformat}[2]{% + \glsfirstabbrvsmfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongfootnotefont{\glsaccesslongpl{##1}}}% + }% + \renewcommand*{\Glsxtrinlinefullformat}[2]{% + \glsfirstabbrvsmfont{\Glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongfootnotefont{\glsaccesslong{##1}}}% + }% + \renewcommand*{\Glsxtrinlinefullplformat}[2]{% + \glsfirstabbrvsmfont{\Glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongfootnotefont{\glsaccesslongpl{##1}}}% + }% +} +\@glsxtr@deprecated@abbrstyle{footnote-sm}{short-sm-footnote} +\newabbreviationstyle{short-sm-footnote-desc}% +{% + \glsxtrAccSuppAbbrSetNameLongAttrs\glscategorylabel + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrfootnotedescname}, + sort={\glsxtrfootnotedescsort}, + first={\protect\glsfirstabbrvsmfont{\the\glsshorttok}% + \protect\glsxtrabbrvfootnote{\the\glslabeltok}% + {\protect\glsfirstlongfootnotefont{\the\glslongtok}}},% + firstplural={\protect\glsfirstabbrvsmfont{\the\glsshortpltok}% + \protect\glsxtrabbrvfootnote{\the\glslabeltok}% + {\protect\glsfirstlongfootnotefont{\the\glslongpltok}}},% + text={\protect\glsabbrvsmfont{\the\glsshorttok}},% + plural={\protect\glsabbrvsmfont{\the\glsshortpltok}}}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glssetattribute{\the\glslabeltok}{nohyperfirst}{true}% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% + \GlsXtrUseAbbrStyleFmts{short-sm-footnote}% +} +\newabbreviationstyle{short-sm-postfootnote}% +{% + \glsxtrAccSuppAbbrSetNoLongAttrs\glscategorylabel + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrfootnotename}, + sort={\the\glsshorttok}, + description={\the\glslongtok},% + first={\protect\glsfirstabbrvsmfont{\the\glsshorttok}},% + firstplural={\protect\glsfirstabbrvsmfont{\the\glsshortpltok}},% + text={\protect\glsabbrvsmfont{\the\glsshorttok}},% + plural={\protect\glsabbrvsmfont{\the\glsshortpltok}}}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \csdef{glsxtrpostlink\glscategorylabel}{% + \glsxtrifwasfirstuse + {% + \glsxtrdopostpunc{\protect\glsxtrabbrvfootnote{\glslabel}% + {\glsfirstlongfootnotefont{\glsentrylong{\glslabel}}}}% + }% + {}% + }% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% + \renewcommand*{\glsxtrsetupfulldefs}{% + \let\glsxtrifwasfirstuse\@secondoftwo + }% +}% +{% + \renewcommand*\glsabbrvfont[1]{\glsabbrvsmfont{##1}}% + \renewcommand*\glsfirstabbrvfont[1]{\glsfirstabbrvsmfont{##1}}% + \renewcommand*{\abbrvpluralsuffix}{\glsxtrsmsuffix}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongfootnotefont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslongfootnotefont{##1}}% + \renewcommand*{\glsxtrfullformat}[2]{% + \glsfirstabbrvsmfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsfirstabbrvsmfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \glsfirstabbrvsmfont{\Glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \glsfirstabbrvsmfont{\Glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\glsxtrinlinefullformat}[2]{% + \glsfirstabbrvsmfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongfootnotefont{\glsaccesslong{##1}}}% + }% + \renewcommand*{\glsxtrinlinefullplformat}[2]{% + \glsfirstabbrvsmfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongfootnotefont{\glsaccesslongpl{##1}}}% + }% + \renewcommand*{\Glsxtrinlinefullformat}[2]{% + \glsfirstabbrvsmfont{\Glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongfootnotefont{\glsaccesslong{##1}}}% + }% + \renewcommand*{\Glsxtrinlinefullplformat}[2]{% + \glsfirstabbrvsmfont{\Glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongfootnotefont{\glsaccesslongpl{##1}}}% + }% +} +\@glsxtr@deprecated@abbrstyle{postfootnote-sm}{short-sm-postfootnote} +\newabbreviationstyle{short-sm-postfootnote-desc}% +{% + \glsxtrAccSuppAbbrSetNameLongAttrs\glscategorylabel + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrfootnotedescname}, + sort={\glsxtrfootnotedescsort}, + first={\protect\glsfirstabbrvsmfont{\the\glsshorttok}},% + firstplural={\protect\glsfirstabbrvsmfont{\the\glsshortpltok}},% + text={\protect\glsabbrvsmfont{\the\glsshorttok}},% + plural={\protect\glsabbrvsmfont{\the\glsshortpltok}}}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \csdef{glsxtrpostlink\glscategorylabel}{% + \glsxtrifwasfirstuse + {% + \glsxtrdopostpunc{\protect\glsxtrabbrvfootnote{\glslabel}% + {\glsfirstlongfootnotefont{\glsentrylong{\glslabel}}}}% + }% + {}% + }% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% + \renewcommand*{\glsxtrsetupfulldefs}{% + \let\glsxtrifwasfirstuse\@secondoftwo + }% +}% +{% + \GlsXtrUseAbbrStyleFmts{short-sm-postfootnote}% +} +\newcommand*{\glsabbrvemfont}[1]{\emph{#1}}% +\newcommand*{\glsfirstabbrvemfont}[1]{\glsabbrvemfont{#1}}% +\newcommand*{\glsxtremsuffix}{\glsxtrabbrvpluralsuffix} +\newcommand*{\glsfirstlongemfont}[1]{\glslongemfont{#1}}% +\newcommand*{\glslongemfont}[1]{\emph{#1}}% +\newabbreviationstyle{long-short-em}% +{% + \glsxtrAccSuppAbbrSetFirstLongAttrs\glscategorylabel + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrlongshortname}, + sort={\the\glsshorttok}, + first={\protect\glsfirstlongdefaultfont{\the\glslongtok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \glsxtrparen{\protect\glsfirstabbrvemfont{\the\glsshorttok}}},% + firstplural={\protect\glsfirstlongdefaultfont{\the\glslongpltok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \glsxtrparen{\protect\glsfirstabbrvemfont{\the\glsshortpltok}}},% + text={\protect\glsabbrvemfont{\the\glsshorttok}},% + plural={\protect\glsabbrvemfont{\the\glsshortpltok}},% + description={\the\glslongtok}}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% + \renewcommand*\glsabbrvfont[1]{\glsabbrvemfont{##1}}% + \renewcommand*\glsfirstabbrvfont[1]{\glsfirstabbrvemfont{##1}}% + \renewcommand*{\abbrvpluralsuffix}{\glsxtremsuffix}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslongdefaultfont{##1}}% + \renewcommand*{\glsxtrfullformat}[2]{% + \glsfirstlongdefaultfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstabbrvemfont{\glsaccessshort{##1}}}% + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsfirstlongdefaultfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstabbrvemfont{\glsaccessshortpl{##1}}}% + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \glsfirstlongdefaultfont{\Glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstabbrvemfont{\glsaccessshort{##1}}}% + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \glsfirstlongdefaultfont{\Glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstabbrvemfont{\glsaccessshortpl{##1}}}% + }% +} +\newabbreviationstyle{long-short-em-desc}% +{% + \glsxtrAccSuppAbbrSetTextShortAttrs\glscategorylabel + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrlongshortdescname}, + sort={\glsxtrlongshortdescsort},% + first={\protect\glsfirstlongdefaultfont{\the\glslongtok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \glsxtrparen{\protect\glsfirstabbrvemfont{\the\glsshorttok}}},% + firstplural={\protect\glsfirstlongdefaultfont{\the\glslongpltok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \glsxtrparen{\protect\glsfirstabbrvemfont{\the\glsshortpltok}}},% + text={\protect\glsabbrvemfont{\the\glsshorttok}},% + plural={\protect\glsabbrvemfont{\the\glsshortpltok}}% + }% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% + \GlsXtrUseAbbrStyleFmts{long-short-em}% +} +\newabbreviationstyle{long-em-short-em}% +{% + \glsxtrAccSuppAbbrSetFirstLongAttrs\glscategorylabel + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrlongshortname}, + sort={\the\glsshorttok}, + first={\protect\glsfirstlongemfont{\the\glslongtok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \glsxtrparen{\protect\glsfirstabbrvemfont{\the\glsshorttok}}},% + firstplural={\protect\glsfirstlongemfont{\the\glslongpltok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \glsxtrparen{\protect\glsfirstabbrvemfont{\the\glsshortpltok}}},% + text={\protect\glsabbrvemfont{\the\glsshorttok}},% + plural={\protect\glsabbrvemfont{\the\glsshortpltok}},% + description={\protect\glslongemfont{\the\glslongtok}}}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% + \renewcommand*{\abbrvpluralsuffix}{\glsxtremsuffix}% + \renewcommand*{\glsabbrvfont}[1]{\glsabbrvemfont{##1}}% + \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvemfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongemfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslongemfont{##1}}% + \renewcommand*{\glsxtrfullformat}[2]{% + \glsfirstlongemfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstabbrvemfont{\glsaccessshort{##1}}}% + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsfirstlongemfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstabbrvemfont{\glsaccessshortpl{##1}}}% + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \glsfirstlongemfont{\Glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstabbrvemfont{\glsaccessshort{##1}}}% + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \glsfirstlongemfont{\Glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstabbrvemfont{\glsaccessshortpl{##1}}}% + }% +} +\newabbreviationstyle{long-em-short-em-desc}% +{% + \glsxtrAccSuppAbbrSetTextShortAttrs\glscategorylabel + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrlongshortdescname}, + sort={\glsxtrlongshortdescsort},% + first={\protect\glsfirstlongemfont{\the\glslongtok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \glsxtrparen{\protect\glsfirstabbrvemfont{\the\glsshorttok}}},% + firstplural={\protect\glsfirstlongemfont{\the\glslongpltok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \glsxtrparen{\protect\glsfirstabbrvemfont{\the\glsshortpltok}}},% + text={\protect\glsabbrvemfont{\the\glsshorttok}},% + plural={\protect\glsabbrvemfont{\the\glsshortpltok}}% + }% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% + \GlsXtrUseAbbrStyleFmts{long-em-short-em}% +} +\newabbreviationstyle{short-em-long}% +{% + \glsxtrAccSuppAbbrSetFirstLongAttrs\glscategorylabel + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrshortlongname}, + sort={\the\glsshorttok}, + description={\the\glslongtok},% + first={\protect\glsfirstabbrvemfont{\the\glsshorttok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \glsxtrparen{\protect\glsfirstlongdefaultfont{\the\glslongtok}}},% + firstplural={\protect\glsfirstabbrvemfont{\the\glsshortpltok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \glsxtrparen{\protect\glsfirstlongdefaultfont{\the\glslongpltok}}},% + text={\protect\glsabbrvemfont{\the\glsshorttok}},% + plural={\protect\glsabbrvemfont{\the\glsshortpltok}}}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% + \renewcommand*{\abbrvpluralsuffix}{\glsxtremsuffix}% + \renewcommand*\glsabbrvfont[1]{\glsabbrvemfont{##1}}% + \renewcommand*\glsfirstabbrvfont[1]{\glsfirstabbrvemfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslongdefaultfont{##1}}% + \renewcommand*{\glsxtrfullformat}[2]{% + \glsfirstabbrvemfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongdefaultfont{\glsaccesslong{##1}}}% + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsfirstabbrvemfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongdefaultfont{\glsaccesslongpl{##1}}}% + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \glsfirstabbrvemfont{\Glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongdefaultfont{\glsaccesslong{##1}}}% + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \glsfirstabbrvemfont{\Glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongdefaultfont{\glsaccesslongpl{##1}}}% + }% +} +\newabbreviationstyle{short-em-long-desc}% +{% + \glsxtrAccSuppAbbrSetTextShortAttrs\glscategorylabel + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrshortlongdescname}, + sort={\glsxtrshortlongdescsort}, + first={\protect\glsfirstabbrvemfont{\the\glsshorttok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \glsxtrparen{\protect\glsfirstlongdefaultfont{\the\glslongtok}}},% + firstplural={\protect\glsfirstabbrvemfont{\the\glsshortpltok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \glsxtrparen{\protect\glsfirstlongdefaultfont{\the\glslongpltok}}},% + text={\protect\glsabbrvemfont{\the\glsshorttok}},% + plural={\protect\glsabbrvemfont{\the\glsshortpltok}}% + }% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% + \GlsXtrUseAbbrStyleFmts{short-em-long}% +} +\newabbreviationstyle{short-em-long-em}% +{% + \glsxtrAccSuppAbbrSetFirstLongAttrs\glscategorylabel + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrshortlongname}, + sort={\the\glsshorttok}, + description={\protect\glslongemfont{\the\glslongtok}},% + first={\protect\glsfirstabbrvemfont{\the\glsshorttok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \glsxtrparen{\protect\glsfirstlongemfont{\the\glslongtok}}},% + firstplural={\protect\glsfirstabbrvemfont{\the\glsshortpltok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \glsxtrparen{\protect\glsfirstlongemfont{\the\glslongpltok}}},% + text={\protect\glsabbrvemfont{\the\glsshorttok}},% + plural={\protect\glsabbrvemfont{\the\glsshortpltok}}}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% + \renewcommand*{\abbrvpluralsuffix}{\glsxtremsuffix}% + \renewcommand*{\glsabbrvfont}[1]{\glsabbrvemfont{##1}}% + \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvemfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongemfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslongemfont{##1}}% + \renewcommand*{\glsxtrfullformat}[2]{% + \glsfirstabbrvemfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongemfont{\glsaccesslong{##1}}}% + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsfirstabbrvemfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongemfont{\glsaccesslongpl{##1}}}% + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \glsfirstabbrvemfont{\Glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongemfont{\glsaccesslong{##1}}}% + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \glsfirstabbrvemfont{\Glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongemfont{\glsaccesslongpl{##1}}}% + }% +} +\newabbreviationstyle{short-em-long-em-desc}% +{% + \glsxtrAccSuppAbbrSetTextShortAttrs\glscategorylabel + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrshortlongdescname},% + sort={\glsxtrshortlongdescsort},% + first={\protect\glsfirstabbrvemfont{\the\glsshorttok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \glsxtrparen{\protect\glsfirstlongemfont{\the\glslongtok}}},% + firstplural={\protect\glsfirstabbrvemfont{\the\glsshortpltok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \glsxtrparen{\protect\glsfirstlongemfont{\the\glslongpltok}}},% + text={\protect\glsabbrvemfont{\the\glsshorttok}},% + plural={\protect\glsabbrvemfont{\the\glsshortpltok}}% + }% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% + \GlsXtrUseAbbrStyleFmts{short-em-long-em}% +} +\newabbreviationstyle{short-em}% +{% + \glsxtrAccSuppAbbrSetNoLongAttrs\glscategorylabel + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrshortnolongname}, + sort={\the\glsshorttok}, + first={\protect\glsfirstabbrvemfont{\the\glsshorttok}}, + firstplural={\protect\glsfirstabbrvemfont{\the\glsshortpltok}}, + text={\protect\glsabbrvemfont{\the\glsshorttok}}, + plural={\protect\glsabbrvemfont{\the\glsshortpltok}}, + description={\the\glslongtok}}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glssetattribute{\the\glslabeltok}{regular}{true}}% +}% +{% + \renewcommand*{\abbrvpluralsuffix}{\glsxtremsuffix}% + \renewcommand*\glsabbrvfont[1]{\glsabbrvemfont{##1}}% + \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvemfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslongdefaultfont{##1}}% + \renewcommand*{\glsxtrinlinefullformat}[2]{% + \protect\glsfirstabbrvemfont{\glsaccessshort{##1}% + \ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongdefaultfont{\glsaccesslong{##1}}}% + }% + \renewcommand*{\glsxtrinlinefullplformat}[2]{% + \protect\glsfirstabbrvemfont{\glsaccessshortpl{##1}% + \ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongdefaultfont{\glsaccesslongpl{##1}}}% + }% + \renewcommand*{\Glsxtrinlinefullformat}[2]{% + \protect\glsfirstabbrvemfont{\Glsaccessshort{##1}% + \ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongdefaultfont{\glsaccesslong{##1}}}% + }% + \renewcommand*{\Glsxtrinlinefullplformat}[2]{% + \protect\glsfirstabbrvemfont{\Glsaccessshortpl{##1}% + \ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongdefaultfont{\glsaccesslongpl{##1}}}% + }% + \renewcommand*{\glsxtrfullformat}[2]{% + \glsfirstabbrvemfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsfirstabbrvemfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \glsfirstabbrvemfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \glsfirstabbrvemfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% +} +\letabbreviationstyle{short-em-nolong}{short-em} +\newabbreviationstyle{short-em-desc}% +{% + \glsxtrAccSuppAbbrSetNoLongAttrs\glscategorylabel + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrshortdescname}, + sort={\the\glsshorttok}, + first={\protect\glsfirstabbrvemfont{\the\glsshorttok}}, + firstplural={\protect\glsfirstabbrvemfont{\the\glsshortpltok}}, + text={\protect\glsabbrvemfont{\the\glsshorttok}}, + plural={\protect\glsabbrvemfont{\the\glsshortpltok}}}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glssetattribute{\the\glslabeltok}{regular}{true}}% +}% +{% + \renewcommand*{\abbrvpluralsuffix}{\glsxtremsuffix}% + \renewcommand*\glsabbrvfont[1]{\glsabbrvemfont{##1}}% + \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvemfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslongdefaultfont{##1}}% + \renewcommand*{\glsxtrinlinefullformat}[2]{% + \glsfirstabbrvemfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongdefaultfont{\glsaccesslong{##1}}}% + }% + \renewcommand*{\glsxtrinlinefullplformat}[2]{% + \glsfirstabbrvemfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongdefaultfont{\glsaccesslongpl{##1}}}% + }% + \renewcommand*{\Glsxtrinlinefullformat}[2]{% + \glsfirstabbrvemfont{\Glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongdefaultfont{\glsaccesslong{##1}}}% + }% + \renewcommand*{\Glsxtrinlinefullplformat}[2]{% + \glsfirstabbrvemfont{\Glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongdefaultfont{\glsaccesslongpl{##1}}}% + }% + \renewcommand*{\glsxtrfullformat}[2]{% + \glsfirstabbrvemfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsfirstabbrvemfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \glsfirstabbrvemfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \glsfirstabbrvemfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% +} +\letabbreviationstyle{short-em-nolong-desc}{short-em-desc} +\newabbreviationstyle{nolong-short-em}% +{% + \GlsXtrUseAbbrStyleSetup{short-em-nolong}% +}% +{% + \GlsXtrUseAbbrStyleFmts{short-em-nolong}% + \renewcommand*{\glsxtrinlinefullformat}[2]{% + \protect\glsfirstlongdefaultfont{\glsaccesslong{##1}% + \ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstabbrvemfont{\glsaccessshort{##1}}}% + }% + \renewcommand*{\glsxtrinlinefullplformat}[2]{% + \protect\glsfirstlongdefaultfont{\glsaccesslongpl{##1}% + \ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstabbrvemfont{\glsaccessshortpl{##1}}}% + }% + \renewcommand*{\Glsxtrinlinefullformat}[2]{% + \protect\glsfirstlongdefaultfont{\Glsaccesslong{##1}% + \ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstabbrvemfont{\glsaccessshort{##1}}}% + }% + \renewcommand*{\Glsxtrinlinefullplformat}[2]{% + \protect\glsfirstlongdefaultfont{\Glsaccesslongpl{##1}% + \ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstabbrvemfont{\glsaccessshortpl{##1}}}% + }% +} +\newabbreviationstyle{long-noshort-em}% +{% + \glsxtrAccSuppAbbrSetNameShortAttrs\glscategorylabel + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrlongnoshortname}, + sort={\the\glsshorttok}, + first={\protect\glsfirstlongdefaultfont{\the\glslongtok}}, + firstplural={\protect\glsfirstlongdefaultfont{\the\glslongpltok}}, + text={\protect\glslongdefaultfont{\the\glslongtok}}, + plural={\protect\glslongdefaultfont{\the\glslongpltok}},% + description={\the\glslongtok}% + }% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glssetattribute{\the\glslabeltok}{regular}{true}}% +}% +{% + \renewcommand*{\abbrvpluralsuffix}{\glsxtremsuffix}% + \renewcommand*\glsabbrvfont[1]{\glsabbrvemfont{##1}}% + \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvemfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslongdefaultfont{##1}}% + \renewcommand*{\glsxtrsubsequentfmt}[2]{% + \glslongdefaultfont{\glsaccesslong{##1}\ifglsxtrinsertinside ##2\fi}% + \ifglsxtrinsertinside \else##2\fi + }% + \renewcommand*{\glsxtrsubsequentplfmt}[2]{% + \glslongdefaultfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside ##2\fi}% + \ifglsxtrinsertinside \else##2\fi + }% + \renewcommand*{\Glsxtrsubsequentfmt}[2]{% + \glslongdefaultfont{\Glsaccesslong{##1}\ifglsxtrinsertinside ##2\fi}% + \ifglsxtrinsertinside \else##2\fi + }% + \renewcommand*{\Glsxtrsubsequentplfmt}[2]{% + \glslongdefaultfont{\Glsaccesslongpl{##1}\ifglsxtrinsertinside ##2\fi}% + \ifglsxtrinsertinside \else##2\fi + }% + \renewcommand*{\glsxtrinlinefullformat}[2]{% + \glsfirstlongdefaultfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\protect\glsfirstabbrvemfont{\glsaccessshort{##1}}}% + }% + \renewcommand*{\glsxtrinlinefullplformat}[2]{% + \glsfirstlongdefaultfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\protect\glsfirstabbrvemfont{\glsaccessshortpl{##1}}}% + }% + \renewcommand*{\Glsxtrinlinefullformat}[2]{% + \glsfirstlongdefaultfont{\Glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\protect\glsfirstabbrvemfont{\glsaccessshort{##1}}}% + }% + \renewcommand*{\Glsxtrinlinefullplformat}[2]{% + \glsfirstlongdefaultfont{\Glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\protect\glsfirstabbrvemfont{\glsaccessshortpl{##1}}}% + }% + \renewcommand*{\glsxtrfullformat}[2]{% + \glsfirstlongdefaultfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsfirstlongdefaultfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \glsfirstlongdefaultfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \glsfirstlongdefaultfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% +} +\@glsxtr@deprecated@abbrstyle{long-em}{long-noshort-em} +\newabbreviationstyle{long-em-noshort-em}% +{% + \glsxtrAccSuppAbbrSetNameShortAttrs\glscategorylabel + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrlongnoshortname}, + sort={\the\glsshorttok}, + first={\protect\glsfirstlongemfont{\the\glslongtok}}, + firstplural={\protect\glsfirstlongemfont{\the\glslongpltok}}, + text={\protect\glslongemfont{\the\glslongtok}}, + plural={\protect\glslongemfont{\the\glslongpltok}},% + description={\protect\glslongemfont{\the\glslongtok}}% + }% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glssetattribute{\the\glslabeltok}{regular}{true}}% +}% +{% + \renewcommand*{\abbrvpluralsuffix}{\glsxtremsuffix}% + \renewcommand*\glsabbrvfont[1]{\glsabbrvemfont{##1}}% + \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvemfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongemfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslongemfont{##1}}% + \renewcommand*{\glsxtrsubsequentfmt}[2]{% + \glslongemfont{\glsaccesslong{##1}\ifglsxtrinsertinside ##2\fi}% + \ifglsxtrinsertinside \else##2\fi + }% + \renewcommand*{\glsxtrsubsequentplfmt}[2]{% + \glslongemfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside ##2\fi}% + \ifglsxtrinsertinside \else##2\fi + }% + \renewcommand*{\Glsxtrsubsequentfmt}[2]{% + \glslongemfont{\Glsaccesslong{##1}\ifglsxtrinsertinside ##2\fi}% + \ifglsxtrinsertinside \else##2\fi + }% + \renewcommand*{\Glsxtrsubsequentplfmt}[2]{% + \glslongemfont{\Glsaccesslongpl{##1}\ifglsxtrinsertinside ##2\fi}% + \ifglsxtrinsertinside \else##2\fi + }% + \renewcommand*{\glsxtrinlinefullformat}[2]{% + \glsfirstlongemfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\protect\glsfirstabbrvemfont{\glsaccessshort{##1}}}% + }% + \renewcommand*{\glsxtrinlinefullplformat}[2]{% + \glsfirstlongemfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\protect\glsfirstabbrvemfont{\glsaccessshortpl{##1}}}% + }% + \renewcommand*{\Glsxtrinlinefullformat}[2]{% + \glsfirstlongemfont{\Glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\protect\glsfirstabbrvemfont{\glsaccessshort{##1}}}% + }% + \renewcommand*{\Glsxtrinlinefullplformat}[2]{% + \glsfirstlongemfont{\Glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\protect\glsfirstabbrvemfont{\glsaccessshortpl{##1}}}% + }% + \renewcommand*{\glsxtrfullformat}[2]{% + \glsfirstlongemfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsfirstlongemfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \glsfirstlongemfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \glsfirstlongemfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% +} +\newabbreviationstyle{long-em-noshort-em-noreg}% +{% + \glsxtrAccSuppAbbrSetNameShortAttrs\glscategorylabel + \GlsXtrUseAbbrStyleSetup{long-em-noshort-em}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% + \GlsXtrUseAbbrStyleFmts{long-em-noshort-em}% +} +\newabbreviationstyle{long-noshort-em-desc}% +{% + \GlsXtrUseAbbrStyleSetup{long-noshort-desc}% +}% +{% + \renewcommand*{\abbrvpluralsuffix}{\glsxtremsuffix}% + \renewcommand*\glsabbrvfont[1]{\glsabbrvemfont{##1}}% + \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvemfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslongdefaultfont{##1}}% + \renewcommand*{\glsxtrsubsequentfmt}[2]{% + \glslongdefaultfont{\glsaccesslong{##1}\ifglsxtrinsertinside ##2\fi}% + \ifglsxtrinsertinside \else##2\fi + }% + \renewcommand*{\glsxtrsubsequentplfmt}[2]{% + \glslongdefaultfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside ##2\fi}% + \ifglsxtrinsertinside \else##2\fi + }% + \renewcommand*{\Glsxtrsubsequentfmt}[2]{% + \glslongdefaultfont{\Glsaccesslong{##1}\ifglsxtrinsertinside ##2\fi}% + \ifglsxtrinsertinside \else##2\fi + }% + \renewcommand*{\Glsxtrsubsequentplfmt}[2]{% + \glslongdefaultfont{\Glsaccesslongpl{##1}\ifglsxtrinsertinside ##2\fi}% + \ifglsxtrinsertinside \else##2\fi + }% + \renewcommand*{\glsxtrinlinefullformat}[2]{% + \glsfirstlongdefaultfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\protect\glsfirstabbrvemfont{\glsaccessshort{##1}}}% + }% + \renewcommand*{\glsxtrinlinefullplformat}[2]{% + \glsfirstlongdefaultfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\protect\glsfirstabbrvemfont{\glsaccessshortpl{##1}}}% + }% + \renewcommand*{\Glsxtrinlinefullformat}[2]{% + \glsfirstlongdefaultfont{\Glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\protect\glsfirstabbrvemfont{\glsaccessshort{##1}}}% + }% + \renewcommand*{\Glsxtrinlinefullplformat}[2]{% + \glsfirstlongdefaultfont{\Glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\protect\glsfirstabbrvemfont{\glsaccessshortpl{##1}}}% + }% + \renewcommand*{\glsxtrfullformat}[2]{% + \glsfirstlongdefaultfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsfirstlongdefaultfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \glsfirstlongdefaultfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \glsfirstlongdefaultfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% +} +\@glsxtr@deprecated@abbrstyle{long-desc-em}{long-noshort-em-desc} +\newabbreviationstyle{long-em-noshort-em-desc}% +{% + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrlongnoshortdescname}, + sort={\the\glslongtok}, + first={\protect\glsfirstlongemfont{\the\glslongtok}}, + firstplural={\protect\glsfirstlongemfont{\the\glslongpltok}}, + text={\glslongemfont{\the\glslongtok}}, + plural={\glslongemfont{\the\glslongpltok}}% + }% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glssetattribute{\the\glslabeltok}{regular}{true}}% +}% +{% + \renewcommand*{\abbrvpluralsuffix}{\glsxtremsuffix}% + \renewcommand*\glsabbrvfont[1]{\glsabbrvemfont{##1}}% + \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvemfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongemfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslongemfont{##1}}% + \renewcommand*{\glsxtrsubsequentfmt}[2]{% + \glslongemfont{\glsaccesslong{##1}\ifglsxtrinsertinside ##2\fi}% + \ifglsxtrinsertinside \else##2\fi + }% + \renewcommand*{\glsxtrsubsequentplfmt}[2]{% + \glslongemfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside ##2\fi}% + \ifglsxtrinsertinside \else##2\fi + }% + \renewcommand*{\Glsxtrsubsequentfmt}[2]{% + \glslongemfont{\Glsaccesslong{##1}\ifglsxtrinsertinside ##2\fi}% + \ifglsxtrinsertinside \else##2\fi + }% + \renewcommand*{\Glsxtrsubsequentplfmt}[2]{% + \glslongemfont{\Glsaccesslongpl{##1}\ifglsxtrinsertinside ##2\fi}% + \ifglsxtrinsertinside \else##2\fi + }% + \renewcommand*{\glsxtrinlinefullformat}[2]{% + \glsfirstlongemfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\protect\glsfirstabbrvemfont{\glsaccessshort{##1}}}% + }% + \renewcommand*{\glsxtrinlinefullplformat}[2]{% + \glsfirstlongemfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\protect\glsfirstabbrvemfont{\glsaccessshortpl{##1}}}% + }% + \renewcommand*{\Glsxtrinlinefullformat}[2]{% + \glsfirstlongemfont{\Glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\protect\glsfirstabbrvemfont{\glsaccessshort{##1}}}% + }% + \renewcommand*{\Glsxtrinlinefullplformat}[2]{% + \glsfirstlongemfont{\Glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\protect\glsfirstabbrvemfont{\glsaccessshortpl{##1}}}% + }% + \renewcommand*{\glsxtrfullformat}[2]{% + \glsfirstlongemfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsfirstlongemfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \glsfirstlongemfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \glsfirstlongemfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% +} +\newabbreviationstyle{long-em-noshort-em-desc-noreg}% +{% + \GlsXtrUseAbbrStyleSetup{long-em-noshort-em-desc}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% + \GlsXtrUseAbbrStyleFmts{long-em-noshort-em-desc}% +} +\newabbreviationstyle{short-em-footnote}% +{% + \glsxtrAccSuppAbbrSetNoLongAttrs\glscategorylabel + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrfootnotename}, + sort={\the\glsshorttok}, + description={\the\glslongtok},% + first={\protect\glsfirstabbrvemfont{\the\glsshorttok}% + \protect\glsxtrabbrvfootnote{\the\glslabeltok}% + {\protect\glsfirstlongfootnotefont{\the\glslongtok}}},% + firstplural={\protect\glsfirstabbrvemfont{\the\glsshortpltok}% + \protect\glsxtrabbrvfootnote{\the\glslabeltok}% + {\protect\glsfirstlongfootnotefont{\the\glslongpltok}}},% + text={\protect\glsabbrvemfont{\the\glsshorttok}},% + plural={\protect\glsabbrvemfont{\the\glsshortpltok}}}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glssetattribute{\the\glslabeltok}{nohyperfirst}{true}% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% + \renewcommand*{\abbrvpluralsuffix}{\glsxtremsuffix}% + \renewcommand*\glsabbrvfont[1]{\glsabbrvemfont{##1}}% + \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvemfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongfootnotefont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslongfootnotefont{##1}}% + \renewcommand*{\glsxtrfullformat}[2]{% + \glsfirstabbrvemfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \protect\glsxtrabbrvfootnote{##1}% + {\glsfirstlongfootnotefont{\glsaccesslong{##1}}}% + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsfirstabbrvemfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \protect\glsxtrabbrvfootnote{##1}% + {\glsfirstlongfootnotefont{\glsaccesslongpl{##1}}}% + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \glsfirstabbrvemfont{\Glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \protect\glsxtrabbrvfootnote{##1}% + {\glsfirstlongfootnotefont{\glsaccesslong{##1}}}% + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \glsfirstabbrvemfont{\Glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \protect\glsxtrabbrvfootnote{##1}% + {\glsfirstlongfootnotefont{\glsaccesslongpl{##1}}}% + }% + \renewcommand*{\glsxtrinlinefullformat}[2]{% + \glsfirstabbrvemfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongfootnotefont{\glsaccesslong{##1}}}% + }% + \renewcommand*{\glsxtrinlinefullplformat}[2]{% + \glsfirstabbrvemfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongfootnotefont{\glsaccesslongpl{##1}}}% + }% + \renewcommand*{\Glsxtrinlinefullformat}[2]{% + \glsfirstabbrvemfont{\Glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongfootnotefont{\glsaccesslong{##1}}}% + }% + \renewcommand*{\Glsxtrinlinefullplformat}[2]{% + \glsfirstabbrvemfont{\Glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongfootnotefont{\glsaccesslongpl{##1}}}% + }% +} +\@glsxtr@deprecated@abbrstyle{footnote-em}{short-em-footnote} +\newabbreviationstyle{short-em-footnote-desc}% +{% + \glsxtrAccSuppAbbrSetNameLongAttrs\glscategorylabel + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrfootnotedescname}, + sort={\glsxtrfootnotedescsort}, + first={\protect\glsfirstabbrvemfont{\the\glsshorttok}% + \protect\glsxtrabbrvfootnote{\the\glslabeltok}% + {\protect\glsfirstlongfootnotefont{\the\glslongtok}}},% + firstplural={\protect\glsfirstabbrvemfont{\the\glsshortpltok}% + \protect\glsxtrabbrvfootnote{\the\glslabeltok}% + {\protect\glsfirstlongfootnotefont{\the\glslongpltok}}},% + text={\protect\glsabbrvemfont{\the\glsshorttok}},% + plural={\protect\glsabbrvemfont{\the\glsshortpltok}}}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glssetattribute{\the\glslabeltok}{nohyperfirst}{true}% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% + \GlsXtrUseAbbrStyleFmts{short-em-footnote}% +} +\newabbreviationstyle{short-em-postfootnote}% +{% + \glsxtrAccSuppAbbrSetNoLongAttrs\glscategorylabel + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrfootnotename}, + sort={\the\glsshorttok}, + description={\the\glslongtok},% + first={\protect\glsfirstabbrvemfont{\the\glsshorttok}},% + firstplural={\protect\glsfirstabbrvemfont{\the\glsshortpltok}},% + text={\protect\glsabbrvemfont{\the\glsshorttok}},% + plural={\protect\glsabbrvemfont{\the\glsshortpltok}}}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \csdef{glsxtrpostlink\glscategorylabel}{% + \glsxtrifwasfirstuse + {% + \glsxtrdopostpunc{\protect\glsxtrabbrvfootnote{\glslabel}% + {\glsfirstlongfootnotefont{\glsentrylong{\glslabel}}}}% + }% + {}% + }% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% + \renewcommand*{\glsxtrsetupfulldefs}{% + \let\glsxtrifwasfirstuse\@secondoftwo + }% +}% +{% + \renewcommand*{\abbrvpluralsuffix}{\glsxtremsuffix}% + \renewcommand*\glsabbrvfont[1]{\glsabbrvemfont{##1}}% + \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvemfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongfootnotefont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslongfootnotefont{##1}}% + \renewcommand*{\glsxtrfullformat}[2]{% + \glsfirstabbrvemfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsfirstabbrvemfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \glsfirstabbrvemfont{\Glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \glsfirstabbrvemfont{\Glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\glsxtrinlinefullformat}[2]{% + \glsfirstabbrvemfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongfootnotefont{\glsaccesslong{##1}}}% + }% + \renewcommand*{\glsxtrinlinefullplformat}[2]{% + \glsfirstabbrvemfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongfootnotefont{\glsaccesslongpl{##1}}}% + }% + \renewcommand*{\Glsxtrinlinefullformat}[2]{% + \glsfirstabbrvemfont{\Glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongfootnotefont{\glsaccesslong{##1}}}% + }% + \renewcommand*{\Glsxtrinlinefullplformat}[2]{% + \glsfirstabbrvemfont{\Glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi\glsxtrfullsep{##1}% + \glsxtrparen{\glsfirstlongfootnotefont{\glsaccesslongpl{##1}}}% + }% +} +\@glsxtr@deprecated@abbrstyle{postfootnote-em}{short-em-postfootnote} +\newabbreviationstyle{short-em-postfootnote-desc}% +{% + \glsxtrAccSuppAbbrSetNameLongAttrs\glscategorylabel + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrfootnotedescname}, + sort={\glsxtrfootnotedescsort}, + first={\protect\glsfirstabbrvemfont{\the\glsshorttok}},% + firstplural={\protect\glsfirstabbrvemfont{\the\glsshortpltok}},% + text={\protect\glsabbrvemfont{\the\glsshorttok}},% + plural={\protect\glsabbrvemfont{\the\glsshortpltok}}}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \csdef{glsxtrpostlink\glscategorylabel}{% + \glsxtrifwasfirstuse + {% + \glsxtrdopostpunc{\protect\glsxtrabbrvfootnote{\glslabel}% + {\glsfirstlongfootnotefont{\glsentrylong{\glslabel}}}}% + }% + {}% + }% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% + \renewcommand*{\glsxtrsetupfulldefs}{% + \let\glsxtrifwasfirstuse\@secondoftwo + }% +}% +{% + \GlsXtrUseAbbrStyleFmts{short-em-postfootnote}% +} +\newcommand*{\glsxtruserfield}{useri} +\ifdef\glscurrentfieldvalue +{ + \newcommand*{\glsxtruserparen}[2]{% + \glsxtrfullsep{#2}% + \glsxtrparen + {#1\ifglshasfield{\glsxtruserfield}{#2}{, \glscurrentfieldvalue}{}}% + } +} +{ + \newcommand*{\glsxtruserparen}[2]{% + \glsxtrfullsep{#2}% + \glsxtrparen + {#1\ifglshasfield{\glsxtruserfield}{#2}{, \@glo@thisvalue}{}}% + } +} +\newcommand*{\glsabbrvuserfont}[1]{\glsabbrvdefaultfont{#1}} +\newcommand*{\glsfirstabbrvuserfont}[1]{\glsabbrvuserfont{#1}} +\newcommand*{\glslonguserfont}[1]{\glslongdefaultfont{#1}} +\newcommand*{\glsfirstlonguserfont}[1]{\glslonguserfont{#1}} +\newcommand*{\glsxtrusersuffix}{\glsxtrabbrvpluralsuffix} +\newcommand*{\glsuserdescription}[2]{\glslonguserfont{#1}} +\newabbreviationstyle{long-short-user}% +{% + \glsxtrAccSuppAbbrSetFirstLongAttrs\glscategorylabel + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrlongshortname}, + sort={\the\glsshorttok}, + first={\protect\glsfirstlonguserfont{\the\glslongtok}% + \protect\glsxtruserparen{\protect\glsfirstabbrvuserfont{\the\glsshorttok}}% + {\the\glslabeltok}},% + firstplural={\protect\glsfirstlonguserfont{\the\glslongpltok}% + \protect\glsxtruserparen + {\protect\glsfirstabbrvuserfont{\the\glsshortpltok}}{\the\glslabeltok}},% + text={\protect\glsabbrvuserfont{\the\glsshorttok}},% + plural={\protect\glsabbrvuserfont{\the\glsshortpltok}},% + description={\protect\glsuserdescription{\the\glslongtok}% + {\the\glslabeltok}}}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% + \renewcommand*{\abbrvpluralsuffix}{\glsxtrusersuffix}% + \renewcommand*{\glsabbrvfont}[1]{\glsabbrvuserfont{##1}}% + \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvuserfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlonguserfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslonguserfont{##1}}% + \renewcommand*{\glsxtrfullformat}[2]{% + \glsfirstlonguserfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \glsxtruserparen{\glsfirstabbrvuserfont{\glsaccessshort{##1}}}{##1}% + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsfirstlonguserfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \glsxtruserparen{\glsfirstabbrvuserfont{\glsaccessshortpl{##1}}}{##1}% + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \glsfirstlonguserfont{\Glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \glsxtruserparen{\glsfirstabbrvuserfont{\glsaccessshort{##1}}}{##1}% + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \glsfirstlonguserfont{\Glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \glsxtruserparen{\glsfirstabbrvuserfont{\glsaccessshortpl{##1}}}{##1}% + }% +} +\newabbreviationstyle{long-postshort-user}% +{% + \glsxtrAccSuppAbbrSetFirstLongAttrs\glscategorylabel + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrlongshortname}, + sort={\the\glsshorttok}, + first={\protect\glsfirstlonguserfont{\the\glslongtok}},% + firstplural={\protect\glsfirstlonguserfont{\the\glslongpltok}},% + text={\protect\glsabbrvuserfont{\the\glsshorttok}},% + plural={\protect\glsabbrvuserfont{\the\glsshortpltok}},% + description={\protect\glsuserdescription{\the\glslongtok}% + {\the\glslabeltok}}}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \csdef{glsxtrpostlink\glscategorylabel}{% + \glsxtrifwasfirstuse + {% + \glsxtruserparen + {\glsfirstabbrvuserfont{\glsentryshort{\glslabel}}}% + {\glslabel}% + }% + {}% + }% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% + \renewcommand*{\abbrvpluralsuffix}{\glsxtrusersuffix}% + \renewcommand*{\glsabbrvfont}[1]{\glsabbrvuserfont{##1}}% + \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvuserfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlonguserfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslonguserfont{##1}}% + \renewcommand*{\glsxtrfullformat}[2]{% + \glsfirstlonguserfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsfirstlonguserfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \glsfirstlonguserfont{\Glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \glsfirstlonguserfont{\Glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\glsxtrinlinefullformat}[2]{% + \glsfirstlonguserfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \glsxtruserparen{\glsfirstabbrvuserfont{\glsaccessshort{##1}}}{##1}% + }% + \renewcommand*{\glsxtrinlinefullplformat}[2]{% + \glsfirstlonguserfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \glsxtruserparen{\glsfirstabbrvuserfont{\glsaccessshortpl{##1}}}{##1}% + }% + \renewcommand*{\Glsxtrinlinefullformat}[2]{% + \glsfirstlonguserfont{\Glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \glsxtruserparen{\glsfirstabbrvuserfont{\glsaccessshort{##1}}}{##1}% + }% + \renewcommand*{\Glsxtrinlinefullplformat}[2]{% + \glsfirstlonguserfont{\Glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \glsxtruserparen{\glsfirstabbrvuserfont{\glsaccessshortpl{##1}}}{##1}% + }% +} +\newcommand*{\glsabbrvscuserfont}{\glsabbrvscfont}% +\newcommand*{\glsfirstabbrvscuserfont}{\glsabbrvscuserfont}% +\newcommand*{\glsxtrscusersuffix}{\glsxtrscsuffix} +\newcommand*{\glsxtrlongshortscusername}{% + \protect\glsabbrvscuserfont{\the\glsshorttok}% +} +\newabbreviationstyle{long-postshort-sc-user}% +{% + \glsxtrAccSuppAbbrSetFirstLongAttrs\glscategorylabel + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrlongshortscusername}, + sort={\the\glsshorttok}, + first={\protect\glsfirstlonguserfont{\the\glslongtok}},% + firstplural={\protect\glsfirstlonguserfont{\the\glslongpltok}},% + text={\protect\glsabbrvscuserfont{\the\glsshorttok}},% + plural={\protect\glsabbrvscuserfont{\the\glsshortpltok}},% + description={\protect\glsuserdescription{\the\glslongtok}% + {\the\glslabeltok}}}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \csdef{glsxtrpostlink\glscategorylabel}{% + \glsxtrifwasfirstuse + {% + \glsxtruserparen + {\glsfirstabbrvscuserfont{\glsentryshort{\glslabel}}}% + {\glslabel}% + }% + {}% + }% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% + \renewcommand*{\abbrvpluralsuffix}{\glsxtrscusersuffix}% + \renewcommand*{\glsabbrvfont}[1]{\glsabbrvscuserfont{##1}}% + \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvscuserfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlonguserfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslonguserfont{##1}}% + \renewcommand*{\glsxtrfullformat}[2]{% + \glsfirstlonguserfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsfirstlonguserfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \glsfirstlonguserfont{\Glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \glsfirstlonguserfont{\Glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\glsxtrinlinefullformat}[2]{% + \glsfirstlonguserfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \glsxtruserparen{\glsfirstabbrvscuserfont{\glsaccessshort{##1}}}{##1}% + }% + \renewcommand*{\glsxtrinlinefullplformat}[2]{% + \glsfirstlonguserfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \glsxtruserparen{\glsfirstabbrvscuserfont{\glsaccessshortpl{##1}}}{##1}% + }% + \renewcommand*{\Glsxtrinlinefullformat}[2]{% + \glsfirstlonguserfont{\Glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \glsxtruserparen{\glsfirstabbrvscuserfont{\glsaccessshort{##1}}}{##1}% + }% + \renewcommand*{\Glsxtrinlinefullplformat}[2]{% + \glsfirstlonguserfont{\Glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \glsxtruserparen{\glsfirstabbrvscuserfont{\glsaccessshortpl{##1}}}{##1}% + }% +} +\newcommand*{\glsxtrlongshortuserdescname}{% + \protect\glslonguserfont{\the\glslongtok}% + \protect\glsxtruserparen + {\protect\glsabbrvuserfont{\the\glsshorttok}}{\the\glslabeltok}% +} +\newabbreviationstyle{long-postshort-user-desc}% +{% + \glsxtrAccSuppAbbrSetTextShortAttrs\glscategorylabel + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrlongshortuserdescname}, + sort={\the\glslongtok}, + first={\protect\glsfirstlonguserfont{\the\glslongtok}},% + firstplural={\protect\glsfirstlonguserfont{\the\glslongpltok}},% + text={\protect\glsabbrvuserfont{\the\glsshorttok}},% + plural={\protect\glsabbrvuserfont{\the\glsshortpltok}}% + }% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \csdef{glsxtrpostlink\glscategorylabel}{% + \glsxtrifwasfirstuse + {% + \glsxtruserparen + {\glsfirstabbrvuserfont{\glsentryshort{\glslabel}}}% + {\glslabel}% + }% + {}% + }% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% + \GlsXtrUseAbbrStyleFmts{long-postshort-user}% +} +\newcommand*{\glsxtrlongshortscuserdescname}{% + \protect\glslonguserfont{\the\glslongtok}% + \protect\glsxtruserparen + {\protect\glsabbrvscuserfont{\the\glsshorttok}}{\the\glslabeltok}% +} +\newabbreviationstyle{long-postshort-sc-user-desc}% +{% + \glsxtrAccSuppAbbrSetTextShortAttrs\glscategorylabel + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrlongshortscuserdescname}, + sort={\the\glslongtok}, + first={\protect\glsfirstlonguserfont{\the\glslongtok}},% + firstplural={\protect\glsfirstlonguserfont{\the\glslongpltok}},% + text={\protect\glsabbrvscuserfont{\the\glsshorttok}},% + plural={\protect\glsabbrvscuserfont{\the\glsshortpltok}}% + }% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \csdef{glsxtrpostlink\glscategorylabel}{% + \glsxtrifwasfirstuse + {% + \glsxtruserparen + {\glsfirstabbrvscuserfont{\glsentryshort{\glslabel}}}% + {\glslabel}% + }% + {}% + }% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% + \GlsXtrUseAbbrStyleFmts{long-postshort-sc-user}% +} +\newabbreviationstyle{short-postlong-user}% +{% + \glsxtrAccSuppAbbrSetFirstLongAttrs\glscategorylabel + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrshortlongname}, + sort={\the\glsshorttok}, + first={\protect\glsfirstlonguserfont{\the\glslongtok}},% + firstplural={\protect\glsfirstlonguserfont{\the\glslongpltok}},% + text={\protect\glsabbrvuserfont{\the\glsshorttok}},% + plural={\protect\glsabbrvuserfont{\the\glsshortpltok}},% + description={\protect\glsuserdescription{\the\glslongtok}% + {\the\glslabeltok}}}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \csdef{glsxtrpostlink\glscategorylabel}{% + \glsxtrifwasfirstuse + {% + \glsxtruserparen + {\glsfirstlonguserfont{\glsentrylong{\glslabel}}}% + {\glslabel}% + }% + {}% + }% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% + \renewcommand*{\abbrvpluralsuffix}{\glsxtrusersuffix}% + \renewcommand*{\glsabbrvfont}[1]{\glsabbrvuserfont{##1}}% + \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvuserfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlonguserfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslonguserfont{##1}}% + \renewcommand*{\glsxtrfullformat}[2]{% + \glsfirstabbrvuserfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsfirstabbrvuserfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \glsfirstabbrvuserfont{\Glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \glsfirstabbrvuserfont{\Glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\glsxtrinlinefullformat}[2]{% + \glsfirstabbrvuserfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \glsxtruserparen{\glsfirstlonguserfont{\glsaccesslong{##1}}}{##1}% + }% + \renewcommand*{\glsxtrinlinefullplformat}[2]{% + \glsfirstabbrvuserfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \glsxtruserparen{\glsfirstlonguserfont{\glsaccesslongpl{##1}}}{##1}% + }% + \renewcommand*{\Glsxtrinlinefullformat}[2]{% + \glsfirstabbrvuserfont{\Glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \glsxtruserparen{\glsfirstlonguserfont{\glsaccesslong{##1}}}{##1}% + }% + \renewcommand*{\Glsxtrinlinefullplformat}[2]{% + \glsfirstabbrvuserfont{\Glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \glsxtruserparen{\glsfirstlonguserfont{\glsaccesslongpl{##1}}}{##1}% + }% +} +\newcommand*{\glsxtrshortlonguserdescname}{% + \protect\glsabbrvuserfont{\the\glsshorttok}% + \protect\glsxtruserparen + {\protect\glslonguserfont{\the\glslongpltok}}% + {\the\glslabeltok}% +} +\newabbreviationstyle{short-postlong-user-desc}% +{% + \glsxtrAccSuppAbbrSetTextShortAttrs\glscategorylabel + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrshortlonguserdescname}, + sort={\the\glsshorttok}, + first={\protect\glsfirstlonguserfont{\the\glslongtok}},% + firstplural={\protect\glsfirstlonguserfont{\the\glslongpltok}},% + text={\protect\glsabbrvuserfont{\the\glsshorttok}},% + plural={\protect\glsabbrvuserfont{\the\glsshortpltok}}% + }% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \csdef{glsxtrpostlink\glscategorylabel}{% + \glsxtrifwasfirstuse + {% + \glsxtruserparen + {\glsfirstlonguserfont{\glsentrylong{\glslabel}}}% + {\glslabel}% + }% + {}% + }% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% + \GlsXtrUseAbbrStyleFmts{short-postlong-user}% +} +\newabbreviationstyle{long-short-user-desc}% +{% + \glsxtrAccSuppAbbrSetTextShortAttrs\glscategorylabel + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrlongshortuserdescname}, + sort={\glsxtrlongshortdescsort},% + first={\protect\glsfirstlonguserfont{\the\glslongtok}% + \protect\glsxtruserparen{\protect\glsfirstabbrvuserfont{\the\glsshorttok}}% + {\the\glslabeltok}},% + firstplural={\protect\glsfirstlonguserfont{\the\glslongpltok}% + \protect\glsxtruserparen + {\protect\glsfirstabbrvuserfont{\the\glsshortpltok}}{\the\glslabeltok}},% + text={\protect\glsabbrvfont{\the\glsshorttok}},% + plural={\protect\glsabbrvfont{\the\glsshortpltok}}% + }% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% + \GlsXtrUseAbbrStyleFmts{long-short-user}% +} +\newabbreviationstyle{short-long-user}% +{% + \glsxtrAccSuppAbbrSetFirstLongAttrs\glscategorylabel + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrshortlongname}, + sort={\the\glsshorttok}, + description={\protect\glsuserdescription{\the\glslongtok}% + {\the\glslabeltok}},% + first={\protect\glsfirstabbrvuserfont{\the\glsshorttok}% + \protect\glsxtruserparen{\protect\glsfirstlonguserfont{\the\glslongtok}}% + {\the\glslabeltok}},% + firstplural={\protect\glsfirstabbrvuserfont{\the\glsshortpltok}% + \protect\glsxtruserparen{\protect\glsfirstlonguserfont{\the\glslongpltok}}% + {\the\glslabeltok}},% + text={\protect\glsabbrvuserfont{\the\glsshorttok}},% + plural={\protect\glsabbrvuserfont{\the\glsshortpltok}}}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% + \renewcommand*{\abbrvpluralsuffix}{\glsxtrusersuffix}% + \renewcommand*\glsabbrvfont[1]{\glsabbrvuserfont{##1}}% + \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvuserfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlonguserfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslonguserfont{##1}}% + \renewcommand*{\glsxtrfullformat}[2]{% + \glsfirstabbrvuserfont{\glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \glsxtruserparen{\glsfirstlonguserfont{\glsaccesslong{##1}}}{##1}% + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsfirstabbrvuserfont{\glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \glsxtruserparen{\glsfirstlonguserfont{\glsaccesslongpl{##1}}}{##1}% + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \glsfirstabbrvuserfont{\Glsaccessshort{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \glsxtruserparen{\glsfirstlonguserfont{\glsaccesslong{##1}}}{##1}% + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \glsfirstabbrvuserfont{\Glsaccessshortpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \glsxtruserparen{\glsfirstlonguserfont{\glsaccesslongpl{##1}}}{##1}% + }% +} +\newabbreviationstyle{short-long-user-desc}% +{% + \glsxtrAccSuppAbbrSetTextShortAttrs\glscategorylabel + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrshortlonguserdescname}, + sort={\glsxtrshortlongdescsort},% + first={\protect\glsfirstabbrvuserfont{\the\glsshorttok}% + \protect\glsxtruserparen{\protect\glsfirstlonguserfont{\the\glslongtok}}% + {\the\glslabeltok}},% + firstplural={\protect\glsfirstabbrvuserfont{\the\glsshortpltok}% + \protect\glsxtruserparen{\protect\glsfirstlonguserfont{\the\glslongpltok}}% + {\the\glslabeltok}},% + text={\protect\glsabbrvfont{\the\glsshorttok}},% + plural={\protect\glsabbrvfont{\the\glsshortpltok}}% + }% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% + \GlsXtrUseAbbrStyleFmts{short-long-user}% +} +\newrobustcmd*{\glsxtrifhyphenstart}[3]{% + \ifx\glsinsert#1\relax + \expandafter\@glsxtrifhyphenstart#1\relax\relax + \@end@glsxtrifhyphenstart{#2}{#3}% + \else + \@glsxtrifhyphenstart#1\relax\relax\@end@glsxtrifhyphenstart{#2}{#3}% + \fi +} +\def\@glsxtrifhyphenstart#1#2\@end@glsxtrifhyphenstart#3#4{% + \ifx-#1\relax#3\else #4\fi +} +\newcommand*{\glsxtrlonghyphenshort}[4]{% + {% + \glsxtrifhyphenstart{#4}{\def\glsxtrwordsep{-}}{}% + \glsfirstlonghyphenfont{#2\ifglsxtrinsertinside{#4}\fi}% + \ifglsxtrinsertinside\else{#4}\fi + \glsxtrfullsep{#1}% + \glsxtrparen{\glsfirstabbrvhyphenfont{#3\ifglsxtrinsertinside{#4}\fi}% + \ifglsxtrinsertinside\else{#4}\fi}% + }% +} +\newcommand*{\glsabbrvhyphenfont}{\glsabbrvdefaultfont}% +\newcommand*{\glsfirstabbrvhyphenfont}{\glsabbrvhyphenfont}% +\newcommand*{\glslonghyphenfont}{\glslongdefaultfont}% +\newcommand*{\glsfirstlonghyphenfont}{\glslonghyphenfont}% +\newcommand*{\glsxtrhyphensuffix}{\glsxtrabbrvpluralsuffix} +\newabbreviationstyle{long-hyphen-short-hyphen}% +{% + \glsxtrAccSuppAbbrSetFirstLongAttrs\glscategorylabel + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrlongshortname}, + sort={\the\glsshorttok}, + first={\protect\glsfirstlonghyphenfont{\the\glslongtok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \glsxtrparen{\protect\glsfirstabbrvhyphenfont{\the\glsshorttok}}},% + firstplural={\protect\glsfirstlonghyphenfont{\the\glslongpltok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \glsxtrparen{\protect\glsfirstabbrvhyphenfont{\the\glsshortpltok}}},% + text={\protect\glsabbrvhyphenfont{\the\glsshorttok}},% + plural={\protect\glsabbrvhyphenfont{\the\glsshortpltok}},% + description={\protect\glslonghyphenfont{\the\glslongtok}}}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% + \renewcommand*{\abbrvpluralsuffix}{\glsxtrhyphensuffix}% + \renewcommand*{\glsabbrvfont}[1]{\glsabbrvhyphenfont{##1}}% + \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvhyphenfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlonghyphenfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslonghyphenfont{##1}}% + \renewcommand*{\glsxtrfullformat}[2]{% + \glsxtrlonghyphenshort{##1}{\glsaccesslong{##1}}{\glsaccessshort{##1}}{##2}% + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsxtrlonghyphenshort{##1}{\glsaccesslongpl{##1}}% + {\glsaccessshortpl{##1}}{##2}% + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \glsxtrlonghyphenshort{##1}{\Glsaccesslong{##1}}{\glsaccessshort{##1}}{##2}% + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \glsxtrlonghyphenshort{##1}{\Glsaccesslongpl{##1}}% + {\glsaccessshortpl{##1}}{##2}% + }% +} +\newabbreviationstyle{long-hyphen-short-hyphen-desc}% +{% + \glsxtrAccSuppAbbrSetTextShortAttrs\glscategorylabel + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrlongshortdescname}, + sort={\glsxtrlongshortdescsort}, + first={\protect\glsfirstlonghyphenfont{\the\glslongtok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \glsxtrparen{\protect\glsfirstabbrvhyphenfont{\the\glsshorttok}}},% + firstplural={\protect\glsfirstlonghyphenfont{\the\glslongpltok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \glsxtrparen{\protect\glsfirstabbrvhyphenfont{\the\glsshortpltok}}},% + text={\protect\glsabbrvhyphenfont{\the\glsshorttok}},% + plural={\protect\glsabbrvhyphenfont{\the\glsshortpltok}}% + }% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% + \GlsXtrUseAbbrStyleFmts{long-hyphen-short-hyphen}% +} +\newcommand*{\glsxtrlonghyphennoshort}[3]{% + {% + \glsxtrifhyphenstart{#3}{\def\glsxtrwordsep{-}}{}% + \glsfirstlonghyphenfont{#2\ifglsxtrinsertinside{#3}\fi}% + \ifglsxtrinsertinside\else{#3}\fi + }% +} +\newabbreviationstyle{long-hyphen-noshort-desc-noreg}% +{% + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrlongnoshortdescname}, + sort={\expandonce\glsxtrorglong}, + first={\protect\glsfirstlonghyphenfont{\the\glslongtok}},% + firstplural={\protect\glsfirstlonghyphenfont{\the\glslongpltok}},% + text={\protect\glslonghyphenfont{\the\glslongtok}},% + plural={\protect\glslonghyphenfont{\the\glslongpltok}}% + }% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% + \GlsXtrUseAbbrStyleFmts{long-hyphen-short-hyphen}% + \renewcommand*{\abbrvpluralsuffix}{\glsxtrabbrvpluralsuffix}% + \renewcommand*\glsabbrvfont[1]{\glsabbrvdefaultfont{##1}}% + \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvdefaultfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlonghyphenfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslonghyphenfont{##1}}% + \renewcommand*{\glsxtrsubsequentfmt}[2]{% + \glsxtrlonghyphennoshort{##1}{\glsaccesslong{##1}}{##2}% + }% + \renewcommand*{\glsxtrsubsequentplfmt}[2]{% + \glsxtrlonghyphennoshort{##1}{\glsaccesslongpl{##1}}{##2}% + }% + \renewcommand*{\Glsxtrsubsequentfmt}[2]{% + \glsxtrlonghyphennoshort{##1}{\Glsaccesslong{##1}}{##2}% + }% + \renewcommand*{\Glsxtrsubsequentplfmt}[2]{% + \glsxtrlonghyphennoshort{##1}{\Glsaccesslongpl{##1}}{##2}% + }% + \renewcommand*{\glsxtrinlinefullformat}[2]{% + \glsxtrlonghyphennoshort{##1}{\glsaccesslong{##1}}{##2}% + \glsxtrfullsep{##1}% + \glsxtrparen{\protect\glsfirstabbrvfont{\glsaccessshort{##1}}}% + }% + \renewcommand*{\glsxtrinlinefullplformat}[2]{% + \glsxtrlonghyphennoshort{##1}{\glsaccesslongpl{##1}}{##2}% + \glsxtrfullsep{##1}% + \glsxtrparen{\protect\glsfirstabbrvfont{\glsaccessshortpl{##1}}}% + }% + \renewcommand*{\Glsxtrinlinefullformat}[2]{% + \glsxtrlonghyphennoshort{##1}{\Glsaccesslong{##1}}{##2}% + \glsxtrfullsep{##1}% + \glsxtrparen{\protect\glsfirstabbrvfont{\glsaccessshort{##1}}}% + }% + \renewcommand*{\Glsxtrinlinefullplformat}[2]{% + \glsxtrlonghyphennoshort{##1}{\Glsaccesslongpl{##1}}{##2}% + \glsxtrfullsep{##1}% + \glsxtrparen{\protect\glsfirstabbrvfont{\glsaccessshortpl{##1}}}% + }% + \renewcommand*{\glsxtrfullformat}[2]{% + \glsxtrlonghyphennoshort{##1}{\glsaccesslong{##1}}{##2}% + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsxtrlonghyphennoshort{##1}{\glsaccesslongpl{##1}}{##2}% + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \glsxtrlonghyphennoshort{##1}{\Glsaccesslong{##1}}{##2}% + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \glsxtrlonghyphennoshort{##1}{\Glsaccesslongpl{##1}}{##2}% + }% +} +\newabbreviationstyle{long-hyphen-noshort-noreg}% +{% + \glsxtrAccSuppAbbrSetNameShortAttrs\glscategorylabel + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrlongnoshortname}, + sort={\the\glsshorttok}, + first={\protect\glsfirstlonghyphenfont{\the\glslongtok}},% + firstplural={\protect\glsfirstlonghyphenfont{\the\glslongpltok}},% + text={\protect\glslonghyphenfont{\the\glslongtok}},% + plural={\protect\glslonghyphenfont{\the\glslongpltok}},% + description={\the\glslongtok}% + }% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% + \GlsXtrUseAbbrStyleFmts{long-hyphen-noshort-desc-noreg}% +} +\newcommand*{\glsxtrlonghyphen}[3]{% + {% + \glsxtrifhyphenstart{#3}{\def\glsxtrwordsep{-}}{}% + \glsfirstlonghyphenfont{#1}% + }% +} +\newcommand*{\glsxtrposthyphenshort}[2]{% + {% + \glsxtrifhyphenstart{#2}{\def\glsxtrwordsep{-}}{}% + \ifglsxtrinsertinside{\glsfirstlonghyphenfont{#2}}\else{#2}\fi + \glsxtrfullsep{#1}% + \glsxtrparen + {\glsfirstabbrvhyphenfont{\glsentryshort{#1}\ifglsxtrinsertinside{#2}\fi}% + \ifglsxtrinsertinside\else{#2}\fi + }% + }% +} +\newcommand*{\glsxtrposthyphensubsequent}[2]{% + \glsabbrvfont{\ifglsxtrinsertinside {#2}\fi}% + \ifglsxtrinsertinside \else{#2}\fi +} +\newabbreviationstyle{long-hyphen-postshort-hyphen}% +{% + \glsxtrAccSuppAbbrSetFirstLongAttrs\glscategorylabel + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrlongshortname}, + sort={\the\glsshorttok}, + first={\protect\glsfirstlonghyphenfont{\the\glslongtok}},% + firstplural={\protect\glsfirstlonghyphenfont{\the\glslongpltok}},% + text={\protect\glsabbrvhyphenfont{\the\glsshorttok}},% + plural={\protect\glsabbrvhyphenfont{\the\glsshortpltok}},% + description={\protect\glslonghyphenfont{\the\glslongtok}}}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \csdef{glsxtrpostlink\glscategorylabel}{% + \glsxtrifwasfirstuse + {% + \glsxtrposthyphenshort{\glslabel}{\glsinsert}% + }% + {% + \glsxtrposthyphensubsequent{\glslabel}{\glsinsert}% + }% + }% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% + \renewcommand*{\abbrvpluralsuffix}{\glsxtrabbrvpluralsuffix}% + \renewcommand*{\glsabbrvfont}[1]{\glsabbrvhyphenfont{##1}}% + \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvhyphenfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlonghyphenfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslonghyphenfont{##1}}% + \renewcommand*{\glsxtrsubsequentfmt}[2]{% + \glsabbrvfont{\glsaccessshort{##1}}% + }% + \renewcommand*{\glsxtrsubsequentplfmt}[2]{% + \glsabbrvfont{\glsaccessshortpl{##1}}% + }% + \renewcommand*{\Glsxtrsubsequentfmt}[2]{% + \glsabbrvfont{\Glsaccessshort{##1}}% + }% + \renewcommand*{\Glsxtrsubsequentplfmt}[2]{% + \glsabbrvfont{\Glsaccessshortpl{##1}}% + }% + \renewcommand*{\glsxtrfullformat}[2]{% + \glsxtrlonghyphen{\glsaccesslong{##1}}{##1}{##2}% + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsxtrlonghyphen{\glsaccesslongpl{##1}}{##1}{##2}% + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \glsxtrlonghyphen{\Glsaccesslong{##1}}{##1}{##2}% + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \glsxtrlonghyphen{\Glsaccesslongpl{##1}}{##1}{##2}% + }% + \renewcommand*{\glsxtrinlinefullformat}[2]{% + \glsfirstlonghyphenfont{\glsaccesslong{##1}% + \ifglsxtrinsertinside{##2}\fi}% + \ifglsxtrinsertinside \else{##2}\fi + }% + \renewcommand*{\glsxtrinlinefullplformat}[2]{% + \glsfirstlonghyphenfont{\glsaccesslongpl{##1}% + \ifglsxtrinsertinside{##2}\fi}% + \ifglsxtrinsertinside \else{##2}\fi + }% + \renewcommand*{\Glsxtrinlinefullformat}[2]{% + \glsfirstlonghyphenfont{\Glsaccesslong{##1}% + \ifglsxtrinsertinside{##2}\fi}% + \ifglsxtrinsertinside \else{##2}\fi + }% + \renewcommand*{\Glsxtrinlinefullplformat}[2]{% + \glsfirstlonghyphenfont{\Glsaccesslongpl{##1}% + \ifglsxtrinsertinside{##2}\fi}% + \ifglsxtrinsertinside \else{##2}\fi + }% +} +\newabbreviationstyle{long-hyphen-postshort-hyphen-desc}% +{% + \glsxtrAccSuppAbbrSetTextShortAttrs\glscategorylabel + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrlongshortdescname}, + sort={\glsxtrlongshortdescsort},% + first={\protect\glsfirstlonghyphenfont{\the\glslongtok}},% + firstplural={\protect\glsfirstlonghyphenfont{\the\glslongpltok}},% + text={\protect\glsabbrvhyphenfont{\the\glsshorttok}},% + plural={\protect\glsabbrvhyphenfont{\the\glsshortpltok}}% + }% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \csdef{glsxtrpostlink\glscategorylabel}{% + \glsxtrifwasfirstuse + {% + \glsxtrposthyphenshort{\glslabel}{\glsinsert}% + }% + {% + \glsxtrposthyphensubsequent{\glslabel}{\glsinsert}% + }% + }% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% + \GlsXtrUseAbbrStyleFmts{long-hyphen-postshort-hyphen}% +} +\newcommand*{\glsxtrshorthyphenlong}[4]{% + {% + \glsxtrifhyphenstart{#4}{\def\glsxtrwordsep{-}}{}% + \glsfirstabbrvhyphenfont{#2\ifglsxtrinsertinside{#4}\fi}% + \ifglsxtrinsertinside\else{#4}\fi + \glsxtrfullsep{#1}% + \glsxtrparen{\glsfirstlonghyphenfont{#3\ifglsxtrinsertinside{#4}\fi}% + \ifglsxtrinsertinside\else{#4}\fi}% + }% +} +\newabbreviationstyle{short-hyphen-long-hyphen}% +{% + \glsxtrAccSuppAbbrSetFirstLongAttrs\glscategorylabel + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrshortlongname}, + sort={\the\glsshorttok}, + first={\protect\glsfirstabbrvhyphenfont{\the\glsshorttok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \glsxtrparen{\protect\glsfirstlonghyphenfont{\the\glslongtok}}},% + firstplural={\protect\glsfirstabbrvhyphenfont{\the\glsshortpltok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \glsxtrparen{\protect\glsfirstlonghyphenfont{\the\glslongpltok}}},% + text={\protect\glsabbrvhyphenfont{\the\glsshorttok}},% + plural={\protect\glsabbrvhyphenfont{\the\glsshortpltok}},% + description={\protect\glslonghyphenfont{\the\glslongtok}}}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% + \renewcommand*{\abbrvpluralsuffix}{\glsxtrhyphensuffix}% + \renewcommand*{\glsabbrvfont}[1]{\glsabbrvhyphenfont{##1}}% + \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvhyphenfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlonghyphenfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslonghyphenfont{##1}}% + \renewcommand*{\glsxtrfullformat}[2]{% + \glsxtrshorthyphenlong{##1}{\glsaccessshort{##1}}{\glsaccesslong{##1}}{##2}% + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsxtrshorthyphenlong{##1}% + {\glsaccessshortpl{##1}}{\glsaccesslongpl{##1}}{##2}% + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \glsxtrshorthyphenlong{##1}{\glsaccessshort{##1}}{\Glsaccesslong{##1}}{##2}% + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \glsxtrshorthyphenlong{##1}% + {\glsaccessshortpl{##1}}{\Glsaccesslongpl{##1}}{##2}% + }% +} +\newabbreviationstyle{short-hyphen-long-hyphen-desc}% +{% + \glsxtrAccSuppAbbrSetTextShortAttrs\glscategorylabel + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrshortlongdescname}, + sort={\glsxtrshortlongdescsort}, + first={\protect\glsfirstabbrvhyphenfont{\the\glsshorttok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \glsxtrparen{\protect\glsfirstlonghyphenfont{\the\glslongtok}}},% + firstplural={\protect\glsfirstabbrvhyphenfont{\the\glsshortpltok}% + \protect\glsxtrfullsep{\the\glslabeltok}% + \glsxtrparen{\protect\glsfirstlonghyphenfont{\the\glslongpltok}}},% + text={\protect\glsabbrvhyphenfont{\the\glsshorttok}},% + plural={\protect\glsabbrvhyphenfont{\the\glsshortpltok}}% + }% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% + \GlsXtrUseAbbrStyleFmts{short-hyphen-long-hyphen}% +} +\newcommand*{\glsxtrshorthyphen}[3]{% + {% + \glsxtrifhyphenstart{#3}{\def\glsxtrwordsep{-}}{}% + \glsfirstabbrvhyphenfont{#1}% + }% +} +\newcommand*{\glsxtrposthyphenlong}[2]{% + {% + \glsxtrifhyphenstart{#2}{\def\glsxtrwordsep{-}}{}% + \ifglsxtrinsertinside{\glsfirstabbrvhyphenfont{#2}}\else{#2}\fi + \glsxtrfullsep{#1}% + \glsxtrparen + {\glsfirstlonghyphenfont{\glsentrylong{#1}\ifglsxtrinsertinside{#2}\fi}% + \ifglsxtrinsertinside\else{#2}\fi + }% + }% +} +\newabbreviationstyle{short-hyphen-postlong-hyphen}% +{% + \glsxtrAccSuppAbbrSetFirstLongAttrs\glscategorylabel + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrshortlongname}, + sort={\the\glsshorttok}, + first={\protect\glsfirstabbrvhyphenfont{\the\glsshorttok}},% + firstplural={\protect\glsfirstabbrvhyphenfont{\the\glsshortpltok}},% + text={\protect\glsabbrvhyphenfont{\the\glsshorttok}},% + plural={\protect\glsabbrvhyphenfont{\the\glsshortpltok}},% + description={\protect\glslonghyphenfont{\the\glslongtok}}}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \csdef{glsxtrpostlink\glscategorylabel}{% + \glsxtrifwasfirstuse + {% + \glsxtrposthyphenlong{\glslabel}{\glsinsert}% + }% + {% + \glsxtrposthyphensubsequent{\glslabel}{\glsinsert}% + }% + }% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% + \renewcommand*{\abbrvpluralsuffix}{\glsxtrabbrvpluralsuffix}% + \renewcommand*{\glsabbrvfont}[1]{\glsabbrvhyphenfont{##1}}% + \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvhyphenfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlonghyphenfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslonghyphenfont{##1}}% + \renewcommand*{\glsxtrsubsequentfmt}[2]{% + \glsabbrvfont{\glsaccessshort{##1}}% + }% + \renewcommand*{\glsxtrsubsequentplfmt}[2]{% + \glsabbrvfont{\glsaccessshortpl{##1}}% + }% + \renewcommand*{\Glsxtrsubsequentfmt}[2]{% + \glsabbrvfont{\Glsaccessshort{##1}}% + }% + \renewcommand*{\Glsxtrsubsequentplfmt}[2]{% + \glsabbrvfont{\Glsaccessshortpl{##1}}% + }% + \renewcommand*{\glsxtrfullformat}[2]{% + \glsxtrshorthyphen{\glsaccessshort{##1}}{##1}{##2}% + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsxtrshorthyphen{\glsaccessshortpl{##1}}{##1}{##2}% + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \glsxtrshorthyphen{\Glsaccessshort{##1}}{##1}{##2}% + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \glsxtrshorthyphen{\Glsaccessshortpl{##1}}{##1}{##2}% + }% + \renewcommand*{\glsxtrinlinefullformat}[2]{% + \glsfirstabbrvhyphenfont{\glsaccessshort{##1}% + \ifglsxtrinsertinside{##2}\fi}% + \ifglsxtrinsertinside \else{##2}\fi + }% + \renewcommand*{\glsxtrinlinefullplformat}[2]{% + \glsfirstabbrvhyphenfont{\glsaccessshortpl{##1}% + \ifglsxtrinsertinside{##2}\fi}% + \ifglsxtrinsertinside \else{##2}\fi + }% + \renewcommand*{\Glsxtrinlinefullformat}[2]{% + \glsfirstabbrvhyphenfont{\Glsaccessshort{##1}% + \ifglsxtrinsertinside{##2}\fi}% + \ifglsxtrinsertinside \else{##2}\fi + }% + \renewcommand*{\Glsxtrinlinefullplformat}[2]{% + \glsfirstabbrvhyphenfont{\Glsaccessshortpl{##1}% + \ifglsxtrinsertinside{##2}\fi}% + \ifglsxtrinsertinside \else{##2}\fi + }% +} +\newabbreviationstyle{short-hyphen-postlong-hyphen-desc}% +{% + \glsxtrAccSuppAbbrSetTextShortAttrs\glscategorylabel + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrshortlongdescname}, + sort={\glsxtrshortlongdescsort},% + first={\protect\glsfirstabbrvhyphenfont{\the\glsshorttok}},% + firstplural={\protect\glsfirstabbrvhyphenfont{\the\glsshortpltok}},% + text={\protect\glsabbrvhyphenfont{\the\glsshorttok}},% + plural={\protect\glsabbrvhyphenfont{\the\glsshortpltok}}% + }% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \csdef{glsxtrpostlink\glscategorylabel}{% + \glsxtrifwasfirstuse + {% + \glsxtrposthyphenlong{\glslabel}{\glsinsert}% + }% + {% + \glsxtrposthyphensubsequent{\glslabel}{\glsinsert}% + }% + }% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% + \GlsXtrUseAbbrStyleFmts{short-hyphen-postlong-hyphen}% +} +\newcommand*{\glsabbrvonlyfont}{\glsabbrvdefaultfont}% +\newcommand*{\glsfirstabbrvonlyfont}{\glsabbrvonlyfont}% +\newcommand*{\glslongonlyfont}{\glslongdefaultfont}% +\newcommand*{\glsfirstlongonlyfont}{\glslongonlyfont}% +\newcommand*{\glsxtronlysuffix}{\glsxtrabbrvpluralsuffix} +\newcommand*{\glsxtronlyname}{% + \protect\glsabbrvonlyfont{\the\glsshorttok}% +} +\newabbreviationstyle{long-only-short-only}% +{% + \glsxtrAccSuppAbbrSetFirstLongAttrs\glscategorylabel + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtronlyname}, + sort={\the\glsshorttok}, + first={\protect\glsfirstlongonlyfont{\the\glslongtok}},% + firstplural={\protect\glsfirstlongonlyfont{\the\glslongpltok}},% + text={\protect\glsabbrvonlyfont{\the\glsshorttok}},% + plural={\protect\glsabbrvonlyfont{\the\glsshortpltok}},% + description={\protect\glslongonlyfont{\the\glslongtok}}}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% + \renewcommand*{\abbrvpluralsuffix}{\glsxtronlysuffix}% + \renewcommand*{\glsabbrvfont}[1]{\glsabbrvonlyfont{##1}}% + \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvonlyfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongonlyfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslongonlyfont{##1}}% + \renewcommand*{\glsxtrfullformat}[2]{% + \glsfirstlongonlyfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsfirstlongonlyfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \glsfirstlongonlyfont{\Glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \glsfirstlongonlyfont{\Glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\glsxtrinlinefullformat}[2]{% + \glsfirstlongonlyfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \glsxtrfullsep{##1}% + \glsxtrparen{\protect\glsfirstabbrvonlyfont{\glsaccessshort{##1}}}% + }% + \renewcommand*{\glsxtrinlinefullplformat}[2]{% + \glsfirstlongonlyfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \glsxtrfullsep{##1}% + \glsxtrparen{\protect\glsfirstabbrvonlyfont{\glsaccessshortpl{##1}}}% + }% + \renewcommand*{\Glsxtrinlinefullformat}[2]{% + \glsfirstlongonlyfont{\Glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \glsxtrfullsep{##1}% + \glsxtrparen{\protect\glsfirstabbrvonlyfont{\glsaccessshortpl{##1}}}% + }% + \renewcommand*{\Glsxtrinlinefullplformat}[2]{% + \glsfirstlongonlyfont{\Glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \glsxtrfullsep{##1}% + \glsxtrparen{\protect\glsfirstabbrvonlyfont{\Glsaccessshortpl{##1}}}% + }% +} +\newcommand*{\glsxtronlydescsort}{\the\glslongtok} +\newcommand*{\glsxtronlydescname}{% + \protect\glslongfont{\the\glslongtok}% +} +\newabbreviationstyle{long-only-short-only-desc}% +{% + \glsxtrAccSuppAbbrSetTextShortAttrs\glscategorylabel + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtronlydescname}, + sort={\glsxtronlydescsort},% + first={\protect\glsfirstlongonlyfont{\the\glslongtok}},% + firstplural={\protect\glsfirstlongonlyfont{\the\glslongpltok}},% + text={\protect\glsabbrvonlyfont{\the\glsshorttok}},% + plural={\protect\glsabbrvonlyfont{\the\glsshortpltok}}% + }% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% + \GlsXtrUseAbbrStyleFmts{long-only-short-only}% +} +\newcommand*{\glsabbrvsconlyfont}{\glsabbrvscfont}% +\newcommand*{\glsfirstabbrvsconlyfont}{\glsabbrvsconlyfont}% +\newcommand*{\glsxtrsconlysuffix}{\glsxtrscsuffix} +\newcommand*{\glsxtrsconlyname}{% + \protect\glsabbrvsconlyfont{\the\glsshorttok}% +} +\newabbreviationstyle{long-only-short-sc-only}% +{% + \glsxtrAccSuppAbbrSetFirstLongAttrs\glscategorylabel + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrsconlyname}, + sort={\the\glsshorttok}, + first={\protect\glsfirstlongonlyfont{\the\glslongtok}},% + firstplural={\protect\glsfirstlongonlyfont{\the\glslongpltok}},% + text={\protect\glsabbrvsconlyfont{\the\glsshorttok}},% + plural={\protect\glsabbrvsconlyfont{\the\glsshortpltok}},% + description={\protect\glslongonlyfont{\the\glslongtok}}}% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% + \renewcommand*{\abbrvpluralsuffix}{\glsxtrsconlysuffix}% + \renewcommand*{\glsabbrvfont}[1]{\glsabbrvsconlyfont{##1}}% + \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvsconlyfont{##1}}% + \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongonlyfont{##1}}% + \renewcommand*{\glslongfont}[1]{\glslongonlyfont{##1}}% + \renewcommand*{\glsxtrfullformat}[2]{% + \glsfirstlongonlyfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\glsxtrfullplformat}[2]{% + \glsfirstlongonlyfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\Glsxtrfullformat}[2]{% + \glsfirstlongonlyfont{\Glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\Glsxtrfullplformat}[2]{% + \glsfirstlongonlyfont{\Glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + }% + \renewcommand*{\glsxtrinlinefullformat}[2]{% + \glsfirstlongonlyfont{\glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \glsxtrfullsep{##1}% + \glsxtrparen{\protect\glsfirstabbrvsconlyfont{\glsaccessshort{##1}}}% + }% + \renewcommand*{\glsxtrinlinefullplformat}[2]{% + \glsfirstlongonlyfont{\glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \glsxtrfullsep{##1}% + \glsxtrparen{\protect\glsfirstabbrvsconlyfont{\glsaccessshortpl{##1}}}% + }% + \renewcommand*{\Glsxtrinlinefullformat}[2]{% + \glsfirstlongonlyfont{\Glsaccesslong{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \glsxtrfullsep{##1}% + \glsxtrparen{\protect\glsfirstabbrvsconlyfont{\glsaccessshortpl{##1}}}% + }% + \renewcommand*{\Glsxtrinlinefullplformat}[2]{% + \glsfirstlongonlyfont{\Glsaccesslongpl{##1}\ifglsxtrinsertinside##2\fi}% + \ifglsxtrinsertinside\else##2\fi + \glsxtrfullsep{##1}% + \glsxtrparen{\protect\glsfirstabbrvsconlyfont{\Glsaccessshortpl{##1}}}% + }% +} +\newcommand*{\glsxtrsconlydescsort}{\glsxtronlydescsort} +\newcommand*{\glsxtrsconlydescname}{\glsxtronlydescname} +\newabbreviationstyle{long-only-short-sc-only-desc}% +{% + \glsxtrAccSuppAbbrSetTextShortAttrs\glscategorylabel + \renewcommand*{\CustomAbbreviationFields}{% + name={\glsxtrsconlydescname}, + sort={\glsxtrsconlydescsort},% + first={\protect\glsfirstlongonlyfont{\the\glslongtok}},% + firstplural={\protect\glsfirstlongonlyfont{\the\glslongpltok}},% + text={\protect\glsabbrvsconlyfont{\the\glsshorttok}},% + plural={\protect\glsabbrvsconlyfont{\the\glsshortpltok}}% + }% + \renewcommand*{\GlsXtrPostNewAbbreviation}{% + \glshasattribute{\the\glslabeltok}{regular}% + {% + \glssetattribute{\the\glslabeltok}{regular}{false}% + }% + {}% + }% +}% +{% + \GlsXtrUseAbbrStyleFmts{long-only-short-sc-only}% +} +\let\@glsxtr@org@markright\markright +\renewcommand*{\markright}[1]{% + \glsxtrmarkhook + \@glsxtr@org@markright{\@glsxtrinmark#1\@glsxtrnotinmark}% + \glsxtrrestoremarkhook +} +\let\@glsxtr@org@markboth\markboth +\renewcommand*{\markboth}[2]{% + \glsxtrmarkhook + \@glsxtr@org@markboth + {\@glsxtrinmark#1\@glsxtrnotinmark}% + {\@glsxtrinmark#2\@glsxtrnotinmark}% + \glsxtrrestoremarkhook +} +\let\@glsxtr@org@@starttoc\@starttoc +\renewcommand*{\@starttoc}[1]{% + \glsxtrmarkhook + \@glsxtrinmark + \@glsxtr@org@@starttoc{#1}% + \@glsxtrnotinmark + \glsxtrrestoremarkhook +} +\newcommand*{\glsxtrRevertMarks}{% + \let\markright\@glsxtr@org@markright + \let\markboth\@glsxtr@org@markboth + \let\@starttoc\@glsxtr@org@@starttoc +} +\newcommand*{\glsxtrRevertTocMarks}{% + \let\@starttoc\@glsxtr@org@@starttoc +} +\newcommand*{\glsxtrifinmark}[2]{#2} +\newrobustcmd*{\@glsxtrinmark}{% + \let\glsxtrifinmark\@firstoftwo +} +\newrobustcmd*{\@glsxtrnotinmark}{% + \let\glsxtrifinmark\@secondoftwo +} +\ifdef\texorpdfstring +{ + \newcommand*{\glsxtrtitleorpdforheading}[3]{\texorpdfstring{#1}{#2}} +} +{ + \newcommand*{\glsxtrtitleorpdforheading}[3]{#1} +} +\newcommand*{\glsxtrmarkhook}{% + \let\@glsxtr@org@MakeUppercase\MakeUppercase + \let\@glsxtr@org@glsxtrtitleorpdforheading\glsxtrtitleorpdforheading + \let\@glsxtr@org@glsxtrtitleshort\glsxtrtitleshort + \let\@glsxtr@org@glsxtrtitleshortpl\glsxtrtitleshortpl + \let\@glsxtr@org@Glsxtrtitleshort\Glsxtrtitleshort + \let\@glsxtr@org@Glsxtrtitleshortpl\Glsxtrtitleshortpl + \let\@glsxtr@org@glsxtrtitlename\glsxtrtitlename + \let\@glsxtr@org@Glsxtrtitlename\Glsxtrtitlename + \let\@glsxtr@org@glsxtrtitletext\glsxtrtitletext + \let\@glsxtr@org@Glsxtrtitletext\Glsxtrtitletext + \let\@glsxtr@org@glsxtrtitleplural\glsxtrtitleplural + \let\@glsxtr@org@Glsxtrtitleplural\Glsxtrtitleplural + \let\@glsxtr@org@glsxtrtitlefirst\glsxtrtitlefirst + \let\@glsxtr@org@Glsxtrtitlefirst\Glsxtrtitlefirst + \let\@glsxtr@org@glsxtrtitlefirstplural\glsxtrtitlefirstplural + \let\@glsxtr@org@Glsxtrtitlefirstplural\Glsxtrtitlefirstplural + \let\@glsxtr@org@glsxtrtitlelong\glsxtrtitlelong + \let\@glsxtr@org@glsxtrtitlelongpl\glsxtrtitlelongpl + \let\@glsxtr@org@Glsxtrtitlelong\Glsxtrtitlelong + \let\@glsxtr@org@Glsxtrtitlelongpl\Glsxtrtitlelongpl + \let\@glsxtr@org@glsxtrtitlefull\glsxtrtitlefull + \let\@glsxtr@org@glsxtrtitlefullpl\glsxtrtitlefullpl + \let\@glsxtr@org@Glsxtrtitlefull\Glsxtrtitlefull + \let\@glsxtr@org@Glsxtrtitlefullpl\Glsxtrtitlefullpl + \let\glsxtrifinmark\@firstoftwo + \let\MakeUppercase\MakeTextUppercase + \let\glsxtrtitleorpdforheading\@thirdofthree + \let\glsxtrtitleshort\glsxtrheadshort + \let\glsxtrtitleshortpl\glsxtrheadshortpl + \let\Glsxtrtitleshort\Glsxtrheadshort + \let\Glsxtrtitleshortpl\Glsxtrheadshortpl + \let\glsxtrtitlename\glsxtrheadname + \let\Glsxtrtitlename\Glsxtrheadname + \let\glsxtrtitletext\glsxtrheadtext + \let\Glsxtrtitletext\Glsxtrheadtext + \let\glsxtrtitleplural\glsxtrheadplural + \let\Glsxtrtitleplural\Glsxtrheadplural + \let\glsxtrtitlefirst\glsxtrheadfirst + \let\Glsxtrtitlefirst\Glsxtrheadfirst + \let\glsxtrtitlefirstplural\glsxtrheadfirstplural + \let\Glsxtrtitlefirstplural\Glsxtrheadfirstplural + \let\glsxtrtitlelong\glsxtrheadlong + \let\glsxtrtitlelongpl\glsxtrheadlongpl + \let\Glsxtrtitlelong\Glsxtrheadlong + \let\Glsxtrtitlelongpl\Glsxtrheadlongpl + \let\glsxtrtitlefull\glsxtrheadfull + \let\glsxtrtitlefullpl\glsxtrheadfullpl + \let\Glsxtrtitlefull\Glsxtrheadfull + \let\Glsxtrtitlefullpl\Glsxtrheadfullpl +} +\newcommand*{\glsxtrrestoremarkhook}{% + \let\glsxtrifinmark\@secondoftwo + \let\MakeUppercase\@glsxtr@org@MakeUppercase + \let\glsxtrtitleorpdforheading\@glsxtr@org@glsxtrtitleorpdforheading + \let\glsxtrtitleshort\@glsxtr@org@glsxtrtitleshort + \let\glsxtrtitleshortpl\@glsxtr@org@glsxtrtitleshortpl + \let\Glsxtrtitleshort\@glsxtr@org@Glsxtrtitleshort + \let\Glsxtrtitleshortpl\@glsxtr@org@Glsxtrtitleshortpl + \let\glsxtrtitlename\@glsxtr@org@glsxtrtitlename + \let\Glsxtrtitlename\@glsxtr@org@Glsxtrtitlename + \let\glsxtrtitletext\@glsxtr@org@glsxtrtitletext + \let\Glsxtrtitletext\@glsxtr@org@Glsxtrtitletext + \let\glsxtrtitleplural\@glsxtr@org@glsxtrtitleplural + \let\Glsxtrtitleplural\@glsxtr@org@Glsxtrtitleplural + \let\glsxtrtitlefirst\@glsxtr@org@glsxtrtitlefirst + \let\Glsxtrtitlefirst\@glsxtr@org@Glsxtrtitlefirst + \let\glsxtrtitlefirstplural\@glsxtr@org@glsxtrtitlefirstplural + \let\Glsxtrtitlefirstplural\@glsxtr@org@Glsxtrtitlefirstplural + \let\glsxtrtitlelong\@glsxtr@org@glsxtrtitlelong + \let\glsxtrtitlelongpl\@glsxtr@org@glsxtrtitlelongpl + \let\Glsxtrtitlelong\@glsxtr@org@Glsxtrtitlelong + \let\Glsxtrtitlelongpl\@glsxtr@org@Glsxtrtitlelongpl + \let\glsxtrtitlefull\@glsxtr@org@glsxtrtitlefull + \let\glsxtrtitlefullpl\@glsxtr@org@glsxtrtitlefullpl + \let\Glsxtrtitlefull\@glsxtr@org@Glsxtrtitlefull + \let\Glsxtrtitlefullpl\@glsxtr@org@Glsxtrtitlefullpl +} +\newcommand*{\glsxtrheadshort}[1]{% + \protect\NoCaseChange + {% + \glsifattribute{#1}{headuc}{true}% + {% + \GLSxtrshort[noindex,hyper=false]{#1}[]% + }% + {% + \glsxtrshort[noindex,hyper=false]{#1}[]% + }% + }% +} +\newrobustcmd*{\glsxtrtitleshort}[1]{% + \glsxtrshort[noindex,hyper=false]{#1}[]% +} +\newcommand*{\glsxtrheadshortpl}[1]{% + \protect\NoCaseChange + {% + \glsifattribute{#1}{headuc}{true}% + {% + \GLSxtrshortpl[noindex,hyper=false]{#1}[]% + }% + {% + \glsxtrshortpl[noindex,hyper=false]{#1}[]% + }% + }% +} +\newrobustcmd*{\glsxtrtitleshortpl}[1]{% + \glsxtrshortpl[noindex,hyper=false]{#1}[]% +} +\newcommand*{\Glsxtrheadshort}[1]{% + \protect\NoCaseChange + {% + \glsifattribute{#1}{headuc}{true}% + {% + \GLSxtrshort[noindex,hyper=false]{#1}[]% + }% + {% + \Glsxtrshort[noindex,hyper=false]{#1}[]% + }% + }% +} +\newrobustcmd*{\Glsxtrtitleshort}[1]{% + \Glsxtrshort[noindex,hyper=false]{#1}[]% +} +\newrobustcmd*{\GLSxtrtitleshort}[1]{% + \GLSxtrshort[noindex,hyper=false]{#1}[]% +} +\newcommand*{\Glsxtrheadshortpl}[1]{% + \protect\NoCaseChange + {% + \glsifattribute{#1}{headuc}{true}% + {% + \GLSxtrshortpl[noindex,hyper=false]{#1}[]% + }% + {% + \Glsxtrshortpl[noindex,hyper=false]{#1}[]% + }% + }% +} +\newrobustcmd*{\Glsxtrtitleshortpl}[1]{% + \Glsxtrshortpl[noindex,hyper=false]{#1}[]% +} +\newrobustcmd*{\GLSxtrtitleshortpl}[1]{% + \GLSxtrshortpl[noindex,hyper=false]{#1}[]% +} +\newcommand*{\glsxtrheadname}[1]{% + \protect\NoCaseChange + {% + \glsifattribute{#1}{headuc}{true}% + {% + \GLSname[noindex,hyper=false]{#1}[]% + }% + {% + \glsname[noindex,hyper=false]{#1}[]% + }% + }% +} +\newrobustcmd*{\glsxtrtitlename}[1]{% + \glsname[noindex,hyper=false]{#1}[]% +} +\newcommand*{\Glsxtrheadname}[1]{% + \protect\NoCaseChange + {% + \glsifattribute{#1}{headuc}{true}% + {% + \GLSname[noindex,hyper=false]{#1}[]% + }% + {% + \Glsname[noindex,hyper=false]{#1}[]% + }% + }% +} +\newrobustcmd*{\Glsxtrtitlename}[1]{% + \Glsname[noindex,hyper=false]{#1}[]% +} +\newrobustcmd*{\GLSxtrtitlename}[1]{% + \GLSname[noindex,hyper=false]{#1}[]% +} +\newcommand*{\glsxtrheadtext}[1]{% + \protect\NoCaseChange + {% + \glsifattribute{#1}{headuc}{true}% + {% + \GLStext[noindex,hyper=false]{#1}[]% + }% + {% + \glstext[noindex,hyper=false]{#1}[]% + }% + }% +} +\newrobustcmd*{\glsxtrtitletext}[1]{% + \glstext[noindex,hyper=false]{#1}[]% +} +\newcommand*{\Glsxtrheadtext}[1]{% + \protect\NoCaseChange + {% + \glsifattribute{#1}{headuc}{true}% + {% + \GLStext[noindex,hyper=false]{#1}[]% + }% + {% + \Glstext[noindex,hyper=false]{#1}[]% + }% + }% +} +\newrobustcmd*{\Glsxtrtitletext}[1]{% + \Glstext[noindex,hyper=false]{#1}[]% +} +\newrobustcmd*{\GLSxtrtitletext}[1]{% + \GLStext[noindex,hyper=false]{#1}[]% +} +\newcommand*{\glsxtrheadplural}[1]{% + \protect\NoCaseChange + {% + \glsifattribute{#1}{headuc}{true}% + {% + \GLSplural[noindex,hyper=false]{#1}[]% + }% + {% + \glsplural[noindex,hyper=false]{#1}[]% + }% + }% +} +\newrobustcmd*{\glsxtrtitleplural}[1]{% + \glsplural[noindex,hyper=false]{#1}[]% +} +\newcommand*{\Glsxtrheadplural}[1]{% + \protect\NoCaseChange + {% + \glsifattribute{#1}{headuc}{true}% + {% + \GLSplural[noindex,hyper=false]{#1}[]% + }% + {% + \Glsplural[noindex,hyper=false]{#1}[]% + }% + }% +} +\newrobustcmd*{\Glsxtrtitleplural}[1]{% + \Glsplural[noindex,hyper=false]{#1}[]% +} +\newrobustcmd*{\GLSxtrtitleplural}[1]{% + \GLSplural[noindex,hyper=false]{#1}[]% +} +\newcommand*{\glsxtrheadfirst}[1]{% + \protect\NoCaseChange + {% + \glsifattribute{#1}{headuc}{true}% + {% + \GLSfirst[noindex,hyper=false]{#1}[]% + }% + {% + \glsfirst[noindex,hyper=false]{#1}[]% + }% + }% +} +\newrobustcmd*{\glsxtrtitlefirst}[1]{% + \glsfirst[noindex,hyper=false]{#1}[]% +} +\newcommand*{\Glsxtrheadfirst}[1]{% + \protect\NoCaseChange + {% + \glsifattribute{#1}{headuc}{true}% + {% + \GLSfirst[noindex,hyper=false]{#1}[]% + }% + {% + \Glsfirst[noindex,hyper=false]{#1}[]% + }% + }% +} +\newrobustcmd*{\Glsxtrtitlefirst}[1]{% + \Glsfirst[noindex,hyper=false]{#1}[]% +} +\newrobustcmd*{\GLSxtrtitlefirst}[1]{% + \GLSfirst[noindex,hyper=false]{#1}[]% +} +\newcommand*{\glsxtrheadfirstplural}[1]{% + \protect\NoCaseChange + {% + \glsifattribute{#1}{headuc}{true}% + {% + \GLSfirstplural[noindex,hyper=false]{#1}[]% + }% + {% + \glsfirstplural[noindex,hyper=false]{#1}[]% + }% + }% +} +\newrobustcmd*{\glsxtrtitlefirstplural}[1]{% + \glsfirstplural[noindex,hyper=false]{#1}[]% +} +\newcommand*{\Glsxtrheadfirstplural}[1]{% + \protect\NoCaseChange + {% + \glsifattribute{#1}{headuc}{true}% + {% + \GLSfirstplural[noindex,hyper=false]{#1}[]% + }% + {% + \Glsfirstplural[noindex,hyper=false]{#1}[]% + }% + }% +} +\newrobustcmd*{\Glsxtrtitlefirstplural}[1]{% + \Glsfirstplural[noindex,hyper=false]{#1}[]% +} +\newrobustcmd*{\GLSxtrtitlefirstplural}[1]{% + \GLSfirstplural[noindex,hyper=false]{#1}[]% +} +\newcommand*{\glsxtrheadlong}[1]{% + \protect\NoCaseChange + {% + \glsifattribute{#1}{headuc}{true}% + {% + \GLSxtrlong[noindex,hyper=false]{#1}[]% + }% + {% + \glsxtrlong[noindex,hyper=false]{#1}[]% + }% + }% +} +\newrobustcmd*{\glsxtrtitlelong}[1]{% + \glsxtrlong[noindex,hyper=false]{#1}[]% +} +\newcommand*{\glsxtrheadlongpl}[1]{% + \protect\NoCaseChange + {% + \glsifattribute{#1}{headuc}{true}% + {% + \GLSxtrlongpl[noindex,hyper=false]{#1}[]% + }% + {% + \glsxtrlongpl[noindex,hyper=false]{#1}[]% + }% + }% +} +\newrobustcmd*{\glsxtrtitlelongpl}[1]{% + \glsxtrlongpl[noindex,hyper=false]{#1}[]% +} +\newcommand*{\Glsxtrheadlong}[1]{% + \protect\NoCaseChange + {% + \glsifattribute{#1}{headuc}{true}% + {% + \GLSxtrlong[noindex,hyper=false]{#1}[]% + }% + {% + \Glsxtrlong[noindex,hyper=false]{#1}[]% + }% + }% +} +\newrobustcmd*{\Glsxtrtitlelong}[1]{% + \Glsxtrlong[noindex,hyper=false]{#1}[]% +} +\newrobustcmd*{\GLSxtrtitlelong}[1]{% + \GLSxtrlong[noindex,hyper=false]{#1}[]% +} +\newcommand*{\Glsxtrheadlongpl}[1]{% + \protect\NoCaseChange + {% + \glsifattribute{#1}{headuc}{true}% + {% + \GLSxtrlongpl[noindex,hyper=false]{#1}[]% + }% + {% + \Glsxtrlongpl[noindex,hyper=false]{#1}[]% + }% + }% +} +\newrobustcmd*{\Glsxtrtitlelongpl}[1]{% + \Glsxtrlongpl[noindex,hyper=false]{#1}[]% +} +\newrobustcmd*{\GLSxtrtitlelongpl}[1]{% + \GLSxtrlongpl[noindex,hyper=false]{#1}[]% +} +\newcommand*{\glsxtrheadfull}[1]{% + \protect\NoCaseChange + {% + \glsifattribute{#1}{headuc}{true}% + {% + \GLSxtrfull[noindex,hyper=false]{#1}[]% + }% + {% + \glsxtrfull[noindex,hyper=false]{#1}[]% + }% + }% +} +\newrobustcmd*{\glsxtrtitlefull}[1]{% + \glsxtrfull[noindex,hyper=false]{#1}[]% +} +\newcommand*{\glsxtrheadfullpl}[1]{% + \protect\NoCaseChange + {% + \glsifattribute{#1}{headuc}{true}% + {% + \GLSxtrfullpl[noindex,hyper=false]{#1}[]% + }% + {% + \glsxtrfullpl[noindex,hyper=false]{#1}[]% + }% + }% +} +\newrobustcmd*{\glsxtrtitlefullpl}[1]{% + \glsxtrfullpl[noindex,hyper=false]{#1}[]% +} +\newcommand*{\Glsxtrheadfull}[1]{% + \protect\NoCaseChange + {% + \glsifattribute{#1}{headuc}{true}% + {% + \GLSxtrfull[noindex,hyper=false]{#1}[]% + }% + {% + \Glsxtrfull[noindex,hyper=false]{#1}[]% + }% + }% +} +\newrobustcmd*{\Glsxtrtitlefull}[1]{% + \Glsxtrfull[noindex,hyper=false]{#1}[]% +} +\newrobustcmd*{\GLSxtrtitlefull}[1]{% + \GLSxtrfull[noindex,hyper=false]{#1}[]% +} +\newcommand*{\Glsxtrheadfullpl}[1]{% + \protect\NoCaseChange + {% + \glsifattribute{#1}{headuc}{true}% + {% + \GLSxtrfullpl[noindex,hyper=false]{#1}[]% + }% + {% + \Glsxtrfullpl[noindex,hyper=false]{#1}[]% + }% + }% +} +\newrobustcmd*{\Glsxtrtitlefullpl}[1]{% + \Glsxtrfullpl[noindex,hyper=false]{#1}[]% +} +\newrobustcmd*{\GLSxtrtitlefullpl}[1]{% + \GLSxtrfullpl[noindex,hyper=false]{#1}[]% +} +\ifdef\texorpdfstring +{ + \newcommand*{\glsfmtshort}[1]{% + \texorpdfstring + {\glsxtrtitleshort{#1}}% + {\glsentryshort{#1}}% + } +} +{ + \newcommand*{\glsfmtshort}[1]{% + \glsxtrtitleshort{#1}} +} +\ifdef\texorpdfstring +{ + \newcommand*{\glsfmtshortpl}[1]{% + \texorpdfstring + {\glsxtrtitleshortpl{#1}}% + {\glsentryshortpl{#1}}% + } +} +{ + \newcommand*{\glsfmtshortpl}[1]{% + \glsxtrtitleshortpl{#1}} +} +\ifdef\texorpdfstring +{ + \newcommand*{\Glsfmtshort}[1]{% + \texorpdfstring + {\Glsxtrtitleshort{#1}}% + {\glsentryshort{#1}}% + } +} +{ + \newcommand*{\Glsfmtshort}[1]{% + \Glsxtrtitleshort{#1}} +} +\ifdef\texorpdfstring +{ + \newcommand*{\Glsfmtshortpl}[1]{% + \texorpdfstring + {\Glsxtrtitleshortpl{#1}}% + {\glsentryshortpl{#1}}% + } +} +{ + \newcommand*{\Glsfmtshortpl}[1]{% + \Glsxtrtitleshortpl{#1}} +} +\ifdef\texorpdfstring +{ + \newcommand*{\glsfmtname}[1]{% + \texorpdfstring + {\glsxtrtitlename{#1}}% + {\glsentryname{#1}}% + } +} +{ + \newcommand*{\glsfmtname}[1]{% + \glsxtrtitlename{#1}} +} +\ifdef\texorpdfstring +{ + \newcommand*{\Glsfmtname}[1]{% + \texorpdfstring + {\Glsxtrtitlename{#1}}% + {\glsentryname{#1}}% + } +} +{ + \newcommand*{\Glsfmtname}[1]{% + \Glsxtrtitlename{#1}} +} +\ifdef\texorpdfstring +{ + \newcommand*{\GLSfmtname}[1]{% + \texorpdfstring + {\GLSxtrtitlename{#1}}% + {\glsentryname{#1}}% + } +} +{ + \newcommand*{\GLSfmtname}[1]{% + \GLSxtrtitlename{#1}} +} +\ifdef\texorpdfstring +{ + \newcommand*{\glsfmttext}[1]{% + \texorpdfstring + {\glsxtrtitletext{#1}}% + {\glsentrytext{#1}}% + } +} +{ + \newcommand*{\glsfmttext}[1]{% + \glsxtrtitletext{#1}} +} +\ifdef\texorpdfstring +{ + \newcommand*{\Glsfmttext}[1]{% + \texorpdfstring + {\Glsxtrtitletext{#1}}% + {\glsentrytext{#1}}% + } +} +{ + \newcommand*{\Glsfmttext}[1]{% + \Glsxtrtitletext{#1}} +} +\ifdef\texorpdfstring +{ + \newcommand*{\GLSfmttext}[1]{% + \texorpdfstring + {\GLSxtrtitletext{#1}}% + {\glsentrytext{#1}}% + } +} +{ + \newcommand*{\GLSfmttext}[1]{% + \GLSxtrtitletext{#1}} +} +\ifdef\texorpdfstring +{ + \newcommand*{\glsfmtplural}[1]{% + \texorpdfstring + {\glsxtrtitleplural{#1}}% + {\glsentryplural{#1}}% + } +} +{ + \newcommand*{\glsfmtplural}[1]{% + \glsxtrtitleplural{#1}} +} +\ifdef\texorpdfstring +{ + \newcommand*{\Glsfmtplural}[1]{% + \texorpdfstring + {\Glsxtrtitleplural{#1}}% + {\glsentryplural{#1}}% + } +} +{ + \newcommand*{\Glsfmtplural}[1]{% + \Glsxtrtitleplural{#1}} +} +\ifdef\texorpdfstring +{ + \newcommand*{\GLSfmtplural}[1]{% + \texorpdfstring + {\GLSxtrtitleplural{#1}}% + {\glsentryplural{#1}}% + } +} +{ + \newcommand*{\GLSfmtplural}[1]{% + \GLSxtrtitleplural{#1}} +} +\ifdef\texorpdfstring +{ + \newcommand*{\glsfmtfirst}[1]{% + \texorpdfstring + {\glsxtrtitlefirst{#1}}% + {\glsentryfirst{#1}}% + } +} +{ + \newcommand*{\glsfmtfirst}[1]{% + \glsxtrtitlefirst{#1}} +} +\ifdef\texorpdfstring +{ + \newcommand*{\Glsfmtfirst}[1]{% + \texorpdfstring + {\Glsxtrtitlefirst{#1}}% + {\glsentryfirst{#1}}% + } +} +{ + \newcommand*{\Glsfmtfirst}[1]{% + \Glsxtrtitlefirst{#1}} +} +\ifdef\texorpdfstring +{ + \newcommand*{\GLSfmtfirst}[1]{% + \texorpdfstring + {\GLSxtrtitlefirst{#1}}% + {\glsentryfirst{#1}}% + } +} +{ + \newcommand*{\GLSfmtfirst}[1]{% + \Glsxtrtitlefirst{#1}} +} +\ifdef\texorpdfstring +{ + \newcommand*{\glsfmtfirstpl}[1]{% + \texorpdfstring + {\glsxtrtitlefirstplural{#1}}% + {\glsentryfirstplural{#1}}% + } +} +{ + \newcommand*{\glsfmtfirstpl}[1]{% + \glsxtrtitlefirstplural{#1}} +} +\ifdef\texorpdfstring +{ + \newcommand*{\Glsfmtfirstpl}[1]{% + \texorpdfstring + {\Glsxtrtitlefirstplural{#1}}% + {\glsentryfirstplural{#1}}% + } +} +{ + \newcommand*{\Glsfmtfirstpl}[1]{% + \Glsxtrtitlefirstplural{#1}} +} +\ifdef\texorpdfstring +{ + \newcommand*{\GLSfmtfirstpl}[1]{% + \texorpdfstring + {\GLSxtrtitlefirstplural{#1}}% + {\glsentryfirstplural{#1}}% + } +} +{ + \newcommand*{\GLSfmtfirstpl}[1]{% + \GLSxtrtitlefirstplural{#1}} +} +\ifdef\texorpdfstring +{ + \newcommand*{\glsfmtlong}[1]{% + \texorpdfstring + {\glsxtrtitlelong{#1}}% + {\glsentrylong{#1}}% + } +} +{ + \newcommand*{\glsfmtlong}[1]{% + \glsxtrtitlelong{#1}} +} +\ifdef\texorpdfstring +{ + \newcommand*{\Glsfmtlong}[1]{% + \texorpdfstring + {\Glsxtrtitlelong{#1}}% + {\glsentrylong{#1}}% + } +} +{ + \newcommand*{\Glsfmtlong}[1]{% + \Glsxtrtitlelong{#1}} +} +\ifdef\texorpdfstring +{ + \newcommand*{\GLSfmtlong}[1]{% + \texorpdfstring + {\GLSxtrtitlelong{#1}}% + {\glsentrylong{#1}}% + } +} +{ + \newcommand*{\GLSfmtlong}[1]{% + \GLSxtrtitlelong{#1}} +} +\ifdef\texorpdfstring +{ + \newcommand*{\glsfmtlongpl}[1]{% + \texorpdfstring + {\glsxtrtitlelongpl{#1}}% + {\glsentrylongpl{#1}}% + } +} +{ + \newcommand*{\glsfmtlongpl}[1]{% + \glsxtrtitlelongpl{#1}} +} +\ifdef\texorpdfstring +{ + \newcommand*{\Glsfmtlongpl}[1]{% + \texorpdfstring + {\Glsxtrtitlelongpl{#1}}% + {\glsentrylongpl{#1}}% + } +} +{ + \newcommand*{\Glsfmtlongpl}[1]{% + \Glsxtrtitlelongpl{#1}} +} +\ifdef\texorpdfstring +{ + \newcommand*{\GLSfmtlongpl}[1]{% + \texorpdfstring + {\GLSxtrtitlelongpl{#1}}% + {\glsentrylongpl{#1}}% + } +} +{ + \newcommand*{\GLSfmtlongpl}[1]{% + \GLSxtrtitlelongpl{#1}} +} +\newcommand*{\glspdffmtfull}[1]{\glsentrylong{#1} (\glsentryshort{#1})}% +\newcommand*{\glspdffmtfullpl}[1]{\glsentrylongpl{#1} (\glsentryshortpl{#1})}% +\ifdef\texorpdfstring +{ + \newcommand*{\glsfmtfull}[1]{% + \texorpdfstring + {\glsxtrtitlefull{#1}}% + {\glspdffmtfull{#1}}% + } +} +{ + \newcommand*{\glsfmtfull}[1]{% + \glsxtrtitlefull{#1}} +} +\ifdef\texorpdfstring +{ + \newcommand*{\Glsfmtfull}[1]{% + \texorpdfstring + {\Glsxtrtitlefull{#1}}% + {\glspdffmtfull{#1}{}}% + } +} +{ + \newcommand*{\Glsfmtfull}[1]{% + \Glsxtrtitlefull{#1}} +} +\ifdef\texorpdfstring +{ + \newcommand*{\GLSfmtfull}[1]{% + \texorpdfstring + {\GLSxtrtitlefull{#1}}% + {\glspdffmtfull{#1}}% + } +} +{ + \newcommand*{\GLSfmtfull}[1]{% + \GLSxtrtitlefull{#1}} +} +\ifdef\texorpdfstring +{ + \newcommand*{\glsfmtfullpl}[1]{% + \texorpdfstring + {\glsxtrtitlefullpl{#1}}% + {\glspdffmtfullpl{#1}}% + } +} +{ + \newcommand*{\glsfmtfullpl}[1]{% + \glsxtrtitlefullpl{#1}} +} +\ifdef\texorpdfstring +{ + \newcommand*{\Glsfmtfullpl}[1]{% + \texorpdfstring + {\Glsxtrtitlefullpl{#1}}% + {\glspdffmtfullpl{#1}{}}% + } +} +{ + \newcommand*{\Glsfmtfullpl}[1]{% + \Glsxtrtitlefullpl{#1}} +} +\ifdef\texorpdfstring +{ + \newcommand*{\GLSfmtfullpl}[1]{% + \texorpdfstring + {\GLSxtrtitlefullpl{#1}}% + {\glspdffmtfullpl{#1}{}}% + } +} +{ + \newcommand*{\GLSfmtfullpl}[1]{% + \GLSxtrtitlefullpl{#1}} +} +\newcommand*{\multiglossaryentrysetup}[1]{\setkeys{glsxtrcombined}{#1}} +\newcommand*{\@gls@combined@indexmain}{1} +\define@choicekey{glsxtrcombined}{indexmain}% + [\@gls@combined@indexmain@val\@gls@combined@indexmain] + {false,true,first}[true]{} +\newcommand*{\@gls@combined@indexothers}{2} +\define@choicekey{glsxtrcombined}{indexothers}% + [\@gls@combined@indexothers@val\@gls@combined@indexothers] + {false,true,first}[true]{} +\newcommand*{\@gls@combined@hyper}{3} +\define@choicekey{glsxtrcombined}{hyper}% + [\@gls@combined@hyper@val\@gls@combined@hyper] + {none,allmain,mainonly,individual,otheronly,notmainfirst,nototherfirst,notfirst}{} +\newcommand*{\@gls@combined@encapmain}{glsnumberformat} +\define@key{glsxtrcombined}{encapmain}{% + \renewcommand*{\@gls@combined@encapmain}{#1}% +} +\newcommand*{\@gls@combined@encapothers}{glsnumberformat} +\define@key{glsxtrcombined}{encapothers}{% + \renewcommand*{\@gls@combined@encapothers}{#1}% +} +\newcommand*{\@gls@combined@textformat}{@firstofone} +\define@key{glsxtrcombined}{textformat}{% + \renewcommand*{\@gls@combined@textformat}{#1}% +} +\newcommand*{\@gls@combined@category}{} +\define@key{glsxtrcombined}{category}{% + \renewcommand*{\@gls@combined@category}{#1}% +} +\define@key{glsxtrcombinedpreopts}{category}{% + \renewcommand*{\@gls@combined@category}{#1}% +} +\newcommand*{\@gls@combined@mglsopts}{} +\define@key{glsxtrcombined}{mglsopts}{% + \renewcommand*{\@gls@combined@mglsopts}{#1}% +} +\define@key{glsxtrcombinedpreopts}{mglsopts}{% + \@gls@combined@mglsopts@do + {% + \renewcommand*{\@gls@combined@mglsopts}{#1}% + }% +} +\newcommand*{\@gls@combined@mglsopts@do}[1]{#1} +\newcommand*{\mgls@disable@mglsopts}{% + \let\@gls@combined@mglsopts@do\@gls@combined@mglsopts@do@not +} +\newcommand*{\mgls@enable@mglsopts}{% + \let\@gls@combined@mglsopts@do\@firstofone +} +\newcommand*{\@gls@combined@mglsopts@do@not}[1]{% + \PackageError{glossaries-extra}{`mglsopts' key not permitted inside + `setup' value}{}% +} +\newcommand*{\@gls@combined@firstprefix}{} +\define@key{glsxtrcombined}{firstprefix}{% + \renewcommand*{\@gls@combined@firstprefix}{#1}% +} +\newcommand*{\@gls@combined@usedprefix}{} +\define@key{glsxtrcombined}{usedprefix}{% + \renewcommand*{\@gls@combined@usedprefix}{#1}% +} +\newcommand*{\@gls@combined@firstsuffix}{} +\define@key{glsxtrcombined}{firstsuffix}{% + \renewcommand*{\@gls@combined@firstsuffix}{#1}% +} +\newcommand*{\@gls@combined@usedsuffix}{} +\define@key{glsxtrcombined}{usedsuffix}{% + \renewcommand*{\@gls@combined@usedsuffix}{#1}% +} +\define@boolkey{glsxtrcombined}{firstskipmain}[true]{} +\KV@glsxtrcombined@firstskipmainfalse +\define@boolkey{glsxtrcombined}{firstskipothers}[true]{} +\KV@glsxtrcombined@firstskipothersfalse +\define@boolkey{glsxtrcombined}{usedskipmain}[true]{} +\KV@glsxtrcombined@usedskipmainfalse +\define@boolkey{glsxtrcombined}{usedskipothers}[true]{} +\KV@glsxtrcombined@usedskipothersfalse +\newcommand*{\@gls@combined@postlinks@nr}{0} +\define@choicekey{glsxtrcombined}{postlinks}% + [\@gls@combined@postlinks@val\@gls@combined@postlinks@nr] + {none,all,notlast,mainnotlast,mainonly,othernotlast,otheronly}{} +\newcommand*{\@gls@combined@mpostlink@nr}{1} +\define@choicekey{glsxtrcombined}{mpostlink}% + [\@gls@combined@mpostlink@val\@gls@combined@mpostlink@nr] + {false,true,firstonly,usedonly}[true]{} +\newcommand*{\@gls@combined@mpostlinkelement@nr}{0} +\define@choicekey{glsxtrcombined}{mpostlinkelement}% + [\@gls@combined@mpostlinkelement@val\@gls@combined@mpostlinkelement@nr] + {last,main,custom}{} +\newcommand*{\glsxtrifmulti}[3]{\ifcsdef{@gls@combined@#1@main}{#2}{#3}} +\newcommand*{\glsxtrmultimain}[1]{\csuse{@gls@combined@#1@main}} +\newcommand*{\glsxtrmultilist}[1]{\csuse{@gls@combined@#1@list}} +\newcommand*{\glsxtrmultitotalelements}[1]{\csuse{@gls@combined@#1@total}} +\newcommand*{\glsxtrmultimainindex}[1]{\csuse{@gls@combined@#1@mainindex}} +\newcommand*{\glsxtrmultilastotherindex}[1]{\csuse{@gls@combined@#1@lastotherindex}} +\newif\ifmultiglossaryentryglobal +\multiglossaryentryglobalfalse +\newcount\mglselementindex +\newrobustcmd{\multiglossaryentry}[1][]{% + \def\@gls@combined@current@opts{#1}% + \ifnum\@glsxtr@docdefval=1\relax + \let\@multi@glossentry@donext\@defmultiglossaryentry + \else + \let\@multi@glossentry@donext\@multiglossaryentry + \fi + \@multi@glossentry@donext +} +\newcommand*{\@multiglossaryentry}[1]{% + \def\@gls@combined@current@label{#1}% + \@multi@glossaryentry +} +\newcommand*{\@multi@glossaryentry}[2][]{% + \ifcsdef{@gls@combined@\@gls@combined@current@label @main}% + {\PackageError{glossaries-extra}% + {Multi-entry label `\@gls@combined@current@label' already defined}% + {}% + }% + {% + \@multi@glossary@entry{#1}{#2}% + }% +} +\newcommand*{\@defmultiglossaryentry}[1]{% + \def\@gls@combined@current@label{#1}% + \@def@multi@glossaryentry +} +\newcommand*{\@def@multi@glossaryentry}[2][]{% + \let\@def@multi@glossaryentry@do\@multi@glossary@entry + \ifundef\@glsxtr@docdefs@multilist + {% + \gdef\@glsxtr@docdefs@multilist{}% + \listxadd + {\@glsxtr@docdefs@multilist}{\expandonce\@gls@combined@current@label}% + }% + {% + \xifinlist{\@gls@combined@current@label}{\@glsxtr@docdefs@multilist}% + {% + \PackageError{glossaries-extra}% + {Multi-entry label `\@gls@combined@current@label' already defined}% + {}% + \let\@def@multi@glossaryentry@do\@gobbletwo + }% + {% + \listxadd + {\@glsxtr@docdefs@multilist}{\expandonce\@gls@combined@current@label}% + }% + }% + \@def@multi@glossaryentry@do{#1}{#2}% +} +\newcommand*{\@multi@glossary@doifexists}{\glsdoifexists} +\newrobustcmd{\providemultiglossaryentry}[2][]{% + \def\@gls@combined@current@opts{#1}% + \def\@gls@combined@current@label{#2}% + \ifcsdef{@gls@combined@\@gls@combined@current@label @main}% + {\def\@multi@glossentry@donext{\@provide@multi@glossaryentry@noop}}% + {% + \ifnum\@glsxtr@docdefval=1\relax + \def\@multi@glossentry@donext{\@def@multi@glossaryentry}% + \else + \def\@multi@glossentry@donext{\@multi@glossaryentry}% + \fi + }% + \@multi@glossentry@donext +} +\newcommand*{\@provide@multi@glossaryentry@noop}[2][]{} +\newcommand*{\@multi@glossaryentry@list}{} +\newcommand*{\@multi@glossary@entry}[2]{% + \protected@edef\@gls@combined@current@main{#1}% + \protected@edef\@gls@combined@currentlist{#2}% + \mglselementindex=0\relax + \@for\@gls@tmp:=\@gls@combined@currentlist\do{% + \advance\mglselementindex by 1\relax + \@multi@glossary@doifexists{\@gls@tmp}{}% + \let\@gls@combined@finalitem\@gls@tmp + \ifdefvoid\@gls@combined@current@main + {}% + {% + \ifx\@gls@combined@current@main\@gls@tmp + \ifmultiglossaryentryglobal + \global\cslet{@gls@combined@\@gls@combined@current@label @main}% + \@gls@combined@current@main + \csxdef{@gls@combined@\@gls@combined@current@label @mainindex}% + {\the\mglselementindex}% + \else + \cslet{@gls@combined@\@gls@combined@current@label @main}% + \@gls@combined@current@main + \csedef{@gls@combined@\@gls@combined@current@label @mainindex}% + {\the\mglselementindex}% + \fi + \else + \ifmultiglossaryentryglobal + \csxdef{@gls@combined@\@gls@combined@current@label @lastotherindex}% + {\the\mglselementindex}% + \else + \csedef{@gls@combined@\@gls@combined@current@label @lastotherindex}% + {\the\mglselementindex}% + \fi + \fi + }% + }% + \ifmultiglossaryentryglobal + \csxdef{@gls@combined@\@gls@combined@current@label @total}% + {\the\mglselementindex}% + \else + \csedef{@gls@combined@\@gls@combined@current@label @total}% + {\the\mglselementindex}% + \fi + \ifnum\mglselementindex<2\relax + \PackageError{glossaries-extra}{At least 2 labels required in + multi-entry element list (\number\mglselementindex\space found)}{}% + \else + \ifdefvoid\@gls@combined@current@main + {}% + {% + \ifcsundef{@gls@combined@\@gls@combined@current@label @main}% + {\PackageError{glossaries-extra}% + {Main element `\@gls@combined@current@main' not found in list}% + {The final element `\@gls@combined@finalitem' will be used instead} + \let\@gls@combined@current@main\@empty + }% + {}% + }% + \ifdefvoid\@gls@combined@current@main + {% + \ifmultiglossaryentryglobal + \global\cslet{@gls@combined@\@gls@combined@current@label @main}% + \@gls@combined@finalitem + \global\csletcs{@gls@combined@\@gls@combined@current@label @mainindex}% + {@gls@combined@\@gls@combined@current@label @total}% + \csxdef{@gls@combined@\@gls@combined@current@label @lastotherindex}% + {\the\numexpr\mglselementindex-1 }% + \else + \cslet{@gls@combined@\@gls@combined@current@label @main}% + \@gls@combined@finalitem + \csletcs{@gls@combined@\@gls@combined@current@label @mainindex}% + {@gls@combined@\@gls@combined@current@label @total}% + \csedef{@gls@combined@\@gls@combined@current@label @lastotherindex}% + {\the\numexpr\mglselementindex-1 }% + \fi + }% + {}% + \ifmultiglossaryentryglobal + \global\cslet{@gls@combined@\@gls@combined@current@label @list}% + \@gls@combined@currentlist + \protected@csxdef{@gls@combined@\@gls@combined@current@label @options}% + {\@gls@combined@current@opts}% + \expandafter\@ifdefinable + \csname if@gls@combined@\@gls@combined@current@label @flag\endcsname + {\expandafter\global\expandafter + \newif\csname if@gls@combined@\@gls@combined@current@label @flag\endcsname}% + \expandafter\global + \csname @gls@combined@\@gls@combined@current@label @flagfalse\endcsname + \else + \cslet{@gls@combined@\@gls@combined@current@label @list}% + \@gls@combined@currentlist + \protected@csedef{@gls@combined@\@gls@combined@current@label @options}% + {\@gls@combined@current@opts}% + \newboolean{@gls@combined@\@gls@combined@current@label @flag}% + \csname @gls@combined@\@gls@combined@current@label @flagfalse\endcsname + \fi + \fi + \writemultiglossentry + {\@gls@combined@current@opts}{\@gls@combined@current@label}% + {\csuse{@gls@combined@\@gls@combined@current@label @main}}{#2}% + \ifmultiglossaryentryglobal + \ifdefempty\@multi@glossaryentry@list + {\let\@multi@glossaryentry@list\@gls@combined@current@label}% + {% + \eappto\@multi@glossaryentry@list{,\expandonce\@gls@combined@current@label}% + }% + \else + \ifdefempty\@multi@glossaryentry@list + {\global\let\@multi@glossaryentry@list\@gls@combined@current@label}% + {% + \xappto\@multi@glossaryentry@list{,\expandonce\@gls@combined@current@label}% + }% + \fi +} +\newcommand*{\@glsxtr@multientry}[4]{% + \ifnum\@glsxtr@docdefval=1\relax + \bgroup + \def\@gls@combined@current@opts{#1}% + \def\@gls@combined@current@label{#2}% + \let\@multi@glossary@doifexists\@secondoftwo + \let\writemultiglossentry\@gobblefour + \multiglossaryentryglobaltrue + \@multi@glossary@entry{#3}{#4}% + \egroup + \fi +} +\newcommand*{\writemultiglossentry}[4]{% + \protected@write\@auxout{}{\string\@glsxtr@multientry{#1}{#2}{#3}{#4}}% +} +\newcommand*{\ifmglsused}[3]{% + \ifbool{@gls@combined@#1@flag}{#2}{#3}% +} +\newcommand*{\mglsunset}[1]{% + \gls@ifnotmeasuring + {% + \glsxtrifmulti{#1}{\@mglsunset{#1}}% + {% + \glsxtrundefaction{Multi entry `#1' hasn't been defined}% + {You need to define `#1' with \string\multiglossaryentry}% + }% + }% +} +\newcommand*{\@mglsunset}[1]{% + \expandafter\global\csname @gls@combined@#1@flagtrue\endcsname +} +\newcommand*{\mglsreset}[1]{% + \gls@ifnotmeasuring + {% + \glsxtrifmulti{#1}{\@mglsreset{#1}}% + {% + \glsxtrundefaction{Multi entry `#1' hasn't been defined}% + {You need to define `#1' with \string\multiglossaryentry}% + }% + }% +} +\newcommand*{\@mglsreset}[1]{% + \expandafter\global\csname @gls@combined@#1@flagfalse\endcsname +} +\newcommand*{\mglslocalunset}[1]{% + \gls@ifnotmeasuring + {% + \glsxtrifmulti{#1}{\@mglslocalunset{#1}}% + {% + \glsxtrundefaction{Multi entry `#1' hasn't been defined}% + {You need to define `#1' with \string\multiglossaryentry}% + }% + }% +} +\newcommand*{\@mglslocalunset}[1]{% + \csname @gls@combined@#1@flagtrue\endcsname +} +\newcommand*{\mglslocalreset}[1]{% + \gls@ifnotmeasuring + {% + \glsxtrifmulti{#1}{\@mglslocalreset{#1}}% + {% + \glsxtrundefaction{Multi entry `#1' hasn't been defined}% + {You need to define `#1' with \string\multiglossaryentry}% + }% + }% +} +\newcommand*{\@mglslocalreset}[1]{% + \csname @gls@combined@#1@flagfalse\endcsname +} +\newcommand*{\mglsunsetall}{% + \@for\@mgls@thislabel:=\@multi@glossaryentry@list\do{\mglsunset\@mgls@thislabel}% +}% +\newcommand*{\mglsresetall}{% + \@for\@mgls@thislabel:=\@multi@glossaryentry@list\do{\mglsreset\@mgls@thislabel}% +}% +\newrobustcmd{\mglsSetMain}[2]{% + \ifcsundef{@gls@combined@#1@main}% + {\PackageError{glossaries-extra}{Multi-entry label `#1' not defined}{}}% + {% + \protected@edef\@gls@combined@current@main{#2}% + \letcs\@gls@combined@currentlist{@gls@combined@#1@list}% + \mglselementindex=0\relax + \count@=0\relax + \@for\@gls@tmp:=\@gls@combined@currentlist\do{% + \advance\mglselementindex by 1\relax + \ifx\@gls@combined@current@main\@gls@tmp + \count@=\mglselementindex\relax + \let\@gls@combined@finalitem\@gls@tmp + \ifmultiglossaryentryglobal + \global\cslet{@gls@combined@#1@main}\@gls@combined@current@main + \csxdef{@gls@combined@#1@mainindex}{\the\mglselementindex}% + \else + \cslet{@gls@combined@#1@main}\@gls@combined@current@main + \csedef{@gls@combined@#1@mainindex}{\the\mglselementindex}% + \fi + \else + \ifmultiglossaryentryglobal + \csxdef{@gls@combined@#1@lastotherindex}{\the\mglselementindex}% + \else + \csedef{@gls@combined@#1@lastotherindex}{\the\mglselementindex}% + \fi + \fi + }% + \ifnum\count@=0\relax + \PackageError{glossaries-extra}{Label `#2' is not in `#1' set + (\@gls@combined@currentlist)}{}% + \ifmultiglossaryentryglobal + \global\cslet{@gls@combined@#1@main}\@gls@combined@finalitem + \csxdef{@gls@combined@#1@mainindex}{\the\mglselementindex}% + \csxdef{@gls@combined@#1@lastotherindex}{% + \number\numexpr\mglselementindex-1 }% + \else + \cslet{@gls@combined@#1@main}\@gls@combined@finalitem + \csedef{@gls@combined@#1@mainindex}{\the\mglselementindex}% + \csedef{@gls@combined@#1@lastotherindex}{% + \number\numexpr\mglselementindex-1 }% + \fi + \fi + }% +} +\newrobustcmd{\mglsSetOptions}[2]{% + \ifcsundef{@gls@combined@#1@main}% + {\PackageError{glossaries-extra}{Multi-entry label `#1' not defined}{}}% + {% + \csdef{@gls@combined@#1@options}{#2}% + }% +} +\newrobustcmd{\mglsAddOptions}[2]{% + \ifcsundef{@gls@combined@#1@main}% + {\PackageError{glossaries-extra}{Multi-entry label `#1' not defined}{}}% + {% + \ifcsempty{@gls@combined@#1@options}% + {\csdef{@gls@combined@#1@options}{#2}}% + {\csappto{@gls@combined@#1@options}{,#2}}% + }% +} +\newcommand*{\@mgls@all}{} +\define@key{mgls}{all}{\renewcommand*{\@mgls@all}{#1}} +\newcommand*{\@mgls@main}{} +\define@key{mgls}{main}{\renewcommand*{\@mgls@main}{#1}} +\newcommand*{\@mgls@others}{} +\define@key{mgls}{others}{\renewcommand*{\@mgls@others}{#1}} +\newcommand*{\@mgls@setup}{} +\define@key{mgls}{setup}{% + \@mgls@setup@do{\renewcommand*{\@mgls@setup}{#1}}% +} +\newcommand*{\@mgls@setup@do}[1]{#1} +\newcommand*{\@mgls@setup@do@not}[1]{% + \PackageError{glossaries-extra}{`setup' key not permitted inside + `mglsopts' value}{}% +} +\newcommand*{\mgls@disable@setup}{% + \let\@mgls@setup@do\@mgls@setup@do@not +} +\newcommand*{\mgls@enable@setup}{% + \let\@mgls@setup@do\@firstofone +} +\newcommand\@mgls@unsetaction{0} +\define@choicekey{mgls}{multiunset}[\@mgls@unsetaction@val\@mgls@unsetaction]% + {global,local,none}{} +\define@boolkey{mgls}{presetlocal}[true]{} +\KV@mgls@presetlocalfalse +\newcommand*{\@mgls@hyper}{} +\define@choicekey{mgls}{hyper}[\@mgls@hyper@val\@mgls@hyper@nr]{true,false}[true]% +{% + \renewcommand*{\@mgls@hyper}{hyper=#1}% + \ifnum\@mgls@hyper@nr=1\relax + \let\@mgls@hyperlink\@secondoftwo + \else + \let\@mgls@hyperlink\@@mgls@hyperlink + \fi +} +\newcommand*{\@@mgls@hyperlink}[2]{% + \ifx\@glslink\glsdonohyperlink + #2% + \else + \glsxtr@org@dohyperlink{\glolinkprefix#1}{#2}% + \fi +} +\let\@mgls@hyperlink\@@mgls@hyperlink +\newcommand*{\mglsforelements}[3]{% + \expandafter\@for\expandafter#2\expandafter:\expandafter + =\csname @gls@combined@#1@list\endcsname\do{#3}% +} +\newcommand*{\mglsforotherelements}[3]{% + \expandafter\@for\expandafter#2\expandafter:\expandafter + =\csname @gls@combined@#1@list\endcsname\do + {\expandafter\ifdefequal\csname @gls@combined@#1@main\endcsname{#2}{}{#3}}% +} +\newcommand*{\mglsunsetothers}[1]{% + \mglsforotherelements{#1}{\@gls@tmp}{\glsunset{\@gls@tmp}}% +} +\newcommand*{\mglslocalunsetothers}[1]{% + \mglsforotherelements{#1}{\@gls@tmp}{\glslocalunset{\@gls@tmp}}% +} +\newcommand*{\mglselementreset}[1]{% + \ifKV@mgls@presetlocal + \glslocalreset{#1}% + \else + \glsreset{#1}% + \fi +} +\newcommand*{\mglselementunset}[1]{% + \ifKV@mgls@presetlocal + \glslocalunset{#1}% + \else + \glsunset{#1}% + \fi +} +\newcommand*{\@mgls@resetall}{} +\define@choicekey{mgls}{resetall}% +[\@mgls@resetall@val\@mgls@resetall@nr]{false,true}[true]% +{% + \ifcase\@mgls@resetall@nr\relax + \renewcommand*{\@mgls@resetall}{}% + \or + \renewcommand*{\@mgls@resetall}{% + \@for\@gls@resetlabel:=\mglscurrentlist\do{\mglselementreset\@gls@resetlabel}}% + \renewcommand*{\@mgls@unsetall}{}% + \fi +} +\newcommand*{\@mgls@resetmain}{} +\define@choicekey{mgls}{resetmain} +[\@mgls@resetmain@val\@mgls@resetmain@nr]{false,true}[true]% +{% + \ifcase\@mgls@resetmain@nr\relax + \renewcommand*{\@mgls@resetmain}{}% + \or + \renewcommand*{\@mgls@resetmain}{\mglselementreset\mglscurrentmainlabel}% + \renewcommand*{\@mgls@unsetmain}{}% + \fi +} +\newcommand*{\@mgls@resetothers}{} +\define@choicekey{mgls}{resetothers} +[\@mgls@resetothers@val\@mgls@resetothers@nr]{false,true}[true]% +{% + \ifcase\@mgls@resetothers@nr\relax + \renewcommand*{\@mgls@resetothers}{}% + \or + \renewcommand*{\@mgls@resetothers}{% + \@for\@gls@resetlabel:=\mglscurrentlist\do{% + \ifx\@gls@resetlabel\mglscurrentmainlabel + \else + \mglselementreset\@gls@resetlabel + \fi + }% + }% + \renewcommand*{\@mgls@unsetothers}{}% + \fi +} +\newcommand*{\@mgls@unsetall}{} +\define@choicekey{mgls}{unsetall}% +[\@mgls@unsetall@val\@mgls@unsetall@nr]{false,true}[true]% +{% + \ifcase\@mgls@unsetall@nr\relax + \renewcommand*{\@mgls@unsetall}{}% + \or + \renewcommand*{\@mgls@unsetall}{% + \@for\@gls@unsetlabel:=\mglscurrentlist\do{\mglselementunset\@gls@unsetlabel}}% + \renewcommand*{\@mgls@resetall}{}% + \fi +} +\newcommand*{\@mgls@unsetmain}{} +\define@choicekey{mgls}{unsetmain} +[\@mgls@unsetmain@val\@mgls@unsetmain@nr]{false,true}[true]% +{% + \ifcase\@mgls@unsetmain@nr\relax + \renewcommand*{\@mgls@unsetmain}{}% + \or + \renewcommand*{\@mgls@unsetmain}{\mglselementunset\mglscurrentmainlabel}% + \renewcommand*{\@mgls@resetmain}{}% + \fi +} +\newcommand*{\@mgls@unsetothers}{} +\define@choicekey{mgls}{unsetothers} +[\@mgls@unsetothers@val\@mgls@unsetothers@nr]{false,true}[true]% +{% + \ifcase\@mgls@unsetothers@nr\relax + \renewcommand*{\@mgls@unsetothers}{}% + \or + \renewcommand*{\@mgls@unsetothers}{% + \@for\@gls@unsetlabel:=\mglscurrentlist\do{% + \ifx\@gls@unsetlabel\mglscurrentmainlabel + \else + \mglselementunset\@gls@unsetlabel + \fi + }% + }% + \renewcommand*{\@mgls@resetothers}{}% + \fi +} +\newcommand{\glsxtr@setup@docurrent}{% + \ifx\mglscurrentlabel\mglscurrentmainlabel + \mglsisfirstuse + {% + \ifKV@glsxtrcombined@firstskipmain + \let\@mgls@do@current@element\@gobble + \else + \let\@mgls@do@current@element\@firstofone + \fi + }% + {% + \ifKV@glsxtrcombined@usedskipmain + \let\@mgls@do@current@element\@gobble + \else + \let\@mgls@do@current@element\@firstofone + \fi + }% + \else + \mglsisfirstuse + {% + \ifKV@glsxtrcombined@firstskipothers + \let\@mgls@do@current@element\@gobble + \else + \let\@mgls@do@current@element\@firstofone + \fi + }% + {% + \ifKV@glsxtrcombined@usedskipothers + \let\@mgls@do@current@element\@gobble + \else + \let\@mgls@do@current@element\@firstofone + \fi + }% + \fi +} +\newcommand*{\glsxtr@mgls@checklastelement}[2]{% + \ifbool{KV@glsxtrcombined@#1skipmain}% + {% + \ifbool{KV@glsxtrcombined@#1skipothers}% + {% + }% + {% + \ifnum\mglselementindex=\glsxtrmultilastotherindex{#2}\relax + \let\mglsiflast\@firstoftwo + \else + \let\mglsiflast\@secondoftwo + \fi + }% + }% + {% + \ifbool{KV@glsxtrcombined@#1skipothers}% + {% + \ifnum\mglselementindex=\glsxtrmultimainindex{#2}\relax + \let\mglsiflast\@firstoftwo + \else + \let\mglsiflast\@secondoftwo + \fi + }% + {% + \let\mglsiflast\@secondoftwo + }% + }% +} +\newcommand{\glsxtrmglsWarnAllSkipped}[3]{% + \GlossariesExtraWarning{#1}% + #3{#2}% +} +\newcommand*{\glsxtr@mgls@applyopts}[1]{% + \edef\@mgls@dooptions{\noexpand\setkeys*{mgls}{\expandonce#1}}% + \@mgls@dooptions + \ifdefvoid\XKV@rm{}{\eappto\@mgls@all{,\expandonce\XKV@rm}}% + \ifdefvoid\@mgls@setup + {}% + {% + \edef\@mgls@dooptions{% + \noexpand\setkeys*{glsxtrcombinedpreopts}{\expandonce\@mgls@setup}}% + \mgls@disable@mglsopts + \@mgls@dooptions + \mgls@enable@mglsopts + \ifx\@mgls@setupoptions\@empty + \let\@mgls@setupoptions\XKV@rm + \else + \eappto\@mgls@setupoptions{,\expandonce\XKV@rm}% + \fi + }% + \@mgls@resetall + \@mgls@unsetall + \@mgls@resetmain + \@mgls@unsetmain + \@mgls@resetothers + \@mgls@unsetothers + \let\@mgls@resetall\@empty + \let\@mgls@resetmain\@empty + \let\@mgls@resetothers\@empty + \let\@mgls@unsetall\@empty + \let\@mgls@unsetmain\@empty + \let\@mgls@unsetothers\@empty + \ifmglsused\mglscurrentmultilabel + {\let\mglsisfirstuse\@secondoftwo}% + {\let\mglsisfirstuse\@firstoftwo}% +} +\providecommand{\@firstofthree}[3]{#1} +\providecommand{\@secondofthree}[3]{#2} +\providecommand{\@thirdofthree}[3]{#3} +\newcommand*{\glsxtr@mgls@inner}[7]{% + \let\mglslastmainlabel\@empty + \let\mglsiflastmainwasfirstuse\@firstoftwo + \let\mglsiflastmainwasplural\@secondoftwo + \let\mglsiflastmaincapscase\@firstofthree + \let\mglsiflastmainskipped\@firstoftwo + \bgroup + \ifcsundef{@gls@combined@#2@main}% + {% + \glsxtrundefaction{Multi entry `#2' hasn't been defined}% + {You need to define `#2' with \string\multiglossaryentry}% + \gdef\@mgls@post@hookdefs{% + \protected@edef\mglslastmultilabel{#2}% + \let\mglswasfirstuse\@firstoftwo + \let\mglslastcategory\@empty + \let\mglsiflastelementskipped\@firstoftwo + \let\mglsiflastelementwasfirstuse\@firstoftwo + \let\mglsiflastelementwasplural\@secondoftwo + \let\mglsiflastelementcapscase\@firstofthree + \let\mglslastelementlabel\@empty + \let\mgls@do@postlinkhook\relax + }% + }% + {% + \protected@edef\mglscurrentmultilabel{#2}% + \letcs\mglscurrentmainlabel{@gls@combined@#2@main}% + \letcs\mglscurrentlist{@gls@combined@#2@list}% + \letcs\mglscurrentoptions{@gls@combined@#2@options}% + \ifmglsused\mglscurrentmultilabel + {\let\mglsisfirstuse\@secondoftwo}% + {\let\mglsisfirstuse\@firstoftwo}% + \edef\@mgls@dooptions{% + \noexpand\setkeys*{glsxtrcombinedpreopts}{\expandonce\mglscurrentoptions}}% + \@mgls@dooptions + \let\@mgls@setupoptions\XKV@rm + \mgls@disable@setup + \ifdefvoid\@gls@combined@mglsopts + {}% + {\glsxtr@mgls@applyopts\@gls@combined@mglsopts}% + \mgls@enable@setup + \ifstrempty{#1}{}{\def\@mgls@options{#1}\glsxtr@mgls@applyopts\@mgls@options}% + \ifx\@gls@combined@category\empty + \else + \glshascategoryattribute{\@gls@combined@category}{multioptions}% + {% + \letcs\@mgls@attroptions{@glsxtr@categoryattr@@\@gls@combined@category + @multioptions}% + \let\@gls@combined@mglsopts\@empty + \edef\@mgls@dooptions{% + \noexpand\setkeys*{glsxtrcombinedpreopts}{\expandonce\@mgls@attroptions}}% + \@mgls@dooptions + \eappto\@mgls@setupoptions{,\expandonce\XKV@rm}% + \ifx\@gls@combined@mglsopts\@empty + \else + \let\@mgls@setup\@empty + \mgls@disable@setup + \glsxtr@mgls@applyopts\@gls@combined@mglsopts + \mgls@enable@setup + \fi + }% + {}% + \fi + \edef\@mgls@dooptions{% + \noexpand\setkeys{glsxtrcombined}{\expandonce\@mgls@setupoptions}}% + \@mgls@dooptions + \let\mglscurrentcategory\@gls@combined@category + \ifnum\@gls@combined@hyper=1\relax + \def\@mgls@combinedlink{\@mgls@hyperlink{\mglscurrentmainlabel}}% + \else + \def\@mgls@combinedlink{\@firstofone}% + \fi + \def\@gls@combined@encapsulator##1{% + \@mgls@combinedlink{\csuse{\@gls@combined@textformat}{##1}}}% + \let\@mgls@do@current@element\@firstofone + \mglsisfirstuse + {% + \ifKV@glsxtrcombined@firstskipmain + \ifKV@glsxtrcombined@firstskipothers + \let\@gls@org@combined@encapsulator\@gls@combined@encapsulator + \def\@gls@combined@encapsulator##1{% + \glsxtrmglsWarnAllSkipped{All elements skipped for + first use of multi-entry `#2'}{#3}% + {\@gls@org@combined@encapsulator}% + }% + \let\@mgls@do@current@element\@gobble + \fi + \fi + }% + {% + \ifKV@glsxtrcombined@usedskipmain + \ifKV@glsxtrcombined@usedskipothers + \let\@gls@org@combined@encapsulator\@gls@combined@encapsulator + \def\@gls@combined@encapsulator##1{% + \glsxtrmglsWarnAllSkipped{All elements skipped for + subsequent use of multi-entry `#2'}{#3}% + {\@gls@org@combined@encapsulator}% + }% + \let\@mgls@do@current@element\@gobble + \fi + \fi + }% + \mglsisfirstuse + {% + \let\mglscurrentprefix\@gls@combined@firstprefix + \let\mglscurrentsuffix\@gls@combined@firstsuffix + }% + {% + \let\mglscurrentprefix\@gls@combined@usedprefix + \let\mglscurrentsuffix\@gls@combined@usedsuffix + }% + \xdef\@mgls@post@hookdefs{% + \noexpand\def\noexpand\mglslastmultilabel{\expandonce\mglscurrentmultilabel}% + \noexpand\def\noexpand\mglslastcategory{\mglscurrentcategory}% + }% + \ifx\@mgls@do@current@element\@gobble + \gappto\@mgls@post@hookdefs{% + \let\mglsiflastelementskipped\@firstoftwo + \let\mglslastelementlabel\@empty + \let\mglsiflastelementwasfirstuse\@firstoftwo + \let\mglsiflastelementwasplural\@secondoftwo + \let\mglsiflastelementcapscase\@firstofthree + }% + \fi + \mglsisfirstuse + {% + \gappto\@mgls@post@hookdefs{\let\mglswasfirstuse\@firstoftwo}% + \ifcase\@gls@combined@mpostlink@nr\relax + \gappto\@mgls@post@hookdefs{\let\mgls@do@postlinkhook\relax}% + \or + \ifcase\@gls@combined@mpostlinkelement@nr\relax + \gappto\@mgls@post@hookdefs{\let\mgls@do@postlinkhook\mglslastelementpostlinkhook}% + \or + \gappto\@mgls@post@hookdefs{\let\mgls@do@postlinkhook\mglslastmainpostlinkhook}% + \or + \gappto\@mgls@post@hookdefs{\let\mgls@do@postlinkhook\mglscustompostlinkhook}% + \fi + \or + \ifcase\@gls@combined@mpostlinkelement@nr\relax + \gappto\@mgls@post@hookdefs{\let\mgls@do@postlinkhook\mglslastelementpostlinkhook}% + \or + \gappto\@mgls@post@hookdefs{\let\mgls@do@postlinkhook\mglslastmainpostlinkhook}% + \or + \gappto\@mgls@post@hookdefs{\let\mgls@do@postlinkhook\mglscustompostlinkhook}% + \fi + \or + \gappto\@mgls@post@hookdefs{\let\mgls@do@postlinkhook\relax}% + \fi + }% + {% + \gappto\@mgls@post@hookdefs{\let\mglswasfirstuse\@secondoftwo}% + \ifcase\@gls@combined@mpostlink@nr\relax + \gappto\@mgls@post@hookdefs{\let\mgls@do@postlinkhook\relax}% + \or + \ifcase\@gls@combined@mpostlinkelement@nr\relax + \gappto\@mgls@post@hookdefs{\let\mgls@do@postlinkhook\mglslastelementpostlinkhook}% + \or + \gappto\@mgls@post@hookdefs{\let\mgls@do@postlinkhook\mglslastmainpostlinkhook}% + \or + \gappto\@mgls@post@hookdefs{\let\mgls@do@postlinkhook\mglscustompostlinkhook}% + \fi + \or + \gappto\@mgls@post@hookdefs{\let\mgls@do@postlinkhook\relax}% + \or + \ifcase\@gls@combined@mpostlinkelement@nr\relax + \gappto\@mgls@post@hookdefs{\let\mgls@do@postlinkhook\mglslastelementpostlinkhook}% + \or + \gappto\@mgls@post@hookdefs{\let\mgls@do@postlinkhook\mglslastmainpostlinkhook}% + \or + \gappto\@mgls@post@hookdefs{\let\mgls@do@postlinkhook\mglscustompostlinkhook}% + \fi + \fi + }% + \let\mgls@org@postlinkhook\glspostlinkhook + \mglsprefix + \let\mglslastelementlabel\@empty + \@gls@combined@encapsulator + {% + \def\@mgls@previouslabel{}% + \mglselementindex=0\relax + \@for\mglscurrentlabel:=\mglscurrentlist\do{% + \advance\mglselementindex by 1\relax + \glsxtr@setup@docurrent + \ifx\@xfor@nextelement\@nnil + \let\mglsiflast\@firstoftwo + \else + \let\mglsiflast\@secondoftwo + \mglsisfirstuse + {% + \glsxtr@mgls@checklastelement{first}{#2}% + }% + {% + \glsxtr@mgls@checklastelement{used}{#2}% + }% + \fi + \ifcase\@gls@combined@postlinks@nr\relax + \let\glspostlinkhook\relax + \or + \let\glspostlinkhook\mgls@org@postlinkhook + \or + \mglsiflast + {% + \let\glspostlinkhook\relax + }% + {% + \let\glspostlinkhook\mgls@org@postlinkhook + }% + \or + \ifx\mglscurrentlabel\mglscurrentmainlabel + \mglsiflast + {% + \let\glspostlinkhook\relax + }% + {% + \let\glspostlinkhook\mgls@org@postlinkhook + }% + \else + \let\glspostlinkhook\relax + \fi + \or + \ifx\mglscurrentlabel\mglscurrentmainlabel + \let\glspostlinkhook\mgls@org@postlinkhook + \else + \let\glspostlinkhook\relax + \fi + \or + \ifx\mglscurrentlabel\mglscurrentmainlabel + \let\glspostlinkhook\relax + \else + \mglsiflast + {% + \let\glspostlinkhook\relax + }% + {% + \let\glspostlinkhook\mgls@org@postlinkhook + }% + \fi + \or + \ifx\mglscurrentlabel\mglscurrentmainlabel + \let\glspostlinkhook\relax + \else + \let\glspostlinkhook\mgls@org@postlinkhook + \fi + \fi + \mglsiflast + {% + \xappto\@mgls@post@hookdefs{% + \noexpand\def\noexpand\mglslastelementlabel + {\expandonce\mglscurrentlabel}}% + }% + {}% + \@mgls@do@current@element + {% + \mglselementprehook + \GlsXtrIfUnusedOrUndefined{\mglscurrentlabel}% + {\let\@mgls@current@iffirstuse\@firstoftwo}% + {\let\@mgls@current@iffirstuse\@secondoftwo}% + \ifx\mglscurrentlabel\mglscurrentmainlabel + \edef\@mgls@current@options{format=\@gls@combined@encapmain}% + \ifcase\@gls@combined@indexmain + \appto\@mgls@current@options{,noindex}% + \or + \appto\@mgls@current@options{,noindex=false}% + \or + \@mgls@current@iffirstuse + {\appto\@mgls@current@options{,noindex=false}}% + {\appto\@mgls@current@options{,noindex}}% + \fi + \ifcase\@gls@combined@hyper\relax + \appto\@mgls@current@options{,hyper=false}% none + \or + \appto\@mgls@current@options{,hyper=false}% allmain + \or + \eappto\@mgls@current@options{,\@mgls@hyper}% mainonly + \or + \eappto\@mgls@current@options{,\@mgls@hyper}% individual + \or + \appto\@mgls@current@options{,hyper=false}% otheronly + \or + \mglsisfirstuse + {% + \appto\@mgls@current@options{,hyper=false}% notmainfirst + }% + {% + \eappto\@mgls@current@options{,\@mgls@hyper}% notmainfirst + }% + \or + \eappto\@mgls@current@options{,\@mgls@hyper}% nototherfirst + \or + \mglsisfirstuse + {% + \appto\@mgls@current@options{,hyper=false}% notfirst + }% + {% + \eappto\@mgls@current@options{,\@mgls@hyper}% notfirst + }% + \fi + \eappto\@mgls@current@options{,\@mgls@all,\@mgls@main}% + \else + \edef\@mgls@current@options{format=\@gls@combined@encapothers}% + \ifcase\@gls@combined@indexothers\relax + \appto\@mgls@current@options{,noindex}% + \or + \appto\@mgls@current@options{,noindex=false}% + \or + \@mgls@current@iffirstuse + {\appto\@mgls@current@options{,noindex=false}}% + {\appto\@mgls@current@options{,noindex}}% + \fi + \ifcase\@gls@combined@hyper\relax + \appto\@mgls@current@options{,hyper=false}% none + \or + \appto\@mgls@current@options{,hyper=false}% allmain + \or + \appto\@mgls@current@options{,hyper=false}% mainonly + \or + \eappto\@mgls@current@options{,\@mgls@hyper}% individual + \or + \eappto\@mgls@current@options{,\@mgls@hyper}% otheronly + \or + \eappto\@mgls@current@options{,\@mgls@hyper}% notmainfirst + \or + \mglsisfirstuse + {% + \appto\@mgls@current@options{,hyper=false}% nototherfirst + }% + {% + \eappto\@mgls@current@options{,\@mgls@hyper}% nototherfirst + }% + \or + \mglsisfirstuse + {% + \appto\@mgls@current@options{,hyper=false}% notfirst + }% + {% + \eappto\@mgls@current@options{,\@mgls@hyper}% notfirst + }% + \fi + \eappto\@mgls@current@options{,\@mgls@all,\@mgls@others}% + \fi + \ifx\@mgls@previouslabel\empty + \ifx\mglscurrentlabel\mglscurrentmainlabel + \let\@mgls@cs#6\relax + \else + \let\@mgls@cs#4\relax + \fi + \else + \@mgls@previous@iffirstuse + {% + \@mgls@current@iffirstuse + {\glscombinedfirstsepfirst{\@mgls@previouslabel}{\mglscurrentlabel}}% + {\glscombinedfirstsep{\@mgls@previouslabel}{\mglscurrentlabel}}% + }% + {% + \@mgls@current@iffirstuse + {\glscombinedsepfirst{\@mgls@previouslabel}{\mglscurrentlabel}}% + {\glscombinedsep{\@mgls@previouslabel}{\mglscurrentlabel}}% + }% + \ifx\mglscurrentlabel\mglscurrentmainlabel + \let\@mgls@cs#7\relax + \else + \let\@mgls@cs#5\relax + \fi + \fi + \mglsiflast + {\expandafter\@mgls@cs\expandafter{\@mgls@current@options}{\mglscurrentlabel}[#3]}% + {\expandafter\@mgls@cs\expandafter{\@mgls@current@options}{\mglscurrentlabel}[]}% + \ifx\mglscurrentlabel\mglscurrentmainlabel + \xappto\@mgls@post@hookdefs{% + \noexpand\def\noexpand\mglslastmainlabel + {\expandonce\mglscurrentmainlabel}% + }% + \glsxtrifwasfirstuse + {% + \gappto\@mgls@post@hookdefs{\let\mglsiflastmainwasfirstuse\@firstoftwo}% + }% + {% + \gappto\@mgls@post@hookdefs{\let\mglsiflastmainwasfirstuse\@secondoftwo}% + }% + \glsifplural + {% + \gappto\@mgls@post@hookdefs{\let\mglsiflastmainwasplural\@firstoftwo}% + }% + {% + \gappto\@mgls@post@hookdefs{\let\mglsiflastmainwasplural\@secondoftwo}% + }% + \glscapscase + {% + \gappto\@mgls@post@hookdefs{% + \let\mglsiflastmaincapscase\@firstofthree + }% + }% + {% + \gappto\@mgls@post@hookdefs{% + \let\mglsiflastmaincapscase\@secondofthree + }% + }% + {% + \gappto\@mgls@post@hookdefs{% + \let\mglsiflastmaincapscase\@thirdofthree + }% + }% + \fi + \let\@mgls@previouslabel\mglscurrentlabel + \let\@mgls@previous@iffirstuse\@mgls@current@iffirstuse + }% + \mglselementposthook + }% + \ifx\mglslastmainlabel\@empty + \gappto\@mgls@post@hookdefs{\let\mglsiflastmainskipped\@firstoftwo}% + \else + \gappto\@mgls@post@hookdefs{\let\mglsiflastmainskipped\@secondoftwo}% + \fi + \ifx\@mgls@do@current@element\@gobble + \gappto\@mgls@post@hookdefs{\let\mglsiflastelementskipped\@firstoftwo}% + \else + \gappto\@mgls@post@hookdefs{\let\mglsiflastelementskipped\@secondoftwo}% + \fi + \glsxtrifwasfirstuse + {% + \gappto\@mgls@post@hookdefs{\let\mglsiflastelementwasfirstuse\@firstoftwo}% + }% + {% + \gappto\@mgls@post@hookdefs{\let\mglsiflastelementwasfirstuse\@secondoftwo}% + }% + \glsifplural + {% + \gappto\@mgls@post@hookdefs{\let\mglsiflastelementwasplural\@firstoftwo}% + }% + {% + \gappto\@mgls@post@hookdefs{\let\mglsiflastelementwasplural\@secondoftwo}% + }% + \glscapscase + {% + \gappto\@mgls@post@hookdefs{% + \let\mglsiflastelementcapscase\@firstofthree + }% + }% + {% + \gappto\@mgls@post@hookdefs{% + \let\mglsiflastelementcapscase\@secondofthree + }% + }% + {% + \gappto\@mgls@post@hookdefs{% + \let\mglsiflastelementcapscase\@thirdofthree + }% + }% + }% + \@mgls@post@hookdefs + \mglssuffix + \ifcase\@mgls@unsetaction\relax + \xappto\@mgls@post@hookdefs{% + \noexpand\mglsunset{\expandonce\mglscurrentmultilabel}}% + \or + \xappto\@mgls@post@hookdefs{% + \noexpand\mglslocalunset{\expandonce\mglscurrentmultilabel}}% + \fi + }% + \glsxtrmglswrite{#2}% + \egroup + \@mgls@post@hookdefs + \mgls@do@postlinkhook +} +\newcommand*{\mglscustompostlinkhook}{} +\newcommand*{\mglslastelementpostlinkhook}{% + \let\glsxtrifwasfirstuse\mglsiflastelementwasfirstuse + \let\glsifplural\mglsiflastelementwasplural + \let\glscapscase\mglsiflastelementcapscase + \let\glslabel\mglslastelementlabel + \glspostlinkhook +} +\newcommand*{\mglslastmainpostlinkhook}{% + \let\glsxtrifwasfirstuse\mglsiflastmainwasfirstuse + \let\glsifplural\mglsiflastmainwasplural + \let\glscapscase\mglsiflastmaincapscase + \let\glslabel\mglslastmainlabel + \glspostlinkhook +} +\newcommand*{\mglsdefcategoryprefix}[2]{% + \csdef{mglsprefix@#1}{#2}% +} +\newcommand*{\mglshascategoryprefix}[3]{% + \ifcsdef{mglsprefix@#1}{#2}{#3}% +} +\newcommand*{\mglsusecategoryprefix}[1]{% + \csuse{mglsprefix@#1}% +} +\newcommand*{\mglsprefix}{% + \ifdefempty\mglscurrentcategory + {\mglscurrentprefix}% + {% + \mglshascategoryprefix{\mglscurrentcategory}% + {\mglsusecategoryprefix{\mglscurrentcategory}}% + {\mglscurrentprefix}% + }% +} +\newcommand*{\mglsdefcategorysuffix}[2]{% + \csdef{mglssuffix@#1}{#2}% +} +\newcommand*{\mglshascategorysuffix}[3]{% + \ifcsdef{mglssuffix@#1}{#2}{#3}% +} +\newcommand*{\mglsusecategorysuffix}[1]{% + \csuse{mglssuffix@#1}% +} +\newcommand*{\mglssuffix}{% + \ifdefempty\mglscurrentcategory + {\ifdefempty{\mglscurrentsuffix}{}{\space(\mglscurrentsuffix)}}% + {% + \mglshascategorysuffix{\mglscurrentcategory}% + {\mglsusecategorysuffix{\mglscurrentcategory}}% + {\ifdefempty{\mglscurrentsuffix}{}{\space(\mglscurrentsuffix)}}% + }% +} +\newcommand*{\mglselementprehook}{} +\newcommand*{\mglselementposthook}{} +\newcommand*{\glscombinedsep}[2]{% + \glshasattribute{#1}{combinedsep}% + {\glsgetattribute{#1}{combinedsep}}% + { }% +} +\newcommand*{\glscombinedfirstsepfirst}[2]{% + \glshasattribute{#1}{combinedfirstsepfirst}% + {\glsgetattribute{#1}{combinedfirstsepfirst}}% + {\glscombinedsep{#1}{#2}}% +} +\newcommand*{\glscombinedfirstsep}[2]{% + \glshasattribute{#1}{combinedfirstsep}% + {\glsgetattribute{#1}{combinedfirstsep}}% + {\glscombinedsep{#1}{#2}}% +} +\newcommand*{\glscombinedsepfirst}[2]{% + \glshasattribute{#1}{combinedsepfirst}% + {\glsgetattribute{#1}{combinedsepfirst}}% + {\glscombinedsep{#1}{#2}}% +} +\newcommand*{\glssetcombinedsepabbrvnbsp}{% + \renewcommand*{\glscombinedsep}[2]{% + \glshasattribute{##1}{combinedsep}% + {\glsgetattribute{##1}{combinedsep}}% + {\ifhasshort{##1}{~}{ }}% + }% + \renewcommand*{\glscombinedsepfirst}[2]{% + \glshasattribute{##1}{combinedsepfirst}% + {\glsgetattribute{##1}{combinedsepfirst}}% + {\ifhasshort{##1}{~}{ }}% + }% + \renewcommand*{\glscombinedfirstsep}[2]{% + \glshasattribute{##1}{combinedfirstsep}% + {\glsgetattribute{##1}{combinedfirstsep}}% + { }% + }% + \renewcommand*{\glscombinedfirstsepfirst}[2]{% + \glshasattribute{##1}{combinedfirstsepfirst}% + {\glsgetattribute{##1}{combinedfirstsepfirst}}% + { }% + }% +} +\newcommand*{\glssetcombinedsepabbrvnone}{% + \renewcommand*{\glscombinedsep}[2]{% + \glshasattribute{##1}{combinedsep}% + {\glsgetattribute{##1}{combinedsep}}% + {\ifhasshort{##1}{}{\ifhasshort{##2}{}{ }}}% + }% + \renewcommand*{\glscombinedsepfirst}[2]{% + \glshasattribute{##1}{combinedsepfirst}% + {\glsgetattribute{##1}{combinedsepfirst}}% + {\ifhasshort{##1}{}{ }}% + }% + \renewcommand*{\glscombinedfirstsep}[2]{% + \glshasattribute{##1}{combinedfirstsep}% + {\glsgetattribute{##1}{combinedfirstsep}}% + {\ifhasshort{##2}{}{ }}% + }% + \renewcommand*{\glscombinedfirstsepfirst}[2]{% + \glshasattribute{##1}{combinedfirstsepfirst}% + {\glsgetattribute{##1}{combinedfirstsepfirst}}% + { }% + }% +} +\newcommand*{\glssetcombinedsepnarrow}[2]{% + \renewcommand*{\glscombinedsep}[2]{% + \glshasattribute{##1}{combinedsep}% + {\glsgetattribute{##1}{combinedsep}}% + {% + \ifhasshort{##1}% + {\settowidth{\dimen@}{\glsentryshort{##1}}}% + {\settowidth{\dimen@}{\glsentrytext{##1}}}% + \ifdim\dimen@<#1\relax + #2% + \else + \ifhasshort{##2}% + {\settowidth{\dimen@}{\glsentryshort{##2}}}% + {\settowidth{\dimen@}{\glsentrytext{##2}}}% + \ifdim\dimen@<#1\relax + #2% + \else + \space + \fi + \fi + }% + }% + \renewcommand*{\glscombinedsepfirst}[2]{% + \glshasattribute{##1}{combinedsepfirst}% + {\glsgetattribute{##1}{combinedsepfirst}}% + {% + \ifhasshort{##1}% + {\settowidth{\dimen@}{\glsentryshort{##1}}}% + {\settowidth{\dimen@}{\glsentrytext{##1}}}% + \ifdim\dimen@<#1\relax + #2% + \else + \ifhaslong{##2}% + {\settowidth{\dimen@}{\glsentrylong{##2}}}% + {\settowidth{\dimen@}{\glsentryfirst{##2}}}% + \ifdim\dimen@<#1\relax + #2% + \else + \space + \fi + \fi + }% + }% + \renewcommand*{\glscombinedfirstsep}[2]{% + \glshasattribute{##1}{combinedfirstsep}% + {\glsgetattribute{##1}{combinedfirstsep}}% + {% + \ifhaslong{##1}% + {\settowidth{\dimen@}{\glsentrylong{##1}}}% + {\settowidth{\dimen@}{\glsentryfirst{##1}}}% + \ifdim\dimen@<#1\relax + #2% + \else + \ifhasshort{##2}% + {\settowidth{\dimen@}{\glsentryshort{##2}}}% + {\settowidth{\dimen@}{\glsentrytext{##2}}}% + \ifdim\dimen@<#1\relax + #2% + \else + \space + \fi + \fi + }% + }% + \renewcommand*{\glscombinedfirstsepfirst}[2]{% + \glshasattribute{##1}{combinedfirstsepfirst}% + {\glsgetattribute{##1}{combinedfirstsepfirst}}% + {% + \ifhaslong{##1}% + {\settowidth{\dimen@}{\glsentrylong{##1}}}% + {\settowidth{\dimen@}{\glsentryfirst{##1}}}% + \ifdim\dimen@<#1\relax + #2% + \else + \ifhaslong{##2}% + {\settowidth{\dimen@}{\glsentrylong{##2}}}% + {\settowidth{\dimen@}{\glsentryfirst{##2}}}% + \ifdim\dimen@<#1\relax + #2% + \else + \space + \fi + \fi + }% + }% +} +\newcommand{\glsxtrmglswrite}[1]{% + \ifx\@glsxtr@record@setting\@glsxtr@record@setting@off + \else + \protected@edef\@glsxtr@mglslabel{#1}% + \ifdef\@glsxtr@mglsreflist + {% + \expandafter\DTLifinlist\expandafter{\@glsxtr@mglslabel}% + {\@glsxtr@mglsreflist}{}% + {% + \xappto\@glsxtr@mglsreflist{,\expandonce\@glsxtr@mglslabel}% + \if@mgls@writeseparaterefs + \protected@write\@auxout{}{\string\@glsxtr@mglsrefs{#1}}% + \fi + }% + }% + {% + \global\let\@glsxtr@mglsreflist\@glsxtr@mglslabel + \if@mgls@writeseparaterefs + \protected@write\@auxout{}{\string\@glsxtr@mglsrefs{#1}}% + \else + \AtEndDocument{\immediate\protected@write\@auxout{}% + {\string\@glsxtr@mglsrefs{\@glsxtr@mglsreflist}}}% + \fi + \@mgls@disable@writeseparateref@cond + }% + \fi +} +\newcommand{\@glsxtr@mglsrefs}[1]{} +\newif\if@mgls@writeseparaterefs \@mgls@writeseparaterefsfalse +\newcommand{\mglsWriteSeparateRefsTrue}{\global\@mgls@writeseparaterefstrue} +\newcommand{\mglsWriteSeparateRefsFalse}{\global\@mgls@writeseparaterefsfalse} +\newcommand*{\@mgls@disable@writeseparateref@cond}{% + \gdef\mglsWriteSeparateRefsTrue{\PackageError{glossaries-extra}% + {Too late to use \string\mglsWriteSeparateRefsTrue}% + {\string\mglsWriteSeparateRefsTrue\space can only be used before + the first instance of any \string\mgls-like command}}% + \gdef\mglsWriteSeparateRefsFalse{\PackageError{glossaries-extra}% + {Too late to use \string\mglsWriteSeparateRefsFalse}% + {\string\mglsWriteSeparateRefsFalse\space can only be used before + the first instance of any \string\mgls-like command}}% +} +\newcommand{\glsxtr@newmgls}[5]{% + \edef\@glsxr@newmgls@do{% + \noexpand\newrobustcmd*{\expandonce{\csname #1\endcsname}}% + {\noexpand\@gls@hyp@opt\expandonce{\csname ns@glsxtr@#1\endcsname}}% + \noexpand\newcommand*{\expandonce{\csname ns@glsxtr@#1\endcsname}}[2][]{% + \noexpand\new@ifnextchar[% + {\expandonce{\csname glsxtr@#1\endcsname}{####1}{####2}}% + {\expandonce{\csname glsxtr@#1\endcsname}{####1}{####2}[]}% + }% + \noexpand\def\expandonce{\csname glsxtr@#1\endcsname}####1####2[####3]{% + \noexpand\def\noexpand\glsxtrcurrentmglscsname{#1}% + \noexpand\glsxtr@mgls@inner{####1}{####2}{####3}% + {\noexpand#2}{\noexpand#3}{\noexpand#4}{\noexpand#5}% + }% + }% + \@glsxr@newmgls@do + \ifx\@glsxtr@record@setting\@glsxtr@record@setting@off + \else + \ifdef\@glsxtr@mglslikelist + {\xappto\@glsxtr@mglslikelist{,#1}}% + {% + \gdef\@glsxtr@mglslikelist{#1}% + \AtEndDocument{\immediate\protected@write\@auxout{}% + {\string\@glsxtr@mglslike{\@glsxtr@mglslikelist}}}% + }% + \fi +} +\newcommand*{\@glsxtr@mglslike}[1]{} +\newcommand*{\GlsXtrMglsOrGls}[2]{% + \def\@glsxtr@mgls@or@gls@mcs{#1}% + \def\@glsxtr@mgls@or@gls@gcs{#2}% + \@ifstar{\s@GlsXtrMglsOrGls}% + {% + \@ifnextchar+{\PLUS\@firstoftwo{\p@GlsXtrMglsOrGls}}% + {% + \ifdefempty\@gls@alt@hyp@opt@char\@GlsXtrMglsOrGls\alt@GlsXtrMglsOrGls + }% + }% +} +\newcommand*{\alt@GlsXtrMglsOrGls}{ + \expandafter\@ifnextchar\@gls@alt@hyp@opt@char + {\@firstoftwo{\@alt@GlsXtrMglsOrGls}}{\@GlsXtrMglsOrGls}% +} +\newcommand*{\@GlsXtrMglsOrGls}[2][]{% + \glsxtrifmulti{#2}% + {\@glsxtr@mgls@or@gls@mcs[#1]{#2}}% + {\@glsxtr@mgls@or@gls@gcs[#1]{#2}}% +} +\newcommand*{\s@GlsXtrMglsOrGls}[2][]{% + \glsxtrifmulti{#2}% + {\@glsxtr@mgls@or@gls@mcs*[#1]{#2}}% + {\@glsxtr@mgls@or@gls@gcs*[#1]{#2}}% +} +\newcommand*{\p@GlsXtrMglsOrGls}[2][]{% + \glsxtrifmulti{#2}% + {\@glsxtr@mgls@or@gls@mcs+[#1]{#2}}% + {\@glsxtr@mgls@or@gls@gcs+[#1]{#2}}% +} +\newcommand*{\@alt@GlsXtrMglsOrGls}[2][]{% + \glsxtrifmulti{#2}% + {\expandafter\@glsxtr@mgls@or@gls@mcs\@gls@alt@hyp@opt@char[#1]{#2}}% + {\expandafter\@glsxtr@mgls@or@gls@gcs\@gls@alt@hyp@opt@char[#1]{#2}}% +} +\glsxtr@newmgls{mgls}{\@gls@}{\@gls@}{\@gls@}{\@gls@}% +\glsxtr@newmgls{mglspl}{\@glspl@}{\@glspl@}{\@glspl@}{\@glspl@}% +\glsxtr@newmgls{mglsmainpl}{\@gls@}{\@gls@}{\@glspl@}{\@glspl@}% +\glsxtr@newmgls{Mgls}{\@Gls@}{\@gls@}{\@Gls@}{\@gls@}% +\glsxtr@newmgls{Mglspl}{\@Glspl@}{\@glspl@}{\@Glspl@}{\@glspl@}% +\glsxtr@newmgls{Mglsmainpl}{\@Gls@}{\@gls@}{\@Glspl@}{\@glspl@}% +\glsxtr@newmgls{MGls}{\@Gls@}{\@Gls@}{\@Gls@}{\@Gls@}% +\glsxtr@newmgls{MGlspl}{\@Glspl@}{\@Glspl@}{\@Glspl@}{\@Glspl@}% +\glsxtr@newmgls{MGlsmainpl}{\@Gls@}{\@Gls@}{\@Glspl@}{\@Glspl@}% +\glsxtr@newmgls{MGLS}{\@GLS@}{\@GLS@}{\@GLS@}{\@GLS@}% +\glsxtr@newmgls{MGLSpl}{\@GLSpl@}{\@GLSpl@}{\@GLSpl@}{\@GLSpl@}% +\glsxtr@newmgls{MGLSmainpl}{\@GLS@}{\@GLS@}{\@GLSpl@}{\@GLSpl@}% +\def\@glslongortext#1#2[#3]{% + \ifglshaslong{#2}{\@glsxtrlong{#1}{#2}[#3]}{\@glstext@{#1}{#2}[#3]}% +} +\def\@glsshortortext#1#2[#3]{% + \ifglshasshort{#2}{\@glsxtrshort{#1}{#2}[#3]}{\@glstext@{#1}{#2}[#3]}% +} +\def\@glsfullorfirst#1#2[#3]{% + \ifglshasshort{#2}{\@glsxtr@full{#1}{#2}[#3]}{\@glsfirst@{#1}{#2}[#3]}% +} +\def\@Glslongortext#1#2[#3]{% + \ifglshaslong{#2}{\@Glsxtrlong{#1}{#2}[#3]}{\@Glstext@{#1}{#2}[#3]}% +} +\def\@Glsshortortext#1#2[#3]{% + \ifglshasshort{#2}{\@Glsxtrshort{#1}{#2}[#3]}{\@Glstext@{#1}{#2}[#3]}% +} +\def\@Glsfullorfirst#1#2[#3]{% + \ifglshasshort{#2}{\@Glsxtr@full{#1}{#2}[#3]}{\@Glsfirst@{#1}{#2}[#3]}% +} +\glsxtr@newmgls{mglsshort}% +{\@glsshortortext}{\@glsshortortext}{\@glsshortortext}{\@glsshortortext}% +\glsxtr@newmgls{mglslong}% +{\@glslongortext}{\@glslongortext}{\@glslongortext}{\@glslongortext}% +\glsxtr@newmgls{mglsfull}% +{\@glsfullorfirst}{\@glsfullorfirst}{\@glsfullorfirst}{\@glsfullorfirst}% +\glsxtr@newmgls{Mglsshort}% +{\@Glsshortortext}{\@glsshortortext}{\@Glsshortortext}{\@glsshortortext}% +\glsxtr@newmgls{Mglslong}% +{\@Glslongortext}{\@glslongortext}{\@Glslongortext}{\@glslongortext}% +\glsxtr@newmgls{Mglsfull}% +{\@Glsfullorfirst}{\@glsfullorfirst}{\@Glsfullorfirst}{\@glsfullorfirst}% +\glsxtr@newmgls{mglsname}% + {\@glsname@}{\@glsname@}{\@glsname@}{\@glsname@}% +\glsxtr@newmgls{Mglsname}% + {\@Glsname@}{\@glsname@}{\@Glsname@}{\@glsname@}% +\glsxtr@newmgls{MGlsname}% + {\@Glsname@}{\@Glsname@}{\@Glsname@}{\@Glsname@}% +\def\@glssymbolorgls#1#2[#3]{% + \ifglshassymbol{#2}{\@glssymbol@{#1}{#2}[#3]}{\@gls@{#1}{#2}[#3]}% +} +\def\@glssymbolorGls#1#2[#3]{% + \ifglshassymbol{#2}{\@glssymbol@{#1}{#2}[#3]}{\@Gls@{#1}{#2}[#3]}% +} +\glsxtr@newmgls{mglssymbol}% + {\@glssymbolorgls}{\@glssymbolorgls}{\@glssymbolorgls}{\@glssymbolorgls}% +\glsxtr@newmgls{Mglssymbol}% + {\@glssymbolorGls}{\@glssymbolorgls}{\@glssymbolorGls}{\@glssymbolorgls}% +\glsxtr@newmgls{MGlssymbol}% + {\@glssymbolorGls}{\@glssymbolorGls}{\@glssymbolorGls}{\@glssymbolorGls}% +\newcommand{\mglsfield}{useri} +\def\@glsfieldorgls#1#2[#3]{% + \glsxtrifhasfield{\mglsfield}{#2}% + {\@glsdisp[#1]{#2}{\glscurrentfieldvalue#3}}% + {\@gls@{#1}{#2}[#3]}% +} +\def\@Glsfieldorgls#1#2[#3]{% + \glsxtrifhasfield{\mglsfield}{#2}% + {\@glsdisp[#1]{#2}{\xmakefirstuc\glscurrentfieldvalue#3}}% + {\@Gls@{#1}{#2}[#3]}% +} +\glsxtr@newmgls{mglsusefield}% + {\@glsfieldorgls}{\@glsfieldorgls}{\@glsfieldorgls}{\@glsfieldorgls}% +\glsxtr@newmgls{Mglsusefield}% + {\@Glsfieldorgls}{\@glsfieldorgls}{\@Glsfieldorgls}{\@glsfieldorgls}% +\glsxtr@newmgls{MGlsusefield}% + {\@Glsfieldorgls}{\@Glsfieldorgls}{\@Glsfieldorgls}{\@Glsfieldorgls}% +\newcommand*{\mpglsWarning}{% + \GlossariesExtraWarning{glossaries-prefix.sty is required for + \string\mpgls\space family of commands (either load after + glossaries-extra.sty or use the `prefix' package option)}% +} +\def\@pglsorgls#1#2[#3]{% + \ifdef\@pgls@{\@pgls@{#1}{#2}[#3]}{\mpglsWarning\@gls@{#1}{#2}[#3]}% +} +\def\@pglsorglspl#1#2[#3]{% + \ifdef\@pglspl@{\@pglspl@{#1}{#2}[#3]}{\mpglsWarning\@glspl@{#1}{#2}[#3]}% +} +\def\@Pglsorgls#1#2[#3]{% + \ifdef\@Pgls@{\@Pgls@{#1}{#2}[#3]}{\mpglsWarning\@Gls@{#1}{#2}[#3]}% +} +\def\@pglsorglspl#1#2[#3]{% + \ifdef\@pglspl@{\@pglspl@{#1}{#2}[#3]}{\mpglsWarning\@glspl@{#1}{#2}[#3]}% +} +\def\@Pglsorglspl#1#2[#3]{% + \ifdef\@Pglspl@{\@Pglspl@{#1}{#2}[#3]}{\mpglsWarning\@Glspl@{#1}{#2}[#3]}% +} +\def\@PGLSorgls#1#2[#3]{% + \ifdef\@PGLS@{\@PGLS@{#1}{#2}[#3]}{\mpglsWarning\@GLS@{#1}{#2}[#3]}% +} +\def\@PGLSorglspl#1#2[#3]{% + \ifdef\@PGLSpl@{\@PGLSpl@{#1}{#2}[#3]}{\mpglsWarning\@GLSpl@{#1}{#2}[#3]}% +} +\glsxtr@newmgls{mpgls}{\@pglsorgls@}{\@gls@}{\@pglsorgls@}{\@gls@}% +\glsxtr@newmgls{mpglspl}{\@pglsorglspl@}{\@glspl@}{\@pglsorglspl@}{\@glspl@}% +\glsxtr@newmgls{mpglsmainpl}{\@pglsorgls@}{\@gls@}{\@pglsorglspl@}{\@glspl@}% +\glsxtr@newmgls{Mpgls}{\@Pglsorgls@}{\@gls@}{\@Pglsorgls@}{\@gls@}% +\glsxtr@newmgls{Mpglspl}{\@Pglsorglspl@}{\@glspl@}{\@Pglsorglspl@}{\@glspl@}% +\glsxtr@newmgls{Mpglsmainpl}{\@Pglsorgls@}{\@gls@}{\@Pglsorglspl@}{\@glspl@}% +\glsxtr@newmgls{MPGls}{\@Pglsorgls@}{\@Gls@}{\@Pglsorgls@}{\@Gls@}% +\glsxtr@newmgls{MPGlspl}{\@Pglsorglspl@}{\@Glspl@}{\@Pglsorglspl@}{\@Glspl@}% +\glsxtr@newmgls{MPGlsmainpl}{\@Pglsorgls@}{\@Gls@}{\@Pglsorglspl@}{\@Glspl@}% +\glsxtr@newmgls{MPGLS}{\@PGLSorgls@}{\@GLS@}{\@PGLSorgls@}{\@GLS@}% +\glsxtr@newmgls{MPGLSpl}{\@PGLSorglspl@}{\@GLSpl@}{\@PGLSorglspl@}{\@GLSpl@}% +\glsxtr@newmgls{MPGLSmainpl}{\@PGLSorgls@}{\@GLS@}{\@PGLSorglspl@}{\@GLSpl@}% +\newcommand*{\RequireGlossariesExtraLang}[1]{% + \@ifundefined{ver@glossariesxtr-#1.ldf}{\input{glossariesxtr-#1.ldf}}{}% +} +\newcommand*{\ProvidesGlossariesExtraLang}[1]{% + \ProvidesFile{glossariesxtr-#1.ldf}% +} +\newcommand{\glsxtr@loaddialect}{% + \IfTrackedLanguageFileExists{\this@dialect}% + {glossariesxtr-}% prefix + {.ldf}% + {% + \RequireGlossariesExtraLang{\CurrentTrackedTag}% + }% + {}% not found + \@glsxtrdialecthook +} +\@ifpackageloaded{tracklang} {% + \AnyTrackedLanguages + {% + \ForEachTrackedDialect{\this@dialect}{\glsxtr@loaddialect}% + }% + {}% +} {} +\@glsxtr@redefstyles +\@glsxtr@do@style +% \end{macrocode} +%\iffalse +% \begin{macrocode} +% +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} +%<*glossaries-extra-bib2gls-2021-11-22.sty> +% \end{macrocode} +%\fi +%\subsection{Rollback v1.48 (glossaries-extra-bib2gls-2021-11-22.sty)} +% Version 1.48 preserved for rollback. +% \begin{macrocode} +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{glossaries-extra-bib2gls}[2021/11/22 v1.48 (NLCT)] +\ifglsacronym + \providecommand*{\printunsrtacronyms}[1][]{% + \printunsrtglossary[type=\acronymtype,#1]}% +\fi +\ifglossaryexists{index} +{ + \providecommand*{\printunsrtindex}[1][]{% + \printunsrtglossary[type=index,#1]}% +}{} +\ifglossaryexists{symbols} +{ + \providecommand*{\printunsrtsymbols}[1][]{% + \printunsrtglossary[type=symbols,#1]}% +}{} +\ifglossaryexists{numbers} +{ + \providecommand*{\printunsrtnumbers}[1][]{% + \printunsrtglossary[type=numbers,#1]}% +}{} +\ifglossaryexists{abbreviations} +{ + \providecommand*{\printunsrtabbreviations}[1][]{% + \printunsrtglossary[type=abbreviations,#1]}% +}{} +\renewcommand*{\glsdisplaynumberlist}[1]{% + \glsdoifexists{#1}% + {% + {\let\bibglsdelimN\glsnumlistsep + \let\bibglslastDelimN\glsnumlistlastsep + \glsxtrusefield{#1}{location}% + }% + }% +} +\robustify\glsdisplaynumberlist +\renewcommand*{\glsentrynumberlist}[1]{\glsxtrusefield{#1}{location}} +\newcommand*{\glshex}{\string\u} +\newcommand*{\glscapturedgroup}{\string\$} +\newcommand*{\GlsXtrIfHasNonZeroChildCount}{% + \@ifstar\s@GlsXtrIfHasNonZeroChildCount\@GlsXtrIfHasNonZeroChildCount +} +\newcommand*{\@GlsXtrIfHasNonZeroChildCount}[3]{% + \@GlsXtrIfFieldNonZero{childcount}{#1}{#2}{#3}% +} +\newcommand*{\s@GlsXtrIfHasNonZeroChildCount}[3]{% + \s@GlsXtrIfFieldNonZero{childcount}{#1}{#2}{#3}% +} +\newcommand*{\glsxtrprovidecommand}{\providecommand} +\newcommand*{\glsrenewcommand}{\@star@or@long\glsxtr@renewcommand} +\newcommand*{\glsxtr@renewcommand}[1]{% + \begingroup \escapechar\m@ne\xdef\@gtempa{{\string#1}}\endgroup + \expandafter\@ifundefined\@gtempa + {% + \GlossariesExtraWarning{can't redefine \noexpand#1(not already defined)}% + }% + \relax + \relax + \let\@ifdefinable\@rc@ifdefinable + \new@command#1% +} +\newcommand*{\glsxtr@wrglossarylocation}[2]{#1} +\ifdef\hyperref +{% + \newcommand*{\GlsXtrIndexCounterLink}[2]{% + \glsxtrifhasfield{indexcounter}{#2}% + {\hyperref[wrglossary.\glscurrentfieldvalue]{#1}}% + {#1}% + } +} +{ + \newcommand*{\GlsXtrIndexCounterLink}[2]{#1} +} +\newcommand*{\GlsXtrDualField}{dual} +\newcommand*{\GlsXtrDualBackLink}[2]{% + \glsxtrifhasfield{\GlsXtrDualField}{#2}% + {\glshyperlink[#1]{\glscurrentfieldvalue}}% + {#2}% +} +\newcommand*{\GlsXtrBibTeXEntryAliases}{% + article=bibtexentry, + book=bibtexentry, + booklet=bibtexentry, + conference=bibtexentry, + inbook=bibtexentry, + incollection=bibtexentry, + inproceedings=bibtexentry, + manual=bibtexentry, + mastersthesis=bibtexentry, + misc=bibtexentry, + phdthesis=bibtexentry, + proceedings=bibtexentry, + techreport=bibtexentry, + unpublished=bibtexentry +} +\newcommand*{\GlsXtrProvideBibTeXFields}{% + \glsaddstoragekey{address}{}{\glsxtrbibaddress}% + \glsaddstoragekey{author}{}{\glsxtrbibauthor}% + \glsaddstoragekey{booktitle}{}{\glsxtrbibbooktitle}% + \glsaddstoragekey{chapter}{}{\glsxtrbibchapter}% + \glsaddstoragekey{edition}{}{\glsxtrbibedition}% + \glsaddstoragekey{howpublished}{}{\glsxtrbibhowpublished}% + \glsaddstoragekey{institution}{}{\glsxtrbibinstitution}% + \glsaddstoragekey{journal}{}{\glsxtrbibjournal}% + \glsaddstoragekey{month}{}{\glsxtrbibmonth}% + \glsaddstoragekey{note}{}{\glsxtrbibnote}% + \glsaddstoragekey{number}{}{\glsxtrbibnumber}% + \glsaddstoragekey{organization}{}{\glsxtrbiborganization}% + \glsaddstoragekey{pages}{}{\glsxtrbibpages}% + \glsaddstoragekey{publisher}{}{\glsxtrbibpublisher}% + \glsaddstoragekey{school}{}{\glsxtrbibschool}% + \glsaddstoragekey{series}{}{\glsxtrbibseries}% + \glsaddstoragekey{title}{}{\glsxtrbibtitle}% + \glsaddstoragekey{bibtextype}{}{\glsxtrbibtype}% + \glsaddstoragekey{volume}{}{\glsxtrbibvolume}% +} +\newcommand*{\glsxtrmultisupplocation}[3]{% + {% + \def\glsxtrsupplocationurl{#2}% + \glshypernumber{#1}% + }% +} +\newcommand*\glsxtrdisplaysupploc[5]{% + \setentrycounter[#1]{#2}% + \glsxtrmultisupplocation{#5}{#4}{#3}% +} +\ifundef\hyperlink +{ + \newcommand*{\glsxtrdisplaylocnameref}[8]{% + \glsnoidxdisplayloc{#1}{#2}{#3}{#4}% + } +} +{ + \newcommand*{\glsxtrdisplaylocnameref}[8]{% + \ifcsdef{glsxtr#2locfmt}% + {\glsxtrnamereflink{#3}{\csuse{glsxtr#2locfmt}{#4}{#5}}{#2.#7}{#8}}% + {% + \ifstrempty{#5}% + {% + \glsxtrnamereflink{#3}{#4}{#2.#7}{#8}% + }% + {% + \ifstrequal{#2}{page}% + {\glsxtrnamereflink{#3}{#4}{#2.#7}{#8}}% + {\glsxtrnamereflink{#3}{#5}{#2.#7}{#8}}% + }% + }% + } +} +\newcommand*{\glsxtrequationlocfmt}[2]{(#1)} +\newcommand*{\glsxtrnamereflink}[4]{% + \begingroup + \let\glshypernumber\@firstofone + \ifstrempty{#4}% + {\glsxtrfmtinternalnameref{#3}{#1}{#2}}% + {\glsxtrfmtexternalnameref{#3}{#1}{#2}{#4}}% + \endgroup +} +\newcommand{\glsxtrnameloclink}[6]{% + \begingroup + \setentrycounter[#1]{#2}% + \def\glsxtr@locationhypertext{#5}% + \let\glshypernumber\@firstofone + \def\@glsnumberformat{#3}% + \def\glsxtrsupplocationurl{#6}% + \toks@={}% + \@glsxtr@bibgls@removespaces#4 \@nil + \endgroup +} +\def\@glsxtr@bibgls@removespaces#1 #2\@nil{% + \toks@=\expandafter{\the\toks@#1}% + \ifx\\#2\\% + \edef\@glo@tmp{\the\toks@}% + \ifx\@glo@tmp\empty + \else + \protected@edef\@glo@tmp{\glsentrycounter\@glo@counterprefix\the\toks@}% + \ifdefvoid\glsxtrsupplocationurl + {% + \expandafter\glsxtrfmtinternalnameref\expandafter{\@glo@tmp}% + {\@glsnumberformat}{\glsxtr@locationhypertext}% + }% + {% + \expandafter\glsxtrfmtexternalnameref\expandafter{\@glo@tmp}% + {\@glsnumberformat}{\glsxtr@locationhypertext}{\glsxtrsupplocationurl}% + }% + \fi + \else + \@gls@ReturnAfterFi{% + \@glsxtr@bibgls@removespaces#2\@nil + }% + \fi +} +\newcommand*{\glsxtrfmtinternalnameref}[3]{% + \csuse{#2}{\glsdohyperlink{#1}{#3}}% +} +\newcommand*{\glsxtrfmtexternalnameref}[4]{% + \csuse{#2}{\hyperref{#4}{}{#1}{#3}}% +} +\newcommand*{\glsxtrSetWidest}[3]{% + \ifdef\glsupdatewidest + {% + \ifdef\glslongextraUpdateWidest + {% + \ifstrempty{#1} + {% + \glsupdatewidest[#2]{#3}% + \ifnum#2=0\relax + \glslongextraUpdateWidest{#3}% + \else + \glslongextraUpdateWidestChild{#2}{#3}% + \fi + }% + {% + \apptoglossarypreamble[#1]{\glsupdatewidest[#2]{#3}}% + \ifnum#2=0\relax + \apptoglossarypreamble[#1]{\glslongextraUpdateWidest{#3}}% + \else + \apptoglossarypreamble[#1]{\glslongextraUpdateWidestChild{#2}{#3}}% + \fi + }% + }% + {% + \ifstrempty{#1} + {% + \glsupdatewidest[#2]{#3}% + }% + {% + \apptoglossarypreamble[#1]{\glsupdatewidest[#2]{#3}}% + }% + }% + }% + {% + \ifdef\glssetwidest + {% + \ifdef\glslongextraUpdateWidest + {% + \ifstrempty{#1} + {% + \glssetwidest[#2]{#3}% + \ifnum#2=0\relax + \glslongextraUpdateWidest{#3}% + \else + \glslongextraUpdateWidestChild{#2}{#3}% + \fi + }% + {% + \apptoglossarypreamble[#1]{\glssetwidest[#2]{#3}}% + \ifnum#2=0\relax + \apptoglossarypreamble[#1]{\glslongextraUpdateWidest{#3}}% + \else + \apptoglossarypreamble[#1]{\glslongextraUpdateWidestChild{#2}{#3}}% + \fi + }% + }% + {% + \ifstrempty{#1} + {% + \glssetwidest[#2]{#3}% + }% + {% + \apptoglossarypreamble[#1]{\glssetwidest[#2]{#3}}% + }% + }% + }% + {% + \ifdef\glslongextraUpdateWidest + {% + \ifstrempty{#1} + {% + \ifnum#2=0\relax + \glslongextraUpdateWidest{#3}% + \else + \glslongextraUpdateWidestChild{#2}{#3}% + \fi + }% + {% + \ifnum#2=0\relax + \apptoglossarypreamble[#1]{\glslongextraUpdateWidest{#3}}% + \else + \apptoglossarypreamble[#1]{\glslongextraUpdateWidestChild{#2}{#3}}% + \fi + }% + }% + {}% + }% + }% +} +\newcommand*{\glsxtrSetWidestFallback}[2]{% + \ifnum#1=0\relax + \ifdef\glsFindWidestTopLevelName + {% + \glsFindWidestTopLevelName[#2]% + }% + {% + \GlossariesExtraWarning{You need stylemods={tree} to + provide a fallback for set-widest}% + }% + \else + \ifdef\glsFindWidestLevelTwo + {% + \glsFindWidestLevelTwo[#2]% + \ifdef\glslongextraUpdateWidestChild + {% + \glslongextraUpdateWidestChild{#1}{\csuse{@glswidestnamei}}% + \glslongextraUpdateWidestChild{#1}{\csuse{@glswidestnameii}}% + }% + {}% + }% + {% + \GlossariesExtraWarning{You need stylemods={tree} to + provide a fallback for set-widest}% + }% + \fi +} +\newcommand*{\@glsxtr@labelprefixes}{} +\newcommand*{\glsxtrclearlabelprefixes}{% + \renewcommand*{\@glsxtr@labelprefixes}{}% +} +\newcommand*{\glsxtraddlabelprefix}[1]{% + \ifstrempty{#1}% + {\glsxtraddlabelprefix{\empty}}% + {% + \ifdefempty\@glsxtr@labelprefixes + {\def\@glsxtr@labelprefixes{#1}}% + {\appto\@glsxtr@labelprefixes{,#1}}% + }% +} +\newcommand*{\glsxtrprependlabelprefix}[1]{% + \ifstrempty{#1}% + {\glsxtrprependlabelprefix{\empty}}% + {% + \ifdefempty\@glsxtr@labelprefixes + {\def\@glsxtr@labelprefixes{#1}}% + {\preto\@glsxtr@labelprefixes{#1,}}% + }% +} +\newcommand*{\glsxtrifinlabelprefixlist}[3]{% + \ifstrempty{#1}% + {\glsxtrifinlabelprefixlist{\empty}{#2}{#3}}% + {% + \DTLifinlist{#1}{\@glsxtr@labelprefixes}{#2}{#3}% + }% +} +\AtBeginDocument{% + \protected@write\@auxout{}{\string\providecommand{\string\@glsxtr@prefixlabellist}[1]{}}% + \protected@write\@auxout{}{\string\@glsxtr@prefixlabellist{\@glsxtr@labelprefixes}}% +} +\newcommand*{\@glsxtr@get@prefixedlabel}[1]{% + \begingroup + \protected@edef\@gls@thislabel{#1}% + \@for\@glsxtr@prefix:=\@glsxtr@labelprefixes\do + {% + \protected@edef\@gls@thislabel{\@glsxtr@prefix#1}% + \ifglsentryexists{\@gls@thislabel}{\@endfortrue}{}% + }% + \edef\@glo@tmp{\endgroup\noexpand\def\noexpand\@gls@thislabel{\@gls@thislabel}}\@glo@tmp +} +\newrobustcmd*{\dgls}{\@gls@hyp@opt\@dgls} +\newcommand*{\@dgls}[2][]{% + \@glsxtr@get@prefixedlabel{#2}% + \new@ifnextchar[{\@gls@{#1}{\@gls@thislabel}}{\@gls@{#1}{\@gls@thislabel}[]}% +} +\newrobustcmd*{\dglspl}{\@gls@hyp@opt\@dglspl} +\newcommand*{\@dglspl}[2][]{% + \@glsxtr@get@prefixedlabel{#2}% + \new@ifnextchar[{\@glspl@{#1}{\@gls@thislabel}}{\@glspl@{#1}{\@gls@thislabel}[]}% +} +\newrobustcmd*{\dGls}{\@gls@hyp@opt\@dGls} +\newcommand*{\@dGls}[2][]{% + \@glsxtr@get@prefixedlabel{#2}% + \new@ifnextchar[{\@Gls@{#1}{\@gls@thislabel}}{\@Gls@{#1}{\@gls@thislabel}[]}% +} +\newrobustcmd*{\dGlspl}{\@gls@hyp@opt\@dGlspl} +\newcommand*{\@dGlspl}[2][]{% + \@glsxtr@get@prefixedlabel{#2}% + \new@ifnextchar[{\@Glspl@{#1}{\@gls@thislabel}}{\@Glspl@{#1}{\@gls@thislabel}[]}% +} +\newrobustcmd*{\dGLS}{\@gls@hyp@opt\@dGLS} +\newcommand*{\@dGLS}[2][]{% + \@glsxtr@get@prefixedlabel{#2}% + \new@ifnextchar[{\@GLS@{#1}{\@gls@thislabel}}{\@GLS@{#1}{\@gls@thislabel}[]}% +} +\newrobustcmd*{\dGLSpl}{\@gls@hyp@opt\@dGLSpl} +\newcommand*{\@dGLSpl}[2][]{% + \@glsxtr@get@prefixedlabel{#2}% + \new@ifnextchar[{\@GLSpl@{#1}{\@gls@thislabel}}{\@GLSpl@{#1}{\@gls@thislabel}[]}% +} +\newrobustcmd*{\dglslink}[3][]{% + \@glsxtr@get@prefixedlabel{#2}% + \glslink[#1]{\@gls@thislabel}{#3}% +} +\newrobustcmd*{\dglsdisp}[3][]{% + \@glsxtr@get@prefixedlabel{#2}% + \glsdisp[#1]{\@gls@thislabel}{#3}% +} +\newrobustcmd*{\glsxtrmultientryadjustedname}[4]{% + \bgroup + \let\@glsxtrmultientryadjustednamesep\glsxtrmultientryadjustednamesep + \let\@glsxtrmultientryadjustednamepresep\glsxtrmultientryadjustednamepresep + \let\@glsxtrmultientryadjustednamepostsep\glsxtrmultientryadjustednamepostsep + \let\@glsxtrmultientryadjustednameother\glsxtrmultientryadjustednameother + \let\@glsxtrmultientryadjustednamefmt\glsxtrmultientryadjustednamefmt + \let\@glsxtrmultientryadjustednamefirstother\glsxtrmultientryadjustednameother + \let\@glsxtrmultientryadjustednamefirstfmt\glsxtrmultientryadjustednamefmt + \@glsxtrmultientryadjustedname{#1}{#2}{#3}{#4}% + \egroup +} +\newrobustcmd*{\Glsxtrmultientryadjustedname}[4]{% + \bgroup + \let\@glsxtrmultientryadjustednamesep\glsxtrmultientryadjustednamesep + \let\@glsxtrmultientryadjustednamepresep\glsxtrmultientryadjustednamepresep + \let\@glsxtrmultientryadjustednamepostsep\glsxtrmultientryadjustednamepostsep + \let\@glsxtrmultientryadjustednameother\glsxtrmultientryadjustednameother + \let\@glsxtrmultientryadjustednamefmt\glsxtrmultientryadjustednamefmt + \let\@glsxtrmultientryadjustednamefirstother\Glsxtrmultientryadjustednameother + \let\@glsxtrmultientryadjustednamefirstfmt\Glsxtrmultientryadjustednamefmt + \@glsxtrmultientryadjustedname{#1}{#2}{#3}{#4}% + \egroup +} +\newrobustcmd*{\GlsXtrmultientryadjustedname}[4]{% + \bgroup + \let\@glsxtrmultientryadjustednamesep\glsxtrmultientryadjustednamesep + \let\@glsxtrmultientryadjustednamepresep\glsxtrmultientryadjustednamepresep + \let\@glsxtrmultientryadjustednamepostsep\glsxtrmultientryadjustednamepostsep + \let\@glsxtrmultientryadjustednameother\GlsXtrmultientryadjustednameother + \let\@glsxtrmultientryadjustednamefmt\GlsXtrmultientryadjustednamefmt + \let\@glsxtrmultientryadjustednamefirstother\GlsXtrmultientryadjustednameother + \let\@glsxtrmultientryadjustednamefirstfmt\GlsXtrmultientryadjustednamefmt + \@glsxtrmultientryadjustedname{#1}{#2}{#3}{#4}% + \egroup +} +\newrobustcmd*{\GLSxtrmultientryadjustedname}[4]{% + \bgroup + \let\@glsxtrmultientryadjustednamesep\glsxtrmultientryadjustednamesep + \let\@glsxtrmultientryadjustednamepresep\glsxtrmultientryadjustednamepresep + \let\@glsxtrmultientryadjustednamepostsep\glsxtrmultientryadjustednamepostsep + \let\@glsxtrmultientryadjustednameother\GLSxtrmultientryadjustednameother + \let\@glsxtrmultientryadjustednamefmt\GLSxtrmultientryadjustednamefmt + \let\@glsxtrmultientryadjustednamefirstother\GLSxtrmultientryadjustednameother + \let\@glsxtrmultientryadjustednamefirstfmt\GLSxtrmultientryadjustednamefmt + \@glsxtrmultientryadjustedname{#1}{#2}{#3}{#4}% + \egroup +} +\newcommand*{\@glsxtrmultientryadjustedname}[4]{% + \letcs\mglscurrentmainlabel{@gls@combined@#4@main}% + \letcs\mglscurrentmainlist{@gls@combined@#4@list}% + \letcs\mglscurrentmainoptions{@gls@combined@#4@options}% + \ifblank{#1}% + {% + \@glsxtrmultientryadjustednamefirstfmt{#2}% + }% + {% + \def\@mgls@previouslabel{}% + \let\@gls@xtradjustedother\@glsxtrmultientryadjustednamefirstother + \@for\mglscurrentlabel:=#1\do{% + \ifx\@mgls@previouslabel\empty + \else + \@glsxtrmultientryadjustednamesep{\@mgls@previouslabel}{\mglscurrentlabel}% + \fi + \@gls@xtradjustedother{\mglscurrentlabel}% + \let\@mgls@previouslabel\mglscurrentlabel + \let\@gls@xtradjustedother\@glsxtrmultientryadjustednameother + }% + \@glsxtrmultientryadjustednamepresep{\@mgls@previouslabel}{\mglscurrentmainlabel}% + \@glsxtrmultientryadjustednamefmt{#2}% + }% + \ifblank{#3}% + {}% + {% + \let\@mgls@previouslabel\mglscurrentmainlabel + \let\@gls@xtrmultientryadjustednamesep\@glsxtrmultientryadjustednamepostsep + \@for\mglscurrentlabel:=#3\do{% + \@gls@xtrmultientryadjustednamesep{\@mgls@previouslabel}{\mglscurrentlabel}% + \@glsxtrmultientryadjustednameother{\mglscurrentlabel}% + \let\@mgls@previouslabel\mglscurrentlabel + \let\@gls@xtrmultientryadjustednamesep\@glsxtrmultientryadjustednamesep + }% + }% +} +\newcommand*{\glsxtrmultientryadjustednamesep}{\glscombinedfirstsepfirst} +\newcommand*{\glsxtrmultientryadjustednamepresep}{\glsxtrmultientryadjustednamesep} +\newcommand*{\glsxtrmultientryadjustednamepostsep}{\glsxtrmultientryadjustednamesep} +\newcommand*{\glsxtrmultientryadjustednamefmt}[1]{#1} +\newcommand*{\glsxtrmultientryadjustednameother}[1]{\glsentryname{#1}} +\newcommand*{\Glsxtrmultientryadjustednamefmt}[1]{\makefirstuc{#1}} +\newcommand*{\Glsxtrmultientryadjustednameother}[1]{\Glsentryname{#1}} +\newcommand*{\GlsXtrmultientryadjustednameother}[1]{% + \glsentrytitlecase{#1}{name}} +\ifdef\glscapitalisewords +{% + \newcommand*{\GlsXtrmultientryadjustednamefmt}[1]{\glscapitalisewords{#1}} +} +{ + \newcommand*{\GlsXtrmultientryadjustednamefmt}[1]{\capitalisewords{#1}} +} +\newcommand*{\GLSxtrmultientryadjustednameother}[1]{% + \mfirstucMakeUppercase{\glsentryname{#1}}} +\newcommand*{\GLSxtrmultientryadjustednamefmt}[1]{\mfirstucMakeUppercase{#1}} +\providecommand*{\Alpha}{\mathrm{A}} +\providecommand*{\Beta}{\mathrm{B}} +\providecommand*{\Epsilon}{\mathrm{E}} +\providecommand*{\Zeta}{\mathrm{Z}} +\providecommand*{\Eta}{\mathrm{H}} +\providecommand*{\Iota}{\mathrm{I}} +\providecommand*{\Kappa}{\mathrm{K}} +\providecommand*{\Mu}{\mathrm{M}} +\providecommand*{\Nu}{\mathrm{N}} +\providecommand*{\Omicron}{\mathrm{O}} +\providecommand*{\Rho}{\mathrm{P}} +\providecommand*{\Tau}{\mathrm{T}} +\providecommand*{\Chi}{\mathrm{X}} +\providecommand*{\Digamma}{\mathrm{F}} +\providecommand*{\omicron}{\mathit{o}} +\@ifpackageloaded{upgreek}% +{ + \providecommand*{\Upalpha}{\mathrm{A}} + \providecommand*{\Upbeta}{\mathrm{B}} + \providecommand*{\Upepsilon}{\mathrm{E}} + \providecommand*{\Upzeta}{\mathrm{Z}} + \providecommand*{\Upeta}{\mathrm{H}} + \providecommand*{\Upiota}{\mathrm{I}} + \providecommand*{\Upkappa}{\mathrm{K}} + \providecommand*{\Upmu}{\mathrm{M}} + \providecommand*{\Upnu}{\mathrm{N}} + \providecommand*{\Upomicron}{\mathrm{O}} + \providecommand*{\Uprho}{\mathrm{P}} + \providecommand*{\Uptau}{\mathrm{T}} + \providecommand*{\Upchi}{\mathrm{X}} + \providecommand*{\upomicron}{\mathrm{o}} +}% +{}% upgreek.sty not loaded +\newcommand*{\glsxtrcontrolrules}{% + \string'\glshex 200B\string'\string=\glshex 200C\string=\glshex 200D + \string=\glshex 200E\string=\glshex 200F\string=\glshex 0000\string=\glshex 0001 + \string=\glshex 0002\string=\glshex 0003\string=\glshex 0004\string=\glshex 0005 + \string=\glshex 0006\string=\glshex 0007\string=\glshex 0008 + \string=\string'\glshex 0009\string'\string=\string'\glshex 000B\string' + \string=\glshex 000E\string=\glshex 000F\string=\string'\glshex +0010\string'\string=\glshex 0011 + \string=\glshex 0012\string=\glshex 0013\string=\glshex 0014\string=\glshex 0015 + \string=\glshex 0016\string=\glshex 0017\string=\glshex 0018\string=\glshex 0019 + \string=\glshex 001A\string=\glshex 001B\string=\glshex 001C\string=\glshex 001D + \string=\glshex 001E\string=\glshex 001F\string=\glshex 007F\string=\glshex 0080 + \string=\glshex 0081\string=\glshex 0082\string=\glshex 0083\string=\glshex 0084 + \string=\glshex 0085\string=\glshex 0086\string=\glshex 0087\string=\glshex 0088 + \string=\glshex 0089\string=\glshex 008A\string=\glshex 008B\string=\glshex 008C + \string=\glshex 008D\string=\glshex 008E\string=\glshex 008F\string=\glshex 0090 + \string=\glshex 0091\string=\glshex 0092\string=\glshex 0093\string=\glshex 0094 + \string=\glshex 0095\string=\glshex 0096\string=\glshex 0097\string=\glshex 0098 + \string=\glshex 0099\string=\glshex 009A\string=\glshex 009B\string=\glshex 009C + \string=\glshex 009D\string=\glshex 009E\string=\glshex 009F +} +\newcommand*{\glsxtrspacerules}{% + \string' \string'\string; + \string'\glshex 00A0\string'\string; + \string'\glshex 2000\string'\string; + \string'\glshex 2001\string'\string; + \string'\glshex 2002\string'\string; + \string'\glshex 2003\string'\string; + \string'\glshex 2004\string'\string; + \string'\glshex 2005\string'\string; + \string'\glshex 2006\string'\string; + \string'\glshex 2007\string'\string; + \string'\glshex 2008\string'\string; + \string'\glshex 2009\string'\string; + \string'\glshex 200A\string'\string; + \string'\glshex 3000\string' +} +\newcommand*{\glsxtrnonprintablerules}{% + \string'\glshex FEFF\string'\string; + \string'\glshex 000A\string'\string; + \string'\glshex 0009\string'\string; + \string'\glshex 000C\string'\string; + \string'\glshex 000B\string' +} + +\newcommand*{\glsxtrcombiningdiacriticrules}{% + \glsxtrcombiningdiacriticIrules\string; + \glsxtrcombiningdiacriticIIrules\string; + \glsxtrcombiningdiacriticIIIrules\string; + \glsxtrcombiningdiacriticIVrules +} +\newcommand*{\glsxtrcombiningdiacriticIrules}{% + \glshex 0301\string;% combining acute + \glshex 0300\string;% combining grave + \glshex 0306\string;% combining breve + \glshex 0302\string;% combining circumflex + \glshex 030C\string;% combining caron + \glshex 030A\string;% combining ring + \glshex 030D\string;% combining vertical line above + \glshex 0308\string;% combining diaeresis + \glshex 030B\string;% combining double acute + \glshex 0303\string;% combining tilde + \glshex 0307\string;% combining dot above + \glshex 0304% combining macron +} +\newcommand*{\glsxtrcombiningdiacriticIIrules}{% + \glshex 0337\string;% combining short solidus overlay + \glshex 0327\string;% combining cedilla + \glshex 0328\string;% combining ogonek + \glshex 0323\string;% combining dot below + \glshex 0332\string;% combining low line + \glshex 0305\string;% combining overline + \glshex 0309\string;% combining hook above + \glshex 030E\string;% combining double vertical line above + \glshex 030F\string;% combining double grave accent + \glshex 0310\string;% combining candrabindu + \glshex 0311\string;% combining inverted breve + \glshex 0312\string;% combining turned comma above + \glshex 0313\string;% combining comma above + \glshex 0314\string;% combining reversed comma above + \glshex 0315\string;% combining comma above right + \glshex 0316\string;% combining grave accent below + \glshex 0317% combining acute accent below +} +\newcommand*{\glsxtrcombiningdiacriticIIIrules}{% + \glshex 0318\string;% combining left tack below + \glshex 0319\string;% combining right tack below + \glshex 031A\string;% combining left angle above + \glshex 031B\string;% combining horn + \glshex 031C\string;% combining left half ring below + \glshex 031D\string;% combining up tack below + \glshex 031E\string;% combining down tack below + \glshex 031F\string;% combining plus sign below + \glshex 0320\string;% combining minus sign below + \glshex 0321\string;% combining palatalized hook below + \glshex 0322\string;% combining retroflex hook below + \glshex 0324\string;% combining diaresis below + \glshex 0325\string;% combining ring below + \glshex 0326\string;% combining comma below + \glshex 0329\string;% combining vertical line below + \glshex 032A\string;% combining bridge below + \glshex 032B\string;% combining inverted double arch below + \glshex 032C\string;% combining caron below + \glshex 032D\string;% combining circumflex accent below + \glshex 032E\string;% combining breve below + \glshex 032F\string;% combining inverted breve below + \glshex 0330\string;% combining tilde below + \glshex 0331\string;% combining macron below + \glshex 0333\string;% combining double low line + \glshex 0334\string;% combining tilde overlay + \glshex 0335\string;% combining short stroke overlay + \glshex 0336\string;% combining long stroke overlay + \glshex 0338\string;% combining long solidus overlay + \glshex 0339\string;% combining combining right half ring below + \glshex 033A\string;% combining inverted bridge below + \glshex 033B\string;% combining square below + \glshex 033C\string;% combining seagull below + \glshex 033D\string;% combining x above + \glshex 033E\string;% combining vertical tilde + \glshex 033F\string;% combining double overline + \glshex 0342\string;% combining Greek perispomeni + \glshex 0344\string;% combining Greek dialytika tonos + \glshex 0345\string;% combining Greek ypogegrammeni + \glshex 0360\string;% combining double tilde + \glshex 0361\string;% combining double inverted breve + \glshex 0483\string;% combining Cyrillic titlo + \glshex 0484\string;% combining Cyrillic palatalization + \glshex 0485\string;% combining Cyrillic dasia pneumata + \glshex 0486% combining Cyrillic psili pneumata +} +\newcommand*{\glsxtrcombiningdiacriticIVrules}{% + \glshex 20D0\string;% combining left harpoon above + \glshex 20D1\string;% combining right harpoon above + \glshex 20D2\string;% combining long vertical line overlay + \glshex 20D3\string;% combining short vertical line overlay + \glshex 20D4\string;% combining anticlockwise arrow above + \glshex 20D5\string;% combining clockwise arrow above + \glshex 20D6\string;% combining left arrow above + \glshex 20D7\string;% combining right arrow above + \glshex 20D8\string;% combining ring overlay + \glshex 20D9\string;% combining clockwise ring overlay + \glshex 20DA\string;% combining anticlockwise ring overlay + \glshex 20DB\string;% combining three dots above + \glshex 20DC\string;% combining four dots above + \glshex 20DD\string;% combining enclosing circle + \glshex 20DE\string;% combining enclosing square + \glshex 20DF\string;% combining enclosing diamond + \glshex 20E0\string;% combining enclosing circle backslash + \glshex 20E1% combining left right arrow above +} +\newcommand*{\glsxtrhyphenrules}{% + \string'\string-\string'\string;% ASCII hyphen + \glshex 00AD\string;% soft hyphen + \glshex 2010\string;% hyphen + \glshex 2011\string;% non-breaking hyphen + \glshex 2012\string;% figure dash + \glshex 2013\string;% en dash + \glshex 2014\string;% em dash + \glshex 2015\string;% horizontal bar + \glshex 2212\string=\glshex 207B\string=\glshex 208B% minus sign +} +\newcommand*{\glsxtrgeneralpuncrules}{% + \glsxtrgeneralpuncIrules + \string<\glsxtrcurrencyrules + \string<\glsxtrgeneralpuncIIrules +} +\newcommand*{\glsxtrgeneralpuncIrules}{% + \string'\glshex 005F\string'% underscore + \string<\glshex 00AF% macron + \string<\string'\glshex 002C\string'% comma + \string<\string'\glshex 003B\string'% semi-colon + \string<\string'\glshex 003A\string'% colon + \string<\string'\glshex 0021\string'% exclamation mark + \string<\glshex 00A1% inverted exclamation mark + \string<\string'\glshex 003F\string'% question mark + \string<\glshex 00BF% inverted question mark + \string<\string'\glshex 002F\string'% solidus + \string<\string'\glshex 002E\string'% full stop + \string<\glshex 00B4% acute accent + \string<\string'\glshex 0060\string'% grave accent + \string<\string'\glshex 005E\string'% circumflex accent + \string<\glshex 00A8% diaersis + \string<\string'\glshex 007E\string'% tilde + \string<\glshex 00B7% middle dot + \string<\glshex 00B8% cedilla + \string<\string'\glshex 0027\string'% straight apostrophe + \string<\string'\glshex 0022\string'% straight double quote + \string<\glshex 00AB% left guillemet + \string<\glshex 00BB% right guillemet + \string<\string'\glshex 0028\string'% left parenthesis + \string=\glshex 207D\string=\glshex 208D% super/subscript left parenthesis + \string<\string'\glshex 0029\string'% right parenthesis + \string=\glshex 207E\string=\glshex 208E% super/subscript right parenthesis + \string<\string'\glshex 005B\string'% left square bracket + \string<\string'\glshex 005D\string'% right square bracket + \string<\string'\glshex 007B\string'% left curly bracket + \string<\string'\glshex 007D\string'% right curly bracket + \string<\glshex 00A7% section sign + \string<\glshex 00B6% pilcrow sign + \string<\glshex 00A9% copyright sign + \string<\glshex 00AE% registered sign + \string<\string'\glshex 0040\string'% at sign +} +\newcommand*{\glsxtrcurrencyrules}{% + \glshex 00A4% currency sign + \string<\glshex 0E3F% Thai currency symbol baht + \string<\glshex 00A2% cent sign + \string<\glshex 20A1% colon sign + \string<\glshex 20A2% cruzeiro sign + \string<\string'\glshex 0024\string'% dollar sign + \string<\glshex 20AB% dong sign + \string<\glshex 20AC% euro sign + \string<\glshex 20A3% French franc sign + \string<\glshex 20A4% lira sign + \string<\glshex 20A5% mill sign + \string<\glshex 20A6% naira sign + \string<\glshex 20A7% peseta sign + \string<\glshex 00A3% pound sign + \string<\glshex 20A8% rupee sign + \string<\glshex 20AA% new sheqel sign + \string<\glshex 20A9% won sign + \string<\glshex 00A5% yen sign +} +\newcommand*{\glsxtrgeneralpuncIIrules}{% + \string'\glshex 002A\string'% asterisk + \string<\string'\glshex 005C\string'% backslash + \string<\string'\glshex 0026\string'% ampersand + \string<\string'\glshex 0023\string'% hash sign + \string<\string'\glshex 0025\string'% percent sign + \string<\string'\glshex 002B\string'% plus sign + \string=\glshex 207A\string=\glshex 208A% super/subscript plus sign + \string<\glshex 00B1% plus-minus sign + \string<\glshex 00F7% division sign + \string<\glshex 00D7% multiplication sign + \string<\string'\glshex 003C\string'% less-than sign + \string<\string'\glshex 003D\string'% equals sign + \string<\string'\glshex 003E\string'% greater-than sign + \string<\glshex 00AC% not sign + \string<\string'\glshex 007C\string'% vertical bar (pipe) + \string<\glshex 00A6% broken bar + \string<\glshex 00B0% degree sign + \string<\glshex 00B5% micron sign +} +\newcommand*{\glsxtrGeneralLatinIrules}{% + \glsxtrLatinA + \string +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} +%<*glossaries-extra-stylemods-2021-11-22.sty> +% \end{macrocode} +%\fi +%\subsection{Rollback v1.48 (glossaries-extra-stylemods-2021-11-22.sty)} +% Version 1.48 preserved for rollback. +% \begin{macrocode} +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{glossaries-extra-stylemods}[2021/11/22 v1.48 (NLCT)] +\newcommand*{\@glsxtr@loadstyles}{} +\DeclareOption{all}{% + \appto\@glsxtr@loadstyles{% + \RequirePackage{glossary-inline}% + \RequirePackage{glossary-list}% + \RequirePackage{glossary-tree}% + \RequirePackage{glossary-mcols}% + \RequirePackage{glossary-long}% + \RequirePackage{glossary-longragged}% + \RequirePackage{glossary-longbooktabs}% + \RequirePackage{glossary-super}% + \RequirePackage{glossary-superragged}% + \RequirePackage{glossary-bookindex}[=v1.48]% + \RequirePackage{glossary-longextra}[=v1.48]% + \RequirePackage{glossary-topic}[=v1.48]% + } +} +\DeclareOption*{% + \IfFileExists{glossary-\CurrentOption.sty} + {\eappto\@glsxtr@loadstyles{% + \noexpand\RequirePackage{glossary-\CurrentOption}}% + }% + {% + \PackageError{glossaries-extra-styles}% + {Unknown option `\CurrentOption'}{}% + }% +} +\ProcessOptions +\@glsxtr@loadstyles +\providecommand*{\glsxtrprelocation}{\space} +\providecommand{\renewglossarystyle}[2]{% + \ifcsundef{@glsstyle@#1}% + {% + \PackageError{glossaries-extra}{Glossary style `#1' isn't already defined}{}% + }% + {% + \csdef{@glsstyle@#1}{#2}% + }% +} +\ifdef{\@glsstyle@listdotted} +{% + \renewglossarystyle{listdotted}{% + \setglossarystyle{list}% + \renewcommand*{\glossentry}[2]{% + \item[]\makebox[\glslistdottedwidth][l]{% + \glsentryitem{##1}% + \glstarget{##1}{\glossentryname{##1}}% + \unskip\leaders\hbox to 2.9mm{\hss.}\hfill\strut}% + \glossentrydesc{##1}\glspostdescription}% + \renewcommand*{\subglossentry}[3]{% + \item[]\makebox[\glslistdottedwidth][l]{% + \glssubentryitem{##2}% + \glstarget{##2}{\glossentryname{##2}}% + \unskip\leaders\hbox to 2.9mm{\hss.}\hfill\strut}% + \glossentrydesc{##2}\glspostdescription}% + } +} +{% +} +\ifdef{\@glsstyle@list} +{% + \newcommand{\glslistprelocation}{\glsxtrprelocation} + \newcommand{\glslistchildprelocation}{\glslistprelocation} + \newcommand{\glslistchildpostlocation}{.} + \newcommand{\glslistdesc}[1]{\glossentrydesc{#1}\glspostdescription} + \newcommand{\glslistgroupskip}{\nobreak\indexspace\nobreak} + \newcommand{\glslistitem}[1]{% + \item[\glsentryitem{#1}% + \glstarget{#1}{\glossentryname{#1}}]% + } + \providecommand{\glslistinit}{% + \ifdef\GetTitleStringDisableCommands + {% + \GetTitleStringSetup{expand}% + \GetTitleStringDisableCommands{% + \let\glsentryitem\@gobble + \let\glstarget\@secondoftwo + \let\glossentryname\glslistexpandedname + \let\glslistgroupheaderfmt\@firstofone + \let\glsgetgrouptitle\@firstofone + \let\glsnavhypertarget\@secondoftwo + \let\glsnavigation\relax + }% + }% + {}% + } + \providecommand{\glslistexpandedname}[1]{% + \ifcsname glo@\glsdetoklabel{#1}@name\endcsname + \expandafter\expandonce\csname glo@\glsdetoklabel{#1}@name\expandafter\endcsname + \fi + } + \renewglossarystyle{list}{% + \renewenvironment{theglossary}% + {\glslistinit\begin{description}}{\end{description}}% + \renewcommand*{\glossaryheader}{}% + \renewcommand*{\glsgroupheading}[1]{}% + \renewcommand*{\glossentry}[2]{% + \glslistitem{##1}\glslistdesc{##1}\glslistprelocation ##2}% + \renewcommand*{\subglossentry}[3]{% + \glssubentryitem{##2}% + \glstarget{##2}{\strut}\space + \glslistdesc{##2}% + \glslistchildprelocation ##3\glslistchildpostlocation}% + \renewcommand*{\glsgroupskip}{\ifglsnogroupskip\else\glslistgroupskip\fi}% + } +} +{} +\ifdef{\@glsstyle@altlist} +{% + \newcommand{\glsaltlistitem}[1]{% + \glslistitem{#1}% + \mbox{}\par\nobreak\@afterheading + } + \renewglossarystyle{altlist}{% + \setglossarystyle{list}% + \renewcommand*{\glossentry}[2]{% + \glsaltlistitem{##1}% + \glslistdesc{##1}\glslistprelocation ##2}% + \renewcommand{\subglossentry}[3]{% + \par + \glssubentryitem{##2}% + \glstarget{##2}{\strut}\glslistdesc{##2}% + \glslistchildprelocation ##3}% + } +} +{} +\ifdef{\@glsstyle@listgroup} +{% + \newcommand{\glslistgroupheaderitem}[2]{\item[{#2}]} + \newcommand{\glslistgroupafterheader}{% + \mbox{}\par\nobreak\@afterheading + } + \renewglossarystyle{listgroup}{% + \setglossarystyle{list}% + \renewcommand*{\glsgroupheading}[1]{% + \glslistgroupheaderitem{##1}{\glslistgroupheaderfmt{\glsgetgrouptitle{##1}}}% + \glslistgroupafterheader + }% + } +} +{} +\ifdef{\@glsstyle@listhypergroup} +{% + \renewglossarystyle{listhypergroup}{% + \setglossarystyle{list}% + \renewcommand*{\glossaryheader}{% + \glslistnavigationitem{\glsnavigation}}% + \renewcommand*{\glsgroupheading}[1]{% + \glslistgroupheaderitem{##1}{\glslistgroupheaderfmt + {\glsnavhypertarget{##1}{\glsgetgrouptitle{##1}}}}% + \glslistgroupafterheader + }% + } +} +{} +\ifdef{\@glsstyle@altlistgroup} +{% + \renewglossarystyle{altlistgroup}{% + \setglossarystyle{altlist}% + \renewcommand*{\glsgroupheading}[1]{% + \glslistgroupheaderitem{##1}% + {\glslistgroupheaderfmt{\glsgetgrouptitle{##1}}}% + \glslistgroupafterheader + }% + } +} +{} +\ifdef{\@glsstyle@altlisthypergroup} +{% + \renewglossarystyle{altlisthypergroup}{% + \setglossarystyle{altlist}% + \renewcommand*{\glossaryheader}{% + \glslistnavigationitem{\glsnavigation}}% + \renewcommand*{\glsgroupheading}[1]{% + \glslistgroupheaderitem{##1}{\glslistgroupheaderfmt + {\glsnavhypertarget{##1}{\glsgetgrouptitle{##1}}}}% + \glslistgroupafterheader + }% + } +} +{} +\ifcsdef{@glsstyle@long} +{% + \renewglossarystyle{long}{% + \renewenvironment{theglossary}% + {\begin{longtable}{lp{\glsdescwidth}}}% + {\end{longtable}}% + \renewcommand*{\glossaryheader}{}% + \renewcommand*{\glsgroupheading}[1]{}% + \renewcommand{\glossentry}[2]{% + \glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}} & + \glossentrydesc{##1}\glspostdescription + \glsxtrprelocation ##2\tabularnewline + }% + \renewcommand{\subglossentry}[3]{% + & + \glssubentryitem{##2}% + \glstarget{##2}{\strut}\glossentrydesc{##2}\glspostdescription + \glsxtrprelocation ##3\tabularnewline + }% + \ifglsnogroupskip + \renewcommand*{\glsgroupskip}{}% + \else + \renewcommand*{\glsgroupskip}{ & \tabularnewline}% + \fi + } +} +{} +\ifcsdef{@glsstyle@long3col} +{% + \renewglossarystyle{long3col}{% + \renewenvironment{theglossary}% + {\begin{longtable}{lp{\glsdescwidth}p{\glspagelistwidth}}}% + {\end{longtable}}% + \renewcommand*{\glossaryheader}{}% + \renewcommand*{\glsgroupheading}[1]{}% + \renewcommand{\glossentry}[2]{% + \glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}} & + \glossentrydesc{##1}\glspostdescription & ##2\tabularnewline + }% + \renewcommand{\subglossentry}[3]{% + & + \glssubentryitem{##2}% + \glstarget{##2}{\strut}\glossentrydesc{##2}\glspostdescription & + ##3\tabularnewline + }% + \ifglsnogroupskip + \renewcommand*{\glsgroupskip}{}% + \else + \renewcommand*{\glsgroupskip}{& &\tabularnewline}% + \fi + } +} +{} +\ifcsdef{@glsstyle@long4col} +{% + \renewglossarystyle{long4col}{% + \renewenvironment{theglossary}% + {\begin{longtable}{llll}}% + {\end{longtable}}% + \renewcommand*{\glossaryheader}{}% + \renewcommand*{\glsgroupheading}[1]{}% + \renewcommand{\glossentry}[2]{% + \glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}} & + \glossentrydesc{##1}\glspostdescription & + \glossentrysymbol{##1} & + ##2\tabularnewline + }% + \renewcommand{\subglossentry}[3]{% + & + \glssubentryitem{##2}% + \glstarget{##2}{\strut}\glossentrydesc{##2}\glspostdescription & + \glossentrysymbol{##2} & ##3\tabularnewline + }% + \ifglsnogroupskip + \renewcommand*{\glsgroupskip}{}% + \else + \renewcommand*{\glsgroupskip}{& & &\tabularnewline}% + \fi + } +} +{} +\ifcsdef{@glsstyle@longragged} +{% + \renewglossarystyle{longragged}{% + \renewenvironment{theglossary}% + {\begin{longtable}{l>{\raggedright}p{\glsdescwidth}}}% + {\end{longtable}}% + \renewcommand*{\glossaryheader}{}% + \renewcommand*{\glsgroupheading}[1]{}% + \renewcommand{\glossentry}[2]{% + \glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}} & + \glossentrydesc{##1}\glspostdescription\glsxtrprelocation ##2% + \tabularnewline + }% + \renewcommand{\subglossentry}[3]{% + & + \glssubentryitem{##2}% + \glstarget{##2}{\strut}\glossentrydesc{##2}% + \glspostdescription\glsxtrprelocation ##3% + \tabularnewline + }% + \ifglsnogroupskip + \renewcommand*{\glsgroupskip}{}% + \else + \renewcommand*{\glsgroupskip}{ & \tabularnewline}% + \fi + } +} +{} +\ifcsdef{@glsstyle@longragged3col} +{% + \renewglossarystyle{longragged3col}{% + \renewenvironment{theglossary}% + {\begin{longtable}{l>{\raggedright}p{\glsdescwidth}% + >{\raggedright}p{\glspagelistwidth}}}% + {\end{longtable}}% + \renewcommand*{\glossaryheader}{}% + \renewcommand*{\glsgroupheading}[1]{}% + \renewcommand{\glossentry}[2]{% + \glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}} & + \glossentrydesc{##1}\glspostdescription & ##2\tabularnewline + }% + \renewcommand{\subglossentry}[3]{% + & + \glssubentryitem{##2}% + \glstarget{##2}{\strut}\glossentrydesc{##2}\glspostdescription & + ##3\tabularnewline + }% + \ifglsnogroupskip + \renewcommand*{\glsgroupskip}{}% + \else + \renewcommand*{\glsgroupskip}{& &\tabularnewline}% + \fi + } +} +{} +\ifcsdef{@glsstyle@altlongragged4col} +{% + \renewglossarystyle{altlongragged4col}{% + \renewenvironment{theglossary}% + {\begin{longtable}{l>{\raggedright}p{\glsdescwidth}l% + >{\raggedright}p{\glspagelistwidth}}}% + {\end{longtable}}% + \renewcommand*{\glossaryheader}{}% + \renewcommand*{\glsgroupheading}[1]{}% + \renewcommand{\glossentry}[2]{% + \glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}} & + \glossentrydesc{##1}\glspostdescription & \glossentrysymbol{##1} & + ##2\tabularnewline + }% + \renewcommand{\subglossentry}[3]{% + & + \glssubentryitem{##2}% + \glstarget{##2}{\strut}\glossentrydesc{##2}\glspostdescription & + \glossentrysymbol{##2} & ##3\tabularnewline + }% + \ifglsnogroupskip + \renewcommand*{\glsgroupskip}{}% + \else + \renewcommand*{\glsgroupskip}{& & &\tabularnewline}% + \fi + } +} +{} +\ifcsdef{@glsstyle@super} +{% + \renewglossarystyle{super}{% + \renewenvironment{theglossary}% + {\tablehead{}\tabletail{}% + \begin{supertabular}{lp{\glsdescwidth}}}% + {\end{supertabular}}% + \renewcommand*{\glossaryheader}{}% + \renewcommand*{\glsgroupheading}[1]{}% + \renewcommand{\glossentry}[2]{% + \glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}} & + \glossentrydesc{##1}\glspostdescription + \glsxtrprelocation ##2\tabularnewline + }% + \renewcommand{\subglossentry}[3]{% + & + \glssubentryitem{##2}% + \glstarget{##2}{\strut}\glossentrydesc{##2}\glspostdescription + \glsxtrprelocation ##3\tabularnewline + }% + \ifglsnogroupskip + \renewcommand*{\glsgroupskip}{}% + \else + \renewcommand*{\glsgroupskip}{& \tabularnewline}% + \fi + } +} +{} +\ifcsdef{@glsstyle@super3col} +{% + \renewglossarystyle{super3col}{% + \renewenvironment{theglossary}% + {\tablehead{}\tabletail{}% + \begin{supertabular}{lp{\glsdescwidth}p{\glspagelistwidth}}}% + {\end{supertabular}}% + \renewcommand*{\glossaryheader}{}% + \renewcommand*{\glsgroupheading}[1]{}% + \renewcommand{\glossentry}[2]{% + \glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}} & + \glossentrydesc{##1}\glspostdescription & ##2\tabularnewline + }% + \renewcommand{\subglossentry}[3]{% + & + \glssubentryitem{##2}% + \glstarget{##2}{\strut}\glossentrydesc{##2}\glspostdescription & + ##3\tabularnewline + }% + \ifglsnogroupskip + \renewcommand*{\glsgroupskip}{}% + \else + \renewcommand*{\glsgroupskip}{ & &\tabularnewline}% + \fi + } +} +{} +\ifcsdef{@glsstyle@super4col} +{% + \renewglossarystyle{super4col}{% + \renewenvironment{theglossary}% + {\tablehead{}\tabletail{}% + \begin{supertabular}{llll}}{% + \end{supertabular}}% + \renewcommand*{\glossaryheader}{}% + \renewcommand*{\glsgroupheading}[1]{}% + \renewcommand{\glossentry}[2]{% + \glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}} & + \glossentrydesc{##1}\glspostdescription & + \glossentrysymbol{##1} & ##2\tabularnewline + }% + \renewcommand{\subglossentry}[3]{% + & + \glssubentryitem{##2}% + \glstarget{##2}{\strut}\glossentrydesc{##2}\glspostdescription & + \glossentrysymbol{##2} & ##3\tabularnewline + }% + \ifglsnogroupskip + \renewcommand*{\glsgroupskip}{}% + \else + \renewcommand*{\glsgroupskip}{& & &\tabularnewline}% + \fi + } +} +{} +\ifcsdef{@glsstyle@superragged} +{% + \renewglossarystyle{superragged}{% + \renewenvironment{theglossary}% + {\tablehead{}\tabletail{}% + \begin{supertabular}{l>{\raggedright}p{\glsdescwidth}}}% + {\end{supertabular}}% + \renewcommand*{\glossaryheader}{}% + \renewcommand*{\glsgroupheading}[1]{}% + \renewcommand{\glossentry}[2]{% + \glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}} & + \glossentrydesc{##1}\glspostdescription\glsxtrprelocation ##2% + \tabularnewline + }% + \renewcommand{\subglossentry}[3]{% + & + \glssubentryitem{##2}% + \glstarget{##2}{\strut}\glossentrydesc{##2}\glspostdescription + \glsxtrprelocation ##3% + \tabularnewline + }% + \ifglsnogroupskip + \renewcommand*{\glsgroupskip}{}% + \else + \renewcommand*{\glsgroupskip}{& \tabularnewline}% + \fi + } +} +{} +\ifcsdef{@glsstyle@superragged3col} +{% + \renewglossarystyle{superragged3col}{% + \renewenvironment{theglossary}% + {\tablehead{}\tabletail{}% + \begin{supertabular}{l>{\raggedright}p{\glsdescwidth}% + >{\raggedright}p{\glspagelistwidth}}}% + {\end{supertabular}}% + \renewcommand*{\glossaryheader}{}% + \renewcommand*{\glsgroupheading}[1]{}% + \renewcommand{\glossentry}[2]{% + \glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}} & + \glossentrydesc{##1}\glspostdescription & + ##2\tabularnewline + }% + \renewcommand{\subglossentry}[3]{% + & + \glssubentryitem{##2}% + \glstarget{##2}{\strut}\glossentrydesc{##2}\glspostdescription & + ##3\tabularnewline + }% + \ifglsnogroupskip + \renewcommand*{\glsgroupskip}{}% + \else + \renewcommand*{\glsgroupskip}{ & &\tabularnewline}% + \fi + } +} +{} +\ifcsdef{@glsstyle@altsuperragged4col} +{% + \renewglossarystyle{altsuperragged4col}{% + \renewenvironment{theglossary}% + {\tablehead{}\tabletail{}% + \begin{supertabular}{l>{\raggedright}p{\glsdescwidth}l% + >{\raggedright}p{\glspagelistwidth}}}% + {\end{supertabular}}% + \renewcommand*{\glossaryheader}{}% + \renewcommand{\glossentry}[2]{% + \glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}} & + \glossentrydesc{##1}\glspostdescription & + \glossentrysymbol{##1} & ##2\tabularnewline + }% + \renewcommand{\subglossentry}[3]{% + & + \glssubentryitem{##2}% + \glstarget{##2}{\strut}\glossentrydesc{##2}\glspostdescription & + \glossentrysymbol{##2} & ##3\tabularnewline + }% + \ifglsnogroupskip + \renewcommand*{\glsgroupskip}{}% + \else + \renewcommand*{\glsgroupskip}{& & &\tabularnewline}% + \fi + } +} +{} +\ifdef{\@glsstyle@inline} +{% + \renewcommand*{\glspostinline}{.\spacefactor\sfcode`\.} + \renewcommand*{\glsinlinedescformat}[3]{% + \space#1\glsxtrpostdescription} + \renewcommand*{\glsinlinesubdescformat}[3]{% + #1\glsxtrpostdescription} +} +{} +\ifdef\glstreenamefmt +{ + \newcommand{\glstreedefaultnamefmt}[1]{\textbf{#1}} + \renewcommand{\glstreenamefmt}[1]{\glstreedefaultnamefmt{#1}} + \def\glstreegroupheaderfmt#1{\glstreedefaultnamefmt{#1}} + \def\glstreenavigationfmt#1{\glstreedefaultnamefmt{#1}} + \newcommand{\glstreePreHeader}[2]{} +} +{} +\ifdef{\@glsstyle@index} +{ + \newcommand*{\glstreeprelocation}{\glsxtrprelocation} + \newcommand*{\glstreechildprelocation}{\glstreeprelocation} + \newcommand{\glstreegroupskip}{\indexspace} + \newcommand{\glstreegroupheaderskip}{\nopagebreak\glstreegroupskip\nobreak} + \renewglossarystyle{index}{% + \renewenvironment{theglossary}% + {\setlength{\parindent}{0pt}% + \setlength{\parskip}{0pt plus 0.3pt}% + \let\item\glstreeitem + \let\subitem\glstreesubitem + \let\subsubitem\glstreesubsubitem + }% + {\par}% + \renewcommand*{\glossaryheader}{}% + \renewcommand*{\glsgroupheading}[1]{}% + \renewcommand*{\glossentry}[2]{% + \item\glsentryitem{##1}% + \glstreenamefmt{\glstarget{##1}{\glossentryname{##1}}}% + \glstreesymbol{##1}% + \glstreeDescLoc{##1}{##2}% + }% + \renewcommand{\subglossentry}[3]{% + \ifcase##1\relax + \item + \or + \subitem + \glssubentryitem{##2}% + \else + \subsubitem + \fi + \glstreenamefmt{\glstarget{##2}{\glossentryname{##2}}}% + \glstreechildsymbol{##2}% + \glstreeChildDescLoc{##2}{##3}% + }% + \renewcommand*{\glsgroupskip}{\ifglsnogroupskip\else\glstreegroupskip\fi}% + } +} +{} +\ifdef{\@glsstyle@indexgroup} +{% + \renewglossarystyle{indexgroup}{% + \setglossarystyle{index}% + \renewcommand*{\glsgroupheading}[1]{% + \glsxtrgetgrouptitle{##1}{\glsxtr@grptitle}% + \glstreePreHeader{##1}{\glsxtr@grptitle}% + \item\glstreegroupheaderfmt{\glsxtr@grptitle}% + \glstreegroupheaderskip\@afterheading + }% + } +} +{} +\ifdef{\@glsstyle@indexhypergroup} +{% + \renewglossarystyle{indexhypergroup}{% + \setglossarystyle{index}% + \renewcommand*{\glossaryheader}{% + \item\glstreenavigationfmt{\glsnavigation}% + \glstreegroupheaderskip\@afterheading}% + \renewcommand*{\glsgroupheading}[1]{% + \glsxtrgetgrouptitle{##1}{\glsxtr@grptitle}% + \glstreePreHeader{##1}{\glsxtr@grptitle}% + \item\glstreegroupheaderfmt + {\glsnavhypertarget{##1}{\glsxtr@grptitle}}% + \glstreegroupheaderskip\@afterheading}% + }% +} +{} +\ifdef{\@glsstyle@tree} +{% +\newcommand{\glsxtrtreepredesc}{\glstreepredesc} +\newcommand{\glsxtrtreechildpredesc}{\glstreechildpredesc} + \newcommand{\glstreedesc}[1]{% + \glsxtrtreepredesc\glossentrydesc{#1}\glspostdescription + } + \newcommand{\glstreeDescLoc}[2]{% + \ifglshasdesc{#1}% + {\glstreedesc{#1}\glstreeprelocation}% + {\ifglshassymbol{#1}{\glstreeprelocation}{\glstreeNoDescSymbolPreLocation}}% + #2% + } + \newcommand{\glstreeNoDescSymbolPreLocation}{\space} + \newcommand{\glstreesymbol}[1]{% + \ifglshassymbol{#1}{\space(\glossentrysymbol{#1})}{}% + }% + \newcommand{\glstreechilddesc}[1]{% + \glsxtrtreechildpredesc\glossentrydesc{#1}\glspostdescription + }% + \newcommand{\glstreeChildDescLoc}[2]{% + \ifglshasdesc{#1}% + {\glstreechilddesc{#1}\glstreechildprelocation}% + {\ifglshassymbol{#1}{\glstreechildprelocation}% + {\glstreeNoDescSymbolPreLocation}% + }% + #2% + }% + \newcommand{\glstreechildsymbol}[1]{% + \glstreesymbol{#1}% + }% + \renewglossarystyle{tree}{% + \renewenvironment{theglossary}% + {\setlength{\parindent}{0pt}% + \setlength{\parskip}{0pt plus 0.3pt}}% + {}% + \renewcommand*{\glossaryheader}{}% + \renewcommand*{\glsgroupheading}[1]{}% + \renewcommand{\glossentry}[2]{% + \hangindent0pt\relax + \parindent0pt\relax + \glsentryitem{##1}\glstreenamefmt{\glstarget{##1}{\glossentryname{##1}}}% + \glstreesymbol{##1}% + \glstreeDescLoc{##1}{##2}\par + }% + \renewcommand{\subglossentry}[3]{% + \hangindent##1\glstreeindent\relax + \parindent##1\glstreeindent\relax + \ifnum##1=1\relax + \glssubentryitem{##2}% + \fi + \glstreenamefmt{\glstarget{##2}{\glossentryname{##2}}}% + \glstreechildsymbol{##2}% + \glstreeChildDescLoc{##2}{##3}\par + }% + \renewcommand*{\glsgroupskip}{\ifglsnogroupskip\else\glstreegroupskip\fi}% + }% +} +{} +\ifdef{\@glsstyle@treegroup} +{% + \renewglossarystyle{treegroup}{% + \setglossarystyle{tree}% + \renewcommand{\glsgroupheading}[1]{% + \glsxtrgetgrouptitle{##1}{\glsxtr@grptitle}% + \glstreePreHeader{##1}{\glsxtr@grptitle}% + \par\noindent\glstreegroupheaderfmt{\glsxtr@grptitle}% + \glstreegroupheaderskip\@afterheading}% + } +} +{} +\ifdef{\@glsstyle@treehypergroup} +{% + \renewglossarystyle{treehypergroup}{% + \setglossarystyle{tree}% + \renewcommand*{\glossaryheader}{% + \par\noindent\glstreenavigationfmt{\glsnavigation}% + \glstreegroupheaderskip\@afterheading}% + \renewcommand*{\glsgroupheading}[1]{% + \glsxtrgetgrouptitle{##1}{\glsxtr@grptitle}% + \glstreePreHeader{##1}{\glsxtr@grptitle}% + \par\noindent + \glstreegroupheaderfmt + {\glsnavhypertarget{##1}{\glsxtr@grptitle}}% + \glstreegroupheaderskip\@afterheading}% + } +} +{} +\ifdef{\@glsstyle@treenoname} +{% + \newcommand{\glstreenonamedesc}[1]{% + \glstreepredesc\glossentrydesc{#1}\glspostdescription + }% + \newcommand{\glstreenonamesymbol}[1]{% + \ifglshassymbol{#1}{\space(\glossentrysymbol{#1})}{}% + }% + \newcommand{\glstreenonameDescLoc}[2]{% + \glstreenonamedesc{#1}\glstreeprelocation#2% + } + \newcommand{\glstreenonamechilddesc}[1]{% + \glossentrydesc{#1}\glspostdescription + }% + \newcommand{\glstreenonameChildDescLoc}[2]{% + \glstreenonamechilddesc{#1}\glstreechildprelocation#2% + } + \renewglossarystyle{treenoname}{% + \renewenvironment{theglossary}% + {\setlength{\parindent}{0pt}% + \setlength{\parskip}{0pt plus 0.3pt}}% + {}% + \renewcommand*{\glossaryheader}{}% + \renewcommand*{\glsgroupheading}[1]{}% + \renewcommand{\glossentry}[2]{% + \hangindent0pt\relax + \parindent0pt\relax + \glsentryitem{##1}\glstreenamefmt{\glstarget{##1}{\glossentryname{##1}}}% + \glstreenonamesymbol{##1}% + \glstreenonameDescLoc{##1}{##2}\par + }% + \renewcommand{\subglossentry}[3]{% + \hangindent##1\glstreeindent\relax + \parindent##1\glstreeindent\relax + \ifnum##1=1\relax + \glssubentryitem{##2}% + \fi + \glstarget{##2}{\strut}% + \glstreenonameChildDescLoc{##2}{##3}\par + }% + \renewcommand*{\glsgroupskip}{\ifglsnogroupskip\else\glstreegroupskip\fi}% + } +} +{} +\ifdef{\@glsstyle@treenonamegroup} +{% + \renewglossarystyle{treenonamegroup}{% + \setglossarystyle{treenoname}% + \renewcommand{\glsgroupheading}[1]{% + \glsxtrgetgrouptitle{##1}{\glsxtr@grptitle}% + \glstreePreHeader{##1}{\glsxtr@grptitle}% + \par\noindent\glstreegroupheaderfmt{\glsxtr@grptitle}% + \glstreegroupheaderskip\@afterheading + }% + } +} +{} +\ifdef{\@glsstyle@treenonamehypergroup} +{% + \renewglossarystyle{treenonamehypergroup}{% + \setglossarystyle{treenoname}% + \renewcommand*{\glossaryheader}{% + \par\noindent\glstreenavigationfmt{\glsnavigation}% + \glstreegroupheaderskip\@afterheading}% + \renewcommand*{\glsgroupheading}[1]{% + \glsxtrgetgrouptitle{##1}{\glsxtr@grptitle}% + \glstreePreHeader{##1}{\glsxtr@grptitle}% + \par\noindent + \glstreegroupheaderfmt{\glsnavhypertarget{##1}{\glsxtr@grptitle}}% + \glstreegroupheaderskip\@afterheading}% + } +} +{} +\ifdef{\@glsstyle@alttree} +{% +\newcommand{\glsalttreepredesc}{} +\newcommand{\glsalttreechildpredesc}{\glsalttreepredesc} + \newcommand{\glsxtralttreeSymbolDescLocation}[2]{% + {% + \let\par\glsxtrAltTreePar + \let\glsxtrtreepredesc\glsalttreepredesc + \let\glsxtrtreechildpredesc\glsalttreechildpredesc + \ifglshassymbol{#1}{(\glossentrysymbol{#1})\space}{}% + \glstreeDescLoc{#1}{#2}\par + }% + } + \newlength\glsxtrAltTreeIndent + \newcommand{\glsxtrAltTreePar}{% + \@@par + \glsxtrAltTreeSetHangIndent + \setlength{\parindent}{\dimexpr\hangindent+\glsxtrAltTreeIndent}% + } + \newcommand{\glsxtralttreeSubSymbolDescLocation}[3]{% + \glsxtralttreeSymbolDescLocation{#2}{#3}% + } + \newlength\glsxtrtreetopindent + \newcommand*{\glsxtralttreeInit}{% + \settowidth{\glsxtrtreetopindent}{\glstreenamefmt{\glsgetwidestname\space}}% + \glsxtrAltTreeIndent=\parindent + } + \newcommand*{\gglssetwidest}[2][0]{% + \csgdef{@glswidestname\romannumeral#1}{#2}% + } + \newcommand*{\eglssetwidest}[2][0]{% + \protected@csedef{@glswidestname\romannumeral#1}{#2}% + } + \newcommand*{\xglssetwidest}[2][0]{% + \protected@csxdef{@glswidestname\romannumeral#1}{#2}% + } + \newcommand*{\glsupdatewidest}[2][0]{% + \ifcsundef{@glswidestname\romannumeral#1}% + {\csdef{@glswidestname\romannumeral#1}{#2}}% + {% + \settowidth{\dimen@}{\csuse{@glswidestname\romannumeral#1}}% + \settowidth{\dimen@ii}{#2}% + \ifdim\dimen@ii>\dimen@ + \csdef{@glswidestname\romannumeral#1}{#2}% + \fi + }% + } + \newcommand*{\gglsupdatewidest}[2][0]{% + \ifcsundef{@glswidestname\romannumeral#1}% + {\csgdef{@glswidestname\romannumeral#1}{#2}}% + {% + \settowidth{\dimen@}{\csuse{@glswidestname\romannumeral#1}}% + \settowidth{\dimen@ii}{#2}% + \ifdim\dimen@ii>\dimen@ + \csgdef{@glswidestname\romannumeral#1}{#2}% + \fi + }% + } + \newcommand*{\eglsupdatewidest}[2][0]{% + \ifcsundef{@glswidestname\romannumeral#1}% + {\protected@csedef{@glswidestname\romannumeral#1}{#2}}% + {% + \settowidth{\dimen@}{\csuse{@glswidestname\romannumeral#1}}% + \settowidth{\dimen@ii}{#2}% + \ifdim\dimen@ii>\dimen@ + \protected@csedef{@glswidestname\romannumeral#1}{#2}% + \fi + }% + } + \newcommand*{\xglsupdatewidest}[2][0]{% + \ifcsundef{@glswidestname\romannumeral#1}% + {\protected@csxdef{@glswidestname\romannumeral#1}{#2}}% + {% + \settowidth{\dimen@}{\csuse{@glswidestname\romannumeral#1}}% + \settowidth{\dimen@ii}{#2}% + \ifdim\dimen@ii>\dimen@ + \protected@csxdef{@glswidestname\romannumeral#1}{#2}% + \fi + }% + } + \newcommand*{\glsgetwidestname}{\@glswidestname} + \newcommand*{\glsgetwidestsubname}[1]{% + \ifcsundef{@glswidestname\romannumeral#1}% + {\@glswidestname}% + {\csuse{@glswidestname\romannumeral#1}}% + } + \let\glsFindWidestTopLevelName\glsfindwidesttoplevelname + \newrobustcmd*{\glsFindWidestUsedTopLevelName}[1][\@glo@types]{% + \dimen@=0pt\relax + \gls@tmplen=0pt\relax + \forallglossaries[#1]{\@gls@type}% + {% + \forglsentries[\@gls@type]{\@glo@label}% + {% + \ifglsused{\@glo@label}% + {% + \ifglshasparent{\@glo@label}% + {}% + {% + \settowidth{\dimen@}% + {\glstreenamefmt{\glsentryname{\@glo@label}}}% + \ifdim\dimen@>\gls@tmplen + \gls@tmplen=\dimen@ + \eglssetwidest{\glsentryname{\@glo@label}}% + \fi + }% + }% + {}% + }% + }% + } + \newrobustcmd*{\glsFindWidestUsedAnyName}[1][\@glo@types]{% + \dimen@=0pt\relax + \gls@tmplen=0pt\relax + \forallglossaries[#1]{\@gls@type}% + {% + \forglsentries[\@gls@type]{\@glo@label}% + {% + \ifglsused{\@glo@label}% + {% + \settowidth{\dimen@}% + {\glstreenamefmt{\glsentryname{\@glo@label}}}% + \ifdim\dimen@>\gls@tmplen + \gls@tmplen=\dimen@ + \eglssetwidest{\glsentryname{\@glo@label}}% + \fi + }% + {}% + }% + }% + } + \newrobustcmd*{\glsFindWidestAnyName}[1][\@glo@types]{% + \dimen@=0pt\relax + \gls@tmplen=0pt\relax + \forallglossaries[#1]{\@gls@type}% + {% + \forglsentries[\@gls@type]{\@glo@label}% + {% + \settowidth{\dimen@}% + {\glstreenamefmt{\glsentryname{\@glo@label}}}% + \ifdim\dimen@>\gls@tmplen + \gls@tmplen=\dimen@ + \eglssetwidest{\glsentryname{\@glo@label}}% + \fi + }% + }% + } + \newrobustcmd*{\glsFindWidestUsedLevelTwo}[1][\@glo@types]{% + \dimen@=0pt\relax + \dimen@i=0pt\relax + \dimen@ii=0pt\relax + \forallglossaries[#1]{\@gls@type}% + {% + \forglsentries[\@gls@type]{\@glo@label}% + {% + \ifglsused{\@glo@label}% + {% + \ifglshasparent{\@glo@label}% + {% + \protected@edef\@glo@parent{\csuse{glo@\glsdetoklabel{\@glo@label}@parent}}% + \ifglshasparent{\@glo@parent}% + {% + \protected@edef\@glo@parent{\csuse{glo@\glsdetoklabel{\@glo@parent}@parent}}% + \ifglshasparent{\@glo@parent}% + {}% + {% + \settowidth{\gls@tmplen}% + {\glstreenamefmt{\glsentryname{\@glo@label}}}% + \ifdim\gls@tmplen>\dimen@ii + \dimen@ii=\gls@tmplen + \eglssetwidest[2]{\glsentryname{\@glo@label}}% + \fi + }% + }% + {% + \settowidth{\gls@tmplen}% + {\glstreenamefmt{\glsentryname{\@glo@label}}}% + \ifdim\gls@tmplen>\dimen@i + \dimen@i=\gls@tmplen + \eglssetwidest[1]{\glsentryname{\@glo@label}}% + \fi + }% + }% + {% + \settowidth{\gls@tmplen}% + {\glstreenamefmt{\glsentryname{\@glo@label}}}% + \ifdim\gls@tmplen>\dimen@ + \dimen@=\gls@tmplen + \eglssetwidest{\glsentryname{\@glo@label}}% + \fi + }% + }% + {}% + }% + }% + } + \newrobustcmd*{\glsFindWidestLevelTwo}[1][\@glo@types]{% + \dimen@=0pt\relax + \dimen@i=0pt\relax + \dimen@ii=0pt\relax + \forallglossaries[#1]{\@gls@type}% + {% + \forglsentries[\@gls@type]{\@glo@label}% + {% + \ifglshasparent{\@glo@label}% + {% + \protected@edef\@glo@parent{\csuse{glo@\glsdetoklabel{\@glo@label}@parent}}% + \ifglshasparent{\@glo@parent}% + {% + \protected@edef\@glo@parent{\csuse{glo@\glsdetoklabel{\@glo@parent}@parent}}% + \ifglshasparent{\@glo@parent}% + {}% + {% + \settowidth{\gls@tmplen}% + {\glstreenamefmt{\glsentryname{\@glo@label}}}% + \ifdim\gls@tmplen>\dimen@ii + \dimen@ii=\gls@tmplen + \eglssetwidest[2]{\glsentryname{\@glo@label}}% + \fi + }% + }% + {% + \settowidth{\gls@tmplen}% + {\glstreenamefmt{\glsentryname{\@glo@label}}}% + \ifdim\gls@tmplen>\dimen@i + \dimen@i=\gls@tmplen + \eglssetwidest[1]{\glsentryname{\@glo@label}}% + \fi + }% + }% + {% + \settowidth{\gls@tmplen}% + {\glstreenamefmt{\glsentryname{\@glo@label}}}% + \ifdim\gls@tmplen>\dimen@ + \dimen@=\gls@tmplen + \eglssetwidest{\glsentryname{\@glo@label}}% + \fi + }% + }% + }% + } + \newrobustcmd*{\glsFindWidestUsedAnyNameSymbol}[2][\@glo@types]{% + \dimen@=0pt\relax + \gls@tmplen=0pt\relax + #2=0pt\relax + \forallglossaries[#1]{\@gls@type}% + {% + \forglsentries[\@gls@type]{\@glo@label}% + {% + \ifglsused{\@glo@label}% + {% + \settowidth{\dimen@}% + {\glstreenamefmt{\glsentryname{\@glo@label}}}% + \ifdim\dimen@>\gls@tmplen + \gls@tmplen=\dimen@ + \eglssetwidest{\glsentryname{\@glo@label}}% + \fi + \settowidth{\dimen@}% + {\glsentrysymbol{\@glo@label}}% + \ifdim\dimen@>#2\relax + #2=\dimen@ + \fi + }% + {}% + }% + }% + } + \newrobustcmd*{\glsFindWidestAnyNameSymbol}[2][\@glo@types]{% + \dimen@=0pt\relax + \gls@tmplen=0pt\relax + #2=0pt\relax + \forallglossaries[#1]{\@gls@type}% + {% + \forglsentries[\@gls@type]{\@glo@label}% + {% + \settowidth{\dimen@}% + {\glstreenamefmt{\glsentryname{\@glo@label}}}% + \ifdim\dimen@>\gls@tmplen + \gls@tmplen=\dimen@ + \eglssetwidest{\glsentryname{\@glo@label}}% + \fi + \settowidth{\dimen@}% + {\glsentrysymbol{\@glo@label}}% + \ifdim\dimen@>#2\relax + #2=\dimen@ + \fi + }% + }% + } + \newrobustcmd*{\glsFindWidestUsedAnyNameSymbolLocation}[3][\@glo@types]{% + \dimen@=0pt\relax + \gls@tmplen=0pt\relax + #2=0pt\relax + #3=0pt\relax + \forallglossaries[#1]{\@gls@type}% + {% + \forglsentries[\@gls@type]{\@glo@label}% + {% + \ifglsused{\@glo@label}% + {% + \settowidth{\dimen@}% + {\glstreenamefmt{\glsentryname{\@glo@label}}}% + \ifdim\dimen@>\gls@tmplen + \gls@tmplen=\dimen@ + \eglssetwidest{\glsentryname{\@glo@label}}% + \fi + \settowidth{\dimen@}% + {\glsentrysymbol{\@glo@label}}% + \ifdim\dimen@>#2\relax + #2=\dimen@ + \fi + \settowidth{\dimen@}% + {\GlsXtrFormatLocationList{\glsentrynumberlist{\@glo@label}}}% + \ifdim\dimen@>#3\relax + #3=\dimen@ + \fi + }% + {}% + }% + }% + } + \newrobustcmd*{\glsFindWidestAnyNameSymbolLocation}[3][\@glo@types]{% + \dimen@=0pt\relax + \gls@tmplen=0pt\relax + #2=0pt\relax + #3=0pt\relax + \forallglossaries[#1]{\@gls@type}% + {% + \forglsentries[\@gls@type]{\@glo@label}% + {% + \settowidth{\dimen@}% + {\glstreenamefmt{\glsentryname{\@glo@label}}}% + \ifdim\dimen@>\gls@tmplen + \gls@tmplen=\dimen@ + \eglssetwidest{\glsentryname{\@glo@label}}% + \fi + \settowidth{\dimen@}% + {\glsentrysymbol{\@glo@label}}% + \ifdim\dimen@>#2\relax + #2=\dimen@ + \fi + \settowidth{\dimen@}% + {\GlsXtrFormatLocationList{\glsentrynumberlist{\@glo@label}}}% + \ifdim\dimen@>#3\relax + #3=\dimen@ + \fi + }% + }% + } + \newrobustcmd*{\glsFindWidestUsedAnyNameLocation}[2][\@glo@types]{% + \dimen@=0pt\relax + \gls@tmplen=0pt\relax + #2=0pt\relax + \forallglossaries[#1]{\@gls@type}% + {% + \forglsentries[\@gls@type]{\@glo@label}% + {% + \ifglsused{\@glo@label}% + {% + \settowidth{\dimen@}% + {\glstreenamefmt{\glsentryname{\@glo@label}}}% + \ifdim\dimen@>\gls@tmplen + \gls@tmplen=\dimen@ + \eglssetwidest{\glsentryname{\@glo@label}}% + \fi + \settowidth{\dimen@}% + {\GlsXtrFormatLocationList{\glsentrynumberlist{\@glo@label}}}% + \ifdim\dimen@>#2\relax + #2=\dimen@ + \fi + }% + {}% + }% + }% + } + \newrobustcmd*{\glsFindWidestAnyNameLocation}[2][\@glo@types]{% + \dimen@=0pt\relax + \gls@tmplen=0pt\relax + #2=0pt\relax + \forallglossaries[#1]{\@gls@type}% + {% + \forglsentries[\@gls@type]{\@glo@label}% + {% + \settowidth{\dimen@}% + {\glstreenamefmt{\glsentryname{\@glo@label}}}% + \ifdim\dimen@>\gls@tmplen + \gls@tmplen=\dimen@ + \eglssetwidest{\glsentryname{\@glo@label}}% + \fi + \settowidth{\dimen@}% + {\GlsXtrFormatLocationList{\glsentrynumberlist{\@glo@label}}}% + \ifdim\dimen@>#2\relax + #2=\dimen@ + \fi + }% + }% + } + \newcommand*{\glsxtrComputeTreeIndent}[1]{% + \glstreeindent=\glsxtrtreetopindent\relax + } + \newcommand*{\glsxtrComputeTreeSubIndent}[3]{% + \ifcsundef{@glswidestname\romannumeral#1}% + {% + \settowidth{#3}{\glstreenamefmt{\@glswidestname\space}}% + }% + {% + \settowidth{#3}{\glstreenamefmt{% + \csname @glswidestname\romannumeral#1\endcsname\space}}% + }% + } + \newcommand*{\glsxtrAltTreeSetHangIndent}{\hangindent\glstreeindent} + \newcommand*{\glsxtrAltTreeSetSubHangIndent}[1]{\hangindent\glstreeindent} + \renewglossarystyle{alttree}{% + \renewenvironment{theglossary}% + {% + \glsxtralttreeInit + \def\@gls@prevlevel{-1}% + \mbox{}\par}% + {\par}% + \renewcommand*{\glossaryheader}{}% + \renewcommand*{\glsgroupheading}[1]{}% + \renewcommand{\glossentry}[2]{% + \ifnum\@gls@prevlevel=0\relax + \else + \glsxtrComputeTreeIndent{##1}% + \fi + \parindent\glstreeindent + \glsxtrAltTreeSetHangIndent + \makebox[0pt][r]% + {% + \glstreenamebox{\glstreeindent}% + {% + \glsentryitem{##1}% + \glstreenamefmt{\glstarget{##1}{\glossentryname{##1}}}% + }% + }% + \glsxtralttreeSymbolDescLocation{##1}{##2}% + \def\@gls@prevlevel{0}% + } + \renewcommand{\subglossentry}[3]{% + \ifnum##1=1\relax + \glssubentryitem{##2}% + \fi + \ifnum\@gls@prevlevel=##1\relax + \else + \glsxtrComputeTreeSubIndent{##1}{##2}{\gls@tmplen}% + \ifnum\@gls@prevlevel<##1\relax + \setlength\glstreeindent\gls@tmplen + \addtolength\glstreeindent\parindent + \parindent\glstreeindent + \else + \ifnum\@gls@prevlevel=0\relax + \glsxtrComputeTreeIndent{##2}% + \else + \glsxtrComputeTreeSubIndent{\@gls@prevlevel}{##2}{\glstreeindent}% + \fi + \addtolength\parindent{-\glstreeindent}% + \setlength\glstreeindent\parindent + \fi + \fi + \glsxtrAltTreeSetSubHangIndent{##1}% + \makebox[0pt][r]{\glstreenamebox{\gls@tmplen}{% + \glstreenamefmt{\glstarget{##2}{\glossentryname{##2}}}}}% + \glsxtralttreeSubSymbolDescLocation{##1}{##2}{##3}% + \def\@gls@prevlevel{##1}% + }% + \renewcommand*{\glsgroupskip}{\ifglsnogroupskip\else\glstreegroupskip\fi}% + } +}% +{% +} +\ifdef{\@glsstyle@alttreegroup} +{% + \renewglossarystyle{alttreegroup}{% + \setglossarystyle{alttree}% + \renewcommand{\glsgroupheading}[1]{\par + \def\@gls@prevlevel{-1}% + \hangindent0pt\relax + \parindent0pt\relax + \glsxtrgetgrouptitle{##1}{\glsxtr@grptitle}% + \glstreePreHeader{##1}{\glsxtr@grptitle}% + \glstreegroupheaderfmt{\glsxtr@grptitle}% + \glstreegroupheaderskip + }% + }% +}% +{% +} +\ifdef{\@glsstyle@alttreehypergroup} +{% + \renewglossarystyle{alttreehypergroup}{% + \setglossarystyle{alttree}% + \renewcommand*{\glossaryheader}{% + \par + \def\@gls@prevlevel{-1}% + \hangindent0pt\relax + \parindent0pt\relax + \glstreenavigationfmt{\glsnavigation}% + \glstreegroupheaderskip + }% + \renewcommand*{\glsgroupheading}[1]{% + \glsxtrgetgrouptitle{##1}{\glsxtr@grptitle}% + \glstreePreHeader{##1}{\glsxtr@grptitle}% + \par + \def\@gls@prevlevel{-1}% + \hangindent0pt\relax + \parindent0pt\relax + \glstreegroupheaderfmt{\glsnavhypertarget{##1}{\glsxtr@grptitle}}% + \glstreegroupheaderskip + }% + } +}% +{% +} +\ifdef{\@glsstyle@mcolindexgroup} +{% + \renewglossarystyle{mcolindexgroup}{% + \setglossarystyle{mcolindex}% + \renewcommand*{\glsgroupheading}[1]{% + \glsxtrgetgrouptitle{##1}{\glsxtr@grptitle}% + \glstreePreHeader{##1}{\glsxtr@grptitle}% + \item\glstreegroupheaderfmt{\glsxtr@grptitle}% + \glstreegroupheaderskip\@afterheading + }% + } +}% +{% +} +\ifdef{\@glsstyle@mcolindexhypergroup} +{% + \renewglossarystyle{mcolindexhypergroup}{% + \setglossarystyle{mcolindex}% + \renewcommand*{\glossaryheader}{% + \item\glstreenavigationfmt{\glsnavigation}% + \glstreegroupheaderskip\@afterheading + }% + \renewcommand*{\glsgroupheading}[1]{% + \glsxtrgetgrouptitle{##1}{\glsxtr@grptitle}% + \glstreePreHeader{##1}{\glsxtr@grptitle}% + \item\glstreegroupheaderfmt + {\glsnavhypertarget{##1}{\glsxtr@grptitle}}% + \glstreegroupheaderskip\@afterheading + }% + } +}% +{% +} +\ifdef{\@glsstyle@mcolindexspannav} +{% + \renewglossarystyle{mcolindexspannav}{% + \setglossarystyle{index}% + \renewenvironment{theglossary}% + {% + \begin{multicols}{\glsmcols}[\noindent\glstreenavigationfmt{\glsnavigation}]% + \setlength{\parindent}{0pt}% + \setlength{\parskip}{0pt plus 0.3pt}% + \let\item\glstreeitem}% + {\end{multicols}}% + \renewcommand*{\glsgroupheading}[1]{% + \glsxtrgetgrouptitle{##1}{\glsxtr@grptitle}% + \glstreePreHeader{##1}{\glsxtr@grptitle}% + \item\glstreegroupheaderfmt + {\glsnavhypertarget{##1}{\glsxtr@grptitle}}% + \glstreegroupheaderskip\@afterheading + }% + } +}% +{% +} +\ifdef{\@glsstyle@mcoltreegroup} +{% + \renewglossarystyle{mcoltreegroup}{% + \setglossarystyle{mcoltree}% + \renewcommand{\glsgroupheading}[1]{% + \glsxtrgetgrouptitle{##1}{\glsxtr@grptitle}% + \glstreePreHeader{##1}{\glsxtr@grptitle}% + \par\noindent\glstreegroupheaderfmt{\glsxtr@grptitle}% + \glstreegroupheaderskip\@afterheading + }% + } +}% +{% +} +\ifdef{\@glsstyle@mcoltreehypergroup} +{% + \renewglossarystyle{mcoltreehypergroup}{% + \setglossarystyle{mcoltree}% + \renewcommand*{\glossaryheader}{% + \par\noindent\glstreenavigationfmt{\glsnavigation}% + \glstreegroupheaderskip + }% + \renewcommand*{\glsgroupheading}[1]{% + \glsxtrgetgrouptitle{##1}{\glsxtr@grptitle}% + \glstreePreHeader{##1}{\glsxtr@grptitle}% + \par\noindent + \glstreegroupheaderfmt{\glsnavhypertarget{##1}{\glsxtr@grptitle}}% + \glstreegroupheaderskip\@afterheading + }% + } +}% +{% +} +\ifdef{\@glsstyle@mcoltreespannav} +{% + \renewglossarystyle{mcoltreespannav}{% + \setglossarystyle{tree}% + \renewenvironment{theglossary}% + {% + \begin{multicols}{\glsmcols}% + [\noindent\glstreenavigationfmt{\glsnavigation}]% + \setlength{\parindent}{0pt}% + \setlength{\parskip}{0pt plus 0.3pt}% + }% + {\end{multicols}}% + \renewcommand*{\glsgroupheading}[1]{% + \glsxtrgetgrouptitle{##1}{\glsxtr@grptitle}% + \glstreePreHeader{##1}{\glsxtr@grptitle}% + \par\noindent + \glstreegroupheaderfmt{\glsnavhypertarget{##1}{\glsxtr@grptitle}}% + \glstreegroupheaderskip\@afterheading + }% + } +}% +{% +} +\ifdef{\@glsstyle@mcoltreenonamegroup} +{% + \renewglossarystyle{mcoltreenonamegroup}{% + \setglossarystyle{mcoltreenoname}% + \renewcommand{\glsgroupheading}[1]{% + \glsxtrgetgrouptitle{##1}{\glsxtr@grptitle}% + \glstreePreHeader{##1}{\glsxtr@grptitle}% + \par\noindent\glstreegroupheaderfmt{\glsxtr@grptitle}% + \glstreegroupheaderskip\@afterheading + }% + } +}% +{% +} +\ifdef{\@glsstyle@mcoltreenonamehypergroup} +{% + \renewglossarystyle{mcoltreenonamehypergroup}{% + \setglossarystyle{mcoltreenoname}% + \renewcommand*{\glossaryheader}{% + \par\noindent\glstreenavigationfmt{\glsnavigation}% + \glstreegroupheaderskip + }% + \renewcommand*{\glsgroupheading}[1]{% + \glsxtrgetgrouptitle{##1}{\glsxtr@grptitle}% + \glstreePreHeader{##1}{\glsxtr@grptitle}% + \par\noindent + \glstreegroupheaderfmt{\glsnavhypertarget{##1}{\glsxtr@grptitle}}% + \glstreegroupheaderskip\@afterheading}% + } +}% +{% +} +\ifdef{\@glsstyle@mcoltreenonamespannav} +{% + \renewglossarystyle{mcoltreenonamespannav}{% + \setglossarystyle{treenoname}% + \renewenvironment{theglossary}% + {% + \begin{multicols}{\glsmcols}% + [\noindent\glstreenavigationfmt{\glsnavigation}]% + \setlength{\parindent}{0pt}% + \setlength{\parskip}{0pt plus 0.3pt}% + }% + {\end{multicols}}% + \renewcommand*{\glsgroupheading}[1]{% + \glsxtrgetgrouptitle{##1}{\glsxtr@grptitle}% + \glstreePreHeader{##1}{\glsxtr@grptitle}% + \par\noindent + \glstreegroupheaderfmt{\glsnavhypertarget{##1}{\glsxtr@grptitle}}% + \glstreegroupheaderskip\@afterheading}% + } +}% +{% +} +\ifdef{\@glsstyle@mcolalttree} +{% + \renewglossarystyle{mcolalttree}{% + \setglossarystyle{alttree}% + \renewenvironment{theglossary}% + {% + \glsxtralttreeInit + \def\@gls@prevlevel{-1}% + \begin{multicols}{\glsmcols}% + }% + {\par\end{multicols}}% + } +}% +{% +} +\ifdef{\@glsstyle@mcolalttreegroup} +{% + \renewglossarystyle{mcolalttreegroup}{% + \setglossarystyle{mcolalttree}% + \renewcommand{\glsgroupheading}[1]{% + \glsxtrgetgrouptitle{##1}{\glsxtr@grptitle}% + \glstreePreHeader{##1}{\glsxtr@grptitle}% + \par + \def\@gls@prevlevel{-1}% + \hangindent0pt\relax + \parindent0pt\relax + \glstreegroupheaderfmt{\glsxtr@grptitle}% + \glstreegroupheaderskip + }% + } +}% +{% +} +\ifdef{\@glsstyle@mcolalttreehypergroup} +{% + \renewglossarystyle{mcolalttreehypergroup}{% + \setglossarystyle{mcolalttree}% + \renewcommand*{\glossaryheader}{% + \par + \def\@gls@prevlevel{-1}% + \hangindent0pt\relax + \parindent0pt\relax + \glstreenavigationfmt{\glsnavigation}% + \glstreegroupheaderskip + }% + \renewcommand*{\glsgroupheading}[1]{% + \glsxtrgetgrouptitle{##1}{\glsxtr@grptitle}% + \glstreePreHeader{##1}{\glsxtr@grptitle}% + \par + \def\@gls@prevlevel{-1}% + \hangindent0pt\relax + \parindent0pt\relax + \glstreegroupheaderfmt{\glsnavhypertarget{##1}{\glsxtr@grptitle}}% + \glstreegroupheaderskip + }% + } +}% +{% +} +\ifdef{\@glsstyle@mcolalttreespannav} +{% + \renewglossarystyle{mcolalttreespannav}{% + \setglossarystyle{alttree}% + \renewenvironment{theglossary}% + {% + \glsxtralttreeInit + \def\@gls@prevlevel{-1}% + \begin{multicols}{\glsmcols}% + [\noindent\glstreenavigationfmt{\glsnavigation}]% + }% + {\par\end{multicols}}% + \renewcommand*{\glsgroupheading}[1]{% + \glsxtrgetgrouptitle{##1}{\glsxtr@grptitle}% + \glstreePreHeader{##1}{\glsxtr@grptitle}% + \par + \def\@gls@prevlevel{-1}% + \hangindent0pt\relax + \parindent0pt\relax + \glstreegroupheaderfmt{\glsnavhypertarget{##1}{\glsxtr@grptitle}}% + \glstreegroupheaderskip + }% + } +}% +{% } +\ifx\@glossary@default@style\relax +\else + \setglossarystyle{\@glsxtr@current@style} +\fi +% \end{macrocode} +%\iffalse +% \begin{macrocode} +% +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} +%<*glossary-bookindex-2021-11-22.sty> +% \end{macrocode} +%\fi +%\subsection{Rollback v1.48 (glossary-bookindex-2021-11-22.sty)} +% Version 1.48 preserved for rollback. +% \begin{macrocode} +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{glossary-bookindex}[2021/11/22 v1.48 (NLCT)] +\RequirePackage{multicol} +\RequirePackage{glossary-tree} +\newcommand{\glsxtrbookindexcols}{2} +\newcommand*{\glsxtrbookindexname}[1]{\glossentryname{#1}} +\newcommand*{\glsxtrbookindexsubname}[1]{\glsxtrbookindexname{#1}} +\providecommand*{\glsxtrprelocation}{\space} -@entry{lambda, - symbol = {\ensuremath{\lambda}}, - name = {lambda}, - description = {Nunc vitae tortor.} +\newcommand*{\glsxtrbookindexprelocation}[1]{% + \glsxtrifhasfield{location}{#1}% + {,\glsxtrprelocation}% + {\glsxtrprelocation}% } - -@entry{mu, - symbol = {\ensuremath{\mu}}, - name = {mu}, - description = {Proin tempus nibh sit amet nisl.} +\newcommand*{\glsxtrbookindexsubprelocation}[1]{% + \glsxtrbookindexprelocation{#1}% } - -@entry{nu, - symbol = {\ensuremath{\nu}}, - name = {nu}, - description = {Vivamus quis tortor vitae risus porta vehicula.} +\newcommand*{\glsxtrbookindexlocation}[2]{#2} +\newcommand*{\glsxtrbookindexsublocation}{\glsxtrbookindexlocation} +\newcommand{\glsxtrbookindexparentchildsep}{\nopagebreak} +\newcommand{\glsxtrbookindexparentsubchildsep}{\glsxtrbookindexparentchildsep} +\newcommand{\glsxtrbookindexbetween}[2]{} +\newcommand{\glsxtrbookindexsubbetween}[2]{} +\newcommand{\glsxtrbookindexsubsubbetween}[2]{} +\newcommand{\glsxtrbookindexatendgroup}[1]{} +\newcommand{\glsxtrbookindexsubatendgroup}[1]{} +\newcommand{\glsxtrbookindexsubsubatendgroup}[1]{} +\newcommand{\glsxtrbookindexgroupskip}{\ifglsnogroupskip\else\indexspace\fi} +\newcommand*{\glsxtrbookindexformatheader}[1]{% + \par{\centering\glstreegroupheaderfmt{#1}\par}% } - -@entry{xi, - symbol = {\ensuremath{\xi}}, - name = {xi}, - description = {Fusce mauris.} +\ifdef\pdfbookmark +{% + \newcommand*{\glsxtrbookindexbookmark}[2]{% + \ifdefstring{\@@glossarysec}{chapter}% + {\pdfbookmark[1]{#1}{#2}}% + {\pdfbookmark[2]{#1}{#2}}% + } } - -@entry{pi, - symbol = {\ensuremath{\pi}}, - name = {pi}, - description = {Vestibulum luctus nibh at lectus.} +{% + \newcommand*{\glsxtrbookindexbookmark}[2]{} } - -@entry{rho, - symbol = {\ensuremath{\rho}}, - name = {rho}, - description = {Sed bibendum, nulla a faucibus semper, leo velit -ultricies tellus, ac venenatis arcu wisi vel nisl. Vestibulum diam.} +\newcommand*{\glsxtrbookindexbookmarkprefix}{\currentglossary.} +\newcommand*{\glsxtrbookindexcolspread}{} +\newcommand*{\glsxtrbookindexmulticolsenv}{multicols} +\newglossarystyle{bookindex}{% + \setglossarystyle{index}% + \renewenvironment{theglossary}% + {% + \ifnum\glsxtrbookindexcols>1\relax + \ifdefempty\glsxtrbookindexcolspread + {% + \edef\glsxtr@beginbookindex{% + \noexpand\begin{\glsxtrbookindexmulticolsenv} + {\glsxtrbookindexcols}% + }% + }% + {% + \edef\glsxtr@beginbookindex{% + \noexpand\begin{\glsxtrbookindexmulticolsenv}% + {\glsxtrbookindexcols}[\glsxtrbookindexcolspread]% + }% + }% + \else + \def\glsxtr@beginbookindex{}% + \fi + \glsxtr@beginbookindex + \setlength{\parindent}{0pt}% + \setlength{\parskip}{0pt plus 0.3pt}% + \let\@glsxtr@bookindex@sep\glsxtrbookindexparentchildsep + \let\@glsxtr@bookindex@subsep\glsxtrbookindexparentsubchildsep + \let\@glsxtr@bookindex@between\@gobble + \let\@glsxtr@bookindex@subbetween\@gobble + \let\@glsxtr@bookindex@subsubbetween\@gobble + \let\@glsxtr@bookindex@atendgroup\relax + \let\@glsxtr@bookindex@subatendgroup\relax + \let\@glsxtr@bookindex@subsubatendgroup\relax + \let\@glsxtr@bookindexgroupskip\relax + }% + {% + \@glsxtr@bookindex@subsubatendgroup + \@glsxtr@bookindex@subatendgroup + \@glsxtr@bookindex@atendgroup + \ifnum\glsxtrbookindexcols>1\relax + \edef\glsxtr@endbookindex{% + \noexpand\end{\glsxtrbookindexmulticolsenv}% + }% + \else + \def\glsxtr@endbookindex{}% + \fi + \glsxtr@endbookindex + }% + \renewcommand*{\glossaryheader}{\raggedright}% + \renewcommand*{\glossentry}[2]{% + \@glsxtr@bookindex@between{##1}% + \let\@glsxtr@bookindex@sep\glsxtrbookindexparentchildsep + \let\@glsxtr@bookindex@subsep\glsxtrbookindexparentsubchildsep + \let\@glsxtr@bookindex@subbetween\@gobble + \let\@glsxtr@bookindex@subsubbetween\@gobble + \edef\@glsxtr@bookindex@between{% + \noexpand\glsxtrbookindexbetween{##1}% + }% + \edef\@glsxtr@bookindex@atendgroup{% + \noexpand\glsxtrbookindexatendgroup{##1}% + }% + \let\@glsxtr@bookindex@subatendgroup\relax + \let\@glsxtr@bookindex@subsubatendgroup\relax + \glstreeitem + \glsentryitem{##1}% + \glstarget{##1}{\glsxtrbookindexname{##1}}% + \glsxtrbookindexprelocation{##1}% + \glsxtrbookindexlocation{##1}{##2}% + }% + \renewcommand{\subglossentry}[3]{% + \ifcase##1\relax + \glstreeitem + \or + \@glsxtr@bookindex@sep + \@glsxtr@bookindex@subbetween{##2}% + \let\@glsxtr@bookindex@sep\relax + \let\@glsxtr@bookindex@subsubbetween\@gobble + \let\@glsxtr@bookindex@subsep\glsxtrbookindexparentsubchildsep + \edef\@glsxtr@bookindex@subbetween{% + \noexpand\glsxtrbookindexsubbetween{##2}% + }% + \edef\@glsxtr@bookindex@atsubendgroup{% + \noexpand\glsxtrbookindexatsubendgroup{##1}% + }% + \glstreesubitem + \glssubentryitem{##2}% + \else + \@glsxtr@bookindex@subsep + \@glsxtr@bookindex@subsubbetween{##2}% + \let\@glsxtr@bookindex@subsep\relax + \edef\@glsxtr@bookindex@subsubbetween{% + \noexpand\glsxtrbookindexsubsubbetween{##2}% + }% + \edef\@glsxtr@bookindex@atsubsubendgroup{% + \noexpand\glsxtrbookindexatsubsubendgroup{##1}% + }% + \glstreesubsubitem + \fi + \glstarget{##2}{\glsxtrbookindexsubname{##2}}% + \glsxtrbookindexsubprelocation{##2}% + \glsxtrbookindexsublocation{##2}{##3}% + }% + \renewcommand*{\glsgroupskip}{}% + \renewcommand*{\glsgroupheading}[1]{% + \@glsxtr@bookindex@subsubatendgroup + \@glsxtr@bookindex@subatendgroup + \@glsxtr@bookindex@atendgroup + \@glsxtr@bookindexgroupskip + \let\@glsxtr@bookindexgroupskip\glsxtrbookindexgroupskip + \let\@glsxtr@bookindex@between\@gobble + \let\@glsxtr@bookindex@atendgroup\relax + \let\@glsxtr@bookindex@subatendgroup\relax + \let\@glsxtr@bookindex@subsubatendgroup\relax + \glsxtrgetgrouptitle{##1}{\glsxtrcurrentgrptitle}% + \glsxtrbookindexbookmark{\glsxtrcurrentgrptitle}{\glsxtrbookindexbookmarkprefix##1}% + \glsxtrbookindexformatheader{\glsxtrcurrentgrptitle}% + \nopagebreak\indexspace\nopagebreak\@afterheading + }% } - -@entry{sigma, - symbol = {\ensuremath{\sigma}}, - name = {sigma}, - description = {Aliquam pellentesque, augue quis sagittis posuere, -turpis lacus congue quam, in hendrerit risus eros eget felis.} +\newcommand{\glsxtrbookindexthepage}{% + \ifdef\currentglossary{\currentglossary.\arabic{page}}{\arabic{page}}% } - -@entry{tau, - symbol = {\ensuremath{\tau}}, - name = {tau}, - description = {Maecenas eget erat in sapien mattis porttitor.} +\newcommand*{\glsxtrbookindexmarkentry}[1]{% + \protected@write\@auxout + {\let\glsxtrbookindexthepage\relax}% + {\string\glsxtr@setbookindexmark{\glsxtrbookindexthepage}{#1}}% } - -@entry{upsilon, - symbol = {\ensuremath{\upsilon}}, - name = {upsilon}, - description = {Vestibulum porttitor.} +\newcommand*{\glsxtr@setbookindexmark}[2]{% + \ifcsundef{glsxtr@idxfirstmark@#1}% + {\csgdef{glsxtr@idxfirstmark@#1}{#2}}% + {}% + \csgdef{glsxtr@idxlastmark@#1}{#2}% } - -@entry{phi, - symbol = {\ensuremath{\phi}}, - name = {phi}, - description = {Nulla facilisi.} +\newcommand*{\glsxtrbookindexfirstmarkfmt}[1]{% + \glsentryname{#1}% } - -@entry{chi, - symbol = {\ensuremath{\chi}}, - name = {chi}, - description = {Sed a turpis eu lacus commodo facilisis.} +\newcommand*{\glsxtrbookindexfirstmark}{% + \letcs{\glsxtr@label}{glsxtr@idxfirstmark@\glsxtrbookindexthepage}% + \ifdef\glsxtr@label + {\glsxtrbookindexfirstmarkfmt{\glsxtr@label}}% + {}% } - -@entry{psi, - symbol = {\ensuremath{\psi}}, - name = {psi}, - description = {Morbi fringilla, wisi in dignissim interdum, justo -lectus sagittis dui, et vehicula libero dui cursus dui.} +\newcommand*{\glsxtrbookindexlastmarkfmt}[1]{% + \glsentryname{#1}% } - -@entry{omega, - symbol = {\ensuremath{\omega}}, - name = {omega}, - description = {Mauris tempor ligula sed lacus.} +\newcommand*{\glsxtrbookindexlastmark}{% + \letcs{\glsxtr@label}{glsxtr@idxlastmark@\glsxtrbookindexthepage}% + \ifdef\glsxtr@label + {\glsxtrbookindexlastmarkfmt{\glsxtr@label}}% + {}% } - % \end{macrocode} -%\fi %\iffalse % \begin{macrocode} -% +% % \end{macrocode} %\fi %\iffalse % \begin{macrocode} -%<*example-glossaries-url.bib> +%<*glossary-longextra-2021-11-22.sty> % \end{macrocode} %\fi -%\iffalse +%\subsection{Rollback v1.48 (glossary-longextra-2021-11-22.sty)} +% Version 1.48 preserved for rollback. % \begin{macrocode} -%<{\raggedright}p{\glsdescwidth}} +\newcommand{\glslongextraSymbolAlign}{c} +\newcommand{\glslongextraLocationAlign}{>{\raggedright}p{\glspagelistwidth}} +\newcommand{\glslongextraGroupHeading}[2]{} +\newcommand{\glslongextraHeaderFmt}[1]{\textbf{#1}} +\newcommand{\glslongextraNameDescHeader}{% + \glslongextraNameDescTabularHeader\endhead + \glslongextraNameDescTabularFooter\endfoot } - -@entry{phasellus-url, - user1 = {http://theoval.cmp.uea.ac.uk/}, - name = {phasellus}, - description = {arcu (catcode change)} +\newcommand{\glslongextraNameDescTabularHeader}{% + \toprule + \glslongextraHeaderFmt\entryname & + \glslongextraHeaderFmt\descriptionname\tabularnewline + \midrule } - -@entry{phasellus2-url, - user1 = {http://theoval.cmp.uea.ac.uk/\%7Enlct -}, - name = {phasellus}, - description = {arcu (uses \texttt{\string\%})} +\newcommand{\glslongextraNameDescTabularFooter}{% + \bottomrule } - -@entry{phasellus3-url, - user1 = {http://theoval.cmp.uea.ac.uk/\glspercentchar 7Enlct -}, - name = {phasellus}, - description = {arcu (uses - \texttt{\string\glspercentchar})} +\newcommand*{\glslongextraSetWidest}[1]{% + \def\@glslongextrawidestname{#1}% } - -% \end{macrocode} -%\fi -%\iffalse -% \begin{macrocode} -% -% \end{macrocode} -%\fi -%\iffalse -% \begin{macrocode} -%<*example-glossaries-xr.bib> -% \end{macrocode} -%\fi -%\iffalse -% \begin{macrocode} -%<\dimen@ + \def\@glslongextrawidestname{#1}% + \fi + }% } - -@entry{alias-lorem, - name = {alias-lorem}, - description = {ipsum}, - alias = {lorem} +\newcommand*{\glslongextraUpdateWidestChild}[2]{} +\newcommand{\glslongextraSetDescWidth}{% + \settowidth{\gls@tmplen}{\glslongextraHeaderFmt\entryname}% + \settowidth{\dimen@}{\glsnamefont{\@glslongextrawidestname}}% + \ifdim\dimen@>\gls@tmplen + \gls@tmplen=\dimen@ + \fi + \setlength{\glsdescwidth}{\dimexpr\linewidth-4\tabcolsep-\gls@tmplen}% } - -@entry{dolor, - name = {dolor}, - description = {sit} +\newcommand{\glslongextraSymSetDescWidth}{% + \glslongextraSetDescWidth + \settowidth{\gls@tmplen}{\glslongextraHeaderFmt\symbolname}% + \setlength{\glsdescwidth}{\dimexpr\glsdescwidth-2\tabcolsep-\gls@tmplen}% } - -@entry{amet, - see = {dolor}, - name = {amet}, - description = {consectetuer} +\newcommand{\glslongextraLocSetDescWidth}{% + \glslongextraSetDescWidth + \setlength{\glsdescwidth}{\dimexpr\glsdescwidth-2\tabcolsep-\glspagelistwidth}% } - -@entry{adipiscing, - name = {adipiscing}, - description = {elit} +\newcommand{\glslongextraSymLocSetDescWidth}{% + \glslongextraSymSetDescWidth + \setlength{\glsdescwidth}{\dimexpr\glsdescwidth-2\tabcolsep-\glspagelistwidth}% } - -@entry{ut, - name = {ut}, - description = {purus} +\newif\ifGlsLongExtraUseTabular +\GlsLongExtraUseTabularfalse +\newcommand*{\glslongextraTabularVAlign}{c} +\newglossarystyle{long-name-desc}% +{% + \ifGlsLongExtraUseTabular + \renewenvironment{theglossary}% + {% + \glslongextraSetDescWidth + \edef\@glslongextra@begintab{% + \noexpand\begin{tabular}[\glslongextraTabularVAlign]{% + \expandonce\glslongextraNameAlign + \expandonce\glslongextraDescAlign}}% + \@glslongextra@begintab + }% + {% + \glslongextraNameDescTabularFooter + \end{tabular}% + }% + \renewcommand*{\glossaryheader}{\glslongextraNameDescTabularHeader}% + \else + \renewenvironment{theglossary}% + {% + \glspatchLToutput + \glslongextraSetDescWidth + \edef\@glslongextra@begintab{% + \noexpand\begin{longtable}{% + \expandonce\glslongextraNameAlign + \expandonce\glslongextraDescAlign}}% + \@glslongextra@begintab + }% + {\end{longtable}}% + \renewcommand*{\glossaryheader}{\glslongextraNameDescHeader}% + \fi + \renewcommand*{\glsgroupheading}[1]{\glslongextraGroupHeading{2}{##1}}% + \renewcommand{\glossentry}[2]{% + \glslongextraNameFmt{##1} & + \glslongextraDescFmt{##1}\tabularnewline + }% + \renewcommand{\subglossentry}[3]{% + \glslongextraSubNameFmt{##1}{##2} + & + \glslongextraSubDescFmt{##1}{##2}% + \tabularnewline + }% + \ifglsnogroupskip + \renewcommand*{\glsgroupskip}{}% + \else + \renewcommand*{\glsgroupskip}{\glspenaltygroupskip}% + \fi } - -@entry{elit, - name = {elit}, - description = {vestibulum}, - seealso = {adipiscing,ut} +\newcommand{\glslongextraNameDescLocationHeader}{% + \glslongextraNameDescLocationTabularHeader\endhead + \glslongextraNameDescLocationTabularFooter\endfoot +} +\newcommand{\glslongextraNameDescLocationTabularHeader}{% + \toprule + \glslongextraHeaderFmt\entryname & + \glslongextraHeaderFmt\descriptionname & + \glslongextraHeaderFmt\pagelistname\tabularnewline + \midrule +} +\newcommand{\glslongextraNameDescLocationTabularFooter}{% + \bottomrule +} +\newglossarystyle{long-name-desc-loc}% +{% + \ifGlsLongExtraUseTabular + \renewenvironment{theglossary}% + {% + \glslongextraLocSetDescWidth + \edef\@glslongextra@begintab{% + \noexpand\begin{tabular}[\glslongextraTabularVAlign]{% + \expandonce\glslongextraNameAlign + \expandonce\glslongextraDescAlign + \expandonce\glslongextraLocationAlign + }}% + \@glslongextra@begintab + }% + {% + \glslongextraNameDescLocationTabularFooter + \end{tabular}% + }% + \renewcommand*{\glossaryheader}{\glslongextraNameDescLocationTabularHeader}% + \else + \renewenvironment{theglossary}% + {% + \glspatchLToutput + \glslongextraLocSetDescWidth + \edef\@glslongextra@begintab{% + \noexpand\begin{longtable}{% + \expandonce\glslongextraNameAlign + \expandonce\glslongextraDescAlign + \expandonce\glslongextraLocationAlign + }}% + \@glslongextra@begintab + }% + {\end{longtable}}% + \renewcommand*{\glossaryheader}{\glslongextraNameDescLocationHeader}% + \fi + \renewcommand*{\glsgroupheading}[1]{\glslongextraGroupHeading{3}{##1}}% + \renewcommand{\glossentry}[2]{% + \glslongextraNameFmt{##1} & + \glslongextraDescFmt{##1} & + \glslongextraLocationFmt{##1}{##2}\tabularnewline + }% + \renewcommand{\subglossentry}[3]{% + \glslongextraSubNameFmt{##1}{##2}& + \glslongextraSubDescFmt{##1}{##2}& + \glslongextraSubLocationFmt{##1}{##2}{##3}% + \tabularnewline + }% + \ifglsnogroupskip + \renewcommand*{\glsgroupskip}{}% + \else + \renewcommand*{\glsgroupskip}{\glspenaltygroupskip}% + \fi } - -@entry{placerat, - name = {placerat}, - description = {ac} +\newcommand{\glslongextraDescNameHeader}{% + \glslongextraDescNameTabularHeader\endhead + \glslongextraDescNameTabularFooter\endfoot } - -@entry{vitae, - name = {vitae}, - description = {felis} +\newcommand{\glslongextraDescNameTabularHeader}{% + \toprule + \glslongextraHeaderFmt\descriptionname& + \glslongextraHeaderFmt\entryname \tabularnewline + \midrule } - -@entry{curabitur, - name = {curabitur}, - description = {gravida} +\newcommand{\glslongextraDescNameTabularFooter}{% + \bottomrule } - -@entry{mauris, - name = {mauris}, - description = {nam} +\newglossarystyle{long-desc-name}% +{% + \ifGlsLongExtraUseTabular + \renewenvironment{theglossary}% + {% + \glslongextraSetDescWidth + \edef\@glslongextra@begintab{% + \noexpand\begin{tabular}[\glslongextraTabularVAlign]{% + \expandonce\glslongextraDescAlign + \expandonce\glslongextraNameAlign}}% + \@glslongextra@begintab + }% + {% + \glslongextraDescNameTabularFooter + \end{tabular}% + }% + \renewcommand*{\glossaryheader}{\glslongextraDescNameTabularHeader}% + \else + \renewenvironment{theglossary}% + {% + \glspatchLToutput + \glslongextraSetDescWidth + \edef\@glslongextra@begintab{% + \noexpand\begin{longtable}{% + \expandonce\glslongextraDescAlign + \expandonce\glslongextraNameAlign}}% + \@glslongextra@begintab + }% + {\end{longtable}}% + \renewcommand*{\glossaryheader}{\glslongextraDescNameHeader}% + \fi + \renewcommand*{\glsgroupheading}[1]{\glslongextraGroupHeading{2}{##1}}% + \renewcommand{\glossentry}[2]{% + \glslongextraDescFmt{##1} & + \glslongextraNameFmt{##1}\tabularnewline + }% + \renewcommand{\subglossentry}[3]{% + \glslongextraSubDescFmt{##1}{##2} & + \glslongextraSubNameFmt{##1}{##2}\tabularnewline + }% + \ifglsnogroupskip + \renewcommand*{\glsgroupskip}{}% + \else + \renewcommand*{\glsgroupskip}{\glspenaltygroupskip}% + \fi } - -@entry{arcu, - name = {arcu}, - description = {libero}, - seealso = {placerat,vitae,curabitur} +\newcommand{\glslongextraLocationDescNameHeader}{% + \glslongextraLocationDescNameTabularHeader\endhead + \glslongextraLocationDescNameTabularFooter\endfoot } - -@entry{nonummy, - name = {nonummy}, - description = {eget}, - seealso = {mauris} +\newcommand{\glslongextraLocationDescNameTabularHeader}{% + \toprule + \glslongextraHeaderFmt\pagelistname& + \glslongextraHeaderFmt\descriptionname& + \glslongextraHeaderFmt\entryname \tabularnewline + \midrule } - -@entry{consectetuer, - parent = {nonummy}, - name = {consectetuer}, - description = {id} +\newcommand{\glslongextraLocationDescNameTabularFooter}{% + \bottomrule } - -@entry{vulputate, - parent = {nonummy}, - name = {vulputate}, - description = {a magna} +\newglossarystyle{long-loc-desc-name}% +{% + \ifGlsLongExtraUseTabular + {% + \glslongextraLocSetDescWidth + \edef\@glslongextra@begintab{% + \noexpand\begin{tabular}[\glslongextraTabularVAlign]{% + \expandonce\glslongextraLocationAlign + \expandonce\glslongextraDescAlign + \expandonce\glslongextraNameAlign}}% + \@glslongextra@begintab + }% + {% + \glslongextraLocationDescNameTabularFooter + \end{tabular}% + }% + \renewcommand*{\glossaryheader}{\glslongextraLocationDescNameTabularHeader}% + \else + \renewenvironment{theglossary}% + {% + \glspatchLToutput + \glslongextraLocSetDescWidth + \edef\@glslongextra@begintab{% + \noexpand\begin{longtable}{% + \expandonce\glslongextraLocationAlign + \expandonce\glslongextraDescAlign + \expandonce\glslongextraNameAlign}}% + \@glslongextra@begintab + }% + {\end{longtable}}% + \renewcommand*{\glossaryheader}{\glslongextraLocationDescNameHeader}% + \fi + \renewcommand*{\glsgroupheading}[1]{\glslongextraGroupHeading{3}{##1}}% + \renewcommand{\glossentry}[2]{% + \glslongextraLocationFmt{##1}{##2} & + \glslongextraDescFmt{##1} & + \glslongextraNameFmt{##1}\tabularnewline + }% + \renewcommand{\subglossentry}[3]{% + \glslongextraSubLocationFmt{##1}{##2}{##3} & + \glslongextraSubDescFmt{##1}{##2} & + \glslongextraSubNameFmt{##1}{##2}\tabularnewline + }% + \ifglsnogroupskip + \renewcommand*{\glsgroupskip}{}% + \else + \renewcommand*{\glsgroupskip}{\glspenaltygroupskip}% + \fi } - -@entry{donec, - name = {donec}, - description = {vehicula} +\newcommand{\glslongextraNameDescSymHeader}{% + \glslongextraNameDescSymTabularHeader\endhead + \glslongextraNameDescSymTabularFooter\endfoot } - -@entry{augue, - name = {augue}, - description = {eu neque} +\newcommand{\glslongextraNameDescSymTabularHeader}{% + \toprule + \glslongextraHeaderFmt\entryname & + \glslongextraHeaderFmt\descriptionname & + \glslongextraHeaderFmt\symbolname\tabularnewline + \midrule } - -@entry{pellentesque, - see = {augue}, - name = {pellentesque}, - description = {habitant} +\newcommand{\glslongextraNameDescSymTabularFooter}{% + \bottomrule } - -@entry{morbi, - name = {morbi}, - description = {tristique} +\newglossarystyle{long-name-desc-sym}% +{% + \ifGlsLongExtraUseTabular + \renewenvironment{theglossary}% + {% + \glslongextraSymSetDescWidth + \edef\@glslongextra@begintab{% + \noexpand\begin{tabular}[\glslongextraTabularVAlign]{% + \expandonce\glslongextraNameAlign + \expandonce\glslongextraDescAlign + \expandonce\glslongextraSymbolAlign + }}% + \@glslongextra@begintab + }% + {% + \glslongextraNameDescSymTabularFooter + \end{tabular}% + }% + \renewcommand*{\glossaryheader}{\glslongextraNameDescSymTabularHeader}% + \else + \renewenvironment{theglossary}% + {% + \glspatchLToutput + \glslongextraSymSetDescWidth + \edef\@glslongextra@begintab{% + \noexpand\begin{longtable}{% + \expandonce\glslongextraNameAlign + \expandonce\glslongextraDescAlign + \expandonce\glslongextraSymbolAlign + }}% + \@glslongextra@begintab + }% + {\end{longtable}}% + \renewcommand*{\glossaryheader}{\glslongextraNameDescSymHeader}% + \fi + \renewcommand*{\glsgroupheading}[1]{\glslongextraGroupHeading{3}{##1}}% + \renewcommand{\glossentry}[2]{% + \glslongextraNameFmt{##1} & + \glslongextraDescFmt{##1} & + \glslongextraSymbolFmt{##1}\tabularnewline + }% + \renewcommand{\subglossentry}[3]{% + \glslongextraSubNameFmt{##1}{##2} & + \glslongextraSubDescFmt{##1}{##2} & + \glslongextraSubSymbolFmt{##1}{##2}% + \tabularnewline + }% + \ifglsnogroupskip + \renewcommand*{\glsgroupskip}{}% + \else + \renewcommand*{\glsgroupskip}{\glspenaltygroupskip}% + \fi } - -@entry{senectus, - name = {senectus}, - description = {et netus} +\newcommand{\glslongextraNameDescSymLocationHeader}{% + \glslongextraNameDescSymLocationTabularHeader\endhead + \glslongextraNameDescSymLocationTabularFooter\endfoot } - -@entry{et, - see = {vulputate}, - name = {et}, - description = {malesuada} +\newcommand{\glslongextraNameDescSymLocationTabularHeader}{% + \toprule + \glslongextraHeaderFmt\entryname & + \glslongextraHeaderFmt\descriptionname & + \glslongextraHeaderFmt\symbolname & + \glslongextraHeaderFmt\pagelistname\tabularnewline + \midrule } - -@entry{fames, - name = {fames}, - description = {ac} +\newcommand{\glslongextraNameDescSymLocationTabularFooter}{% + \bottomrule } - -@entry{turpis, - name = {turpis}, - description = {egestas}, - seealso = {consectetuer} +\newglossarystyle{long-name-desc-sym-loc}% +{% + \ifGlsLongExtraUseTabular + \renewenvironment{theglossary}% + {% + \glslongextraSymLocSetDescWidth + \edef\@glslongextra@begintab{% + \noexpand\begin{tabular}[\glslongextraTabularVAlign]{% + \expandonce\glslongextraNameAlign + \expandonce\glslongextraDescAlign + \expandonce\glslongextraSymbolAlign + \expandonce\glslongextraLocationAlign + }}% + \@glslongextra@begintab + }% + {% + \glslongextraNameDescSymLocationTabularFooter + \end{tabular}% + }% + \renewcommand*{\glossaryheader}{\glslongextraNameDescSymLocationTabularHeader}% + \else + \renewenvironment{theglossary}% + {% + \glspatchLToutput + \glslongextraSymLocSetDescWidth + \edef\@glslongextra@begintab{% + \noexpand\begin{longtable}{% + \expandonce\glslongextraNameAlign + \expandonce\glslongextraDescAlign + \expandonce\glslongextraSymbolAlign + \expandonce\glslongextraLocationAlign + }}% + \@glslongextra@begintab + }% + {\end{longtable}}% + \renewcommand*{\glossaryheader}{\glslongextraNameDescSymLocationHeader}% + \fi + \renewcommand*{\glsgroupheading}[1]{\glslongextraGroupHeading{4}{##1}}% + \renewcommand{\glossentry}[2]{% + \glslongextraNameFmt{##1} & + \glslongextraDescFmt{##1} & + \glslongextraSymbolFmt{##1}& + \glslongextraLocationFmt{##1}{##2}\tabularnewline + }% + \renewcommand{\subglossentry}[3]{% + \glslongextraSubNameFmt{##1}{##2} & + \glslongextraSubDescFmt{##1}{##2} & + \glslongextraSubSymbolFmt{##1}{##2}& + \glslongextraSubLocationFmt{##1}{##2}{##3}% + \tabularnewline + }% + \ifglsnogroupskip + \renewcommand*{\glsgroupskip}{}% + \else + \renewcommand*{\glsgroupskip}{\glspenaltygroupskip}% + \fi } - -@entry{leo, - name = {leo}, - description = {cras} +\newcommand{\glslongextraNameSymDescHeader}{% + \glslongextraNameSymDescTabularHeader\endhead + \glslongextraNameSymDescTabularFooter\endfoot } - -@entry{viverra, - name = {viverra}, - description = {metus} +\newcommand{\glslongextraNameSymDescTabularHeader}{% + \toprule + \glslongextraHeaderFmt\entryname & + \glslongextraHeaderFmt\symbolname & + \glslongextraHeaderFmt\descriptionname\tabularnewline + \midrule } - -@entry{rhoncus, - name = {rhoncus}, - description = {sem} +\newcommand{\glslongextraNameSymDescTabularFooter}{% + \bottomrule } - -@entry{nulla, - name = {nulla}, - description = {et} +\newglossarystyle{long-name-sym-desc}% +{% + \ifGlsLongExtraUseTabular + \renewenvironment{theglossary}% + {% + \glslongextraSymSetDescWidth + \edef\@glslongextra@begintab{% + \noexpand\begin{tabular}[\glslongextraTabularVAlign]{% + \expandonce\glslongextraNameAlign + \expandonce\glslongextraSymbolAlign + \expandonce\glslongextraDescAlign + }}% + \@glslongextra@begintab + }% + {% + \glslongextraNameSymDescTabularFooter + \end{tabular}% + }% + \renewcommand*{\glossaryheader}{\glslongextraNameSymDescTabularHeader}% + \else + \renewenvironment{theglossary}% + {% + \glspatchLToutput + \glslongextraSymSetDescWidth + \edef\@glslongextra@begintab{% + \noexpand\begin{longtable}{% + \expandonce\glslongextraNameAlign + \expandonce\glslongextraSymbolAlign + \expandonce\glslongextraDescAlign + }}% + \@glslongextra@begintab + }% + {\end{longtable}}% + \renewcommand*{\glossaryheader}{\glslongextraNameSymDescHeader}% + \fi + \renewcommand*{\glsgroupheading}[1]{\glslongextraGroupHeading{3}{##1}}% + \renewcommand{\glossentry}[2]{% + \glslongextraNameFmt{##1} & + \glslongextraSymbolFmt{##1} & + \glslongextraDescFmt{##1}\tabularnewline + }% + \renewcommand{\subglossentry}[3]{% + \glslongextraSubNameFmt{##1}{##2} & + \glslongextraSubSymbolFmt{##1}{##2} & + \glslongextraSubDescFmt{##1}{##2}\tabularnewline + }% + \ifglsnogroupskip + \renewcommand*{\glsgroupskip}{}% + \else + \renewcommand*{\glsgroupskip}{\glspenaltygroupskip}% + \fi } - -@entry{lectus, - name = {lectus}, - description = {vestibulum} +\newcommand{\glslongextraNameSymDescLocationHeader}{% + \glslongextraNameSymDescLocationTabularHeader\endhead + \glslongextraNameSymDescLocationTabularFooter\endfoot } - -@entry{urna, - parent = {lectus}, - see = {nulla}, - name = {urna}, - description = {fringilla} +\newcommand{\glslongextraNameSymDescLocationTabularHeader}{% + \toprule + \glslongextraHeaderFmt\entryname & + \glslongextraHeaderFmt\symbolname & + \glslongextraHeaderFmt\descriptionname & + \glslongextraHeaderFmt\pagelistname\tabularnewline + \midrule } - -@entry{ultrices, - parent = {lectus}, - name = {ultrices}, - description = {phasellus} +\newcommand{\glslongextraNameSymDescLocationTabularFooter}{% + \bottomrule } - -@entry{eu, - parent = {lectus}, - name = {eu}, - description = {tellus} +\newglossarystyle{long-name-sym-desc-loc}% +{% + \ifGlsLongExtraUseTabular + \renewenvironment{theglossary}% + {% + \glslongextraSymLocSetDescWidth + \edef\@glslongextra@begintab{% + \noexpand\begin{tabular}[\glslongextraTabularVAlign]{% + \expandonce\glslongextraNameAlign + \expandonce\glslongextraSymbolAlign + \expandonce\glslongextraDescAlign + \expandonce\glslongextraLocationAlign + }}% + \@glslongextra@begintab + }% + {% + \glslongextraNameSymDescLocationTabularFooter + \end{tabular}% + }% + \renewcommand*{\glossaryheader}{\glslongextraNameSymDescLocationTabularHeader}% + \else + \renewenvironment{theglossary}% + {% + \glspatchLToutput + \glslongextraSymLocSetDescWidth + \edef\@glslongextra@begintab{% + \noexpand\begin{longtable}{% + \expandonce\glslongextraNameAlign + \expandonce\glslongextraSymbolAlign + \expandonce\glslongextraDescAlign + \expandonce\glslongextraLocationAlign + }}% + \@glslongextra@begintab + }% + {\end{longtable}}% + \renewcommand*{\glossaryheader}{\glslongextraNameSymDescLocationHeader}% + \fi + \renewcommand*{\glsgroupheading}[1]{\glslongextraGroupHeading{4}{##1}}% + \renewcommand{\glossentry}[2]{% + \glslongextraNameFmt{##1} & + \glslongextraSymbolFmt{##1} & + \glslongextraDescFmt{##1} & + \glslongextraLocationFmt{##1}{##2}\tabularnewline + }% + \renewcommand{\subglossentry}[3]{% + \glslongextraSubNameFmt{##1}{##2} & + \glslongextraSubSymbolFmt{##1}{##2} & + \glslongextraSubDescFmt{##1}{##2} & + \glslongextraSubLocationFmt{##1}{##2}{##3}\tabularnewline + }% + \ifglsnogroupskip + \renewcommand*{\glsgroupskip}{}% + \else + \renewcommand*{\glsgroupskip}{\glspenaltygroupskip}% + \fi } - -@entry{alias-eu, - name = {alias-eu}, - description = {tellus}, - alias = {eu} +\newcommand{\glslongextraSymDescNameHeader}{% + \glslongextraSymDescNameTabularHeader\endhead + \glslongextraSymDescNameTabularFooter\endfoot } - -@entry{sit, - name = {sit}, - description = {amet} +\newcommand{\glslongextraSymDescNameTabularHeader}{% + \toprule + \glslongextraHeaderFmt\symbolname & + \glslongextraHeaderFmt\descriptionname & + \glslongextraHeaderFmt\entryname\tabularnewline + \midrule } - -@entry{tortor, - name = {tortor}, - description = {gravida} +\newcommand{\glslongextraSymDescNameTabularFooter}{% + \bottomrule } - -@entry{integer, - name = {integer}, - description = {sapien} +\newglossarystyle{long-sym-desc-name}% +{% + \ifGlsLongExtraUseTabular + \renewenvironment{theglossary}% + {% + \glslongextraSymSetDescWidth + \edef\@glslongextra@begintab{% + \noexpand\begin{tabular}[\glslongextraTabularVAlign]{% + \expandonce\glslongextraSymbolAlign + \expandonce\glslongextraDescAlign + \expandonce\glslongextraNameAlign + }}% + \@glslongextra@begintab + }% + {% + \glslongextraSymDescNameTabularFooter + \end{tabular}% + }% + \renewcommand*{\glossaryheader}{\glslongextraSymDescNameTabularHeader}% + \else + \renewenvironment{theglossary}% + {% + \glspatchLToutput + \glslongextraSymSetDescWidth + \edef\@glslongextra@begintab{% + \noexpand\begin{longtable}{% + \expandonce\glslongextraSymbolAlign + \expandonce\glslongextraDescAlign + \expandonce\glslongextraNameAlign + }}% + \@glslongextra@begintab + }% + {\end{longtable}}% + \renewcommand*{\glossaryheader}{\glslongextraSymDescNameHeader}% + \fi + \renewcommand*{\glsgroupheading}[1]{\glslongextraGroupHeading{3}{##1}}% + \renewcommand{\glossentry}[2]{% + \glslongextraSymbolFmt{##1} & + \glslongextraDescFmt{##1} & + \glslongextraNameFmt{##1}\tabularnewline + }% + \renewcommand{\subglossentry}[3]{% + \glslongextraSubSymbolFmt{##1}{##2} & + \glslongextraSubDescFmt{##1}{##2} & + \glslongextraSubNameFmt{##1}{##2}\tabularnewline + }% + \ifglsnogroupskip + \renewcommand*{\glsgroupskip}{}% + \else + \renewcommand*{\glsgroupskip}{\glspenaltygroupskip}% + \fi } - -@entry{est, - name = {est}, - description = {iaculis} +\newcommand{\glslongextraLocationSymDescNameHeader}{% + \glslongextraLocationSymDescNameTabularHeader\endhead + \glslongextraLocationSymDescNameTabularFooter\endfoot } - -@entry{in, - name = {in}, - description = {pretium}, - seealso = {sit,tortor,est} +\newcommand{\glslongextraLocationSymDescNameTabularHeader}{% + \toprule + \glslongextraHeaderFmt\pagelistname & + \glslongextraHeaderFmt\symbolname & + \glslongextraHeaderFmt\descriptionname & + \glslongextraHeaderFmt\entryname\tabularnewline + \midrule } - -@entry{quis, - name = {quis}, - description = {viverra} +\newcommand{\glslongextraLocationSymDescNameTabularFooter}{% + \bottomrule } - -@entry{ac, - name = {ac}, - description = {nunc} +\newglossarystyle{long-loc-sym-desc-name}% +{% + \ifGlsLongExtraUseTabular + \renewenvironment{theglossary}% + {% + \glslongextraSymLocSetDescWidth + \edef\@glslongextra@begintab{% + \noexpand\begin{tabular}[\glslongextraTabularVAlign]{% + \expandonce\glslongextraLocationAlign + \expandonce\glslongextraSymbolAlign + \expandonce\glslongextraDescAlign + \expandonce\glslongextraNameAlign + }}% + \@glslongextra@begintab + }% + {% + \glslongextraLocationSymDescNameTabularFooter + \end{tabular}% + }% + \renewcommand*{\glossaryheader}{\glslongextraLocationSymDescNameTabularHeader}% + \else + \renewenvironment{theglossary}% + {% + \glspatchLToutput + \glslongextraSymLocSetDescWidth + \edef\@glslongextra@begintab{% + \noexpand\begin{longtable}{% + \expandonce\glslongextraLocationAlign + \expandonce\glslongextraSymbolAlign + \expandonce\glslongextraDescAlign + \expandonce\glslongextraNameAlign + }}% + \@glslongextra@begintab + }% + {\end{longtable}}% + \renewcommand*{\glossaryheader}{\glslongextraLocationSymDescNameHeader}% + \fi + \renewcommand*{\glsgroupheading}[1]{\glslongextraGroupHeading{4}{##1}}% + \renewcommand{\glossentry}[2]{% + \glslongextraLocationFmt{##1}{##2} & + \glslongextraSymbolFmt{##1} & + \glslongextraDescFmt{##1} & + \glslongextraNameFmt{##1}\tabularnewline + }% + \renewcommand{\subglossentry}[3]{% + \glslongextraSubLocationFmt{##1}{##2}{##3} & + \glslongextraSubSymbolFmt{##1}{##2} & + \glslongextraSubDescFmt{##1}{##2} & + \glslongextraSubNameFmt{##1}{##2}\tabularnewline + }% + \ifglsnogroupskip + \renewcommand*{\glsgroupskip}{}% + \else + \renewcommand*{\glsgroupskip}{\glspenaltygroupskip}% + \fi } - -@entry{praesent, - name = {praesent}, - description = {eget \gls{ac}} +\newcommand{\glslongextraDescSymNameHeader}{% + \glslongextraDescSymNameTabularHeader\endhead + \glslongextraDescSymNameTabularFooter\endfoot } - -@entry{sem, - name = {sem}, - description = {vel leo -\glshyperlink{quis}} +\newcommand{\glslongextraDescSymNameTabularHeader}{% + \toprule + \glslongextraHeaderFmt\descriptionname & + \glslongextraHeaderFmt\symbolname & + \glslongextraHeaderFmt\entryname\tabularnewline + \midrule } - -@entry{bibendum, - name = {bibendum}, - description = {ultrices} +\newcommand{\glslongextraDescSymNameTabularFooter}{% + \bottomrule } - -@entry{aenean, - name = {aenean}, - description = {faucibus} +\newglossarystyle{long-desc-sym-name}% +{% + \ifGlsLongExtraUseTabular + \renewenvironment{theglossary}% + {% + \glslongextraSymSetDescWidth + \edef\@glslongextra@begintab{% + \noexpand\begin{tabular}[\glslongextraTabularVAlign]{% + \expandonce\glslongextraDescAlign + \expandonce\glslongextraSymbolAlign + \expandonce\glslongextraNameAlign + }}% + \@glslongextra@begintab + }% + {% + \glslongextraDescSymNameTabularFooter + \end{tabular}% + }% + \renewcommand*{\glossaryheader}{\glslongextraDescSymNameTabularHeader}% + \else + \renewenvironment{theglossary}% + {% + \glspatchLToutput + \glslongextraSymSetDescWidth + \edef\@glslongextra@begintab{% + \noexpand\begin{longtable}{% + \expandonce\glslongextraDescAlign + \expandonce\glslongextraSymbolAlign + \expandonce\glslongextraNameAlign + }}% + \@glslongextra@begintab + }% + {\end{longtable}}% + \renewcommand*{\glossaryheader}{\glslongextraDescSymNameHeader}% + \fi + \renewcommand*{\glsgroupheading}[1]{\glslongextraGroupHeading{3}{##1}}% + \renewcommand{\glossentry}[2]{% + \glslongextraDescFmt{##1} & + \glslongextraSymbolFmt{##1} & + \glslongextraNameFmt{##1}\tabularnewline + }% + \renewcommand{\subglossentry}[3]{% + \glslongextraSubDescFmt{##1}{##2} & + \glslongextraSubSymbolFmt{##1}{##2} & + \glslongextraSubNameFmt{##1}{##2}\tabularnewline + }% + \ifglsnogroupskip + \renewcommand*{\glsgroupskip}{}% + \else + \renewcommand*{\glsgroupskip}{\glspenaltygroupskip}% + \fi } - -@entry{malesuada, - parent = {aenean}, - name = {malesuada}, - description = {eu} +\newcommand{\glslongextraLocationDescSymNameHeader}{% + \glslongextraLocationDescSymNameTabularHeader\endhead + \glslongextraLocationDescSymNameTabularFooter\endfoot } - -@entry{pulvinar, - parent = {aenean}, - name = {pulvinar}, - description = {at} +\newcommand{\glslongextraLocationDescSymNameTabularHeader}{% + \toprule + \glslongextraHeaderFmt\pagelistname & + \glslongextraHeaderFmt\descriptionname & + \glslongextraHeaderFmt\symbolname & + \glslongextraHeaderFmt\entryname\tabularnewline + \midrule } - -@entry{mollis, - parent = {aenean}, - name = {mollis}, - description = {ac nulla} +\newcommand{\glslongextraLocationDescSymNameTabularFooter}{% + \bottomrule } - -@entry{auctor, - parent = {aenean}, - name = {auctor}, - description = {semper} +\newglossarystyle{long-loc-desc-sym-name}% +{% + \ifGlsLongExtraUseTabular + \renewenvironment{theglossary}% + {% + \glslongextraSymLocSetDescWidth + \edef\@glslongextra@begintab{% + \noexpand\begin{tabular}[\glslongextraTabularVAlign]{% + \expandonce\glslongextraLocationAlign + \expandonce\glslongextraDescAlign + \expandonce\glslongextraSymbolAlign + \expandonce\glslongextraNameAlign + }}% + \@glslongextra@begintab + }% + {% + \glslongextraLocationDescSymNameTabularFooter + \end{tabular}% + }% + \renewcommand*{\glossaryheader}{\glslongextraLocationDescSymNameTabularHeader}% + \else + \renewenvironment{theglossary}% + {% + \glspatchLToutput + \glslongextraSymLocSetDescWidth + \edef\@glslongextra@begintab{% + \noexpand\begin{longtable}{% + \expandonce\glslongextraLocationAlign + \expandonce\glslongextraDescAlign + \expandonce\glslongextraSymbolAlign + \expandonce\glslongextraNameAlign + }}% + \@glslongextra@begintab + }% + {\end{longtable}}% + \renewcommand*{\glossaryheader}{\glslongextraLocationDescSymNameHeader}% + \fi + \renewcommand*{\glsgroupheading}[1]{\glslongextraGroupHeading{4}{##1}}% + \renewcommand{\glossentry}[2]{% + \glslongextraLocationFmt{##1}{##2} & + \glslongextraDescFmt{##1} & + \glslongextraSymbolFmt{##1} & + \glslongextraNameFmt{##1}\tabularnewline + }% + \renewcommand{\subglossentry}[3]{% + \glslongextraSubLocationFmt{##1}{##2}{##3} & + \glslongextraSubDescFmt{##1}{##2} & + \glslongextraSubSymbolFmt{##1}{##2} & + \glslongextraSubNameFmt{##1}{##2}\tabularnewline + }% + \ifglsnogroupskip + \renewcommand*{\glsgroupskip}{}% + \else + \renewcommand*{\glsgroupskip}{\glspenaltygroupskip}% + \fi } - -@entry{varius, - parent = {aenean}, - name = {varius}, - description = {orci} +% \end{macrocode} +%\iffalse +% \begin{macrocode} +% +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} +%<*glossary-topic-2021-11-22.sty> +% \end{macrocode} +%\fi +%\subsection{Rollback v1.48 (glossary-topic-2021-11-22.sty)} +% Version 1.48 preserved for rollback. +% \begin{macrocode} +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{glossary-topic}[2021/11/22 v1.48 (NLCT)] +\RequirePackage{multicol} +\newglossarystyle{topic}{% + \renewenvironment{theglossary}% + {% + \glstopicInit + \def\glstopic@prechildren{}% + \def\glstopic@prevlevel{-1}% + }% + {\par}% + \renewcommand*{\glossaryheader}{}% + \renewcommand*{\glsgroupheading}[1]{% + \def\glstopic@prevlevel{-1}% + \glstopicGroupHeading{##1}% + }% + \renewcommand{\glossentry}[2]{% + \hangindent0pt\relax + \parindent\glstopicParIndent\relax + \glstopicItem{##1}{##2}% + \ifglshasdesc{##1}% + {% + \def\glstopic@prechildren{}% + }% + {% + \def\glstopic@prechildren{\nopagebreak}% + }% + }% + \renewcommand{\subglossentry}[3]{% + \ifnum\glstopic@prevlevel=0\relax\glstopic@prechildren\fi + \def\glstopic@prevlevel{##1}% + \begingroup + \glstopicAssignSubIndent{##1}% + \glstopicSubItem{##1}{##2}{##3}% + \par + \endgroup + }% + \renewcommand*{\glsgroupskip}{}% } - -@entry{eget, - name = {eget}, - description = {risus} +\newcommand*{\glstopicGroupHeading}[1]{} +\newcommand*{\glstopicItem}[2]{% + \glspar\glstopicPreSkip\glspar\noindent + \glstopicMarker{#1}% + \glstopicTitleFont + {% + \glsentryitem{#1}\glstarget{#1}{\glstopicTitle{#1}}% + }% + \ifglshasdesc{#1}% + {\glspar\nobreak\glstopicMidSkip\glspar\nobreak + \@afterheading\glstopicDesc{#1}\glspar\glstopicPostSkip}% + {\glspar\nobreak\glstopicPostSkip}% + \glstopicLoc{#1}{#2}% } - -@entry{duis, - name = {duis}, - description = {nibh} +\newcommand*{\glstopicMarker}[1]{} +\newcommand*{\glstopicTitle}[1]{\Glossentryname{#1}% + \ifglshassymbol{#1}{\space(\glossentrysymbol{#1})}{}% } - -@entry{mi, - name = {mi}, - description = {congue} +\newcommand*{\glstopicTitleFont}[1]{\textbf{\large #1}} +\newcommand*{\glstopicDesc}[1]{\Glossentrydesc{#1}\glspostdescription} +\newcommand*{\glstopicLoc}[2]{} +\newlength\glstopicParIndent +\setlength\glstopicParIndent{20pt} +\newlength\glstopicSubIndent +\setlength\glstopicSubIndent{20pt} +\newcommand{\glstopicInit}{} +\newcommand*{\glstopicAssignSubIndent}[1]{% + \par + \parindent\dimexpr#1\glstopicSubIndent-\glstopicSubIndent\relax + \glstopicAssignWidest{#1}% + \glstopicsubitemhangindent=\dimexpr\parindent+\glstopicwidest\relax + \hangindent\glstopicsubitemhangindent\relax + \everypar{\hangindent\glstopicsubitemhangindent\relax + \parindent\dimexpr\glstopicSubItemParIndent+\glstopicsubitemhangindent\relax}% } - -@entry{accumsan, - name = {accumsan}, - description = {eleifend} +\newlength\glstopicsubitemhangindent +\newlength\glstopicSubItemParIndent +\glstopicSubItemParIndent\parindent +\newlength\glstopicwidest +\newcommand*{\glstopicAssignWidest}[1]{% + \ifcsundef{@glswidestlength\romannumeral#1}% + {% + \ifcsdef{@glswidestname\romannumeral#1}% + {% + \settowidth{\glstopicwidest}{% + \glstopicSubNameFont{\csuse{@glswidestname\romannumeral#1}}% + \glstopicSubItemSep + }% + }% + {\setlength{\glstopicwidest}{0pt}}% + \csedef{@glswidestlength\romannumeral#1}{\the\glstopicwidest}% + }% + {\setlength{\glstopicwidest}{\csuse{@glswidestlength\romannumeral#1}}}% } - -@entry{sagittis, - see = {eget}, - name = {sagittis}, - description = {quis} +\newcommand*{\glstopicPreSkip}{\medskip} +\newcommand*{\glstopicMidSkip}{\smallskip} +\newcommand*{\glstopicPostSkip}{\smallskip} +\newcommand*{\glstopicSubItem}[3]{% + \glstopicSubItemBox{#1}{\glstopicSubNameFont{\glsentryitem{#2}% + \glstarget{#2}{\glossentryname{#2}}}% + \glstopicSubItemSep + }% + \ifglshassymbol{#2}{(\glossentrysymbol{#2})\space}{}% + \ifglshasdesc{#2}% + {\glossentrydesc{#2}\glspostdescription\glstopicSubPreLocSep}{}% + \glstopicSubLoc{#2}{#3}% } - -@entry{diam, - name = {diam}, - description = {duis} +\newcommand*{\glstopicSubItemSep}{\quad} +\newcommand*{\glstopicSubItemBox}[2]{% + \ifdim\glstopicwidest>0pt\relax\makebox[\glstopicwidest][l]{#2}\else#2\fi } - -@entry{orci, - name = {orci}, - description = {dignissim}, - seealso = {diam} +\newcommand*{\glstopicSubNameFont}[1]{\textbf{#1}} +\newcommand*{\glstopicSubPreLocSep}{\space} +\newcommand*{\glstopicSubLoc}[2]{#2} +\newcommand*{\glstopicCols}{2} +\newcommand*{\glstopicColsEnv}{multicols} +\newglossarystyle{topicmcols}{% + \renewenvironment{theglossary}% + {% + \glstopicInit + \def\glstopic@prechildren{}% + \def\glstopic@postchildren{}% + \def\glstopic@prevlevel{-1}% + }% + {% + \ifnum\glstopic@prevlevel>0\relax\glstopic@postchildren\fi + \par + }% + \renewcommand*{\glossaryheader}{}% + \renewcommand*{\glsgroupheading}[1]{% + \ifnum\glstopic@prevlevel>0\relax\glstopic@postchildren\fi + \def\glstopic@prevlevel{-1}% + \glstopicGroupHeading{##1}% + }% + \renewcommand{\glossentry}[2]{% + \ifnum\glstopic@prevlevel>0\relax\glstopic@postchildren\fi + \def\glstopic@prevlevel{0}% + \hangindent0pt\relax + \parindent\glstopicParIndent\relax + \glstopicItem{##1}{##2}% + \ifnum\glstopicCols>1\relax + \ifglshasdesc{##1}% + {% + \edef\glstopic@prechildren{% + \noexpand\begin{\glstopicColsEnv}{\glstopicCols}% + }% + }% + {% + \edef\glstopic@prechildren{% + \noexpand\nopagebreak + \noexpand\begin{\glstopicColsEnv}{\glstopicCols}% + }% + }% + \edef\glstopic@postchildren{\noexpand\end{\glstopicColsEnv}}% + \fi + }% + \renewcommand{\subglossentry}[3]{% + \ifnum\glstopic@prevlevel=0\relax\glstopic@prechildren\fi + \def\glstopic@prevlevel{##1}% + \glstopicAssignSubIndent{##1}% + \glstopicSubItem{##1}{##2}{##3}% + }% + \renewcommand*{\glsgroupskip}{}% } - % \end{macrocode} -%\fi %\iffalse % \begin{macrocode} -% +% % \end{macrocode} %\fi %\Finale diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra.ins b/macros/latex/contrib/glossaries-extra/glossaries-extra.ins index 5e8b9d804d..de3e13d48b 100644 --- a/macros/latex/contrib/glossaries-extra/glossaries-extra.ins +++ b/macros/latex/contrib/glossaries-extra/glossaries-extra.ins @@ -1,10 +1,10 @@ -% glossaries-extra.ins generated using makedtx version 1.2 2021/11/22 21:22 +% glossaries-extra.ins generated using makedtx version 1.2 2022/10/19 17:47 \input docstrip \preamble glossaries-extra.dtx - Copyright 2021 Nicola Talbot + Copyright 2022 Nicola Talbot This work may be distributed and/or modified under the conditions of the LaTeX Project Public License, either version 1.3 @@ -18,7 +18,7 @@ The Current Maintainer of this work is Nicola Talbot. - This work consists of the files glossaries-extra.dtx and glossaries-extra.ins and the derived files glossaries-extra.sty, glossaries-extra-bib2gls.sty, glossaries-extra-stylemods.sty, glossary-bookindex.sty, glossary-longextra.sty, glossary-topic.sty, example-glossaries-xr.tex, example-glossaries-acronym-desc.bib, example-glossaries-acronym.bib, example-glossaries-acronyms-lang.bib, example-glossaries-brief.bib, example-glossaries-childmultipar.bib, example-glossaries-childnoname.bib, example-glossaries-cite.bib, example-glossaries-images.bib, example-glossaries-long.bib, example-glossaries-longchild.bib, example-glossaries-multipar.bib, example-glossaries-parent.bib, example-glossaries-symbolnames.bib, example-glossaries-symbols.bib, example-glossaries-url.bib, example-glossaries-xr.bib. + This work consists of the files glossaries-extra.dtx and glossaries-extra.ins and the derived files glossaries-extra.sty, glossaries-extra-abbrstyles.def, glossaries-extra-bib2gls.sty, glossaries-extra-stylemods.sty, glossary-bookindex.sty, glossary-longextra.sty, glossary-topic.sty, glossary-table.sty, example-glossaries-xr.tex, example-glossaries-acronym-desc.bib, example-glossaries-acronym.bib, example-glossaries-acronyms-lang.bib, example-glossaries-brief.bib, example-glossaries-childmultipar.bib, example-glossaries-childnoname.bib, example-glossaries-cite.bib, example-glossaries-images.bib, example-glossaries-long.bib, example-glossaries-longchild.bib, example-glossaries-multipar.bib, example-glossaries-parent.bib, example-glossaries-symbolnames.bib, example-glossaries-symbols.bib, example-glossaries-url.bib, example-glossaries-xr.bib, glossaries-extra-2021-11-22.sty, glossaries-extra-bib2gls-2021-11-22.sty, glossaries-extra-stylemods-2021-11-22.sty, glossary-bookindex-2021-11-22.sty, glossary-longextra-2021-11-22.sty, glossary-topic-2021-11-22.sty. \endpreamble @@ -26,6 +26,8 @@ \generate{\file{glossaries-extra.sty}{\usepreamble\defaultpreamble \usepostamble\defaultpostamble\from{glossaries-extra.dtx}{glossaries-extra.sty,package}} +\file{glossaries-extra-abbrstyles.def}{\usepreamble\defaultpreamble +\usepostamble\defaultpostamble\from{glossaries-extra.dtx}{glossaries-extra-abbrstyles.def,package}} \file{glossaries-extra-bib2gls.sty}{\usepreamble\defaultpreamble \usepostamble\defaultpostamble\from{glossaries-extra.dtx}{glossaries-extra-bib2gls.sty,package}} \file{glossaries-extra-stylemods.sty}{\usepreamble\defaultpreamble @@ -36,6 +38,8 @@ \usepostamble\defaultpostamble\from{glossaries-extra.dtx}{glossary-longextra.sty,package}} \file{glossary-topic.sty}{\usepreamble\defaultpreamble \usepostamble\defaultpostamble\from{glossaries-extra.dtx}{glossary-topic.sty,package}} +\file{glossary-table.sty}{\usepreamble\defaultpreamble +\usepostamble\defaultpostamble\from{glossaries-extra.dtx}{glossary-table.sty,package}} \file{example-glossaries-xr.tex}{\usepreamble\defaultpreamble \usepostamble\defaultpostamble\from{glossaries-extra.dtx}{example-glossaries-xr.tex,package}} \file{example-glossaries-acronym-desc.bib}{\nopreamble\nopostamble\from{glossaries-extra.dtx}{example-glossaries-acronym-desc.bib}} @@ -54,6 +58,18 @@ \file{example-glossaries-symbols.bib}{\nopreamble\nopostamble\from{glossaries-extra.dtx}{example-glossaries-symbols.bib}} \file{example-glossaries-url.bib}{\nopreamble\nopostamble\from{glossaries-extra.dtx}{example-glossaries-url.bib}} \file{example-glossaries-xr.bib}{\nopreamble\nopostamble\from{glossaries-extra.dtx}{example-glossaries-xr.bib}} +\file{glossaries-extra-2021-11-22.sty}{\usepreamble\defaultpreamble +\usepostamble\defaultpostamble\from{glossaries-extra.dtx}{glossaries-extra-2021-11-22.sty,package}} +\file{glossaries-extra-bib2gls-2021-11-22.sty}{\usepreamble\defaultpreamble +\usepostamble\defaultpostamble\from{glossaries-extra.dtx}{glossaries-extra-bib2gls-2021-11-22.sty,package}} +\file{glossaries-extra-stylemods-2021-11-22.sty}{\usepreamble\defaultpreamble +\usepostamble\defaultpostamble\from{glossaries-extra.dtx}{glossaries-extra-stylemods-2021-11-22.sty,package}} +\file{glossary-bookindex-2021-11-22.sty}{\usepreamble\defaultpreamble +\usepostamble\defaultpostamble\from{glossaries-extra.dtx}{glossary-bookindex-2021-11-22.sty,package}} +\file{glossary-longextra-2021-11-22.sty}{\usepreamble\defaultpreamble +\usepostamble\defaultpostamble\from{glossaries-extra.dtx}{glossary-longextra-2021-11-22.sty,package}} +\file{glossary-topic-2021-11-22.sty}{\usepreamble\defaultpreamble +\usepostamble\defaultpostamble\from{glossaries-extra.dtx}{glossary-topic-2021-11-22.sty,package}} } \endbatchfile diff --git a/macros/latex/contrib/glossaries-extra/samples/sample-abbr-styles.pdf b/macros/latex/contrib/glossaries-extra/samples/sample-abbr-styles.pdf index 97fe60bfc7..ddad18e49a 100644 Binary files a/macros/latex/contrib/glossaries-extra/samples/sample-abbr-styles.pdf and b/macros/latex/contrib/glossaries-extra/samples/sample-abbr-styles.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/samples/sample-abbr-styles.tex b/macros/latex/contrib/glossaries-extra/samples/sample-abbr-styles.tex index a5caad77b6..d5625142a1 100644 --- a/macros/latex/contrib/glossaries-extra/samples/sample-abbr-styles.tex +++ b/macros/latex/contrib/glossaries-extra/samples/sample-abbr-styles.tex @@ -5,12 +5,18 @@ \documentclass{report} +\usepackage[left=1cm,right=0.5cm,marginpar=2.5cm,includemp]{geometry} \usepackage[T1]{fontenc} \usepackage{relsize} +\usepackage{fontawesome} \usepackage{etoolbox} +\usepackage{xcolor} +\usepackage{soul} \usepackage[colorlinks,linkcolor=magenta]{hyperref} \usepackage{glossaries-extra} +\newcommand*{\warningsym}{\textcolor{red}{\faExclamationTriangle}} + % If you get any undefined control sequences or undefined % style errors, make sure you have the latest versions of % glossaries-extra.sty and glossaries.sty @@ -33,6 +39,9 @@ % for styles that don't have a designated command: %\renewcommand{\glsfirstlongdefaultfont}[1]{\textsf{#1}} +% Test command for "outer" formatting (applied with textformat key) +\newcommand*{\sampleformat}[1]{\textbf{\color{teal}#1}} + % These commands are used by the '-hyphen' styles. % For example, to switch to small-caps for the short form: %\renewcommand{\glsabbrvhyphenfont}{\glsabbrvscfont} @@ -44,16 +53,16 @@ \footnote{\glshyperlink[\glsfmtshort{#1}]{#1}: #2}% } -\glssetcategoryattribute{long-hyphen-short-hyphen}{markwords}{true} -\glssetcategoryattribute{long-hyphen-postshort-hyphen}{markwords}{true} -\glssetcategoryattribute{long-hyphen-short-hyphen-desc}{markwords}{true} -\glssetcategoryattribute{long-hyphen-postshort-hyphen-desc}{markwords}{true} -\glssetcategoryattribute{short-hyphen-long-hyphen}{markwords}{true} -\glssetcategoryattribute{short-hyphen-postlong-hyphen}{markwords}{true} -\glssetcategoryattribute{short-hyphen-long-hyphen-desc}{markwords}{true} -\glssetcategoryattribute{short-hyphen-postlong-hyphen-desc}{markwords}{true} -\glssetcategoryattribute{long-hyphen-noshort-desc-noreg}{markwords}{true} -\glssetcategoryattribute{long-hyphen-noshort-noreg}{markwords}{true} +\glssetcategoryattributes{long-hyphen-short-hyphen}{markwords,markshortwords}{true} +\glssetcategoryattributes{long-hyphen-postshort-hyphen}{markwords,markshortwords}{true} +\glssetcategoryattributes{long-hyphen-short-hyphen-desc}{markwords,markshortwords}{true} +\glssetcategoryattributes{long-hyphen-postshort-hyphen-desc}{markwords,markshortwords}{true} +\glssetcategoryattributes{short-hyphen-long-hyphen}{markwords,markshortwords}{true} +\glssetcategoryattributes{short-hyphen-postlong-hyphen}{markwords,markshortwords}{true} +\glssetcategoryattributes{short-hyphen-long-hyphen-desc}{markwords,markshortwords}{true} +\glssetcategoryattributes{short-hyphen-postlong-hyphen-desc}{markwords,markshortwords}{true} +\glssetcategoryattributes{long-hyphen-noshort-desc-noreg}{markwords,markshortwords}{true} +\glssetcategoryattributes{long-hyphen-noshort-noreg}{markwords,markshortwords}{true} \newcommand{\stylelist}{} @@ -63,7 +72,7 @@ \newabbreviation[category=#1,% %sort={#1},% order by style name user1={user text}% - ]{sample-#1}{short}{long form}% + ]{sample-#1}{short fm}{long form}% \csdef{glsxtrpostdesc#1}{ [style: #1]}% } @@ -73,7 +82,7 @@ \newabbreviation[category=#1,% %sort={#1},% order by style name user1={user text},% - description={sample description}]{sample-#1}{short}{long form}% + description={sample description}]{sample-#1}{short fm}{long form}% \csdef{glsxtrpostdesc#1}{ [style: #1]}% } @@ -215,6 +224,33 @@ change the font). To make the default setting clearer, this document has done: So any text in this document that's rendered in sans-serif would normally not have any font change implemented. +There are additional font changing tests implemented with outer text formatting +(the textformat key) and inner text formatting (the innertextformat key). + +The hyperlink may be placed outside the outer formatting (hyperoutside=true) or +inside of the outer formatting (hyperoutside=false). Note that when the +hyperlink is outside, the text colour change applied by the sample formatting +command (teal) overrides the colour change applied by the hyperlink colour +setting (magenta). The outer text format can also be changed globally +by redefining \verb|\glstextformat| or via the \verb|textformat| attribute. +(Order of precedence: textformat option, textformat attribute, +\verb|\glstextformat|.) + +The inner formatting is implemented within the abbreviation style, so it won't +show up in custom styles that don't implement it. The outer formatting isn't +applied to the post-link hook. The inner formatting may be applied to the +post-link hook, depending whether or not it's supported by the abbreviation +style. + +The outer text format is tested with the custom command defined as: +\begin{verbatim} +\newcommand*{\sampleformat}[1]{\textbf{\color{teal}#1}} +\end{verbatim} +The inner text format is tested with \verb|\hl| provided by soul.sty. +(Complex commands such as those provided by soul can only be used +in the inner text format. The outer format has the text content too +deeply embedded for those commands to process.) + Each test entry is defined using \begin{verbatim} \newabbreviation[category=#1,user1={user text}]% @@ -250,6 +286,13 @@ The test entries that use the \texttt{-hyphen} styles have had the compound word hyphenation if the inserted text (through the final optional argument of \verb|\gls|) starts with a hyphen. +\raisebox{2ex}{\hypertarget{warningnote}{}}% +\renewcommand*{\GlossariesAbbrStyleTooComplexWarning}[2]{% + \warningsym\marginpar{\hyperlink{warningnote}{\warningsym} too complex}}% +The symbol \warningsym\ indicates that a warning would normally be +issued at that point in the document for a style that's too complex +to support the given command. + \tableofcontents \pagenumbering{arabic} @@ -259,12 +302,45 @@ First use of \verb|\gls|. \forglsentries{\thislabel}{\glscategory{\thislabel}: \gls{\thislabel}.\glspar} +\section{textformat=sampleformat, hyperoutside=true} + +\glsresetall +\forglsentries{\thislabel}{\glscategory{\thislabel}: +\gls[textformat=sampleformat,hyperoutside=true]{\thislabel}.\glspar} + +\section{textformat=sampleformat, hyperoutside=false} + +\glsresetall +\forglsentries{\thislabel}{\glscategory{\thislabel}: +\gls[textformat=sampleformat,hyperoutside=false]{\thislabel}.\glspar} + +\section{innertextformat=hl} + +\glsresetall +\forglsentries{\thislabel}{\glscategory{\thislabel}: +\gls[innertextformat=hl]{\thislabel}.\glspar} + \chapter{Next Use} Next use of \verb|\gls|. \forglsentries{\thislabel}{\glscategory{\thislabel}: \gls{\thislabel}.\glspar} +\section{textformat=sampleformat, hyperoutside=true} + +\forglsentries{\thislabel}{\glscategory{\thislabel}: +\gls[textformat=sampleformat,hyperoutside=true]{\thislabel}.\glspar} + +\section{textformat=sampleformat, hyperoutside=false} + +\forglsentries{\thislabel}{\glscategory{\thislabel}: +\gls[textformat=sampleformat,hyperoutside=false]{\thislabel}.\glspar} + +\section{innertextformat=hl} + +\forglsentries{\thislabel}{\glscategory{\thislabel}: +\gls[innertextformat=hl]{\thislabel}.\glspar} + \chapter{First Use With Insert} First use of \texttt{\string\gls\marg{label}[-insert]}. The conditional \verb|\ifglsxtrinsertinside| is used by some styles to @@ -299,6 +375,32 @@ differences more noticeable this document has done: \glsreset{\thislabel}\glsxtrinsertinsidetrue \gls{\thislabel}[-insert].\glspar} +\section{textformat=sampleformat, hyperoutside=true} + +\forglsentries{\thislabel}{\glscategory{\thislabel}: +\glsreset{\thislabel}\glsxtrinsertinsidefalse +\gls[textformat=sampleformat,hyperoutside=true]{\thislabel}[-insert]; +\glsreset{\thislabel}\glsxtrinsertinsidetrue +\gls[textformat=sampleformat,hyperoutside=true]{\thislabel}[-insert].\glspar} + +\section{textformat=sampleformat, hyperoutside=false} + +\forglsentries{\thislabel}{\glscategory{\thislabel}: +\glsreset{\thislabel}\glsxtrinsertinsidefalse +\gls[textformat=sampleformat,hyperoutside=false]{\thislabel}[-insert]; +\glsreset{\thislabel}\glsxtrinsertinsidetrue +\gls[textformat=sampleformat,hyperoutside=false]{\thislabel}[-insert].\glspar} + + +\section{innertextformat=hl} + +\forglsentries{\thislabel}{\glscategory{\thislabel}: +\glsreset{\thislabel}\glsxtrinsertinsidefalse +\gls[innertextformat=hl]{\thislabel}[-insert]; +\glsreset{\thislabel}\glsxtrinsertinsidetrue +\gls[innertextformat=hl]{\thislabel}[-insert].\glspar} + + \chapter{Next Use With Insert} Next use of \texttt{\string\gls\marg{label}[-insert]}. @@ -314,6 +416,30 @@ conditional. \glsxtrinsertinsidetrue \gls{\thislabel}[-insert].\glspar} +\section{textformat=sampleformat, hyperoutside=true} + +\forglsentries{\thislabel}{\glscategory{\thislabel}: +\glsxtrinsertinsidefalse +\gls[textformat=sampleformat,hyperoutside=true]{\thislabel}[-insert]; +\glsxtrinsertinsidetrue +\gls[textformat=sampleformat,hyperoutside=true]{\thislabel}[-insert].\glspar} + +\section{textformat=sampleformat, hyperoutside=false} + +\forglsentries{\thislabel}{\glscategory{\thislabel}: +\glsxtrinsertinsidefalse +\gls[textformat=sampleformat,hyperoutside=false]{\thislabel}[-insert]; +\glsxtrinsertinsidetrue +\gls[textformat=sampleformat,hyperoutside=false]{\thislabel}[-insert].\glspar} + +\section{innertextformat=hl} + +\forglsentries{\thislabel}{\glscategory{\thislabel}: +\glsxtrinsertinsidefalse +\gls[innertextformat=hl]{\thislabel}[-insert]; +\glsxtrinsertinsidetrue +\gls[innertextformat=hl]{\thislabel}[-insert].\glspar} + \chapter{Full Form} Full form using \verb|\glsxtrfull| (inline full style). This may differ from the display form used by \verb|\gls| @@ -322,6 +448,21 @@ on first use, depending on the style. \forglsentries{\thislabel}{\glscategory{\thislabel}: \glsxtrfull{\thislabel}.\glspar} +\section{textformat=sampleformat, hyperoutside=true} + +\forglsentries{\thislabel}{\glscategory{\thislabel}: +\glsxtrfull[textformat=sampleformat,hyperoutside=true]{\thislabel}.\glspar} + +\section{textformat=sampleformat, hyperoutside=false} + +\forglsentries{\thislabel}{\glscategory{\thislabel}: +\glsxtrfull[textformat=sampleformat,hyperoutside=false]{\thislabel}.\glspar} + +\section{innertextformat=hl} + +\forglsentries{\thislabel}{\glscategory{\thislabel}: +\glsxtrfull[innertextformat=hl]{\thislabel}.\glspar} + \chapter{Short Form} Short form using \verb|\glsxtrshort|. This may differ from the display form used by \verb|\gls| @@ -331,12 +472,46 @@ on subsequent use, depending on the style. \glsxtrshort{\thislabel}.\glspar } +\section{textformat=sampleformat, hyperoutside=true} + +\forglsentries{\thislabel}{\glscategory{\thislabel}: +\glsxtrshort[textformat=sampleformat,hyperoutside=true]{\thislabel}.\glspar +} + +\section{textformat=sampleformat, hyperoutside=false} + +\forglsentries{\thislabel}{\glscategory{\thislabel}: +\glsxtrshort[textformat=sampleformat,hyperoutside=false]{\thislabel}.\glspar +} + +\section{innertextformat=hl} + +\forglsentries{\thislabel}{\glscategory{\thislabel}: +\glsxtrshort[innertextformat=hl]{\thislabel}.\glspar +} + + \chapter{Long Form} Long form using \verb|\glsxtrlong|. \forglsentries{\thislabel}{\glscategory{\thislabel}: \glsxtrlong{\thislabel}.\glspar} +\section{textformat=sampleformat, hyperoutside=true} + +\forglsentries{\thislabel}{\glscategory{\thislabel}: +\glsxtrlong[textformat=sampleformat,hyperoutside=true]{\thislabel}.\glspar} + +\section{textformat=sampleformat, hyperoutside=false} + +\forglsentries{\thislabel}{\glscategory{\thislabel}: +\glsxtrlong[textformat=sampleformat,hyperoutside=false]{\thislabel}.\glspar} + +\section{innertextformat=hl} + +\forglsentries{\thislabel}{\glscategory{\thislabel}: +\glsxtrlong[innertextformat=detokenize]{\thislabel}.\glspar} + \chapter{Full Form With Insert} Full form using \texttt{\string\glsxtrfull\marg{label}[-insert]} (inline full style). In this test chapter, each entry is displayed @@ -350,6 +525,30 @@ with \verb|\glsxtrinsertinsidefalse| and then displayed with \glsxtrinsertinsidetrue \glsxtrfull{\thislabel}[-insert].\glspar} +\section{textformat=sampleformat, hyperoutside=true} + +\forglsentries{\thislabel}{\glscategory{\thislabel}: +\glsxtrinsertinsidefalse +\glsxtrfull[textformat=sampleformat,hyperoutside=true]{\thislabel}[-insert]; +\glsxtrinsertinsidetrue +\glsxtrfull[textformat=sampleformat,hyperoutside=true]{\thislabel}[-insert].\glspar} + +\section{textformat=sampleformat, hyperoutside=false} + +\forglsentries{\thislabel}{\glscategory{\thislabel}: +\glsxtrinsertinsidefalse +\glsxtrfull[textformat=sampleformat,hyperoutside=false]{\thislabel}[-insert]; +\glsxtrinsertinsidetrue +\glsxtrfull[textformat=sampleformat,hyperoutside=false]{\thislabel}[-insert].\glspar} + +\section{innertextformat=hl} + +\forglsentries{\thislabel}{\glscategory{\thislabel}: +\glsxtrinsertinsidefalse +\glsxtrfull[innertextformat=hl]{\thislabel}[-insert]; +\glsxtrinsertinsidetrue +\glsxtrfull[innertextformat=hl]{\thislabel}[-insert].\glspar} + \chapter{Short Form With Insert} Short form using \texttt{\string\glsxtrshort\marg{label}[-insert]}. @@ -364,6 +563,30 @@ with \verb|\glsxtrinsertinsidefalse| and then displayed with \glsxtrinsertinsidetrue \glsxtrshort{\thislabel}[-insert].\glspar} +\section{textformat=sampleformat, hyperoutside=true} + +\forglsentries{\thislabel}{\glscategory{\thislabel}: +\glsxtrinsertinsidefalse +\glsxtrshort[textformat=sampleformat,hyperoutside=true]{\thislabel}[-insert]; +\glsxtrinsertinsidetrue +\glsxtrshort[textformat=sampleformat,hyperoutside=true]{\thislabel}[-insert].\glspar} + +\section{textformat=sampleformat, hyperoutside=false} + +\forglsentries{\thislabel}{\glscategory{\thislabel}: +\glsxtrinsertinsidefalse +\glsxtrshort[textformat=sampleformat,hyperoutside=false]{\thislabel}[-insert]; +\glsxtrinsertinsidetrue +\glsxtrshort[textformat=sampleformat,hyperoutside=false]{\thislabel}[-insert].\glspar} + +\section{innertextformat=hl} + +\forglsentries{\thislabel}{\glscategory{\thislabel}: +\glsxtrinsertinsidefalse +\glsxtrshort[innertextformat=hl]{\thislabel}[-insert]; +\glsxtrinsertinsidetrue +\glsxtrshort[innertextformat=hl]{\thislabel}[-insert].\glspar} + \chapter{Long Form With Insert} Long form using \texttt{\string\glsxtrlong\marg{label}[-insert]}. Note that the \texttt{hyphen} styles with the \texttt{markwords} @@ -380,20 +603,82 @@ with \verb|\glsxtrinsertinsidefalse| and then displayed with \glsxtrinsertinsidetrue \glsxtrlong{\thislabel}[-insert].\glspar} +\section{textformat=sampleformat, hyperoutside=true} + +\forglsentries{\thislabel}{\glscategory{\thislabel}: +\glsxtrinsertinsidefalse +\glsxtrlong[textformat=sampleformat,hyperoutside=true]{\thislabel}[-insert]; +\glsxtrinsertinsidetrue +\glsxtrlong[textformat=sampleformat,hyperoutside=true]{\thislabel}[-insert].\glspar} + +\section{textformat=sampleformat, hyperoutside=false} + +\forglsentries{\thislabel}{\glscategory{\thislabel}: +\glsxtrinsertinsidefalse +\glsxtrlong[textformat=sampleformat,hyperoutside=false]{\thislabel}[-insert]; +\glsxtrinsertinsidetrue +\glsxtrlong[textformat=sampleformat,hyperoutside=false]{\thislabel}[-insert].\glspar} + +\section{innertextformat=hl} + +\forglsentries{\thislabel}{\glscategory{\thislabel}: +\glsxtrinsertinsidefalse +\glsxtrlong[innertextformat=hl]{\thislabel}[-insert]; +\glsxtrinsertinsidetrue +\glsxtrlong[innertextformat=hl]{\thislabel}[-insert].\glspar} +\glsxtrinsertinsidefalse + \chapter{First Form} First form using \verb|\glsfirst|. This may be different from the first use of \verb|\gls| depending on the style. +In general, it's better not to use \verb|\glsfirst| with +abbreviations. Use \verb|\gls| (possibly with a reset) +or \verb|\glsxtrfull| instead. +Some styles are too complicated to work with \verb|\glsfirst|. \forglsentries{\thislabel}{\glscategory{\thislabel}: \glsfirst{\thislabel}.\glspar} +\section{textformat=sampleformat, hyperoutside=true} + +\forglsentries{\thislabel}{\glscategory{\thislabel}: +\glsfirst[textformat=sampleformat,hyperoutside=true]{\thislabel}.\glspar} + +\section{textformat=sampleformat, hyperoutside=false} + +\forglsentries{\thislabel}{\glscategory{\thislabel}: +\glsfirst[textformat=sampleformat,hyperoutside=false]{\thislabel}.\glspar} + +\section{innertextformat=hl} + +\forglsentries{\thislabel}{\glscategory{\thislabel}: +\glsfirst[innertextformat=hl]{\thislabel}.\glspar} + \chapter{Text Form} Text form using \verb|\glstext|. This may be different from the subsequent use of \verb|\gls| depending on the style. +In general, it's better not to use \verb|\glstext| with +abbreviations. Use \verb|\gls| (possibly with an unset) +or \verb|\glsxtrshort| instead. \forglsentries{\thislabel}{\glscategory{\thislabel}: \glstext{\thislabel}.\glspar} +\section{textformat=sampleformat, hyperoutside=true} + +\forglsentries{\thislabel}{\glscategory{\thislabel}: +\glstext[textformat=sampleformat, hyperoutside=true]{\thislabel}.\glspar} + +\section{textformat=sampleformat, hyperoutside=false} + +\forglsentries{\thislabel}{\glscategory{\thislabel}: +\glstext[textformat=sampleformat, hyperoutside=false]{\thislabel}.\glspar} + +\section{innertextformat=hl} + +\forglsentries{\thislabel}{\glscategory{\thislabel}: +\glstext[innertextformat=hl]{\thislabel}.\glspar} + \chapter{First Form With Insert} First form using \texttt{\string\glsfirst\marg{label}[-insert]}. This is different from the first use of \verb|\gls| @@ -406,30 +691,152 @@ to use \verb|\glsfirst| with abbreviations. Use either \forglsentries{\thislabel}{\glscategory{\thislabel}: \glsfirst{\thislabel}[-insert].\glspar} +\section{textformat=sampleformat, hyperoutside=true} + +\forglsentries{\thislabel}{\glscategory{\thislabel}: +\glsfirst[textformat=sampleformat,hyperoutside=true]{\thislabel}[-insert].\glspar} + +\section{textformat=sampleformat, hyperoutside=false} + +\forglsentries{\thislabel}{\glscategory{\thislabel}: +\glsfirst[textformat=sampleformat,hyperoutside=false]{\thislabel}[-insert].\glspar} + +\section{innertextformat=hl} + +\forglsentries{\thislabel}{\glscategory{\thislabel}: +\glsfirst[innertextformat=hl]{\thislabel}[-insert].\glspar} + \chapter{Text Form With Insert} Text form using \texttt{\string\glstext\marg{label}[-insert]}. This doesn't check for the conditional \verb|\ifglsxtrinsertinside|. +In general, it's better not to use \verb|\glstext| with +abbreviations. Use \verb|\gls| (possibly with an unset) +or \verb|\glsxtrshort| instead. \forglsentries{\thislabel}{\glscategory{\thislabel}: \glstext{\thislabel}[-insert].\glspar} +\section{textformat=sampleformat, hyperoutside=true} + +\forglsentries{\thislabel}{\glscategory{\thislabel}: +\glstext[textformat=sampleformat,hyperoutside=true]{\thislabel}[-insert].\glspar} + +\section{textformat=sampleformat, hyperoutside=false} + +\forglsentries{\thislabel}{\glscategory{\thislabel}: +\glstext[textformat=sampleformat,hyperoutside=false]{\thislabel}[-insert].\glspar} + +\section{innertextformat=hl} + +\forglsentries{\thislabel}{\glscategory{\thislabel}: +\glstext[innertextformat=hl]{\thislabel}[-insert].\glspar} + \chapter{Summary} \renewcommand{\do}[1]{\section{#1} -First use \texttt{\string\gls\marg{label}}: -\glsreset{sample-#1}\gls{sample-#1}.\par\noindent -Next use \texttt{\string\gls\marg{label}}: \gls{sample-#1}.\par\noindent -First use \texttt{\string\gls\marg{label}[-insert]}: -\glsreset{sample-#1}\gls{sample-#1}[-insert].\par\noindent -Next use \texttt{\string\gls\marg{label}[-insert]}: -\gls{sample-#1}[-insert].\par\noindent -\texttt{\string\glsxtrfull\marg{label}[-insert]}: -\glsxtrfull{sample-#1}[-insert].\par\noindent -\texttt{\string\glsxtrshort\marg{label}[-insert]}: -\glsxtrshort{sample-#1}[-insert].\par\noindent -\texttt{\string\glsxtrlong\marg{label}[-insert]}: -\glsxtrlong{sample-#1}[-insert].\par\noindent +\subsection{First Use} +\texttt{\string\gls\marg{label}} / \texttt{\string\Gls\marg{label}} / +\texttt{\string\GLS\marg{label}}: +\gls[prereset]{sample-#1}; +\Gls[prereset]{sample-#1}; +\GLS[prereset]{sample-#1}.\par\noindent +With insert: +\gls[prereset]{sample-#1}[-insert]; +\Gls[prereset]{sample-#1}[-insert]; +\GLS[prereset]{sample-#1}[-insert].\par\noindent +Plural \texttt{\string\glspl\marg{label}} / \texttt{\string\Glspl\marg{label}} / +\texttt{\string\GLSpl\marg{label}}: +\glspl[prereset]{sample-#1}; +\Glspl[prereset]{sample-#1}; +\GLSpl[prereset]{sample-#1}.\par\noindent +With insert: +\glspl[prereset]{sample-#1}[-insert]; +\Glspl[prereset]{sample-#1}[-insert]; +\GLSpl[prereset]{sample-#1}[-insert]. +\subsection{Next Use} +\texttt{\string\gls\marg{label}} / \texttt{\string\Gls\marg{label}} / +\texttt{\string\GLS\marg{label}}: +\gls{sample-#1}; +\Gls{sample-#1}; +\GLS{sample-#1}.\par\noindent +With insert: +\gls{sample-#1}[-insert]; +\Gls{sample-#1}[-insert]; +\GLS{sample-#1}[-insert].\par\noindent +Plural \texttt{\string\glspl\marg{label}} / \texttt{\string\Glspl\marg{label}} / +\texttt{\string\GLSpl\marg{label}}: +\glspl{sample-#1}; +\Glspl{sample-#1}; +\GLSpl{sample-#1}.\par\noindent +With insert: +\glspl{sample-#1}[-insert]; +\Glspl{sample-#1}[-insert]; +\GLSpl{sample-#1}[-insert]. +\subsection{Full Inline} +\texttt{\string\glsxtrfull\marg{label}} / +\texttt{\string\Glsxtrfull\marg{label}} / +\texttt{\string\GLSxtrfull\marg{label}}: +\glsxtrfull{sample-#1}; +\Glsxtrfull{sample-#1}; +\GLSxtrfull{sample-#1}.\par\noindent +With insert: +\glsxtrfull{sample-#1}[-insert]; +\Glsxtrfull{sample-#1}[-insert]; +\GLSxtrfull{sample-#1}[-insert].\par\noindent +Plural \texttt{\string\glsxtrfullpl\marg{label}} / +\texttt{\string\Glsxtrfullpl\marg{label}} / +\texttt{\string\GLSxtrfullpl\marg{label}}: +\glsxtrfullpl{sample-#1}; +\Glsxtrfullpl{sample-#1}; +\GLSxtrfullpl{sample-#1}.\par\noindent +Plural with insert: +\glsxtrfullpl{sample-#1}[-insert]; +\Glsxtrfullpl{sample-#1}[-insert]; +\GLSxtrfullpl{sample-#1}[-insert]. +\subsection{Short} +\texttt{\string\glsxtrshort\marg{label}} / +\texttt{\string\Glsxtrshort\marg{label}} / +\texttt{\string\GLSxtrshort\marg{label}}: +\glsxtrshort{sample-#1}; +\Glsxtrshort{sample-#1}; +\GLSxtrshort{sample-#1}.\par\noindent +With insert: +\glsxtrshort{sample-#1}[-insert]; +\Glsxtrshort{sample-#1}[-insert]; +\GLSxtrshort{sample-#1}[-insert].\par\noindent +Plural \texttt{\string\glsxtrshortpl\marg{label}} / +\texttt{\string\Glsxtrshortpl\marg{label}} / +\texttt{\string\GLSxtrshortpl\marg{label}}: +\glsxtrshortpl{sample-#1}; +\Glsxtrshortpl{sample-#1}; +\GLSxtrshortpl{sample-#1}.\par\noindent +Plural with insert: +\glsxtrshortpl{sample-#1}[-insert]; +\Glsxtrshortpl{sample-#1}[-insert]; +\GLSxtrshortpl{sample-#1}[-insert]. +\subsection{Long} +\texttt{\string\glsxtrlong\marg{label}} / +\texttt{\string\Glsxtrlong\marg{label}} / +\texttt{\string\GLSxtrlong\marg{label}}: +\glsxtrlong{sample-#1}; +\Glsxtrlong{sample-#1}; +\GLSxtrlong{sample-#1}.\par\noindent +With insert: +\glsxtrlong{sample-#1}[-insert]; +\Glsxtrlong{sample-#1}[-insert]; +\GLSxtrlong{sample-#1}[-insert].\par\noindent +Plural \texttt{\string\glsxtrlongpl\marg{label}} / +\texttt{\string\Glsxtrlongpl\marg{label}} / +\texttt{\string\GLSxtrlongpl\marg{label}}: +\glsxtrlongpl{sample-#1}; +\Glsxtrlongpl{sample-#1}; +\GLSxtrlongpl{sample-#1}.\par\noindent +Plural with insert: +\glsxtrlongpl{sample-#1}[-insert]; +\Glsxtrlongpl{sample-#1}[-insert]; +\GLSxtrlongpl{sample-#1}[-insert]. +\subsection{Other} Name: \glsentryname{sample-#1}.\par\noindent Sort: \texttt{\glsentrysort{sample-#1}}.\par\noindent Description: \glsentrydesc{sample-#1}.\par diff --git a/macros/latex/contrib/glossaries-extra/samples/sample-abbrv.pdf b/macros/latex/contrib/glossaries-extra/samples/sample-abbrv.pdf index a697131366..b7bca980af 100644 Binary files a/macros/latex/contrib/glossaries-extra/samples/sample-abbrv.pdf and b/macros/latex/contrib/glossaries-extra/samples/sample-abbrv.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/samples/sample-accsupp.pdf b/macros/latex/contrib/glossaries-extra/samples/sample-accsupp.pdf index 37c57580b7..d8656327ed 100644 Binary files a/macros/latex/contrib/glossaries-extra/samples/sample-accsupp.pdf and b/macros/latex/contrib/glossaries-extra/samples/sample-accsupp.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/samples/sample-acronym-desc.pdf b/macros/latex/contrib/glossaries-extra/samples/sample-acronym-desc.pdf index 2cafcdcaee..6372605793 100644 Binary files a/macros/latex/contrib/glossaries-extra/samples/sample-acronym-desc.pdf and b/macros/latex/contrib/glossaries-extra/samples/sample-acronym-desc.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/samples/sample-acronym.pdf b/macros/latex/contrib/glossaries-extra/samples/sample-acronym.pdf index 76ba3b9aca..a29c48ba10 100644 Binary files a/macros/latex/contrib/glossaries-extra/samples/sample-acronym.pdf and b/macros/latex/contrib/glossaries-extra/samples/sample-acronym.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/samples/sample-alias.pdf b/macros/latex/contrib/glossaries-extra/samples/sample-alias.pdf index ba4b5841c5..e3dac89466 100644 Binary files a/macros/latex/contrib/glossaries-extra/samples/sample-alias.pdf and b/macros/latex/contrib/glossaries-extra/samples/sample-alias.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/samples/sample-altmodifier.pdf b/macros/latex/contrib/glossaries-extra/samples/sample-altmodifier.pdf index c9598650f1..20eeba5f36 100644 Binary files a/macros/latex/contrib/glossaries-extra/samples/sample-altmodifier.pdf and b/macros/latex/contrib/glossaries-extra/samples/sample-altmodifier.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/samples/sample-alttree-marginpar.pdf b/macros/latex/contrib/glossaries-extra/samples/sample-alttree-marginpar.pdf index deb3f958fb..32c0013a1e 100644 Binary files a/macros/latex/contrib/glossaries-extra/samples/sample-alttree-marginpar.pdf and b/macros/latex/contrib/glossaries-extra/samples/sample-alttree-marginpar.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/samples/sample-alttree-sym.pdf b/macros/latex/contrib/glossaries-extra/samples/sample-alttree-sym.pdf index ef8684f498..9630bb626b 100644 Binary files a/macros/latex/contrib/glossaries-extra/samples/sample-alttree-sym.pdf and b/macros/latex/contrib/glossaries-extra/samples/sample-alttree-sym.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/samples/sample-alttree.pdf b/macros/latex/contrib/glossaries-extra/samples/sample-alttree.pdf index 9f7d115c31..29d37e1c08 100644 Binary files a/macros/latex/contrib/glossaries-extra/samples/sample-alttree.pdf and b/macros/latex/contrib/glossaries-extra/samples/sample-alttree.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/samples/sample-autoindex-hyp.pdf b/macros/latex/contrib/glossaries-extra/samples/sample-autoindex-hyp.pdf index 19d8078f64..5081823433 100644 Binary files a/macros/latex/contrib/glossaries-extra/samples/sample-autoindex-hyp.pdf and b/macros/latex/contrib/glossaries-extra/samples/sample-autoindex-hyp.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/samples/sample-autoindex.pdf b/macros/latex/contrib/glossaries-extra/samples/sample-autoindex.pdf index ed9ebfa5d2..797e828c06 100644 Binary files a/macros/latex/contrib/glossaries-extra/samples/sample-autoindex.pdf and b/macros/latex/contrib/glossaries-extra/samples/sample-autoindex.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/samples/sample-crossref.pdf b/macros/latex/contrib/glossaries-extra/samples/sample-crossref.pdf index 98faf00379..be9532f557 100644 Binary files a/macros/latex/contrib/glossaries-extra/samples/sample-crossref.pdf and b/macros/latex/contrib/glossaries-extra/samples/sample-crossref.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/samples/sample-crossref2.pdf b/macros/latex/contrib/glossaries-extra/samples/sample-crossref2.pdf index 0a1a5faa7b..16b300a658 100644 Binary files a/macros/latex/contrib/glossaries-extra/samples/sample-crossref2.pdf and b/macros/latex/contrib/glossaries-extra/samples/sample-crossref2.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/samples/sample-docdef.pdf b/macros/latex/contrib/glossaries-extra/samples/sample-docdef.pdf index 8c71fa9125..14c4b7f66e 100644 Binary files a/macros/latex/contrib/glossaries-extra/samples/sample-docdef.pdf and b/macros/latex/contrib/glossaries-extra/samples/sample-docdef.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/samples/sample-entrycount.pdf b/macros/latex/contrib/glossaries-extra/samples/sample-entrycount.pdf index 616a236a55..5784acfd4c 100644 Binary files a/macros/latex/contrib/glossaries-extra/samples/sample-entrycount.pdf and b/macros/latex/contrib/glossaries-extra/samples/sample-entrycount.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/samples/sample-external.pdf b/macros/latex/contrib/glossaries-extra/samples/sample-external.pdf index 2e5a8b61c7..774a350d02 100644 Binary files a/macros/latex/contrib/glossaries-extra/samples/sample-external.pdf and b/macros/latex/contrib/glossaries-extra/samples/sample-external.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/samples/sample-fmt.pdf b/macros/latex/contrib/glossaries-extra/samples/sample-fmt.pdf index 4ab15d3039..c44cf52026 100644 Binary files a/macros/latex/contrib/glossaries-extra/samples/sample-fmt.pdf and b/macros/latex/contrib/glossaries-extra/samples/sample-fmt.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/samples/sample-footnote.pdf b/macros/latex/contrib/glossaries-extra/samples/sample-footnote.pdf index d9401ea0eb..0639914e7d 100644 Binary files a/macros/latex/contrib/glossaries-extra/samples/sample-footnote.pdf and b/macros/latex/contrib/glossaries-extra/samples/sample-footnote.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/samples/sample-header.pdf b/macros/latex/contrib/glossaries-extra/samples/sample-header.pdf index 7a64e7f8fb..d24e3ffecc 100644 Binary files a/macros/latex/contrib/glossaries-extra/samples/sample-header.pdf and b/macros/latex/contrib/glossaries-extra/samples/sample-header.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/samples/sample-indexhook.pdf b/macros/latex/contrib/glossaries-extra/samples/sample-indexhook.pdf index 3476f3ffb9..41fbbf4ae8 100644 Binary files a/macros/latex/contrib/glossaries-extra/samples/sample-indexhook.pdf and b/macros/latex/contrib/glossaries-extra/samples/sample-indexhook.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/samples/sample-initialisms.pdf b/macros/latex/contrib/glossaries-extra/samples/sample-initialisms.pdf index 30e91037ad..39268001b7 100644 Binary files a/macros/latex/contrib/glossaries-extra/samples/sample-initialisms.pdf and b/macros/latex/contrib/glossaries-extra/samples/sample-initialisms.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/samples/sample-initialisms.tex b/macros/latex/contrib/glossaries-extra/samples/sample-initialisms.tex index 39aa4e905f..0a5fc1839d 100644 --- a/macros/latex/contrib/glossaries-extra/samples/sample-initialisms.tex +++ b/macros/latex/contrib/glossaries-extra/samples/sample-initialisms.tex @@ -33,6 +33,8 @@ without dots \gls{html} and the end of the sentence. (Next use.) Abbreviations with dots \gls{eg} and \gls{si} and abbreviation without dots \gls{html} and the end of the sentence. +Singular: \gls{si} and at the end of a sentence \gls{si}. + Plural: \glspl{si} and at the end of a sentence \glspl{si}. Reset\glsresetall. First use end of sentence: diff --git a/macros/latex/contrib/glossaries-extra/samples/sample-linkcount.pdf b/macros/latex/contrib/glossaries-extra/samples/sample-linkcount.pdf index d504f07606..3191eba3dd 100644 Binary files a/macros/latex/contrib/glossaries-extra/samples/sample-linkcount.pdf and b/macros/latex/contrib/glossaries-extra/samples/sample-linkcount.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/samples/sample-mixed-abbrv-styles.pdf b/macros/latex/contrib/glossaries-extra/samples/sample-mixed-abbrv-styles.pdf index 36e35a0036..0e69ad76e3 100644 Binary files a/macros/latex/contrib/glossaries-extra/samples/sample-mixed-abbrv-styles.pdf and b/macros/latex/contrib/glossaries-extra/samples/sample-mixed-abbrv-styles.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/samples/sample-mixedsort.pdf b/macros/latex/contrib/glossaries-extra/samples/sample-mixedsort.pdf index 41496a03a1..49cf6cb9e2 100644 Binary files a/macros/latex/contrib/glossaries-extra/samples/sample-mixedsort.pdf and b/macros/latex/contrib/glossaries-extra/samples/sample-mixedsort.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/samples/sample-mixedsort.tex b/macros/latex/contrib/glossaries-extra/samples/sample-mixedsort.tex index a85c7c6b9b..945af5768f 100644 --- a/macros/latex/contrib/glossaries-extra/samples/sample-mixedsort.tex +++ b/macros/latex/contrib/glossaries-extra/samples/sample-mixedsort.tex @@ -1,3 +1,5 @@ +% arara: pdflatex +% arara: pdflatex \documentclass{article} \usepackage[symbols,automake]{glossaries-extra} diff --git a/macros/latex/contrib/glossaries-extra/samples/sample-mixture.pdf b/macros/latex/contrib/glossaries-extra/samples/sample-mixture.pdf index 197725e6b7..ccecdcca5a 100644 Binary files a/macros/latex/contrib/glossaries-extra/samples/sample-mixture.pdf and b/macros/latex/contrib/glossaries-extra/samples/sample-mixture.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/samples/sample-multientry.pdf b/macros/latex/contrib/glossaries-extra/samples/sample-multientry.pdf index e663cfb884..682e5a0238 100644 Binary files a/macros/latex/contrib/glossaries-extra/samples/sample-multientry.pdf and b/macros/latex/contrib/glossaries-extra/samples/sample-multientry.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/samples/sample-name-font.pdf b/macros/latex/contrib/glossaries-extra/samples/sample-name-font.pdf index d5f57c11b4..6853bbc904 100644 Binary files a/macros/latex/contrib/glossaries-extra/samples/sample-name-font.pdf and b/macros/latex/contrib/glossaries-extra/samples/sample-name-font.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/samples/sample-nested.pdf b/macros/latex/contrib/glossaries-extra/samples/sample-nested.pdf index 441421bf25..2daf0cca35 100644 Binary files a/macros/latex/contrib/glossaries-extra/samples/sample-nested.pdf and b/macros/latex/contrib/glossaries-extra/samples/sample-nested.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/samples/sample-nested.tex b/macros/latex/contrib/glossaries-extra/samples/sample-nested.tex index a7c32a6908..ec57247753 100644 --- a/macros/latex/contrib/glossaries-extra/samples/sample-nested.tex +++ b/macros/latex/contrib/glossaries-extra/samples/sample-nested.tex @@ -14,7 +14,8 @@ \newabbreviation{ssi}{ssi}{server side includes} \newabbreviation{html}{html}{hypertext markup language} -%DON'T use this with upper casing commands! +% If sentence-case is required for the following, ensure that you have glossaries +% v4.50+ and mfirstuc v2.08+ \newabbreviation{shtml}{shtml}{\gls{ssi} enabled \gls{html}} % Alternatively @@ -33,6 +34,11 @@ commands like \verb|\gls| or \verb|\glsxtrshort| that occur in fields, when any of those field is accessed through linking commands. +\section{\Glsxtrp{long}{html}} + +Make sure you have glossaries.sty v4.50+ and mfirstuc.sty v2.08+ for +improved sentence-casing. + First use: \gls{shtml}. \newpage diff --git a/macros/latex/contrib/glossaries-extra/samples/sample-noidx-restricteddocdefs.pdf b/macros/latex/contrib/glossaries-extra/samples/sample-noidx-restricteddocdefs.pdf index a05a97144d..2a55474962 100644 Binary files a/macros/latex/contrib/glossaries-extra/samples/sample-noidx-restricteddocdefs.pdf and b/macros/latex/contrib/glossaries-extra/samples/sample-noidx-restricteddocdefs.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/samples/sample-onelink.pdf b/macros/latex/contrib/glossaries-extra/samples/sample-onelink.pdf index a8aa2a5618..46e48d2d17 100644 Binary files a/macros/latex/contrib/glossaries-extra/samples/sample-onelink.pdf and b/macros/latex/contrib/glossaries-extra/samples/sample-onelink.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/samples/sample-onthefly-utf8.pdf b/macros/latex/contrib/glossaries-extra/samples/sample-onthefly-utf8.pdf index b68e416e5d..15e61019ed 100644 Binary files a/macros/latex/contrib/glossaries-extra/samples/sample-onthefly-utf8.pdf and b/macros/latex/contrib/glossaries-extra/samples/sample-onthefly-utf8.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/samples/sample-onthefly-xetex.pdf b/macros/latex/contrib/glossaries-extra/samples/sample-onthefly-xetex.pdf index 738c18e589..ab23b693c7 100644 Binary files a/macros/latex/contrib/glossaries-extra/samples/sample-onthefly-xetex.pdf and b/macros/latex/contrib/glossaries-extra/samples/sample-onthefly-xetex.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/samples/sample-onthefly.pdf b/macros/latex/contrib/glossaries-extra/samples/sample-onthefly.pdf index cca87ab41e..336b0154cd 100644 Binary files a/macros/latex/contrib/glossaries-extra/samples/sample-onthefly.pdf and b/macros/latex/contrib/glossaries-extra/samples/sample-onthefly.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/samples/sample-pages.pdf b/macros/latex/contrib/glossaries-extra/samples/sample-pages.pdf index bfae252c41..35db7aa14c 100644 Binary files a/macros/latex/contrib/glossaries-extra/samples/sample-pages.pdf and b/macros/latex/contrib/glossaries-extra/samples/sample-pages.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/samples/sample-postdot.pdf b/macros/latex/contrib/glossaries-extra/samples/sample-postdot.pdf index aa66c978da..977735ffae 100644 Binary files a/macros/latex/contrib/glossaries-extra/samples/sample-postdot.pdf and b/macros/latex/contrib/glossaries-extra/samples/sample-postdot.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/samples/sample-postlink.pdf b/macros/latex/contrib/glossaries-extra/samples/sample-postlink.pdf index 57d24e36f7..b12dcbd2d3 100644 Binary files a/macros/latex/contrib/glossaries-extra/samples/sample-postlink.pdf and b/macros/latex/contrib/glossaries-extra/samples/sample-postlink.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/samples/sample-prefix.pdf b/macros/latex/contrib/glossaries-extra/samples/sample-prefix.pdf index b5be861062..6e164e2c2f 100644 Binary files a/macros/latex/contrib/glossaries-extra/samples/sample-prefix.pdf and b/macros/latex/contrib/glossaries-extra/samples/sample-prefix.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/samples/sample-prefix.tex b/macros/latex/contrib/glossaries-extra/samples/sample-prefix.tex index 7fa2f325fb..fec5e92f54 100644 --- a/macros/latex/contrib/glossaries-extra/samples/sample-prefix.tex +++ b/macros/latex/contrib/glossaries-extra/samples/sample-prefix.tex @@ -3,8 +3,8 @@ % arara: pdflatex \documentclass{article} -\usepackage{glossaries-extra} -\usepackage{glossaries-prefix} +\usepackage[colorlinks]{hyperref} +\usepackage[prefix]{glossaries-extra} \makeglossaries @@ -14,6 +14,9 @@ {svm}{SVM}{support vector machine} \begin{document} +\tableofcontents + +\section{\Pglsfmtlong{svm}} This is a sample document to test prefixes. First use: \pgls{svm}. diff --git a/macros/latex/contrib/glossaries-extra/samples/sample-record-nameref.pdf b/macros/latex/contrib/glossaries-extra/samples/sample-record-nameref.pdf index 3ffa713436..9398d20f26 100644 Binary files a/macros/latex/contrib/glossaries-extra/samples/sample-record-nameref.pdf and b/macros/latex/contrib/glossaries-extra/samples/sample-record-nameref.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/samples/sample-record.pdf b/macros/latex/contrib/glossaries-extra/samples/sample-record.pdf index 8c3dc27480..831a6e3b42 100644 Binary files a/macros/latex/contrib/glossaries-extra/samples/sample-record.pdf and b/macros/latex/contrib/glossaries-extra/samples/sample-record.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/samples/sample-restricteddocdefs.pdf b/macros/latex/contrib/glossaries-extra/samples/sample-restricteddocdefs.pdf index 86e48ef5ac..29649c4c4a 100644 Binary files a/macros/latex/contrib/glossaries-extra/samples/sample-restricteddocdefs.pdf and b/macros/latex/contrib/glossaries-extra/samples/sample-restricteddocdefs.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/samples/sample-suppl-hyp.pdf b/macros/latex/contrib/glossaries-extra/samples/sample-suppl-hyp.pdf index afd19dd073..8d7f06953c 100644 Binary files a/macros/latex/contrib/glossaries-extra/samples/sample-suppl-hyp.pdf and b/macros/latex/contrib/glossaries-extra/samples/sample-suppl-hyp.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/samples/sample-suppl-main-hyp.pdf b/macros/latex/contrib/glossaries-extra/samples/sample-suppl-main-hyp.pdf index 077434a94a..0e16dd138a 100644 Binary files a/macros/latex/contrib/glossaries-extra/samples/sample-suppl-main-hyp.pdf and b/macros/latex/contrib/glossaries-extra/samples/sample-suppl-main-hyp.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/samples/sample-suppl-main.pdf b/macros/latex/contrib/glossaries-extra/samples/sample-suppl-main.pdf index df11469495..7d97db11f5 100644 Binary files a/macros/latex/contrib/glossaries-extra/samples/sample-suppl-main.pdf and b/macros/latex/contrib/glossaries-extra/samples/sample-suppl-main.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/samples/sample-suppl.pdf b/macros/latex/contrib/glossaries-extra/samples/sample-suppl.pdf index f33fc059dc..0b86aaa2ce 100644 Binary files a/macros/latex/contrib/glossaries-extra/samples/sample-suppl.pdf and b/macros/latex/contrib/glossaries-extra/samples/sample-suppl.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/samples/sample-trans.pdf b/macros/latex/contrib/glossaries-extra/samples/sample-trans.pdf index 0b58c5a146..33b037e5f6 100644 Binary files a/macros/latex/contrib/glossaries-extra/samples/sample-trans.pdf and b/macros/latex/contrib/glossaries-extra/samples/sample-trans.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/samples/sample-undef.pdf b/macros/latex/contrib/glossaries-extra/samples/sample-undef.pdf index 78f3a357b8..a5e2c7368a 100644 Binary files a/macros/latex/contrib/glossaries-extra/samples/sample-undef.pdf and b/macros/latex/contrib/glossaries-extra/samples/sample-undef.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/samples/sample-undef.tex b/macros/latex/contrib/glossaries-extra/samples/sample-undef.tex index 194f4a4bc8..b4ade872ca 100644 --- a/macros/latex/contrib/glossaries-extra/samples/sample-undef.tex +++ b/macros/latex/contrib/glossaries-extra/samples/sample-undef.tex @@ -15,6 +15,7 @@ Defined entry: \gls{sample}, \glslink{sample}{text}. +This paragraph will trigger a warning. Undefined entry: \gls{undefined}, \glslink{undefined}{text}. \printglossaries diff --git a/macros/latex/contrib/glossaries-extra/samples/sample-unitentrycount.pdf b/macros/latex/contrib/glossaries-extra/samples/sample-unitentrycount.pdf index e75a0fc4a7..47bfe1f3eb 100644 Binary files a/macros/latex/contrib/glossaries-extra/samples/sample-unitentrycount.pdf and b/macros/latex/contrib/glossaries-extra/samples/sample-unitentrycount.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/samples/sample-unitentrycount.tex b/macros/latex/contrib/glossaries-extra/samples/sample-unitentrycount.tex index 7979120c45..4b14bb25d8 100644 --- a/macros/latex/contrib/glossaries-extra/samples/sample-unitentrycount.tex +++ b/macros/latex/contrib/glossaries-extra/samples/sample-unitentrycount.tex @@ -1,4 +1,5 @@ % arara: pdflatex +% arara: pdflatex % arara: makeglossaries % arara: pdflatex \documentclass{report} diff --git a/macros/latex/contrib/glossaries-extra/samples/sample.pdf b/macros/latex/contrib/glossaries-extra/samples/sample.pdf index 80d03daa53..33b78ed6d1 100644 Binary files a/macros/latex/contrib/glossaries-extra/samples/sample.pdf and b/macros/latex/contrib/glossaries-extra/samples/sample.pdf differ diff --git a/macros/latex/contrib/glossaries-extra/samples/sample.tex b/macros/latex/contrib/glossaries-extra/samples/sample.tex index 42e2f4d677..7d8e38efeb 100644 --- a/macros/latex/contrib/glossaries-extra/samples/sample.tex +++ b/macros/latex/contrib/glossaries-extra/samples/sample.tex @@ -5,9 +5,7 @@ \documentclass{article} \usepackage[colorlinks]{hyperref} -\usepackage{glossaries-extra} -\usepackage{glossary-mcols} -\setglossarystyle{mcolindex} +\usepackage[stylemods=mcols,style=mcolindex]{glossaries-extra} \makeglossaries diff --git a/macros/latex/contrib/qrbill/README.md b/macros/latex/contrib/qrbill/README.md index d04340f782..8079883d18 100644 --- a/macros/latex/contrib/qrbill/README.md +++ b/macros/latex/contrib/qrbill/README.md @@ -4,7 +4,7 @@ Copyright (C) Marei Peischl (peiTeX) , 2020–2022 This work is part of a collaborative project of Marei Peischl (peiTeX) and Alex Antener (foobar LLC). -qrbill 2022/09/15 v1.05 +qrbill 2022/10/18 v1.06 *************************************************************************** @@ -65,12 +65,16 @@ For further information on l3build and other options please have a look at the c * v1.03 (2021-05-10) - Update to swiss qrbill payments standard v2.2 - Add seb-iban and sep-reference to the example files - * v1.04 (2022/07/02) + * v1.04 (2022-07-02) - add basic support for EPC QR codes - add date parsing mechanism to preset the dates to values of `\today` - * v1.05 (2022/09/15) + * v1.05 (2022-09-15) - add option to convert all data to strings - add mechanism to do custom replacements within the data - fix qrcode encoding to support UTF-8 - add support for speedata's luaqrcode library for qrcode generation http://speedata.github.io/luaqrcode/ - - small layout and documentation fixes \ No newline at end of file + - small layout and documentation fixes + * v1.06 (2022-10-18) + - additional customization for vrule + - add possibilities to ignore data fields if empty + - allow the usage of commas within the billing info \ No newline at end of file diff --git a/macros/latex/contrib/qrbill/qrbill.dtx b/macros/latex/contrib/qrbill/qrbill.dtx index aa632a6845..fab4a79821 100644 --- a/macros/latex/contrib/qrbill/qrbill.dtx +++ b/macros/latex/contrib/qrbill/qrbill.dtx @@ -54,7 +54,7 @@ % \fi % \iffalse %<*driver> -\ProvidesFile{qrbill.dtx}[2022/09/15 v1.05 \ create QR-bills based on the Swiss standard] +\ProvidesFile{qrbill.dtx}[2022/10/18 v1.06 \ create QR-bills based on the Swiss standard] \documentclass[english, parskip=half-]{scrartcl} \usepackage{iftex} \ifPDFTeX @@ -86,9 +86,9 @@ \newcommand*\repl[1]{\meta{#1}} \newcommand*\opt[1]{\colorbox{black!20}{\meta{#1}}} \newcommand*\marg[1]{% - {\ttfamily\char`\{}\repl{#1}{\ttfamily\char`\}}} + {\ttfamily\char`\{}\repl{#1}{\ttfamily\char`\}}} \newcommand*\oarg[1]{% - {\ttfamily[}\opt{#1}{\ttfamily]} + {\ttfamily[}\opt{#1}{\ttfamily]} } \newcommand*{\sarg}{\texttt{*}} @@ -174,7 +174,7 @@ % \GetFileInfo{qrbill.dtx} % % \DoNotIndex{\newcommand,\newenvironment} -% \title{qrbill v1.03} +% \title{qrbill \fileversion} % \subtitle{\LaTeX-package to create QR-bills based on the Swiss payments standards} % \author{Marei Peischl \href{mailto:marei@peitex.de}{}} % \publishers{A collaborative project of pei\TeX{} and foobar LLC} @@ -192,16 +192,16 @@ % \fi % \section{Example of use} % The easies way to use the qrbill package is to create a bill with the standalone documentclass: -% +% % \begin{doccode} % \documentclass{standalone} % \usepackage[ngerman]{babel} -% +% % \usepackage{xcolor} % \usepackage{qrbill} -% +% % \begin{document} -% +% % \QRbill[ % creditor={foobar LLC\\ % Postfach 404\\ @@ -210,7 +210,7 @@ % Account=CH1280808005649899718, % % insert additional data here % ] -% +% % \end{document} % \end{doccode} % @@ -278,6 +278,11 @@ % \item[iconwidth (length) (7mm)] % This option allows custom scaling for custom icons. % +% \item[ignore-if-empty (comma list) ()] +% Allows to define a list of fields for the qrscheme to be ignored if they have empty values. +% For the swiss QRbill standard this is recommended for the fields \enquote{AV1-Parameters}, \enquote{AV2-Parameters} and \enquote{BillingInfo}. +% \changes{v1.06}{2022/10/18}{Add ignore-if-empty option} +% % \item[qrmode (package/lua) (package)] Selects the mechanism for QRcode generation. % With Version 2.0 the package supports usage of the the luaqrcode library \cite{luaqrcode}. This can be enabled by using the \latexinline{qmode=lua} option. % In that case the luaqrcode libary has to be installed within the \verb+$LUAINPUTS+. @@ -319,7 +324,11 @@ % Similarly the replace-umlauts options is mapping Umlauts to the two character representation. This can be used if UTF-8 is not supported. % Custom replacements can be set up using \latexinline{\QRbillAddCustomReplacement} as described in section \ref{sec:custom-replacement}. % \changes{v1.05}{2022/09/15}{Add replace-tilde/replace-umlauts options} -% +% +% \item[vrule (true/false/symbol) (true)] +% Allows customization of the vertical rule between payment part and receipt. The value \latexinline{vrule=symbol} acts similar to the \latexinline{separator=symbol} option. +% \changes{v1.06}{2022/10/18}{Add vrule=symbol option.} +% % \end{optionlist} % % \section{Data setup} @@ -505,7 +514,7 @@ % \section{Implementation} % \begin{macrocode} \RequirePackage{expl3} -\ProvidesExplPackage{qrbill}{2022/09/15}{1.05}{ +\ProvidesExplPackage{qrbill}{2022/10/18}{1.06}{ Template for QR-bills based on the Swiss Payment Standards } \RequirePackage{iftex} @@ -529,7 +538,7 @@ \keys_define:nn {qrbill} { font .choices:nn = {Frutiger, Arial, Helvetica, Liberation Sans} { - \tl_gset_eq:NN \g__qrbill_font_tl \l_keys_choice_tl + \tl_gset_eq:NN \g__qrbill_font_tl \l_keys_choice_tl }, font .initial:n = Liberation Sans, font / custom .code:n = {\tl_gclear:N \g__qrbill_font_tl}, @@ -545,42 +554,54 @@ qrmode .initial:n = package, frame .choice:, frame / false .code:n = { - \bool_gset_false:N \g__qrbill_top_frame_bool - \bool_gset_false:N \g__qrbill_bottom_frame_bool - \bool_gset_false:N \g__qrbill_left_frame_bool - \bool_gset_false:N \g__qrbill_right_frame_bool - \bool_gset_true:N \g__qrbill_vrule_bool + \bool_gset_false:N \g__qrbill_top_frame_bool + \bool_gset_false:N \g__qrbill_bottom_frame_bool + \bool_gset_false:N \g__qrbill_left_frame_bool + \bool_gset_false:N \g__qrbill_right_frame_bool }, frame / true .code:n = { - \bool_gset_true:N \g__qrbill_top_frame_bool - \bool_gset_true:N \g__qrbill_bottom_frame_bool - \bool_gset_true:N \g__qrbill_left_frame_bool - \bool_gset_true:N \g__qrbill_right_frame_bool - \bool_gset_true:N \g__qrbill_vrule_bool + \bool_gset_true:N \g__qrbill_top_frame_bool + \bool_gset_true:N \g__qrbill_bottom_frame_bool + \bool_gset_true:N \g__qrbill_left_frame_bool + \bool_gset_true:N \g__qrbill_right_frame_bool }, frame / top .code:n = { - \bool_gset_true:N \g__qrbill_top_frame_bool - \bool_gset_false:N \g__qrbill_bottom_frame_bool - \bool_gset_false:N \g__qrbill_left_frame_bool - \bool_gset_false:N \g__qrbill_right_frame_bool - \bool_gset_true:N \g__qrbill_vrule_bool + \bool_gset_true:N \g__qrbill_top_frame_bool + \bool_gset_false:N \g__qrbill_bottom_frame_bool + \bool_gset_false:N \g__qrbill_left_frame_bool + \bool_gset_false:N \g__qrbill_right_frame_bool }, frame / bottom .code:n = { - \bool_gset_false:N \g__qrbill_top_frame_bool - \bool_gset_true:N \g__qrbill_bottom_frame_bool - \bool_gset_false:N \g__qrbill_left_frame_bool - \bool_gset_false:N \g__qrbill_right_frame_bool - \bool_gset_true:N \g__qrbill_vrule_bool + \bool_gset_false:N \g__qrbill_top_frame_bool + \bool_gset_true:N \g__qrbill_bottom_frame_bool + \bool_gset_false:N \g__qrbill_left_frame_bool + \bool_gset_false:N \g__qrbill_right_frame_bool }, frame / none .code:n = { - \bool_gset_false:N \g__qrbill_top_frame_bool - \bool_gset_false:N \g__qrbill_bottom_frame_bool - \bool_gset_false:N \g__qrbill_left_frame_bool - \bool_gset_false:N \g__qrbill_right_frame_bool - \bool_gset_false:N \g__qrbill_vrule_bool + \bool_gset_false:N \g__qrbill_top_frame_bool + \bool_gset_false:N \g__qrbill_bottom_frame_bool + \bool_gset_false:N \g__qrbill_left_frame_bool + \bool_gset_false:N \g__qrbill_right_frame_bool + \keys_set:nn {qrbill} {vrule=false} }, - frame .initial:n = true, + vrule .choice:, + vrule / true .code:n = \tl_gset:Nn \g__qrbill_vrule_tl {\rule{\g__qrbill_rule_dim}{\c_qrbill_height_dim}}, + vrule / false .code:n = \tl_gset:Nn \g__qrbill_vrule_tl {\rule{\g__qrbill_rule_dim}{\c_zero_dim}}, + vrule / symbol .code:n = { + \RequirePackage{marvosym} + \tl_gset:Nn \g__qrbill_vrule_tl { + \rotatebox{90}{ + \hbox_to_wd:nn {\c_qrbill_height_dim}{ + \leaders\hbox{\rule{1mm}{\g__qrbill_rule_dim}\hspace{1mm}}\hskip 0pt\@plus1 fill\relax + \llap{\raisebox{-.5\height}[\c_zero_dim][\c_zero_dim]{\LeftScissors}} + \leaders\hbox{\rule{1mm}{\g__qrbill_rule_dim}\hspace{1mm}}\hskip 0pt\@plus4 fill\relax + \hbox{\rule{1mm}{\g__qrbill_rule_dim}} + } + } + } + }, + vrule .initial:n = true, billinginfo .bool_gset:N = \g__grbill_billinginfo_auto_bool, billinginfo .default:n = true, billinginfo .initial:n = true, @@ -592,31 +613,30 @@ iconwidth .initial:n = 7mm, separate .choice:, separate / symbol .code:n = { - \bool_gset_true:N \g__qrbill_separateinfo_bool - \RequirePackage{marvosym} - \cs_set:Nn \qrbill_print_separate_info: { - \par\leaders\vbox_to_ht:nn {1sp} { - \smash{ - \hbox_to_wd:nn {\c_qrbill_width_dim }{ - \leaders\hbox{\rule{1mm}{\g__qrbill_rule_dim}\hspace{1mm}}\hskip 0pt\@plus1 fill\relax - \llap{\raisebox{-.5\height}{\LeftScissors}} - \leaders\hbox{\rule{1mm}{\g__qrbill_rule_dim}\hspace{1mm}}\hskip 0pt\@plus4 fill\relax - } - } - } - \vskip 1sp - \vskip -1sp - } - }, + \bool_gset_true:N \g__qrbill_separateinfo_bool + \RequirePackage{marvosym} + \cs_set:Nn \qrbill_print_separate_info: { + \par\leaders\vbox_to_ht:nn {1sp} { + \smash{ + \hbox_to_wd:nn {\c_qrbill_width_dim }{ + \leaders\hbox{\rule{1mm}{\g__qrbill_rule_dim}\hspace{1mm}}\hskip 0pt\@plus1 fill\relax + \llap{\raisebox{-.5\height}{\LeftScissors}} + \leaders\hbox{\rule{1mm}{\g__qrbill_rule_dim}\hspace{1mm}}\hskip 0pt\@plus4 fill\relax + } + } + } + \vskip 1sp + \vskip -1sp + } + }, separate / text .code:n = { - \bool_gset_true:N \g__qrbill_separateinfo_bool - \cs_set:Nn \qrbill_print_separate_info: { - \centerline{\raisebox{\dimexpr\depth+.3ex\relax}[0pt][0pt]{\footnotesize\qrbillseparatename}} - \par\nointerlineskip - \rule{\c_qrbill_width_dim}{\g__qrbill_rule_dim} - } - } - , + \bool_gset_true:N \g__qrbill_separateinfo_bool + \cs_set:Nn \qrbill_print_separate_info: { + \centerline{\raisebox{\dimexpr\depth+.3ex\relax}[0pt][0pt]{\footnotesize\qrbillseparatename}} + \par\nointerlineskip + \rule{\c_qrbill_width_dim}{\g__qrbill_rule_dim} + } + }, separate / false .code:n = {\bool_gset_false:N \g__qrbill_separateinfo_bool}, separate .initial:n = text, sep-iban .int_gset:N = \g__qrbill_ibansep_int, @@ -636,6 +656,8 @@ replace-umlauts / true .code:n = \prop_gput_from_keyval:Nn \g__qrbill_replacement_prop {ä=ae,Ä=AE,ü=ue,Ü=UE,ö=oe,Ö=OE,ß=ss,ẞ=SS}, replace-umlauts / false .code:n = \clist_map_inline:nn {ä,Ä,ü,Ü,ö,Ö,ß,ẞ} {\prop_gremove:Nn \g__qrbill_replacement_prop {##1}}, data-to-string .bool_gset:N = \g__qrbill_to_string_bool, + ignore-if-empty .clist_gset:N = \g__qrbill_ignore_if_empty_clist, + ignore-if-empty .initial:n = , } \ProcessKeysOptions{qrbill} @@ -797,13 +819,13 @@ \cs_new:Nn \__qrbill_placeholder:nn { \vbox_to_ht:nn {#2} { - \hbox_to_wd:nn {#1} {\__qrbill_placeholder_hmark: \hfill \__qrbill_placeholder_hmark:} - \nointerlineskip - \hbox_to_wd:nn {#1} {\__qrbill_placeholder_vmark: \hfill \__qrbill_placeholder_vmark:} - \vfill - \hbox_to_wd:nn {#1} {\__qrbill_placeholder_vmark: \hfill \__qrbill_placeholder_vmark:} - \nointerlineskip - \hbox_to_wd:nn {#1} {\__qrbill_placeholder_hmark: \hfill \__qrbill_placeholder_hmark:} + \hbox_to_wd:nn {#1} {\__qrbill_placeholder_hmark: \hfill \__qrbill_placeholder_hmark:} + \nointerlineskip + \hbox_to_wd:nn {#1} {\__qrbill_placeholder_vmark: \hfill \__qrbill_placeholder_vmark:} + \vfill + \hbox_to_wd:nn {#1} {\__qrbill_placeholder_vmark: \hfill \__qrbill_placeholder_vmark:} + \nointerlineskip + \hbox_to_wd:nn {#1} {\__qrbill_placeholder_hmark: \hfill \__qrbill_placeholder_hmark:} } } @@ -813,172 +835,170 @@ \qrbillfont \setlength{\parindent}{\z@} \parbox{\c_qrbill_width_dim }{ - \vbox to \c_qrbill_height_dim { - \bool_if:NTF \g__qrbill_top_frame_bool - { - \bool_if:NTF \g__qrbill_separateinfo_bool - {\qrbill_print_separate_info:} - {\rule{\c_qrbill_width_dim}{\g__qrbill_rule_dim}} - } - {\rule{\c_zero_dim}{\g__qrbill_rule_dim}} - \par\nointerlineskip - \skip_vertical:n {\c_qrbill_sep_dim-\g__qrbill_rule_dim} - \skip_horizontal:n {\c_qrbill_sep_dim-\g__qrbill_rule_dim} - \begin{minipage}[c][95mm][t]{52mm} - \vbox_to_ht:nn {7mm} {\qrbill_title_font:\qrbillreceiptname} - \par\nointerlineskip - \vbox_to_ht:nn {56mm}{ - {\qrbill_headingR_font:\qrbillaccountname\par} - { - \qrbill_valueR_font: - \__qrbill_sep_tl:nV {iban} \l_qrbill_data_Account_tl\par - \qrbill_insert_address:N \g__qrbill_creditorprefix_tl - \par\vskip\baselineskip - } - \tl_if_empty:NF \l_qrbill_data_Reference_tl { - {\qrbill_headingR_font:\qrbillreferencename\par} - { - \qrbill_valueR_font: - \__qrbill_sep_tl:nV {reference} \l_qrbill_data_Reference_tl - \par\vskip\baselineskip - } - } - \tl_if_empty:cTF {l_qrbill_data_\g__qrbill_debtorprefix_tl Name_tl} - { - {\qrbill_headingR_font:\qrbilldebtoraddrname\par} - \__qrbill_placeholder:nn {52mm} {20mm} - }{ - {\qrbill_headingR_font:\qrbilldebtorname\par} - { - \qrbill_valueR_font: - \qrbill_insert_address:N \g__qrbill_debtorprefix_tl - \par - } - } - } - \par\nointerlineskip - \vbox_to_ht:nn {14mm}{ - \qrbill_headingR_font: - \begin{tabular}[t]{@{}ll@{}} - \qrbillcurrencyname&\qrbill_headingR_font:\qrbillamountname\\ - \qrbill_amountR_font:\l_qrbill_data_Currency_tl - &\qrbill_amountR_font: - \tl_if_empty:NF \l_qrbill_data_Amount_tl - {\numprint{\l_qrbill_data_Amount_tl}} - \end{tabular} - \tl_if_empty:NTF \l_qrbill_data_Amount_tl { - \hfill - \raisebox{\dimexpr-\height+\ht\strutbox}[\z@]{\llap{ - \__qrbill_placeholder:nn {30mm} {10mm} - }} - } - \vfill - } - \par\nointerlineskip - \vbox_to_ht:nn {18mm} { - \makebox[\linewidth][r]{\qrbill_headingR_font:\qrbillacceptantname}\par - } - \end{minipage}% - \skip_horizontal:n {2\c_qrbill_sep_dim} - \begin{minipage}[c][95mm][t]{138mm} - \begin{minipage}[c][85mm][t]{51mm} - \parbox[t][7mm][t]{\linewidth}{\qrbill_title_font:\qrbillpaymentpartname} - \par\nointerlineskip - \skip_vertical:n {\c_qrbill_sep_dim} - \qrcode_setup_QRcode: - \leavevmode\qrbill_parse_QRcode:V \l_qrbill_data_str - \tl_if_empty:NF \g_qrbill_icon_tl { - \llap{\hbox_to_wd:nn {\g_qrbill_QRcode_dim} { - \hfill - \raisebox{\dimexpr-.5\height+.5\g_qrbill_QRcode_dim}[0pt][0pt]{ - \includegraphics[width=\g_qrbill_iconwidth_dim]{\g_qrbill_icon_tl} - } - \hfill - }} - } - \skip_vertical:n {\c_qrbill_sep_dim} - \vbox_to_ht:nn {22mm}{ - \begin{tabular}[b]{@{}ll@{}} - \qrbill_headingP_font:\qrbillcurrencyname&\qrbill_headingP_font: - \qrbillamountname\\ - \qrbill_amountP_font:\tl_use:c {l_qrbill_data_Currency_tl}& - \tl_if_empty:NF \l_qrbill_data_Amount_tl { - \qrbill_amountP_font:\numprint{\l_qrbill_data_Amount_tl} - } - \end{tabular} - \tl_if_empty:NTF \l_qrbill_data_Amount_tl { - \hfill - \raisebox{\dimexpr-\height+\ht\strutbox}[\z@]{ - \llap{\__qrbill_placeholder:nn {40mm} {15mm} - }} - } - } - \end{minipage} - \begin{minipage}[c][85mm][t]{87mm} - \par\nointerlineskip - {\qrbill_headingP_font:\qrbillaccountname\par} - { - \qrbill_valueP_font: - \__qrbill_sep_tl:nV {iban} \l_qrbill_data_Account_tl \par - \qrbill_insert_address:N \g__qrbill_creditorprefix_tl - \par\vskip\baselineskip - } - \tl_if_empty:NF \l_qrbill_data_Reference_tl { - {\qrbill_headingP_font:\qrbillreferencename\par} - {\qrbill_valueP_font: - \__qrbill_sep_tl:nV {reference} \l_qrbill_data_Reference_tl - \par\vskip\baselineskip} - } - \exp_args:Nf \tl_if_empty:nF { - \l_qrbill_data_BillingInfo_tl - \l_qrbill_data_Message_tl - }{ - {\qrbill_headingP_font:\qrbilladdinfoname\par} - { - \qrbill_valueP_font: - \l_qrbill_data_Message_tl\par - \tl_replace_all:Nnn \l_qrbill_data_BillingInfo_tl {/} {\discretionary{}{}{}/} - \l_qrbill_data_BillingInfo_tl - \par\vskip\baselineskip - } - } - \tl_if_empty:cTF {l_qrbill_data_\g__qrbill_debtorprefix_tl Name_tl} { - {\qrbill_headingP_font:\qrbilldebtoraddrname\par} - \__qrbill_placeholder:nn {65mm} {25mm} - }{ - {\qrbill_headingP_font:\qrbilldebtorname\par} - { - \qrbill_valueP_font: - \qrbill_insert_address:N \g__qrbill_debtorprefix_tl - \par - } - } - \end{minipage}\par\nointerlineskip - \begin{minipage}[b][10mm][t]{\linewidth} - \strut - \qrbill_insert_AV_parameters:NNn - \qrbill_infoheading_font: - \qrbill_info_font: - {AV1,AV2} - \end{minipage} - \end{minipage} - \par\nointerlineskip\skip_vertical:n {\c_qrbill_sep_dim} - \smash{ - \bool_if:NT \g__qrbill_bottom_frame_bool - {\rlap{\rule{\c_qrbill_width_dim}{\g__qrbill_rule_dim}}} - \bool_if:NTF \g__qrbill_left_frame_bool - {\rule{\g__qrbill_rule_dim}{\c_qrbill_height_dim}} - {\rule{\g__qrbill_rule_dim}{\c_zero_dim}} - \hspace{\dimexpr62mm-1.5\g__qrbill_rule_dim} - \bool_if:NTF \g__qrbill_vrule_bool - {\rule{\g__qrbill_rule_dim}{\c_qrbill_height_dim}} - {\rule{\g__qrbill_rule_dim}{\c_zero_dim}} - \hspace{\dimexpr148mm-1.5\g__qrbill_rule_dim} - \bool_if:NTF \g__qrbill_right_frame_bool - {\rule{\g__qrbill_rule_dim}{\c_qrbill_height_dim}} - {\rule{\g__qrbill_rule_dim}{\c_zero_dim}} - } - } + \vbox to \c_qrbill_height_dim { + \bool_if:NTF \g__qrbill_top_frame_bool + { + \bool_if:NTF \g__qrbill_separateinfo_bool + {\qrbill_print_separate_info:} + {\rule{\c_qrbill_width_dim}{\g__qrbill_rule_dim}} + } + {\rule{\c_zero_dim}{\g__qrbill_rule_dim}} + \par\nointerlineskip + \skip_vertical:n {\c_qrbill_sep_dim-\g__qrbill_rule_dim} + \skip_horizontal:n {\c_qrbill_sep_dim-\g__qrbill_rule_dim} + \begin{minipage}[c][95mm][t]{52mm} + \vbox_to_ht:nn {7mm} {\qrbill_title_font:\qrbillreceiptname} + \par\nointerlineskip + \vbox_to_ht:nn {56mm}{ + {\qrbill_headingR_font:\qrbillaccountname\par} + { + \qrbill_valueR_font: + \__qrbill_sep_tl:nV {iban} \l_qrbill_data_Account_tl\par + \qrbill_insert_address:N \g__qrbill_creditorprefix_tl + \par\vskip\baselineskip + } + \tl_if_empty:NF \l_qrbill_data_Reference_tl { + {\qrbill_headingR_font:\qrbillreferencename\par} + { + \qrbill_valueR_font: + \__qrbill_sep_tl:nV {reference} \l_qrbill_data_Reference_tl + \par\vskip\baselineskip + } + } + \tl_if_empty:cTF {l_qrbill_data_\g__qrbill_debtorprefix_tl Name_tl} + { + {\qrbill_headingR_font:\qrbilldebtoraddrname\par} + \__qrbill_placeholder:nn {52mm} {20mm} + }{ + {\qrbill_headingR_font:\qrbilldebtorname\par} + { + \qrbill_valueR_font: + \qrbill_insert_address:N \g__qrbill_debtorprefix_tl + \par + } + } + } + \par\nointerlineskip + \vbox_to_ht:nn {14mm}{ + \qrbill_headingR_font: + \begin{tabular}[t]{@{}ll@{}} + \qrbillcurrencyname&\qrbill_headingR_font:\qrbillamountname\\ + \qrbill_amountR_font:\l_qrbill_data_Currency_tl + &\qrbill_amountR_font: + \tl_if_empty:NF \l_qrbill_data_Amount_tl + {\numprint{\l_qrbill_data_Amount_tl}} + \end{tabular} + \tl_if_empty:NTF \l_qrbill_data_Amount_tl { + \hfill + \raisebox{\dimexpr-\height+\ht\strutbox}[\z@]{\llap{ + \__qrbill_placeholder:nn {30mm} {10mm} + }} + } + \vfill + } + \par\nointerlineskip + \vbox_to_ht:nn {18mm} { + \makebox[\linewidth][r]{\qrbill_headingR_font:\qrbillacceptantname}\par + } + \end{minipage}% + \skip_horizontal:n {2\c_qrbill_sep_dim} + \begin{minipage}[c][95mm][t]{138mm} + \begin{minipage}[c][85mm][t]{51mm} + \parbox[t][7mm][t]{\linewidth}{\qrbill_title_font:\qrbillpaymentpartname} + \par\nointerlineskip + \skip_vertical:n {\c_qrbill_sep_dim} + \qrcode_setup_QRcode: + \leavevmode\qrbill_parse_QRcode:V \l_qrbill_data_str + \tl_if_empty:NF \g_qrbill_icon_tl { + \llap{\hbox_to_wd:nn {\g_qrbill_QRcode_dim} { + \hfill + \raisebox{\dimexpr-.5\height+.5\g_qrbill_QRcode_dim}[0pt][0pt]{ + \includegraphics[width=\g_qrbill_iconwidth_dim]{\g_qrbill_icon_tl} + } + \hfill + }} + } + \skip_vertical:n {\c_qrbill_sep_dim} + \vbox_to_ht:nn {22mm}{ + \begin{tabular}[b]{@{}ll@{}} + \qrbill_headingP_font:\qrbillcurrencyname&\qrbill_headingP_font: + \qrbillamountname\\ + \qrbill_amountP_font:\tl_use:c {l_qrbill_data_Currency_tl}& + \tl_if_empty:NF \l_qrbill_data_Amount_tl { + \qrbill_amountP_font:\numprint{\l_qrbill_data_Amount_tl} + } + \end{tabular} + \tl_if_empty:NTF \l_qrbill_data_Amount_tl { + \hfill + \raisebox{\dimexpr-\height+\ht\strutbox}[\z@]{ + \llap{\__qrbill_placeholder:nn {40mm} {15mm} + }} + } + } + \end{minipage} + \begin{minipage}[c][85mm][t]{87mm} + \par\nointerlineskip + {\qrbill_headingP_font:\qrbillaccountname\par} + { + \qrbill_valueP_font: + \__qrbill_sep_tl:nV {iban} \l_qrbill_data_Account_tl \par + \qrbill_insert_address:N \g__qrbill_creditorprefix_tl + \par\vskip\baselineskip + } + \tl_if_empty:NF \l_qrbill_data_Reference_tl { + {\qrbill_headingP_font:\qrbillreferencename\par} + {\qrbill_valueP_font: + \__qrbill_sep_tl:nV {reference} \l_qrbill_data_Reference_tl + \par\vskip\baselineskip} + } + \exp_args:Nf \tl_if_empty:nF { + \l_qrbill_data_BillingInfo_tl + \l_qrbill_data_Message_tl + }{ + {\qrbill_headingP_font:\qrbilladdinfoname\par} + { + \qrbill_valueP_font: + \l_qrbill_data_Message_tl\par + \tl_replace_all:Nnn \l_qrbill_data_BillingInfo_tl {/} {\discretionary{}{}{}/} + \l_qrbill_data_BillingInfo_tl + \par\vskip\baselineskip + } + } + \tl_if_empty:cTF {l_qrbill_data_\g__qrbill_debtorprefix_tl Name_tl} { + {\qrbill_headingP_font:\qrbilldebtoraddrname\par} + \__qrbill_placeholder:nn {65mm} {25mm} + }{ + {\qrbill_headingP_font:\qrbilldebtorname\par} + { + \qrbill_valueP_font: + \qrbill_insert_address:N \g__qrbill_debtorprefix_tl + \par + } + } + \end{minipage}\par\nointerlineskip + \begin{minipage}[b][10mm][t]{\linewidth} + \strut + \qrbill_insert_AV_parameters:NNn + \qrbill_infoheading_font: + \qrbill_info_font: + {AV1,AV2} + \end{minipage} + \end{minipage} + \par\nointerlineskip\skip_vertical:n {\c_qrbill_sep_dim} + \smash{ + \bool_if:NT \g__qrbill_bottom_frame_bool + {\rlap{\rule{\c_qrbill_width_dim}{\g__qrbill_rule_dim}}} + \bool_if:NTF \g__qrbill_left_frame_bool + {\rule{\g__qrbill_rule_dim}{\c_qrbill_height_dim}} + {\rule{\g__qrbill_rule_dim}{\c_zero_dim}} + \hspace{\dimexpr62mm-1.5\g__qrbill_rule_dim} + \g__qrbill_vrule_tl + \hspace{\dimexpr148mm-1.5\g__qrbill_rule_dim} + \bool_if:NTF \g__qrbill_right_frame_bool + {\rule{\g__qrbill_rule_dim}{\c_qrbill_height_dim}} + {\rule{\g__qrbill_rule_dim}{\c_zero_dim}} + } + } } \endgroup } @@ -1006,10 +1026,10 @@ \ior_str_map_inline:Nn \qrbill_ior { \int_step_inline:nnn {2} {\l_tmpa_int } { - \exp_args:Nnx \use:n {\exp_args:NNx \exp_args:Nnc \defcaptionname - {\clist_item:Nn \l_qrbill_tmpa_clist {##1}} - {qrbill\clist_item:nn {#1} {1}name}} - {\clist_item:nn {#1} {##1}} + \exp_args:Nnx \use:n {\exp_args:NNx \exp_args:Nnc \defcaptionname + {\clist_item:Nn \l_qrbill_tmpa_clist {##1}} + {qrbill\clist_item:nn {#1} {1}name}} + {\clist_item:nn {#1} {##1}} } } @@ -1026,13 +1046,13 @@ \seq_set_split:Nnn \l_qrbill_tmp_seq {\\} {#2} } \exp_args:Nnx \keys_set:nn {qrbill/data} { - #1AddressType=K, - #1Name=\seq_item:Nn \l_qrbill_tmp_seq {1}, - #1Address1=\seq_item:Nn \l_qrbill_tmp_seq {2}, - #1Address2=\seq_item:Nn \l_qrbill_tmp_seq {3}, - #1PostalCode=, - #1City=, - #1Country=\seq_item:Nn \l_qrbill_tmp_seq {4}, + #1AddressType=K, + #1Name={\seq_item:Nn \l_qrbill_tmp_seq {1}}, + #1Address1={\seq_item:Nn \l_qrbill_tmp_seq {2}}, + #1Address2={\seq_item:Nn \l_qrbill_tmp_seq {3}}, + #1PostalCode=, + #1City=, + #1Country={\seq_item:Nn \l_qrbill_tmp_seq {4}}, } } @@ -1045,40 +1065,40 @@ \seq_set_split:Nnn \l_qrbill_tmp_seq {\\} {#2} } \exp_args:Nnx \keys_set:nn {qrbill/data} { - #1AddressType=S, - #1Name=\seq_item:Nn \l_qrbill_tmp_seq {1}, - #1Address1=\seq_item:Nn \l_qrbill_tmp_seq {2}, - #1Address2=\seq_item:Nn \l_qrbill_tmp_seq {3}, - #1PostalCode=\seq_item:Nn \l_qrbill_tmp_seq {4}, - #1City=\seq_item:Nn \l_qrbill_tmp_seq {5}, - #1Country=\seq_item:Nn \l_qrbill_tmp_seq {6}, + #1AddressType=S, + #1Name={\seq_item:Nn \l_qrbill_tmp_seq {1}}, + #1Address1={\seq_item:Nn \l_qrbill_tmp_seq {2}}, + #1Address2={\seq_item:Nn \l_qrbill_tmp_seq {3}}, + #1PostalCode={\seq_item:Nn \l_qrbill_tmp_seq {4}}, + #1City={\seq_item:Nn \l_qrbill_tmp_seq {5}}, + #1Country={\seq_item:Nn \l_qrbill_tmp_seq {6}}, } } \cs_new:Nn \qrbill_insert_address:N { \tl_use:c {l_qrbill_data_#1Name_tl}\ifhmode\\\fi \str_case_e:nnF {\use:c {l_qrbill_data_#1AddressType_tl}} - { - {K} { - \tl_use:c {l_qrbill_data_#1Address1_tl} - \tl_if_empty:cF {l_qrbill_data_#1Address2_tl} { - \ifhmode\\\fi - \tl_if_empty:cF {l_qrbill_data_#1Country_tl} - {\tl_use:c {l_qrbill_data_#1Country_tl}-} - \tl_use:c {l_qrbill_data_#1Address2_tl} - } - } - }{ - \tl_use:c {l_qrbill_data_#1Address1_tl}~ - \tl_use:c {l_qrbill_data_#1Address2_tl} - \tl_if_empty:cF {l_qrbill_data_#1City_tl} { - \ifhmode\\\fi - \tl_if_empty:cF {l_qrbill_data_#1Country_tl} - {\tl_use:c {l_qrbill_data_#1Country_tl}-} - \tl_use:c {l_qrbill_data_#1PostalCode_tl}~ - \tl_use:c {l_qrbill_data_#1City_tl} - } - } + { + {K} { + \tl_use:c {l_qrbill_data_#1Address1_tl} + \tl_if_empty:cF {l_qrbill_data_#1Address2_tl} { + \ifhmode\\\fi + \tl_if_empty:cF {l_qrbill_data_#1Country_tl} + {\tl_use:c {l_qrbill_data_#1Country_tl}-} + \tl_use:c {l_qrbill_data_#1Address2_tl} + } + } + }{ + \tl_use:c {l_qrbill_data_#1Address1_tl}~ + \tl_use:c {l_qrbill_data_#1Address2_tl} + \tl_if_empty:cF {l_qrbill_data_#1City_tl} { + \ifhmode\\\fi + \tl_if_empty:cF {l_qrbill_data_#1Country_tl} + {\tl_use:c {l_qrbill_data_#1Country_tl}-} + \tl_use:c {l_qrbill_data_#1PostalCode_tl}~ + \tl_use:c {l_qrbill_data_#1City_tl} + } + } } \cs_new:Nn \__qrbill_sep_tl:nn { @@ -1124,15 +1144,15 @@ \clist_map_inline:nn {AV1, AV2} { \keys_define:nn {qrbill/data} { - #1 .code:n = { - \tl_if_empty:nF {##1}{ - \exp_args:Nnx \keys_set:nn {qrbill/data} { - #1-Parameters={\qrbill_av_prefix:n {#1}##1} - } - } - \tl_set:cn {l_qrbill_#1_tl} {##1} - }, - #1 .initial:n =, + #1 .code:n = { + \tl_if_empty:nF {##1}{ + \exp_args:Nnx \keys_set:nn {qrbill/data} { + #1-Parameters={\qrbill_av_prefix:n {#1}##1} + } + } + \tl_set:cn {l_qrbill_#1_tl} {##1} + }, + #1 .initial:n =, } } @@ -1149,10 +1169,17 @@ \str_clear:N \l_qrbill_data_str \bool_set_false:N \l_tmpa_bool \seq_map_inline:Nn \g__qrbill_qrscheme_seq { - \bool_if:NTF \l_tmpa_bool - {\str_put_right:Nn\l_qrbill_data_str {^^J}} - {\bool_set_true:N \l_tmpa_bool} - \exp_args:NNv \str_put_right:Nn \l_qrbill_data_str {l_qrbill_data_##1_tl} + \clist_if_in:NnTF \g__qrbill_ignore_if_empty_clist {##1} + { + \tl_if_empty:cTF {l_qrbill_data_##1_tl} \use_none:n \use:n + } + \use:n + { + \bool_if:NTF \l_tmpa_bool + {\str_put_right:Nn\l_qrbill_data_str {^^J}} + {\bool_set_true:N \l_tmpa_bool} + \exp_args:NNv \str_put_right:Nn \l_qrbill_data_str {l_qrbill_data_##1_tl} + } } %necessary to preserve spaces! \str_replace_all:Nnn \l_qrbill_data_str {~ } {\ } @@ -1164,18 +1191,16 @@ \seq_new:N \g__qrbill_qrscheme_seq \newcommand*\SetQrScheme[1]{ - \seq_gset_from_clist:Nn \g__qrbill_qrscheme_seq {#1} - \seq_map_inline:Nn \g__qrbill_qrscheme_seq { - \keys_define:nn {qrbill/data} { - ##1 .tl_set:c = l_qrbill_data_##1_tl, - ##1 .initial:n =, - } - } + \seq_gset_from_clist:Nn \g__qrbill_qrscheme_seq {#1} + \seq_map_inline:Nn \g__qrbill_qrscheme_seq { + \keys_define:nn {qrbill/data} { + ##1 .tl_set:c = l_qrbill_data_##1_tl, + ##1 .initial:n =, + } + } } - - -\prop_new:N \g__qrbill_billing_info_prop +\prop_new:N \g__qrbill_billing_info_prop \seq_new:N \g__qrbill_billing_info_seq \clist_new:N \g__qrbill_billing_info_static_clist @@ -1185,13 +1210,13 @@ \prop_gset_from_keyval:Nn \g__qrbill_billing_info_prop {#1} \seq_gclear:N \g__qrbill_billing_info_seq \prop_map_inline:Nn \g__qrbill_billing_info_prop { - \clist_if_in:NnF \g__qrbill_billing_info_static_clist {##1} { - \seq_push:Nn \g__qrbill_billing_info_seq {##1} - } - \keys_define:nn {qrbill/data} { - ##2 .tl_set:c = l_qrbill_##2_tl, - ##2 .initial:n =, - } + \clist_if_in:NnF \g__qrbill_billing_info_static_clist {##1} { + \seq_push:Nn \g__qrbill_billing_info_seq {##1} + } + \keys_define:nn {qrbill/data} { + ##2 .tl_set:c = l_qrbill_##2_tl, + ##2 .initial:n =, + } } \seq_if_empty:NF \g__qrbill_billing_info_seq { \prop_map_inline:Nn \g__qrbill_billing_info_prop { @@ -1203,9 +1228,9 @@ } } \seq_sort:Nn \g__qrbill_billing_info_seq { - \int_compare:nNnTF { ##1 } > { ##2 } - { \sort_return_swapped: } - { \sort_return_same: } + \int_compare:nNnTF { ##1 } > { ##2 } + { \sort_return_swapped: } + { \sort_return_same: } } } @@ -1213,17 +1238,17 @@ \cs_new:Nn \qrbill_parse_BillingInfo: { \bool_if:NT \g__grbill_billinginfo_auto_bool { - \str_put_right:Nx \l_qrbill_data_BillingInfo_tl { - \prop_item:Nn \g__qrbill_billing_info_prop {prefix} - } - \seq_map_inline:Nn \g__qrbill_billing_info_seq { - \prop_get:NnN \g__qrbill_billing_info_prop {##1} \l_tmpa_tl - \tl_if_empty:cF {l_qrbill_\l_tmpa_tl _tl} { - \str_put_right:Nx \l_qrbill_data_BillingInfo_tl { - /##1/\tl_use:c {l_qrbill_\l_tmpa_tl _tl} - } - } - } + \str_put_right:Nx \l_qrbill_data_BillingInfo_tl { + \prop_item:Nn \g__qrbill_billing_info_prop {prefix} + } + \seq_map_inline:Nn \g__qrbill_billing_info_seq { + \prop_get:NnN \g__qrbill_billing_info_prop {##1} \l_tmpa_tl + \tl_if_empty:cF {l_qrbill_\l_tmpa_tl _tl} { + \str_put_right:Nx \l_qrbill_data_BillingInfo_tl { + /##1/\tl_use:c {l_qrbill_\l_tmpa_tl _tl} + } + } + } } } @@ -1241,9 +1266,9 @@ \cs_new:Nn \qrbill_insert_AV_parameters:NNn { \clist_map_inline:nn {#3} { - \tl_if_empty:cF {l_qrbill_##1_tl} - {{#1\qrbill_av_prefix:n {##1}}{#2 \tl_use:c {l_qrbill_##1_tl}}} - } + \tl_if_empty:cF {l_qrbill_##1_tl} + {{#1\qrbill_av_prefix:n {##1}}{#2 \tl_use:c {l_qrbill_##1_tl}}} + } } \cs_new:Nn \qrbill_av_prefix:n {Name~#1:~} @@ -1256,8 +1281,13 @@ % \section{The file swiss.qrbill-cfg.tex as a custom qrbill scheme} %<*swiss.qrbill-cfg.tex> \qrbillsetup{ - creditorprefix =CR-, - debtorprefix =UD-, + creditorprefix=CR-, + debtorprefix=UD-, + ignore-if-empty={ + AV1-Parameters, + AV2-Parameters, + BillingInfo + } } \SetQrScheme{ @@ -1320,12 +1350,12 @@ \ExplSyntaxOff \SetupQrBill{ - QRType=SPC, - Version=0200, - CodingType=1, - Trailer=EPD, - Currency=CHF, - ReferenceType=NON, + QRType=SPC, + Version=0200, + CodingType=1, + Trailer=EPD, + Currency=CHF, + ReferenceType=NON, } \qrbillsetdata*{ @@ -1402,24 +1432,24 @@ \QRbill[ creditor*={foobar LLC\\ - Postfach\\ - 404\\ - 2342\\ - Zurich\\ - CH}, + Postfach\\ + 404\\ + 2342\\ + Zurich\\ + CH}, Account=CH1280808005649899718, vat=123123123,% VAT number with stripped CH and periods debtor*={peiTeX\\ - TeXnikerweg\\ - 78\\ - 23420\\ - Hamburg\\ - DE}, + TeXnikerweg\\ + 78\\ + 23420\\ + Hamburg\\ + DE}, Amount=1337.42, Message=Bestellung vom 27.06.2020, invoicenum=100-4242, % invoicedate=200701,%yymmdd, preset to todays values - vatdetails=0,% 0% VAT + vatdetails=0,% 0% VAT % invoicedate=200701,%yymmdd, preset to todays values AV1=LX;F00BAR;2342, ] @@ -1452,39 +1482,39 @@ width=\paperwidth, height=105mm, ]{qrbill} - + \begin{document} \qrbillsetdata{ creditor*={foobar LLC\\ - Postfach\\ - 404\\ - 2342\\ - Zurich\\ - CH}, + Postfach\\ + 404\\ + 2342\\ + Zurich\\ + CH}, Account=CH1280808005649899718, vat=123123123,% VAT number with stripped CH and periods debtor*={peiTeX\\ - TeXnikerweg\\ - 78\\ - 23420\\ - Hamburg\\ - DE}, + TeXnikerweg\\ + 78\\ + 23420\\ + Hamburg\\ + DE}, Amount=1337.42, Message=Bestellung vom 27.06.2020, invoicenum=100-4242, % invoicedate=200701,%yymmdd, preset to todays values - vatdetails=0,% 0% VAT + vatdetails=0,% 0% VAT % vatdate=200701,%yymmdd, preset to todays values AV1=LX;F00BAR;2342, } \setkomavar{fromaddress}{\insertcreditor} - + \begin{letter}{\insertdebtor} - + \opening{opening} Text @@ -1492,13 +1522,13 @@ Text \closing{closing} % Add qbill on last page -% For more details +% For more details \AddLayersToPageStyle{@everystyle@}{qrbill} - + \end{letter} \end{document} % \end{macrocode} -% +% % \iffalse % \begin{macrocode} % diff --git a/macros/latex/contrib/qrbill/qrbill.ins b/macros/latex/contrib/qrbill/qrbill.ins index a2c98b2ab6..00a8697623 100644 --- a/macros/latex/contrib/qrbill/qrbill.ins +++ b/macros/latex/contrib/qrbill/qrbill.ins @@ -1,8 +1,5 @@ \input l3docstrip -\def\filedate{2022/07/02} -\def\fileversion{1.04} - \preamble Copyright (C) 2020–2022 by Marei Peischl (peiTeX) diff --git a/macros/latex/contrib/qrbill/qrbill.pdf b/macros/latex/contrib/qrbill/qrbill.pdf index f515cbd69e..fe8ddd638a 100644 Binary files a/macros/latex/contrib/qrbill/qrbill.pdf and b/macros/latex/contrib/qrbill/qrbill.pdf differ -- cgit v1.2.3