As I was mentioning in an earlier blog entry, the part of the FeedJournal project which I have been feeling most insecure about is how to design the algorithm for laying out the articles in the newspaper. This is a critical step for a number of reasons: it has to look like a newspaper, it has to read like a newspaper, and it has to be pretty (the output PDF is essentially a part of the FeedJournal GUI).
Anyway, I am happy to report that significant progress have been in this area. I developed an algorithm which dynamically creates a newspaper with customizable:
- number of paragraphs
- paper size
- spacing between rows and various article elements
I have also implemented support for a headline font size which is a function of the article's importance/size
Together with the masthead (newspaper lingo for the first page logotype) the whole creation starts to look pretty snazzy, if I get to say it myself.
The algorithm implementing the layout is pretty simple, but efficient. First, I gather the collection of articles which are due to be published in the upcoming issue. I sort these according to size/importance
In one of the coming blog posts I will attach a sample PDF file to showcase FeedJournal.