Running headers from titles in the document


I’m sure this must be existing, but I can’t find it. Scrivener has a native variable/placeholder for running headers (<$pageGroupTitle>). This gets the variable text from the actual name of the document.

However, I don’t use the actual name of a document in the output. The English name remains unchanged even in the translated documents, so that the project’s structure remains readable even with languages not everybody is supposed to know.

For example, I might have a document’s name in English, and the title to be output, as a styled heading inside the document, in Japanese.

I can’t find a way to use the styled headings as placeholders for running headers. Does a native variable exist? Or, is it a workaround to simulate it?


There is a placeholder for custom metadata.
Surely you have to type that alternative title somewhere…

1 Like

If you search for “<$pageGroupTitle>” in this forum, do the answers solve your problem?

The only solution that could somewhat work, that I’ve found in my search, is the same proposed by Vincent.

However, this has a few problems:

  • You have to enter the metadata for each document. They are not even inherited by nested documents, so all of them have to be compiled and then translated.

  • When exporting the documents for translation as, say, DOCX files, the metadata are saved into separate documents, and have to be manually entered again.

It doesn’t look a viable solution, since it would take a huge amount of time, and be prone to errors.


I believe they can be, using the proper combination of placeholders.

Yes. But why don’t you compile instead ?

If you don’t compile, forget it, there is no solution. (Or at least that I can think of.)

1 Like

Because translators need the source file, not the compiled one. Their output must be returned as source file, to be later compiled for the project in the corresponding language.


Are not DOCX files output from Compile identical as output from exporting DOCX from the Editor?

As far as I can understand, exported files don’t go through the scripting and replacement of the Compile command. But please correct me if I’m wrong.


The compiler does only what you tell it to do.

You can tell it to (don’t tell it to do anything – use a compile format that does nothing or close to) leave things as is, but process your specific replacements.

Any other way, if you don’t compile, don’t bother yourself with placeholders…

In fact, I don’t want my translators to bother with placeholders: they must ignore them and leave them unchanged, and return them to me untouched.

When compiling the translated project, the placeholders will be resolved by the Compile command. For this, they must remain as in the original text I sent the translators.


You could write them as <$&somethingsomething>, which should render them inoperant — and therefor compile as text —, and later use project replace to have <$& become <$

So this way you could compile, and have whatever placeholder you’d like to do their job at this stage work.
All you’d have to do for those is to write them properly, without the extra &.

Those that you break on purpose (<$&) will come back to you (from whoever you work with) just as ready to be tweaked and operate as they left. (Assuming whoever you work with doesn’t mess them up…)

That’s an interesting trick. However, there is another problem that I didn’t consider in the previous post: Compile assembles a monolithic file, while Export preserve the original structure of separate files and folders.

I need this latter for the translators, since (a) a new project must preserve the same structure of the original when translated, and (b) updates will have to be done on individual files ro snippets, and not on the full, compiled project.

Export looks like the correct procedure in this case, to me. It’s the original code, minus the metadata. Maybe there is an export format that can preserve metadata?


There’s an option to include metadata in the exported file. What happens to it after that will depend on the destination tool.

1 Like

The checkbox I find in the Export dialog seems to only create a separate sidecar .txt file (Filename Metadata.txt). This file seems to remain separate when going back into Scrivener.

Are there ways to force the Export command to include metadata right into the exported file?


As of now, what I’ve found is that you can add a “Metadata” document at the beginning of a group of documents. Or does this only work with folders?

I’ve not yet been able to test it. It doesn’t seem to work with exported documents. I don’t know how to check it with a compiled project.


Well, you can certainly use an editor outside of Scrivener to incorporate the metadata file into the main output file.

But the fundamental issue is that the metadata is just text to any application other than Scrivener. There’s no way to say “this is metadata, treat it differently” to other applications, and therefore no way to flag it in a way that Scrivener will recognize when re-imported.