The new feature in version 0.4 of Mark Book Builder is the ability to import Markdown books. The most common reason to import a book is to import a book from Scrivener, a popular writing app. In this article you’ll learn how to import Scrivener books into Mark Book Builder.
Step 1: Compile to MultiMarkdown in Scrivener
Open your book in Scrivener. Choose File > Compile to open the compiling window.
Choose MultiMarkdown from the Compile menu at the top of the window. Click the Compile button to start compiling. A Save panel will open for you to choose the location to save the book. Click the Export button to finish creating a MultiMarkdown version of the book.
Step 2: Open the MultiMarkdown Book in a Text Editor
In the Finder navigate to where you saved the compiled book and open it in a text editor. If your Scrivener book contains images, the compiled book will be inside a folder with the same name as your Scrivener project. The image files will also be in that folder.
Do not open the book in a word processor like Pages or TextEdit. If you do not have a text editor installed on your Mac, the following free text editors will work:
When you open the book in the text editor, make sure the first line of the text file is not the start of the first chapter in your book. The following text shows an example of the first chapter in your book:
# First Chapter Title #
Mark Book Builder imports Markdown books by creating a Title Page chapter that contains all the text before the first chapter. If the first chapter is the start of the text file, the Title Page chapter will contain the first chapter, Chapter 1 will contain the second chapter, Chapter 2 will contain the third chapter, and so on. Your chapters will be off by one.
If the start of the text file contains the first chapter of your book, add a blank line at the start by pressing the Return key. By adding the blank line, the Title Page chapter will be blank, and the rest of the chapters will import correctly.
Step 3: Import the Book in Mark Book Builder
Now you’re ready to import the MultiMarkdown book in Mark Book Builder. Choose File > Import. Select the MultiMarkdown book from the Open panel and click the Import button.
Mark Book Builder creates a Title Page chapter that contains any front matter, such as the book title and author. Choose Book > Edit Title and Author to set the book’s title and author. The app also creates a chapter for each chapter in the book. The titles are titled
Chapter X, where X is the chapter number.
One thing to check is for the following text at the end of each chapter.
Those four dashes indicate that a line should be drawn as a separator for chapters. The four dashes are part of the MultiMarkdown syntax, but Mark Book Builder can’t work with them. You will see error messages in a published EPUB book if you keep them in the text file. Remove the four dashes from each chapter
Mark Book Builder’s importer works best with novels and similar books that are mostly paragraph text. I have noticed the following problems with the MultiMarkdown books Scrivener compiles:
- Section headings are not imported so they appear as paragraphs.
- Unordered lists have bullets instead of asterisks so you have to remove the bullets and either add asterisks at the start of each list item or select the entire list and choose Tags > Unordered List.
One limitation in the current version of Mark Book Builder is the image tags in the chapters will not appear in the book. An image tag looks similar to the following text:
You will have to manually create image tags by choosing Tags > Image. Don’t forget to remove the tag that was imported. Keeping the imported tags initially makes it easier to know the file name and where to place the image tag in the text. Automatically creating the image tags is something I want to add before releasing version 1.0 of Mark Book Builder.