talal / ilm

A versatile, clean and minimal template for non-fiction writing. Ideal for class notes, reports, and books.
https://typst.app/universe/package/ilm
MIT No Attribution
94 stars 13 forks source link

Managing acronyms #9

Closed danieljfarrell closed 4 months ago

danieljfarrell commented 4 months ago

Thanks for you really excellent template.

There are two acronyms management packages: acrostiche and acrotastic on typst. They do not seem to integrate with the template. I'm just wondering if it's possible to add support for acronym management, it would be great to get an autogenerated section somewhere that contains acronyms and definitions.

image
talal commented 4 months ago

Hi, it works as expected (as far as I can tell).

Here is a minimal example which I used to see how Acrostiche package works:

#import "@preview/ilm:1.1.2": *
#show: ilm.with(
  title: [Your Title],
  author: "Max Mustermann",
  date: datetime(year: 2024, month: 03, day: 19),
  figure-index: (enabled: true),
  table-index: (enabled: true),
  listing-index: (enabled: true)
)

= Testing Acrostiche Package
#import "@preview/acrostiche:0.3.2": *

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

Acrostiche is a #acr("WTP")! This #acr("WTP") enables easy acronyms manipulation.

Its Main features are auto-expansion of the first occurrence, global or selective expansion reset #reset-all-acronyms(), implicit or manual plural form support (there may be multiple #acrpl("WTP")), and customizable index printing. Have Fun!

#print-index()

If you're referring to the way the acronyms index is displayed in comparison to how Ilm displays its index of images, tables, and figures then that can be solved with minimal effort. Take a look at the lib.typ file and see how Ilm formats its indices. You can then customize Ilm to show the acronyms index in a similar style.

As for adding built-in support for this to Ilm, I don't think that it is a good idea because I'd like to keep the template minimal (after all that is what it is intended to be). If I start adding support for custom packages then it will be really difficult as each user has their own use-case and I can't add support for all of them.

I hope you understand :)

danieljfarrell commented 4 months ago

Thanks for the tips!

If you're referring to the way the acronyms index is displayed in comparison to how Ilm displays its index of images, tables, and figures then that can be solved with minimal effort. Take a look at the lib.typ file and see how Ilm formats its indices. You can then customize Ilm to show the acronyms index in a similar style.

So I will fumble around there, yes, I just wanted the list of acronyms to appear in the table of contents. I am new to typst.app but I think that must be in the template code you pointed at.

I'll close this.

Thanks