Robert A. Beezer, David Farmer, Alex Jordan, Mitchel T. Keller
One of the more complex pieces of code in PreTeXt, by most accounts, is that used for positioning objects (frequently <image> and <tabular>, but also <p>) next to each other. If you've tried to do this in LaTeX, you know that it can be challenging on a good day. Fortunately, PreTeXt does the heavy lifting for us.
We include two examples here. The first places the <sidebyside> directly in the current division and places a <figure> with a caption inside the <sidebyside>. The second puts the <sidebyside> inside <figure> and then uses an <image> not contained in a <figure> to include the graphic. It's possible to do all sorts of nesting and get nice subnumbering automatically. More information on the capabilities of <sidebyside> can be found in Section 4.21.
We can put a paragraph here. Yes, a paragraph. Isn't this the most exciting paragraph that you've ever seen? It goes on and on and on and on and on and on. We want to put enough here to make it wrap, really, is all. Let's hope that this is enough.