I had to substantially rework the add_configuration function because it hadn't worked so far (no idea why it could slip through ...).
What happens now is that if a formatter is updated that had originally been added to another client (such as the built-in formatters) the Formatter object is updated and an additional reference is created in the current client's formatters list. So in the next round of Templates:add it will be detected and a macro created if necessary.
Its clear that this works to create a macro from a previously hidden formatter, but I have to investigate what happens when that formatter was already published, i.e. a LaTeX macro had already been created.
I had to substantially rework the
add_configuration
function because it hadn't worked so far (no idea why it could slip through ...).What happens now is that if a formatter is updated that had originally been added to another client (such as the built-in formatters) the
Formatter
object is updated and an additional reference is created in the current client's formatters list. So in the next round ofTemplates:add
it will be detected and a macro created if necessary.Its clear that this works to create a macro from a previously hidden formatter, but I have to investigate what happens when that formatter was already published, i.e. a LaTeX macro had already been created.