I am writing a commentary book made of about 500 pages, where each page contains up to 3 sections (different commentaries on the same verse), "a" "b" and "c". In each page, the content length of each section is different: in page 1, for example, there may be a long "a", no "b", and a short "c"; In page 2, there may be a medium "a", a short "b", and a long "c", etc.
I would like to layout the sections on each page, so that the page area is used efficiently. Here is an example of a NON efficient layout, that I want to prevent:
aaa bbb ccc aaa ccc aaa ccc ccc ccc
As you can see, there is a lot of wasted area.
Initially, I tried to create columns and control their widths according to the content length, for example:
aaa b ccccc aaa b ccccc aaa b ccccc
This is more efficient, however, column "b" is too narrow and difficult to read.
Another thing I tried is to keep the width constant and use floats. For example, suppose I only have columns "a" and "b":
aaa bbb aaaaaa
If I had only two columns, this could be quite simple:
- If a is much longer than b, then make b float right;
- If b is much longer than a, then make a float left;
- If they are approximately the same length, then make them two adjacent columns.
However, this becomes much more complicated when there are 3 columns, as there are many possible combinations.
Is there a general solution to this problem?