Removing highlighting from margins

Hi—

Certain text in my manuscript appears with a background highlight colour (set with a character style called “Highlight”).

Additionally, there are sections of the novel—determined with a section layout called “Memoir”—that appear as a centred column, with large right and left margins.

Unfortunately, when Highlighted text appears in the Memoir sections, the background highlight carries over into the margins, making things look really weird after a Compile.

How can I set this up so that the highlighting doesn’t bleed into the margins?

Here’s an example of what I mean.

Thank you for your help!

Ultimately, how highlighting is displayed is up to the text engine doing the layout. If the document you compiled is opened in a word processor that displays background highlighting in this fashion, and you want it to look another way, then it’s probably not the right tool for the job. I think in general text highlighting isn’t going to do what you want, because it’s not a field background colour like you seem to be wanting (I’m not sure of that, as I mainly just see it described what you don’t want). It’s a tool better designed for emulating what one would do with a real highlighter (funnily enough) on paper. Gaps between lines and paragraphs are expected, for example, because it is the text being highlighted, not the paper colour being filled in.

What might be the best course of action is to use your style as a more basic marking tool, rather than trying to get it to look right, to use it as a way of saying which parts of the text should look a certain way, and then establish what that way looks like, using the desktop publishing tool or word processor’s mechanisms for handling this in a more elegant fashion.

For example I would use paragraph styles for this instead of character styles, because paragraph styles will have more options for background fills behind them whereas character styles traditionally don’t do anything about the stuff around a paragraph, including its whitespace areas. So if I create a paragraph style for this (using Scrivener’s style highlight feature instead of actual text highlight), and compile to RTF, and then open in LibreOffice, I can do something like this:

  1. Open the Styles sidebar, right click on my “Paragraph Highlight” style and select “Modify”.
  2. In the Area tab, select Colour and choose something.
  3. Also of interest may be the Border tab, where you can add a little padding so that text doesn’t jam up all the way to the edge of the box, and as well Indents & Spacing if you don’t want the box to go all the way to the edges.

In the attached sample project, I’ve created a paragraph style which is applied to a couple of paragraphs in “section a”. As you can see it looks nothing like the intention, but that’s fine—as I say we’re only marking things in the writing phase, not formatting them.

The other example is invisible as it is the “memoir” binder item, which is using a “Memoir” Section Type. The way the compile is set up will apply this “Paragraph Highlight” style to all text within such sections.

If you examine the compile Format itself, you’ll also see that “Paragraph Highlight” as a style is set up to look exactly like “Body” does, which is being applied to normal text throughout. So when you compile this to RTF, you won’t even see the styled text—and that’s fine, because that means less to undo in the word processor.

As for that, I’ve attached an example that is touched up using some of the techniques described above. As you can see, the result is far superior to using a highlighter behind the text. Even if it doesn’t look exactly like what you want in the example, you can see where you can go with this, and how the way it works is much more in line with having sections of text with a different background colour.

highlights_as_boxes.zip (163.3 KB)

Hi—I really really appreciate this thorough reply.

I hadn’t been able to figure out a way to use Scrivener’s Paragraph Styles for this purpose as the Highlight (character) style sometimes occurs for single words or phrases within paragraphs that are otherwise normal. As far as I could see, paragraph styles could only be applied across whole paragraphs.

Am I mistaken? If not, the only solution I see (so far) is to split up Highlight into two styles: a paragraph style (applied for whole grafs) and a character style (applied when it’s just one phrase). This is awkward and inconsistent but if you can’t see another way through I may give it a shot.

Okay, yes if it is being used more like an actual highlighter, on some words and phrases here and there, then it needs to be a character style as you originally went with. And in that case it goes back to what I mentioned earlier, about rendering of highlights being up to the text engine displaying them. Here is an example of some character style highlighting being applied to multiple paragraphs, and then compiled to a section type that offsets the text with an indent, with the final result displayed in LibreOffice:

As you can see, it doesn’t bleed into the indent area, but it does still skip over paragraph breaks (and it would skip over line breaks if we were increasing the leading).