I'm currently getting into ConTeXt, mainly to experiment with MetaFun. I want to get a feeling for how usable it would be to generate some sophisticated diagrams I have in mind. I have a hard time to wrap my head around some concepts, so I'll try to get started with a hopefully simple question:
Assuming I have a list of three strings: "short", "a bit longer", "a much much longer string". I want to plot those strings below each other from top to bottom, each having a box around them. All boxes should have the same size, so the longest string defines the box size for all of them. The strings in the boxes should be centered.
Obviously this requires the size of the longest string to define the width for the other ones. And then the size of those strings to center them.
Is that possible in MetaFun? I don't see how to solve that "inside" MetaFun, but with an "external" code generator I would not be able to determine the size of the rendered strings upfront. Is Lua the solution?
If that's possible at all, could somebody point me to an example or a good starting point in the docs?