Juggles with acronyms so you don't have to.
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
grisel-davy bca4fea03b replace description 10 months ago
README.md replace description 10 months ago
acrobat.typ initial commit 10 months ago
acronyms.typ add example files 10 months ago
main.typ add example files 10 months ago

README.md

Acrobat

Juggles with acronyms so you don't have to.

Usage

The main function of acrobat is to keep track of which acronym to define. First, define the acronyms in a file named acronyms.typ as a dictionary where the key is the acronym, and the value is an array. The first value of the array is the singular version of the definition. If there is a second value, it is the plural version of the definition. Any additional value is useless.

Here is a sample of the acronyms.typ file:

#let acronyms = (
  "AMS": "Acronym Management System",
  "ACROBAT": "Acrobat Can Really Optimize Building Acronyms in Typst",
  "BIOS": ("Basic Input/Output System", "Basic Input/Output Systems")
)

Once the acronyms are defined, you can use them in the text with the #acr(...) function. The argument is the acronym as a string. On the first call of the function, the acronym is expanded and the acronym added between parenthesis.

To get the plural version of the acronym, you can use the #acrpl(...) function that adds an 's' after the acronym. If a plural version of the definition is provided, it will be used if the first use of the acronym is plural. Otherwise, the singular version is used and a trailing 's' is added.

At any point in the document you can reset and acronym with the functions #reset-acronym(...) or reset-all-acronyms(). After a reset, the next use of the acronym is expanded.

You can also print an index of all acronyms used in the document with the #print-index() function. The index is printed in a section for which you can choose the heading level and outline flag (with respectively the level and outlined parameters). Finally you can also force the index to include all acronyms, even if not used in the document, with the all flag.

Finally, you can call the #get-def(...) function to get the definition of an acronym. Use the plural to get the plural version.

Have fun acrobating!