Single Document Compile with Title on Header

Hi guys,

I’m having an issue when trying to compile a single document using placeholder tags on a header. Basically, I’m trying to put the title of that document on the header, along with the pages.

I found this thread, which clarifies that you cannot use a document tag on a header (such as <$title>, <$parenttitle> and <$label>, all of which I used during my failed attempts). Fair enough, but one tag that works on headers, which was always my default setting when compiling folders and not files, is <$compilegroup>, and this works well, although in my case it’s not relevant.

Now, my reaction was to try to limit the “compile group” to that single document, but I found that the pull down menu on the Contents section only allows for documents which have something subordinated to them, and not single files (so you can select them on the main screen, I guess, but I wonder why this is limited in such a way)… bummer. Another attempt was using the “Current Selection” option on that same pull down menu, but then the <$compilegroup> tag would just output “Current Selection” on my PDF (is this intentional? Again, I wonder why?). I didn’t try “Search Results”, but I’d guess it wouldn’t do any good either.

I know the easiest way out would be to just print the single document, or export it and finish it on a word processor, but I wanted to check if there was a way around this issue that I haven’t thought of.

Thanks,

Tomas

It’s limited because Compile isn’t intended for exporting single documents (you can do that via File > Export) but for compiling multiple documents, and having every single document in that list for a large project would make the feature more annoying to use for most users.

Yes - because if you’re just exporting or printing the current selection then it tells you so in the header.

The only way to do what you want is to type the title in the header manually rather than use a variable.

Out of interest, why are you using Compile to export or print a single document instead of File > Export > Files… or File > Print Current Document?

All the best,
Keith

Presumably Keith’s suggestion would be the easiest way, since you’re only exporting one document anyway. But if you wanted to save the compile settings or something, you could go a more complicated route and use <$compilegroup> as you were, but just make the document you want to compile a subdocument of an empty item with the same name, and then deselect the “include in compile” box for that container. You can then select the container from the contents drop-down menu and carry on as before.

…If the case is just that your entire manuscript is one document, either because you just worked that way or merged everything together, you could always just change the “Draft” item to be the title of the manuscript and then compile that. But I’m assuming your case is more complicated than that.

Thanks for the replies.

@Keith,

I’m using Compile instead of Print Current Document because the text needs to be processed for standard manuscript format (Brazilian standards, specifically), and it’s wildly different than the formats I use when writing in Scrivener; sometimes there’s even requirements for what should be on the headers, which I’ve not found a way to customize when using Print Current Document / Page Setup. Since it’s something I have to do separately for many different documents over the course of this year, I figured I’d try to make a custom preset out of it, but I understand if this is not possible.

Also, I agree that if the Contents pull down menu, in its current form, listed all documents, it would be more annoying. But I still don’t see the reasons why single documents should be excluded from using the compile feature, which is much more powerful than printing or exporting.

@MimeticMouton

I hadn’t though of that, actually. It’s a workaround, but it works just fine, thanks!

Regards,

Tomas