Poetry Book project update

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 \LaTeX packages for poetry, poemscol and 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 \LaTeX 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 poem environment, 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 \LaTeX 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 \LaTeX can’t natively handle SVG, as I’d hoped, I did find a tool that can convert images from SVG to \LaTeX code, the generated code using a drawing library that had already been installed on my machine as a dependency of some other \TeX 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?

Edit:

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 poetrytex.

Advertisements

4 thoughts on “Poetry Book project update

  1. Hi,
    Using LaTeX is a very hard way sometimes. I recently tried to use LaTeX for creating business documents but it was quite hard. Basically, I hacked the title page and used some packages like fancyhdr for changing the headers and footers of my page.
    You can see my blog entry on this subject: http://wrey75.wordpress.com/2013/07/29/latex-here-we-are/ The .tex includes many stuff related to headers, spacing, boxes and geometry. Hope it can help (even not related to poetry!).
    I tried to find a preview of your current work (I mean a draft of your PDF LaTeX output) but I was unsuccessful. In any case, I am quite interested in your progress on this hard task.
    By the way, thank you for pointing the SVG –> TikZ tool.

    • As I mentioned in my previous report and should have said again here, I’m not yet willing to publicly post my output. I do, however, have an “excerpt” (or, rather one for the poemscol version and one for the poetrytex version) I created by pulling a couple of pages out of each (using pdftk) that I meant to attach to this post but forgot to. I’ll do that momentarily.

      After looking at your post, while I downloaded your sample code and will take a look at it, I doubt I’ll learn anything of real use to me at this point. The only really non-standard or non-straightforward things I’m trying to do in my project are typesetting poetry, using the same code with two incompatible packages, drawing images rather than just copying in a raster image, and creating indexes of poems and subjects. But for the moment—trying to get the text “right”—I’m content to live with the default title page and mere placeholders for front and back matter.

  2. Stumbled across this today; thanks for all the bug reports to PoetryTeX; I hope your collection is going well.

    For typsetting the verse itself I recommend the `verse’ package. PoetryTeX is compatible with it (there’s a package option to load verse and I try to make a point of not re-using any of their APIs), and I assume poemscol is too. Might even help you with your integration of the two (since neither poemscol or poetrytex is really designed for typesetting verse; just for making a collection out of it).

    You should consider throwing your integration code up online somewhere; it would be nice to have a place to point people who want to use PoetryTeX and poemscol together.

    • Thanks for stopping by.

      I’ll look into the verse package. The “default” for either of the two packages I’m using is good enough that I’m not urgently in need of something specialized, largely because most of my poetry is nothing more than blank verse “verse paragraphs.”

      Unfortunately, the poemscol documentation says that “Unfortunately, poemscol is not compatible with the memoir class and the verse package, because they share some command names. I am preparing a workaround for this problem.” I also note that it puts everything between the \begin{poem} and \end{poem} into its modified verse environment automatically.

      I hadn’t noticed the verse option to the PoetryTex package; thanks for the tip.

      I have given some thought to publishing my “integration” code, as you call it, somewhere, and I agree that this would be a good idea. But it’s just a compatibility wrapper to unify the calling conventions. It’s still not possible to use them together, just to take the same document body and use it with either a preamble calling PoetryTeX or a preamble calling poemscol, without having to modify it in between compilations. But even so it would be well to make it available to others.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s