Back in March, I gave a brief update on the status of my “Poetry Book” project, which I’m tentatively titling A Year in Verse. I intended for that to become a monthly feature until near release, but then there simply wasn’t any more progress to report. Now there is, so it’s time for another update.
You may recall from my post back in March that there are two packages for poetry,
poetrytex, both of which work reasonably well. Each has its own strengths and weaknesses, so I’ve been working with both in parallel … but that meant two parallel copies of all the poems with slight differences in markup.
Until the last week or so.
The first of the breakthroughs I had this week was the “unification” of nearly all of the code. To accomplish this, I created a sort of compatibility layer of commands and environments for each version of my book to make it understand or ignore the incantations (so to speak) the other package needed. For example, while both make the user wrap each poem in a
poemscol needs each stanza wrapped in a
stanza environment, but
poetrytex does not, so I defined a dummy
stanza environment in the version for
poetrytex that passes its text on unchanged. And
poemscol calls for ending each line with a command saying it’s the end of a line of verse, while with
poetrytex I had to use an ordinary hard-line-break, except that
poetrytex also doesn’t do what
poemscol does to prevent orphan and widow lines, so I had to occasionally make those hard-line-breaks the “never put a page break here” variety. In the version of the collection using
poetrytex, I defined
poemscol‘s verse-line-end command to mean a line break, and created a similar command for the no-page-break variant. And in the other version, I defined that alternate command to be identical to the ordinary verse-line-end command, since
poemscol does well enough preventing widow and orphan lines on its own.
And so on; those are only the first and simplest of the incompatibilities I solved. Once I had the “main matter” of the book mostly identical, I worked to do the same to the “preamble,” the header that’s about the document but not really part of it. There was much less that I could do there (since I am, after all, using a different package in each document, and each has different dependencies), but I took the opportunity to add some explanatory comments.
Once I gave up on that, I took advantage of the bulk of the files being identical and pulled that identical text out into a single file, which both versions of the collection could “include” by reference. I then split that up into several smaller files, one for each section of the book.
The other major advance has to do with illustrations. While can’t natively handle SVG, as I’d hoped, I did find a tool that can convert images from SVG to code, the generated code using a drawing library that had already been installed on my machine as a dependency of some other package. This should let me include not-too-complicated illustrations (I found one, but haven’t actually put it in yet) in my collection to accompany the poems, and include them in the same set of directories, without violating my general rule of not putting non-text files in version-controlled directories. We’ll see how this goes, and what sorts of illustrations I can find.
None of this has really addressed any of the issues I identified in March. I still haven’t written the dedication, foreword, or afterword (though I did make sure there are placeholder sections for them in both versions, I think), nor have I written or set up for any critical text to accompany any poems. And while keeping what little I had gotten done with indexes working was a major hurdle I had to deal with while implementing my “compatibility layers,” I haven’t made any new progress there either. Nor have I done any revision or polishing of the poems. And the only progress on artwork is finding a way to include it, and one interior illustration.
Any thoughts at this point?
As mentioned in the comments below, I’d intended to attach sample pages from what this looks like at the moment. Here are some pages from the version using
poemscol, and some pages from the version using