How to show full definition with acronym AND update acronym status in acrostiche

Hello, I’m using acrostiche package for acronyms. I’d like to print full definition of an acronym together with the acronym itself AND update the acronym status. Is it possible? Basically what #acrf(“…”) does but with status updating. Thanks!

Hi @Vaclav_Bocan ,

What do you mean by update status? Do you mean mark as used or reset?

#import "@preview/acrostiche:0.6.0": *

#init-acronyms((
  "WTP": ("Wonderful Typst Package"),
))

Acrostiche is a #acr("WTP") and abbreviation is #acr("WTP").\ 
Long version is #acrf("WTP") and abbreviation is #acr("WTP").\ 
*Reset* #racr("WTP") leads to full version #acr("WTP"). \

image

For reset, from the docs:

At any point in the document, you can reset acronyms with the functions #reset-acronym(...) (for a single acronym) or reset-all-acronyms() (to reset all acronyms). After a reset, the next use of the acronym is expanded. Both functions have shortcuts with #racr(...) and #raacr(...).

Hello! I meant mark as used. Because if I use #acrf(…) and then #acr(…), full definition will be printed in both cases. I want to force full definition AND mark as used.

It doesn’t if you do it like the first line of my example. You don’t need to write acrf(). Just acr() from the start.

I am aware, the point is that I’m using acrf() in a table where some of the definitions appear for the first time and some for second, but I want all to be full, and all to be considered used after. So I guess the only option is to use both acrf() and acused(…)

Is using #raacr() before building the table a solution? Then use acr() for all, which will all be considered first use?

That wouldn’t help since there might be acronyms that are not used in the table and should not be affected. I conclude that a function that does what I want is missing in acrostiche and acrf() + acused() are the closest two-function solution.

Perhaps this could be suggested to the package owner.

#let your-func(acro) = {
  acrf(acro)
  acused(acro)
}
1 Like