命令钩子与包钩子,哪个更好?
在为我的包设计钩子接口时,我发现我有两种定义钩子的方法: \documentclass{article} \begin{document} \section*{Method 1: Use Command Hooks} \NewDocumentCommand\MyPkgSomeHook{}{} \AddToHook{cmd/MyPkgSomeHook/before}{hello} \AddToHook{cmd/MyPkgSomeHook/before}{world} \UseHook{cmd/MyPkgSomeHook/before} \secti...