export text with headings and separator

I want to export a series of sections, each with the heading (what is written in the binder) plus the associated text. I want to have a section separator so that each pair of heading + text is by itself AND that the section separator is also printed
e.g.
SEPARATOR: Binder Title: text
SEPARATOR: Binder Title: test

ALL of the ‘triplets’ would then be exported as a single text file.

I have tried to do this in compile and have got nowhere. I even tried to make a custom format, but could not get what I wanted.
How can I do this?
Many thanks
Don

Is no one willing to try and answer this question, or is it just not possible to do.

This should actually be quite straightforward, although if you want the separator on the same line like that then I would use a Section Layout prefix rather than an actual separator. Try this:

  1. In Compile, click on “+” beneath the Formats list and create a new Format.

  2. In Section Layouts, select “Text Section” (you can delete the other Section Layouts if you don’t plan on using them).

  3. Tick “Title” next to “Text Section” so that titles and text are included.

  4. Switch to the “Title Options” tab at the bottom.

  5. Tick “Insert title as run-in head”. This will put the title on the same line as the text.

  6. Enter a colon in the “Title Suffix” area, so that a colon is placed after the title.

  7. Switch to the “Prefix” tab (not the “Title Prefix”, but the “Suffix” tab next to “Formatting” / “Title Options” / “New Pages”).

  8. Enter "SEPARATOR: " (or whatever you need the separator to be) in the “Section prefix” box.

  9. Save the Format (give it a name first if you want).

  10. Click on “Assign Section Layouts…”

  11. Assign the “Text Section” layout to whichever Section Type your text documents are set to use (e.g. “Section”).

  12. Click “OK”.

  13. Compile.

That will result in compiled text that looks like your example, e.g.:

SEPARATOR: First Doc Title: First doc text.
SEPARATOR: Second Doc Title: Second doc text.
SEPARATOR: Third Doc Title: Third doc text.

It’s then just a matter of refining the Compile Format settings to make the text look how you want it.

All the best,
Keith

This is partially what I want, but not quite.
I am getting
What I am getting is

Blank line
Formatted text from the Main Window (which is NOT the same as the Binder text title)

Blank Line
Formatted text from the Main Window…

There is NO obvious separator

I NEED the separator to be obvious and I want the Binder title text as well
The final file should be called whatever.txt
then

XXX Binder title
Main Window Text
XXXBinder title
Main Window Text

My first query should have been more explicit as to my aims .

Basically I want to be able to export parts of my Scrivener file to another program (Index Card), that has as a separator the text ### indicating where a new card should begin. At one time there was a translation program for Scrivener to do this, but with the recent release of Scriv 3 and also a newer version of Index Card, this translation program seems to have gone. However, I can import files by using a text file with a separator for each new card. I want to do this so that I have a title for the Card (which will be the same as the text in the BINDER window), plus the text for the card, which will be the same as the text in the MAIN window of Scrivener.

THUS:
In the Binder, there is text stating indicating an idea of the content of the main window.
In the Main Window, there is text.
I need to make a file that has an obvious separator IN the text file: e.g. ### (this tells Index Card that it should start a new card), then the Binder text (which will become the title for the Index Card), and finally the text in the window.

How do I do that?
Many thanks.

Sorry, I’m a bit confused by your reply - did some parts of your reply get missed out? If you followed my instructions, you would have got results exactly like you asked for in your first post. I’ve attached a sample project that was created by following my earlier instructions. Look at the binder and the editor, then Compile using the “Separator-Title-Text” Format. Is that not what you were after? That does what you asked for in your first post…
SectionsTest.zip (73.4 KB)

Your program worked fine with your file. I changed your file Separator from SEPARATOR to ###. Saved the file in a folder and then imported it into my file. Then tried it with mine, no luck. NO ###. Went back, downloaded your file again, saved the command file to a folder, opened up a small version of my file (attached) and tried it. No luck. If I entered data into YOUR file (Binder title) Main Window text, Worked fine. ???

SO: I am attaching the Separator file AND a small portion of the file I am trying to export. I really don’t know what I am doing wrong.
Does it matter if the EXPORT is in the DRAFT section or the RESEARCH Section. I tried both.

ALSO, when it does work, the window text should start on a new line. When I tried it with your file, everything was on one line. How do you put a new line command in.

This would give me
SEPARATOR: Binder title
NEW LINE: Main window text.
SEPARATOR: Binder title
NEW LINE: Main window text

Many thanks
Don
SepTitlTxtDWS.zip (228 KB)

It all worked fine in your project for me. I imported the Compile Format, then used “Assign Section Layouts…” to assign “Text Section” to all three Section Types in the project and it worked. Attached.

I’m not sure what you mean about whether it matters whether the export is in Research or Draft - Compile operates on the Draft folder.
TextOutProblem.zip (239 KB)

That works.
Many thanks for doing this and being so patient about it.
Don

Great, glad you have it working!