-
Notifications
You must be signed in to change notification settings - Fork 12
Description
I have added support for arbitrary placement of text:
The above image is from a new example that use these changes. The user defines a list of "frames", four-tuples with x-position, y-position, width, and height that they want the text to flow through. These can be given to skeleton.frame_layout() which uses them to create matching columns. The big change is that now the algorithms are flexible enough to deal with the columns suddenly changing size, which didn't really work previously.
My fork is at https://github.com/tophatpanda/python-typesetting, and I'd be happy to open a pull request if you like my changes.
Changes:
- Made changes to
knuth.pyandtexlib/wrap.pyto make their algorithms handle a changing column-size halfway through a paragraph. - Added a new
frame_layout()toskeleton.py. composing.pyhas improved handling of single-line paragraphs.- I changed
document.pyand the py-londinium example a little bit by moving the conversion of inches into mm into the example'stypeset.py. I wanted to use millimeters for my new example to easily set the page size to A4. setup.pywas missing thetypesetting.texlibpackage.- The new example uses Lovecraft's short story "Dagon" (which is out of copyright) as a kind of expanded lorem-ipsum.
Thank you for such a well-thought out library (and a great presentation to match :). I'm not that used to GitHub, so I'm anticipating that you may want me to tweak things :P.
