noob user, just trying to get my head around things and I’ve run into a problem. Hopefully it is a simply fix.
So I am writing in Markdown/MMD within scrivener. eg. my headings and sub-headings use;
This is a Second Level Heading
etc.
When I tried to compile a document as an ebook, there seems to be no transformation of my headings and other markdown code, so I get the hashtags etc. in the text.
Hopefully I am just missing some tickbox or something - can anyone advise how I go about exporting my markdown text into ‘formatted’ text in this way?
In my experience the epub compile uses the titles of the documents as headings, not any text within the documents. To convert from MD to something else, I think you need to export/compile from MD to Word or rtf or something like that.
Scrivener does not have an default output for MMD EPUB, so you will need to do some kind of post-processing. Can you explain specifically what you are doing at the moment to get to your EPUB?
I would suggest looking at Pandoc, which has a very flexible conversion system for converting raw MMD directly into EPUB (and countless other formats), without needing any intermediary format like RTF. In this kind of workflow you Compile to Multimarkdown, then use Pandoc to generate the EPUB.
I’m using Scriv 2.5 on an earlier Mac system, but I don’t think the compile function has changed all that much. Here’s an approach to try. Use the MultiMarkdown compile option to create an .html document. Either run that through pandoc (using terminal and the command line “pandoc filename.html -o filename.epub”; --or-- my favorite is to use Calibre (free for download) as a great ePub output and editing program. Add the filename.html file from your Scriv output to Calibre, and then choose ‘convert’ to ePub. (Note that Calibre also has a very good ePub editor built in for tweaking the ePub file.)
Actually, I’ve not bothered with .html in Scriv at all; I select the 'compile for Plain Text (.txt) option; that gives me a manuscript text file with my markdown codes intact. (I rename it filename.md.txt to indicate a markdown file). Calibre has a preference setting for “Input” to accept markdown text directly. Use Calibre’s ‘convert’ function to produce an ePub file. Tweak the meta data settings to suit.
(Calibre to accept .md input: go to Preferences–>Input Options–>TXT Input. See the “Structure” boxes. Set Paragraph style: to ‘off’; set Formatting style: to markdown. Under “Common” mark the Preserve spaces box. Bottom half of option screen, see the “Markdown” window of check boxes. Check the ‘toc’ (table of contents) box; the others are optional.)
Note that once you’ve created an .ePub version in Calibre, you can choose the “Save to Disc” menu (see the little triangle for several output options).
I’ve had great success with this; the ePubs I produce this way all validate.
Instead of creating a new post, I’m digging up this one.
With Scrivener 3, is there a more effective way to write in Markdown and export an .ebook?
I’m also using LateX notation for statistical notations.