... now with 35% more arrogance!

Thursday, April 11, 2013

Layout Tutorial: Getting Ready

Finally finished Part I of the promised layout and design tutorial.

Layout Tutorial 1: Getting Ready

RPG hobbyist publishers, or any DIY publishers, need free, DIY solutions. Free software for layout and publishing certainly exists, but tutorials for free layout and publishing seem pretty scarce.

Maybe this will help.

Scope of the Tutorials

I want to focus on what amateur DIY RPG hobbyists typically write, which is mostly free downloadable mini-products distributed on a blog. A few may be writing articles for zines. A few of you may be writing longer products, to sell on Lulu or RPGNow, or under contract with one of the many small RPG publishers.

The creation process I'm promoting here is:
  1. Do your content first, once, and keep it the same across all formats. One master, many slaves.
  2. Avoid making design decisions, like where to place tables or what fonts to use, while working on content. Keep it separated.
  3. When thinking of design, think of structure first: What are your ideas? What order should they be in? How do you divide them into sections? Make the design fit the form.
  4. Don't clutter up the design with lots of font changes, tons of clipart, or micromanaging the position of page elements. Keep it clean and simple.
I'll Focus on widely portable formats: first HTML, then EPUB, then RTF, then PDF.

Step 1: Get Your Tools

Doing all your content first, in a single master document, means doing it in plain text. This keeps you focused on non-layout issues first; once you have something to lay out, you can do your layout.
And plain text means you need a plain text editor. Full-fledged word processors can save as plain text, but you have to remember to do so, and you must fight against yourself constantly to keep from fiddling with fonts, pagination, margins, or columns, as well as the horrible quirks of a word processor's invisible markup. It's safer to switch to a pure plain text editor.

I've used Linux and OS X, but my skills for those are years out of date, so I can't offer specific recommendations for a text editor. For Windows, though, I'm going to recommend TED Notepad, because it has a feature that's going to make some other steps much easier, closer to being fully automated.

The next tool in the layout and publication chain for all platforms is Pandoc, a command-line format translation tool. For Windows, TED Notepad will help you avoid the command prompt, as I'll explain later. For Linux or OS X, you can create shell scripts or workflows to handle specific Pandoc tasks. The Pandoc extras page includes several add-ons to make things easier for those not using TED Notepad, such as Droplets for OS X.

Pandoc can turn plain text into many things, including HTML and EPUB, but you will probably want an additional dedicated EPUB editor, Google's Sigil. It will make style sheet changes easier. A Windows alternative, SPAB, is supposed to make turning text and a cover image into PDF, EPUB, and Kindle books simultaneously into a one-click process, but I wasn't able to make it work because my version of Windows may be too old.

Pandoc will create a PDF for you, but only if you have a PDFLaTeX engine installed. The one I tried is MiKTeX, and I had absolutely no problems. It sets itself up, and the first time you use Pandoc to make a PDF, MiKTeX will download and install any additional components it needs from one of the TeX depositories. Linux people probably have a LaTeX installation that came with their distribution. For OS X TeX, I've seen recommendations for BasicTeX.

There may be additional tools that will be useful, but I'm going to focus on the TED > Pandoc > EPUB and TED > Pandoc > MiKTeX pipelines, with optional editing of ebooks in Sigil.

Step 2: Set Up Your Workspace

Install Pandoc, Sigil, and a TeX/LaTeX package onto any computer you plan to use for your work. Then, set up your workspace. Windows has that annoying habit of trying to get you to use C:\Documents and Settings\a whole bunch of other useless subfolders\ blahblah\username\My Documents for everything. That's going to be a problem when using a commandline tool like Pandoc, so I recommend going to the root/top level of the C: drive (or whatever you use for a data drive) and creating a new folder with a short name, such as \proj. On Linux and OS X, you create it in your home directory, so the path is ~/proj. Or, create a proj folder on a USB thumb drive and take your workspace from computer to computer.

In your workspace, I recommend the following folders to start:


