I am doing simple blog posts using Scrivener. In the Scrivener document I use Styles for headers and for bold, italic, etc.
I am getting inconsistent result when I compile for Multimarkdown. I simply want Scrivener to turn the RTF into Multimarkdown. In Scrivener the first two lines of the document are set as style Heading 1. In my formats, this is bold, cochin font, 18 pt. I would expect that both the first two lines of the compiled document would simply have a # to indicate they are Heading 1.
In one compiled document, the multi markdown code produced is:
Only Human
by Sylvain Neuvel
The first line is correct–heading 1. The second line is simply bold, so the font size is wrong.
For the second compiled document, (again, both the first two lines are Style Heading 1), the multi markdown code produced is:
# # # # # # # # # The Red: First Light
By Linda Nagata
Wrong on both lines this time. Any ideas about what I am doing wrong?
That looks like a bug to me, very easy to reproduce with two adjacent headings that are depending upon the HTML heading level setting to generate Markdown hashmarks. The problem can be just as easily avoided for now by using a different heading level, though that would to my mind be as illogical as using two chapter/part level headings right next to each other like that. Structurally and semantically, you’re saying there is an empty chapter called “Only Human” that is directly followed by a new chapter called “by Sylvain Neuval”. There aren’t many document formats where that would be a desirable result!
The way I’d approach it is by giving the second line a style, like “Author”, which if you prefer matches the look of Heading 1, but for Markdown uses the Styles compile format pane to turn this into something appropriate for the intended output format. For example with HTML, the attached demonstration project shows how we could do this:
The “By Author” paragraph is flagged with an “Author” style.
In the Styles compile format pane we added the “Author” style with the following ingredients:
[list][*] Treat as raw markup: we don’t want Scrivener to escape the HTML we’ll be adding here.
Prefix:
<p class="author">
Suffix:
</p>
[/*:m][/list:u]
We would then want to style this somehow with CSS. That can be done right in the compile settings, in the Metadata pane. Add a new keyword called “HTML Header”, and in the content area below, add some CSS like so:
Thanks for the workaround suggestions, Amber. I hadn’t figured out the conditions for seeing this, but now that I understand, I can work around it easily and still use the compile to Multimarkdown path.
Interesting comment regarding documents with adjacent headings. I have used this often and seen it often back in the day when I worked for a living. In this case, I am not using the headings to create an outline. The headings in this document are just for style–I want them bigger and styled and this is a simple way to do it with Markdown. I’ve always written Markdown directly in a simple text editor. I convert to HTML using Marked 2 (I like some of the options it gives me, like embedding images in the HTML, which makes publishing posts with small images quick and simple). I am on a mission to use Scrivener for almost all my writing, but this is the first time I’ve used the compile to Multimarkdown feature since I’m writing Blog entires.
I took a look at the project you provided. If I get into writing more complicated posts I’ll have to figure out how to this kind of stuff, but for now, I can continue to pretend my life is simple.