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
65 stars 9 forks source link

Locale #4

Closed mescobal closed 5 months ago

mescobal commented 5 months ago

The language is harcoded to English (ie. the word "Contents"). It would be nice to change it according to language settings.

talal commented 5 months ago

If you want Typst to use your language setting for the heading of table of contents and bibliography then you must specify the language before the ilm function:

#set text(lang: "es")

#show: ilm.with(
  ...
)

I double-checked to see if the above would work as expected and I found a bug where the bibliography was using the correct heading but table of contents was not because of the default value. I have fixed it in https://github.com/talal/ilm/commit/4316bd0af72eac3e1727159f63dabfa2e7fb9ee9

Please wait until https://github.com/typst/packages/pull/615 gets merged or as an alternative you can copy the latest lib.typ in your project.