Open jlaurens opened 11 months ago
This issue has been automatically marked as stale because it has not had recent activity.
Did one of your suggested improvements to \ShowHooks
touch on this?
According to section 2.6 Generic hooks provided by packages of lthooks.pdf,
babel/⟨language⟩/afterextras
is a generic hook, but that is not what gives\ShowHook
The last paragraph of section 2.6 Generic hooks says (bold style added by me)
Generic hooks defined in this way are always normal hooks (i.e., you can’t implement reversed hooks this way). This is a deliberate limitation, because it speeds up the processing considerably.
So it seems to me it works as expected that code
\ShowHook{babel/french/afterextras}
\ActivateGenericHook{babel/french/afterextras}
\ShowHook{babel/french/afterextras}
writes to log
-> The hook 'babel/french/afterextras':
> The hook is not declared.
> The hook is empty.
<recently read> }
l.5 \ShowHook{babel/french/afterextras}
-> The hook 'babel/french/afterextras':
> The hook is empty.
<recently read> }
l.7 \ShowHook{babel/french/afterextras}
@josephwright
PR #1250 is related to this bug/feature request but does not fix it.
PR #1250 is still a draft PR as long as I have no positive agreement on the concept there.
The documentation must be modified accordingly because it also refers to the output of the old \ShowHook
and IIRC some test files are missing.
@muzimuzhi
Paragraph 2.6 is not crystal clear, my interpretation is that locally "normal hook" only means "non reversed", it does not mean "non generic". In particular, applying \ActivateGenericHook
to a hook that is not generic seems contradictory provided the command name does refer to "activating a generic hook".
@jlaurens I think we had no issue with the core idea in #1250 - but it needs to be focussed just on that change.
@muzimuzhi Paragraph 2.6 is not crystal clear, my interpretation is that locally "normal hook" only means "non reversed", it does not mean "non generic". In particular, applying
\ActivateGenericHook
to a hook that is not generic seems contradictory provided the command name does refer to "activating a generic hook".
Maybe "generic" hooks other than cmd
, env
, file
, include
, package
, and class
need a new name, like semi-generic hooks or so.
Or call cmd, env, file, include, package, and class related hook "builtin generic hooks" and call the other generic ones "custom generic hooks"?
Brief outline of the bug
According to section 2.6 Generic hooks provided by packages of lthooks.pdf,
babel/⟨language⟩/afterextras
is a generic hook, but that is not what gives\ShowHook
Actually, hooks are either
Either
\ActivateGenericHook
should make the hook generic if it is not already a generic hook, or the correct hook categorization should beand
\ShowHook
only recognizes thebuiltin generic
.The documentation should be amended in both cases.
Minimal example showing the bug
Log file (required) and possibly PDF file
2.log