I have never defined an entirely new environment in a LaTeX document - I have only ever modified existing environments to suit my purposes. Now, however, I suddenly have a use for an obscure environment, and have no idea where to start in creating it.
I am looking to define an environment in LaTeX where I can type text and equations in small connected boxes, so that the end result looks like a "tape", with each block containing equations and/or text and/or images. It also needs the following three additional properties:
If the length of the sequence of blocks exceeds the width of the page (excluding margins), then the first block that would have exceeded that length is transferred to the next line, and the tape continues from there.
The height of each block in a given line is equal to the height of the of the tallest block in that line, which is determined by wrapping around the tallest equation or text block with a small amount of padding.
The final block has the option of not having a box drawn around it.
Here is a picture of the sort of thing I have in mind:
As I mentioned above, I am beyond my skills here. Does anyone know how to make such an environment? Anything ranging from general advice on how to figure this out to the completed code I need to make the environment would be very much appreciated.
Thanks very much.