Formatting For the Web

Hopefully this question doesn’t have a painfully obvious answer.

I use Scrivener for two “types” of writing. Regular novel manuscript and web serial pre-publishing.

  1. Is there a way to set the formatting to automatically turn one “Enter” into two (standard web publishing format) -or- to make it so that the space between paragraphs if I hit a double enter isn’t quite so cavernous. I copy/paste into my wordpress to publish the writing, and it’s a pain to try and format it for publish there, even though it’s more pleasurable to write in Scrivener in the default formatting.

  2. Assuming there is a solution to 1) - is there a way to save that setting per project? Ideally, I’d like my novel to be in manuscript format and my web serial to be in web format without having to manually change the formatting between the two each time.

Thank you so much - Scrivener is an absolutely incredible app. It has transformed the way I organize my writing and notes.

Yes, I use double carriage-returns as well, because the MultiMarkdown exporter requires it for paragraphs. The best thing to do is reduce the paragraph spacing default to zero. This can be done in the Text Editing panel of Preferences. In the top section is a ruler setup where you can manipulate the default settings for all future documents. I prefer a 1.2 line spacing with zero paragraph spacing. It still looks more hefty than a 6pt paragraph spacing, but at least it isn’t as bad as the combined 12pts of spacing along with the space of the carriage return itself.

Second question: No, this is really a global thing. The general idea being that most people would change the project specific requirements (for different editors or publications) in the Compile format override section, and then stick with one favourite look for all of their “internal” drafting.

2.0 may provide a solution for 1), but that is a while off in the future, I’m afraid.
All the best,

Hey Amber, queen of all knowledge†

Wouldn’t setting the wordpress css to something like

*.p {
   padding-bottom: 2em;

eliminate the OP double enter solution altogether? I think that the content section uses an id tag in WP to *.p might be better done as id.p.

Am I close?

I am still trying to get all the css stuff down.

[size=75]† Anyone who thinks this is a condescending insult clearly has not read some of my other posts recognizing Amber’s amazing knowledge acquisition.[/size]

Well, it depends on the existing layout; I’m not really familiar with WordPress, but margins are generally a better way to space paragraphs than padding because margins will collapse when adjacent to other margins. Two objects with padding around them will have double padding when next to each other, but two objects with margins around them will merge the margin area (using the largest), giving more consistent results.

So: .p { margin: 1em 0; } will provide a single line-height space above and below the paragraphs (making sure they do not end up flush against container objects and such) which remains one line-height when two are adjacent.

The asterisk is superfluous as well, as it is implied when just the class is specified. The asterisk is generally only useful when attempting to match all tags regardless of class or id. Some examples:

* { All elements } div.sidebar * { All elements descended from sidebar classed divs } .sidebar { All elements classed with sidebar }

But I read the OP as wanting double carriage-returns for the same reason that I need to use them. WordPress needs them to identify proper paragraphs, and is therefore a technical requirement rather than an aesthetic requirement. Then they’d like to use word processor style single carriage-return paragraphs for ordinary writing.

I’ve just discovered ThisService, a friendly little program that has the ability to turn AppleScripts and Perl programs into Application Services. The type of service you need is called “Filter (both)” in ThisService. And here’s the Perl script:

#!/usr/bin/perl -w -CIO use strict; my $input; { undef $/; $input = <STDIN>; } $input =~ s/\n/\n\n/g; print $input;

Additionally, you can assign a shortcut to your new Application Service in OS X’s System Preferences –
if you can find a key combination that isn’t already used by Scrivener :imp:

Do you know what this means? I know have the ability to mess up my computer with a single click.

And you are now on the watch list.

HUGE apologies for not responding to this earlier - I’d foolishly assumed that I would get emailed when replies were made.

Thank you so much for the help! I’ll change the paragraph spacing as recommended, and I’ll stop ripping my hair out looking for a way to do it per project.


Many, many thanks!

If you want replies to be sent (actually I think you just get a notice that a reply was sent), click the little “Subscribe topic” button at the very bottom.

By the way, for (other) jobs for which Applescript is apt, I think I would just put the script under the Script Menu (we do all have that turned on, don’t we?) and avoid using Services (and this third-party app) altogether.


mmm… you don’t happen to have an applescript at hand, that runs a do shell script “perl -e” on the pasteboard, do you? :slight_smile:

Hmm. Can’t say that I do. I am a perl dropout.