It uses the reference format so that it can record the image size as well:
[image_id]: filename.png width=144px height=280px
You do have full control over image syntax if you wish however. There is an alternate method that still affords you the compile automation of exporting the graphic into the compile folder, while providing the syntax yourself—useful if you need do supply additional attributes we don’t support, or if you want manual control over inline or precise reference placement.
The method is described in the Markdown chapter, under §21.5.1, Images, subsection “Reference Images with Document Links”. In figure 21.2, you can see some custom Pandoc syntax being used to assign a class to the img element.
Otherwise, the method I use in the script is perfectly fine, if a little ideologically messy. Both MMD and Pandoc will ignore invalid footnote and image reference IDs, so having the entire output’s list at the end of each file doesn’t hurt anything.
It’s section 21.4.1, but who’s counting. I had looked at that a number of times, including last night, but didn’t understand what it was telling me. (I often wonder, using Scrivener, whether I am as bright as I think I am. )
I’ll try it now … Yay! I made that work. At first, I missed the fact that the image has to be in the Binder already, though the text says that. Why? (I mention this in case it’s useful in revising the manual someday.)
I was confused because other than maybe playing with the tutorial, I’ve never put an image in the Binder before. So I thought I was to option-drag it from desktop or folder into Scrivener with the text in the parens selected. That of course is impossible. So, trying again, I went to binder pane, selected the gear, did Add > Existing Files … and then option-dragged into the markdown’s selected parenthesized text. Voila.
What would have helped me would have been just those instructions, maybe like this:
If the desired image isn’t already in the binder, add it using (idk) Gear > Add > Existing Files. It will show up in Research.
Create a conventional Markdown image link where you want the picture to appear, Put anything in the parenthesized place where the image file will go: ).
Select the text in the parens. (anything).
From the binder, hold Option and drag the image into the editor. The text (anything) will be replaced at compile time with the exported file name of the image. (Trust us on this.)
Anyway, I see how that approach works.
I’m with you that pasting all the references everywhere is a bit nasty but it’s also far more convenient in the long run, and makes the document during editing show the image, which is a big advantage. So, as I was planning before I read this, I think I’ll go ahead and enhance my Ruby script to do that copy, similar to how yours does it.
Oops, yes I was referencing section numbers from the latest revision for 3.0.3.
Thanks for the feedback, I’ll see about perhaps adding some cross-references in here for those unfamiliar with the tools being described.
It sounds to me as though you read the parenthetical hint on opt-dragging by itself; the core isntruction solely states that what we are doing here is creating a document link pointing to an image in the binder:
So perhaps the hint is distracting and I’ll just leave it to the cross-reference. There are several ways to create document links, opt-dragging is only one of them.