mirror of
https://github.com/olivierkes/manuskript.git
synced 2024-06-16 18:04:33 +12:00
Created How to Export with Manuskript and Post Process with Calibre (markdown)
parent
8af9a65e7a
commit
f9e498267a
104
How-to-Export-with-Manuskript-and-Post-Process-with-Calibre.md
Normal file
104
How-to-Export-with-Manuskript-and-Post-Process-with-Calibre.md
Normal file
|
@ -0,0 +1,104 @@
|
|||
# Introduction
|
||||
A guide on how to process your Manuskript project(book) into a proper E-Book. Here, I'll teach you everything about processing the project using Calibre. Follow along and let's go.
|
||||
|
||||
# What you Need
|
||||
First, the requirements for this are:
|
||||
Manuskript app, you can download it here. Even though, if you are reading this, you may already be using it.
|
||||
Finished Manuskript project, if you are reading this, you may have it finished already.
|
||||
Calibre E-Book Manager. Calibre is a free app to manage, process files into ebook form and convert files between devices. Download at [Calibre Website](https://calibre-ebook.com/).
|
||||
Pandoc Format Converter. Manuskript requires this to convert your project to formats beyond its scope of work. Download at its [official website](https://pandoc.org/).
|
||||
|
||||
# Understanding Manuskript and Pandoc Exports
|
||||
First, let's understand what formats Manuskript can export to:
|
||||
Manuskript exports to Text(TXT), HTML, Markdown(simple webpages) and OPML(mostly used to fetch news).
|
||||
Now, for Pandoc:
|
||||
It extends Manuskript's capabilities to export to Markdown, LaTeX(TeX format), HTML, EPUB(best format), Open Document (OpenOffice and Libre Office), DocX(Word 2010 and above), reST(never heard of this) and OPML(fetch news).
|
||||
Pandoc has MANY more formats it can export to, but you need to use its own command-line utility for that.
|
||||
|
||||
# Exporting From Manuskript
|
||||
Before exporting, please check your Manuskript texts to see if there aren't ANY markdown tags(like *[italics in Markdown]). This should be done in the editor window. Re-read your text files to see if you spot any markdown tags.
|
||||
|
||||
With that done, press F6 to open the Compile(Export) menu. In this, we will do another cleanup.
|
||||
|
||||
In Export To, select EPUB(ePub).
|
||||
|
||||
Right below the EXPORT TO dropdown, click the CONTENT menu, which will open the Content mini-window. In this, marked folders will show up as headers(titles) in your exported document. Be sure to mark all Text File levels(1, 2 and 3). Mark the folder levels you want.
|
||||
|
||||
Next one is Splits, but you leave as is, as we will do Split through Calibre.
|
||||
|
||||
Next one is Transformations. This is one of the key functions in this guide. Apply the transformations below(MD means MarkDown):
|
||||
|
||||
Replace `\n(new line in MD)` With `<p>(paragraph in HTML)`;
|
||||
|
||||
Replace `##(chapter marker in MD)` with `<h2>(heading 2 in HTML)`.
|
||||
|
||||
Next one is Pandoc, but, leave this one as is. If I see anything better in this, I'll update this guide.
|
||||
|
||||
Final one is Preview, which there is no use for us, as Pandoc doesn't provide a file preview.
|
||||
|
||||
The final step in this is to click EXPORT and save your EPUB file in a good folder.
|
||||
|
||||
TIP: Create a EXPORT folder in the folder where your MSK file is.
|
||||
|
||||
TIP 2: Or, you can export your EPUB file in the same folder as the MSK file.
|
||||
|
||||
With the export done, check the folder to see if the file exported successfully.
|
||||
|
||||
# Messing With Calibre
|
||||
Next, close Manuskript and launch Calibre.
|
||||
|
||||
Import your EPUB file by clicking ADD BOOK. Then, go to Preferences, Common Options, Look and Feel, Styling tab.
|
||||
|
||||
In the text box, input the styling text below:
|
||||
|
||||
`body { margin: 0; }`
|
||||
|
||||
`p {margin-top: 0pt; margin-bottom: 0pt; padding: 0pt; text-indent: 15pt; text-align: justify;}`
|
||||
|
||||
`h1 { text-align: center; }`
|
||||
|
||||
`h2 {text-align: center; font-weight: 600; font-size: x-large; padding-bottom: 20pt; page-break-before: always;}`
|
||||
|
||||
`h3 { text-align: center; padding-bottom: 20pt; font-weight: 600; font-size: xx-large }`
|
||||
|
||||
`h4 { text-align: center; }`
|
||||
|
||||
`h5 { text-align: center; }`
|
||||
|
||||
`h6 { text-align: center; }`
|
||||
|
||||
`img {text-align: center;}`
|
||||
|
||||
This styling text above will set your book to the best look. Go to Structure Detection, click the Chapter Mark dropdown and select Page Break. This will insert a page break(start a new page) at every chapter. Click Apply and Close.
|
||||
|
||||
Restart Calibre and right click your book, then click Convert Books.
|
||||
|
||||
In the conversion Window, go all the way to Search and Replace.
|
||||
|
||||
In Search Regular Expression, input `</h2>`. In Replacement Text, input `</h2><p>`.
|
||||
|
||||
This replacement will create a paragraph for the first block just after the title.
|
||||
|
||||
Then, click OK. Calibre will open up a job in its job manager(lower right corner of the screen). The conversion may take a few seconds(HTML to
|
||||
EPUB) or minutes(to PDF). The time also depends on how long your book is.
|
||||
|
||||
Once the conversion is complete, select the book and Press the V key on your keyboard to view the book. V key is the standard VIEW BOOK key in Calibre.
|
||||
|
||||
After conversion, Calibre will rename the old EPUB as ORIGINAL_EPUB and the new file as EPUB. Pushing V will open the EPUB file(it's the default, unless there is no EPUB format).
|
||||
|
||||
ATTENTION: If you are converting a HTML document from yWriter or other editors, leave Chapter Mark as Rule(inserts a line at the end of a chapter).
|
||||
|
||||
This Calibre Chapter Mark configuration is only for Manuskript books.
|
||||
|
||||
# Making it Permanent
|
||||
If you don’t want to keep changing the Chapter Mark and Search and Replace settings in Calibre do these steps:
|
||||
|
||||
1. Click Preferences, then click Common Options.
|
||||
|
||||
2. Click Structure Detection.
|
||||
|
||||
3. Click Chapter Mark and select Page Break.
|
||||
|
||||
4. Click Search and Replace. In Search Regular Expression, put `</h2>`. In Replacement Text, put `</h2><p>`.
|
||||
|
||||
5. Then click Apply and restart Calibre.
|
Loading…
Reference in a new issue