Paragraph => Tabs and Indents (very confusing for ePub 3)

I tried this more time than I can count. It’s pretty simple. But I always get the same bizarre results.
All I’m trying to do is put 0.25inch indents on the Left and Right side of the paragraph.

When I click OK this is the results I get. What am I missing?

1 Like

All ruler measurements are calculated from the left margin. So your “right indent” actually resolves to the same ruler location as the left indent.

What specifically are you trying to do? Is this a single exceptional paragraph, or are you trying to set the width of your standard text block?

Thanks for you quick reply. Yes, I’m trying to create a “a single exceptional paragraph” that is indented on both the left and right sides. What would be the best way to accomplish this for an ePub format?

Also, if the right indent “resolves to the same ruler location as the left indent” when formatting for a printed book, wouldn’t that require the exact page size to be specified somewhere?

Custom CSS can do that. Sample file attached. (56.4 KB)

.block-quote {
  margin: 1rem 15% 1rem 15%;
  text-indent: 0rem;

Thanks @sobs ! I opened the sample file. Looks good. Though… I’m not sure where you put that Custom CSS code. When I searched for CSS in the Scrivener User Guide, there were 42 references. Most in regard to Layouts. But there were no Layouts defined in the sample file.

From what I read, I get the impression that the CSS formatting only comes into play, during Compilation. But there are no CSS editing options in the Compile Overview window. I did notice though that the default “Compile for” drop down menu in the Compile Overview was set to “ePub 3” which leads me to guess you did define this as an ePub document somewhere. Maybe that’s where the CSS code was inserted?

Thanks for you help on this.

The easiest way to do this (using GUI tools) is to use a style, and then set that style up to mirror your left indent to your right indent automatically. Scrivener will handle the CSS for you.

  1. Set up your format to look the way you want in the editor. Don’t worry so much about the compiled look right now, this is just for you. Match your first line and left indents for a “block indent” look.
  2. Use the Format ▸ Style ▸ New Style from Selection menu command. Give it a name, and set it up to store paragraph styles alone, probably with the font and font size checkboxes disabled.
  3. Now to set up compile, go to File ▸ Compile... and double-click the compile format you are using, in the left sidebar, to edit it.
  4. In the Styles tab, click the + button and select the style you created.
  5. Now here is where the measurements matter, but only worry about the left side. Instead of managing the right side, tick the Match right indent to left checkbox in the upper right area.

We added this setting specifically to address the awkwardness between measuring techniques, between RTF and HTML. As noted above, RTF measure from the left of the margin, which isn’t terribly good for HTML. It’s a fixed measurement that can give you weird results on a large tablet vs a phone, etc. This setting causes the offset to measure from the right of the screen, which is exactly what you want.

To answer your question about where to put custom CSS:

While you’re in the compile format designer window, you’ll see a CSS pane as well. If you’ve already done the above, then scroll through the “Default Stylesheet” column on the right. Look for the name of your style, converted to lowercase and with dashes instead of spaces. For example if you called your style “Indented Paragraph”, you’ll be looking for a line starting with .indented-paragraph. You should find Scrivener is doing roughly what was advised above for you.

So, if you did wish to take the manual CSS route so you have more control, and can do things the GUI cannot, you would probably not worry about creating an entry in Styles, and just type in the .indented-paragraph { ... } line yourself in the left column. But you can mix and match too, given how CSS works. Scrivener can set up the indents, then you can come along and add additional rules. That’s of course all more advanced usage though.

1 Like

The zero mark is the left margin. In your example, both the left and right indents were set to “0.25 inches.” Since they both use the same zero, this meant they were both set to the same location, leading to the result you saw.

Yes, setting a right indent in this manner will give strange results if the page size changes, which is why we recommend using one of the other methods discussed in this thread.