guard hooks / config macros #36
Labels
No labels
breaking
component
memoize
component
tagging
effort
high
effort
low
effort
mid
moscow
could have
moscow
must have
moscow
should have
outcome
done
outcome
not planned
type
bug
type
chore
type
docs
type
enhancement
type
org
type
refactor
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lukas/kata#36
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Currently there are several places where the user defines arbitrary code. For instance
\kataSection-> macro with one argument/kata/step/before first-> code with no argument\kataStepCnt-> macro with one argumentThis approach is not entirely reliable. The user might define code which "eats" more tokens than expected leading to unexpected (and hard to debug) behavior. On the other side the code can also take too few arguments leading to spurious content placed in the document.
Several (new, modern) solutions to this problem exist:
sockets define sockets and plugs. A socket just defines an interface with the amount of arguments. A plug is some arbitrary code (written for that socket) which fits that interfacehooks are defined places where other component can add code to. Usually they don't have arguments (though arguments are possible). The specialty is that hooks are designed to handle multiple components adding code and the different code-chunks get sorted according to some rules.templates are something like the generalized concept ofsockets. The docs read like templates are more thought of being defined byLaTexand the being instanciated by packages/classes (not by the document author). But this feeling might also be wrong.So
sockets would probably the perfect fit.Though, most users probably don't know how to work with
sockets (yet). Thus I reverted to the more simpler (though not entirely "secure") version with concepts much more idiomatic in LaTeX right now.see also #33 (comment)