A shift in the way I write

Yes, dear reader,

I am aware that this post might not be as intriguing as one about a new book but this is something so different and new I want to tell ‘the world’ about it. This is about writing. Yes, I needed to add that, didn’t I?

Writer’s Café

Writer’s Café used to be my ultimate writing tool. It runs on every PC platform, Mac also. I wrote a lot using that program and I’ll defend it until the very end. But at times something comes along that just stuns the words and paragraphs out of me. And one of those times happened last week. It’s called

pandoc markdown

Right, what is markdown? Markdown is a way to ‘format’ flat text. In formatted text one uses italics, bold text, and even underlined text. With a plain text file like you make in Notepad or vi that’s not possible. Unless you use markdown. Markdown comes in several flavours, LaTeX is a famous one. I use pandoc. It’s less versatile than LaTeX but that makes it much easier to learn and use. How does markdown stuff work?

Suppose you want to write something in italics in this text way. You simply put asterisks around the text. So *italics* becomes italics. This also works with bold, you just add 2 asterisks: **bold** becomes bold.

You can also add a code for e.g. a chapter header. Simply put # in front of it. E.g. #Chapter 1.

Advantages

The main reason for this is the ability to write anywhere, on anything. If I am on a PC I can use a plain text editor to write. When I have my Android tablet with me I can write the same stories without having to worry about converting it to some other system and lose something in formatting. Even if I copy a text file to my office iphone I can simply carry on with the story.

But what about creating real files for books?

That is where the real power is hidden. It requires a lack of fear from the dos prompt (or x-terminal in Linux) but making a Word .docx file from all the chapter text files is simple (note that I saved all the text files with an .md extension, for clarity):

pandoc *.md -o story.docx

That will collect all the *.md (md stands for MarkDown) files in alphabetical order and create a Word document called story.docx.

This is how that looks on my Linux machine:

Create it:
paul@Kelutral:~/BTSync/Schrijven$ pandoc *.md -o story.docx
Show it’s there:
paul@Kelutral:~/BTSync/Schrijven$ ls -l *.docx
-rw-rw-r– 1 paul paul 50908 aug 4 16:55 story.docx

Even more magic is there: you can create an epub from those files the same way:

paul@Kelutral:~/BTSync/Schrijven$ pandoc *.md -o story.epub
paul@Kelutral:~/BTSync/Schrijven$ ls -l *.epub
-rw-rw-r– 1 paul paul 55257 aug 4 16:58 story.epub

Do you need a webpage that shows the first 2 chapters? Just feed pandoc the names of the first 2 chapters and let it do the legwork:

paul@Kelutral:~/BTSync/Schrijven$ pandoc DeJongeHeks01.md DeJongeHeks02.md -o story.html
paul@Kelutral:~/BTSync/Schrijven$ ls -l *html
-rw-rw-r– 1 paul paul 22509 aug 4 16:59 story.html

There we are. No problem. Creating a PDF, a Kindle file, all that works with pandoc.

Maybe all this looks complicated and scary for those who are used to using nothing but Scrivener or Word, but I thought it worthwhile to show you there’s more out in the world than those programs. If you like to be versatile then this is worth looking into.

Leave a Reply

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