Scrivener / Document titles / Markdown Header
I'm a Scrivener user and I currently test Marked 2 for the first time (thx for the job).
Just one question : When I use "Include document titles as Markdown headers", the hierarchy begins with
. It's annoying because I use Pandoc as custom processor (for pandoc-citeproc) and I usually use --number-sections.
but the result is :
0.1 Document title 1
0.1.1 sub-document title 1
0.2 Document tiltle 2
I have tried to use --shift-heading-level-by=-1 but a error occurs.
How can I fix it ?
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by Brett on 03 Dec, 2019 01:52 PM
I don't know what structure Pandoc expects, but semantically a document
should not have more than one h1 in it. There should be a title as h1,
and then chapters marked as h2, which is the way that Marked handles it
by default.
I take it that --number-sections expects every section to have an h1?
I'm also not sure how pandoc handles shift-heading-level, but if it
offers anything equivalent to MultiMarkdown's "base header level",
setting that to 2 would fix the issue for you.
-Brett
2 Posted by Jo on 04 Dec, 2019 05:37 PM
Thx for the answer.
To be more accurate, two command can be used with Pandoc.
--shift-heading-level-by= & --base-header-level=
When I try "--shift-heading-level-by=-1", a message box appears with :
When I try "--base-header-level=2", it doesn't work either. Without the command Header Level 2 was 0.1. With the command, it becomes 0.0.1 (see below).
I'll pursue my research.
3 Posted by Jo on 05 Dec, 2019 08:50 AM
Solved.
It will sounded stupid but I just realised that Pandoc wasn't updated on my system.
"--shift-heading-level-by=-1 Command" only works with Pandoc 2.8.
I've upgrade and now it works.
Support Staff 4 Posted by Brett on 05 Dec, 2019 02:33 PM
Excellent!