The /proj/blog/ subfolder is an example of a specific project: articles you want to post to your blog. If you plan to submit articles to a zine, like Fight On! (better hurry...), you would create a /proj/FO/ folder to save your work in. If you write a larger project, like a module, you'd create a folder with a short name that is easy for you to remember: if it's about an ogre citadel, call it /proj/ogre/.

The /proj/books/ folder is not where you store stuff you are working on; it's for book projects you've finished and already published. Just drag or move your working folder into the books folder when you done to archive it.

The iconmap and pix folders are for graphics. Icons are stuff you're going to use across several projects, like logos, custom bullets/markers, and the like. A map is exactly what you think it would be in an RPG product. Pix are other graphics, such as cover images.

The std and template folders are for text and other non-graphic stuff that gets reused in many projects. Templates specifically are files that you modify for each project, such as a standard monster stat block. std, on the other hand, means "standard" (stuff that doesn't change) and includes legal boilerplate, contact information, headers, and style sheets (once you've figured out some standard styles.)

I saved the TED Notepad installation for last because you have the option of using the Windows installer or just unzipping it into some folder and making a shortcut. I did the latter, but I didn't do the smart thing and put it in the \proj\ folder. On Windows, it will work fine there, and if you accidentally forget to include a full path when using Pandoc from inside TED Notepad (you will...), you won't have to go looking for the file (it will be saved in whatever folder TED Notepad is in.)

I haven't tried it, but according to the TED Notepad website, it works under Wine on Unix. That means if you put TED and your project folders on a USB thumbdrive, you could potentially use TED on any computer. You'll have to read the instructions for Wine to set that up, though, because I've never done it.

Whichever way you decide to set up TED Notepad, or another plain text editor, open the editor for a test run. Start a new document, type:


blah blah blah

... And save that file as \proj\notes.txt (Windows) or ~/proj/notes.txt (OS X/Unix. Oh, how I hate Microsoft for inventing an alternative way to write directories...) Now, select from the TED Notepad menu Favourites > Add this File. If you select Favourites again, you'll see the file listed at the bottom. You can have up to 50 favorites, but you won't need that many, since you're really only going to need files you will be referring to a lot and all the files you're working on for a given long-term project. Once you've finished a project, you can prune the unnecessary favorites using Favourites > Manage List..

I think having a generic "Notes" document is a good idea. Since TED Notepad is a low-resources editor, you can keep it open to notes.txt while browsing websites, reading forums and blogs, or studying PDFs. Copy URLs and brief ideas to notes.txt, expand them as you think of more stuff, move snippets to separate files when they get longer, and delete stuff that's been finished. Originally, I was going to recommend creating a to-do.txt and progress.txt as well, setting up text filters to cut lines from one and append them to another file... but although that works, I found I never really followed those guidelines, so why should you?

In the next part of the tutorial, I'll cover working with Markdown and TED Notepad to produce the simpler RPG documents.


  1. Cool to see I'm not the only OSR-nerd using Markdown. I think the OSR community in general would benefit from that particular tool; makes it way easier to focus on content and writing.

    I actually included markdown source in my S&W Appreciation Day Appreciation module, if you're interested: http://infinitedragons.com/IDA0/

    1. Cool!

      Tomorrow's installment of the layout tutorial will be more explicitly about Markdown, although since you're already a Markdown pro, it won't be of much use to you. I'll mention, though, that if you haven't tried Pandoc's version of Markdown, you should. The way it does tables alone is a great addition. Plus, although I'm still exploring this part, it recognizes LaTeX fragments in Markdown, so that you can add extra layout instructions for the PDF version.

    2. I actually use MultiMarkdown for most of my stuff, which is quite similar to PanDoc I think. Also has tables support and LaTeX functionality, but seems to be better supported on the Mac. Sublime Text 2+MultiMarkdown+Marked is a geeky dream.

      Example MMD table: https://www.dropbox.com/s/zptdz7qculuaaov/094%20Table%20X-Y%20The%20Reaver%20-191-.txt