@Hagus: Is there any way I can assign those html levels to paragraph styles?
Absolutely, the HTML header level is an attribute that is saved into paragraph styles (and in fact the default “Heading 1” and “Heading 2” styles are set up as you would expect). Once you get your heading set up, put the cursor anywhere within it, and use the Format/Style/New Style from Selection...
command. Alternatively, if you’ve already got one in the works, use the “Redefine” option right below it.
Thank you also for your advice on writing directly in markdown. I’m not sure if I could completely follow your explanation. But I assume you’re just using the binder to assign titles?
It’s a matter of choice, but yes that is one way of doing things. How I most often generate a Markdown document is by using the binder structure, the headings you see in the outline, to generate hashed headings according to nesting depth—so it’s all fluid as I develop the topical outline further, move things around, promote growing sections to chapters, and so forth. Scrivener handles that aspect automatically by default, so all you need to do is set your compile settings, in the middle preview column, so you are using Layouts that include a sample “# Section Title #” line in them. Preview aside, it will adjust the actual number of hashes on the fly for each section.
You can of course also type them in yourself, either exclusively or in combination. Some don’t like to use lots of outline detail, so for example they’ll let the compiler handle levels one and two and then add “### Further Headings” into the text flow itself.
The main reason why I not to export to markdown is citation. I’m adding pandoc style citations from my reference manager (Zotero). Those look like [@Ingram_2011_FoodSystemsApproach] and a readable by Markdown applications like Zettlr. The strange thing here is that if I compile I will end up with \ around them like [@Ingram_2011_FoodSystemsApproach] .
That’s exactly the kind of complication that is introduced by converting WYSIWYG text to Markdown with that option. Since square brackets are special characters, the compiler escapes them all because it presumes you know nothing at all about Markdown and really meant to print a bracket for the reader to see.
Now there is an option right below the Convert rich text to MultiMarkdown setting that you might have missed, that disables that conversion. That might work for you, but just keep in mind that with that option enabled, Scrivener assumes you will be using no Markdown at all. You can blur the line a bit with further configuration, but I would generally say you should only go down that path if you really want to also use Scrivener’s native export formats as well. To be honest we really built this setting for people who don’t use Markdown at all to be able to take advantage of its extended file type capabilities. One could get LaTeX for example, from a fairly standard “word processor” style of working.
As to your larger question, I’m not super familiar with citations in Pandoc, but I would recommend looking up Scrivomatic when you have a moment. It’s a set of scripts designed by a member of the community here, which has the goal of streamlining Pandoc production, similar to how Pandocomatic does, but with further customisations to Scrivener’s compile setup itself. It does have a bit of a separate learning curve, but it may be worth the effort depending on what all you need.