Refactor the kata environment for more flexibility and better intuition #33

Merged
lukas merged 18 commits from refactor-forced-formatting into main 2026-04-13 08:02:30 +00:00
Owner

solves #32

Topics:

  • section
  • marginline
  • \vfil before the first step

Todos:

  • (re)write docs for kata and kataRaw
  • write docs for /kata/kata/styled
  • add keys for /kata/setup so /kata/kata/styled keys can be set globally too -> use \kataSetup in the examples to make \begin{kata} shorter and also demonstrate how it probably usually looks like (maybe override keys in the extended example though)
  • think about how to test all the new keys
  • should \IfBlank* be used in plain newcommand (see beltmargin)?
  • docs for kataSection (remove the one for section command)
solves https://git.atticus-sullivan.de/lukas/kata/issues/32 Topics: - [x] section - [x] marginline - [x] `\vfil` before the first step Todos: - [x] (re)write docs for `kata` and `kataRaw` - [x] write docs for `/kata/kata/styled` - [x] add keys for `/kata/setup` so `/kata/kata/styled` keys can be set globally too -> use `\kataSetup` in the examples to make `\begin{kata}` shorter and also demonstrate how it probably usually looks like (maybe override keys in the extended example though) - [x] think about how to test all the new keys - [x] should `\IfBlank*` be used in plain `newcommand` (see `beltmargin`)? - [x] docs for `kataSection` (remove the one for `section command`)
lukas self-assigned this 2026-04-10 10:29:08 +00:00
also now `first` is almost neutral by default and is kinda required to get
the proper grid output.
Thus, remove the `first (step)` key and tie the respective `if` to the
value of the kata@step counter.
Author
Owner
see also https://github.com/atticus-sullivan/kata/pull/15
Author
Owner

Idea for later:

  • use sockets for the "hook" executed before the first step. With the fixed (and guarded) amount of parameters, this is quite the perfect fit for this case (avoids spilling/leaking content if the user-supplied macro takes too few arguments or eating additional tokens if the user-supplied macro takes too many arguments). The only drawback is I want users to easily customize the packet. Right now sockets are not well known which makes it less easier for the user to customize when using sockets over simple macros/pgf-keys
  • similar case for the \kataSection, but here templates might be a better fit (not quite sure though)
Idea for later: - use [`socket`s](https://tug.ctan.org/macros/latex-dev/base/ltsockets-code.pdf) for the "hook" executed before the first step. With the fixed (and guarded) amount of parameters, this is quite the perfect fit for this case (avoids spilling/leaking content if the user-supplied macro takes too few arguments or eating additional tokens if the user-supplied macro takes too many arguments). The only drawback is I want users to easily customize the packet. Right now `socket`s are not well known which makes it less easier for the user to customize when using sockets over simple macros/pgf-keys - similar case for the `\kataSection`, but here [`template`s](https://tug.ctan.org/macros/latex-dev/base/lttemplates-doc.pdf) might be a better fit (not quite sure though)
lukas merged commit 8918ffc73e into main 2026-04-13 08:02:30 +00:00
lukas deleted branch refactor-forced-formatting 2026-04-13 08:02:30 +00:00
Sign in to join this conversation.
No description provided.