Tuesday Typesetting

A little progress, step-by-step.

1. Acquire your public domain source texts, preferably in two formats: a plain or marked-up version (e.g. EPUB) and a PDF scan for proofing purposes.

2. Use Sigil (or a similar application on your Windows or Linux machine) to open and edit the EPUB file; select the document’s text and past into your text editor of choice.

3. Clean up the source: [a] standardize/normalize (such as removing extraneous line breaks, inserting the same space between segments, and so on), and [b] if you’re using a Google Books (or archive.org) source instead of Project Gutenberg (as is the case here for me), correct OCR (optical character recognition) / scanning errors by comparing the plain text to the PDF. This will take a while.

4. You’ll use the ‘dramatist’ LaTeX package for typesetting the stage play / script. To that end: [a] mark up the dramatis personae (list of characters), which will give you shortcut functions for indicating who is speaking and for referring to characters by name (so, for example, whenever Hamlet speaks, you could have the shortcut ‘\hamspeaks’ and could refer to Hamlet in stage directions by \ham. When instead you want to refer to him as ‘Hamlet, Prince of Denmark,’ you only have to change the declaration in the dramatis personae; you still get to use \ham and \hamspeaks); [b] using the \[character]speaks shortcuts and \direct{[stage direction]} function, mark up the text line by line (if the text is already formatted in a clear fashion, you may be able to use a basic search-and-replace or some sort of regular expression to speed this up); [c] and finish by cleaning up other formatting, such as replacing three periods with ‘\ldots’, any double quotes with “ and ” as appropriate, and so on.

5. Finish up a draft of your LaTeX file by [a] adding any necessary dramatist-specific markup, such as ‘\begin{drama}’ and \end{drama}’ (along with ‘\act’ and ‘\scene’, etc.) and then [b] including your standard LaTeX markup and preamble (such as ‘\documentclass’, ‘\begin{document}’, and ‘\end{document}’).

6. Run through latex, xelatex, or pdflatex as appropriate or preferred. The advantage to pdflatex is that you can use the ‘microtype’ package to improve font handling and the like. Check for errors, proof the result, wash-rinse-repeat as necessary.

When I started teaching down here it was my goal to typeset a lot of old German dramas and such that I used in my classes. That’s how I first learned about the ‘memoir’ class and the ‘dramatist’ package. But I had little time before the semester began (a few days) and little free time one it began to really pursue this. I ran off some samples/examples, and began working on a few texts. I even prepared some Mendelssohn and Kant for one of my seminars, but soon I was far too far behind schedule to make it practical. “Next term,” I told myself.

That didn’t happen, but when I was preparing a Valentine’s Day gift for Ms. S. that first winter, I returned to ‘memoir’ and similar classes and packages for preparing a volume of poetry in translation. I loved the results of the typesetting, though I didn’t have time to perfect the printing and binding I would have liked.

Now I find myself combining those two projects in a sense … a gift, but dramas and prose rather than verse.

Beginning last night once Ms. S. went to work and continuing this morning as she slept I’ve managed to complete drafts of two works and so far I’m pleased with the results. Much fiddling still needs to occur, such as:

  • playing with work titles to get them formatted properly, on the right pages, etc.
  • playing with section headers and things like act and scene titles; each of the two works I’ve done so far as one-acters
  • creating more of an anthology by combining several works by different authors into a single volume
  • adding annotations of various sorts

I’ve done these things before in previous projects, but my LaTeX mojo is currently depleted and my skills are rusty. It will come back to me, but it takes a little time and effort.

About Steve

47 and counting.
This entry was posted in Various and Sundry and tagged , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *