diff --git a/glossy/README.md b/glossy/README.md index 507525e..31f4de0 100644 --- a/glossy/README.md +++ b/glossy/README.md @@ -407,3 +407,5 @@ This project is licensed under the MIT License. - **Breaking**: In themes, entry.pages now returns an array of linked page numbers, instead of opaque content. Use `#entry.pages.join(", ")` in your custom theme to keep the previous behaviour. +- **Breaking**: The `both` mode (previously called modifier) by default + now counts towards the first use of a term. diff --git a/glossy/src/gloss.typ b/glossy/src/gloss.typ index 8c1b7df..45992d7 100644 --- a/glossy/src/gloss.typ +++ b/glossy/src/gloss.typ @@ -259,7 +259,6 @@ let is_first_use = not __is_term_first_used(key, location: here()) let default-count-as-first-use = ("short" not in modifiers // mode is not short and "long" not in modifiers // mode is not long - and "both" not in modifiers // mode is not both and (display-text == none or display-text == auto)) // mode is not supplement let force-count-as-first-use = ("use" in modifiers or "spend" in modifiers) let force-skip-as-first-use = ("nouse" in modifiers or "nospend" in modifiers) diff --git a/glossy/tests/format-term/test.typ b/glossy/tests/format-term/test.typ index c38ed49..9de52a5 100644 --- a/glossy/tests/format-term/test.typ +++ b/glossy/tests/format-term/test.typ @@ -32,7 +32,7 @@ [@html:short], [@html:long], [@html:both], [@css:short], [@css:long], [@css:both], - [@tps:short], [@tps:long], [@tps:both], + [@tps:short], [@tps:long], [@tps:both:nouse], [@concise:short], [@concise:long], [@concise:both], [@shortonly:short], [@shortonly:long], [@shortonly:both], @@ -40,7 +40,7 @@ [@html:short:cap], [@html:long:cap], [@html:both:cap], [@a:css:short], [@a:css:long], [@a:css:both], - [@tps:short:pl], [@tps:long:pl], [@tps:both:pl], + [@tps:short:pl], [@tps:long:pl], [@tps:both:nouse:pl], [@concise:a:cap:short], [@concise:a:cap:long], [@concise:a:cap:both], [@an:shortonly:short], [@an:shortonly:long], [@an:shortonly:both], ) diff --git a/glossy/tests/refs-in-captions/ref/1.png b/glossy/tests/refs-in-captions/ref/1.png index 8b819b6..06290d9 100644 Binary files a/glossy/tests/refs-in-captions/ref/1.png and b/glossy/tests/refs-in-captions/ref/1.png differ diff --git a/glossy/tests/refs-in-captions/test.typ b/glossy/tests/refs-in-captions/test.typ index 7f2cc5e..e5ecc84 100644 --- a/glossy/tests/refs-in-captions/test.typ +++ b/glossy/tests/refs-in-captions/test.typ @@ -37,7 +37,7 @@ === `@ShortInHeader:short` = "@ShortInHeader:short" === `@LongInHeader:long` = "@LongInHeader:long" -=== `@BothInHeader:both` = "@BothInHeader:both" +=== `@BothInHeader:both:nouse` = "@BothInHeader:both:nouse" === `@NormalInHeader` = "@NormalInHeader" #line(length: 100%) @@ -47,7 +47,7 @@ #figure([], caption: [`@ShortInCaption:short` = "@ShortInCaption:short"]) #figure([], caption: [`@LongInCaption:long` = "@LongInCaption:long"]) -#figure([], caption: [`@BothInCaption:both` = "@BothInCaption:both"]) +#figure([], caption: [`@BothInCaption:both:nospend` = "@BothInCaption:both:nospend"]) #figure([], caption: [`@NormalInCaption` = "@NormalInCaption"]) #line(length: 100%)