Let me first say that I’m in love with Scrivener and MultiMarkdown. These are wonderful tools, and 98% of what I need for my current projects works as it should.
Now here’s a problem I can’t seem to solve. I’m working with Scrivener’s internal links, because it’s easy to create, use and update them while still working on a project.
However, I can’t find out if and how Scrivener links can be converted into proper HTML links when compiling to MMD > HTML (and this is definitely the route my documents should take).
So the question is: Is it possible to have Scrivener / MMD resolve internal Scrivener links when compiling to MultiMarkdown -> HTML?
I would really prefer using these internal links to MMD’s own cross-referencing mechanism (which would require me to type the links explicitly and assign/remember unique label for all those “Overview” headlines).
In short: no, so I’ll share some of the tricks I use on a daily basis.
This is one case where you’ll need to use MMD’s cross-reference syntax. What I like to do is turn on the wiki style [[ + link + ]] detection in the Auto-Correction preference pane. MMD’s syntax uses square brackets, already, so creating a cross-reference to a section that is also automatically linked for you is pretty easy. You can also combine that with Ctrl-Esc, which invokes auto-completion suggestions for binder title names. Say you have a binder item representing a section, called “Feline Psychology”, and you wish to link to that using its section name, you could start like this:
And at that point hit Ctrl-Esc, select “Feline Psychology” from the drop-down menu, and finish typing with:
As soon as you get about half-way through that sequence, the extraneous square brackets will be automatically removed by Scrivener, and the text itself will become a Scrivener internal link.
Of course, if you prefer the mouse, Option-dragging the item into the brackets. Remembering the unique labels, I hear you on that score, but we’ve got something coming along in 2.1 that helps with this. It’s a quick find window where you can type in what you know of the title and get a list of results as you type, so it’s pretty easy to look up custom IDs that way.
I should clarify: I’m combining the Scrivener Link feature with MMD’s standard cross-reference syntax. So [Feline Psychology] is a normal MMD link to a section titled likewise. But if you type in [[[Feline Psychology]]] in Scrivener with wiki links on, the two inner square brackets are removed and create a link if they find a document titled likewise between them. The end result is correct MMD syntax, but with an internal link for your use as well.
The internal link is 100% for your convenience. It does nothing on compile, which is why you still need the MMD brackets around the link. They don’t conflict with each other. This doesn’t make internal links work with MMD. If you don’t find internal links useful while you are editing and writing, then you can safely ignore all of that bit and just use the auto-completion tip to speed up text entry in a standard MMD link.
I like having the links around though—I often use them to make sure a sequence of edits is consistent between related sections.