Jinwen-XU / create-theorem

Initializing and configuring theorem-like environments, with multilingual support
https://ctan.org/pkg/create-theorem
LaTeX Project Public License v1.3c
5 stars 0 forks source link

Configuring the theorem names per language instead of per environment #5

Closed Jinwen-XU closed 2 years ago

Jinwen-XU commented 2 years ago

The command for naming the theorem-like environments currently works like this:

\NameTheorem { application }
  {
    , heading =   {
                    , english     = Application
                    , french      = Application
                    ...
                  }
    , crefname =  {
                    , english     = {application}{applications}
                    , french      = [l']{application}[les]{applications}
                    ...
                  }
    , Crefname =  {
                    , english     = {Application}{Applications}
                    , french      = [L']{application}[Les]{applications}
                    ...
                  }
  }

It was originally designed this way to make it easier when adding new environments - instead of adding the code here and there, one only needs to add a bunch of code in one place.

However, this approach is very inconvenient for maintaining language files. Instead, it would be nice to have a new command \NameTheorems with the following syntax:

\NameTheorems { english }
  {
    , heading =   {
                    , theorem        = ...
                    , proposition   = ...
                    ...
                  }
    , crefname =  {
                    , theorem        = ...
                    , proposition   = ...
                    ...
                  }
    , Crefname =  {
                    , theorem        = ...
                    , proposition   = ...
                    ...
                  }
  }

In this way, the names can be maintained per language.