Export highlighted text only?

I am writing a long technical document, the basis of which is a bunch of research. Some are PDFs of papers, others are imported interview transcripts in the form of Scrivener documents.

I’m using the highlighter tool to code different passages in my research—ie yellow is topic 1, red is topic 2, etc.

How can I export JUST the highlighted sections? I see that I can “find by formatting” but that only lets me see one passage at a time.

Is there a way to either export or compile all the highlighted text, ideally by color? (That is, export all the text highlighted in yellow, representing topic 1.)

You can’t export only highlighted text, but you can split your project up so that the highlighted sections are in separate documents, and then export those.

Katherine

Seems like a great feature to have. I have highlighted areas of my books which I use for description. It would be sooo handy to export just these highlighted areas so that I can keep a track on how well I am adding descriptions throughout the book.

Rather than just highlighting, consider using Inline Annotations (Scriv. manual, Sec. 18.2.1).

There’s a command to export them (from Scrivener’s menu bar): File > Export > Comments & Annotations (Scriv. manual, Sec. 18.4.3).

To my mind, if one is using a visual tool like this to code or tag text as being meaningful and potentially functional, then Styles would be a better tool for the job than pure highlights. Styles can of course apply the highlight (though they also have a built-in highlight mode that may work better for what you’re doing, in that they won’t print, they are editor-only markings).

Where styles are interesting is that when you create a compile Format, you can set up a rule for that style in the Styles pane that deletes the text of it. Consequently a Format that deletes all of the text except for the text assigned to one particular style, would accomplish what you are looking to do.

I’ll admit it’s a bit awkward—that function wasn’t really designed for what you are doing, but it will do it, whereas highlights won’t. So there’s that. :slight_smile:

You can download a simple example project. In that I have tagged three lines as being “Topic One”, “Topic Two” and “Topic Three”. If you run a quick test compile you will get a text that print only the line tagged with the “Topic Two” style.

A few notes:

  • The preview column is a bit strange looking. That’s because the Section Layout that I put together assigns a style to all text in the project, and then that style is deleted. So when Scrivener generates a preview, it deletes the preview. :slight_smile:
  • In the Styles pane, not each listed style is marked with Delete text of this style.
  • Lastly, and mainly of interest in why I’m using .txt here and not .rtf or something: the Processing pane has a little voodoo going on in it that is stripping out all empty lines from the output. Without that, Scrivener won’t be deleting the paragraphs themselves, only the text within them, leaving large gaps between tagged instances.
  • To switch to only printing “Topic One”, you would simply go into the Styles pane and change which style isn’t being deleted. You could even print two styles at once—and with those “Prefix” fields you could even mark which text is which topic.