Is there a way to include an image within a prefix?

I have a prefix set up for each of my sections. I am writing an anthology of letters - so I use a prefix to provide an “address heading”. Is it possible to include an image in such prefix - I struggled to see how?

[Might as well skip my post and move straight to @drmajorbob’s just below. ]

You’d have to make those images rather be the sole content of new separate binder documents (one image/prefix per document) ; and designing a section type / section layout combo for those new documents, have them be inserted just before (no page break) the parts you are trying (in vain, most probably) to make your images be inserted as a section-prefix to.

Another possibility would be to use the <$include> placeholder in the section-prefix field. But that is just off the top of my head. I have no idea if it would work or not. (I would actually think it as way more chances not to work than otherwise…)
And you’d have to create a new section type and section layout for each part preceded by one of those images anyways… no time saved there. That would only add some useless complexity to your project as well as to your compile format…

I’d say option “A” is by far your best bet. (Only one extra section type / section layout involved.)

(Note that, as you can probably tell by my formulation, I’ve personally never tried it.)

I use placeholders. For instance, <$img:<$Label>> in the prefix for chapters. It compiles as the image whose name is equal to the document’s label, where I’ve set each chapter folder’s label equal to the POV character for that chapter.

chapter headings, and all that

That’s an older, simpler version of what I do now, which is to keep the images external and use file URLs and a replacement rule to do the similar thing.

managing images in Scrivener

1 Like

Good to know that one can use a placeholder to play the “name” part inside another placeholder.
I learned something new today. :slight_smile:

Thanks for all the quick responses - I’ll give some of those suggestions a try!

Don’t waste your time with mine.
@drmajorbob just showed his way works, and without any of the technical problems I had foreseen.

Thanks @drmajorbob your suggestions worked a treat.

1 Like