[reportlab-users] Styling within platypus flowables

Nick Moffitt nick+chordlab at zork.net
Sat Feb 1 09:36:53 EST 2014


Hello, I'm looking to write something very like chordlab

https://github.com/kaj/chordlab/blob/master/chordlab

Now, chordlab uses raw canvas rendering to lay out lyrics with
superscript chord names, and does a pretty good job. I find, however,
that some of the page layout problems it runs into could be solved more
effectively through use of platypus. In particular, I often find that
new columns overwrite the page heading, and an actual column-based page
layout template could help here.

But the lyrics aren't as "flowable" as paragraph data, really, and there
are some cursor positioning tricks the author of chordlab used to pause
word rendering and hop up a line temporarily to print the chord name.
Additionally, I'd like my version to support an optional rendering mode
where small copies of the fingering boxes can be displayed above the
lyrics as well, as an aide to novice players.

Most of the examples I find online don't get beyond throwing raw
<i>tags</i> into the Paragraph object's string payload, and I'm finding
the user guide rather daunting without the aid of some added context.

As an aside, part of my real goal for rewriting chordlab is to
better support ukulele chord boxes. ☺

--
"N'aimez pas votre voiture?
Alor, l'heure est arrive pour la brulé!"
-- Mark Jaroski


More information about the reportlab-users mailing list