lualatex-tools / luaformatters

Creating macros for LuaLaTeX packages
GNU General Public License v3.0
0 stars 0 forks source link

Automatically create marcros from templates too #6

Closed uliska closed 5 years ago

uliska commented 5 years ago

I just realized that it should be possible to create automatic macros from templates too:

One problem I see is that the macro arguments would be in the order of the appearance of the field in the template, which may not always be desirable.

Similar to the coloring the template can be defined not as a string but as a table (but not an array but an association table) with the following fields:

uliska commented 5 years ago

Question: is that worth the effort or can all of this conveniently (better) be handled through the mapping tool?

uliska commented 5 years ago

Answer: No.

Essentially it is not worth the effort since encoding the stuff would be equally complex as encoding a mapping. Plus, the same would be necessary for formatters as well - which behave slightly differently and would thus require yet another round of parsing ...