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

Check whether external commands involved are defined #4

Closed atxy-blip closed 2 years ago

atxy-blip commented 2 years ago

Discussed in #3:

I am aware that the LaTeX2e kernel provides only the \newtheorem command, while \newtheorem* and \theoremstyle are implemented by amsthm or other similar packages. The absence of the very commands would generate weired error messages in the terminal. Maybe create-theorem should check the presence of those and prompt messages?

Jinwen-XU commented 2 years ago

With Update 2022-08-05 (2717cba13f0a2d8b2ad8edbb5df64d2f4679543c), you will see the following error message if a proper backend is not provided:

Package create-theorem: A backend (such as "amsthm") is needed to
(create-theorem)    provide the commands "\newtheorem(*)" and
(create-theorem)    "\theoremstyle" with the usual behaviour.

(Internally it just check if \theoremstyle is defined so it might not be very accurate. However I'm not able to come up with a better approach for the moment.)


The key qed for Q.E.D. symbol now works with ntheorem (but you need to load it with the option thmmarks). Since your project uses ntheorem previously, it should not cause much compatibility issues if you use ntheorem as the backend. However, considering that I have no real-life experience with ntheorem, there might still be some issues for create-theorem to work with it. Feel free to open a new entry if you find such incompatibilities ;)